2 lines
58 KiB
JavaScript
2 lines
58 KiB
JavaScript
import{r as Xn}from"./react-vendor-jWT2yUdV.js";import{bH as N,bI as _e,bJ as Bt,bg as z,bi as ve,bK as Ge,bj as Lt,bL as _t,bM as Yn,bN as qn,bO as Zn,bP as Jn,bQ as Qn,bR as es,bn as K,bS as ts,bT as ns,bU as he,bV as it,bW as Gt,bX as ss,bY as is,bZ as rs,b_ as Ut,b$ as as,c0 as os,c1 as us,c2 as ls,c3 as cs,c4 as jt,c5 as Wt,c6 as Ht,c7 as $t}from"./index-DiaaLdUu.js";function hs(t,e){t.indexOf(e)===-1&&t.push(e)}function fs(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let Ue=()=>{};const zt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Xt=t=>/^0[^.\s]+$/u.test(t);function je(t){let e;return()=>(e===void 0&&(e=t()),e)}const X=t=>t,ds=(t,e)=>n=>e(t(n)),fe=(...t)=>t.reduce(ds),Yt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class qt{constructor(){this.subscriptions=[]}add(e){return hs(this.subscriptions,e),()=>fs(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const R=t=>t*1e3,I=t=>t/1e3;function Zt(t,e){return e?t*(1e3/e):0}const Jt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ps=1e-7,ms=12;function gs(t,e,n,s,i){let r,a,o=0;do a=e+(n-e)/2,r=Jt(a,s,i)-t,r>0?n=a:e=a;while(Math.abs(r)>ps&&++o<ms);return a}function te(t,e,n,s){if(t===e&&n===s)return X;const i=r=>gs(r,0,1,t,n);return r=>r===0||r===1?r:Jt(i(r),e,s)}const Qt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,en=t=>e=>1-t(1-e),tn=te(.33,1.53,.69,.99),We=en(tn),nn=Qt(We),sn=t=>(t*=2)<1?.5*We(t):.5*(2-Math.pow(2,-10*(t-1))),He=t=>1-Math.sin(Math.acos(t)),ys=en(He),rn=Qt(He),bs=te(.42,0,1,1),Ts=te(0,0,.58,1),an=te(.42,0,.58,1),vs=t=>Array.isArray(t)&&typeof t[0]!="number",on=t=>Array.isArray(t)&&typeof t[0]=="number",Vs={linear:X,easeIn:bs,easeInOut:an,easeOut:Ts,circIn:He,circInOut:rn,circOut:ys,backIn:We,backInOut:nn,backOut:tn,anticipate:sn},As=t=>typeof t=="string",rt=t=>{if(on(t)){Ue(t.length===4);const[e,n,s,i]=t;return te(e,n,s,i)}else if(As(t))return Vs[t];return t},se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xs(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(l){a.has(l)&&(c.schedule(l),t()),l(o)}const c={schedule:(l,f=!1,h=!1)=>{const v=h&&i?n:s;return f&&a.add(l),v.has(l)||v.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(o=l,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(u),n.clear(),i=!1,r&&(r=!1,c.process(l))}};return c}const ws=40;function un(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=se.reduce((g,x)=>(g[x]=xs(r),g),{}),{setup:o,read:u,resolveKeyframes:c,preUpdate:l,update:f,preRender:h,render:d,postRender:v}=a,b=()=>{const g=N.useManualTiming?i.timestamp:performance.now();n=!1,N.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,ws),1)),i.timestamp=g,i.isProcessing=!0,o.process(i),u.process(i),c.process(i),l.process(i),f.process(i),h.process(i),d.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(b))},T=()=>{n=!0,s=!0,i.isProcessing||t(b)};return{schedule:se.reduce((g,x)=>{const m=a[x];return g[x]=(A,M=!1,y=!1)=>(n||T(),m.schedule(A,M,y)),g},{}),cancel:g=>{for(let x=0;x<se.length;x++)a[se[x]].cancel(g)},state:i,steps:a}}const{schedule:O,cancel:Ve,state:ae,steps:ia}=un(typeof requestAnimationFrame<"u"?requestAnimationFrame:X,!0);let ie;function Ss(){ie=void 0}const E={now:()=>(ie===void 0&&E.set(ae.isProcessing||N.useManualTiming?ae.timestamp:performance.now()),ie),set:t=>{ie=t,queueMicrotask(Ss)}},J=t=>Math.round(t*1e5)/1e5,$e=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ms(t){return t==null}const Cs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ze=(t,e)=>n=>!!(typeof n=="string"&&Cs.test(n)&&n.startsWith(t)||e&&!Ms(n)&&Object.prototype.hasOwnProperty.call(n,e)),ln=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,o]=s.match($e);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},Ps=t=>z(0,255,t),de={..._e,transform:t=>Math.round(Ps(t))},L={test:ze("rgb","red"),parse:ln("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(n)+", "+J(Bt.transform(s))+")"};function Fs(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ae={test:ze("#"),parse:Fs,transform:L.transform},H={test:ze("hsl","hue"),parse:ln("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ve.transform(J(e))+", "+ve.transform(J(n))+", "+J(Bt.transform(s))+")"},S={test:t=>L.test(t)||Ae.test(t)||H.test(t),parse:t=>L.test(t)?L.parse(t):H.test(t)?H.parse(t):Ae.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?L.transform(t):H.transform(t),getAnimatableNone:t=>{const e=S.parse(t);return e.alpha=0,S.transform(e)}},Ds=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Es(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match($e))==null?void 0:e.length)||0)+(((n=t.match(Ds))==null?void 0:n.length)||0)>0}const cn="number",hn="color",Is="var",Os="var(",at="${}",Rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ee(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Rs,u=>(S.test(u)?(s.color.push(r),i.push(hn),n.push(S.parse(u))):u.startsWith(Os)?(s.var.push(r),i.push(Is),n.push(u)):(s.number.push(r),i.push(cn),n.push(parseFloat(u))),++r,at)).split(at);return{values:n,split:o,indexes:s,types:i}}function fn(t){return ee(t).values}function dn(t){const{split:e,types:n}=ee(t),s=e.length;return i=>{let r="";for(let a=0;a<s;a++)if(r+=e[a],i[a]!==void 0){const o=n[a];o===cn?r+=J(i[a]):o===hn?r+=S.transform(i[a]):r+=i[a]}return r}}const Ns=t=>typeof t=="number"?0:S.test(t)?S.getAnimatableNone(t):t;function Ks(t){const e=fn(t);return dn(t)(e.map(Ns))}const Y={test:Es,parse:fn,createTransformer:dn,getAnimatableNone:Ks};function pe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ks({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,a=0;if(!e)i=r=a=n;else{const o=n<.5?n*(1+e):n+e-n*e,u=2*n-o;i=pe(u,o,t+1/3),r=pe(u,o,t),a=pe(u,o,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:s}}function oe(t,e){return n=>n>0?e:t}const ne=(t,e,n)=>t+(e-t)*n,me=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Bs=[Ae,L,H],Ls=t=>Bs.find(e=>e.test(t));function ot(t){const e=Ls(t);if(!e)return!1;let n=e.parse(t);return e===H&&(n=ks(n)),n}const ut=(t,e)=>{const n=ot(t),s=ot(e);if(!n||!s)return oe(t,e);const i={...n};return r=>(i.red=me(n.red,s.red,r),i.green=me(n.green,s.green,r),i.blue=me(n.blue,s.blue,r),i.alpha=ne(n.alpha,s.alpha,r),L.transform(i))},xe=new Set(["none","hidden"]);function _s(t,e){return xe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Gs(t,e){return n=>ne(t,e,n)}function Xe(t){return typeof t=="number"?Gs:typeof t=="string"?Ge(t)?oe:S.test(t)?ut:Ws:Array.isArray(t)?pn:typeof t=="object"?S.test(t)?ut:Us:oe}function pn(t,e){const n=[...t],s=n.length,i=t.map((r,a)=>Xe(r)(r,e[a]));return r=>{for(let a=0;a<s;a++)n[a]=i[a](r);return n}}function Us(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Xe(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function js(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],a=t.indexes[r][s[r]],o=t.values[a]??0;n[i]=o,s[r]++}return n}const Ws=(t,e)=>{const n=Y.createTransformer(e),s=ee(t),i=ee(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?xe.has(t)&&!i.values.length||xe.has(e)&&!s.values.length?_s(t,e):fe(pn(js(s,i),i.values),n):oe(t,e)};function mn(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?ne(t,e,n):Xe(t)(t,e)}const Hs=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>O.update(e,n),stop:()=>Ve(e),now:()=>ae.isProcessing?ae.timestamp:E.now()}},gn=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ue=2e4;function Ye(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ue;)e+=n,s=t.next(e);return e>=ue?1/0:e}function $s(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Ye(s),ue);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:I(i)}}const zs=5;function yn(t,e,n){const s=Math.max(e-zs,0);return Zt(n-t(s),e-s)}const w={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ge=.001;function Xs({duration:t=w.duration,bounce:e=w.bounce,velocity:n=w.velocity,mass:s=w.mass}){let i,r,a=1-e;a=z(w.minDamping,w.maxDamping,a),t=z(w.minDuration,w.maxDuration,I(t)),a<1?(i=c=>{const l=c*a,f=l*t,h=l-n,d=we(c,a),v=Math.exp(-f);return ge-h/d*v},r=c=>{const f=c*a*t,h=f*n+n,d=Math.pow(a,2)*Math.pow(c,2)*t,v=Math.exp(-f),b=we(Math.pow(c,2),a);return(-i(c)+ge>0?-1:1)*((h-d)*v)/b}):(i=c=>{const l=Math.exp(-c*t),f=(c-n)*t+1;return-ge+l*f},r=c=>{const l=Math.exp(-c*t),f=(n-c)*(t*t);return l*f});const o=5/t,u=qs(i,r,o);if(t=R(t),isNaN(u))return{stiffness:w.stiffness,damping:w.damping,duration:t};{const c=Math.pow(u,2)*s;return{stiffness:c,damping:a*2*Math.sqrt(s*c),duration:t}}}const Ys=12;function qs(t,e,n){let s=n;for(let i=1;i<Ys;i++)s=s-t(s)/e(s);return s}function we(t,e){return t*Math.sqrt(1-e*e)}const Zs=["duration","bounce"],Js=["stiffness","damping","mass"];function lt(t,e){return e.some(n=>t[n]!==void 0)}function Qs(t){let e={velocity:w.velocity,stiffness:w.stiffness,damping:w.damping,mass:w.mass,isResolvedFromDuration:!1,...t};if(!lt(t,Js)&<(t,Zs))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*z(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:w.mass,stiffness:i,damping:r}}else{const n=Xs(t);e={...e,...n,mass:w.mass},e.isResolvedFromDuration=!0}return e}function le(t=w.visualDuration,e=w.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:r},{stiffness:u,damping:c,mass:l,duration:f,velocity:h,isResolvedFromDuration:d}=Qs({...n,velocity:-I(n.velocity||0)}),v=h||0,b=c/(2*Math.sqrt(u*l)),T=a-r,p=I(Math.sqrt(u/l)),V=Math.abs(T)<5;s||(s=V?w.restSpeed.granular:w.restSpeed.default),i||(i=V?w.restDelta.granular:w.restDelta.default);let g;if(b<1){const m=we(p,b);g=A=>{const M=Math.exp(-b*p*A);return a-M*((v+b*p*T)/m*Math.sin(m*A)+T*Math.cos(m*A))}}else if(b===1)g=m=>a-Math.exp(-p*m)*(T+(v+p*T)*m);else{const m=p*Math.sqrt(b*b-1);g=A=>{const M=Math.exp(-b*p*A),y=Math.min(m*A,300);return a-M*((v+b*p*T)*Math.sinh(y)+m*T*Math.cosh(y))/m}}const x={calculatedDuration:d&&f||null,next:m=>{const A=g(m);if(d)o.done=m>=f;else{let M=m===0?v:0;b<1&&(M=m===0?R(v):yn(g,m,A));const y=Math.abs(M)<=s,P=Math.abs(a-A)<=i;o.done=y&&P}return o.value=o.done?a:A,o},toString:()=>{const m=Math.min(Ye(x),ue),A=gn(M=>x.next(m*M).value,m,30);return m+"ms "+A},toTransition:()=>{}};return x}le.applyToOptions=t=>{const e=$s(t,100,le);return t.ease=e.ease,t.duration=R(e.duration),t.type="keyframes",t};function Se({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:u,restDelta:c=.5,restSpeed:l}){const f=t[0],h={done:!1,value:f},d=y=>o!==void 0&&y<o||u!==void 0&&y>u,v=y=>o===void 0?u:u===void 0||Math.abs(o-y)<Math.abs(u-y)?o:u;let b=n*e;const T=f+b,p=a===void 0?T:a(T);p!==T&&(b=p-f);const V=y=>-b*Math.exp(-y/s),g=y=>p+V(y),x=y=>{const P=V(y),F=g(y);h.done=Math.abs(P)<=c,h.value=h.done?p:F};let m,A;const M=y=>{d(h.value)&&(m=y,A=le({keyframes:[h.value,v(h.value)],velocity:yn(g,y,h.value),damping:i,stiffness:r,restDelta:c,restSpeed:l}))};return M(0),{calculatedDuration:null,next:y=>{let P=!1;return!A&&m===void 0&&(P=!0,x(y),M(y)),m!==void 0&&y>=m?A.next(y-m):(!P&&x(y),h)}}}function ei(t,e,n){const s=[],i=n||N.mix||mn,r=t.length-1;for(let a=0;a<r;a++){let o=i(t[a],t[a+1]);if(e){const u=Array.isArray(e)?e[a]||X:e;o=fe(u,o)}s.push(o)}return s}function ti(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Ue(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=ei(e,s,i),u=o.length,c=l=>{if(a&&l<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const h=Yt(t[f],t[f+1],l);return o[f](h)};return n?l=>c(z(t[0],t[r-1],l)):c}function ni(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Yt(0,e,s);t.push(ne(n,1,i))}}function si(t){const e=[0];return ni(e,t.length-1),e}function ii(t,e){return t.map(n=>n*e)}function ri(t,e){return t.map(()=>e||an).splice(0,t.length-1)}function Q({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=vs(s)?s.map(rt):rt(s),r={done:!1,value:e[0]},a=ii(n&&n.length===e.length?n:si(e),t),o=ti(a,e,{ease:Array.isArray(i)?i:ri(e,i)});return{calculatedDuration:t,next:u=>(r.value=o(u),r.done=u>=t,r)}}const ai=t=>t!==null;function qe(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(ai),o=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!o||s===void 0?r[o]:s}const oi={decay:Se,inertia:Se,tween:Q,keyframes:Q,spring:le};function bn(t){typeof t.type=="string"&&(t.type=oi[t.type])}class Ze{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ui=t=>t/100;class Je extends Ze{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==E.now()&&this.tick(E.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;bn(e);const{type:n=Q,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e;let{keyframes:o}=e;const u=n||Q;u!==Q&&typeof o[0]!="number"&&(this.mixKeyframes=fe(ui,mn(o[0],o[1])),o=[0,100]);const c=u({...e,keyframes:o});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Ye(c));const{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:l,repeat:f,repeatType:h,repeatDelay:d,type:v,onUpdate:b,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let g=this.currentTime,x=s;if(f){const y=Math.min(this.currentTime,i)/o;let P=Math.floor(y),F=y%1;!F&&y>=1&&(F=1),F===1&&P--,P=Math.min(P,f+1),!!(P%2)&&(h==="reverse"?(F=1-F,d&&(F-=d/o)):h==="mirror"&&(x=a)),g=z(0,1,F)*o}const m=V?{done:!1,value:l[0]}:x.next(g);r&&(m.value=r(m.value));let{done:A}=m;!V&&u!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return M&&v!==Se&&(m.value=qe(l,this.options,T,this.speed)),b&&b(m.value),M&&this.finish(),m}then(e,n){return this.finished.then(e,n)}get duration(){return I(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(this.currentTime)}set time(e){var n;e=R(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(E.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=I(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=Hs,startTime:n}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(E.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function li(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const _=t=>t*180/Math.PI,Me=t=>{const e=_(Math.atan2(t[1],t[0]));return Ce(e)},ci={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Me,rotateZ:Me,skewX:t=>_(Math.atan(t[1])),skewY:t=>_(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ce=t=>(t=t%360,t<0&&(t+=360),t),ct=Me,ht=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ft=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),hi={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ht,scaleY:ft,scale:t=>(ht(t)+ft(t))/2,rotateX:t=>Ce(_(Math.atan2(t[6],t[5]))),rotateY:t=>Ce(_(Math.atan2(-t[2],t[0]))),rotateZ:ct,rotate:ct,skewX:t=>_(Math.atan(t[4])),skewY:t=>_(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pe(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Pe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=hi,i=n;else{const o=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ci,i=o}if(!i)return Pe(e);const r=s[e],a=i[1].split(",").map(di);return typeof r=="function"?r(a):a[r]}const fi=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function di(t){return parseFloat(t.trim())}const dt=t=>t===_e||t===Lt,pi=new Set(["x","y","z"]),mi=_t.filter(t=>!pi.has(t));function gi(t){const e=[];return mi.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const G={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};G.translateX=G.x;G.translateY=G.y;const U=new Set;let De=!1,Ee=!1,Ie=!1;function Tn(){if(Ee){const t=Array.from(U).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=gi(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{var o;(o=s.getValue(r))==null||o.set(a)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ee=!1,De=!1,U.forEach(t=>t.complete(Ie)),U.clear()}function vn(){U.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ee=!0)})}function yi(){Ie=!0,vn(),Tn(),Ie=!1}class Qe{constructor(e,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(U.add(this),De||(De=!0,O.read(vn),O.resolveKeyframes(Tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const o=s.readValue(n,a);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}li(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),U.delete(this)}cancel(){this.state==="scheduled"&&(U.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bi=t=>t.startsWith("--");function Ti(t,e,n){bi(e)?t.style.setProperty(e,n):t.style[e]=n}const vi=je(()=>window.ScrollTimeline!==void 0),Vi={};function Ai(t,e){const n=je(t);return()=>Vi[e]??n()}const Vn=Ai(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Z=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Z([0,.65,.55,1]),circOut:Z([.55,0,1,.45]),backIn:Z([.31,.01,.66,-.59]),backOut:Z([.33,1.53,.69,.99])};function An(t,e){if(t)return typeof t=="function"?Vn()?gn(t,e):"ease-out":on(t)?Z(t):Array.isArray(t)?t.map(n=>An(n,e)||pt.easeOut):pt[t]}function xi(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:u}={},c=void 0){const l={[e]:n};u&&(l.offset=u);const f=An(o,i);Array.isArray(f)&&(l.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),t.animate(l,h)}function xn(t){return typeof t=="function"&&"applyToOptions"in t}function wi({type:t,...e}){return xn(t)&&Vn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Si extends Ze{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:o,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Ue(typeof e.type!="string");const c=wi(e);this.animation=xi(n,s,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=qe(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(l):Ti(n,s,l),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return I(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=R(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&vi()?(this.animation.timeline=e,X):n(this)}}const wn={anticipate:sn,backInOut:nn,circInOut:rn};function Mi(t){return t in wn}function Ci(t){typeof t.ease=="string"&&Mi(t.ease)&&(t.ease=wn[t.ease])}const mt=10;class Pi extends Si{constructor(e){Ci(e),bn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...a}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const o=new Je({...a,autoplay:!1}),u=R(this.finishedTime??this.time);n.setWithVelocity(o.sample(u-mt).value,o.sample(u).value,mt),o.stop()}}const gt=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Y.test(t)||t==="0")&&!t.startsWith("url("));function Fi(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Di(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],a=gt(i,e),o=gt(r,e);return!a||!o?!1:Fi(t)||(n==="spring"||xn(n))&&s}function Oe(t){t.duration=0,t.type="keyframes"}const Ei=new Set(["opacity","clipPath","filter","transform"]),Ii=je(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Oi(t){var l;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:a}=t;if(!(((l=e==null?void 0:e.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=e.owner.getProps();return Ii()&&n&&Ei.has(n)&&(n!=="transform"||!c)&&!u&&!s&&i!=="mirror"&&r!==0&&a!=="inertia"}const Ri=40;class Ni extends Ze{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:o,name:u,motionValue:c,element:l,...f}){var v;super(),this.stop=()=>{var b,T;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(T=this.keyframeResolver)==null||T.cancel()},this.createdAt=E.now();const h={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:a,name:u,motionValue:c,element:l,...f},d=(l==null?void 0:l.KeyframeResolver)||Qe;this.keyframeResolver=new d(o,(b,T,p)=>this.onKeyframesResolved(b,T,h,!p),u,c,l),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:a,velocity:o,delay:u,isHandoff:c,onUpdate:l}=s;this.resolvedAt=E.now(),Di(e,r,a,o)||((N.instantAnimations||!u)&&(l==null||l(qe(e,s,n))),e[0]=e[e.length-1],Oe(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Ri?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!c&&Oi(h)?new Pi({...h,element:h.motionValue.owner.current}):new Je(h);d.finished.then(()=>this.notifyFinished()).catch(X),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),yi()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Ki=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ki(t){const e=Ki.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Sn(t,e,n=1){const[s,i]=ki(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const a=r.trim();return zt(a)?parseFloat(a):a}return Ge(i)?Sn(i,e,n+1):i}function Mn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Cn=new Set(["width","height","top","left","right","bottom",..._t]),Bi={test:t=>t==="auto",parse:t=>t},Pn=t=>e=>e.test(t),Fn=[_e,Lt,ve,Yn,qn,Zn,Bi],yt=t=>Fn.find(Pn(t));function Li(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Xt(t):!0}const _i=new Set(["brightness","contrast","saturate","opacity"]);function Gi(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match($e)||[];if(!s)return t;const i=n.replace(s,"");let r=_i.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ui=/\b([a-z-]*)\(.*?\)/gu,Re={...Y,getAnimatableNone:t=>{const e=t.match(Ui);return e?e.map(Gi).join(" "):t}},ji={...Jn,color:S,backgroundColor:S,outlineColor:S,fill:S,stroke:S,borderColor:S,borderTopColor:S,borderRightColor:S,borderBottomColor:S,borderLeftColor:S,filter:Re,WebkitFilter:Re},Dn=t=>ji[t];function En(t,e){let n=Dn(t);return n!==Re&&(n=Y),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Wi=new Set(["auto","none","0"]);function Hi(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Wi.has(r)&&ee(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=En(n,i)}class $i extends Qe{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let c=e[u];if(typeof c=="string"&&(c=c.trim(),Ge(c))){const l=Sn(c,n.current);l!==void 0&&(e[u]=l),u===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Cn.has(s)||e.length!==2)return;const[i,r]=e,a=yt(i),o=yt(r);if(a!==o)if(dt(a)&&dt(o))for(let u=0;u<e.length;u++){const c=e[u];typeof c=="string"&&(e[u]=parseFloat(c))}else G[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Li(e[i]))&&s.push(i);s.length&&Hi(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=G[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var o;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,a=s[r];s[r]=G[n](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([u,c])=>{e.getValue(u).set(c)}),this.resolveNoneKeyframes()}}function zi(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const bt=30,Xi=t=>!isNaN(parseFloat(t));class Yi{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=E.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=E.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Xi(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new qt);const s=this.events[e].add(n);return e==="change"?()=>{s(),O.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=E.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bt)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bt);return Zt(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ce(t,e){return new Yi(t,e)}const{schedule:qi}=un(queueMicrotask,!1),Tt={x:!1,y:!1};function In(){return Tt.x||Tt.y}function On(t,e){const n=zi(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function vt(t){return!(t.pointerType==="touch"||In())}function Zi(t,e,n={}){const[s,i,r]=On(t,n),a=o=>{if(!vt(o))return;const{target:u}=o,c=e(u,o);if(typeof c!="function"||!u)return;const l=f=>{vt(f)&&(c(f),u.removeEventListener("pointerleave",l))};u.addEventListener("pointerleave",l,i)};return s.forEach(o=>{o.addEventListener("pointerenter",a,i)}),r}const Rn=(t,e)=>e?t===e?!0:Rn(t,e.parentElement):!1,Nn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ji=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Qi(t){return Ji.has(t.tagName)||t.tabIndex!==-1}const re=new WeakSet;function Vt(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const er=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Vt(()=>{if(re.has(n))return;ye(n,"down");const i=Vt(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function At(t){return Nn(t)&&!In()}function tr(t,e,n={}){const[s,i,r]=On(t,n),a=o=>{const u=o.currentTarget;if(!At(o))return;re.add(u);const c=e(u,o),l=(d,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),re.has(u)&&re.delete(u),At(d)&&typeof c=="function"&&c(d,{success:v})},f=d=>{l(d,u===window||u===document||n.useGlobalTarget||Rn(u,d.target))},h=d=>{l(d,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,i),Qn(o)&&(o.addEventListener("focus",c=>er(c,i)),!Qi(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),r}const nr=[...Fn,S,Y],sr=t=>nr.find(Pn(t));function ir({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ra({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function be(t){return t===void 0||t===1}function ar({scale:t,scaleX:e,scaleY:n}){return!be(t)||!be(e)||!be(n)}function or(t){return ar(t)||ur(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ur(t){return xt(t.x)||xt(t.y)}function xt(t){return t&&t!=="0%"}function wt(t,e,n){const s=t-n,i=e*s;return n+i}function St(t,e,n,s,i){return i!==void 0&&(t=wt(t,i,s)),wt(t,n,s)+e}function Ne(t,e=0,n=1,s,i){t.min=St(t.min,e,n,s,i),t.max=St(t.max,e,n,s,i)}function lr(t,{x:e,y:n}){Ne(t.x,e.translate,e.scale,e.originPoint),Ne(t.y,n.translate,n.scale,n.originPoint)}const Mt=.999999999999,Ct=1.0000000000001;function aa(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,a;for(let o=0;o<i;o++){r=n[o],a=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Dt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,lr(t,a)),s&&or(r.latestValues)&&Dt(t,r.latestValues))}e.x<Ct&&e.x>Mt&&(e.x=1),e.y<Ct&&e.y>Mt&&(e.y=1)}function Pt(t,e){t.min=t.min+e,t.max=t.max+e}function Ft(t,e,n,s,i=.5){const r=ne(t.min,t.max,i);Ne(t,e,n,r,s)}function Dt(t,e){Ft(t.x,e.x,e.scaleX,e.scale,e.originX),Ft(t.y,e.y,e.scaleY,e.scale,e.originY)}function Kn(t,e){return ir(rr(t.getBoundingClientRect(),e))}function oa(t,e,n){const s=Kn(t,n),{scroll:i}=e;return i&&(Pt(s.x,i.offset.x),Pt(s.y,i.offset.y)),s}const Et=()=>({translate:0,scale:1,origin:0,originPoint:0}),ua=()=>({x:Et(),y:Et()}),It=()=>({min:0,max:0}),kn=()=>({x:It(),y:It()}),Ke={current:null},Bn={current:!1};function cr(){if(Bn.current=!0,!!es)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ke.current=t.matches;t.addEventListener("change",e),e()}else Ke.current=!1}const hr=new WeakMap;function fr(t,e,n){for(const s in e){const i=e[s],r=n[s];if(K(i))t.addValue(s,i);else if(K(r))t.addValue(s,ce(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const a=t.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,ce(a!==void 0?a:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ot=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dr{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qe,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=E.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,O.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=ts(n),this.isVariantNode=ns(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const d=f[h];u[h]!==void 0&&K(d)&&d.set(u[h])}}mount(e){var n;this.current=e,hr.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),Bn.current||cr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ke.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=he.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&O.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in it){const n=it[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ot.length;s++){const i=Ot[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=e[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=fr(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ce(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(zt(s)||Xt(s))?s=parseFloat(s):!sr(s)&&Y.test(n)&&(s=En(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const a=Gt(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);a&&(s=a[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new qt),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){qi.render(this.render)}}class Ln extends dr{constructor(){super(...arguments),this.KeyframeResolver=$i}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function _n(t,{style:e,vars:n},s,i){const r=t.style;let a;for(a in e)r[a]=e[a];i==null||i.applyProjectionStyles(r,s);for(a in n)r.setProperty(a,n[a])}function pr(t){return window.getComputedStyle(t)}class mr extends Ln{constructor(){super(...arguments),this.type="html",this.renderInstance=_n}readValueFromInstance(e,n){var s;if(he.has(n))return(s=this.projection)!=null&&s.isProjecting?Pe(n):fi(e,n);{const i=pr(e),r=(ss(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Kn(e,n)}build(e,n,s){is(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return rs(e,n,s)}}const Gn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function gr(t,e,n,s){_n(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Gn.has(i)?i:Ut(i),e.attrs[i])}class yr extends Ln{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kn}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(he.has(n)){const s=Dn(n);return s&&s.default||0}return n=Gn.has(n)?n:Ut(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return as(e,n,s)}build(e,n,s){os(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){gr(e,n,s,i)}mount(e){this.isSVGTag=us(e.tagName),super.mount(e)}}const la=(t,e)=>ls(t)?new yr(e):new mr(e,{allowProjection:t!==Xn.Fragment});function $(t,e,n){const s=t.getProps();return Gt(s,e,n!==void 0?n:s.custom,t)}const ke=t=>Array.isArray(t);function br(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ce(n))}function Tr(t){return ke(t)?t[t.length-1]||0:t}function vr(t,e){const n=$(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const a in r){const o=Tr(r[a]);br(t,a,o)}}function Vr(t){return!!(K(t)&&t.add)}function Ar(t,e){const n=t.getValue("willChange");if(Vr(n))return n.add(e);if(!n&&N.WillChange){const s=new N.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function xr(t){return t.props[cs]}const wr=t=>t!==null;function Sr(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(wr),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}const Mr={type:"spring",stiffness:500,damping:25,restSpeed:10},Cr=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Pr={type:"keyframes",duration:.8},Fr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dr=(t,{keyframes:e})=>e.length>2?Pr:he.has(t)?t.startsWith("scale")?Cr(e[1]):Mr:Fr;function Er({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:a,repeatDelay:o,from:u,elapsed:c,...l}){return!!Object.keys(l).length}const Ir=(t,e,n,s={},i,r)=>a=>{const o=Mn(s,t)||{},u=o.delay||s.delay||0;let{elapsed:c=0}=s;c=c-R(u);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-c,onUpdate:h=>{e.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:r?void 0:i};Er(o)||Object.assign(l,Dr(t,l)),l.duration&&(l.duration=R(l.duration)),l.repeatDelay&&(l.repeatDelay=R(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Oe(l),l.delay===0&&(f=!0)),(N.instantAnimations||N.skipAnimations)&&(f=!0,Oe(l),l.delay=0),l.allowFlatten=!o.type&&!o.ease,f&&!r&&e.get()!==void 0){const h=Sr(l.keyframes,o);if(h!==void 0){O.update(()=>{l.onUpdate(h),l.onComplete()});return}}return o.isSync?new Je(l):new Ni(l)};function Or({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Un(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:a,...o}=e;s&&(r=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const l in o){const f=t.getValue(l,t.latestValues[l]??null),h=o[l];if(h===void 0||c&&Or(c,l))continue;const d={delay:n,...Mn(r||{},l)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===v&&!d.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const p=xr(t);if(p){const V=window.MotionHandoffAnimation(p,l,O);V!==null&&(d.startTime=V,b=!0)}}Ar(t,l),f.start(Ir(l,f,h,t.shouldReduceMotion&&Cn.has(l)?{type:!1}:d,t,b));const T=f.animation;T&&u.push(T)}return a&&Promise.all(u).then(()=>{O.update(()=>{a&&vr(t,a)})}),u}function jn(t,e,n,s=0,i=1){const r=Array.from(t).sort((c,l)=>c.sortNodePosition(l)).indexOf(e),a=t.size,o=(a-1)*s;return typeof n=="function"?n(r,a):i===1?r*s:o-r*s}function Be(t,e,n={}){var u;const s=$(t,e,n.type==="exit"?(u=t.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Un(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:h}=i;return Rr(t,e,c,l,f,h,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[c,l]=o==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(n.delay)])}function Rr(t,e,n=0,s=0,i=0,r=1,a){const o=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),o.push(Be(u,e,{...a,delay:n+(typeof s=="function"?0:s)+jn(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(o)}function Nr(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Be(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Be(t,e,n);else{const i=typeof e=="function"?$(t,e,n.custom):e;s=Promise.all(Un(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Wn(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Kr=Wt.length;function Hn(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Hn(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Kr;n++){const s=Wt[n],i=t.props[s];(jt(i)||i===!1)&&(e[s]=i)}return e}const kr=[...$t].reverse(),Br=$t.length;function Lr(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Nr(t,n,s)))}function _r(t){let e=Lr(t),n=Rt(),s=!0;const i=u=>(c,l)=>{var h;const f=$(t,l,u==="exit"?(h=t.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:v,...b}=f;c={...c,...b,...v}}return c};function r(u){e=u(t)}function a(u){const{props:c}=t,l=Hn(t.parent)||{},f=[],h=new Set;let d={},v=1/0;for(let T=0;T<Br;T++){const p=kr[T],V=n[p],g=c[p]!==void 0?c[p]:l[p],x=jt(g),m=p===u?V.isActive:null;m===!1&&(v=T);let A=g===l[p]&&g!==c[p]&&x;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),V.protectedKeys={...d},!V.isActive&&m===null||!g&&!V.prevProp||Ht(g)||typeof g=="boolean")continue;const M=Gr(V.prevProp,g);let y=M||p===u&&V.isActive&&!A&&x||T>v&&x,P=!1;const F=Array.isArray(g)?g:[g];let j=F.reduce(i(p),{});m===!1&&(j={});const{prevResolvedValues:tt={}}=V,$n={...tt,...j},nt=C=>{y=!0,h.has(C)&&(P=!0,h.delete(C)),V.needsAnimating[C]=!0;const D=t.getValue(C);D&&(D.liveStyle=!1)};for(const C in $n){const D=j[C],k=tt[C];if(d.hasOwnProperty(C))continue;let W=!1;ke(D)&&ke(k)?W=!Wn(D,k):W=D!==k,W?D!=null?nt(C):h.add(C):D!==void 0&&h.has(C)?nt(C):V.protectedKeys[C]=!0}V.prevProp=g,V.prevResolvedValues=j,V.isActive&&(d={...d,...j}),s&&t.blockInitialAnimation&&(y=!1);const st=A&&M;y&&(!st||P)&&f.push(...F.map(C=>{const D={type:p};if(typeof C=="string"&&s&&!st&&t.manuallyAnimateOnMount&&t.parent){const{parent:k}=t,W=$(k,C);if(k.enteringChildren&&W){const{delayChildren:zn}=W.transition||{};D.delay=jn(k.enteringChildren,t,zn)}}return{animation:C,options:D}}))}if(h.size){const T={};if(typeof c.initial!="boolean"){const p=$(t,Array.isArray(c.initial)?c.initial[0]:c.initial);p&&p.transition&&(T.transition=p.transition)}h.forEach(p=>{const V=t.getBaseTarget(p),g=t.getValue(p);g&&(g.liveStyle=!0),T[p]=V??null}),f.push({animation:T})}let b=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,b?e(f):Promise.resolve()}function o(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(h=>{var d;return(d=h.animationState)==null?void 0:d.setActive(u,c)}),n[u].isActive=c;const l=a(u);for(const h in n)n[h].protectedKeys={};return l}return{animateChanges:a,setActive:o,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Rt()}}}function Gr(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Wn(e,t):!1}function B(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rt(){return{animate:B(!0),whileInView:B(),whileHover:B(),whileTap:B(),whileDrag:B(),whileFocus:B(),exit:B()}}class q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Ur extends q{constructor(e){super(e),e.animationState||(e.animationState=_r(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ht(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let jr=0;class Wr extends q{constructor(){super(...arguments),this.id=jr++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ca={animation:{Feature:Ur},exit:{Feature:Wr}};function Nt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function et(t){return{point:{x:t.pageX,y:t.pageY}}}const ha=t=>e=>Nn(e)&&t(e,et(e));function Kt(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&O.postRender(()=>r(e,et(e)))}class Hr extends q{mount(){const{current:e}=this.node;e&&(this.unmount=Zi(e,(n,s)=>(Kt(this.node,s,"Start"),i=>Kt(this.node,i,"End"))))}unmount(){}}class $r extends q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fe(Nt(this.node.current,"focus",()=>this.onFocus()),Nt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kt(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&O.postRender(()=>r(e,et(e)))}class zr extends q{mount(){const{current:e}=this.node;e&&(this.unmount=tr(e,(n,s)=>(kt(this.node,s,"Start"),(i,{success:r})=>kt(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Le=new WeakMap,Te=new WeakMap,Xr=t=>{const e=Le.get(t.target);e&&e(t)},Yr=t=>{t.forEach(Xr)};function qr({root:t,...e}){const n=t||document;Te.has(n)||Te.set(n,{});const s=Te.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Yr,{root:t,...e})),s[i]}function Zr(t,e,n){const s=qr(e);return Le.set(t,n),s.observe(t),()=>{Le.delete(t),s.unobserve(t)}}const Jr={some:0,all:1};class Qr extends q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,a={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Jr[i]},o=u=>{const{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,r&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),h=c?l:f;h&&h(u)};return Zr(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ea(e,n))&&this.startObserver()}unmount(){}}function ea({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const fa={inView:{Feature:Qr},tap:{Feature:zr},focus:{Feature:$r},hover:{Feature:Hr}};export{hs as A,fs as B,E as C,ys as D,wt as E,q as F,Mn as G,ia as H,or as I,Pt as J,Dt as K,ar as L,lr as M,ur as N,aa as O,ua as P,xr as Q,qt as S,ca as a,Nt as b,la as c,ha as d,ae as e,O as f,fa as g,Nn as h,Tt as i,et as j,Ve as k,I as l,ne as m,Yt as n,kn as o,fe as p,oa as q,ra as r,R as s,ir as t,Ar as u,Ir as v,X as w,Y as x,qi as y,ce as z};
|