motion 13.0.0-alpha.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -53
- package/dist/cjs/react.js +35 -3
- package/dist/es/react.mjs +16 -0
- package/dist/motion.dev.js +8633 -3519
- package/dist/motion.js +1 -1
- package/dist/react.d.ts +6 -0
- package/package.json +3 -7
package/dist/motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const s=(t,e,n)=>n>e?e:n<t?t:n;let i=()=>{};const r={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class f{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const m=t=>1e3*t,g=t=>t/1e3;function y(t,e){return e?t*(1e3/e):0}const v=new Set;const w=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},b=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,s){if(t===e&&n===s)return c;const i=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=b(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:b(i(t),e,s)}const x=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,V=t=>e=>1-t(1-e),M=T(.33,1.53,.69,.99),S=V(M),A=x(S),k=t=>(t*=2)<1?.5*S(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),P=V(E),C=x(E),O=T(.42,0,1,1),F=T(0,0,.58,1),R=T(.42,0,.58,1);const B=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return B(t)?t[w(0,t.length,e)]:t}const D=t=>Array.isArray(t)&&"number"==typeof t[0],I={linear:c,easeIn:O,easeInOut:R,easeOut:F,circIn:E,circInOut:C,circOut:P,backIn:S,backInOut:A,backOut:M,anticipate:k},W=t=>{if(D(t)){t.length;const[e,n,s,i]=t;return T(e,n,s,i)}return"string"==typeof t?I[t]:t},j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function K(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=j.reduce((t,n)=>(t[n]=function(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},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,r=!1)=>{const a=r&&i?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[n,s]=[s,n],n.forEach(u),e&&N.value&&N.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const o=r.useManualTiming?i.timestamp:performance.now();n=!1,r.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))};return{schedule:j.reduce((e,r)=>{const o=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(g)),o.schedule(e,r,a)),e},{}),cancel:t=>{for(let e=0;e<j.length;e++)a[j[e]].cancel(t)},state:i,steps:a}}const{schedule:$,cancel:U,state:Y,steps:z}=K("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:c,!0);let X;function H(){X=void 0}const G={now:()=>(void 0===X&&G.set(Y.isProcessing||r.useManualTiming?Y.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},Z={layout:0,mainThread:0,waapi:0},q=t=>e=>"string"==typeof e&&e.startsWith(t),_=q("--"),J=q("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>s(0,1,t)},st={...et,default:1},it=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),lt=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(rt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ut={...et,transform:t=>Math.round((t=>s(0,255,t))(t))},ct={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+it(nt.transform(s))+")"};const ht={test:at("#"),parse:function(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}},transform:ct.transform},dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),ft=dt("%"),mt=dt("px"),gt=dt("vh"),yt=dt("vw"),vt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),wt={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ft.transform(it(e))+", "+ft.transform(it(n))+", "+it(nt.transform(s))+")"},bt={test:t=>ct.test(t)||ht.test(t)||wt.test(t),parse:t=>ct.test(t)?ct.parse(t):wt.test(t)?wt.parse(t):ht.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):wt.transform(t),getAnimatableNone:t=>{const e=bt.parse(t);return e.alpha=0,bt.transform(e)}},Tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const xt="number",Vt="color",Mt=/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 St(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Mt,t=>(bt.test(t)?(s.color.push(r),i.push(Vt),n.push(bt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(xt),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function At(t){return St(t).values}function kt(t){const{split:e,types:n}=St(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+=e===xt?it(t[r]):e===Vt?bt.transform(t[r]):t[r]}return i}}const Et=t=>"number"==typeof t?0:bt.test(t)?bt.getAnimatableNone(t):t;const Pt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(Tt)?.length||0)>0},parse:At,createTransformer:kt,getAnimatableNone:function(t){const e=At(t);return kt(t)(e.map(Et))}};function Ct(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ot({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Ct(a,s,t+1/3),r=Ct(a,s,t),o=Ct(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}function Ft(t,e){return n=>n>0?e:t}const Rt=(t,e,n)=>t+(e-t)*n,Bt=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Lt=[ht,ct,wt];function Dt(t){const e=(n=t,Lt.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===wt&&(s=Ot(s)),s}const It=(t,e)=>{const n=Dt(t),s=Dt(e);if(!n||!s)return Ft(t,e);const i={...n};return t=>(i.red=Bt(n.red,s.red,t),i.green=Bt(n.green,s.green,t),i.blue=Bt(n.blue,s.blue,t),i.alpha=Rt(n.alpha,s.alpha,t),ct.transform(i))},Wt=new Set(["none","hidden"]);function jt(t,e){return Wt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Nt(t,e){return n=>Rt(t,e,n)}function Kt(t){return"number"==typeof t?Nt:"string"==typeof t?Q(t)?Ft:bt.test(t)?It:Yt:Array.isArray(t)?$t:"object"==typeof t?bt.test(t)?It:Ut:Ft}function $t(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Kt(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function Ut(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Kt(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Yt=(t,e)=>{const n=Pt.createTransformer(e),s=St(t),i=St(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?Wt.has(t)&&!i.values.length||Wt.has(e)&&!s.values.length?jt(t,e):d($t(function(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}(s,i),i.values),n):Ft(t,e)};function zt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Rt(t,e,n);return Kt(t)(t,e)}const Xt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>U(e),now:()=>Y.isProcessing?Y.timestamp:G.now()}},Ht=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=Math.round(1e4*t(e/(i-1)))/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Gt=2e4;function Zt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Gt;)e+=50,n=t.next(e);return e>=Gt?1/0:e}function qt(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Zt(s),Gt);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:g(i)}}function _t(t,e,n){const s=Math.max(e-5,0);return y(n-t(s),e-s)}const Jt=100,Qt=10,te=1,ee=0,ne=800,se=.3,ie=.3,re={granular:.01,default:2},oe={granular:.005,default:.5},ae=.01,le=10,ue=.05,ce=1,he=.001;function de({duration:t=ne,bounce:e=se,velocity:n=ee,mass:i=te}){let r,o,a=1-e;a=s(ue,ce,a),t=s(ae,le,g(t)),a<1?(r=e=>{const s=e*a,i=s*t,r=s-n,o=fe(e,a),l=Math.exp(-i);return he-r/o*l},o=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=fe(Math.pow(e,2),a);return(-r(e)+he>0?-1:1)*((i-o)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const l=function(t,e,n){let s=n;for(let n=1;n<pe;n++)s-=t(s)/e(s);return s}(r,o,5/t);if(t=m(t),isNaN(l))return{stiffness:Jt,damping:Qt,duration:t};{const e=Math.pow(l,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const pe=12;function fe(t,e){return t*Math.sqrt(1-e*e)}const me=["duration","bounce"],ge=["stiffness","damping","mass"];function ye(t,e){return e.some(e=>void 0!==t[e])}function ve(t=ie,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:f}=function(t){let e={velocity:ee,stiffness:Jt,damping:Qt,mass:te,isResolvedFromDuration:!1,...t};if(!ye(t,ge)&&ye(t,me))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*s(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:te,stiffness:r,damping:o}}else{const n=de(t);e={...e,...n,mass:te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-g(n.velocity||0)}),y=p||0,v=c/(2*Math.sqrt(u*h)),w=a-o,b=g(Math.sqrt(u/h)),T=Math.abs(w)<5;let x;if(i||(i=T?re.granular:re.default),r||(r=T?oe.granular:oe.default),v<1){const t=fe(b,v);x=e=>{const n=Math.exp(-v*b*e);return a-n*((y+v*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===v)x=t=>a-Math.exp(-b*t)*(w+(y+b*w)*t);else{const t=b*Math.sqrt(v*v-1);x=e=>{const n=Math.exp(-v*b*e),s=Math.min(t*e,300);return a-n*((y+v*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const V={calculatedDuration:f&&d||null,next:t=>{const e=x(t);if(f)l.done=t>=d;else{let n=0===t?y:0;v<1&&(n=0===t?m(y):_t(x,t,e));const s=Math.abs(n)<=i,o=Math.abs(a-e)<=r;l.done=s&&o}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(V),Gt),e=Ht(e=>V.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return V}function we({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],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=ve({keyframes:[d.value,p(d.value)],velocity:_t(v,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function be(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=function(t,e,n){const s=[],i=n||r.mix||zt,o=t.length-1;for(let n=0;n<o;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||c:e;r=d(t,r)}s.push(r)}return s}(e,i,o),h=u.length,f=n=>{if(l&&n<t[0])return e[0];let s=0;if(h>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const i=p(t[s],t[s+1],n);return u[s](i)};return n?e=>f(s(t[0],t[a-1],e)):f}function Te(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=p(0,e,s);t.push(Rt(n,1,i))}}function xe(t){const e=[0];return Te(e,t.length-1),e}function Ve(t,e){return t.map(t=>t*e)}function Me(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function Se({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=B(s)?s.map(W):W(s),r={done:!1,value:e[0]},o=be(Ve(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(i)?i:Me(e,i)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}ve.applyToOptions=t=>{const e=qt(t,100,ve);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};const Ae=t=>null!==t;function ke(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ae),o=i<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}const Ee={decay:we,inertia:we,tween:Se,keyframes:Se,spring:ve};function Pe(t){"string"==typeof t.type&&(t.type=Ee[t.type])}class Ce{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Oe=t=>t/100;class Fe extends Ce{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Z.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=Se,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Se;a!==Se&&"number"!=typeof o[0]&&(this.mixKeyframes=d(Oe,zt(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===i&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(h){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(b=o)),w=s(0,1,n)*a}const T=v?{done:!1,value:c[0]}:b.next(w);r&&(T.value=r(T.value));let{done:x}=T;v||null===l||(x=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return V&&f!==we&&(T.value=ke(c,this.options,g,this.speed)),m&&m(T.value),V&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return g(this.calculatedDuration)}get time(){return g(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,Z.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Re(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Be=t=>180*t/Math.PI,Le=t=>{const e=Be(Math.atan2(t[1],t[0]));return Ie(e)},De={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=>Be(Math.atan(t[1])),skewY:t=>Be(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),We=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),je=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:We,scaleY:je,scale:t=>(We(t)+je(t))/2,rotateX:t=>Ie(Be(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(Be(Math.atan2(-t[2],t[0]))),rotateZ:Le,rotate:Le,skewX:t=>Be(Math.atan(t[4])),skewY:t=>Be(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ke(t){return t.includes("scale")?1:0}function $e(t,e){if(!t||"none"===t)return Ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ne,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=De,i=e}if(!i)return Ke(e);const r=s[e],o=i[1].split(",").map(Ye);return"function"==typeof r?r(o):o[r]}const Ue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return $e(n,e)};function Ye(t){return parseFloat(t.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=(()=>new Set(ze))(),He=t=>t===et||t===mt,Ge=new Set(["x","y","z"]),Ze=ze.filter(t=>!Ge.has(t));const qe={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})=>$e(e,"x"),y:(t,{transform:e})=>$e(e,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const _e=new Set;let Je=!1,Qe=!1,tn=!1;function en(){if(Qe){const t=Array.from(_e).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Qe=!1,Je=!1,_e.forEach(t=>t.complete(tn)),_e.clear()}function nn(){_e.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qe=!0)})}function sn(){tn=!0,nn(),en(),tn=!1}class rn{constructor(t,e,n,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(_e.add(this),Je||(Je=!0,$.read(nn),$.resolveKeyframes(en))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const i=s?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}Re(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_e.delete(this)}cancel(){"scheduled"===this.state&&(_e.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const on=t=>t.startsWith("--");function an(t,e,n){on(e)?t.style.setProperty(e,n):t.style[e]=n}const ln=u(()=>void 0!==window.ScrollTimeline),un={};function cn(t,e){const n=u(t);return()=>un[e]??n()}const hn=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),dn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dn([0,.65,.55,1]),circOut:dn([.55,0,1,.45]),backIn:dn([.31,.01,.66,-.59]),backOut:dn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?hn()?Ht(t,e):"ease-out":D(t)?dn(t):Array.isArray(t)?t.map(t=>fn(t,e)||pn.easeOut):pn[t]:void 0}function mn(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=fn(a,i);Array.isArray(h)&&(c.easing=h),N.value&&Z.waapi++;const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return N.value&&p.finished.finally(()=>{Z.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function yn({type:t,...e}){return gn(t)&&hn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vn extends Ce{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=r,this.options=t,t.type;const l=yn(t);this.animation=mn(e,n,s,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=ke(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):an(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return g(Number(t))}get time(){return g(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=m(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ln()?(this.animation.timeline=t,c):e(this)}}const wn={anticipate:k,backInOut:A,circInOut:C};function bn(t){"string"==typeof t.ease&&t.ease in wn&&(t.ease=wn[t.ease])}class Tn extends vn{constructor(t){bn(t),Pe(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:i,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Fe({...r,autoplay:!1}),a=m(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const xn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Pt.test(t)&&"0"!==t||t.startsWith("url(")));function Vn(t){t.duration=0,t.type}const Mn=new Set(["opacity","clipPath","filter","transform"]),Sn=u(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function An(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Sn()&&n&&Mn.has(n)&&("transform"!==n||!u)&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}class kn extends Ce{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||rn;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:h}=n;this.resolvedAt=G.now(),function(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=xn(i,e),a=xn(r,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||gn(n))&&s)}(t,i,o,a)||(!r.instantAnimations&&l||h?.(ke(t,n,e)),t[0]=t[t.length-1],Vn(n),n.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},p=!u&&An(d)?new Tn({...d,element:d.motionValue.owner.current}):new Fe(d);p.finished.then(()=>this.notifyFinished()).catch(c),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sn()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class En{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Pn extends En{then(t,e){return this.finished.finally(t).then(()=>{})}}class Cn extends vn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const On=new WeakMap,Fn=(t,e="")=>`${t}:${e}`;function Rn(t){const e=On.get(t)||new Map;return On.set(t,e),e}const Bn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ln(t){const e=Bn.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Dn(t,e,n=1){const[s,i]=Ln(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return Q(i)?Dn(i,e,n+1):i}function In(t,e){return t?.[e]??t?.default??t}const Wn=new Set(["width","height","top","left","right","bottom",...ze]),jn=t=>e=>e.test(t),Nn=[et,mt,ft,pt,yt,gt,{test:t=>"auto"===t,parse:t=>t}],Kn=t=>Nn.find(jn(t));function $n(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Un=new Set(["brightness","contrast","saturate","opacity"]);function Yn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(rt)||[];if(!s)return t;const i=n.replace(s,"");let r=Un.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,Xn={...Pt,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(Yn).join(" "):t}},Hn={...et,transform:Math.round},Gn={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:pt,skewX:pt,skewY:pt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:nt,originX:vt,originY:vt,originZ:mt},Zn={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,backgroundPositionX:mt,backgroundPositionY:mt,...Gn,zIndex:Hn,fillOpacity:nt,strokeOpacity:nt,numOctaves:Hn},qn={...Zn,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Xn,WebkitFilter:Xn},_n=t=>qn[t];function Jn(t,e){let n=_n(t);return n!==Xn&&(n=Pt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Qn=new Set(["auto","none","0"]);class ts extends rn{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),Q(s))){const i=Dn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Wn.has(n)||2!==t.length)return;const[s,i]=t,r=Kn(s),o=Kn(i);if(r!==o)if(He(r)&&He(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else qe[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||$n(t[e]))&&n.push(e);n.length&&function(t,e,n){let s,i=0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Qn.has(e)&&St(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Jn(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const i=n.length-1,r=n[i];n[i]=qe[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const es=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function ns(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&es.has(e)&&(t[n]=t[n]+"px")}const ss=u(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),is=new Set(["opacity","clipPath","filter","transform"]);function rs(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function os(t){return(e,n)=>{const s=rs(e),i=[];for(const e of s){const s=t(e,n);i.push(s)}return()=>{for(const t of i)t()}}}const as=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ls{constructor(){this.latest={},this.values=new Map}set(t,e,n,s,i=!0){const r=this.values.get(t);r&&r.onRemove();const o=()=>{const s=e.get();this.latest[t]=i?as(s,Zn[t]):s,n&&$.render(n)};o();const a=e.on("change",o);s&&e.addDependent(s);const l=()=>{a(),n&&U(n),this.values.delete(t),s&&e.removeDependent(s)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function us(t){const e=new WeakMap,n=[];return(s,i)=>{const r=e.get(s)??new ls;e.set(s,r);for(const e in i){const o=i[e],a=t(s,r,e,o);n.push(a)}return()=>{for(const t of n)t()}}}const cs=(t,e,n,s)=>{const i=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),r=i?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const o=i?()=>{t[r]=e.latest[n]}:()=>{const s=e.latest[n];null==s?t.removeAttribute(r):t.setAttribute(r,String(s))};return e.set(n,s,o)},hs=os(us(cs)),ds=us((t,e,n,s)=>e.set(n,s,()=>{t[n]=e.latest[n]},void 0,!1));function ps(t){return a(t)&&"offsetHeight"in t}const fs={current:void 0};class ms{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new f);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return fs.current&&fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 gs(t,e){return new ms(t,e)}const ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const vs=new Set(["originX","originY","originZ"]),ws=(t,e,n,s)=>{let i,r;return Xe.has(n)?(e.get("transform")||(ps(t)||e.get("transformBox")||ws(t,e,"transformBox",new ms("fill-box")),e.set("transform",new ms("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let s=0;s<ze.length;s++){const i=ze[s],r=t.latest[i];if(void 0===r)continue;let o=!0;o="number"==typeof r?r===(i.startsWith("scale")?1:0):0===parseFloat(r),o||(n=!1,e+=`${ys[i]||i}(${t.latest[i]}) `)}return n?"none":e.trim()}(e)})),r=e.get("transform")):vs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ms(""),()=>{const n=e.latest.originX??"50%",s=e.latest.originY??"50%",i=e.latest.originZ??0;t.style.transformOrigin=`${n} ${s} ${i}`}),r=e.get("transformOrigin")):i=on(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,s,i,r)},bs=os(us(ws)),Ts=mt.transform;const xs=os(us((t,e,n,s)=>{if(n.startsWith("path"))return function(t,e,n,s){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,s,()=>t.setAttribute("stroke-dashoffset",Ts(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ms("1 1"),()=>{const{pathLength:n=1,pathSpacing:s}=e.latest;t.setAttribute("stroke-dasharray",`${Ts(n)} ${Ts(s??1-Number(n))}`)}),e.set(n,s,void 0,e.get("stroke-dasharray")))}(t,e,n,s);if(n.startsWith("attr"))return cs(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),s);return(n in t.style?ws:cs)(t,e,n,s)}));const{schedule:Vs,cancel:Ms}=K(queueMicrotask,!1),Ss={x:!1,y:!1};function As(){return Ss.x||Ss.y}function ks(t,e){const n=rs(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function Es(t){return!("touch"===t.pointerType||As())}const Ps=(t,e)=>!!e&&(t===e||Ps(t,e.parentElement)),Cs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Os=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Fs=new WeakSet;function Rs(t){return e=>{"Enter"===e.key&&t(e)}}function Bs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ls(t){return Cs(t)&&!As()}function Ds(t,e){const n=window.getComputedStyle(t);return on(e)?n.getPropertyValue(e):n[e]}function Is(t){return a(t)&&"ownerSVGElement"in t}const Ws=new WeakMap;let js;const Ns=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Is(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ks=Ns("inline","width","offsetWidth"),$s=Ns("block","height","offsetHeight");function Us({target:t,borderBoxSize:e}){Ws.get(t)?.forEach(n=>{n(t,{get width(){return Ks(t,e)},get height(){return $s(t,e)}})})}function Ys(t){t.forEach(Us)}function zs(t,e){js||"undefined"!=typeof ResizeObserver&&(js=new ResizeObserver(Ys));const n=rs(t);return n.forEach(t=>{let n=Ws.get(t);n||(n=new Set,Ws.set(t,n)),n.add(e),js?.observe(t)}),()=>{n.forEach(t=>{const n=Ws.get(t);n?.delete(e),n?.size||js?.unobserve(t)})}}const Xs=new Set;let Hs;function Gs(t){return Xs.add(t),Hs||(Hs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xs.forEach(e=>e(t))},window.addEventListener("resize",Hs)),()=>{Xs.delete(t),Xs.size||"function"!=typeof Hs||(window.removeEventListener("resize",Hs),Hs=void 0)}}function Zs(t,e){return"function"==typeof t?Gs(t):zs(t,e)}function qs(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return $.preUpdate(s,!0),()=>U(s)}function _s(){const{value:t}=N;null!==t?(t.frameloop.rate.push(Y.delta),t.animations.mainThread.push(Z.mainThread),t.animations.waapi.push(Z.waapi),t.animations.layout.push(Z.layout)):U(_s)}function Js(t){return t.reduce((t,e)=>t+e,0)/t.length}function Qs(t,e=Js){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ti=t=>Math.round(1e3/t);function ei(){N.value=null,N.addProjectionMetrics=null}function ni(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");ei(),U(_s);const e={frameloop:{setup:Qs(t.frameloop.setup),rate:Qs(t.frameloop.rate),read:Qs(t.frameloop.read),resolveKeyframes:Qs(t.frameloop.resolveKeyframes),preUpdate:Qs(t.frameloop.preUpdate),update:Qs(t.frameloop.update),preRender:Qs(t.frameloop.preRender),render:Qs(t.frameloop.render),postRender:Qs(t.frameloop.postRender)},animations:{mainThread:Qs(t.animations.mainThread),waapi:Qs(t.animations.waapi),layout:Qs(t.animations.layout)},layoutProjection:{nodes:Qs(t.layoutProjection.nodes),calculatedTargetDeltas:Qs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Qs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ti(n.min),n.max=ti(n.max),n.avg=ti(n.avg),[n.min,n.max]=[n.max,n.min],e}function si(t){return Is(t)&&"svg"===t.tagName}function ii(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function ri(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=be(t[1+n],t[2+n],t[3+n]);return e?i(s):i}function oi(t){const e=[];fs.current=e;const n=t();fs.current=void 0;const s=gs(n);return function(t,e,n){const s=()=>e.set(n()),i=()=>$.preRender(s,!1,!0),r=t.map(t=>t.on("change",i));e.on("destroy",()=>{r.forEach(t=>t()),U(s)})}(e,s,t),s}const ai=t=>Boolean(t&&t.getVelocity);function li(t,e,n){const s=t.get();let i,r=null,o=s;const a="string"==typeof s?s.replace(/[\d.-]/g,""):void 0,l=()=>{r&&(r.stop(),r=null)},u=()=>{l(),r=new Fe({keyframes:[ci(t.get()),ci(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:i})};if(t.attach((e,n)=>(o=e,i=t=>n(ui(t,a)),$.postRender(u),t.get()),l),ai(e)){const n=e.on("change",e=>t.set(ui(e,a))),s=t.on("destroy",n);return()=>{n(),s()}}return l}function ui(t,e){return e?t+e:t}function ci(t){return"number"==typeof t?t:parseFloat(t)}const hi=[...Nn,bt,Pt],di=t=>hi.find(jn(t));function pi(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let fi={},mi=null;const gi=(t,e)=>{fi[t]=e},yi=()=>{mi||(mi=document.createElement("style"),mi.id="motion-view");let t="";for(const e in fi){const n=fi[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}mi.textContent=t,document.head.appendChild(mi),fi={}},vi=()=>{mi&&mi.parentElement&&mi.parentElement.removeChild(mi)};function wi(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function bi(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Ti(){return document.getAnimations().filter(bi)}const xi=["layout","enter","exit","new","old"];function Vi(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new En([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||gi(":root",{"view-transition-name":"none"}),gi("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),yi();const i=document.startViewTransition(async()=>{await e()});return i.finished.finally(()=>{vi()}),new Promise(t=>{i.ready.then(()=>{const e=Ti(),i=[];n.forEach((t,e)=>{for(const n of xi){if(!t[n])continue;const{keyframes:r,options:o}=t[n];for(let[t,a]of Object.entries(r)){if(!a)continue;const r={...In(s,t),...In(o,t)},l=pi(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=m(r.duration)),r.delay&&(r.delay=m(r.delay));const u=new vn({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});i.push(u)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:r}=e;if(!r)continue;const o=wi(r);if(!o)continue;const a=n.get(o.layer);if(a)Mi(a,"enter")&&Mi(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?i.push(new Cn(t)):t.cancel();else{const n="group"===o.type?"layout":"";let r={...In(s,n)};r.duration&&(r.duration=m(r.duration)),r=yn(r);const a=fn(r.ease,r.duration);e.updateTiming({delay:m(r.delay??0),duration:r.duration,easing:a}),i.push(new Cn(t))}}t(new En(i))})})}function Mi(t,e){return t?.[e]?.keyframes.opacity}let Si=[],Ai=null;function ki(){Ai=null;const[t]=Si;var e;t&&(n(Si,e=t),Ai=e,Vi(e).then(t=>{e.notifyReady(t),t.finished.finally(ki)}))}function Ei(){for(let t=Si.length-1;t>=0;t--){const e=Si[t],{interrupt:n}=e.options;if("immediate"===n){const n=Si.slice(0,t+1).map(t=>t.update),s=Si.slice(t+1);e.update=()=>{n.forEach(t=>t())},Si=[e,...s];break}}Ai&&"immediate"!==Si[0]?.options.interrupt||ki()}class Pi{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Si.push(n),Vs.render(Ei)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:s,targets:i}=this;i.has(s)||i.set(s,{});i.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Ci=$,Oi=j.reduce((t,e)=>(t[e]=t=>U(t),t),{});function Fi(t){return"object"==typeof t&&!Array.isArray(t)}function Ri(t,e,n,s){return"string"==typeof t&&Fi(e)?rs(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Bi(t,e,n){return t*(e+1)}function Li(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Di(t,e,s,i,r,o){!function(t,e,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>e&&r.at<s&&(n(t,r),i--)}}(t,r,o);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Rt(r,o,i[n]),easing:L(s,n)})}function Ii(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Wi(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ji(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ni(t,e){return e[t]||(e[t]=[]),e[t]}function Ki(t){return Array.isArray(t)?t:[t]}function $i(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Ui=t=>"number"==typeof t,Yi=t=>t.every(Ui),zi=new WeakMap;function Xi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Hi(t,e,n,s){if("function"==typeof e){const[i,r]=Xi(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=Xi(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Gi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gs(n))}function Zi(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function qi(t,e){const n=function(t,e,n){const s=t.getProps();return Hi(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Gi(t,e,Zi(r[e]))}}function _i(t,e){const n=t.getValue("willChange");if(s=n,Boolean(ai(s)&&s.add))return n.add(e);if(!n&&r.WillChange){const n=new r.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const Ji=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qi="data-"+Ji("framerAppearId");function tr(t){return t.props[Qi]}const er=t=>null!==t;const nr={type:"spring",stiffness:500,damping:25,restSpeed:10},sr={type:"keyframes",duration:.8},ir={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rr=(t,{keyframes:e})=>e.length>2?sr:Xe.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:nr:ir;const or=(t,e,n,s={},i,o)=>a=>{const l=In(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=m(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({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})(l)||Object.assign(h,rr(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Vn(h),0===h.delay&&(d=!0)),(r.instantAnimations||r.skipAnimations)&&(d=!0,Vn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(er),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Fe(h):new kn(h)};function ar({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function lr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),i=a[e];if(void 0===i||u&&ar(u,e))continue;const o={delay:n,...In(r||{},e)},c=s.get();if(void 0!==c&&!s.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=tr(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,h=!0)}}_i(t,e),s.start(or(e,s,i,t.shouldReduceMotion&&Wn.has(e)?{type:!1}:o,t,h));const d=s.animation;d&&l.push(d)}return o&&Promise.all(l).then(()=>{$.update(()=>{o&&qi(t,o)})}),l}const ur={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"]},cr={};for(const t in ur)cr[t]={isEnabled:e=>ur[t].some(t=>!!e[t])};const hr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),dr="undefined"!=typeof window,pr={current:null},fr={current:!1};const mr=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function gr(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||mr.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const yr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class vr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=gr(e),this.isVariantNode=function(t){return Boolean(gr(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ai(e)&&e.set(a[t])}}mount(t){this.current=t,zi.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),fr.current||function(){if(fr.current=!0,dr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pr.current=t.matches;t.addEventListener("change",e),e()}else pr.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||pr.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xe.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in cr){const e=cr[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<yr.length;e++){const n=yr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const i=e[s],r=n[s];if(ai(i))t.addValue(s,i);else if(ai(r))t.addValue(s,gs(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,gs(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=gs(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(o(n)||l(n))?n=parseFloat(n):!di(n)&&Pt.test(e)&&(n=Jn(t,e)),this.setBaseTarget(t,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=Hi(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||ai(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new f),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Vs.render(this.render)}}class wr extends vr{constructor(){super(...arguments),this.KeyframeResolver=ts}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const br={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tr=ze.length;function xr(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Xe.has(t))o=!0;else if(_(t))i[t]=n;else{const e=as(n,Zn[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<Tr;r++){const o=ze[r],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=as(a,Zn[o]);l||(i=!1,s+=`${br[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}function Vr(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];for(o in i?.applyProjectionStyles(r,s),n)r.setProperty(o,n[o])}const Mr={};function Sr(t,{layout:e,layoutId:n}){return Xe.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Mr[t]||"opacity"===t)}function Ar(t,e,n){const{style:s}=t,i={};for(const r in s)(ai(s[r])||e.style&&ai(e.style[r])||Sr(r,t)||void 0!==n?.getValue(r)?.liveStyle)&&(i[r]=s[r]);return i}class kr extends wr{constructor(){super(...arguments),this.type="html",this.renderInstance=Vr}readValueFromInstance(t,e){if(Xe.has(e))return this.projection?.isProjecting?Ke(e):Ue(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(_(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(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}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){xr(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Ar(t,e,n)}}class Er extends vr{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Pr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Cr={offset:"strokeDashoffset",array:"strokeDasharray"};function Or(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(xr(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==s&&(h.scale=s),void 0!==i&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Pr:Cr;t[r.offset]=mt.transform(-s);const o=mt.transform(e),a=mt.transform(n);t[r.array]=`${o} ${a}`}(h,i,r,o,!1)}const Fr=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"]);class Rr extends wr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Xe.has(e)){const t=_n(e);return t&&t.default||0}return e=Fr.has(e)?e:Ji(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Ar(t,e,n);for(const n in t)(ai(t[n])||ai(e[n]))&&(s[-1!==ze.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}build(t,e,n){Or(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,s){!function(t,e,n,s){Vr(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Fr.has(n)?n:Ji(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}function Br(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Is(t)&&!si(t)?new Rr(e):new kr(e);n.mount(t),zi.set(t,n)}function Lr(t){const e=new Er({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),zi.set(t,e)}function Dr(t,e,n,s){const i=[];if(function(t,e){return ai(t)||"number"==typeof t||"string"==typeof t&&!Fi(e)}(t,e))i.push(function(t,e,n){const s=ai(t)?t:gs(t);return s.start(or("",s,e,n)),s.animation}(t,Fi(e)&&e.default||e,n&&n.default||n));else{const r=Ri(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Br:Lr;zi.has(s)||a(s);const l=zi.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...lr(l,{...e,transition:u},{}))}}return i}function Ir(t,e,n){const s=[],i=function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,l={},u=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){u.set(o,h);continue}if(!Array.isArray(o)){u.set(o.name,Li(h,o.at,c,u));continue}let[p,f,g={}]=o;void 0!==g.at&&(h=Li(h,g.at,c,u));let y=0;const v=(t,n,s,o=0,a=0)=>{const l=Ki(t),{delay:u=0,times:c=xe(l),type:p="keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof u?u(o,a):u,V=l.length,M=gn(p)?p:i?.[p||"keyframes"];if(V<=2&&M){let t=100;if(2===V&&Yi(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=m(T));const n=qt(e,t,M);b=n.ease,T=n.duration}T??(T=r);const S=h+x;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-l.length;if(A>0&&Te(c,A),1===l.length&&l.unshift(null),f){T=Bi(T,f);const t=[...l],e=[...c];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<f;s++){l.push(...t);for(let i=0;i<t.length;i++)c.push(e[i]+(s+1)),b.push(0===i?"linear":L(n,i-1))}Ii(c,f)}const k=S+T;Di(s,l,b,c,S,k),y=Math.max(x+T,y),d=Math.max(k,d)};if(ai(p))v(f,g,Ni("default",ji(p,a)));else{const t=Ri(p,f,s,l),e=t.length;for(let n=0;n<e;n++){const s=ji(t[n],a);for(const t in f)v(f[t],$i(g,t),Ni(t,s),n,e)}}c=h,h+=y}return a.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Wi);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(p(0,d,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[i]=a,c.transition[i]={...e,duration:d,ease:u,times:l,...n}}}),o}(t,e,n,{spring:ve});return i.forEach(({keyframes:t,transition:e},n)=>{s.push(...Dr(n,t,e))}),s}function Wr(t){return function(e,s,i){let r=[];var o;o=e,r=Array.isArray(o)&&o.some(Array.isArray)?Ir(e,s,t):Dr(e,s,i,t);const a=new Pn(r);return t&&(t.animations.push(a),a.finished.then(()=>{n(t.animations,a)})),a}}const jr=Wr();const Nr=t=>function(e,n,s){return new Pn(function(t,e,n,s){const i=rs(t,s),r=i.length,o=[];for(let t=0;t<r;t++){const s=i[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,r));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const i={...In(a,t)};i.duration&&(i.duration=m(i.duration)),i.delay&&(i.delay=m(i.delay));const r=Rn(s),l=Fn(t,i.pseudoElement||""),u=r.get(l);u&&u.stop(),o.push({map:r,key:l,unresolvedKeyframes:n,options:{...i,element:s,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<o.length;t++){const{unresolvedKeyframes:e,options:n}=o[t],{element:s,name:i,pseudoElement:r}=n;r||null!==e[0]||(e[0]=Ds(s,i)),Re(e),ns(e,i),!r&&e.length<2&&e.unshift(Ds(s,i)),n.keyframes=e}const a=[];for(let t=0;t<o.length;t++){const{map:e,key:n,options:s}=o[t],i=new vn(s);e.set(n,i),i.finished.finally(()=>e.delete(n)),a.push(i)}return a}(e,n,s,t))},Kr=Nr(),$r={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ur(t,e,n,s){const i=n[e],{length:r,position:o}=$r[e],a=i.current,l=n.time;i.current=t[`scroll${o}`],i.scrollLength=t[`scroll${r}`]-t[`client${r}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=p(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>50?0:y(i.current-a,u)}const Yr={start:0,center:.5,end:1};function zr(t,e,n=0){let s=0;if(t in Yr&&(t=Yr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Xr=[0,0];function Hr(t,e,n,s){let i=Array.isArray(t)?t:Xr,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Yr[t]?t:"0"]),r=zr(i[0],n,s),o=zr(i[1],e),r-o}const Gr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Zr={x:0,y:0};function qr(t,e,n){const{offset:i=Gr.All}=n,{target:r=t,axis:o="y"}=n,a="y"===o?"height":"width",l=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(ps(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(r,t):Zr,u=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const d=i.length;for(let t=0;t<d;t++){const n=Hr(i[t],c[a],u[a],l[o]);h||n===e[o].interpolatorOffsets[t]||(h=!0),e[o].offset[t]=n}h&&(e[o].interpolate=be(e[o].offset,xe(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=s(0,1,e[o].interpolate(e[o].current))}function _r(t,e,n,s={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),function(t,e,n){Ur(t,"x",e,n),Ur(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&qr(t,n,s)},notify:()=>e(n)}}const Jr=new WeakMap,Qr=new WeakMap,to=new WeakMap,eo=t=>t===document.scrollingElement?window:t;function no(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let s=to.get(e);s||(s=new Set,to.set(e,s));const i=_r(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!Jr.has(e)){const t=()=>{for(const t of s)t.measure(Y.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>$.read(t);Jr.set(e,i);const r=eo(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&Qr.set(e,Zs(e,i)),r.addEventListener("scroll",i,{passive:!0}),i()}const r=Jr.get(e);return $.read(r,!1,!0),()=>{U(r);const t=to.get(e);if(!t)return;if(t.delete(i),t.size)return;const n=Jr.get(e);Jr.delete(e),n&&(eo(e).removeEventListener("scroll",n),Qr.get(e)?.(),window.removeEventListener("resize",n))}}const so=new Map;function io({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=so.get(e)??new Map;so.set(e,i);const r=n.target??"self",o=i.get(r)??{},a=s+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&ln()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=no(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),o[a]}const ro={some:0,all:1};const oo=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=ts,t.GroupAnimation=En,t.GroupAnimationWithThen=Pn,t.JSAnimation=Fe,t.KeyframeResolver=rn,t.MotionGlobalConfig=r,t.MotionValue=ms,t.NativeAnimation=vn,t.NativeAnimationExtended=Tn,t.NativeAnimationWrapper=Cn,t.SubscriptionManager=f,t.ViewTransitionBuilder=Pi,t.acceleratedValues=is,t.activeAnimations=Z,t.addAttrValue=cs,t.addStyleValue=ws,t.addUniqueItem=e,t.alpha=nt,t.analyseComplexValue=St,t.animate=jr,t.animateMini=Kr,t.animateValue=function(t){return new Fe(t)},t.animateView=function(t,e={}){return new Pi(t,e)},t.animationMapKey=Fn,t.anticipate=k,t.applyGeneratorOptions=yn,t.applyPxDefaults=ns,t.attachSpring=li,t.attrEffect=hs,t.backIn=S,t.backInOut=A,t.backOut=M,t.calcGeneratorDuration=Zt,t.cancelFrame=U,t.cancelMicrotask=Ms,t.cancelSync=Oi,t.circIn=E,t.circInOut=C,t.circOut=P,t.clamp=s,t.collectMotionValues=fs,t.color=bt,t.complex=Pt,t.convertOffsetToTimes=Ve,t.createGeneratorEasing=qt,t.createRenderBatcher=K,t.createScopedAnimate=Wr,t.cubicBezier=T,t.cubicBezierAsString=dn,t.defaultEasing=Me,t.defaultOffset=xe,t.defaultTransformValue=Ke,t.defaultValueTypes=qn,t.degrees=pt,t.delay=function(t,e){return function(t,e){const n=G.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(U(s),t(r-e))};return $.setup(s,!0),()=>U(s)}(t,m(e))},t.dimensionValueTypes=Nn,t.distance=oo,t.distance2D=function(t,e){const n=oo(t.x,e.x),s=oo(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=O,t.easeInOut=R,t.easeOut=F,t.easingDefinitionToFunction=W,t.fillOffset=Te,t.fillWildcards=Re,t.findDimensionValueType=Kn,t.findValueType=di,t.flushKeyframeResolvers=sn,t.frame=$,t.frameData=Y,t.frameSteps=z,t.generateLinearEasing=Ht,t.getAnimatableNone=Jn,t.getAnimationMap=Rn,t.getComputedStyle=Ds,t.getDefaultValueType=_n,t.getEasingForSegment=L,t.getMixer=Kt,t.getOriginIndex=ii,t.getValueAsType=as,t.getValueTransition=In,t.getVariableValue=Dn,t.getViewAnimationLayerInfo=wi,t.getViewAnimations=Ti,t.hasWarned=function(t){return v.has(t)},t.hex=ht,t.hover=function(t,e,n={}){const[s,i,r]=ks(t,n),o=t=>{if(!Es(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{Es(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.hsla=wt,t.hslaToRgba=Ot,t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=rs(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:ro[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=we,t.interpolate=be,t.invariant=i,t.invisibleValues=Wt,t.isBezierDefinition=D,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDragActive=As,t.isDragging=Ss,t.isEasingArray=B,t.isGenerator=gn,t.isHTMLElement=ps,t.isMotionValue=ai,t.isNodeOrChild=Ps,t.isNumericalString=o,t.isObject=a,t.isPrimaryPointer=Cs,t.isSVGElement=Is,t.isSVGSVGElement=si,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&hn()||!e||"string"==typeof e&&(e in pn||hn())||D(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=l,t.keyframes=Se,t.makeAnimationInstant=Vn,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,s){const i=ri(e,n,s);return oi(()=>i(t.get()))},t.maxGeneratorDuration=Gt,t.memo=u,t.microtask=Vs,t.millisecondsToSeconds=g,t.mirrorEasing=x,t.mix=zt,t.mixArray=$t,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Ft,t.mixLinearColor=Bt,t.mixNumber=Rt,t.mixObject=Ut,t.mixVisibility=jt,t.motionValue=gs,t.moveItem=function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t},t.noop=c,t.number=et,t.numberValueTypes=Zn,t.observeTimeline=qs,t.parseCSSVariable=Ln,t.parseValueFromTransform=$e,t.percent=ft,t.pipe=d,t.positionalKeys=Wn,t.press=function(t,e,n={}){const[s,i,r]=ks(t,n),o=t=>{const s=t.currentTarget;if(!Ls(t))return;Fs.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Fs.has(s)&&Fs.delete(s),Ls(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Ps(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),ps(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Rs(()=>{if(Fs.has(n))return;Bs(n,"down");const t=Rs(()=>{Bs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bs(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,Os.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r},t.progress=p,t.progressPercentage=vt,t.propEffect=ds,t.px=mt,t.readTransformValue=Ue,t.recordStats=function(){if(N.value)throw ei(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(_s,!0),ni},t.removeItem=n,t.resize=Zs,t.resolveElements=rs,t.reverseEasing=V,t.rgbUnit=ut,t.rgba=ct,t.scale=st,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return c;const i={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?no(n=>{t(n[e.axis].progress,n)},e):qs(t,io(e))}(t,i):function(t,e){const n=io(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),qs(e=>{t.time=t.duration*e},n))})}(t,i)},t.scrollInfo=no,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?Ss[t]?null:(Ss[t]=!0,()=>{Ss[t]=!1}):Ss.x||Ss.y?null:(Ss.x=Ss.y=!0,()=>{Ss.x=Ss.y=!1})},t.setStyle=an,t.spring=ve,t.springValue=function(t,e){const n=gs(ai(t)?t.get():t);return li(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:ii(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=W(s)(l/e)*e}return e+l}},t.startWaapiAnimation=mn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(i):Math.ceil(i);return s(0,1,r/t)}},t.styleEffect=bs,t.supportedWaapiEasing=pn,t.supportsBrowserAnimation=An,t.supportsFlags=un,t.supportsLinearEasing=hn,t.supportsPartialKeyframes=ss,t.supportsScrollTimeline=ln,t.svgEffect=xs,t.sync=Ci,t.testValueType=jn,t.time=G,t.transform=ri,t.transformPropOrder=ze,t.transformProps=Xe,t.transformValue=oi,t.transformValueTypes=Gn,t.velocityPerSecond=y,t.vh=gt,t.vw=yt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),v.add(e))},t.warning=()=>{},t.wrap=w});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n<t?t:n;function s(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}t.warning=()=>{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>"object"==typeof t&&null!==t,l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(...t)=>t.reduce((t,e)=>n=>e(t(n))),d=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const m=t=>1e3*t,f=t=>t/1e3,y=(t,e)=>e?t*(1e3/e):0,g=new Set;function v(t,e,n){t||g.has(e)||(console.warn(s(e,n)),g.add(e))}const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},w=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=w(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:w(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=T(.33,1.53,.69,.99),V=S(A),P=b(V),M=t=>t>=1?1:(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=S(E),D=b(E),C=T(.42,0,1,1),B=T(0,0,.58,1),R=T(.42,0,.58,1);const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function j(t,e){return L(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:C,easeInOut:R,easeOut:B,circIn:E,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:M},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return T(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},$=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function N(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=$.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,s=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(r)}const l={schedule:(t,s=!1,r=!1)=>{const a=r&&i?e:n;return s&&o.add(t),a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{if(r=t,i)return void(s=!0);i=!0;const o=e;e=n,n=o,e.forEach(a),e.clear(),i=!1,s&&(s=!1,l.process(t))}};return l}(r),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming,a=r?s.timestamp:performance.now();n=!1,r||(s.delta=i?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:$.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e<$.length;e++)a[$[e]].cancel(t)},state:s,steps:a}}const{schedule:W,cancel:U,state:z,steps:K}=N("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:u,!0);let Y;function X(){Y=void 0}const G={now:()=>(void 0===Y&&G.set(z.isProcessing||o.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(X)}},H=t=>e=>"string"==typeof e&&e.startsWith(t),q=H("--"),Z=H("var(--"),_=t=>!!Z(t)&&J.test(t.split("/*")[0].trim()),J=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Q(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et={...tt,transform:t=>i(0,1,t)},nt={...tt,default:1},it=t=>Math.round(1e5*t)/1e5,st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rt=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),at=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(st);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},lt={...tt,transform:t=>Math.round((t=>i(0,255,t))(t))},ct={test:rt("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+lt.transform(t)+", "+lt.transform(e)+", "+lt.transform(n)+", "+it(et.transform(i))+")"};const ut={test:rt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ct.transform},ht=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),mt=ht("px"),ft=ht("vh"),yt=ht("vw"),gt=(()=>({...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}))(),vt={test:rt("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+pt.transform(it(e))+", "+pt.transform(it(n))+", "+it(et.transform(i))+")"},xt={test:t=>ct.test(t)||ut.test(t)||vt.test(t),parse:t=>ct.test(t)?ct.parse(t):vt.test(t)?vt.parse(t):ut.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):vt.transform(t),getAnimatableNone:t=>{const e=xt.parse(t);return e.alpha=0,xt.transform(e)}},wt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Tt="number",bt="color",St=/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 At(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(St,t=>(xt.test(t)?(i.color.push(o),s.push(bt),n.push(xt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Tt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Vt({split:t,types:e}){const n=t.length;return i=>{let s="";for(let o=0;o<n;o++)if(s+=t[o],void 0!==i[o]){const t=e[o];s+=t===Tt?it(i[o]):t===bt?xt.transform(i[o]):i[o]}return s}}const Pt=(t,e)=>{return"number"==typeof t?e?.trim().endsWith("/")?t:0:"number"==typeof(n=t)?0:xt.test(n)?xt.getAnimatableNone(n):n;var n};const Mt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(st)?.length||0)+(t.match(wt)?.length||0)>0},parse:function(t){return At(t).values},createTransformer:function(t){return Vt(At(t))},getAnimatableNone:function(t){const e=At(t);return Vt(e)(e.values.map((t,n)=>Pt(t,e.split[n])))}};function Et(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function kt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Et(a,i,t+1/3),o=Et(a,i,t),r=Et(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Dt(t,e){return n=>n>0?e:t}const Ct=(t,e,n)=>t+(e-t)*n,Bt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Rt=[ut,ct,vt];function Lt(e){const n=(i=e,Rt.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===vt&&(s=kt(s)),s}const jt=(t,e)=>{const n=Lt(t),i=Lt(e);if(!n||!i)return Dt(t,e);const s={...n};return t=>(s.red=Bt(n.red,i.red,t),s.green=Bt(n.green,i.green,t),s.blue=Bt(n.blue,i.blue,t),s.alpha=Ct(n.alpha,i.alpha,t),ct.transform(s))},Ot=new Set(["none","hidden"]);function Ft(t,e){return Ot.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function It(t,e){return n=>Ct(t,e,n)}function $t(t){return"number"==typeof t?It:"string"==typeof t?_(t)?Dt:xt.test(t)?jt:Ut:Array.isArray(t)?Nt:"object"==typeof t?xt.test(t)?jt:Wt:Dt}function Nt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Wt(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=$t(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Ut=(e,n)=>{const i=Mt.createTransformer(n),s=At(e),o=At(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Ot.has(e)&&!o.values.length||Ot.has(n)&&!s.values.length?Ft(e,n):h(Nt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(t.warning(!0,`Complex values '${e}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Dt(e,n))};function zt(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ct(t,e,n);return $t(t)(t,e)}const Kt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>W.update(e,t),stop:()=>U(e),now:()=>z.isProcessing?z.timestamp:G.now()}},Yt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Xt=2e4;function Gt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Xt;)e+=50,n=t.next(e);return e>=Xt?1/0:e}function Ht(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Gt(i),Xt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:f(s)}}const qt=100,Zt=10,_t=1,Jt=0,Qt=800,te=.3,ee=.3,ne={granular:.01,default:2},ie={granular:.005,default:.5},se=.01,oe=10,re=.05,ae=1;function le(t,e){return t*Math.sqrt(1-e*e)}const ce=.001;const ue=["duration","bounce"],he=["stiffness","damping","mass"];function de(t,e){return e.some(e=>void 0!==t[e])}function pe(e){let n={velocity:Jt,stiffness:qt,damping:Zt,mass:_t,isResolvedFromDuration:!1,...e};if(!de(e,he)&&de(e,ue))if(n.velocity=0,e.visualDuration){const t=e.visualDuration,s=2*Math.PI/(1.2*t),o=s*s,r=2*i(.05,1,1-(e.bounce||0))*Math.sqrt(o);n={...n,mass:_t,stiffness:o,damping:r}}else{const s=function({duration:e=Qt,bounce:n=te,velocity:s=Jt,mass:o=_t}){let r,a;t.warning(e<=m(oe),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(re,ae,l),e=i(se,oe,f(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=le(t,l),a=Math.exp(-i);return ce-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=le(Math.pow(t,2),l);return(-r(t)+ce>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(r,a,5/e);if(e=m(e),isNaN(c))return{stiffness:qt,damping:Zt,duration:e};{const t=Math.pow(c,2)*o;return{stiffness:t,damping:2*l*Math.sqrt(o*t),duration:e}}}({...e,velocity:0});n={...n,...s,mass:_t},n.isResolvedFromDuration=!0}return n}function me(t=ee,e=te){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=pe({...n,velocity:-f(n.velocity||0)}),y=d||0,g=c/(2*Math.sqrt(l*u)),v=r-o,x=f(Math.sqrt(l/u)),w=Math.abs(v)<5;let T,b,S,A,V,P;if(i||(i=w?ne.granular:ne.default),s||(s=w?ie.granular:ie.default),g<1)S=le(x,g),A=(y+g*x*v)/S,T=t=>{const e=Math.exp(-g*x*t);return r-e*(A*Math.sin(S*t)+v*Math.cos(S*t))},V=g*x*A+v*S,P=g*x*v-A*S,b=t=>Math.exp(-g*x*t)*(V*Math.sin(S*t)+P*Math.cos(S*t));else if(1===g){T=t=>r-Math.exp(-x*t)*(v+(y+x*v)*t);const t=y+x*v;b=e=>Math.exp(-x*e)*(x*t*e-y)}else{const t=x*Math.sqrt(g*g-1);T=e=>{const n=Math.exp(-g*x*e),i=Math.min(t*e,300);return r-n*((y+g*x*v)*Math.sinh(i)+t*v*Math.cosh(i))/t};const e=(y+g*x*v)/t,n=g*x*e-v*t,i=g*x*v-e*t;b=e=>{const s=Math.exp(-g*x*e),o=Math.min(t*e,300);return s*(n*Math.sinh(o)+i*Math.cosh(o))}}const M={calculatedDuration:p&&h||null,velocity:t=>m(b(t)),next:t=>{if(!p&&g<1){const e=Math.exp(-g*x*t),n=Math.sin(S*t),o=Math.cos(S*t),l=r-e*(A*n+v*o),c=m(e*(V*n+P*o));return a.done=Math.abs(c)<=i&&Math.abs(r-l)<=s,a.value=a.done?r:l,a}const e=T(t);if(p)a.done=t>=h;else{const n=m(b(t));a.done=Math.abs(n)<=i&&Math.abs(r-e)<=s}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(Gt(M),Xt),e=Yt(e=>M.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return M}me.applyToOptions=t=>{const e=Ht(t,100,me);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};function fe(t,e,n){const i=Math.max(e-5,0);return y(n-t(i),e-i)}function ye({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let w,T;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,T=me({keyframes:[d.value,p(d.value)],velocity:fe(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),b(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&x(t),d)}}}function ge(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const p=function(t,e,n){const i=[],s=n||o.mix||zt,r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||u:e;o=h(t,o)}i.push(o)}return i}(n,r,a),m=p.length,f=t=>{if(c&&t<e[0])return n[0];let i=0;if(m>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=d(e[i],e[i+1],t);return p[i](s)};return s?t=>f(i(e[0],e[l-1],t)):f}function ve(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=d(0,e,i);t.push(Ct(n,1,s))}}function xe(t){const e=[0];return ve(e,t.length-1),e}function we(t,e){return t.map(t=>t*e)}function Te(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function be({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=L(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=ge(we(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(s)?s:Te(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const Se=t=>null!==t;function Ae(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Se),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ve={decay:ye,inertia:ye,tween:be,keyframes:be,spring:me};function Pe(t){"string"==typeof t.type&&(t.type=Ve[t.type])}class Me{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ee=t=>t/100;class ke extends Me{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=be,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||be;a!==be&&"number"!=typeof r[0]&&(this.mixKeyframes=h(Ee,zt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Gt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x,w=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),w=i(0,1,n)*a}v?(this.delayState.value=u[0],x=this.delayState):x=T.next(w),o&&!v&&(x.value=o(x.value));let{done:b}=x;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==ye&&(x.value=Ae(u,this.options,y,this.speed)),f&&f(x.value),S&&this.finish(),x}then(t,e){return this.finished.then(t,e)}get duration(){return f(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);return fe(t=>this.generator.next(t).value,t,this.generator.next(t).value)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;e&&this.driver&&this.updateTime(G.now()),this.playbackSpeed=t,e&&this.driver&&(this.time=f(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Kt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function De(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ce=t=>180*t/Math.PI,Be=t=>{const e=Ce(Math.atan2(t[1],t[0]));return Le(e)},Re={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Be,rotateZ:Be,skewX:t=>Ce(Math.atan(t[1])),skewY:t=>Ce(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>((t%=360)<0&&(t+=360),t),je=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Oe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Fe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:je,scaleY:Oe,scale:t=>(je(t)+Oe(t))/2,rotateX:t=>Le(Ce(Math.atan2(t[6],t[5]))),rotateY:t=>Le(Ce(Math.atan2(-t[2],t[0]))),rotateZ:Be,rotate:Be,skewX:t=>Ce(Math.atan(t[4])),skewY:t=>Ce(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 $e(t,e){if(!t||"none"===t)return Ie(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Fe,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Re,s=e}if(!s)return Ie(e);const o=i[e],r=s[1].split(",").map(We);return"function"==typeof o?o(r):r[o]}const Ne=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return $e(n,e)};function We(t){return parseFloat(t.trim())}const Ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=(()=>new Set([...Ue,"pathRotation"]))(),Ke=t=>t===tt||t===mt,Ye=new Set(["x","y","z"]),Xe=Ue.filter(t=>!Ye.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return"border-box"===i?s:s-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})=>$e(e,"x"),y:(t,{transform:e})=>$e(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const He=new Set;let qe=!1,Ze=!1,_e=!1;function Je(){if(Ze){const t=Array.from(He).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Xe.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ze=!1,qe=!1,He.forEach(t=>t.complete(_e)),He.clear()}function Qe(){He.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)})}function tn(){_e=!0,Qe(),Je(),_e=!1}class en{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(He.add(this),qe||(qe=!0,W.read(Qe),W.resolveKeyframes(Je))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}De(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),He.delete(this)}cancel(){"scheduled"===this.state&&(He.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const nn=t=>t.startsWith("--");function sn(t,e,n){nn(e)?t.style.setProperty(e,n):t.style[e]=n}const on={};function rn(t,e){const n=c(t);return()=>on[e]??n()}const an=rn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),ln=rn(()=>void 0!==window.ViewTimeline,"viewTimeline"),cn=rn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),un=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:un([0,.65,.55,1]),circOut:un([.55,0,1,.45]),backIn:un([.31,.01,.66,-.59]),backOut:un([.33,1.53,.69,.99])};function dn(t,e){return t?"function"==typeof t?cn()?Yt(t,e):"ease-out":O(t)?un(t):Array.isArray(t)?t.map(t=>dn(t,e)||hn.easeOut):hn[t]:void 0}function pn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=dn(a,s);Array.isArray(h)&&(u.easing=h);const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function mn(t){return"function"==typeof t&&"applyToOptions"in t}function fn({type:t,...e}){return mn(t)&&cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class yn extends Me{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=fn(e);this.animation=pn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ae(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(t),sn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return f(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+f(t)}get time(){return f(Number(this.animation.currentTime)||0)}set time(t){const e=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=m(t),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:e,rangeEnd:n,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&an()?(this.animation.timeline=t,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),u):i(this)}}const gn={anticipate:M,backInOut:P,circInOut:D};function vn(t){"string"==typeof t.ease&&t.ease in gn&&(t.ease=gn[t.ease])}class xn extends yn{constructor(t){vn(t),Pe(t),super(t),void 0!==t.startTime&&!1!==t.autoplay&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new ke({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),c=i(0,10,l-10),u=a.sample(l).value,{name:h}=this.options;o&&h&&sn(o,h,u),e.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const wn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Mt.test(t)&&"0"!==t||t.startsWith("url(")));function Tn(t){t.duration=0,t.type="keyframes"}const bn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Sn=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const An=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Vn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Pn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r,keyframes:a}=t,l=e?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Vn()&&n&&(bn.has(n)||An.has(n)&&function(t){for(let e=0;e<t.length;e++)if("string"==typeof t[e]&&Sn.test(t[e]))return!0;return!1}(a))&&("transform"!==n||!u)&&!c&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Mn extends Me{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||en;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now();let p=!0;(function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=wn(o,n),l=wn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(e)||("spring"===i||mn(i))&&s)})(e,r,a,l)||(p=!1,!o.instantAnimations&&c||d?.(Ae(e,i,n)),e[0]=e[e.length-1],Tn(i),i.repeat=0);const m={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},f=p&&!h&&Pn(m),y=m.motionValue?.owner?.current;let g;if(f)try{g=new xn({...m,element:y})}catch{g=new ke(m)}else g=new ke(m);g.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class En{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return kn(this.animations,"duration")}get iterationDuration(){return kn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function kn(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Dn extends En{then(t,e){return this.finished.finally(t).then(()=>{})}}class Cn extends yn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Bn=new WeakMap,Rn=(t,e="")=>`${t}:${e}`;function Ln(t){let e=Bn.get(t);return e||(e=new Map,Bn.set(t,e)),e}function jn(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const On={current:void 0};class Fn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new p);const n=this.events[t].add(e);return"change"===t?()=>{n(),W.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return On.current&&On.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 In(t,e){return new Fn(t,e)}function $n(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Nn(t,e){const n=t?.[e]??t?.default??t;return n!==t?$n(n,t):n}const Wn={type:"spring",stiffness:500,damping:25,restSpeed:10},Un={type:"keyframes",duration:.8},zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kn=(t,{keyframes:e})=>e.length>2?Un:ze.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Wn:zn,Yn=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Xn(t){for(const e in t)if(!Yn.has(e))return!0;return!1}const Gn=(t,e,n,i={},s,r)=>a=>{const l=Nn(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=m(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Xn(l)||Object.assign(h,Kn(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Tn(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations||l.skipAnimations)&&(d=!0,Tn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Ae(h.keyframes,l);if(void 0!==t)return void W.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new ke(h):new Mn(h)};function Hn(t,e,n,i){const s=1-t;return s*s*e+2*s*t*n+t*t*i}function qn(t,e,n,i,s,o,r){const a=2*(1-t)*(n-e)+2*t*(i-n),l=2*(1-t)*(o-s)+2*t*(r-o);return Math.atan2(l,a)*(180/Math.PI)}function Zn(t,e,n,i,s,o){const r=n-t,a=i-e,l=Math.sqrt(r*r+a*a);if(l>0){const n=s*l;return{x:t+r*o+-a/l*n,y:e+a*o+r/l*n}}return{x:t,y:e}}const _n=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jn(t){const e=_n.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Qn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Jn(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return _(o)?Qn(o,n,i+1):o}function ti(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ei(t,e,n,i){if("function"==typeof e){const[s,o]=ti(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=ti(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function ni(t,e,n){const i=t.getProps();return ei(i,e,void 0!==n?n:i.custom,t)}const ii=new Set(["width","height","top","left","right","bottom",...Ue]),si=t=>Array.isArray(t);function oi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,In(n))}function ri(t){return si(t)?t[t.length-1]||0:t}function ai(t,e){const n=ni(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){oi(t,e,ri(o[e]))}}const li=t=>Boolean(t&&t.getVelocity);function ci(t){return Boolean(li(t)&&t.add)}function ui(t,e){const n=t.getValue("willChange");if(ci(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function hi(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const di="framerAppearId",pi="data-"+hi(di);function mi(t){return t.props[pi]}function fi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function yi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?$n(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;i&&(o=i);const h=[],d=s&&t.animationState&&t.animationState.getState()[s],p=o?.path;p&&p.animateVisualElement(t,a,o,n,h);for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||d&&fi(d,e))continue;const r={delay:n,...Nn(o||{},e)};u&&(r.skipAnimations=!0);const l=i.get();if(void 0!==l&&!i.isAnimating()&&!Array.isArray(s)&&s===l&&!r.velocity){W.update(()=>i.set(s));continue}let p=!1;if(window.MotionHandoffAnimation){const n=mi(t);if(n){const t=window.MotionHandoffAnimation(n,e,W);null!==t&&(r.startTime=t,p=!0)}}ui(t,e);const m=c??t.shouldReduceMotion;i.start(Gn(e,i,s,m&&ii.has(e)?{type:!1}:r,t,p));const f=i.animation;f&&h.push(f)}if(r){const e=()=>W.update(()=>{r&&ai(t,r)});h.length?Promise.all(h).then(e):e()}return h}function gi(t,e,n={}){const i=ni(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(yi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(gi(l,e,{...r,delay:n+("function"==typeof i?0:i)+jn(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function vi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>gi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=gi(t,e,n);else{const s="function"==typeof e?ni(t,e,n.custom):e;i=Promise.all(yi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const xi=t=>e=>e.test(t),wi=[tt,mt,pt,dt,yt,ft,{test:t=>"auto"===t,parse:t=>t}],Ti=t=>wi.find(xi(t));function bi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Si=new Set(["brightness","contrast","saturate","opacity"]);function Ai(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(st)||[];if(!i)return t;const s=n.replace(i,"");let o=Si.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Vi=/\b([a-z-]*)\(.*?\)/gu,Pi={...Mt,getAnimatableNone:t=>{const e=t.match(Vi);return e?e.map(Ai).join(" "):t}},Mi={...Mt,getAnimatableNone:t=>{const e=Mt.parse(t);return Mt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ei={...tt,transform:Math.round},ki={rotate:dt,pathRotation:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:dt,skewX:dt,skewY:dt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:et,originX:gt,originY:gt,originZ:mt},Di={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,inset:mt,insetBlock:mt,insetBlockStart:mt,insetBlockEnd:mt,insetInline:mt,insetInlineStart:mt,insetInlineEnd:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,paddingBlock:mt,paddingBlockStart:mt,paddingBlockEnd:mt,paddingInline:mt,paddingInlineStart:mt,paddingInlineEnd:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,marginBlock:mt,marginBlockStart:mt,marginBlockEnd:mt,marginInline:mt,marginInlineStart:mt,marginInlineEnd:mt,fontSize:mt,backgroundPositionX:mt,backgroundPositionY:mt,...ki,zIndex:Ei,fillOpacity:et,strokeOpacity:et,numOctaves:Ei},Ci={...Di,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Pi,WebkitFilter:Pi,mask:Mi,WebkitMask:Mi},Bi=t=>Ci[t],Ri=new Set([Pi,Mi]);function Li(t,e){let n=Bi(t);return Ri.has(n)||(n=Mt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ji=new Set(["auto","none","0"]);class Oi extends en{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),_(i))){const s=Qn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ii.has(n)||2!==t.length)return;const[i,s]=t,o=Ti(i),r=Ti(s);if(Q(i)!==Q(s)&&Ge[n])this.needsMeasurement=!0;else if(o!==r)if(Ke(o)&&Ke(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else Ge[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||bi(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!ji.has(e)&&At(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Li(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=Ge[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Fi=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],Ii=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius",...Fi,"width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function $i(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Ii.has(e)&&(t[n]=t[n]+"px")}const Ni=c(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0});function Wi(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ui(t){return(e,n)=>{const i=Wi(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const zi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ki{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?zi(i,Di[t]):i,n&&W.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&U(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}}function Yi(t){const e=new WeakMap;return(n,i)=>{const s=e.get(n)??new Ki;e.set(n,s);const o=[];for(const e in i){const r=i[e],a=t(n,s,e,r);o.push(a)}return()=>{for(const t of o)t()}}}const Xi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?hi(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Gi=Ui(Yi(Xi)),Hi=Yi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function qi(t){return a(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const Zi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const _i=new Set(["originX","originY","originZ"]),Ji=(t,e,n,i)=>{let s,o;return ze.has(n)?(e.get("transform")||(qi(t)||e.get("transformBox")||Ji(t,e,"transformBox",new Fn("fill-box")),e.set("transform",new Fn("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<Ue.length;i++){const s=Ue[i],o=t.latest[s];if(void 0===o)continue;let r=!0;if("number"==typeof o)r=o===(s.startsWith("scale")?1:0);else{const t=parseFloat(o);r=s.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${Zi[s]||s}(${o}) `)}const i=t.latest.pathRotation;return i&&(n=!1,e+=`rotate(${"number"==typeof i?`${i}deg`:i}) `),n?"none":e.trim()}(e)})),o=e.get("transform")):_i.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new Fn(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=nn(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Qi=Ui(Yi(Ji));const ts=Ui(Yi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return W.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new Fn("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Xi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Ji:Xi)(t,e,n,i)}));const{schedule:es,cancel:ns}=N(queueMicrotask,!1),is={x:!1,y:!1};function ss(){return is.x||is.y}function os(t,e){const n=Wi(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const rs=(t,e)=>!!e&&(t===e||rs(t,e.parentElement)),as=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ls=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cs(t){return ls.has(t.tagName)||!0===t.isContentEditable}const us=new Set(["INPUT","SELECT","TEXTAREA"]);const hs=new WeakSet;function ds(t){return e=>{"Enter"===e.key&&t(e)}}function ps(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ms(t){return as(t)&&!ss()}const fs=new WeakSet;function ys(t,e){const n=window.getComputedStyle(t);return nn(e)?n.getPropertyValue(e):n[e]}function gs(t){return a(t)&&"ownerSVGElement"in t}const vs=new WeakMap;let xs;const ws=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:gs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ts=ws("inline","width","offsetWidth"),bs=ws("block","height","offsetHeight");function Ss({target:t,borderBoxSize:e}){vs.get(t)?.forEach(n=>{n(t,{get width(){return Ts(t,e)},get height(){return bs(t,e)}})})}function As(t){t.forEach(Ss)}function Vs(t,e){xs||"undefined"!=typeof ResizeObserver&&(xs=new ResizeObserver(As));const n=Wi(t);return n.forEach(t=>{let n=vs.get(t);n||(n=new Set,vs.set(t,n)),n.add(e),xs?.observe(t)}),()=>{n.forEach(t=>{const n=vs.get(t);n?.delete(e),n?.size||xs?.unobserve(t)})}}const Ps=new Set;let Ms;function Es(t){return Ps.add(t),Ms||(Ms=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ps.forEach(e=>e(t))},window.addEventListener("resize",Ms)),()=>{Ps.delete(t),Ps.size||"function"!=typeof Ms||(window.removeEventListener("resize",Ms),Ms=void 0)}}function ks(t,e){return"function"==typeof t?Es(t):Vs(t,e)}function Ds(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return W.preUpdate(i,!0),()=>U(i)}const Cs={value:null,addProjectionMetrics:null};function Bs(t){return gs(t)&&"svg"===t.tagName}function Rs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Ls(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=ge(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function js(t,e){const n=In(li(t)?t.get():t);return Os(n,t,e),n}function Os(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null),t.animation=void 0},c=()=>{(()=>{const e=Is(t.get()),i=Is(r);if(e===i)return void l();const a=o?o.getGeneratorVelocity():t.getVelocity();l(),o=new ke({keyframes:[e,i],velocity:a,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s})})(),t.animation=o??void 0,t.events.animationStart?.notify(),o?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((t,e)=>{r=t,s=t=>e(Fs(t,a)),W.postRender(c)},l),li(e)){let i=!0===n.skipInitialAnimation;const s=e.on("change",e=>{i?(i=!1,t.jump(Fs(e,a),!1)):t.set(Fs(e,a))}),o=t.on("destroy",s);return()=>{s(),o()}}return l}function Fs(t,e){return e?t+e:t}function Is(t){return"number"==typeof t?t:parseFloat(t)}function $s(t){const e=[];On.current=e;const n=t();On.current=void 0;const i=In(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>W.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),U(i)})}(e,i,t),i}const Ns=[...wi,xt,Mt],Ws=t=>Ns.find(xi(t));let Us=0;const zs=()=>"motion-view-"+Us++;function Ks(t,e,n){e&&(t.style?.setProperty("view-transition-class",e),n.push(t))}function Ys(t,e,n,i,s){if(n&&(t.style?.setProperty("view-transition-group",n),i.push(t),"none"!==n&&s)){const n=getComputedStyle(t);"visible"===n.overflowX&&"visible"===n.overflowY||s.add(e)}}function Xs(t,e,n,i,s,o=[],r,a=[],l){const c=Wi(t);if(i)return c.map((t,c)=>{const u=e.get(t);if(u)return u;const h=i[c]??zs();return t.style?.setProperty("view-transition-name",h),n.push(t),e.set(t,h),Ks(t,s,o),Ys(t,h,r,a,l),h});const u=c.map(t=>e.has(t)?void 0:getComputedStyle(t).getPropertyValue("view-transition-name"));return c.map((t,i)=>{const c=e.get(t);if(c)return c;const h=u[i];let d;return h&&"none"!==h&&"auto"!==h&&"match-element"!==h&&!(t=>t.startsWith("motion-view-"))(h)?d=h:(d=zs(),t.style?.setProperty("view-transition-name",d),n.push(t)),e.set(t,d),Ks(t,s,o),Ys(t,d,r,a,l),d})}function Gs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"old"}let Hs={},qs=null;const Zs=(t,e)=>{Hs[t]=e},_s=()=>{qs||(qs=document.createElement("style"),qs.id="motion-view");let t="";for(const e in Hs){const n=Hs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}qs.textContent=t,document.head.appendChild(qs),Hs={}},Js=()=>{qs&&qs.parentElement&&qs.parentElement.removeChild(qs)};function Qs(t){const e=t.match(/::view-transition-(old|new|group-children|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function to(){return document.getAnimations().filter(t=>{const{effect:e}=t;return!!e&&e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition")})}const eo=["layout","enter","exit","new","old"],no=t=>t.split(" ").every(t=>0===parseFloat(t)),io={group:["layout"],new:["new","enter"],old:["old","exit"]},so={new:{opacity:0,scale:.85},old:{opacity:1,scale:1}};function oo(t){const{update:e,targets:n,resolveDefs:i,cropOverride:s,pairs:o,classNames:r,flatGroups:a,options:l}=t;if(!document.startViewTransition)return(async()=>(await e(),new En([])))();const c=new Map,u=[],h=[],d=[],p=new Set,f=new Map,y=new Set,g=new Map,x=new Map,w=new Map,T=new Map,b=t=>{n.forEach((e,n)=>{const l=r.get(n),m="root"!==n&&i.has(n)?a.has(n)?"none":"contain":void 0;let y;if("root"!==n&&i.has(n))if(o.has(n))if("old"===t)T.set(n,Wi(n)),y=Xs(n,c,u,void 0,l,h,m,d,p),w.set(n,y);else{for(const t of T.get(n)??[])t.style?.removeProperty("view-transition-name"),c.delete(t);y=Xs(o.get(n),c,u,w.get(n),l,h,m,d,p)}else y=Xs(n,c,u,void 0,l,h,m,d,p);else y=[n];const v=s.get(n);y.forEach((n,i)=>{const s=f.get(n);f.set(n,s&&s!==e?{...s,...e}:e),void 0!==v&&g.set(n,v);const o=x.get(n)??{};o[t]=[i,y.length],x.set(n,o)})})},S=(t,e)=>{const n=x.get(t);return("old"===e?n?.old:"new"===e?n?.new:n?.new??n?.old)??[-1,1]},A=(t,e,n,i,s)=>{const o=ro(Nn(l,n),Nn(function(t,e){for(const n of io[e]??[]){const e=t?.[n]?.options;if(e)return e}}(t,e)??{},n));return"function"==typeof o.delay&&(o.delay=o.delay(i,s)),o},V=t=>{const[e,n]=S(t,"group"),i=A(f.get(t),"group","layout",-1===e?0:e,n);i.duration&&(i.duration=m(i.duration));const{delay:s=0,duration:o,ease:r}=fn(i);return{delay:m(s),duration:o,ease:r}},P=new Map,M=t=>c.forEach((e,n)=>{const i=n,s=i.getBoundingClientRect?.();if(s&&s.height){const n=getComputedStyle(i),o={};for(const t of Fi)o[t]=n[t];const r=P.get(e)??{};r[t]={width:s.width,height:s.height,radii:o},P.set(e,r)}}),E=t=>{const e=P.get(t);return!!(e?.old&&e?.new&&e.old.height&&e.new.height)&&Math.abs(e.old.width/e.old.height-e.new.width/e.new.height)>.2},k=()=>{(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Zs(":root",{"view-transition-name":"none"}),Zs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),y.forEach(t=>{Zs(`::view-transition-group(${t})`,{overflow:"clip"}),Zs(`::view-transition-old(${t}), ::view-transition-new(${t})`,{width:"100%",height:"100%","object-fit":"cover"})}),p.forEach(t=>{Zs(`::view-transition-group-children(${t})`,{overflow:"clip"})}),_s()},D=()=>{!function(t,e=[],n=[]){for(const e of t)e.style?.removeProperty("view-transition-name");for(const t of e)t.style?.removeProperty("view-transition-class");for(const t of n)t.style?.removeProperty("view-transition-group")}(u,h,d),Js()},C=async()=>{await e(),b("new"),M("new"),(()=>{y.clear();for(const t of x.keys())"root"!==t&&(g.get(t)??E(t))&&y.add(t)})(),k()};let B;try{b("old"),M("old"),k(),B=document.startViewTransition(C)}catch(t){return D(),Promise.reject(t)}return B.finished.finally(D),new Promise((t,e)=>{B.ready.then(()=>{const e=to(),n=[],i=new Set,s=new Set;f.forEach((t,e)=>{const o=x.get(e),r=!!o?.new&&!o?.old,a=!!o?.old&&!o?.new;for(const o of eo){if(!t[o])continue;if("enter"===o&&!r)continue;if("exit"===o&&!a)continue;const c=Gs(o),[u,h]=S(e,c);if(-1===u)continue;const{keyframes:d,options:p}=t[o];for(let[f,y]of Object.entries(d)){if(null==y)continue;if("x"===f||"y"===f){v(!1,`animateView() animates view-transition layers with CSS properties; the "${f}" shorthand has no effect - use transform, e.g. { transform: "translateX(40px)" }.`);continue}if("new"===o&&r&&null!=t.enter?.keyframes[f])continue;if("old"===o&&a&&null!=t.exit?.keyframes[f])continue;const d=ro(Nn(l,f),Nn(p,f));if(!Array.isArray(y)){const e="enter"===o?t.exit?.keyframes[f]:void 0,n="opacity"===f||("new"===c?r:a),i=null!=e?Array.isArray(e)?e[e.length-1]:e:n?so[c]?.[f]:void 0;void 0!==i&&(y=[i,y])}"function"==typeof d.delay&&(d.delay=d.delay(u,h)),d.duration&&(d.duration=m(d.duration)),d.delay&&(d.delay=m(d.delay)),n.push(new yn({...d,element:document.documentElement,name:f,pseudoElement:`::view-transition-${c}(${e})`,keyframes:y})),i.add(`${e}:${c}`),"opacity"===f&&s.add(`${e}:${c}`)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=Qs(o);if(!r)continue;const a=f.get(r.layer);if(i.has(`${r.layer}:${r.type}`)){s.has(`${r.layer}:new`)&&s.has(`${r.layer}:old`)&&e.getKeyframes().some(t=>t.mixBlendMode)?n.push(new Cn(t)):t.cancel();continue}const l="old"===r.type?"new":"new"===r.type?"old":void 0;if(l&&i.has(`${r.layer}:${l}`)&&!s.has(`${r.layer}:${l}`)){t.cancel();continue}const c=x.get(r.layer),u=!("old"!==r.type&&"new"!==r.type||!c?.old||!c?.new);let h;if(r.type.startsWith("group")){const{delay:t,duration:e,ease:n}=V(r.layer);h={delay:t,duration:e,easing:dn(n,e)}}else{const t=u?"group":r.type,[e,n]=S(r.layer,t);let i=A(a,t,"group"===t?"layout":"",-1===e?0:e,n);const s=i.visualDuration;i.duration&&(i.duration=m(i.duration)),i=fn(i),h={delay:m(i.delay??0),duration:u&&void 0!==s?m(s):i.duration,easing:u?"linear":dn(i.ease,i.duration)}}e.updateTiming(h),n.push(new Cn(t))}P.forEach((t,e)=>{if(!y.has(e))return;const{delay:i,duration:s,ease:o}=V(e);for(const r of Fi){const a=t.old?.radii[r]||t.new?.radii[r]||"0px",l=t.new?.radii[r]||t.old?.radii[r]||"0px";no(a)&&no(l)||n.push(new yn({element:document.documentElement,name:r,pseudoElement:`::view-transition-group(${e})`,keyframes:[a,l],delay:i,duration:s,ease:o}))}}),t(new En(n))}).catch(()=>B.updateCallbackDone.then(()=>t(new En([])),e))})}function ro(t,e){const n={...t,...e};return void 0!==e.duration&&(void 0===e.visualDuration&&delete n.visualDuration,void 0===e.type&&delete n.type),n}let ao=[],lo=null;function co(){lo=null;const[t]=ao;var e;t&&(n(ao,e=t),lo=e,oo(e).then(t=>(e.notifyReady(t),t.finished)).catch(t=>e.notifyReject(t)).finally(co))}function uo(){for(let t=ao.length-1;t>=0;t--){const e=ao[t],{interrupt:n}=e.options;if("immediate"===n){const n=ao.slice(0,t+1).map(t=>t.update),i=ao.slice(t+1);e.update=()=>{n.forEach(t=>t())},ao=[e,...i];break}}lo&&"immediate"!==ao[0]?.options.interrupt||co()}class ho{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.resolveDefs=new Set,this.cropOverride=new Map,this.pairs=new Map,this.classNames=new Map,this.flatGroups=new Set,this.notifyReady=u,this.notifyReject=u,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.notifyReject=e}),this.update=t,this.options={interrupt:"wait",...e},this.readyPromise.catch(u),n=this,ao.push(n),es.render(uo)}add(t,e){return this.currentSubject=t,this.resolveDefs.add(t),void 0!==e&&this.pairs.set(t,e),this.targets.has(t)||this.targets.set(t,{}),this}crop(t=!0){return this.cropOverride.set(this.currentSubject,t),this}group(t=!0){return t?this.flatGroups.delete(this.currentSubject):this.flatGroups.add(this.currentSubject),this}class(t){return this.classNames.set(this.currentSubject,t),this}layout(t={}){return this.updateTarget("layout",{},t),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const po=()=>({translate:0,scale:1,origin:0,originPoint:0}),mo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),fo=()=>({min:0,max:0}),yo=()=>({x:{min:0,max:0},y:{min:0,max:0}}),go=new WeakMap;function vo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function xo(t){return"string"==typeof t||Array.isArray(t)}const wo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],To=["initial",...wo];function bo(t){return vo(t.animate)||To.some(e=>xo(t[e]))}function So(t){return Boolean(bo(t)||t.variants)}function Ao(t,e,n){for(const i in e){const s=e[i],o=n[i];if(li(s))t.addValue(i,s);else if(li(o))t.addValue(i,In(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,In(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const Vo={current:null},Po={current:!1},Mo="undefined"!=typeof window;function Eo(){if(Po.current=!0,Mo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Vo.current=t.matches;t.addEventListener("change",e),e()}else Vo.current=!1}const ko=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Do={};class Co{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){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=en,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 t=G.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,W.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=bo(e),this.isVariantNode=So(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&li(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,go.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Po.current||Eo(),this.shouldReduceMotion=Vo.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(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&bn.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new yn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:m(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=ze.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Do){const e=Do[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ko.length;e++){const n=ko[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Ao(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=In(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Ws(n)&&Mt.test(e)&&(n=Li(t,e)),this.setBaseTarget(t,li(n)?n.get():n)),li(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=ei(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||li(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){es.render(this.render)}}class Bo extends Co{constructor(){super(...arguments),this.KeyframeResolver=Oi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;li(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ro({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Lo(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function jo(t){return void 0===t||1===t}function Oo({scale:t,scaleX:e,scaleY:n}){return!jo(t)||!jo(e)||!jo(n)}function Fo(t){return Oo(t)||Io(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Io(t){return $o(t.x)||$o(t.y)}function $o(t){return t&&"0%"!==t}function No(t,e,n){return n+e*(t-n)}function Wo(t,e,n,i,s){return void 0!==s&&(t=No(t,s,i)),No(t,n,i)+e}function Uo(t,e=0,n=1,i,s){t.min=Wo(t.min,e,n,i,s),t.max=Wo(t.max,e,n,i,s)}function zo(t,{x:e,y:n}){Uo(t.x,e.translate,e.scale,e.originPoint),Uo(t.y,n.translate,n.scale,n.originPoint)}const Ko=.999999999999,Yo=1.0000000000001;function Xo(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(Go(t.x,-o.scroll.offset.x),Go(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,zo(t,r)),i&&Fo(o.latestValues)&&Zo(t,o.latestValues,o.layout?.layoutBox))}e.x<Yo&&e.x>Ko&&(e.x=1),e.y<Yo&&e.y>Ko&&(e.y=1)}function Go(t,e){t.min+=e,t.max+=e}function Ho(t,e,n,i,s=.5){Uo(t,e,n,Ct(t.min,t.max,s),i)}function qo(t,e){return"string"==typeof t?parseFloat(t)/100*(e.max-e.min):t}function Zo(t,e,n){const i=n??t;Ho(t.x,qo(e.x,i.x),e.scaleX,e.scale,e.originX),Ho(t.y,qo(e.y,i.y),e.scaleY,e.scale,e.originY)}function _o(t,e){return Ro(Lo(t.getBoundingClientRect(),e))}const Jo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qo=Ue.length;function tr(t,e,n){let i="",s=!0;for(let o=0;o<Qo;o++){const r=Ue[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=zi(a,Di[r]);if(!l){s=!1;i+=`${Jo[r]||r}(${t}) `}n&&(e[r]=t)}}const o=t.pathRotation;return o&&(s=!1,i+=`rotate(${zi(o,Di.pathRotation)}) `),i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function er(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ze.has(t))r=!0;else if(q(t))s[t]=n;else{const e=zi(n,Di[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=tr(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function nr(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function ir(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const sr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return`${ir(t,e.target.x)}% ${ir(t,e.target.y)}%`}},or={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Mt.parse(t);if(s.length>5)return i;const o=Mt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=Ct(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},rr={borderRadius:{...sr,applyTo:[...Fi]},borderTopLeftRadius:sr,borderTopRightRadius:sr,borderBottomLeftRadius:sr,borderBottomRightRadius:sr,boxShadow:or};function ar(t,{layout:e,layoutId:n}){return ze.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!rr[t]||"opacity"===t)}function lr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(li(i[e])||s&&li(s[e])||ar(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class cr extends Bo{constructor(){super(...arguments),this.type="html",this.renderInstance=nr}mount(e){t.invariant(Boolean(e.style),"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(t,e){if(ze.has(e))return this.projection?.isProjecting?Ie(e):Ne(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(q(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return _o(t,e)}build(t,e,n){er(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return lr(t,e,n)}}class ur extends Co{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const hr={offset:"stroke-dashoffset",array:"stroke-dasharray"},dr={offset:"strokeDashoffset",array:"strokeDasharray"};function pr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?hr:dr;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const mr=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(er(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;for(const t of mr)void 0!==h[t]&&(d[t]=h[t],delete h[t]);(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&pr(h,s,o,r,!1)}const yr=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"]),gr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function vr(t,e,n,i){nr(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(yr.has(n)?n:hi(n),e.attrs[n])}function xr(t,e,n){const i=lr(t,e,n);for(const n in t)if(li(t[n])||li(e[n])){i[-1!==Ue.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class wr extends Bo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yo}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ze.has(e)){const t=Bi(e);return t&&t.default||0}if(mr.includes(e)){const n=getComputedStyle(t)[e];if("string"==typeof n&&n)return n.trim()}return e=yr.has(e)?e:hi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return xr(t,e,n)}build(t,e,n){fr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){vr(t,e,0,i)}mount(t){this.isSVGTag=gr(t.tagName),super.mount(t)}}const Tr=To.length;function br(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&br(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Tr;n++){const i=To[n],s=t.props[i];(xo(s)||!1===s)&&(e[i]=s)}return e}function Sr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Ar=[...wo].reverse(),Vr=wo.length;function Pr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Sr(e,t)}function Mr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Er(){return{animate:Mr(!0),whileInView:Mr(),whileHover:Mr(),whileTap:Mr(),whileDrag:Mr(),whileFocus:Mr(),exit:Mr()}}function kr(t,e){t.min=e.min,t.max=e.max}function Dr(t,e){kr(t.x,e.x),kr(t.y,e.y)}function Cr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Br(t){return t.max-t.min}function Rr(t,e,n){return Math.abs(t-e)<=n}function Lr(t,e,n,i=.5){t.origin=i,t.originPoint=Ct(e.min,e.max,t.origin),t.scale=Br(n)/Br(e),t.translate=Ct(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function jr(t,e,n,i){Lr(t.x,e.x,n.x,i?i.originX:void 0),Lr(t.y,e.y,n.y,i?i.originY:void 0)}function Or(t,e,n,i=0){const s=i?Ct(n.min,n.max,i):n.min;t.min=s+e.min,t.max=t.min+Br(e)}function Fr(t,e,n,i){Or(t.x,e.x,n.x,i?.x),Or(t.y,e.y,n.y,i?.y)}function Ir(t,e,n,i=0){const s=i?Ct(n.min,n.max,i):n.min;t.min=e.min-s,t.max=t.min+Br(e)}function $r(t,e,n,i){Ir(t.x,e.x,n.x,i?.x),Ir(t.y,e.y,n.y,i?.y)}function Nr(t,e,n,i,s){return t=No(t-=e,1/n,i),void 0!==s&&(t=No(t,1/s,i)),t}function Wr(t,e=0,n=1,i=.5,s,o=t,r=t){if(pt.test(e)){e=parseFloat(e);e=Ct(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Ct(o.min,o.max,i);t===o&&(a-=e),t.min=Nr(t.min,e,n,a,s),t.max=Nr(t.max,e,n,a,s)}function Ur(t,e,[n,i,s],o,r){Wr(t,e[n],e[i],e[s],e.scale,o,r)}const zr=["x","scaleX","originX"],Kr=["y","scaleY","originY"];function Yr(t,e,n,i){Ur(t.x,e,zr,n?n.x:void 0,i?i.x:void 0),Ur(t.y,e,Kr,n?n.y:void 0,i?i.y:void 0)}function Xr(t){return 0===t.translate&&1===t.scale}function Gr(t){return Xr(t.x)&&Xr(t.y)}function Hr(t,e){return t.min===e.min&&t.max===e.max}function qr(t,e){return Hr(t.x,e.x)&&Hr(t.y,e.y)}function Zr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function _r(t,e){return Zr(t.x,e.x)&&Zr(t.y,e.y)}function Jr(t){return Br(t.x)/Br(t.y)}function Qr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ta(t){return[t("x"),t("y")]}function ea(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,pathRotation:s,rotateX:o,rotateY:r,skewX:a,skewY:l}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotate(${s}deg) `),o&&(i+=`rotateX(${o}deg) `),r&&(i+=`rotateY(${r}deg) `),a&&(i+=`skewX(${a}deg) `),l&&(i+=`skewY(${l}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const na=Fi.length,ia=t=>"string"==typeof t?parseFloat(t):t,sa=t=>"number"==typeof t||mt.test(t);function oa(t,e,n,i,s,o){s?(t.opacity=Ct(0,n.opacity??1,aa(i)),t.opacityExit=Ct(e.opacity??1,0,la(i))):o&&(t.opacity=Ct(e.opacity??1,n.opacity??1,i));for(let s=0;s<na;s++){const o=Fi[s];let r=ra(e,o),a=ra(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||sa(r)===sa(a)?(t[o]=Math.max(Ct(ia(r),ia(a),i),0),(pt.test(a)||pt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Ct(e.rotate||0,n.rotate||0,i))}function ra(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const aa=ca(0,.5,k),la=ca(.5,.95,u);function ca(t,e,n){return i=>i<t?0:i>e?1:n(d(t,e,i))}function ua(t,e,n){const i=li(t)?t:In(t);return i.start(Gn("",i,e,n)),i.animation}function ha(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const da=(t,e)=>t.depth-e.depth;class pa{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(da),this.isDirty=!1,this.children.forEach(t)}}function ma(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(U(i),t(o-e))};return W.setup(i,!0),()=>U(i)}function fa(t,e){return ma(t,m(e))}function ya(t){return li(t)?t.get():t}class ga{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1!==s.isConnected||i.snapshot||(n(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){for(let e=this.members.indexOf(t)-1;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent&&!1!==t.instance?.isConnected)return this.promote(t),!0}return!1}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=n.options,{layoutDependency:s}=t.options;void 0!==i&&i===s||(t.resumeFrom=n,e&&(n.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),!1===t.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const va={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xa={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wa=["","X","Y","Z"];let Ta=0;function ba(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Sa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=mi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Sa(i)}function Aa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=Ta++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cs.value&&(xa.nodes=xa.calculatedTargetDeltas=xa.calculatedProjections=0),this.nodes.forEach(Ma),this.nodes.forEach(Oa),this.nodes.forEach(Fa),this.nodes.forEach(Ea),Cs.addProjectionMetrics&&Cs.addProjectionMetrics(xa)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new pa)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new p),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=gs(e)&&!Bs(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;W.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=ma(s,250),va.hasAnimatedSinceResize&&(va.hasAnimatedSinceResize=!1,this.nodes.forEach(ja)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||za,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!_r(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Nn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||ja(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),U(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(Ia),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(Ca),void this.nodes.forEach(Da)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ba);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ra),this.nodes.forEach(La),this.nodes.forEach(Va),this.nodes.forEach(Pa)):this.nodes.forEach(Ba),this.clearAllSnapshots();const t=G.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,es.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ka),this.sharedNodes.forEach($a)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Br(this.snapshot.measuredBox.x)||Br(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Gr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Fo(this.latestValues)||s)&&(o(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Xa((i=n).x),Xa(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ha))){const{scroll:t}=this.root;t&&(Go(e.x,t.offset.x),Go(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Dr(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Dr(e,t),Go(e.x,s.offset.x),Go(e.y,s.offset.y))}return e}applyTransform(t,e=!1,n){const i=n||{x:{min:0,max:0},y:{min:0,max:0}};Dr(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Go(i.x,-n.scroll.offset.x),Go(i.y,-n.scroll.offset.y)),Fo(n.latestValues)&&Zo(i,n.latestValues,n.layout?.layoutBox)}return Fo(this.latestValues)&&Zo(i,this.latestValues,this.layout?.layoutBox),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Dr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!Fo(n.latestValues))continue;let i;n.instance&&(Oo(n.latestValues)&&n.updateSnapshot(),i=yo(),Dr(i,n.measurePageBox())),Yr(e,n.latestValues,n.snapshot?.layoutBox,i)}return Fo(this.latestValues)&&Yr(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(!this.layout||!i&&!s)return;this.resolvedRelativeTargetAt=z.timestamp;const o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fr(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Dr(this.target,this.layout.layoutBox),zo(this.target,this.targetDelta)):Dr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Cs.value&&xa.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Oo(this.parent.latestValues)&&!Io(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$r(this.relativeTargetOrigin,e,n,this.options.layoutAnchor||void 0),Dr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===z.timestamp&&(n=!1),n)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Dr(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;Xo(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(Cr(this.prevProjectionDelta.x,this.projectionDelta.x),Cr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),jr(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Qr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Qr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),Cs.value&&xa.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1,n){const i=this.snapshot,s=i?i.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,h=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Ua));let d;this.animationProgress=0;const p=n?.interpolateProjection(t);this.mixTargetDelta=e=>{const n=e/1e3,i=p?.(n);var c,m,f,y;i?(r.x.translate=i.x,r.x.scale=Ct(t.x.scale,1,n),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=i.y,r.y.scale=Ct(t.y.scale,1,n),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Na(r.x,t.x,n),Na(r.y,t.y,n)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($r(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),c=this.relativeTarget,m=this.relativeTargetOrigin,f=a,y=n,Wa(c.x,m.x,f.x,y),Wa(c.y,m.y,f.y,y),d&&qr(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Dr(d,this.relativeTarget)),l&&(this.animationValues=o,oa(o,s,this.latestValues,n,h,u)),i&&void 0!==i.rotate&&(this.animationValues||(this.animationValues=o),this.animationValues.pathRotation=i.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(U(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{va.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=In(0)),this.motionValue.jump(0,!1),this.currentAnimation=ua(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Ga(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Br(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Br(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Dr(e,n),Zo(e,s),jr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ga);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&ba("z",t,i,this.animationValues);for(let e=0;e<wa.length;e++)ba(`rotate${wa[e]}`,t,i,this.animationValues),ba(`skew${wa[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=ya(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ya(e?.pointerEvents)||""),void(this.hasProjected&&!Fo(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=ea(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in rr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=rr[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?ya(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Da),this.root.sharedNodes.clear()}}}function Va(t){t.updateLayout()}function Pa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;if("size"===s)ta(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Br(i);i.min=n[t].min,i.max=i.min+s});else if("x"===s||"y"===s){const t="x"===s?"y":"x";kr(o?e.measuredBox[t]:e.layoutBox[t],n[t])}else Ga(s,e.layoutBox,n)&&ta(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Br(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};jr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?jr(a,t.applyTransform(i,!0),e.measuredBox):jr(a,n,e.layoutBox);const l=!Gr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r=t.options.layoutAnchor||void 0,a={x:{min:0,max:0},y:{min:0,max:0}};$r(a,e.layoutBox,s.layoutBox,r);const l={x:{min:0,max:0},y:{min:0,max:0}};$r(l,n,o.layoutBox,r),_r(a,l)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=a,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ma(t){Cs.value&&xa.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ea(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ka(t){t.clearSnapshot()}function Da(t){t.clearMeasurements()}function Ca(t){t.isLayoutDirty=!0,t.updateLayout()}function Ba(t){t.isLayoutDirty=!1}function Ra(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function La(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ja(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Oa(t){t.resolveTargetDelta()}function Fa(t){t.calcProjection()}function Ia(t){t.resetSkewAndRotation()}function $a(t){t.removeLeadSnapshot()}function Na(t,e,n){t.translate=Ct(e.translate,0,n),t.scale=Ct(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Wa(t,e,n,i){t.min=Ct(e.min,n.min,i),t.max=Ct(e.max,n.max,i)}function Ua(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const za={duration:.45,ease:[.4,0,.1,1]},Ka=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ya=Ka("applewebkit/")&&!Ka("chrome/")?Math.round:u;function Xa(t){t.min=Ya(t.min),t.max=Ya(t.max)}function Ga(t,e,n){return"position"===t||"preserve-aspect"===t&&!Rr(Jr(e),Jr(n),.2)}function Ha(t){return t!==t.root&&t.scroll?.wasRoot}const qa=Aa({attachResizeListener:(t,e)=>ha(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Za=t=>!t.isLayoutDirty&&t.willUpdate(!1);const _a={current:void 0},Ja=Aa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!_a.current){const t=new qa({});t.mount(window),t.setOptions({layoutScroll:!0}),_a.current=t}return _a.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Qa="[data-layout],[data-layout-id]",tl=new WeakMap;let el;function nl(t){const e=[];return t instanceof HTMLElement&&t.matches(Qa)&&e.push(t),t.querySelectorAll(Qa).forEach(t=>{t instanceof HTMLElement&&e.push(t)}),e}function il(t,e){const n=t.getAttribute("data-layout");return{layoutId:t.getAttribute("data-layout-id")??void 0,layout:null!==n||void 0,animationType:n&&"true"!==n?n:"both",transition:e}}function sl(t,e){let n=tl.get(t);if(n)n.setOptions(il(t,e));else{let i=go.get(t);i||(i=new cr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0})),t.style.transform&&!Fo(i.latestValues)&&(t.style.transform=""),n=new Ja(i.latestValues,function(t){let e=t.parentElement;for(;e;){const t=tl.get(e);if(t&&t.instance)return t;e=e.parentElement}}(t)),i.projection=n,n.setOptions({...il(t,e),visualElement:i}),n.mount(t),tl.set(t,n)}return n.isPresent=!0,n.options.onExitComplete&&n.setOptions({onExitComplete:void 0}),n}function ol(t,e){e.setOptions({onExitComplete:void 0});e.getStack()&&!e.isLead()||e.currentAnimation?.stop(),e.unmount(),tl.delete(t)}function rl(){const t=el;el=void 0,function(){if(z.isProcessing)return;const t=G.now();z.delta=i(0,1e3/60,t-z.timestamp),z.timestamp=t,z.isProcessing=!0,K.update.process(z),K.preRender.process(z),K.render.process(z),z.isProcessing=!1}();const e=new Map;for(const n of t)for(const t of n.collectTargets()){const i=e.get(t);i?i.push(n):e.set(t,[n])}const n=new Map;for(const t of(s=e.keys(),[...s].sort((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))){const i=e.get(t),s=sl(t,i[i.length-1].transitionFor(t));for(const e of i)e.adopt(t,s);n.set(t,s)}var s;n.forEach(t=>{t.isLayoutDirty=!1,t.willUpdate()});const o=[];for(const e of t){const t=e.runUpdate();t&&o.push(t)}const r=()=>{const e=new Set;for(const n of t)n.reconcileAdditions(e);for(const n of t)n.reconcileRemovals(e);let i;n.forEach(t=>i||(i=t.root));for(const e of t)i||(i=e.getRoot());i?.didUpdate(),es.render(()=>{for(const e of t)e.finalize()})};o.length?Promise.all(o).then(r):r()}const al=W,ll=$.reduce((t,e)=>(t[e]=t=>U(t),t),{});function cl(t){return"object"==typeof t&&!Array.isArray(t)}function ul(t,e,n,i){return null==t?[]:"string"==typeof t&&cl(e)?Wi(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function hl(t,e,n){return t*(e+1)+n*e}function dl(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function pl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;s<t.length;s++){const o=t[s];o.at>e&&o.at<i&&(n(t,o),s--)}}(t,o,r);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Ct(o,r,s[n]),easing:j(i,n)})}function ml(t,e,n=0){const i=e+1+e*n;for(let e=0;e<t.length;e++)t[e]=t[e]/i}function fl(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function yl(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function gl(t,e){return e[t]||(e[t]=[]),e[t]}function vl(t){return Array.isArray(t)?t:[t]}function xl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const wl=t=>"number"==typeof t,Tl=t=>t.every(wl);function bl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=gs(t)&&!Bs(t)?new wr(e):new cr(e);n.mount(t),go.set(t,n)}function Sl(t){const e=new ur({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),go.set(t,e)}function Al(e,n,i,s){const o=[];if(function(t,e){return li(t)||"number"==typeof t||"string"==typeof t&&!cl(e)}(e,n))o.push(ua(e,cl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=ul(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?bl:Sl;go.has(e)||s(e);const l=go.get(e),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(t,a)),o.push(...yi(l,{...n,transition:c},{}))}}return o}function Vl(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,p=0,f=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,p);continue}if(!Array.isArray(a)){u.set(a.name,dl(p,a.at,h,u));continue}let[d,y,g={}]=a;void 0!==g.at&&(p=dl(p,g.at,h,u));let v=0;const x=(e,i,s,a=0,l=0)=>{const c=vl(e),{delay:u=0,times:h=xe(c),type:d=n.type||"keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...w}=i;let{ease:T=n.ease||"easeOut",duration:b}=i;const A="function"==typeof u?u(a,l):u,V=c.length,P=mn(d)?d:o?.[d||"keyframes"];if(V<=2&&P){let t=100;if(2===V&&Tl(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...w};void 0!==b&&(e.duration=m(b));const i=Ht(e,t,P);T=i.ease,b=i.duration}b??(b=r);const M=p+A;1===h.length&&0===h[0]&&(h[1]=1);const E=h.length-c.length;if(E>0&&ve(h,E),1===c.length&&c.unshift(null),y&&t.warning(y<20,`Sequence segments can't repeat ${y} times — ignoring repeat option. Use a value below 20 or apply repeat at the sequence level instead.`),y&&y<20){const t=b>0?x/b:0;b=hl(b,y,x);const e=[...c],n=[...h];T=Array.isArray(T)?[...T]:[T];const i=[...T],s="reverse"===g||"mirror"===g;let o=e,r=i;s&&(o=[...e].reverse(),"reverse"===g&&(r=[...i].reverse().map(t=>"function"==typeof t?S(t):t)));for(let a=0;a<y;a++){const l=s&&a%2==0,u=l?o:e,d=l?r:i,p=(a+1)*(1+t);t>0&&(c.push(c[c.length-1]),h.push(p),T.push("linear")),c.push(...u);for(let t=0;t<u.length;t++)h.push(n[t]+p),T.push(0===t?"linear":j(d,t-1))}ml(h,y,t)}const k=M+b;pl(s,c,T,h,M,k),v=Math.max(A+b,v),f=Math.max(k,f)};if(li(d))x(y,g,gl("default",yl(d,l)));else{const t=ul(d,y,s,c),e=t.length;for(let n=0;n<e;n++){const i=yl(t[n],l);for(const t in y)x(y[t],xl(g,t),gl(t,i),n,e)}}h=p,p+=v}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(fl);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(d(0,f,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...p}=n;u.transition[s]={...p,duration:f,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=In(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:me});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...Al(n,t,e))}),s}function Pl(t={}){const{scope:e,reduceMotion:i,skipAnimations:s}=t;return function(t,o,r){let a,l=[];const c={};if(void 0!==i&&(c.reduceMotion=i),void 0!==s&&(c.skipAnimations=s),u=t,Array.isArray(u)&&u.some(Array.isArray)){const{onComplete:n,...i}=o||{};"function"==typeof n&&(a=n),l=Vl(t,{...c,...i},e)}else{const{onComplete:n,...i}=r||{};"function"==typeof n&&(a=n),l=Al(t,o,{...c,...i},e)}var u;const h=new Dn(l);return a&&h.finished.then(a),e&&(e.animations.push(h),h.finished.then(()=>{n(e.animations,h)})),h}}const Ml=Pl();const El=e=>function(n,i,s){return new Dn(function(e,n,i,s){if(null==e)return[];const o=Wi(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;t<r;t++){const e=o[t],s={...i};"function"==typeof s.delay&&(s.delay=s.delay(t,r));for(const t in n){let i=n[t];Array.isArray(i)||(i=[i]);const o={...Nn(s,t)};o.duration&&(o.duration=m(o.duration)),o.delay&&(o.delay=m(o.delay));const r=Ln(e),l=Rn(t,o.pseudoElement||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=ys(i,s)),De(e),$i(e,s),!o&&e.length<2&&e.unshift(ys(i,s)),n.keyframes=e}const l=[];for(let t=0;t<a.length;t++){const{map:e,key:n,options:i}=a[t],s=new yn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},kl=El();function Dl(t){return"undefined"!=typeof window&&(t?ln():an())}const Cl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Bl(t,e,n,i){const s=n[e],{length:o,position:r}=Cl[e],a=s.current,l=n.time;s.current=Math.abs(t[`scroll${r}`]),s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=d(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:y(s.current-a,c)}const Rl={start:0,center:.5,end:1};function Ll(t,e,n=0){let i=0;if(t in Rl&&(t=Rl[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const jl=[0,0];function Ol(t,e,n,i){let s=Array.isArray(t)?t:jl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Rl[t]?t:"0"]),o=Ll(s[0],n,i),r=Ll(s[1],e),o-r}const Fl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Il={x:0,y:0};function $l(t,e,n){const{offset:s=Fl.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(qi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):Il,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t<d;t++){const n=Ol(s[t],u[a],c[a],l[r]);h||n===e[r].interpolatorOffsets[t]||(h=!0),e[r].offset[t]=n}h&&(e[r].interpolate=ge(e[r].offset,xe(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=i(0,1,e[r].interpolate(e[r].current))}function Nl(t,e,n,i={}){return{measure:e=>{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){Bl(t,"x",e,n),Bl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&$l(t,n,i)},notify:()=>e(n)}}const Wl=new WeakMap,Ul=new WeakMap,zl=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,Xl=t=>t===document.scrollingElement?window:t;function Gl(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=zl.get(e);s||(s=new Set,zl.set(e,s));const o=Nl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!Wl.has(e)){const t=()=>{for(const t of s)t.measure(z.timestamp);W.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>W.read(t);Wl.set(e,i);const o=Xl(e);window.addEventListener("resize",i),e!==document.documentElement&&Ul.set(e,ks(e,i)),o.addEventListener("scroll",i),i()}if(n&&!Yl.has(e)){const t=Wl.get(e),n={width:e.scrollWidth,height:e.scrollHeight};Kl.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=W.read(i,!0);Yl.set(e,s)}const r=Wl.get(e);return W.read(r,!1,!0),()=>{U(r);const t=zl.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Wl.get(e);Wl.delete(e),n&&(Xl(e).removeEventListener("scroll",n),Ul.get(e)?.(),window.removeEventListener("resize",n));const i=Yl.get(e);i&&(U(i),Yl.delete(e)),Kl.delete(e)}}const Hl=[[Fl.Enter,"entry"],[Fl.Exit,"exit"],[Fl.Any,"cover"],[Fl.All,"contain"]],ql={start:0,end:1};function Zl(t){const e=t.trim().split(/\s+/);if(2!==e.length)return;const n=ql[e[0]],i=ql[e[1]];return void 0!==n&&void 0!==i?[n,i]:void 0}function _l(t,e){const n=function(t){if(2!==t.length)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else{if("string"!=typeof n)return;{const t=Zl(n);if(!t)return;e.push(t)}}return e}(t);if(!n)return!1;for(let t=0;t<2;t++){const i=n[t],s=e[t];if(i[0]!==s[0]||i[1]!==s[1])return!1}return!0}function Jl(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of Hl)if(_l(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Ql=new Map;function tc(t){const e={value:0},n=Gl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}function ec({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);let s=Ql.get(e);s||(s=new Map,Ql.set(e,s));const o=n.target??"self";let r=s.get(o);r||(r={},s.set(o,r));const a=i+(n.offset??[]).join(",");if(!r[a])if(n.target&&Dl(n.target)){const t=Jl(n.offset);r[a]=t?new ViewTimeline({subject:n.target,axis:i}):tc({container:e,...n})}else Dl()?r[a]=new ScrollTimeline({source:e,axis:i}):r[a]=tc({container:e,...n});return r[a]}const nc={some:0,all:1};const ic=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Oi,t.DOMVisualElement=Bo,t.DocumentProjectionNode=qa,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=pa,t.GroupAnimation=En,t.GroupAnimationWithThen=Dn,t.HTMLProjectionNode=Ja,t.HTMLVisualElement=cr,t.JSAnimation=ke,t.KeyframeResolver=en,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.scope=t,this.updateDom=e,this.defaultOptions=n,this.sharedTransitions=new Map,this.notifyReady=()=>{},this.rejectReady=()=>{},this.tracked=new Map,this.restorePoints=new Map,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),el||(el=[],queueMicrotask(rl)),el.push(this)}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}transitionFor(t){const e=t.getAttribute("data-layout-id");return e&&this.sharedTransitions.get(e)||this.defaultOptions}adopt(t,e){this.tracked.set(t,e),this.restorePoints.set(t,{parent:t.parentElement,next:t.nextSibling})}collectTargets(){return nl(this.scope)}runUpdate(){try{const t=this.updateDom();if(t&&"function"==typeof t.then)return t.then(void 0,t=>{this.updateError=t})}catch(t){this.updateError=t}}reconcileAdditions(t){for(const e of nl(this.scope)){if(this.tracked.has(e))continue;const n=sl(e,this.transitionFor(e));this.adopt(e,n),n.options.layoutId&&t.add(n.options.layoutId)}}reconcileRemovals(t){this.tracked.forEach((e,n)=>{if(n.isConnected)return;const i=this.restorePoints.get(n);this.restorePoints.delete(n);const{layoutId:s}=e.options,o=e.getStack(),r=o&&o.members.some(t=>t!==e&&t.instance?.isConnected);if(s&&e.isLead()&&r&&!t.has(s)&&i&&i.parent.isConnected){if(i.parent.insertBefore(n,i.next&&i.next.parentNode===i.parent?i.next:null),e.isPresent=!1,e.setOptions({onExitComplete:()=>{n.remove(),ol(n,e)}}),e.relegate())return;n.remove()}ol(n,e),this.tracked.delete(n)})}getRoot(){let t;return this.tracked.forEach(e=>t||(t=e.root)),t}finalize(){if(this.updateError)return void this.rejectReady(this.updateError);const t=new Set;this.tracked.forEach(e=>{e.instance&&e.currentAnimation&&t.add(e.currentAnimation)}),this.notifyReady(new En([...t]))}},t.MotionGlobalConfig=o,t.MotionValue=Fn,t.NativeAnimation=yn,t.NativeAnimationExtended=xn,t.NativeAnimationWrapper=Cn,t.NodeStack=ga,t.ObjectVisualElement=ur,t.SVGVisualElement=wr,t.SubscriptionManager=p,t.ViewTransitionBuilder=ho,t.VisualElement=Co,t.acceleratedValues=bn,t.addAttrValue=Xi,t.addDomEvent=ha,t.addScaleCorrector=function(t){for(const e in t)rr[e]=t[e],q(e)&&(rr[e].isCSSVariable=!0)},t.addStyleValue=Ji,t.addUniqueItem=e,t.addValueToWillChange=ui,t.alpha=et,t.analyseComplexValue=At,t.animate=Ml,t.animateMini=kl,t.animateMotionValue=Gn,t.animateSingleValue=ua,t.animateTarget=yi,t.animateValue=function(t){return new ke(t)},t.animateVariant=gi,t.animateView=function(t,e={}){return new ho(t,e)},t.animateVisualElement=vi,t.animationMapKey=Rn,t.anticipate=M,t.applyAxisDelta=Uo,t.applyBoxDelta=zo,t.applyGeneratorOptions=fn,t.applyPointDelta=Wo,t.applyPxDefaults=$i,t.applyTreeDeltas=Xo,t.arc=function(t={}){const e=function({strength:t=.5,peak:e=.5,direction:n,rotate:i=!1}={}){const s=!0===i?1:"number"==typeof i?i:0;let o;return(i,r)=>{const a=r.x-i.x,l=r.y-i.y;let c;c="cw"===n?-t:"ccw"===n?t:(Math.abs(a)>=Math.abs(l)?a:l)<0?-t:t;let u=Zn(i.x,i.y,r.x,r.y,c,e);if(void 0===n){const t=Math.abs(a)<Math.abs(l),n=i.x+a*e,s=i.y+l*e,h=t?Math.sign(u.x-n):Math.sign(u.y-s);void 0!==o&&0!==h&&h!==o?(c=-c,u=Zn(i.x,i.y,r.x,r.y,c,e)):0!==h&&(o=h)}const h=s?qn(0,i.x,u.x,r.x,i.y,u.y,r.y):0,d=s?qn(1,i.x,u.x,r.x,i.y,u.y,r.y):0,p=s?x(-180,180,d-h):0;return t=>{const e={x:Hn(t,i.x,u.x,r.x),y:Hn(t,i.y,u.y,r.y)};if(s){const n=qn(t,i.x,u.x,r.x,i.y,u.y,r.y),o=h+p*t;e.rotate=x(-180,180,n-o)*s}return e}}}(t),n={interpolateProjection(t){const n=t.x.translate,i=t.y.translate;if(!(Math.sqrt(n*n+i*i)<20))return e({x:n,y:i},{x:0,y:0})},animateVisualElement(t,n,i,s,o){if(!("x"in n)&&!("y"in n))return;const r=t.getValue("x",t.latestValues.x??0),a=t.getValue("y",t.latestValues.y??0),l=n.x,c=n.y,u=(Array.isArray(l)&&null!=l[0]?l[0]:r?.get())??0,h=(Array.isArray(c)&&null!=c[0]?c[0]:a?.get())??0,d=Array.isArray(l)?l[l.length-1]:l??u,p=Array.isArray(c)?c[c.length-1]:c??h,m=e({x:u,y:h},{x:d,y:p}),f=void 0!==m(0).rotate?t.getValue("pathRotation",0):void 0,y={delay:s,...Nn(i||{},"x")};delete y.path;const g=In(0);g.start(Gn("",g,[0,1e3],{...y,isSync:!0,velocity:0,onUpdate:t=>{const e=m(t/1e3);r?.set(e.x),a?.set(e.y),f&&void 0!==e.rotate&&f.set(e.rotate)},onComplete:()=>{r?.set(d),a?.set(p),f?.set(0)},onStop:()=>f?.set(0),onCancel:()=>f?.set(0)})),g.animation&&o.push(g.animation),delete n.x,delete n.y}};return n},t.aspectRatio=Jr,t.attachFollow=Os,t.attachSpring=function(t,e,n){return Os(t,e,{type:"spring",...n})},t.attrEffect=Gi,t.axisDeltaEquals=Qr,t.axisEquals=Hr,t.axisEqualsRounded=Zr,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=qr,t.boxEqualsRounded=_r,t.buildHTMLStyles=er,t.buildProjectionTransform=ea,t.buildSVGAttrs=fr,t.buildSVGPath=pr,t.buildTransform=tr,t.calcAxisDelta=Lr,t.calcBoxDelta=jr,t.calcChildStagger=jn,t.calcGeneratorDuration=Gt,t.calcLength=Br,t.calcRelativeAxis=Or,t.calcRelativeAxisPosition=Ir,t.calcRelativeBox=Fr,t.calcRelativePosition=$r,t.camelCaseAttributes=yr,t.camelToDash=hi,t.cancelFrame=U,t.cancelMicrotask=ns,t.cancelSync=ll,t.checkVariantsDidChange=Pr,t.circIn=E,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Ea,t.collectMotionValues=On,t.color=xt,t.compareByDepth=da,t.complex=Mt,t.containsCSSVariable=Q,t.convertBoundingBoxToBox=Ro,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=we,t.copyAxisDeltaInto=Cr,t.copyAxisInto=kr,t.copyBoxInto=Dr,t.correctBorderRadius=sr,t.correctBoxShadow=or,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>vi(t,e,n)))}(t),n=Er(),i=!0,s=!1;const o=e=>(n,i)=>{const s=ni(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function r(r){const{props:a}=t,l=br(t.parent)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<Vr;e++){const p=Ar[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],y=xo(f),g=p===r?m.isActive:null;!1===g&&(d=e);let v=f===l[p]&&f!==a[p]&&y;if(v&&(i||s)&&t.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...h},!m.isActive&&null===g||!f&&!m.prevProp||vo(f)||"boolean"==typeof f)continue;if("exit"===p&&m.isActive&&!0!==g){m.prevResolvedValues&&(h={...h,...m.prevResolvedValues});continue}const x=Pr(m.prevProp,f);let w=x||p===r&&m.isActive&&!v&&y||e>d&&y,T=!1;const b=Array.isArray(f)?f:[f];let S=b.reduce(o(p),{});!1===g&&(S={});const{prevResolvedValues:A={}}=m,V={...A,...S},P=e=>{w=!0,u.has(e)&&(T=!0,u.delete(e)),m.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in V){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let i=!1;i=si(e)&&si(n)?!Sr(e,n)||x:e!==n,i?null!=e?P(t):u.add(t):void 0!==e&&u.has(t)?P(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),(i||s)&&t.blockInitialAnimation&&(w=!1);const M=v&&x;w&&(!M||T)&&c.push(...b.map(e=>{const n={type:p};if("string"==typeof e&&(i||s)&&!M&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=ni(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=jn(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof a.initial){const n=ni(t,Array.isArray(a.initial)?a.initial[0]:a.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),c.push({animation:e})}let p=Boolean(c.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,s=!1,p?e(c):Promise.resolve()}return{animateChanges:r,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=r(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Er(),s=!0}}},t.createAxis=fo,t.createAxisDelta=po,t.createBox=yo,t.createDelta=mo,t.createGeneratorEasing=Ht,t.createProjectionNode=Aa,t.createRenderBatcher=N,t.createScopedAnimate=Pl,t.cubicBezier=T,t.cubicBezierAsString=un,t.defaultEasing=Te,t.defaultOffset=xe,t.defaultTransformValue=Ie,t.defaultValueTypes=Ci,t.degrees=dt,t.delay=fa,t.delayInSeconds=fa,t.dimensionValueTypes=wi,t.distance=ic,t.distance2D=function(t,e){const n=ic(t.x,e.x),i=ic(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=ta,t.easeIn=C,t.easeInOut=R,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=ve,t.fillWildcards=De,t.findDimensionValueType=Ti,t.findValueType=Ws,t.flushKeyframeResolvers=tn,t.followValue=js,t.frame=W,t.frameData=z,t.frameSteps=K,t.generateLinearEasing=Yt,t.getAnimatableNone=Li,t.getAnimationMap=Ln,t.getComputedStyle=ys,t.getDefaultTransition=Kn,t.getDefaultValueType=Bi,t.getEasingForSegment=j,t.getFeatureDefinitions=function(){return Do},t.getFinalKeyframe=Ae,t.getMixer=$t,t.getOptimisedAppearId=mi,t.getOriginIndex=Rs,t.getValueAsType=zi,t.getValueTransition=Nn,t.getVariableValue=Qn,t.getVariantContext=br,t.getViewAnimationLayerInfo=Qs,t.getViewAnimations=to,t.globalProjectionState=va,t.has2DTranslate=Io,t.hasReducedMotionListener=Po,t.hasScale=Oo,t.hasTransform=Fo,t.hasWarned=function(t){return g.has(t)},t.hex=ut,t.hover=function(t,e,n={}){const[i,s,o]=os(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||ss())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=vt,t.hslaToRgba=kt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Wi(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:nc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=ye,t.initPrefersReducedMotion=Eo,t.interpolate=ge,t.invisibleValues=Ot,t.isAnimationControls=vo,t.isBezierDefinition=O,t.isCSSVariableName=q,t.isCSSVariableToken=_,t.isControllingVariants=bo,t.isDeltaZero=Gr,t.isDragActive=ss,t.isDragging=is,t.isEasingArray=L,t.isElementKeyboardAccessible=cs,t.isElementTextInput=function(t){return us.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=ar,t.isGenerator=mn,t.isHTMLElement=qi,t.isKeyframesTarget=si,t.isMotionValue=li,t.isNear=Rr,t.isNodeOrChild=rs,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=as,t.isSVGElement=gs,t.isSVGSVGElement=Bs,t.isSVGTag=gr,t.isTransitionDefined=Xn,t.isVariantLabel=xo,t.isVariantNode=So,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&cn()||!e||"string"==typeof e&&(e in hn||cn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=ci,t.isZeroValueString=l,t.keyframes=be,t.makeAnimationInstant=Tn,t.mapEasingToNativeEasing=dn,t.mapValue=function(t,e,n,i){const s=Ls(e,n,i);return $s(()=>s(t.get()))},t.maxGeneratorDuration=Xt,t.measurePageBox=function(t,e,n){const i=_o(t,n),{scroll:s}=e;return s&&(Go(i.x,s.offset.x),Go(i.y,s.offset.y)),i},t.measureViewportBox=_o,t.memo=c,t.microtask=es,t.millisecondsToSeconds=f,t.mirrorEasing=b,t.mix=zt,t.mixArray=Nt,t.mixColor=jt,t.mixComplex=Ut,t.mixImmediate=Dt,t.mixLinearColor=Bt,t.mixNumber=Ct,t.mixObject=Wt,t.mixValues=oa,t.mixVisibility=Ft,t.motionValue=In,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t},t.nodeGroup=function(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Za);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=tt,t.numberValueTypes=Di,t.observeTimeline=Ds,t.optimizedAppearDataAttribute=pi,t.optimizedAppearDataId=di,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:t instanceof Document?t:Wi(t)[0]??document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=Jn,t.parseValueFromTransform=$e,t.percent=pt,t.pipe=h,t.pixelsToPercent=ir,t.positionalKeys=ii,t.prefersReducedMotion=Vo,t.press=function(t,e,n={}){const[i,s,o]=os(t,n),r=t=>{const i=t.currentTarget;if(!ms(t))return;if(fs.has(t))return;hs.add(i),n.stopPropagation&&fs.add(t);const o=e(i,t),r={...s,capture:!0},a=(t,e)=>{window.removeEventListener("pointerup",l,r),window.removeEventListener("pointercancel",c,r),hs.has(i)&&hs.delete(i),ms(t)&&"function"==typeof o&&o(t,{success:e})},l=t=>{a(t,i===window||i===document||n.useGlobalTarget||rs(i,t.target))},c=t=>{a(t,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",c,r)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),qi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=ds(()=>{if(hs.has(n))return;ps(n,"down");const t=ds(()=>{ps(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ps(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),cs(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=d,t.progressPercentage=gt,t.propEffect=Hi,t.propagateDirtyNodes=Ma,t.px=mt,t.readTransformValue=Ne,t.recordStats=function(){if(Cs.value)throw Cs.value=null,Cs.addProjectionMetrics=null,new Error("Stats are already being measured");const t=Cs;t.value={layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)}},t.removeAxisDelta=Wr,t.removeAxisTransforms=Ur,t.removeBoxTransforms=Yr,t.removeItem=n,t.removePointDelta=Nr,t.renderHTML=nr,t.renderSVG=vr,t.resize=ks,t.resolveElements=Wi,t.resolveMotionValue=ya,t.resolveTransition=$n,t.resolveVariant=ni,t.resolveVariantFromProps=ei,t.reverseEasing=S,t.rgbUnit=lt,t.rgba=ct,t.rootProjectionNode=_a,t.scale=nt,t.scaleCorrectors=rr,t.scalePoint=No,t.scrapeHTMLMotionValuesFromProps=lr,t.scrapeSVGMotionValuesFromProps=xr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||function(t){return t&&(t.target||t.offset)}(e)?Gl(n=>{t(n[e.axis].progress,n)},e):Ds(t,ec(e))}(t,s):function(t,e){const n=ec(e),i=e.target?Jl(e.offset):void 0,s=e.target?Dl(e.target)&&!!i:Dl();return t.attachTimeline({timeline:s?n:void 0,...i&&s&&{rangeStart:i.rangeStart,rangeEnd:i.rangeEnd},observe:t=>(t.pause(),Ds(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Gl,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?is[t]?null:(is[t]=!0,()=>{is[t]=!1}):is.x||is.y?null:(is.x=is.y=!0,()=>{is.x=is.y=!1})},t.setFeatureDefinitions=function(t){Do=t},t.setStyle=sn,t.setTarget=ai,t.spring=me,t.springValue=function(t,e){return js(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Rs(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=pn,t.statsBuffer=Cs,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=Qi,t.supportedWaapiEasing=hn,t.supportsBrowserAnimation=Pn,t.supportsFlags=on,t.supportsLinearEasing=cn,t.supportsPartialKeyframes=Ni,t.supportsScrollTimeline=an,t.supportsViewTimeline=ln,t.svgEffect=ts,t.sync=al,t.testValueType=xi,t.time=G,t.transform=Ls,t.transformAxis=Ho,t.transformBox=Zo,t.transformBoxPoints=Lo,t.transformPropOrder=Ue,t.transformProps=ze,t.transformValue=$s,t.transformValueTypes=ki,t.translateAxis=Go,t.updateMotionValuesFromProps=Ao,t.variantPriorityOrder=wo,t.variantProps=To,t.velocityPerSecond=y,t.vh=ft,t.visualElementStore=go,t.vw=yt,t.warnOnce=v,t.wrap=x});
|