1import{r as m,j as G}from"./react-vendor-aZeK6R-U.js";const Et=m.createContext({});function tt(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ys=typeof window<"u",oe=Ys?m.useLayoutEffect:m.useEffect,re=m.createContext(null);function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Y=(t,e,n)=>n>e?e:n<t?t:n;let Je=()=>{};const q={},qs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Zs(t){return typeof t=="object"&&t!==null}const Js=t=>/^0[^.\s]+$/u.test(t);function Qe(t){let e;return()=>(e===void 0&&(e=t()),e)}const W=t=>t,Bo=(t,e)=>n=>e(t(n)),Bt=(...t)=>t.reduce(Bo),Rt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class tn{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(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 o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _=t=>t*1e3,U=t=>t/1e3;function Qs(t,e){return e?t*(1e3/e):0}const ti=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,jo=1e-7,Oo=12;function No(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=ti(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>jo&&++a<Oo);return o}function jt(t,e,n,s){if(t===e&&n===s)return W;const i=r=>No(r,0,1,t,n);return r=>r===0||r===1?r:ti(i(r),e,s)}const ei=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ni=t=>e=>1-t(1-e),si=jt(.33,1.53,.69,.99),en=ni(si),ii=ei(en),oi=t=>(t*=2)<1?.5*en(t):.5*(2-Math.pow(2,-10*(t-1))),nn=t=>1-Math.sin(Math.acos(t)),ri=ni(nn),ai=ei(nn),Uo=jt(.42,0,1,1),Wo=jt(0,0,.58,1),li=jt(.42,0,.58,1),Ko=t=>Array.isArray(t)&&typeof t[0]!="number",ui=t=>Array.isArray(t)&&typeof t[0]=="number",$o={linear:W,easeIn:Uo,easeInOut:li,easeOut:Wo,circIn:nn,circInOut:ai,circOut:ri,backIn:en,backInOut:ii,backOut:si,anticipate:oi},Go=t=>typeof t=="string",Rn=t=>{if(ui(t)){Je(t.length===4);const[e,n,s,i]=t;return jt(e,n,s,i)}else if(Go(t))return $o[t];return t},Ut=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ho(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const p=f&&i?n:s;return h&&o.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}
1i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const zo=40;function ci(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ut.reduce((x,S)=>(x[S]=Ho(r),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:p}=o,v=()=>{const x=q.useManualTiming?i.timestamp:performance.now();n=!1,q.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,zo),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},g=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:Ut.reduce((x,S)=>{const P=o[S];return x[S]=(V,E=!1,b=!1)=>(n||g(),P.schedule(V,E,b)),x},{}),cancel:x=>{for(let S=0;S<Ut.length;S++)o[Ut[S]].cancel(x)},state:i,steps:o}}const{schedule:C,cancel:Z,state:F,steps:he}=ci(typeof requestAnimationFrame<"u"?requestAnimationFrame:W,!0);let Gt;function _o(){Gt=void 0}const j={now:()=>(Gt===void 0&&j.set(F.isProcessing||q.useManualTiming?F.timestamp:performance.now()),Gt),set:t=>{Gt=t,queueMicrotask(_o)}},hi=t=>e=>typeof e=="string"&&e.startsWith(t),fi=hi("--"),Xo=hi("var(--"),sn=t=>Xo(t)?Yo.test(t.split("/*")[0].trim()):!1,Yo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ln(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const xt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Lt={...xt,transform:t=>Y(0,1,t)},Wt={...xt,default:1},At=t=>Math.round(t*1e5)/1e5,on=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qo(t){return t==null}const Zo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rn=(t,e)=>n=>!!(typeof n=="string"&&Zo.test(n)&&n.startsWith(t)||e&&!qo(n)&&Object.prototype.hasOwnProperty.call(n,e)),di=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(on);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Jo=t=>Y(0,255,t),fe={...xt,transform:t=>Math.round(Jo(t))},rt={test:rn("rgb","red"),parse:di("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+At(Lt.transform(s))+")"};function Qo(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 Me={test:rn("#"),parse:Qo,transform:rt.transform},Ot=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),J=Ot("deg"),X=Ot("%"),T=Ot("px"),tr=Ot("vh"),er=Ot("vw"),kn={...X,parse:t=>X.parse(t)/100,transform:t=>X.transform(t*100)},ft={test:rn("hsl","hue"),parse:di("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+X.transform(At(e))+", "+X.transform(At(n))+", "+At(Lt.transform(s))+")"},R={test:t=>rt.test(t)||Me.test(t)||ft.test(t),parse:t=>rt.test(t)?rt.parse(t):ft.test(t)?ft.parse(t):Me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?rt.transform(t):ft.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},nr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sr(t){return isNaN(t)&&typeof t=="string"&&(t.match(on)?.length||0)+(t.match(nr)?.length||0)>0}const pi="number",mi="color",ir="var",or="var(",In="${}",rr=/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 kt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(rr,l=>(R.test(l)?(s.color.push(r),i.push(mi),n.push(R.parse(l))):l.startsWith(or)?(s.var.push(r),i.push(ir),n.push(l)):(s.number.push(r),i.push(pi),n.push(parseFloat(l))),++r,In)).split(In);return{values:n,split:a,indexes:s,types:i}}function gi(t){return kt(t).values}function yi(t){const{split:e,types:n}=kt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];
vendor: 5,101 bytes, line 1
1a===pi?r+=At(i[o]):a===mi?r+=R.transform(i[o]):r+=i[o]}return r}}const ar=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function lr(t){const e=gi(t);return yi(t)(e.map(ar))}const et={test:sr,parse:gi,createTransformer:yi,getAnimatableNone:lr};function de(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 ur({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=de(l,a,t+1/3),r=de(l,a,t),o=de(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},cr=[Me,rt,ft],hr=t=>cr.find(e=>e.test(t));function Fn(t){const e=hr(t);if(!e)return!1;let n=e.parse(t);return e===ft&&(n=ur(n)),n}const Bn=(t,e)=>{const n=Fn(t),s=Fn(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=M(n.alpha,s.alpha,r),rt.transform(i))},De=new Set(["none","hidden"]);function fr(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dr(t,e){return n=>M(t,e,n)}function an(t){return typeof t=="number"?dr:typeof t=="string"?sn(t)?Zt:R.test(t)?Bn:gr:Array.isArray(t)?vi:typeof t=="object"?R.test(t)?Bn:pr:Zt}function vi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>an(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function pr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function mr(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],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const gr=(t,e)=>{const n=et.createTransformer(e),s=kt(t),i=kt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?fr(t,e):Bt(vi(mr(s,i),i.values),n):Zt(t,e)};function xi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):an(t)(t,e)}const yr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>C.update(e,n),stop:()=>Z(e),now:()=>F.isProcessing?F.timestamp:j.now()}},Ti=(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)})`},Jt=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function vr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:U(i)}}const xr=5;function wi(t,e,n){const s=Math.max(e-xr,0);return Qs(n-t(s),e-s)}const D={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},me=.001;function Tr({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,r,o=1-e;o=Y(D.minDamping,D.maxDamping,o),t=Y(D.minDuration,D.maxDuration,U(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Ee(u,o),p=Math.exp(-h);return me-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),v=Ee(Math.pow(u,2),o);return(-i(u)+me>0?-1:1)*((f-d)*p)/v}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-me+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Pr(i,r,a);if(t=_(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const wr=12;function Pr(t,e,n){let s=n;for(let i=1;i<wr;i++)s=s-t(s)/e(s);return s}function Ee(t,e){return t*Math.sqrt(1-e*e)}const Sr=["duration","bounce"],br=["stiffness","damping","mass"];function jn(t,e){return e.some(n=>t[n]!==void 0)}function Ar(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!jn(t,br)&&jn(t,Sr))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Y(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=Tr(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=D.visualDuration,e=D.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],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Ar({...n,velocity:-U(n.velocity||0)}),p=f||0,v=u/(2*Math.sqrt(l*c)),g=o-r,y=U(Math.sqrt(l/c)),w=Math.abs(g)<5;s||(s=w?D.restSpeed.granular:D.restSpeed.default),i||(i=w?D.restDelta.granular:D.restDelta.default);let x;if(v<1){const P=Ee(y,v);x=V=>{const E=Math.exp(-v*y*V);return o-E*((p+v*y*g)/P*Math.sin(P*V)+g*Math.cos(P*V))}}else if(v===1)x=P=>
1o-Math.exp(-y*P)*(g+(p+y*g)*P);else{const P=y*Math.sqrt(v*v-1);x=V=>{const E=Math.exp(-v*y*V),b=Math.min(P*V,300);return o-E*((p+v*y*g)*Math.sinh(b)+P*g*Math.cosh(b))/P}}const S={calculatedDuration:d&&h||null,next:P=>{const V=x(P);if(d)a.done=P>=h;else{let E=P===0?p:0;v<1&&(E=P===0?_(p):wi(x,P,V));const b=Math.abs(E)<=s,A=Math.abs(o-V)<=i;a.done=b&&A}return a.value=a.done?o:V,a},toString:()=>{const P=Math.min(ln(S),Jt),V=Ti(E=>S.next(P*E).value,P,30);return P+"ms "+V},toTransition:()=>{}};return S}Qt.applyToOptions=t=>{const e=vr(t,100,Qt);return t.ease=e.ease,t.duration=_(e.duration),t.type="keyframes",t};function Re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let v=n*e;const g=h+v,y=o===void 0?g:o(g);y!==g&&(v=y-h);const w=b=>-v*Math.exp(-b/s),x=b=>y+w(b),S=b=>{const A=w(b),L=x(b);f.done=Math.abs(A)<=u,f.value=f.done?y:L};let P,V;const E=b=>{d(f.value)&&(P=b,V=Qt({keyframes:[f.value,p(f.value)],velocity:wi(x,b,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:b=>{let A=!1;return!V&&P===void 0&&(A=!0,S(b),E(b)),P!==void 0&&b>=P?V.next(b-P):(!A&&S(b),f)}}}function Vr(t,e,n){const s=[],i=n||q.mix||xi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||W:e;a=Bt(l,a)}s.push(a)}return s}function Pi(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Je(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Vr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Rt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(Y(t[0],t[r-1],c)):u}function Cr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Rt(0,e,s);t.push(M(n,1,i))}}function Mr(t){const e=[0];return Cr(e,t.length-1),e}function Dr(t,e){return t.map(n=>n*e)}function Er(t,e){return t.map(()=>e||li).splice(0,t.length-1)}function Vt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ko(s)?s.map(Rn):Rn(s),r={done:!1,value:e[0]},o=Dr(n&&n.length===e.length?n:Mr(e),t),a=Pi(o,e,{ease:Array.isArray(i)?i:Er(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Rr=t=>t!==null;function un(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Rr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Lr={decay:Re,inertia:Re,tween:Vt,keyframes:Vt,spring:Qt};function Si(t){typeof t.type=="string"&&(t.type=Lr[t.type])}class cn{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 kr=t=>t/100;class hn extends cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.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;Si(e);const{type:n=Vt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Vt;l!==Vt&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(kr,xi(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ln(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,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:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:v,finalKeyframe:g}=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 y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,S=s;if(h){const b=Math.min(this.currentTime,i)/a;let A=Math.floor(b),L=b%1;!L&&b>=1&&(L=1),L===1&&A--,A=Math.min(A,h+1),A%2&&(f==="reverse"?(L=1-L,d&&(L-=d/a)):f==="mirror"&&(S=o)),x=Y(0,1,L)*a}const P=w?{done:!1,value:c[0]}:S.next(x);r&&(P.value=r(P.value));let{done:V}=P;!w&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return E&&p!==Re&&(P.value=un(c,this.options,g,this.speed)),v&&v(P.value),E&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return U(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+U(e)}get time(){return U(this.currentTime)}set time(e){e=_(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(j.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=U(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=yr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();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(j.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)}}function Ir(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const at=t=>t*180/Math.PI,Le=t=>{const e=at(Math.atan2(t[1],t[0]));return ke(e)},Fr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,skewX:t=>at(Math.atan(t[1])),skewY:t=>at(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ke=t=>(t=t%360,t<0&&(t+=360),t),On=Le,Nn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Un=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Br={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nn,scaleY:Un,scale:t=>(Nn(t)+Un(t))/2,rotateX:t=>ke(at(Math.atan2(t[6],t[5]))),rotateY:t=>ke(at(Math.atan2(-t[2],t[0]))),rotateZ:On,rotate:On,skewX:t=>at(Math.atan(t[4])),skewY:t=>at(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ie(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Ie(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Br,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Fr,i=a}if(!i)return Ie(e);const r=s[e],o=i[1].split(",").map(Or);return typeof r=="function"?r(o):o[r]}const jr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Or(t){return parseFloat(t.trim())}const Tt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wt=new Set(Tt),Wn=t=>t===xt||t===T,Nr=new Set(["x","y","z"]),Ur=Tt.filter(t=>!Nr.has(t));function Wr(t){const e=[];return Ur.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Q={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")};Q.translateX=Q.x;Q.translateY=Q.y;const lt=new Set;let Be=!1,je=!1,Oe=!1;function bi(){if(je){const t=Array.from(lt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Wr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);
1i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}je=!1,Be=!1,lt.forEach(t=>t.complete(Oe)),lt.clear()}function Ai(){lt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(je=!0)})}function Kr(){Oe=!0,Ai(),bi(),Oe=!1}class fn{constructor(e,n,s,i,r,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(lt.add(this),Be||(Be=!0,C.read(Ai),C.resolveKeyframes(bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Ir(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lt.delete(this)}cancel(){this.state==="scheduled"&&(lt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $r=t=>t.startsWith("--");function Gr(t,e,n){$r(e)?t.style.setProperty(e,n):t.style[e]=n}const Hr=Qe(()=>window.ScrollTimeline!==void 0),zr={};function _r(t,e){const n=Qe(t);return()=>zr[e]??n()}const Vi=_r(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Kn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bt([0,.65,.55,1]),circOut:bt([.55,0,1,.45]),backIn:bt([.31,.01,.66,-.59]),backOut:bt([.33,1.53,.69,.99])};function Ci(t,e){if(t)return typeof t=="function"?Vi()?Ti(t,e):"ease-out":ui(t)?bt(t):Array.isArray(t)?t.map(n=>Ci(n,e)||Kn.easeOut):Kn[t]}function Xr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ci(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function Mi(t){return typeof t=="function"&&"applyToOptions"in t}function Yr({type:t,...e}){return Mi(t)&&Vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class qr extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,Je(typeof e.type!="string");const u=Yr(e);this.animation=Xr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=un(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Gr(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return U(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+U(e)}get time(){return U(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,W):n(this)}}const Di={anticipate:oi,backInOut:ii,circInOut:ai};function Zr(t){return t in Di}function Jr(t){typeof t.ease=="string"&&Zr(t.ease)&&(t.ease=Di[t.ease])}const ge=10;class Qr extends qr{constructor(e){Jr(e),Si(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...o,autoplay:!1}),l=Math.max(ge,j.now()-this.startTime),u=Y(0,ge,l-ge);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const $n=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(et.test(t)||t==="0")&&!t.startsWith("url("));function ta(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 ea(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],o=$n(i,e),a=$n(r,e);return!o||!a?!1:ta(t)||(n==="spring"||Mi(n))&&s}function Ne(t){t.duration=0,t.type="keyframes"}const na=new Set(["opacity","clipPath","filter","transform"]),sa=
1Qe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ia(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return sa()&&n&&na.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const oa=40;class ra extends cn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=c?.KeyframeResolver||fn;this.keyframeResolver=new d(a,(p,v,g)=>this.onKeyframesResolved(p,v,f,!g),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=j.now(),ea(e,r,o,a)||((q.instantAnimations||!l)&&c?.(un(e,s,n)),e[0]=e[e.length-1],Ne(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>oa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&ia(f),p=f.motionValue?.owner?.current,v=d?new Qr({...f,element:p}):new hn(f);v.finished.then(()=>{this.notifyFinished()}).catch(W),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}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(),Kr()),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 Ei(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const aa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function la(t){const e=aa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ri(t,e,n=1){const[s,i]=la(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return qs(o)?parseFloat(o):o}return sn(i)?Ri(i,e,n+1):i}const ua={type:"spring",stiffness:500,damping:25,restSpeed:10},ca=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ha={type:"keyframes",duration:.8},fa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},da=(t,{keyframes:e})=>e.length>2?ha:wt.has(t)?t.startsWith("scale")?ca(e[1]):ua:fa,pa=t=>t!==null;function ma(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(pa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function dn(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function pn(t,e){const n=t?.[e]??t?.default??t;return n!==t?dn(n,t):n}function ga({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const mn=(t,e,n,s={},i,r)=>o=>{const a=pn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-_(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ga(a)||Object.assign(c,da(t,c)),c.duration&&(c.duration=_(c.duration)),c.repeatDelay&&(c.repeatDelay=_(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ne(c),c.delay===0&&(h=!0)),(q.instantAnimations||q.skipAnimations||i?.shouldSkipAnimations)&&(h=!0,Ne(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ma(c.keyframes,a);if(f!==void 0){C.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new hn(c):new ra(c)};function Gn(t){const e=[{},{}];
1return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function gn(t,e,n,s){if(typeof e=="function"){const[i,r]=Gn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Gn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function yt(t,e,n){const s=t.getProps();return gn(s,e,n!==void 0?n:s.custom,t)}const Li=new Set(["width","height","top","left","right","bottom",...Tt]),Hn=30,ya=t=>!isNaN(parseFloat(t)),Ct={current:void 0};class va{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ya(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 tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.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(){this.events.change?.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 Ct.current&&Ct.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Hn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Hn);return Qs(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ut(t,e){return new va(t,e)}const Ue=t=>Array.isArray(t);function xa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ut(n))}function Ta(t){return Ue(t)?t[t.length-1]||0:t}function wa(t,e){const n=yt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Ta(r[o]);xa(t,o,a)}}const B=t=>!!(t&&t.getVelocity);function Pa(t){return!!(B(t)&&t.add)}function We(t,e){const n=t.getValue("willChange");if(Pa(n))return n.add(e);if(!n&&q.WillChange){const s=new q.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function yn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Sa="framerAppearId",ki="data-"+yn(Sa);function Ii(t){return t.props[ki]}function ba({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Fi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?dn(r,l):l;const u=r?.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),p=a[f];if(p===void 0||h&&ba(h,f))continue;const v={delay:n,...pn(r||{},f)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===g&&!v.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const S=Ii(t);if(S){const P=window.MotionHandoffAnimation(S,f,C);P!==null&&(v.startTime=P,y=!0)}}We(t,f);const w=u??t.shouldReduceMotion;d.start(mn(f,d,p,w&&Li.has(f)?{type:!1}:v,t,y));const x=d.animation;x&&c.push(x)}if(o){const f=()=>C.update(()=>{o&&wa(t,o)});c.length?Promise.all(c).then(f):f()}return c}function Ke(t,e,n={}){const s=yt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};
1n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Fi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:h}=i;return Aa(t,e,l,u,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[r,o]:[o,r];return l().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function Aa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Ke(l,e,{...o,delay:n+(typeof s=="function"?0:s)+Ei(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Va(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ke(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ke(t,e,n);else{const i=typeof e=="function"?yt(t,e,n.custom):e;s=Promise.all(Fi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Ca={test:t=>t==="auto",parse:t=>t},Bi=t=>e=>e.test(t),ji=[xt,T,X,J,er,tr,Ca],zn=t=>ji.find(Bi(t));function Ma(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Js(t):!0}const Da=new Set(["brightness","contrast","saturate","opacity"]);function Ea(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(on)||[];if(!s)return t;const i=n.replace(s,"");let r=Da.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ra=/\b([a-z-]*)\(.*?\)/gu,$e={...et,getAnimatableNone:t=>{const e=t.match(Ra);return e?e.map(Ea).join(" "):t}},_n={...xt,transform:Math.round},La={rotate:J,rotateX:J,rotateY:J,rotateZ:J,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:J,skewX:J,skewY:J,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Lt,originX:kn,originY:kn,originZ:T},vn={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...La,zIndex:_n,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:_n},ka={...vn,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:$e,WebkitFilter:$e},Oi=t=>ka[t];function Ni(t,e){let n=Oi(t);return n!==$e&&(n=et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ia=new Set(["auto","none","0"]);function Fa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ia.has(r)&&kt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ni(n,i)}class Ba extends fn{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 c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),sn(h))){const f=Ri(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Li.has(s)||e.length!==2)return;const[i,r]=e,o=zn(i),a=zn(r),l=Ln(i),u=Ln(r);if(l!==u&&Q[s]){this.needsMeasurement=!0;return}if(o!==a)if(Wn(o)&&Wn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else Q[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ma(e[i]))&&s.push(i);s.length&&Fa(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=Q[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(){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,o=s[r];s[r]=Q[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ui(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Wi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ge(t){return Zs(t)&&"offsetHeight"in t}const{schedule:xn}=ci(queueMicrotask,!1),$={x:!1,y:!1};function Ki(){return $.x||$.y}function ja(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function $i(t,e){const n=Ui(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Oa(t){return!(t.pointerType==="touch"||Ki())}function Na(t,e,n={}){const[s,i,r]=$i(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",p)},h=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(g))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},p=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}h(g)}},v=g=>{if(!Oa(g))return;l=!1;const y=e(o,g);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",v,i),o.addEventListener("pointerdown",d,i)}),r}const Gi=(t,e)=>e?t===e?!0:Gi(t,e.parentElement):!1,Tn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ua=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ka=new Set(["INPUT","SELECT","TEXTAREA"]);function $a(t){return Ka.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function Xn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ga=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Xn(()=>{if(Ht.has(n))return;ye(n,"down");const i=Xn(()=>{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 Yn(t){return Tn(t)&&!Ki()}const qn=new WeakSet;function Ha(t,e,n={}){const[s,i,r]=$i(t,n),o=a=>{const l=a.currentTarget;if(!Yn(a)||qn.has(a))return;Ht.add(l),n.stopPropagation&&qn.add(a);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Ht.has(l)&&Ht.delete(l),Yn(d)&&typeof u=="function"&&u(d,{success:p})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Gi(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Ge(a)&&(a.addEventListener("focus",u=>Ga(u,i)),!Wa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function wn(t){return Zs(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let _t;const Hi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:wn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],za=Hi("inline","width","offsetWidth"),_a=Hi("block","height","offsetHeight");function Xa({target:t,borderBoxSize:e}){zt.get(t)?.forEach(n=>{n(t,{get width(){return za(t,e)},get height(){return _a(t,e)}})})}function Ya(t){t.forEach(Xa)}function qa(){typeof ResizeObserver>"u"||(_t=new ResizeObserver(Ya))}function Za(t,e){_t||qa();const n=Ui(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),_t?.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i?.delete(e),i?.size||_t?.unobserve(s)})}}const Xt=new Set;let dt;function Ja(){dt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xt.forEach(e=>e(t))},window.addEventListener("resize",dt)}function Qa(t){return Xt.add(t),dt||Ja(),()=>{Xt.delete(t),!Xt.size&&typeof dt=="function"&&(window.removeEventListener("resize",dt),dt=void 0)}}function Zn(t,e){return typeof t=="function"?Qa(t):Za(t,e)}function tl(t){return wn(t)&&t.tagName==="svg"}function el(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Pi(i,r,o);return e?a(s):a}const nl=[...ji,R,et],sl=t=>nl.find(Bi(t)),Jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),pt=()=>({x:Jn(),y:Jn()}),Qn=()=>({min:0,max:0}),k=()=>({x:Qn(),y:Qn()}),te={current:null},Pn={current:!1},il=typeof window<"u";function zi(){if(Pn.current=!0,!!il)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>te.current=t.matches;t.addEventListener("change",e),e()}else te.current=!1}const ol=new WeakMap;function ae(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function It(t){return typeof t=="string"||Array.isArray(t)}const Sn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bn=["initial",...Sn];function le(t){return ae(t.animate)||bn.some(e=>It(t[e]))}function _i(t){return!!(le(t)||t.variants)}function rl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(B(i))t.addValue(s,i);else if(B(r))t.addValue(s,ut(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,ut(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ts=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ee={};function Xi(t){ee=t}function al(){return ee}class ll{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 d=j.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,C.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.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=le(n),this.isVariantNode=_i(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];u[d]!==void 0&&B(p)&&p.set(u[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,ol.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.forEac
1h((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Pn.current||zi(),this.shouldReduceMotion=te.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.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=wt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&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 ee){const n=ee[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):k()}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<ts.length;s++){const i=ts[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=rl(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=ut(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"&&(qs(s)||Js(s))?s=parseFloat(s):!sl(s)&&et.test(n)&&(s=Ni(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=gn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(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 tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){xn.render(this.render)}}class Yi extends ll{constructor(){super(...arguments),this.KeyframeResolver=Ba}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class nt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function qi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ul({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function cl(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 ve(t){return t===void 0||t===1}function He({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ot(t){return He(t)||Zi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Zi(t){return es(t.x)||es(t.y)}function es(t){return t&&t!=="0%"}function ne(t,e,n){const s=t-n,i=e*s;return n+i}function ns(t,e,n,s,i){return i!==void 0&&(t=ne(t,i,s)),ne(t,n,s)+e}function ze(t,e=0,n=1,s,i){t.min=ns(t.min,e,n,s,i),t.max=ns(t.max,e,n,s,i)}function Ji(t,{x:e,y:n}
1){ze(t.x,e.translate,e.scale,e.originPoint),ze(t.y,n.translate,n.scale,n.originPoint)}const ss=.999999999999,is=1.0000000000001;function hl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&>(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ji(t,o)),s&&ot(r.latestValues)&>(t,r.latestValues))}e.x<is&&e.x>ss&&(e.x=1),e.y<is&&e.y>ss&&(e.y=1)}function mt(t,e){t.min=t.min+e,t.max=t.max+e}function os(t,e,n,s,i=.5){const r=M(t.min,t.max,i);ze(t,e,n,r,s)}function gt(t,e){os(t.x,e.x,e.scaleX,e.scale,e.originX),os(t.y,e.y,e.scaleY,e.scale,e.originY)}function Qi(t,e){return qi(cl(t.getBoundingClientRect(),e))}function fl(t,e,n){const s=Qi(t,n),{scroll:i}=e;return i&&(mt(s.x,i.offset.x),mt(s.y,i.offset.y)),s}const dl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pl=Tt.length;function ml(t,e,n){let s="",i=!0;for(let r=0;r<pl;r++){const o=Tt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=Wi(a,vn[o]);if(!l){i=!1;const c=dl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function An(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(wt.has(l)){o=!0;continue}else if(fi(l)){i[l]=u;continue}else{const c=Wi(u,vn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=ml(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function to(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function rs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const St={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=rs(t,e.target.x),s=rs(t,e.target.y);return`${n}% ${s}%`}},gl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=et.parse(t);if(i.length>5)return s;const r=et.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=M(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_e={borderRadius:{...St,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:St,borderTopRightRadius:St,borderBottomLeftRadius:St,borderBottomRightRadius:St,boxShadow:gl};function eo(t,{layout:e,layoutId:n}){return wt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_e[t]||t==="opacity")}function Vn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(B(s[o])||i&&B(i[o])||eo(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function yl(t){return window.getComputedStyle(t)}class vl extends Yi{constructor(){super(...arguments),this.type="html",this.renderInstance=to}readValueFromInstance(e,n){if(wt.has(n))return this.projection?.isProjecting?Ie(n):jr(e,n);{const s=yl(e),i=(fi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Qi(e,n)}build(e,n,s){An(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Vn(e,n,s)}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tl={offset:"strokeDashoffset",array:"strokeDasharray"};function wl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?xl:Tl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Pl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function no(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(An(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const d of Pl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&wl(h,i,r,o,!1)}const so=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"]),io=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Sl(t,e,n,s){to(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(so.has(i)?i:yn(i),e.attrs[i])}function oo(t,e,n){const s=Vn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const r=Tt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class bl extends Yi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(wt.has(n)){const s=Oi(n);return s&&s.default||0}return n=so.has(n)?n:yn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return oo(e,n,s)}build(e,n,s){no(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Sl(e,n,s,i)}mount(e){this.isSVGTag=io(e.tagName),super.mount(e)}}const Al=bn.length;function ro(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ro(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Al;n++){const s=bn[n],i=t.props[s];(It(i)||i===!1)&&(e[s]=i)}return e}function ao(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 Vl=[...Sn].reverse(),Cl=Sn.length;function Ml(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Va(t,n,s)))}function Dl(t){let e=Ml(t),n=as(),s=!0;const i=l=>(u,c)=>{const h=yt(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...p}=h;u={...u,...p,...d}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=ro(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let g=0;g<Cl;
1g++){const y=Vl[g],w=n[y],x=u[y]!==void 0?u[y]:c[y],S=It(x),P=y===l?w.isActive:null;P===!1&&(p=g);let V=x===c[y]&&x!==u[y]&&S;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),w.protectedKeys={...d},!w.isActive&&P===null||!x&&!w.prevProp||ae(x)||typeof x=="boolean")continue;const E=El(w.prevProp,x);let b=E||y===l&&w.isActive&&!V&&S||g>p&&S,A=!1;const L=Array.isArray(x)?x:[x];let H=L.reduce(i(y),{});P===!1&&(H={});const{prevResolvedValues:Pt={}}=w,ce={...Pt,...H},Dn=I=>{b=!0,f.has(I)&&(A=!0,f.delete(I)),w.needsAnimating[I]=!0;const N=t.getValue(I);N&&(N.liveStyle=!1)};for(const I in ce){const N=H[I],st=Pt[I];if(d.hasOwnProperty(I))continue;let ct=!1;Ue(N)&&Ue(st)?ct=!ao(N,st):ct=N!==st,ct?N!=null?Dn(I):f.add(I):N!==void 0&&f.has(I)?Dn(I):w.protectedKeys[I]=!0}w.prevProp=x,w.prevResolvedValues=H,w.isActive&&(d={...d,...H}),s&&t.blockInitialAnimation&&(b=!1);const En=V&&E;b&&(!En||A)&&h.push(...L.map(I=>{const N={type:y};if(typeof I=="string"&&s&&!En&&t.manuallyAnimateOnMount&&t.parent){const{parent:st}=t,ct=yt(st,I);if(st.enteringChildren&&ct){const{delayChildren:Fo}=ct.transition||{};N.delay=Ei(st.enteringChildren,t,Fo)}}return{animation:I,options:N}}))}if(f.size){const g={};if(typeof u.initial!="boolean"){const y=yt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(g.transition=y.transition)}f.forEach(y=>{const w=t.getBaseTarget(y),x=t.getValue(y);x&&(x.liveStyle=!0),g[y]=w??null}),h.push({animation:g})}let v=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(v=!1),s=!1,v?e(h):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const c=o(l);for(const h in n)n[h].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=as()}}}function El(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ao(e,t):!1}function it(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function as(){return{animate:it(!0),whileInView:it(),whileHover:it(),whileTap:it(),whileDrag:it(),whileFocus:it(),exit:it()}}function ls(t,e){t.min=e.min,t.max=e.max}function K(t,e){ls(t.x,e.x),ls(t.y,e.y)}function us(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const lo=1e-4,Rl=1-lo,Ll=1+lo,uo=.01,kl=0-uo,Il=0+uo;function O(t){return t.max-t.min}function Fl(t,e,n){return Math.abs(t-e)<=n}function cs(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Rl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=kl&&t.translate<=Il||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){cs(t.x,e.x,n.x,s?s.originX:void 0),cs(t.y,e.y,n.y,s?s.originY:void 0)}function hs(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function Bl(t,e,n){hs(t.x,e.x,n.x),hs(t.y,e.y,n.y)}function fs(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function se(t,e,n){fs(t.x,e.x,n.x),fs(t.y,e.y,n.y)}function ds(t,e,n,s,i){return t-=e,t=ne(t,1/n,s),i!==void 0&&(t=ne(t,1/i,s)),t}function jl(t,e=0,n=1,s=.5,i,r=t,o=t){if(X.test(e)&&(e=parseFloat(e),e=M(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=M(r.min,r.max,s);t===r&&(a-=e),t.min=ds(t.min,e,n,a,i),t.max=ds(t.max,e,n,a,i)}function ps(t,e,[n,s,i],r,o){jl(t,e[n],e[s],e[i],e.scale,r,o)}const Ol=["x","scaleX","originX"],Nl=["y","scaleY","originY"];function ms(t,e,n,s){ps(t.x,e,Ol,n?n.x:void 0,s?s.x:void 0),ps(t.y,e,Nl,n?n.y:void 0,s?s.y:void 0)}function gs(t){return t.translate===0&&t.scale===1}function co(t){return gs(t.x)&&gs(t.y)}function ys(t,e){return t.min===e.min&&t.max===e.max}function Ul(t,e){return ys(t.x,e.x)&&ys(t.y,e.y)}function vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ho(t,e){return vs(t.x,e.x)&&vs(t.y,e.y)}function xs(t){return O(t.x)/O(t.y)}function Ts(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function z(t){return[t("x"),t("y")]}function Wl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}
1`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const fo=["TopLeft","TopRight","BottomLeft","BottomRight"],Kl=fo.length,ws=t=>typeof t=="string"?parseFloat(t):t,Ps=t=>typeof t=="number"||T.test(t);function $l(t,e,n,s,i,r){i?(t.opacity=M(0,n.opacity??1,Gl(s)),t.opacityExit=M(e.opacity??1,0,Hl(s))):r&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let o=0;o<Kl;o++){const a=`border${fo[o]}Radius`;let l=Ss(e,a),u=Ss(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ps(l)===Ps(u)?(t[a]=Math.max(M(ws(l),ws(u),s),0),(X.test(u)||X.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function Ss(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Gl=po(0,.5,ri),Hl=po(.5,.95,W);function po(t,e,n){return s=>s<t?0:s>e?1:n(Rt(t,e,s))}function zl(t,e,n){const s=B(t)?t:ut(t);return s.start(mn("",s,e,n)),s.animation}function Ft(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const _l=(t,e)=>t.depth-e.depth;class Xl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_l),this.isDirty=!1,this.children.forEach(e)}}function Yl(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Z(s),t(r-e))};return C.setup(s,!0),()=>Z(s)}function Yt(t){return B(t)?t.get():t}class ql{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(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){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender();const i=s.options.layoutDependency,r=e.options.layoutDependency;i!==void 0&&r!==void 0&&i===r||(e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Zl=1e3;let Jl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function mo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ii(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&mo(s)}function go({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Jl++,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=()=>
1{this.projectionUpdateScheduled=!1,this.nodes.forEach(eu),this.nodes.forEach(ou),this.nodes.forEach(ru),this.nodes.forEach(nu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=wn(o)&&!tl(o),this.instance=o;const{layoutId:a,layout:l,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&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;C.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Yl(f,250),qt.hasAnimatedSinceResize&&(qt.hasAnimatedSinceResize=!1,this.nodes.forEach(Vs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||hu,{onLayoutAnimationStart:v,onLayoutAnimationComplete:g}=u.getProps(),y=!this.targetLayout||!ho(this.targetLayout,d),w=!h&&f;if(this.options.layoutRoot||this.resumeFrom||w||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...pn(p,"layout"),onPlay:v,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else h||Vs(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(),Z(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(au),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&&mo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)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()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(As);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(iu),this.nodes.forEach(Ql),this.nodes.forEach(tu)):this.nodes.forEach(As),this.clearAllSnapshots();const a=j.now();F.delta=Y(0,1e3/60,a-F.timestamp),F.timestamp=a,F.isProcessing=!0,he.update.process(F),he.preRender.process(F),he.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xn.read(this.scheduleUpdate))}
1clearAllSnapshots(){this.nodes.forEach(su),this.sharedNodes.forEach(lu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=k(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!co(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ot(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),fu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(du))){const{scroll:u}=this.root;u&&(mt(a.x,u.offset.x),mt(a.y,u.offset.y))}return a}removeElementScroll(o){const a=k();if(K(a,o),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;u!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&K(a,o),mt(a.x,c.offset.x),mt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const l=k();K(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&>(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ot(c.latestValues)&>(l,c.latestValues)}return ot(this.latestValues)&>(l,this.latestValues),l}removeTransform(o){const a=k();K(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ot(u.latestValues))continue;He(u.latestValues)&&u.updateSnapshot();const c=k(),h=u.measurePageBox();K(c,h),ms(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ot(this.latestValues)&&ms(a,this.latestValues),a}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!==F.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=F.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):K(this.target,this.layout.layoutBox),Ji(this.target,this.targetDelta)):K(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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||He(this.parent.latestValues)||Zi(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,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),se(this.relativeTargetOrigin,a,l),K(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;
1if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===F.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=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||c))return;K(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;hl(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(us(this.prevProjectionDelta.x,this.projectionDelta.x),us(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ts(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ts(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 a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pt(),this.projectionDelta=pt(),this.projectionDeltaWithTransform=pt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=k(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,v=d!==p,g=this.getStack(),y=!g||g.members.length<=1,w=!!(v&&!y&&this.options.crossfade===!0&&!this.path.some(cu));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const P=S/1e3;Cs(h.x,o.x,P),Cs(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(se(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uu(this.relativeTarget,this.relativeTargetOrigin,f,P),x&&Ul(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=k()),K(x,this.relativeTarget)),v&&(this.animationValues=c,$l(c,u,this.latestValues,P,w,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&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{qt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ut(0)),this.currentAnimation=zl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Zl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&yo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||k();
1const h=O(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}K(a,l),gt(a,c),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ql),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):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:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Te("z",o,u,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,u,this.animationValues),Te(`skew${xe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Yt(a?.pointerEvents)||"",o.transform=l?l(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=Yt(a?.pointerEvents)||""),this.hasProjected&&!ot(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Wl(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,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?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in _e){if(c[p]===void 0)continue;const{correct:v,applyTo:g,isCSSVariable:y}=_e[p],w=h==="none"?c[p]:v(c[p],u);if(g){const x=g.length;for(let S=0;S<x;S++)o[g[S]]=w}else y?this.options.visualElement.renderState.vars[p]=w:o[p]=w}this.options.layoutId&&(o.pointerEvents=u===this?Yt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(bs),this.root.sharedNodes.clear()}}}function Ql(t){t.updateLayout()}function tu(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;i==="size"?z(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=O(h);h.min=n[c].min,h.max=h.min+f}):yo(i,e.layoutBox,n)&&z(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=O(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const o=pt();Mt(o,n,e.layoutBox);const a=pt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const l=!co(o);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const d=k();se(d,e.layoutBox,h.layoutBox);const p=k();se(p,n,f.layoutBox),ho(d,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function eu(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.
1isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function su(t){t.clearSnapshot()}function bs(t){t.clearMeasurements()}function As(t){t.isLayoutDirty=!1}function iu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Vs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ou(t){t.resolveTargetDelta()}function ru(t){t.calcProjection()}function au(t){t.resetSkewAndRotation()}function lu(t){t.removeLeadSnapshot()}function Cs(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ms(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function uu(t,e,n,s){Ms(t.x,e.x,n.x,s),Ms(t.y,e.y,n.y,s)}function cu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hu={duration:.45,ease:[.4,0,.1,1]},Ds=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Es=Ds("applewebkit/")&&!Ds("chrome/")?Math.round:W;function Rs(t){t.min=Es(t.min),t.max=Es(t.max)}function fu(t){Rs(t.x),Rs(t.y)}function yo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Fl(xs(e),xs(n),.2)}function du(t){return t!==t.root&&t.scroll?.wasRoot}const pu=go({attachResizeListener:(t,e)=>Ft(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),mu=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Ls(){const t=new Set,e=new WeakMap,n=()=>t.forEach(mu);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const we={current:void 0},vo=go({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pu({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),vt=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function ks(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function gu(...t){return e=>{let n=!1;const s=t.map(i=>{const r=ks(i,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ks(t[i],null)}}}}function yu(...t){return m.useCallback(gu(...t),t)}class vu extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=Ge(s)&&s.offsetWidth||0,r=Ge(s)&&s.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function xu({children:t,isPresent:e,anchorX:n,anchorY:s,root:i,pop:r}){const o=m.useId(),a=m.useRef(null),l=m.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=m.useContext(vt),c=t.props?.ref??t?.ref,h=yu(a,c);return m.useInsertionEffect(()=>{const{width:f,height:d,top:p,left:v,right:g,bottom:y}=l.current;if(e||r===!1||!a.current||!f||!d)return;const w=n==="left"?`left: ${v}`:`right: ${g}`,x=s==="bottom"?`bottom: ${y}`:`top: ${p}`;a.current.dataset.motionPopId=o;const S=document.createElement("style");u&&(S.nonce=u);const P=i??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(` 2 [data-motion-pop-id="${o}"] { 3 position: absolute !important; 4 width: ${f}px !important; 5 height: ${d}px !important; 6 ${w}px !important; 7 ${x}px !important; 8 } 9 `),()=>{P.contains(S)&&P.removeChild(S)}},[e]),G.jsx(vu,{isPresent:e,childRef:a,sizeRef:l,pop:r,children:r===!1?t:m.cloneElement(t,{ref:h})})}const Tu=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:l,root:u})=>{const c=tt(wu),h=m.useId();let f=!0,d=m.useMemo(()=>(f=!1,{id:h,initial:e,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const v of c.values())if(!v)return;s&&s()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,s]);return r&&f&&(d={...d}),m.useMemo(()=>
9{c.forEach((p,v)=>c.set(v,!1))},[n]),m.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),t=G.jsx(xu,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:u,children:t}),G.jsx(re.Provider,{value:d,children:t})};function wu(){return new Map}function xo(t=!0){const e=m.useContext(re);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=m.useId();m.useEffect(()=>{if(t)return i(r)},[t]);const o=m.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Kt=t=>t.key||"";function Is(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const Nc=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:u})=>{const[c,h]=xo(o),f=m.useMemo(()=>Is(t),[t]),d=o&&!c?[]:f.map(Kt),p=m.useRef(!0),v=m.useRef(f),g=tt(()=>new Map),y=m.useRef(new Set),[w,x]=m.useState(f),[S,P]=m.useState(f);oe(()=>{p.current=!1,v.current=f;for(let b=0;b<S.length;b++){const A=Kt(S[b]);d.includes(A)?(g.delete(A),y.current.delete(A)):g.get(A)!==!0&&g.set(A,!1)}},[S,d.length,d.join("-")]);const V=[];if(f!==w){let b=[...f];for(let A=0;A<S.length;A++){const L=S[A],H=Kt(L);d.includes(H)||(b.splice(A,0,L),V.push(L))}return r==="wait"&&V.length&&(b=V),P(Is(b)),x(f),null}const{forceRender:E}=m.useContext(Et);return G.jsx(G.Fragment,{children:S.map(b=>{const A=Kt(b),L=o&&!c?!1:f===S||d.includes(A),H=()=>{if(y.current.has(A))return;if(y.current.add(A),g.has(A))g.set(A,!0);else return;let Pt=!0;g.forEach(ce=>{ce||(Pt=!1)}),Pt&&(E?.(),P(v.current),o&&h?.(),s&&s())};return G.jsx(Tu,{isPresent:L,initial:!p.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:L?void 0:H,anchorX:a,anchorY:l,children:b},A)})})},Pu=m.createContext(null);function Su(){const t=m.useRef(!1);return oe(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function bu(){const t=Su(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>C.postRender(s),[s]),e]}const To=t=>t===!0,Au=t=>To(t===!0)||t==="id",Uc=({children:t,id:e,inherit:n=!0})=>{const s=m.useContext(Et),i=m.useContext(Pu),[r,o]=bu(),a=m.useRef(null),l=s.id||i;a.current===null&&(Au(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:To(n)&&s.group||Ls()});const u=m.useMemo(()=>({...a.current,forceRender:r}),[o]);return G.jsx(Et.Provider,{value:u,children:t})},wo=m.createContext({strict:!1}),Fs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Bs=!1;function Vu(){if(Bs)return;const t={};for(const e in Fs)t[e]={isEnabled:n=>Fs[e].some(s=>!!n[s])};Xi(t),Bs=!0}function Po(){return Vu(),al()}function Cu(t){const e=Po();for(const n in t)e[n]={...e[n],...t[n]};Xi(e)}const Mu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ie(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mu.has(t)}let So=t=>!ie(t);function bo(t){typeof t=="function"&&(So=e=>e.startsWith("on")?!ie(e):t(e))}try{bo(require("@emotion/is-prop-valid").default)}catch{}function Du(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(So(i)||n===!0&&ie(i)||!e&&!ie(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Wc({children:t,isValidProp:e,...n}){e&&bo(e);const s=m.useContext(vt);n={...s,...n},n.transition=dn(n.transition,s.transition),n.isStatic=tt(()=>n.isStatic);const i=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return G.jsx(vt.Provider,{value:i,children:t})}const ue=m.createContext({});function Eu(t,e){if(le(t)){const{initial:n,animate:s}=t;return{initial:n===!1||It(n)?n:void 0,animate:It(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ru(t){const{initial:e,animate:n}=Eu(t,m.useContext(ue));return m.useMemo(()=>({initial:e,animate:n}),[js(e),js(n)])}function js(t){return Array.isArray(t)?t.join(" "):t}const Cn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ao(t,e,n){for(const s in e)!B(e[s])&&!eo(s,n)&&(t[s]=e[s])}function Lu({transformTemplate:t},e){return m.useMemo(()=>{const n=Cn();return An(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ku(t,e){const n=t.style||{},s={};return Ao(s,n,t),Object.assign(s,Lu(t,e)),s}function Iu(t,e){const n={},s=ku(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Vo=()=>({...Cn(),attrs:{}});function Fu(t,e,n,s){const i=m.useMemo(()=>{const r=Vo();return no(r,e,io(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ao(r,t.style,t),i.style={...r,...i.style}}return i}const Bu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Mn(t){return typeof t!="string"||t.includes("-")?!1:!!(Bu.indexOf(t)>-1||/[A-Z]/u.test(t))}function ju(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Mn(t)?Fu:Iu)(e,s,i,t),u=Du(e,typeof t=="string",r),c=t!==m.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=m.useMemo(()=>B(h)?h.get():h,[h]);return m.createElement(t,{...c,children:f})}function Ou({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Nu(n,s,i,t),renderState:e()}}function Nu(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Yt(r[f]);let{initial:o,animate:a}=t;const l=le(t),u=_i(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ae(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=gn(t,f[d]);if(p){const{transitionEnd:v,transition:g,...y}=p;for(const w in y){let x=y[w];if(Array.isArray(x)){const S=c?x.length-1:0;x=x[S]}x!==null&&(i[w]=x)}for(const w in v)i[w]=v[w]}}}return i}const Co=t=>(e,n)=>{const s=m.useContext(ue),i=m.useContext(re),r=()=>Ou(t,e,s,i);return n?r():tt(r)},Uu=Co({scrapeMotionValuesFromProps:Vn,createRenderState:Cn}),Wu=Co({scrapeMotionValuesFromProps:oo,createRenderState:Vo}),Ku=Symbol.for("motionComponentSymbol");function $u(t,e,n){const s=m.useRef(n);m.useInsertionEffect(()=>{s.current=n});const i=m.useRef(null);return m.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const Mo=m.createContext({});function ht(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Gu(t,e,n,s,i,r){const{visualElement:o}=m.useContext(ue),a=m.useContext(wo),l=m.useContext(re),u=m.useContext(vt),c=u.reducedMotion,h=u.ski
9pAnimations,f=m.useRef(null),d=m.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,v=m.useContext(Mo);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&Hu(f.current,n,i,v);const g=m.useRef(!1);m.useInsertionEffect(()=>{p&&g.current&&p.update(n,l)});const y=n[ki],w=m.useRef(!!y&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return oe(()=>{d.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),w.current&&p.animationState&&p.animationState.animateChanges())}),m.useEffect(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),w.current=!1),p.enteringChildren=void 0)}),p}function Hu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Do(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&ht(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Do(t){if(t)return t.options.allowProjection!==!1?t.projection:Do(t.parent)}function Pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&Cu(s);const r=n?n==="svg":Mn(t),o=r?Wu:Uu;function a(u,c){let h;const f={...m.useContext(vt),...u,layoutId:zu(u)},{isStatic:d}=f,p=Ru(u),v=o(u,d);if(!d&&Ys){_u();const g=Xu(f);h=g.MeasureLayout,p.visualElement=Gu(t,v,f,i,g.ProjectionNode,r)}return G.jsxs(ue.Provider,{value:p,children:[h&&p.visualElement?G.jsx(h,{visualElement:p.visualElement,...f}):null,ju(t,u,$u(v,p.visualElement,c),v,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=m.forwardRef(a);return l[Ku]=t,l}function zu({layoutId:t}){const e=m.useContext(Et).id;return e&&t!==void 0?e+"-"+t:t}function _u(t,e){m.useContext(wo).strict}function Xu(t){const e=Po(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Yu(t,e){if(typeof Proxy>"u")return Pe;const n=new Map,s=(r,o)=>Pe(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Pe(o,void 0,t,e)),n.get(o))})}const qu=(t,e)=>e.isSVG??Mn(t)?new bl(e):new vl(e,{allowProjection:t!==m.Fragment});class Zu extends nt{constructor(e){super(e),e.animationState||(e.animationState=Dl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ae(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 Ju=0;class Qu extends nt{constructor(){super(...arguments),this.id=Ju++}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 tc={animation:{Feature:Zu},exit:{Feature:Qu}};function Nt(t){return{point:{x:t.pageX,y:t.pageY}}}const ec=t=>e=>Tn(e)&&t(e,Nt(e));function Dt(t,e,n,s){return Ft(t,e,ec(n),s)}const Eo=({current:t})=>t?t.ownerDocument.defaultView:null,Os=(t,e)=>Math.abs(t-e);function nc(t,e){const n=Os(t.x,e.x),s=Os(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ns=new Set(["auto","scroll"]);class Ro{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=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;const d=be(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,v=nc(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!v)return;const{point:g}=d,{timestamp:y}=F;this.history.push({...g,timestamp:y}
9);const{onStart:w,onMove:x}=this.handlers;p||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Se(p,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=be(d.type==="pointercancel"?this.lastMoveEventInfo:Se(p,this.transformPagePoint),this.history);this.startEvent&&v&&v(d,w),g&&g(d,w)},!Tn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=Nt(e),u=Se(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=F;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,be(u,this.history)),this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove),Dt(this.contextWindow,"pointerup",this.handlePointerUp),Dt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ns.has(s.overflowX)||Ns.has(s.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,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),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 s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),C.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Z(this.updatePoint)}}function Se(t,e){return e?{point:e(t.point)}:t}function Us(t,e){return{x:t.x-e.x,y:t.y-e.y}}function be({point:t},e){return{point:t,delta:Us(t,Lo(e)),offset:Us(t,sc(e)),velocity:ic(e,.1)}}function sc(t){return t[0]}function Lo(t){return t[t.length-1]}function ic(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Lo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>_(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>_(e)*2&&(s=t[1]);const r=U(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function oc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Ws(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 rc(t,{top:e,left:n,bottom:s,right:i}){return{x:Ws(t.x,n,i),y:Ws(t.y,e,s)}}function Ks(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ac(t,e){return{x:Ks(t.x,e.x),y:Ks(t.y,e.y)}}function lc(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=Rt(e.min,e.max-s,t.min):s>i&&(n=Rt(t.min,t.max-i,e.min)),Y(0,1,n)}function uc(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 Xe=.35;function cc(t=Xe){return t===!1?t=0:t===!0&&(t=Xe),{x:$s(t,"left","right"),y:$s(t,"top","bottom")}}function $s(t,e,n){return{min:Gs(t,e),max:Gs(t,n)}}function Gs(t,e){return typeof t=="number"?t:t[e]||0}const hc=new WeakMap;class fc{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=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Nt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:v}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ja(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),z(y=>{let w=this.getAxisMotionValue(y).get()||0;if(X.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[y];
9S&&(w=O(S)*(parseFloat(w)/100))}}this.originPoint[y]=w}),v&&C.update(()=>v(h,f),!1,!0),We(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:v,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=pc(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&C.update(()=>g(h,f),!1,!0)},l=(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:c}=this.getProps();this.panSession=new Ro(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Eo(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&C.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&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,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=oc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&ht(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=rc(s.layoutBox,e):this.constraints=!1,this.elastic=cc(n),i!==this.constraints&&!ht(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&z(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=uc(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ht(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=fl(s,i.root,this.visualElement.getTransformPagePoint());let o=ac(i.layout.layoutBox,r);if(n){const a=n(ul(o));this.hasMutatedConstraints=!!a,a&&(o=qi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=z(c=>{if(!$t(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return We(this.visualElement,e),s.start(mn(e,s,0,n,this.visualElement,!1))}stopAnimation(){z(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){z(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-M(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ht(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};z(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=lc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),z(o=>{if(!$t(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(M(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;hc.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&$a(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();ht(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=dc(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),C.read(i);const a=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(z(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Xe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Hs(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function dc(t,e,n){const s=Zn(t,Hs(n)),i=Zn(e,Hs(n));return()=>{s(),i()}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function pc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class mc extends nt{constructor(e){super(e),this.removeGroupControls=W,this.removeListeners=W,this.controls=new fc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||W}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 Ae=t=>
9(e,n)=>{t&&C.update(()=>t(e,n),!1,!0)};class gc extends nt{constructor(){super(...arguments),this.removePointerDownListener=W}onPointerDown(e){this.session=new Ro(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Eo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ae(e),onStart:Ae(n),onMove:Ae(s),onEnd:(r,o)=>{delete this.session,i&&C.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(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 Ve=!1;class yc extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ve&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),qt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ve=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||C.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),xn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ve=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ko(t){const[e,n]=xo(),s=m.useContext(Et);return G.jsx(yc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(Mo),isPresent:e,safeToRemove:n})}const vc={pan:{Feature:gc},drag:{Feature:mc,ProjectionNode:vo,MeasureLayout:ko}};function zs(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&&C.postRender(()=>r(e,Nt(e)))}class xc extends nt{mount(){const{current:e}=this.node;e&&(this.unmount=Na(e,(n,s)=>(zs(this.node,s,"Start"),i=>zs(this.node,i,"End"))))}unmount(){}}class Tc extends nt{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=Bt(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _s(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&&C.postRender(()=>r(e,Nt(e)))}class wc extends nt{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ha(e,(i,r)=>(_s(this.node,r,"Start"),(o,{success:a})=>_s(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ye=new WeakMap,Ce=new WeakMap,Pc=t=>{const e=Ye.get(t.target);e&&e(t)},Sc=t=>{t.forEach(Pc)};function bc({root:t,...e}){const n=t||document;Ce.has(n)||Ce.set(n,{});const s=Ce.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Sc,{root:t,...e})),s[i]}function Ac(t,e,n){const s=bc(e);return Ye.set(t,n),s.observe(t),()=>{Ye.delete(t),s.unobserve(t)}}const Vc={some:0,all:1};class Cc extends nt{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,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Vc[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Ac(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Mc(e,n))&&this.startObserver()}unmount(){}}function Mc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Dc={inView:{Feature:Cc},tap:{Feature:wc},focus:{Feature:Tc},hover:{Feature:xc}},Ec={layout:{ProjectionNode:vo,MeasureLayout:ko}},Rc={...tc,...Dc,...vc,...Ec},Kc=Yu(Rc,qu);function Lc(t){const e=tt(()=>ut(t)),{isStatic:n}=m.useContext(vt);if(n){const[,s]=m.useState(t);m.useEffect(()=>e.on("change",s),[])}return e}function Io(t,e){const n=Lc(e()),s=()=>n.set(e());return s(),oe(()=>{const i=()=>C.preRender(s,!1,!0),r=t.map(o=>
9o.on("change",i));return()=>{r.forEach(o=>o()),Z(s)}}),n}function kc(t){Ct.current=[],t();const e=Io(Ct.current,t);return Ct.current=void 0,e}function Ic(t,e,n,s){if(typeof t=="function")return kc(t);if(n!==void 0&&!Array.isArray(n)&&typeof e!="function")return Fc(t,e,n,s);const o=typeof e=="function"?e:el(e,n,s);return Array.isArray(t)?Xs(t,o):Xs([t],([a])=>o(a))}function Xs(t,e){const n=tt(()=>[]);return Io(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Fc(t,e,n,s){const i=tt(()=>Object.keys(n)),r=tt(()=>({}));for(const o of i)r[o]=Ic(t,e,n[o],s);return r}function $c(){!Pn.current&&zi();const[t]=m.useState(te.current);return t}export{Nc as A,Uc as L,Wc as M,Lc as a,Ic as b,Kc as m,$c as u};
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.