vendor: 83,842 bytes, line 1
1import{g6 as z,g7 as Ci,g8 as Pn,g9 as S,ga as wn,gb as Dn,gc as Mi,gd as ae,ge as Te,gf as Sn,gg as $t,gh as R,gi as H,gj as st,gk as V,gl as $,gm as X,gn as Li,go as U,gp as Ri,gq as ot,gr as An,gs as le,gt as ki,gu as Bi,gv as Ii,gw as ji,gx as Oi,gy as Vn,gz as Fi,gA as Ui,gB as ce,gC as Ni,gD as Wi,gE as ue,gF as he,gG as Gi,gH as Ki,gI as Hi,gJ as Pe,gK as we,gL as pt,gM as De,gN as zi,gO as _i,gP as $i,gQ as Xi,gR as Yi,gS as qi,gT as Zi,gU as Ji,gV as En,gW as b,gX as Qi,gY as ts,gZ as es,g_ as ns,g$ as bn,h0 as Cn,h1 as Mn,h2 as Ln,h3 as St,h4 as is,h5 as Rn,h6 as Xt,h7 as ss,h8 as Rt,h9 as kn,ha as nt,hb as kt,hc as Se,hd as os,r as At,he as rt,hf as rs,hg as as,j as ls,hh as cs}from"./index-D5ZfXxeH.js";const us=(t,e)=>n=>e(t(n)),ft=(...t)=>t.reduce(us),ut=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},Bn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,hs=1e-7,fs=12;function ds(t,e,n,i,s){let a,o,r=0;do o=e+(n-e)/2,a=Bn(o,i,s)-t,a>0?n=o:e=o;while(Math.abs(a)>hs&&++r<fs);return o}function dt(t,e,n,i){if(t===e&&n===i)return z;const s=a=>ds(a,0,1,t,n);return a=>a===0||a===1?a:Bn(s(a),e,i)}const In=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jn=t=>e=>1-t(1-e),On=dt(.33,1.53,.69,.99),fe=jn(On),Fn=In(fe),Un=t=>t>=1?1:(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1))),de=t=>1-Math.sin(Math.acos(t)),Nn=jn(de),Wn=In(de),ms=dt(.42,0,1,1),ps=dt(0,0,.58,1),Gn=dt(.42,0,.58,1),gs=t=>Array.isArray(t)&&typeof t[0]!="number",ys={linear:z,easeIn:ms,easeInOut:Gn,easeOut:ps,circIn:de,circInOut:Wn,circOut:Nn,backIn:fe,backInOut:Fn,backOut:On,anticipate:Un},vs=t=>typeof t=="string",Ae=t=>{if(Ci(t)){Pn(t.length===4);const[e,n,i,s]=t;return dt(e,n,i,s)}else if(vs(t))return ys[t];return t};function Bt(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 xs({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,a=0,o=0;if(!e)s=a=o=n;else{const r=n<.5?n*(1+e):n+e-n*e,c=2*n-r;s=Bt(c,r,t+1/3),a=Bt(c,r,t),o=Bt(c,r,t-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:i}}function Vt(t,e){return n=>n>0?e:t}const It=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ts=[Mi,wn,Dn],Ps=t=>Ts.find(e=>e.test(t));function Ve(t){const e=Ps(t);if(!e)return!1;let n=e.parse(t);return e===Dn&&(n=xs(n)),n}const Ee=(t,e)=>{const n=Ve(t),i=Ve(e);if(!n||!i)return Vt(t,e);const s={...n};return a=>(s.red=It(n.red,i.red,a),s.green=It(n.green,i.green,a),s.blue=It(n.blue,i.blue,a),s.alpha=S(n.alpha,i.alpha,a),wn.transform(s))},Yt=new Set(["none","hidden"]);function ws(t,e){return Yt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ds(t,e){return n=>S(t,e,n)}function me(t){return typeof t=="number"?Ds:typeof t=="string"?ae(t)?Vt:Te.test(t)?Ee:Vs:Array.isArray(t)?Kn:typeof t=="object"?Te.test(t)?Ee:Ss:Vt}function Kn(t,e){const n=[...t],i=n.length,s=t.map((a,o)=>me(a)(a,e[o]));return a=>{for(let o=0;o<i;o++)n[o]=s[o](a);return n}}function Ss(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=me(t[s])(t[s],e[s]));return s=>{for(const a in i)n[a]=i[a](s);return n}}function As(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const a=e.types[s],o=t.indexes[a][i[a]],r=t.values[o]??0;n[s]=r,i[a]++}return n}const Vs=(t,e)=>{const n=Sn.createTransformer(e),i=$t(t),s=$t(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Yt.has(t)&&!s.values.length||Yt.has(e)&&!i.values.length?ws(t,e):ft(Kn(As(i,s),s.values),n):Vt(t,e)};function Hn(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?S(t,e,n):me(t)(t,e)}const Es=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>st(e),now:()=>R.isProcessing?R.timestamp:H.now()}},Et=2e4;function pe(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Et;)e+=n,i=t.next(e);return e>=Et?1/0:e}function bs(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(pe(i),Et);return{type:"keyframes",ease:a=>i.next(s*a).value/e,duration:$(s)}}const A={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};function qt(t,e){return t*Math.sqrt(1-e*e)}const Cs=12;function Ms(t,e,n){let i=n;for(let s=1;s<Cs;s++)i=i-t(i)/e(i);return i}const jt=.001;function Ls({duration:t=A.duration,bounce:e=A.bounce,velocity:n=A.velocity,mass:i=A.mass}){let s,a,o=1-e;o=X(A.minDamping,A.maxDamping,o),t=X(A.minDuration,A.maxDuration,$(t)),o<1?(s=u=>{const l=u*o,h=l*t,f=l-n,d=qt(u,o),m=Math.exp(-h);return jt-f/d*m},a=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=qt(Math.pow(u,2),o);return(-s(u)+jt>0?-1:1)*((f-d)*m)/g}):(s=u=>{const l=Math.exp(-u*t),h=(u-n)*t+1;return-jt+l*h},a=u=>{const l=Math.exp(-u*t),h=(n-u)*(t*t);return l*h});const r=5/t,c=Ms(s,a,r);if(t=U(t),isNaN(c))return{stiffness:A.stiffness,damping:A.damping,duration:t};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:t}}}const Rs=["duration","bounce"],ks=["stiffness","damping","mass"];function be(t,e){return e.some(n=>t[n]!==void 0)}function Bs(t){let e={velocity:A.velocity,stiffness:A.stiffness,damping:A.damping,mass:A.mass,isResolvedFromDuration:!1,...t};if(!be(t,ks)&&be(t,Rs))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,a=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:A.mass,stiffness:s,damping:a}}else{const n=Ls({...t,velocity:0});e={...e,...n,mass:A.mass},e.isResolvedFromDuration=!0}return e}function bt(t=A.visualDuration,e=A.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],r={done:!1,value:a},{stiffness:c,damping:u,mass:l,duration:h,velocity:f,isResolvedFromDuration:d}=Bs({...n,velocity:-$(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(c*l)),p=o-a,y=$(Math.sqrt(c/l)),v=Math.abs(p)<5;i||(i=v?A.restSpeed.granular:A.restSpeed.default),s||(s=v?A.restDelta.granular:A.restDelta.default);let x,w,P,C,B,D;if(g<1)P=qt(y,g),C=(m+g*y*p)/P,x=T=>{const E=Math.exp(-g*y*T);return o-E*(C*Math.sin(P*T)+p*Math.cos(P*T))},B=g*y*C+p*P,D=g*y*p-C*P,w=T=>Math.exp(-g*y*T)*(B*Math.sin(P*T)+D*Math.cos(P*T));else if(g===1){x=E=>o-Math.exp(-y*E)*(p+(m+y*p)*E);const T=m+y*p;w=E=>Math.exp(-y*E)*(y*T*E-m)}else{const T=y*Math.sqrt(g*g-1);x=N=>{const _=Math.exp(-g*y*N),W=Math.min(T*N,300);return o-_*((m+g*y*p)*Math.sinh(W)+T*p*Math.cosh(W))/T};const E=(m+g*y*p)/T,I=g*y*E-p*T,q=g*y*p-E*T;w=N=>{const _=Math.exp(-g*y*N),W=Math.min(T*N,300);return _*(I*Math.sinh(W)+q*Math.cosh(W))}}const M={calculatedDuration:d&&h||null,velocity:T=>U(w(T)),next:T=>{if(!d&&g<1){const I=Math.exp(-g*y*T),q=Math.sin(P*T),N=Math.cos(P*T),_=o-I*(C*q+p*N),W=U(I*(B*q+D*N));return r.done=Math.abs(W)<=i&&Math.abs(o-_)<=s,r.value=r.done?o:_,r}const E=x(T);if(d)r.done=T>=h;else{const I=U(w(T));r.done=Math.abs(I)<=i&&Math.abs(o-E)<=s}return r.value=r.done?o:E,r},toString:()=>{const T=Math.min(pe(M),Et),E=Li(I=>M.next(T*I).value,T,30);return T+"ms "+E},toTransition:()=>{}};return M}bt.applyToOptions=t=>{const e=bs(t,100,bt);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};const Is=5;function zn(t,e,n){const i=Math.max(e-Is,0);return Ri(n-t(i),e-i)}function Zt({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:r,max:c,restDelta:u=.5,restSpeed:l}){const h=t[0],f={done:!1,value:h},d=D=>r!==void 0&&D<r||c!==void 0&&D>c,m=D=>r===void 0?c:c===void 0||Math.abs(r-D)<Math.abs(c-D)?r:c;let g=n*e;const p=h+g,y=o===void 0?p:o(p);y!==p&&(g=y-h);const v=D=>-g*Math.exp(-D/i),x=D=>y+v(D),w=D=>{const M=v(D),T=x(D);f.done=Math.abs(M)<=u,f.value=f.done?y:T};let P,C;const B=D=>{d(f.value)&&(P=D,C=bt({keyframes:[f.value,m(f.value)],velocity:zn(x,D,f.value),damping:s,stiffness:a,restDelta:u,restSpeed:l}))};return B(0),{calculatedDuration:null,next:D=>{let M=!1;return!C&&P===void 0&&(M=!0,w(D),B(D)),P!==void 0&&D>=P?C.next(D-P):(!M&&w(D),f)}}}function js(t,e,n){const i=[],s=n||ot.mix||Hn,a=t.length-1;for(let o=0;o<a;o++){let r=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||z:e;r=ft(c,r)}i.push(r)}return i}function Os(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const a=t.length;if(Pn(a===e.length),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=js(e,i,s),c=r.length,u=l=>{if(o&&l<t[0])return e[0];let h=0;if(c>1)for(;h<t.length-2&&!(l<t[h+1]);h++);const f=ut(t[h],t[h+1],l);return r[h](f)};return n?l=>u(X(t[0],t[a-1],l)):u}function Fs(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=ut(0,e,i);t.push(S(n,1,s))}}function Us(t){const e=[0];return Fs(e,t.length-1),e}function Ns(t,e){return t.map(n=>n*e)}function Ws(t,e){return t.map(()=>e||Gn).splice(0,t.length-1)}function at({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=gs(i)?i.map(Ae):Ae(i),a={done:!1,value:e[0]},o=Ns(n&&n.length===e.length?n:Us(e),t),r=Os(o,e,{ease:Array.isArray(s)?s:Ws(e,s)});return{calculatedDuration:t,next:c=>(a.value=r(c),a.done=c>=t,a)}}const Gs={decay:Zt,inertia:Zt,tween:at,keyframes:at,spring:bt};function _n(t){typeof t.type=="string"&&(t.type=Gs[t.type])}const Ks=t=>t/100;class Ct extends An{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;_n(e);const{type:n=at,repeat:i=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=e;let{keyframes:r}=e;const c=n||at;c!==at&&typeof r[0]!="number"&&(this.mixKeyframes=ft(Ks,Hn(r[0],r[1])),r=[0,100]);const u=c({...e,keyframes:r});a==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...r].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=pe(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}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:i,totalDuration:s,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:l,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,w=i;if(h){const D=Math.min(this.currentTime,s)/r;let M=Math.floor(D),T=D%1;!T&&D>=1&&(T=1),T===1&&M--,M=Math.min(M,h+1),M%2&&(f==="reverse"?(T=1-T,d&&(T-=d/r)):f==="mirror"&&(w=o)),x=X(0,1,T)*r}let P;v?(this.delayState.value=l[0],P=this.delayState):P=w.next(x),a&&!v&&(P.value=a(P.value));let{done:C}=P;!v&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return B&&m!==Zt&&(P.value=le(l,this.options,p,this.speed)),g&&g(P.value),B&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=U(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return zn(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(H.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Es,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(H.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const $n={anticipate:Un,backInOut:Fn,circInOut:Wn};function Hs(t){return t in $n}function zs(t){typeof t.ease=="string"&&Hs(t.ease)&&(t.ease=$n[t.ease])}const Ot=10;class _s extends ki{constructor(e){zs(e),_n(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:a,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const r=new Ct({...o,autoplay:!1}),c=Math.max(Ot,H.now()-this.startTime),u=X(0,Ot,c-Ot),l=r.sample(c).value,{name:h}=this.options;a&&h&&Bi(a,h,l),n.setWithVelocity(r.sample(Math.max(0,c-u)).value,l,u),r.stop()}}const Ce=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Sn.test(t)||t==="0")&&!t.startsWith("url("));function $s(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 Xs(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const a=t[t.length-1],o=Ce(s,e),r=Ce(a,e);return!o||!r?!1:$s(t)||(n==="spring"||Ii(n))&&i}function Jt(t){t.duration=0,t.type="keyframes"}const Ys=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function qs(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ys.test(t[e]))return!0;return!1}const Zs=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Js=ji(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Qs(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:a,type:o,keyframes:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return Js()&&n&&(Oi.has(n)||Zs.has(n)&&qs(r))&&(n!=="transform"||!l)&&!u&&!i&&s!=="mirror"&&a!==0&&o!=="inertia"}const to=40;class eo extends An{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",keyframes:r,name:c,motionValue:u,element:l,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=H.now();const f={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:l,...h},d=l?.KeyframeResolver||Vn;this.keyframeResolver=new d(r,(m,g,p)=>this.onKeyframesResolved(m,g,f,!p),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:a,type:o,velocity:r,delay:c,isHandoff:u,onUpdate:l}=i;this.resolvedAt=H.now();let h=!0;Xs(e,a,o,r)||(h=!1,(ot.instantAnimations||!c)&&l?.(le(e,i,n)),e[0]=e[e.length-1],Jt(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>to?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=h&&!u&&Qs(d),g=d.motionValue?.owner?.current;let p;if(m)try{p=new _s({...d,element:g})}catch{p=new Ct(d)}else p=new Ct(d);p.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Fi()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Xn(t,e,n,i=0,s=1){const a=Array.from(t).sort((u,l)=>u.sortNodePosition(l)).indexOf(e),o=t.size,r=(o-1)*i;return typeof n=="function"?n(a,o):s===1?a*i:r-a*i}const no=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function io(t){const e=no.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Yn(t,e,n=1){const[i,s]=io(t);if(!i)return;const a=window.getComputedStyle(e).getPropertyValue(i);if(a){const o=a.trim();return Ui(o)?parseFloat(o):o}return ae(s)?Yn(s,e,n+1):s}const so={type:"spring",stiffness:500,damping:25,restSpeed:10},oo=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ro={type:"keyframes",duration:.8},ao={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lo=(t,{keyframes:e})=>e.length>2?ro:ce.has(t)?t.startsWith("scale")?oo(e[1]):so:ao;function qn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function ge(t,e){const n=t?.[e]??t?.default??t;return n!==t?qn(n,t):n}const co=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function uo(t){for(const e in t)if(!co.has(e))return!0;return!1}const ye=(t,e,n,i={},s,a)=>o=>{const r=ge(i,t)||{},c=r.delay||i.delay||0;let{elapsed:u=0}=i;u=u-U(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...r,delay:-u,onUpdate:f=>{e.set(f),r.onUpdate&&r.onUpdate(f)},onComplete:()=>{o(),r.onComplete&&r.onComplete()},name:t,motionValue:e,element:a?void 0:s};uo(r)||Object.assign(l,lo(t,l)),l.duration&&(l.duration=U(l.duration)),l.repeatDelay&&(l.repeatDelay=U(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let h=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Jt(l),l.delay===0&&(h=!0)),(ot.instantAnimations||ot.skipAnimations||s?.shouldSkipAnimations)&&(h=!0,Jt(l),l.delay=0),l.allowFlatten=!r.type&&!r.ease,h&&!a&&e.get()!==void 0){const f=le(l.keyframes,r);if(f!==void 0){V.update(()=>{l.onUpdate(f),l.onComplete()});return}}return r.isSync?new Ct(l):new eo(l)};function tt(t,e,n){const i=t.getProps();return Ni(i,e,n!==void 0?n:i.custom,t)}const Zn=new Set(["width","height","top","left","right","bottom",...Wi]),Qt=t=>Array.isArray(t);function ho(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ue(n))}function fo(t){return Qt(t)?t[t.length-1]||0:t}function mo(t,e){const n=tt(t,e);let{transitionEnd:i={},transition:s={},...a}=n||{};a={...a,...i};for(const o in a){const r=fo(a[o]);ho(t,o,r)}}function po(t){return!!(he(t)&&t.add)}function te(t,e){const n=t.getValue("willChange");if(po(n))return n.add(e);if(!n&&ot.WillChange){const i=new ot.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Jn(t){return t.props[Gi]}function go({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Qn(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:a,transitionEnd:o,...r}=e;const c=t.getDefaultTransition();a=a?qn(a,c):c;const u=a?.reduceMotion;i&&(a=i);const l=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const f in r){const d=t.getValue(f,t.latestValues[f]??null),m=r[f];if(m===void 0||h&&go(h,f))continue;const g={delay:n,...ge(a||{},f)},p=d.get();if(p!==void 0&&!d.isAnimating()&&!Array.isArray(m)&&m===p&&!g.velocity){V.update(()=>d.set(m));continue}let y=!1;if(window.MotionHandoffAnimation){const w=Jn(t);if(w){const P=window.MotionHandoffAnimation(w,f,V);P!==null&&(g.startTime=P,y=!0)}}te(t,f);const v=u??t.shouldReduceMotion;d.start(ye(f,d,m,v&&Zn.has(f)?{type:!1}:g,t,y));const x=d.animation;x&&l.push(x)}if(o){const f=()=>V.update(()=>{o&&mo(t,o)});l.length?Promise.all(l).then(f):f()}return l}function ee(t,e,n={}){const i=tt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const a=i?()=>Promise.all(Qn(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:h}=s;return yo(t,e,c,u,l,h,n)}:()=>Promise.resolve(),{when:r}=s;if(r){const[c,u]=r==="beforeChildren"?[a,o]:[o,a];return c().then(()=>u())}else return Promise.all([a(),o(n.delay)])}function yo(t,e,n=0,i=0,s=0,a=1,o){const r=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),r.push(ee(c,e,{...o,delay:n+(typeof i=="function"?0:i)+Xn(t.variantChildren,c,i,s,a)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(r)}function vo(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(a=>ee(t,a,n));i=Promise.all(s)}else if(typeof e=="string")i=ee(t,e,n);else{const s=typeof e=="function"?tt(t,e,n.custom):e;i=Promise.all(Qn(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function xo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ki(t):!0}const To=new Set(["auto","none","0"]);function Po(t,e,n){let i=0,s;for(;i<t.length&&!s;){const a=t[i];typeof a=="string"&&!To.has(a)&&$t(a).values.length&&(s=t[i]),i++}if(s&&n)for(const a of e)t[a]=Hi(n,s)}class wo extends Vn{constructor(e,n,i,s,a){super(e,n,i,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let h=e[l];if(typeof h=="string"&&(h=h.trim(),ae(h))){const f=Yn(h,n.current);f!==void 0&&(e[l]=f),l===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Zn.has(i)||e.length!==2)return;const[s,a]=e,o=Pe(s),r=Pe(a),c=we(s),u=we(a);if(c!==u&&pt[i]){this.needsMeasurement=!0;return}if(o!==r)if(De(o)&&De(r))for(let l=0;l<e.length;l++){const h=e[l];typeof h=="string"&&(e[l]=parseFloat(h))}else pt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||xo(e[s]))&&i.push(s);i.length&&Po(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const a=i.length-1,o=i[a];i[a]=pt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([r,c])=>{e.getValue(r).set(c)}),this.resolveNoneKeyframes()}}function ti(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const F={x:!1,y:!1};function ei(){return F.x||F.y}function Do(t){return t==="x"||t==="y"?F[t]?null:(F[t]=!0,()=>{F[t]=!1}):F.x||F.y?null:(F.x=F.y=!0,()=>{F.x=F.y=!1})}function ni(t,e){const n=ti(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function So(t){return!(t.pointerType==="touch"||ei())}function Ao(t,e,n={}){const[i,s,a]=ni(t,n);return i.forEach(o=>{let r=!1,c=!1,u;const l=()=>{o.removeEventListener("pointerleave",m)},h=p=>{u&&(u(p),u=void 0),l()},f=p=>{r=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(p))},d=()=>{r=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},m=p=>{if(p.pointerType!=="touch"){if(r){c=!0;return}h(p)}},g=p=>{if(!So(p))return;c=!1;const y=e(o,p);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",d,s)}),a}const ii=(t,e)=>e?t===e?!0:ii(t,e.parentElement):!1,ve=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Vo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Eo(t){return Vo.has(t.tagName)||t.isContentEditable===!0}const bo=new Set(["INPUT","SELECT","TEXTAREA"]);function Co(t){return bo.has(t.tagName)||t.isContentEditable===!0}const vt=new WeakSet;function Me(t){return e=>{e.key==="Enter"&&t(e)}}function Ft(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Mo=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Me(()=>{if(vt.has(n))return;Ft(n,"down");const s=Me(()=>{Ft(n,"up")}),a=()=>Ft(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",a,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Le(t){return ve(t)&&!ei()}const Re=new WeakSet;function Lo(t,e,n={}){const[i,s,a]=ni(t,n),o=r=>{const c=r.currentTarget;if(!Le(r)||Re.has(r))return;vt.add(c),n.stopPropagation&&Re.add(r);const u=e(c,r),l=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),vt.has(c)&&vt.delete(c),Le(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{l(d,c===window||c===document||n.useGlobalTarget||ii(c,d.target))},f=d=>{l(d,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return i.forEach(r=>{(n.useGlobalTarget?window:r).addEventListener("pointerdown",o,s),zi(r)&&(r.addEventListener("focus",u=>Mo(u,s)),!Eo(r)&&!r.hasAttribute("tabindex")&&(r.tabIndex=0))}),a}function xe(t){return _i(t)&&"ownerSVGElement"in t}const xt=new WeakMap;let Tt;const si=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:xe(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ro=si("inline","width","offsetWidth"),ko=si("block","height","offsetHeight");function Bo({target:t,borderBoxSize:e}){xt.get(t)?.forEach(n=>{n(t,{get width(){return Ro(t,e)},get height(){return ko(t,e)}})})}function Io(t){t.forEach(Bo)}function jo(){typeof ResizeObserver>"u"||(Tt=new ResizeObserver(Io))}function Oo(t,e){Tt||jo();const n=ti(t);return n.forEach(i=>{let s=xt.get(i);s||(s=new Set,xt.set(i,s)),s.add(e),Tt?.observe(i)}),()=>{n.forEach(i=>{const s=xt.get(i);s?.delete(e),s?.size||Tt?.unobserve(i)})}}const Pt=new Set;let it;function Fo(){it=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Pt.forEach(e=>e(t))},window.addEventListener("resize",it)}function Uo(t){return Pt.add(t),it||Fo(),()=>{Pt.delete(t),!Pt.size&&typeof it=="function"&&(window.removeEventListener("resize",it),it=void 0)}}function ke(t,e){return typeof t=="function"?Uo(t):Oo(t,e)}function No(t){return xe(t)&&t.tagName==="svg"}class oi extends $i{constructor(){super(...arguments),this.KeyframeResolver=wo}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;he(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Y{constructor(e){this.isMounted=!1,this.node=e}update(){}}function ri({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Wo({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Go(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Ut(t){return t===void 0||t===1}function ne({scale:t,scaleX:e,scaleY:n}){return!Ut(t)||!Ut(e)||!Ut(n)}function Q(t){return ne(t)||ai(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ai(t){return Be(t.x)||Be(t.y)}function Be(t){return t&&t!=="0%"}function Mt(t,e,n){const i=t-n,s=e*i;return n+s}function Ie(t,e,n,i,s){return s!==void 0&&(t=Mt(t,s,i)),Mt(t,n,i)+e}function ie(t,e=0,n=1,i,s){t.min=Ie(t.min,e,n,i,s),t.max=Ie(t.max,e,n,i,s)}function li(t,{x:e,y:n}){ie(t.x,e.translate,e.scale,e.originPoint),ie(t.y,n.translate,n.scale,n.originPoint)}const je=.999999999999,Oe=1.0000000000001;function Ko(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let a,o;for(let r=0;r<s;r++){a=n[r],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(K(t.x,-a.scroll.offset.x),K(t.y,-a.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,li(t,o)),i&&Q(a.latestValues)&&wt(t,a.latestValues,a.layout?.layoutBox))}e.x<Oe&&e.x>je&&(e.x=1),e.y<Oe&&e.y>je&&(e.y=1)}function K(t,e){t.min+=e,t.max+=e}function Fe(t,e,n,i,s=.5){const a=S(t.min,t.max,s);ie(t,e,n,a,i)}function Ue(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function wt(t,e,n){const i=n??t;Fe(t.x,Ue(e.x,i.x),e.scaleX,e.scale,e.originX),Fe(t.y,Ue(e.y,i.y),e.scaleY,e.scale,e.originY)}function ci(t,e){return ri(Go(t.getBoundingClientRect(),e))}function Ho(t,e,n){const i=ci(t,n),{scroll:s}=e;return s&&(K(i.x,s.offset.x),K(i.y,s.offset.y)),i}function ui(t,{style:e,vars:n},i,s){const a=t.style;let o;for(o in e)a[o]=e[o];s?.applyProjectionStyles(a,i);for(o in n)a.setProperty(o,n[o])}function zo(t){return window.getComputedStyle(t)}class _o extends oi{constructor(){super(...arguments),this.type="html",this.renderInstance=ui}readValueFromInstance(e,n){if(ce.has(n))return this.projection?.isProjecting?Xi(n):Yi(e,n);{const i=zo(e),s=(qi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return ci(e,n)}build(e,n,i){Zi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return Ji(e,n,i)}}const hi=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 $o(t,e,n,i){ui(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(hi.has(s)?s:En(s),e.attrs[s])}class Xo extends oi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=b}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ce.has(n)){const i=ns(n);return i&&i.default||0}return n=hi.has(n)?n:En(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Qi(e,n,i)}build(e,n,i){ts(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){$o(e,n,i,s)}mount(e){this.isSVGTag=es(e.tagName),super.mount(e)}}const Yo=Cn.length;function fi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?fi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Yo;n++){const i=Cn[n],s=t.props[i];(bn(s)||s===!1)&&(e[i]=s)}return e}function di(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const qo=[...Ln].reverse(),Zo=Ln.length;function Jo(t){return e=>Promise.all(e.map(({animation:n,options:i})=>vo(t,n,i)))}function Qo(t){let e=Jo(t),n=Ne(),i=!0,s=!1;const a=u=>(l,h)=>{const f=tt(t,h,u==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...g}=f;l={...l,...g,...m}}return l};function o(u){e=u(t)}function r(u){const{props:l}=t,h=fi(t.parent)||{},f=[],d=new Set;let m={},g=1/0;for(let y=0;y<Zo;y++){const v=qo[y],x=n[v],w=l[v]!==void 0?l[v]:h[v],P=bn(w),C=v===u?x.isActive:null;C===!1&&(g=y);let B=w===h[v]&&w!==l[v]&&P;if(B&&(i||s)&&t.manuallyAnimateOnMount&&(B=!1),x.protectedKeys={...m},!x.isActive&&C===null||!w&&!x.prevProp||Mn(w)||typeof w=="boolean")continue;if(v==="exit"&&x.isActive&&C!==!0){x.prevResolvedValues&&(m={...m,...x.prevResolvedValues});continue}const D=tr(x.prevProp,w);let M=D||v===u&&x.isActive&&!B&&P||y>g&&P,T=!1;const E=Array.isArray(w)?w:[w];let I=E.reduce(a(v),{});C===!1&&(I={});const{prevResolvedValues:q={}}=x,N={...q,...I},_=L=>{M=!0,d.has(L)&&(T=!0,d.delete(L)),x.needsAnimating[L]=!0;const j=t.getValue(L);j&&(j.liveStyle=!1)};for(const L in N){const j=I[L],Z=q[L];if(m.hasOwnProperty(L))continue;let et=!1;Qt(j)&&Qt(Z)?et=!di(j,Z):et=j!==Z,et?j!=null?_(L):d.add(L):j!==void 0&&d.has(L)?_(L):x.protectedKeys[L]=!0}x.prevProp=w,x.prevResolvedValues=I,x.isActive&&(m={...m,...I}),(i||s)&&t.blockInitialAnimation&&(M=!1);const W=B&&D;M&&(!W||T)&&f.push(...E.map(L=>{const j={type:v};if(typeof L=="string"&&(i||s)&&!W&&t.manuallyAnimateOnMount&&t.parent){const{parent:Z}=t,et=tt(Z,L);if(Z.enteringChildren&&et){const{delayChildren:bi}=et.transition||{};j.delay=Xn(Z.enteringChildren,t,bi)}}return{animation:L,options:j}}))}if(d.size){const y={};if(typeof l.initial!="boolean"){const v=tt(t,Array.isArray(l.initial)?l.initial[0]:l.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let p=!!f.length;return i&&(l.initial===!1||l.initial===l.animate)&&!t.manuallyAnimateOnMount&&(p=!1),i=!1,s=!1,p?e(f):Promise.resolve()}function c(u,l){if(n[u].isActive===l)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(u,l)),n[u].isActive=l;const h=r(u);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ne(),s=!0}}}function tr(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!di(e,t):!1}function J(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ne(){return{animate:J(!0),whileInView:J(),whileHover:J(),whileTap:J(),whileDrag:J(),whileFocus:J(),exit:J()}}function se(t,e){t.min=e.min,t.max=e.max}function O(t,e){se(t.x,e.x),se(t.y,e.y)}function We(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const mi=1e-4,er=1-mi,nr=1+mi,pi=.01,ir=0-pi,sr=0+pi;function k(t){return t.max-t.min}function or(t,e,n){return Math.abs(t-e)<=n}function Ge(t,e,n,i=.5){t.origin=i,t.originPoint=S(e.min,e.max,t.origin),t.scale=k(n)/k(e),t.translate=S(n.min,n.max,t.origin)-t.originPoint,(t.scale>=er&&t.scale<=nr||isNaN(t.scale))&&(t.scale=1),(t.translate>=ir&&t.translate<=sr||isNaN(t.translate))&&(t.translate=0)}function lt(t,e,n,i){Ge(t.x,e.x,n.x,i?i.originX:void 0),Ge(t.y,e.y,n.y,i?i.originY:void 0)}function Ke(t,e,n,i=0){const s=i?S(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+k(e)}function rr(t,e,n,i){Ke(t.x,e.x,n.x,i?.x),Ke(t.y,e.y,n.y,i?.y)}function He(t,e,n,i=0){const s=i?S(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+k(e)}function Lt(t,e,n,i){He(t.x,e.x,n.x,i?.x),He(t.y,e.y,n.y,i?.y)}function ze(t,e,n,i,s){return t-=e,t=Mt(t,1/n,i),s!==void 0&&(t=Mt(t,1/s,i)),t}function ar(t,e=0,n=1,i=.5,s,a=t,o=t){if(St.test(e)&&(e=parseFloat(e),e=S(o.min,o.max,e/100)-o.min),typeof e!="number")return;let r=S(a.min,a.max,i);t===a&&(r-=e),t.min=ze(t.min,e,n,r,s),t.max=ze(t.max,e,n,r,s)}function _e(t,e,[n,i,s],a,o){ar(t,e[n],e[i],e[s],e.scale,a,o)}const lr=["x","scaleX","originX"],cr=["y","scaleY","originY"];function $e(t,e,n,i){_e(t.x,e,lr,n?n.x:void 0,i?i.x:void 0),_e(t.y,e,cr,n?n.y:void 0,i?i.y:void 0)}function Xe(t){return t.translate===0&&t.scale===1}function gi(t){return Xe(t.x)&&Xe(t.y)}function Ye(t,e){return t.min===e.min&&t.max===e.max}function ur(t,e){return Ye(t.x,e.x)&&Ye(t.y,e.y)}function qe(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function yi(t,e){return qe(t.x,e.x)&&qe(t.y,e.y)}function Ze(t){return k(t.x)/k(t.y)}function Je(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function G(t){return[t("x"),t("y")]}function hr(t,e,n){let i="";const s=t.x.translate/e.x,a=t.y.translate/e.y,o=n?.z||0;if((s||a||o)&&(i=`translate3d(${s}px, ${a}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:l,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(i=`perspective(${u}px) ${i}`),l&&(i+=`rotate(${l}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const r=t.x.scale*e.x,c=t.y.scale*e.y;return(r!==1||c!==1)&&(i+=`scale(${r}, ${c})`),i||"none"}const vi=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],fr=vi.length,Qe=t=>typeof t=="string"?parseFloat(t):t,tn=t=>typeof t=="number"||is.test(t);function dr(t,e,n,i,s,a){s?(t.opacity=S(0,n.opacity??1,mr(i)),t.opacityExit=S(e.opacity??1,0,pr(i))):a&&(t.opacity=S(e.opacity??1,n.opacity??1,i));for(let o=0;o<fr;o++){const r=vi[o];let c=en(e,r),u=en(n,r);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||tn(c)===tn(u)?(t[r]=Math.max(S(Qe(c),Qe(u),i),0),(St.test(u)||St.test(c))&&(t[r]+="%")):t[r]=u}(e.rotate||n.rotate)&&(t.rotate=S(e.rotate||0,n.rotate||0,i))}function en(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const mr=xi(0,.5,Nn),pr=xi(.5,.95,z);function xi(t,e,n){return i=>i<t?0:i>e?1:n(ut(t,e,i))}function gr(t,e,n){const i=he(t)?t:ue(t);return i.start(ye("",i,e,n)),i.animation}function ht(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const yr=(t,e)=>t.depth-e.depth;class vr{constructor(){this.children=[],this.isDirty=!1}add(e){Rn(this.children,e),this.isDirty=!0}remove(e){Xt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(yr),this.isDirty=!1,this.children.forEach(e)}}function xr(t,e){const n=H.now(),i=({timestamp:s})=>{const a=s-n;a>=e&&(st(i),t(a-e))};return V.setup(i,!0),()=>st(i)}class Tr{constructor(){this.members=[]}add(e){Rn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Xt(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Xt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:a}=e.options;(s===void 0||s!==a)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Dt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nt=["","X","Y","Z"],Pr=1e3;let wr=0;function Wt(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ti(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Jn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(s||a))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ti(i)}function Pi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},r=e?.()){this.id=wr++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ar),this.nodes.forEach(Lr),this.nodes.forEach(Rr),this.nodes.forEach(Vr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new vr)}addEventListener(o,r){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ss),this.eventHandlers.get(o).add(r)}notifyListeners(o,...r){const c=this.eventHandlers.get(o);c&&c.notify(...r)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xe(o)&&!No(o),this.instance=o;const{layoutId:r,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||r)&&(this.isLayoutDirty=!0),t){let l,h=0;const f=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,l&&l(),l=xr(f,250),Dt.hasAnimatedSinceResize&&(Dt.hasAnimatedSinceResize=!1,this.nodes.forEach(on)))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&u&&(r||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Or,{onLayoutAnimationStart:g,onLayoutAnimationComplete:p}=u.getProps(),y=!this.targetLayout||!yi(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...ge(m,"layout"),onPlay:g,onComplete:p};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(l,v)}else h||on(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),st(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(kr),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ti(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const h=this.path[l];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:r,layout:c}=this.options;if(r===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(br),this.nodes.forEach(nn);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(sn);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cr),this.nodes.forEach(Mr),this.nodes.forEach(Dr),this.nodes.forEach(Sr)):this.nodes.forEach(sn),this.clearAllSnapshots();const r=H.now();R.delta=X(0,1e3/60,r-R.timestamp),R.timestamp=r,R.isProcessing=!0,Rt.update.process(R),Rt.preRender.process(R),Rt.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Er),this.sharedNodes.forEach(Br)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!k(this.snapshot.measuredBox.x)&&!k(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=b()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:r}=this.options;r&&r.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let r=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(r=!1),r&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,r=this.projectionDelta&&!gi(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,l=u!==this.prevTransformTemplateValue;o&&this.instance&&(r||Q(this.latestValues)||l)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const r=this.measurePageBox();let c=this.removeElementScroll(r);return o&&(c=this.removeTransform(c)),Fr(c),{animationId:this.root.animationId,measuredBox:r,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return b();const r=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ur))){const{scroll:u}=this.root;u&&(K(r.x,u.offset.x),K(r.y,u.offset.y))}return r}removeElementScroll(o){const r=b();if(O(r,o),this.scroll?.wasRoot)return r;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:h}=u;u!==this.root&&l&&h.layoutScroll&&(l.wasRoot&&O(r,o),K(r.x,l.offset.x),K(r.y,l.offset.y))}return r}applyTransform(o,r=!1,c){const u=c||b();O(u,o);for(let l=0;l<this.path.length;l++){const h=this.path[l];!r&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(K(u.x,-h.scroll.offset.x),K(u.y,-h.scroll.offset.y)),Q(h.latestValues)&&wt(u,h.latestValues,h.layout?.layoutBox)}return Q(this.latestValues)&&wt(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const r=b();O(r,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!Q(u.latestValues))continue;let l;u.instance&&(ne(u.latestValues)&&u.updateSnapshot(),l=b(),O(l,u.measurePageBox())),$e(r,u.latestValues,u.snapshot?.layoutBox,l)}return Q(this.latestValues)&&$e(r,this.latestValues),r}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const r=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=r.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=r.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=r.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==r;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:h}=this.options;if(!this.layout||!(l||h))return;this.resolvedRelativeTargetAt=R.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=b(),this.targetWithTransforms=b()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rr(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):O(this.target,this.layout.layoutBox),li(this.target,this.targetDelta)):O(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ne(this.parent.latestValues)||ai(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,r,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=b(),this.relativeTargetOrigin=b(),Lt(this.relativeTargetOrigin,r,c,this.options.layoutAnchor||void 0),O(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),r=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===R.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;O(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Ko(this.layoutCorrected,this.treeScale,this.path,r),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=b());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(We(this.prevProjectionDelta.x,this.projectionDelta.x),We(this.prevProjectionDelta.y,this.projectionDelta.y)),lt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Je(this.projectionDelta.x,this.prevProjectionDelta.x)||!Je(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const r=this.getStack();r&&r.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=nt(),this.projectionDelta=nt(),this.projectionDeltaWithTransform=nt()}setAnimationOrigin(o,r=!1){const c=this.snapshot,u=c?c.latestValues:{},l={...this.latestValues},h=nt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!r;const f=b(),d=c?c.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,p=this.getStack(),y=!p||p.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(jr));this.animationProgress=0;let x;this.mixTargetDelta=w=>{const P=w/1e3;rn(h.x,o.x,P),rn(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ir(this.relativeTarget,this.relativeTargetOrigin,f,P),x&&ur(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=b()),O(x,this.relativeTarget)),g&&(this.animationValues=l,dr(l,u,this.latestValues,P,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(st(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Dt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ue(0)),this.motionValue.jump(0,!1),this.currentAnimation=gr(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:r=>{this.mixTargetDelta(r),o.onUpdate&&o.onUpdate(r)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pr),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:r,target:c,layout:u,latestValues:l}=o;if(!(!r||!c||!u)){if(this!==o&&this.layout&&u&&wi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||b();const h=k(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=k(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}O(r,c),wt(r,l),lt(this.projectionDeltaWithTransform,this.layoutCorrected,r,l)}}registerSharedNode(o,r){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Tr),this.sharedNodes.get(o).add(r);const u=r.options.initialPromotionConfig;r.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(r):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:r,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let r=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(r=!0),!r)return;const u={};c.z&&Wt("z",o,u,this.animationValues);for(let l=0;l<Nt.length;l++)Wt(`rotate${Nt[l]}`,o,u,this.animationValues),Wt(`skew${Nt[l]}`,o,u,this.animationValues);o.render();for(const l in u)o.setStaticValue(l,u[l]),this.animationValues&&(this.animationValues[l]=u[l]);o.scheduleRender()}applyProjectionStyles(o,r){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=kt(r?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=kt(r?.pointerEvents)||""),this.hasProjected&&!Q(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const l=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=hr(this.projectionDeltaWithTransform,this.treeScale,l);c&&(h=c(l,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:o.opacity=u===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const m in Se){if(l[m]===void 0)continue;const{correct:g,applyTo:p,isCSSVariable:y}=Se[m],v=h==="none"?l[m]:g(l[m],u);if(p){const x=p.length;for(let w=0;w<x;w++)o[p[w]]=v}else y?this.options.visualElement.renderState.vars[m]=v:o[m]=v}this.options.layoutId&&(o.pointerEvents=u===this?kt(r?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(nn),this.root.sharedNodes.clear()}}}function Dr(t){t.updateLayout()}function Sr(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,a=e.source!==t.layout.source;if(s==="size")G(l=>{const h=a?e.measuredBox[l]:e.layoutBox[l],f=k(h);h.min=n[l].min,h.max=h.min+f});else if(s==="x"||s==="y"){const l=s==="x"?"y":"x";se(a?e.measuredBox[l]:e.layoutBox[l],n[l])}else wi(s,e.layoutBox,n)&&G(l=>{const h=a?e.measuredBox[l]:e.layoutBox[l],f=k(n[l]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[l].max=t.relativeTarget[l].min+f)});const o=nt();lt(o,n,e.layoutBox);const r=nt();a?lt(r,t.applyTransform(i,!0),e.measuredBox):lt(r,n,e.layoutBox);const c=!gi(o);let u=!1;if(!t.resumeFrom){const l=t.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:h,layout:f}=l;if(h&&f){const d=t.options.layoutAnchor||void 0,m=b();Lt(m,e.layoutBox,h.layoutBox,d);const g=b();Lt(g,n,f.layoutBox,d),yi(m,g)||(u=!0),l.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=l)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:r,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ar(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Vr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Er(t){t.clearSnapshot()}function nn(t){t.clearMeasurements()}function br(t){t.isLayoutDirty=!0,t.updateLayout()}function sn(t){t.isLayoutDirty=!1}function Cr(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Mr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function on(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lr(t){t.resolveTargetDelta()}function Rr(t){t.calcProjection()}function kr(t){t.resetSkewAndRotation()}function Br(t){t.removeLeadSnapshot()}function rn(t,e,n){t.translate=S(e.translate,0,n),t.scale=S(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function an(t,e,n,i){t.min=S(e.min,n.min,i),t.max=S(e.max,n.max,i)}function Ir(t,e,n,i){an(t.x,e.x,n.x,i),an(t.y,e.y,n.y,i)}function jr(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Or={duration:.45,ease:[.4,0,.1,1]},ln=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),cn=ln("applewebkit/")&&!ln("chrome/")?Math.round:z;function un(t){t.min=cn(t.min),t.max=cn(t.max)}function Fr(t){un(t.x),un(t.y)}function wi(t,e,n){return t==="position"||t==="preserve-aspect"&&!or(Ze(e),Ze(n),.2)}function Ur(t){return t!==t.root&&t.scroll?.wasRoot}const Nr=Pi({attachResizeListener:(t,e)=>ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gt={current:void 0},Di=Pi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Gt.current){const t=new Nr({});t.mount(window),t.setOptions({layoutScroll:!0}),Gt.current=t}return Gt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Wr=(t,e)=>e.isSVG??os(t)?new Xo(e):new _o(e,{allowProjection:t!==At.Fragment});class Gr extends Y{constructor(e){super(e),e.animationState||(e.animationState=Qo(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Mn(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Kr=0;class Hr extends Y{constructor(){super(...arguments),this.id=Kr++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&i===!1){if(this.isExitComplete){const{initial:a,custom:o}=this.node.getProps();if(typeof a=="string"){const r=tt(this.node,a,o);if(r){const{transition:c,transitionEnd:u,...l}=r;for(const h in l)this.node.getValue(h)?.jump(l[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const zr={animation:{Feature:Gr},exit:{Feature:Hr}};function mt(t){return{point:{x:t.pageX,y:t.pageY}}}const _r=t=>e=>ve(e)&&t(e,mt(e));function ct(t,e,n,i){return ht(t,e,_r(n),i)}const Si=({current:t})=>t?t.ownerDocument.defaultView:null,hn=(t,e)=>Math.abs(t-e);function $r(t,e){const n=hn(t.x,e.x),i=hn(t.y,e.y);return Math.sqrt(n**2+i**2)}const fn=new Set(["auto","scroll"]);class Ai{constructor(e,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Kt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=$r(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:p}=d,{timestamp:y}=R;this.history.push({...p,timestamp:y});const{onStart:v,onMove:x}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=gt(m,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:p,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Kt(d.type==="pointercancel"?this.lastMoveEventInfo:gt(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),p&&p(d,v)},!ve(e))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const c=mt(e),u=gt(c,this.transformPagePoint),{point:l}=u,{timestamp:h}=R;this.history=[{...l,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Kt(u,this.history)),this.removeListeners=ft(ct(this.contextWindow,"pointermove",this.handlePointerMove),ct(this.contextWindow,"pointerup",this.handlePointerUp),ct(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(fn.has(i.overflowX)||fn.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:s.x-n.x,y:s.y-n.y};a.x===0&&a.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,s),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),st(this.updatePoint)}}function gt(t,e){return e?{point:e(t.point)}:t}function dn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Kt({point:t},e){return{point:t,delta:dn(t,Vi(e)),offset:dn(t,Xr(e)),velocity:Yr(e,.1)}}function Xr(t){return t[0]}function Vi(t){return t[t.length-1]}function Yr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Vi(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>U(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>U(e)*2&&(i=t[1]);const a=$(s.timestamp-i.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-i.x)/a,y:(s.y-i.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function qr(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?S(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?S(n,t,i.max):Math.min(t,n)),t}function mn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Zr(t,{top:e,left:n,bottom:i,right:s}){return{x:mn(t.x,n,s),y:mn(t.y,e,i)}}function pn(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function Jr(t,e){return{x:pn(t.x,e.x),y:pn(t.y,e.y)}}function Qr(t,e){let n=.5;const i=k(t),s=k(e);return s>i?n=ut(e.min,e.max-i,t.min):i>s&&(n=ut(t.min,t.max-s,e.min)),X(0,1,n)}function ta(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const oe=.35;function ea(t=oe){return t===!1?t=0:t===!0&&(t=oe),{x:gn(t,"left","right"),y:gn(t,"top","bottom")}}function gn(t,e,n){return{min:yn(t,e),max:yn(t,n)}}function yn(t,e){return typeof t=="number"?t:t[e]||0}const na=new WeakMap;class ia{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=b(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(mt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:g}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Do(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(y=>{let v=this.getAxisMotionValue(y).get()||0;if(St.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[y];w&&(v=k(w)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&V.update(()=>g(h,f),!1,!0),te(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:g,onDrag:p}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=oa(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),p&&V.update(()=>p(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Ai(e,{onSessionStart:a,onStart:o,onMove:r,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:i,contextWindow:Si(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=e||this.latestPointerEvent,s=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&V.postRender(()=>r(i,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!yt(e,s,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=qr(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&rt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=Zr(i.layoutBox,e):this.constraints=!1,this.elastic=ea(n),s!==this.constraints&&!rt(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&G(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=ta(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!rt(e))return!1;const i=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=Ho(i,s.root,this.visualElement.getTransformPagePoint());let o=Jr(s.layout.layoutBox,a);if(n){const r=n(Wo(o));this.hasMutatedConstraints=!!r,r&&(o=ri(r))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),c=this.constraints||{},u=G(l=>{if(!yt(l,n,this.currentDirection))return;let h=c&&c[l]||{};(o===!0||o===l)&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,m={type:"inertia",velocity:i?e[l]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(l,m)});return Promise.all(u).then(r)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return te(this.visualElement,e),i.start(ye(e,i,0,n,this.visualElement,!1))}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){G(n=>{const{drag:i}=this.getProps();if(!yt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:r}=s.layout.layoutBox[n],c=a.get()||0;a.set(e[n]-S(o,r,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!rt(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};G(o=>{const r=this.getAxisMotionValue(o);if(r&&this.constraints!==!1){const c=r.get();s[o]=Qr({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),G(o=>{if(!yt(o,e,null))return;const r=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];r.set(S(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;na.set(this.visualElement,this);const e=this.visualElement.current,n=ct(e,"pointerdown",u=>{const{drag:l,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&Co(f);l&&h&&!d&&this.start(u)});let i;const s=()=>{const{dragConstraints:u}=this.getProps();rt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),i||(i=sa(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",s);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),V.read(s);const r=ht(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(G(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),c&&c(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=oe,dragMomentum:r=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:r}}}function vn(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sa(t,e,n){const i=ke(t,vn(n)),s=ke(e,vn(n));return()=>{i(),s()}}function yt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function oa(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ra extends Y{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new ia(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ht=t=>(e,n)=>{t&&V.update(()=>t(e,n),!1,!0)};class aa extends Y{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new Ai(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ht(e),onStart:Ht(n),onMove:Ht(i),onEnd:(a,o)=>{delete this.session,s&&V.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=ct(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let zt=!1;class la extends At.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:a}=e;a&&(n.group&&n.group.add(a),i&&i.register&&s&&i.register(a),zt&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:a}=this.props,{projection:o}=i;return o&&(o.isPresent=a,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),zt=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||V.postRender(()=>{const r=o.getStack();(!r||!r.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),kn.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;zt=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ei(t){const[e,n]=rs(),i=At.useContext(as);return ls.jsx(la,{...t,layoutGroup:i,switchLayoutGroup:At.useContext(cs),isPresent:e,safeToRemove:n})}const ca={pan:{Feature:aa},drag:{Feature:ra,ProjectionNode:Di,MeasureLayout:Ei}};function xn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,a=i[s];a&&V.postRender(()=>a(e,mt(e)))}class ua extends Y{mount(){const{current:e}=this.node;e&&(this.unmount=Ao(e,(n,i)=>(xn(this.node,i,"Start"),s=>xn(this.node,s,"End"))))}unmount(){}}class ha extends Y{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=ft(ht(this.node.current,"focus",()=>this.onFocus()),ht(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Tn(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),a=i[s];a&&V.postRender(()=>a(e,mt(e)))}class fa extends Y{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Lo(e,(s,a)=>(Tn(this.node,a,"Start"),(o,{success:r})=>Tn(this.node,o,r?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const re=new WeakMap,_t=new WeakMap,da=t=>{const e=re.get(t.target);e&&e(t)},ma=t=>{t.forEach(da)};function pa({root:t,...e}){const n=t||document;_t.has(n)||_t.set(n,{});const i=_t.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ma,{root:t,...e})),i[s]}function ga(t,e,n){const i=pa(e);return re.set(t,n),i.observe(t),()=>{re.delete(t),i.unobserve(t)}}const ya={some:0,all:1};class va extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:a}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:ya[s]},r=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:h}=this.node.getProps(),f=u?l:h;f&&f(c)};this.stopObserver=ga(this.node.current,o,r)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(xa(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function xa({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ta={inView:{Feature:va},tap:{Feature:fa},focus:{Feature:ha},hover:{Feature:ua}},Pa={layout:{ProjectionNode:Di,MeasureLayout:Ei}},wa={renderer:Wr,...zr,...Ta},Va={...wa,...ca,...Pa};export{Va as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.