framer-motion 12.24.7 → 12.24.9
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/dist/cjs/client.js +1 -1
- package/dist/cjs/{feature-bundle-C6mMBZjn.js → feature-bundle-Cw8jj9v7.js} +20 -7
- package/dist/cjs/{feature-bundle-C6mMBZjn.js.map → feature-bundle-Cw8jj9v7.js.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +16 -6
- package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -1
- package/dist/es/gestures/pan/PanSession.mjs +4 -1
- package/dist/es/gestures/pan/PanSession.mjs.map +1 -1
- package/dist/framer-motion.dev.js +53 -9
- package/dist/framer-motion.js +1 -1
- package/dist/projection.d.ts +912 -0
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-animate.js.map +1 -1
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js.map +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/size-rollup-motion.js.map +1 -1
- package/dist/size-rollup-scroll.js.map +1 -1
- package/package.json +4 -3
package/dist/framer-motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...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}const b=(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 P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function A(t){return"object"==typeof t&&null!==t}const M=t=>/^0[^.\s]+$/u.test(t);function C(t){let e;return()=>(void 0===e&&(e=t()),e)}const V=t=>t,k=(t,e)=>n=>e(t(n)),R=(...t)=>t.reduce(k),D=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class L{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(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 B=t=>1e3*t,O=t=>t/1e3;function j(t,e){return e?t*(1e3/e):0}const I=new Set;const F=(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 U(t,e,n,i){if(t===e&&n===i)return V;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 $=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,N=t=>e=>1-t(1-e),z=U(.33,1.53,.69,.99),Y=N(z),X=$(Y),H=t=>(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),K=t=>1-Math.sin(Math.acos(t)),G=N(K),_=$(K),q=U(.42,0,1,1),Z=U(0,0,.58,1),J=U(.42,0,.58,1);const Q=t=>Array.isArray(t)&&"number"!=typeof t[0];function tt(t,e){return Q(t)?t[F(0,t.length,e)]:t}const et=t=>Array.isArray(t)&&"number"==typeof t[0],nt={linear:V,easeIn:q,easeInOut:J,easeOut:Z,circIn:K,circInOut:_,circOut:G,backIn:Y,backInOut:X,backOut:z,anticipate:H},it=e=>{if(et(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return U(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==nt[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nt[e]):e},st=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ot={value:null,addProjectionMetrics:null};function rt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=st.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(u),e&&ot.value&&ot.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=P.useManualTiming?s.timestamp:performance.now();n=!1,P.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:st.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<st.length;e++)r[st[e]].cancel(t)},state:s,steps:r}}const{schedule:at,cancel:lt,state:ut,steps:ct}=rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:V,!0);let ht;function dt(){ht=void 0}const pt={now:()=>(void 0===ht&&pt.set(ut.isProcessing||P.useManualTiming?ut.timestamp:performance.now()),ht),set:t=>{ht=t,queueMicrotask(dt)}},mt={layout:0,mainThread:0,waapi:0},ft=t=>e=>"string"==typeof e&&e.startsWith(t),gt=ft("--"),yt=ft("var(--"),vt=t=>!!yt(t)&&xt.test(t.split("/*")[0].trim()),xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,wt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Tt={...wt,transform:t=>b(0,1,t)},bt={...wt,default:1},St=t=>Math.round(1e5*t)/1e5,Pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Et=/^(?:#[\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&&Et.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Mt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Pt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Ct={...wt,transform:t=>Math.round((t=>b(0,255,t))(t))},Vt={test:At("rgb","red"),parse:Mt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ct.transform(t)+", "+Ct.transform(e)+", "+Ct.transform(n)+", "+St(Tt.transform(i))+")"};const kt={test:At("#"),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:Vt.transform},Rt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Dt=Rt("deg"),Lt=Rt("%"),Bt=Rt("px"),Ot=Rt("vh"),jt=Rt("vw"),It=(()=>({...Lt,parse:t=>Lt.parse(t)/100,transform:t=>Lt.transform(100*t)}))(),Ft={test:At("hsl","hue"),parse:Mt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Lt.transform(St(e))+", "+Lt.transform(St(n))+", "+St(Tt.transform(i))+")"},Wt={test:t=>Vt.test(t)||kt.test(t)||Ft.test(t),parse:t=>Vt.test(t)?Vt.parse(t):Ft.test(t)?Ft.parse(t):kt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Vt.transform(t):Ft.transform(t),getAnimatableNone:t=>{const e=Wt.parse(t);return e.alpha=0,Wt.transform(e)}},Ut=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $t="number",Nt="color",zt=/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 Yt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(zt,t=>(Wt.test(t)?(i.color.push(o),s.push(Nt),n.push(Wt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push($t),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Xt(t){return Yt(t).values}function Ht(t){const{split:e,types:n}=Yt(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===$t?St(t[o]):e===Nt?Wt.transform(t[o]):t[o]}return s}}const Kt=t=>"number"==typeof t?0:Wt.test(t)?Wt.getAnimatableNone(t):t;const Gt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Pt)?.length||0)+(t.match(Ut)?.length||0)>0},parse:Xt,createTransformer:Ht,getAnimatableNone:function(t){const e=Xt(t);return Ht(t)(e.map(Kt))}};function _t(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 qt({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=_t(a,i,t+1/3),o=_t(a,i,t),r=_t(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 Zt(t,e){return n=>n>0?e:t}const Jt=(t,e,n)=>t+(e-t)*n,Qt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},te=[kt,Vt,Ft];function ee(e){const n=(i=e,te.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===Ft&&(s=qt(s)),s}const ne=(t,e)=>{const n=ee(t),i=ee(e);if(!n||!i)return Zt(t,e);const s={...n};return t=>(s.red=Qt(n.red,i.red,t),s.green=Qt(n.green,i.green,t),s.blue=Qt(n.blue,i.blue,t),s.alpha=Jt(n.alpha,i.alpha,t),Vt.transform(s))},ie=new Set(["none","hidden"]);function se(t,e){return ie.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function oe(t,e){return n=>Jt(t,e,n)}function re(t){return"number"==typeof t?oe:"string"==typeof t?vt(t)?Zt:Wt.test(t)?ne:ue:Array.isArray(t)?ae:"object"==typeof t?Wt.test(t)?ne:le:Zt}function ae(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>re(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function le(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=re(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const ue=(e,n)=>{const i=Gt.createTransformer(n),s=Yt(e),o=Yt(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?ie.has(e)&&!o.values.length||ie.has(n)&&!s.values.length?se(e,n):R(ae(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"),Zt(e,n))};function ce(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Jt(t,e,n);return re(t)(t,e)}const he=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>at.update(e,t),stop:()=>lt(e),now:()=>ut.isProcessing?ut.timestamp:pt.now()}},de=(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)})`},pe=2e4;function me(t){let e=0;let n=t.next(e);for(;!n.done&&e<pe;)e+=50,n=t.next(e);return e>=pe?1/0:e}function fe(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(me(i),pe);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:O(s)}}function ge(t,e,n){const i=Math.max(e-5,0);return j(n-t(i),e-i)}const ye=100,ve=10,xe=1,we=0,Te=800,be=.3,Se=.3,Pe={granular:.01,default:2},Ee={granular:.005,default:.5},Ae=.01,Me=10,Ce=.05,Ve=1,ke=.001;function Re({duration:e=Te,bounce:n=be,velocity:i=we,mass:s=xe}){let o,r;t.warning(e<=B(Me),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=b(Ce,Ve,a),e=b(Ae,Me,O(e)),a<1?(o=t=>{const n=t*a,s=n*e,o=n-i,r=Le(t,a),l=Math.exp(-s);return ke-o/r*l},r=t=>{const n=t*a*e,s=n*i+i,r=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),u=Le(Math.pow(t,2),a);return(-o(t)+ke>0?-1:1)*((s-r)*l)/u}):(o=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(i-t)));const l=function(t,e,n){let i=n;for(let n=1;n<De;n++)i-=t(i)/e(i);return i}(o,r,5/e);if(e=B(e),isNaN(l))return{stiffness:ye,damping:ve,duration:e};{const t=Math.pow(l,2)*s;return{stiffness:t,damping:2*a*Math.sqrt(s*t),duration:e}}}const De=12;function Le(t,e){return t*Math.sqrt(1-e*e)}const Be=["duration","bounce"],Oe=["stiffness","damping","mass"];function je(t,e){return e.some(e=>void 0!==t[e])}function Ie(t=Se,e=be){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:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:we,stiffness:ye,damping:ve,mass:xe,isResolvedFromDuration:!1,...t};if(!je(t,Oe)&&je(t,Be))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*b(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:xe,stiffness:s,damping:o}}else{const n=Re(t);e={...e,...n,mass:xe},e.isResolvedFromDuration=!0}return e}({...n,velocity:-O(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=O(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?Pe.granular:Pe.default),s||(s=v?Ee.granular:Ee.default),f<1){const t=Le(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?B(m):ge(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(me(w),pe),e=de(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Fe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g: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=Ie({keyframes:[d.value,p(d.value)],velocity:ge(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};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 We(e,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=e.length;if(t.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),n=[...n].reverse());const l=function(t,e,n){const i=[],s=n||P.mix||ce,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||V:e;o=R(t,o)}i.push(o)}return i}(n,s,o),u=l.length,c=t=>{if(a&&t<e[0])return n[0];let i=0;if(u>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=D(e[i],e[i+1],t);return l[i](s)};return i?t=>c(b(e[0],e[r-1],t)):c}function Ue(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=D(0,e,i);t.push(Jt(n,1,s))}}function $e(t){const e=[0];return Ue(e,t.length-1),e}function Ne(t,e){return t.map(t=>t*e)}function ze(t,e){return t.map(()=>e||J).splice(0,t.length-1)}function Ye({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Q(i)?i.map(it):it(i),o={done:!1,value:e[0]},r=We(Ne(n&&n.length===e.length?n:$e(e),t),e,{ease:Array.isArray(s)?s:ze(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}Ie.applyToOptions=t=>{const e=fe(t,100,Ie);return t.ease=e.ease,t.duration=B(e.duration),t.type="keyframes",t};const Xe=t=>null!==t;function He(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Xe),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ke={decay:Fe,inertia:Fe,tween:Ye,keyframes:Ye,spring:Ie};function Ge(t){"string"==typeof t.type&&(t.type=Ke[t.type])}class _e{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 qe=t=>t/100;class Ze extends _e{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!==pt.now()&&this.tick(pt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},mt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Ge(t);const{type:e=Ye,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Ye;a!==Ye&&"number"!=typeof r[0]&&(this.mixKeyframes=R(qe,ce(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=me(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+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:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(c){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=o)),v=b(0,1,n)*r}const w=y?{done:!1,value:u[0]}:x.next(v);s&&(w.value=s(w.value));let{done:T}=w;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&p!==Fe&&(w.value=He(u,this.options,f,this.speed)),m&&m(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+O(t)}get time(){return O(this.currentTime)}set time(t){t=B(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(pt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=he,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(pt.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,mt.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 Je(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Qe=t=>180*t/Math.PI,tn=t=>{const e=Qe(Math.atan2(t[1],t[0]));return nn(e)},en={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:tn,rotateZ:tn,skewX:t=>Qe(Math.atan(t[1])),skewY:t=>Qe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},nn=t=>((t%=360)<0&&(t+=360),t),sn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),on=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),rn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sn,scaleY:on,scale:t=>(sn(t)+on(t))/2,rotateX:t=>nn(Qe(Math.atan2(t[6],t[5]))),rotateY:t=>nn(Qe(Math.atan2(-t[2],t[0]))),rotateZ:tn,rotate:tn,skewX:t=>Qe(Math.atan(t[4])),skewY:t=>Qe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function an(t){return t.includes("scale")?1:0}function ln(t,e){if(!t||"none"===t)return an(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=rn,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=en,s=e}if(!s)return an(e);const o=i[e],r=s[1].split(",").map(cn);return"function"==typeof o?o(r):r[o]}const un=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ln(n,e)};function cn(t){return parseFloat(t.trim())}const hn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],dn=(()=>new Set(hn))(),pn=t=>t===wt||t===Bt,mn=new Set(["x","y","z"]),fn=hn.filter(t=>!mn.has(t));const gn={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})=>ln(e,"x"),y:(t,{transform:e})=>ln(e,"y")};gn.translateX=gn.x,gn.translateY=gn.y;const yn=new Set;let vn=!1,xn=!1,wn=!1;function Tn(){if(xn){const t=Array.from(yn).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 fn.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)})}xn=!1,vn=!1,yn.forEach(t=>t.complete(wn)),yn.clear()}function bn(){yn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function Sn(){wn=!0,bn(),Tn(),wn=!1}class Pn{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?(yn.add(this),vn||(vn=!0,at.read(bn),at.resolveKeyframes(Tn))):(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])}Je(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yn.delete(this)}cancel(){"scheduled"===this.state&&(yn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const En=t=>t.startsWith("--");function An(t,e,n){En(e)?t.style.setProperty(e,n):t.style[e]=n}const Mn=C(()=>void 0!==window.ScrollTimeline),Cn={};function Vn(t,e){const n=C(t);return()=>Cn[e]??n()}const kn=Vn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Rn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rn([0,.65,.55,1]),circOut:Rn([.55,0,1,.45]),backIn:Rn([.31,.01,.66,-.59]),backOut:Rn([.33,1.53,.69,.99])};function Ln(t,e){return t?"function"==typeof t?kn()?de(t,e):"ease-out":et(t)?Rn(t):Array.isArray(t)?t.map(t=>Ln(t,e)||Dn.easeOut):Dn[t]:void 0}function Bn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Ln(a,s);Array.isArray(h)&&(c.easing=h),ot.value&&mt.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return ot.value&&p.finished.finally(()=>{mt.waapi--}),p}function On(t){return"function"==typeof t&&"applyToOptions"in t}function jn({type:t,...e}){return On(t)&&kn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class In extends _e{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!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 u=jn(e);this.animation=Bn(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=He(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):An(n,i,t),this.animation.cancel()}l?.(),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 O(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+O(t)}get time(){return O(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=B(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&&Mn()?(this.animation.timeline=t,V):e(this)}}const Fn={anticipate:H,backInOut:X,circInOut:_};function Wn(t){"string"==typeof t.ease&&t.ease in Fn&&(t.ease=Fn[t.ease])}class Un extends In{constructor(t){Wn(t),Ge(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Ze({...o,autoplay:!1}),a=B(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Gt.test(t)&&"0"!==t||t.startsWith("url(")));function Nn(t){t.duration=0,t.type="keyframes"}const zn=new Set(["opacity","clipPath","filter","transform"]),Yn=C(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Yn()&&n&&zn.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Hn extends _e{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:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=pt.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||Pn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=pt.now(),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=$n(o,n),l=$n(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||On(i))&&s)}(e,o,r,a)||(!P.instantAnimations&&l||c?.(He(e,i,n)),e[0]=e[e.length-1],Nn(i),i.repeat=0);const h={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},d=!u&&Xn(h)?new Un({...h,element:h.motionValue.owner.current}):new Ze(h);d.finished.then(()=>this.notifyFinished()).catch(V),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(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 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 Kn{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 Gn(this.animations,"duration")}get iterationDuration(){return Gn(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 Gn(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 _n extends Kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class qn extends In{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Zn=new WeakMap,Jn=(t,e="")=>`${t}:${e}`;function Qn(t){const e=Zn.get(t)||new Map;return Zn.set(t,e),e}const ti=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ei(t){const e=ti.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function ni(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]=ei(e);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return E(t)?parseFloat(t):t}return vt(o)?ni(o,n,i+1):o}function ii(t,e){return t?.[e]??t?.default??t}const si=new Set(["width","height","top","left","right","bottom",...hn]),oi=t=>e=>e.test(t),ri=[wt,Bt,Lt,Dt,jt,Ot,{test:t=>"auto"===t,parse:t=>t}],ai=t=>ri.find(oi(t));function li(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||M(t))}const ui=new Set(["brightness","contrast","saturate","opacity"]);function ci(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Pt)||[];if(!i)return t;const s=n.replace(i,"");let o=ui.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const hi=/\b([a-z-]*)\(.*?\)/gu,di={...Gt,getAnimatableNone:t=>{const e=t.match(hi);return e?e.map(ci).join(" "):t}},pi={...wt,transform:Math.round},mi={rotate:Dt,rotateX:Dt,rotateY:Dt,rotateZ:Dt,scale:bt,scaleX:bt,scaleY:bt,scaleZ:bt,skew:Dt,skewX:Dt,skewY:Dt,distance:Bt,translateX:Bt,translateY:Bt,translateZ:Bt,x:Bt,y:Bt,z:Bt,perspective:Bt,transformPerspective:Bt,opacity:Tt,originX:It,originY:It,originZ:Bt},fi={borderWidth:Bt,borderTopWidth:Bt,borderRightWidth:Bt,borderBottomWidth:Bt,borderLeftWidth:Bt,borderRadius:Bt,radius:Bt,borderTopLeftRadius:Bt,borderTopRightRadius:Bt,borderBottomRightRadius:Bt,borderBottomLeftRadius:Bt,width:Bt,maxWidth:Bt,height:Bt,maxHeight:Bt,top:Bt,right:Bt,bottom:Bt,left:Bt,inset:Bt,insetBlock:Bt,insetBlockStart:Bt,insetBlockEnd:Bt,insetInline:Bt,insetInlineStart:Bt,insetInlineEnd:Bt,padding:Bt,paddingTop:Bt,paddingRight:Bt,paddingBottom:Bt,paddingLeft:Bt,paddingBlock:Bt,paddingBlockStart:Bt,paddingBlockEnd:Bt,paddingInline:Bt,paddingInlineStart:Bt,paddingInlineEnd:Bt,margin:Bt,marginTop:Bt,marginRight:Bt,marginBottom:Bt,marginLeft:Bt,marginBlock:Bt,marginBlockStart:Bt,marginBlockEnd:Bt,marginInline:Bt,marginInlineStart:Bt,marginInlineEnd:Bt,backgroundPositionX:Bt,backgroundPositionY:Bt,...mi,zIndex:pi,fillOpacity:Tt,strokeOpacity:Tt,numOctaves:pi},gi={...fi,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:di,WebkitFilter:di},yi=t=>gi[t];function vi(t,e){let n=yi(t);return n!==di&&(n=Gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xi=new Set(["auto","none","0"]);class wi extends Pn{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(),vt(i))){const s=ni(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!si.has(n)||2!==t.length)return;const[i,s]=t,o=ai(i),r=ai(s);if(o!==r)if(pn(o)&&pn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else gn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||li(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&&!xi.has(e)&&Yt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=vi(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=gn[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]=gn[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 Ti=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","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","backgroundPositionX","backgroundPositionY"]);function bi(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Ti.has(e)&&(t[n]=t[n]+"px")}const Si=C(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Pi=new Set(["opacity","clipPath","filter","transform"]);function Ei(t,e,n){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)}function Ai(t){return(e,n)=>{const i=Ei(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Mi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Ci{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?Mi(i,fi[t]):i,n&&at.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&<(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}destroy(){for(const t of this.values.values())t.onRemove()}}function Vi(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new Ci;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const ki=(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")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const 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)},Ri=Ai(Vi(ki)),Di=Vi((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Li(t){return A(t)&&"offsetHeight"in t}const Bi={current:void 0};class Oi{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=pt.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=pt.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 L);const n=this.events[t].add(e);return"change"===t?()=>{n(),at.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 Bi.current&&Bi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=pt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return j(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 ji(t,e){return new Oi(t,e)}const Ii={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Fi=new Set(["originX","originY","originZ"]),Wi=(t,e,n,i)=>{let s,o;return dn.has(n)?(e.get("transform")||(Li(t)||e.get("transformBox")||Wi(t,e,"transformBox",new Oi("fill-box")),e.set("transform",new Oi("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<hn.length;i++){const s=hn[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${Ii[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):Fi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new Oi(""),()=>{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=En(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Ui=Ai(Vi(Wi)),$i=Bt.transform;const Ni=Ai(Vi((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return at.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",$i(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new Oi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${$i(n)} ${$i(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return ki(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Wi:ki)(t,e,n,i)}));const{schedule:zi,cancel:Yi}=rt(queueMicrotask,!1),Xi={x:!1,y:!1};function Hi(){return Xi.x||Xi.y}function Ki(t){return"x"===t||"y"===t?Xi[t]?null:(Xi[t]=!0,()=>{Xi[t]=!1}):Xi.x||Xi.y?null:(Xi.x=Xi.y=!0,()=>{Xi.x=Xi.y=!1})}function Gi(t,e){const n=Ei(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function _i(t){return!("touch"===t.pointerType||Hi())}function qi(t,e,n={}){const[i,s,o]=Gi(t,n),r=t=>{if(!_i(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{_i(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}const Zi=(t,e)=>!!e&&(t===e||Zi(t,e.parentElement)),Ji=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Qi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ts=new WeakSet;function es(t){return e=>{"Enter"===e.key&&t(e)}}function ns(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function is(t){return Ji(t)&&!Hi()}function ss(t,e,n={}){const[i,s,o]=Gi(t,n),r=t=>{const i=t.currentTarget;if(!is(t))return;ts.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ts.has(i)&&ts.delete(i),is(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Zi(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Li(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=es(()=>{if(ts.has(n))return;ns(n,"down");const t=es(()=>{ns(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ns(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Qi.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function os(t,e){const n=window.getComputedStyle(t);return En(e)?n.getPropertyValue(e):n[e]}function rs(t){return A(t)&&"ownerSVGElement"in t}const as=new WeakMap;let ls;const us=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:rs(i)&&"getBBox"in i?i.getBBox()[e]:i[n],cs=us("inline","width","offsetWidth"),hs=us("block","height","offsetHeight");function ds({target:t,borderBoxSize:e}){as.get(t)?.forEach(n=>{n(t,{get width(){return cs(t,e)},get height(){return hs(t,e)}})})}function ps(t){t.forEach(ds)}function ms(t,e){ls||"undefined"!=typeof ResizeObserver&&(ls=new ResizeObserver(ps));const n=Ei(t);return n.forEach(t=>{let n=as.get(t);n||(n=new Set,as.set(t,n)),n.add(e),ls?.observe(t)}),()=>{n.forEach(t=>{const n=as.get(t);n?.delete(e),n?.size||ls?.unobserve(t)})}}const fs=new Set;let gs;function ys(t){return fs.add(t),gs||(gs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};fs.forEach(e=>e(t))},window.addEventListener("resize",gs)),()=>{fs.delete(t),fs.size||"function"!=typeof gs||(window.removeEventListener("resize",gs),gs=void 0)}}function vs(t,e){return"function"==typeof t?ys(t):ms(t,e)}function xs(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return at.preUpdate(i,!0),()=>lt(i)}function ws(){const{value:t}=ot;null!==t?(t.frameloop.rate.push(ut.delta),t.animations.mainThread.push(mt.mainThread),t.animations.waapi.push(mt.waapi),t.animations.layout.push(mt.layout)):lt(ws)}function Ts(t){return t.reduce((t,e)=>t+e,0)/t.length}function bs(t,e=Ts){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ss=t=>Math.round(1e3/t);function Ps(){ot.value=null,ot.addProjectionMetrics=null}function Es(){const{value:t}=ot;if(!t)throw new Error("Stats are not being measured");Ps(),lt(ws);const e={frameloop:{setup:bs(t.frameloop.setup),rate:bs(t.frameloop.rate),read:bs(t.frameloop.read),resolveKeyframes:bs(t.frameloop.resolveKeyframes),preUpdate:bs(t.frameloop.preUpdate),update:bs(t.frameloop.update),preRender:bs(t.frameloop.preRender),render:bs(t.frameloop.render),postRender:bs(t.frameloop.postRender)},animations:{mainThread:bs(t.animations.mainThread),waapi:bs(t.animations.waapi),layout:bs(t.animations.layout)},layoutProjection:{nodes:bs(t.layoutProjection.nodes),calculatedTargetDeltas:bs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:bs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ss(n.min),n.max=Ss(n.max),n.avg=Ss(n.avg),[n.min,n.max]=[n.max,n.min],e}function As(t){return rs(t)&&"svg"===t.tagName}function Ms(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Cs(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=We(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Vs(t){const e=[];Bi.current=e;const n=t();Bi.current=void 0;const i=ji(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>at.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),lt(i)})}(e,i,t),i}const ks=t=>Boolean(t&&t.getVelocity);function Rs(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)};if(t.attach((e,i)=>{r=e,s=t=>i(Ds(t,a)),at.postRender(()=>{l(),o=new Ze({keyframes:[Ls(t.get()),Ls(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),ks(e)){const n=e.on("change",e=>t.set(Ds(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Ds(t,e){return e?t+e:t}function Ls(t){return"number"==typeof t?t:parseFloat(t)}const Bs=[...ri,Wt,Gt],Os=t=>Bs.find(oi(t));function js(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Is={},Fs=null;const Ws=(t,e)=>{Is[t]=e},Us=()=>{Fs||(Fs=document.createElement("style"),Fs.id="motion-view");let t="";for(const e in Is){const n=Is[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Fs.textContent=t,document.head.appendChild(Fs),Is={}},$s=()=>{Fs&&Fs.parentElement&&Fs.parentElement.removeChild(Fs)};function Ns(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function zs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Ys(){return document.getAnimations().filter(zs)}const Xs=["layout","enter","exit","new","old"];function Hs(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Ws(":root",{"view-transition-name":"none"}),Ws("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Us();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{$s()}),new Promise(t=>{s.ready.then(()=>{const e=Ys(),s=[];n.forEach((t,e)=>{for(const n of Xs){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...ii(i,t),...ii(r,t)},l=js(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=B(o.duration)),o.delay&&(o.delay=B(o.delay));const u=new In({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(u)}}});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=Ns(o);if(!r)continue;const a=n.get(r.layer);if(a)Ks(a,"enter")&&Ks(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new qn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...ii(i,n)};o.duration&&(o.duration=B(o.duration)),o=jn(o);const a=Ln(o.ease,o.duration);e.updateTiming({delay:B(o.delay??0),duration:o.duration,easing:a}),s.push(new qn(t))}}t(new Kn(s))})})}function Ks(t,e){return t?.[e]?.keyframes.opacity}let Gs=[],_s=null;function qs(){_s=null;const[t]=Gs;var e;t&&(w(Gs,e=t),_s=e,Hs(e).then(t=>{e.notifyReady(t),t.finished.finally(qs)}))}function Zs(){for(let t=Gs.length-1;t>=0;t--){const e=Gs[t],{interrupt:n}=e.options;if("immediate"===n){const n=Gs.slice(0,t+1).map(t=>t.update),i=Gs.slice(t+1);e.update=()=>{n.forEach(t=>t())},Gs=[e,...i];break}}_s&&"immediate"!==Gs[0]?.options.interrupt||qs()}class Js{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=V,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Gs.push(n),zi.render(Zs)}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: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 Qs=at,to=st.reduce((t,e)=>(t[e]=t=>lt(t),t),{}),eo=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function no(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function io(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=no(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():no(t[e],null)}}}}(...t),t)}class so extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=Li(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function oo({children:t,isPresent:n,anchorX:s,root:o}){const r=e.useId(),a=e.useRef(null),l=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=e.useContext(eo),c=t.props?.ref??t?.ref,h=io(a,c);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:c,right:h}=l.current;if(n||!a.current||!t||!e)return;const d="left"===s?`left: ${c}`:`right: ${h}`;a.current.dataset.motionPopId=r;const p=document.createElement("style");u&&(p.nonce=u);const m=o??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{m.contains(p)&&m.removeChild(p)}},[n]),d(so,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(t,{ref:h})})}const ro=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u,root:c})=>{const h=f(ao),p=e.useId();let m=!0,g=e.useMemo(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{h.set(t,!0);for(const t of h.values())if(!t)return;o&&o()},register:t=>(h.set(t,!1),()=>h.delete(t))}),[s,h,o]);return a&&m&&(g={...g}),e.useMemo(()=>{h.forEach((t,e)=>h.set(e,!1))},[s]),i.useEffect(()=>{!s&&!h.size&&o&&o()},[s]),"popLayout"===l&&(t=d(oo,{isPresent:s,anchorX:u,root:c,children:t})),d(v.Provider,{value:g,children:t})};function ao(){return new Map}function lo(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const uo=t=>t.key||"";function co(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const ho=e.createContext(null);function po(t){return t.max-t.min}function mo(t,e,n,i=.5){t.origin=i,t.originPoint=Jt(e.min,e.max,t.origin),t.scale=po(n)/po(e),t.translate=Jt(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 fo(t,e,n,i){mo(t.x,e.x,n.x,i?i.originX:void 0),mo(t.y,e.y,n.y,i?i.originY:void 0)}function go(t,e,n){t.min=n.min+e.min,t.max=t.min+po(e)}function yo(t,e,n){t.min=e.min-n.min,t.max=t.min+po(e)}function vo(t,e,n){yo(t.x,e.x,n.x),yo(t.y,e.y,n.y)}const xo=t=>!t.isLayoutDirty&&t.willUpdate(!1);function wo(){const t=new Set,e=new WeakMap,n=()=>t.forEach(xo);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}}const To=t=>null!==t;const bo={type:"spring",stiffness:500,damping:25,restSpeed:10},So={type:"keyframes",duration:.8},Po={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Eo=(t,{keyframes:e})=>e.length>2?So:dn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:bo:Po;const Ao=(t,e,n,i={},s,o)=>r=>{const a=ii(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||Object.assign(c,Eo(t,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(Nn(c),0===c.delay&&(h=!0)),(P.instantAnimations||P.skipAnimations)&&(h=!0,Nn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(To),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(c.keyframes,a);if(void 0!==t)return void at.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new Ze(c):new Hn(c)};function Mo(t,e,n){const i=ks(t)?t:ji(t);return i.start(Ao("",i,e,n)),i.animation}const Co=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vo="framerAppearId",ko="data-"+Co(Vo);function Ro(t){return t.props[ko]}const Do=(t,e)=>t.depth-e.depth;class Lo{constructor(){this.children=[],this.isDirty=!1}add(t){x(this.children,t),this.isDirty=!0}remove(t){w(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Do),this.isDirty=!1,this.children.forEach(t)}}function Bo(t,e){const n=pt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(lt(i),t(o-e))};return at.setup(i,!0),()=>lt(i)}function Oo(t){return ks(t)?t.get():t}const jo=["TopLeft","TopRight","BottomLeft","BottomRight"],Io=jo.length,Fo=t=>"string"==typeof t?parseFloat(t):t,Wo=t=>"number"==typeof t||Bt.test(t);function Uo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const $o=zo(0,.5,G),No=zo(.5,.95,V);function zo(t,e,n){return i=>i<t?0:i>e?1:n(D(t,e,i))}function Yo(t,e){t.min=e.min,t.max=e.max}function Xo(t,e){Yo(t.x,e.x),Yo(t.y,e.y)}function Ho(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ko(t){return void 0===t||1===t}function Go({scale:t,scaleX:e,scaleY:n}){return!Ko(t)||!Ko(e)||!Ko(n)}function _o(t){return Go(t)||qo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function qo(t){return Zo(t.x)||Zo(t.y)}function Zo(t){return t&&"0%"!==t}function Jo(t,e,n){return n+e*(t-n)}function Qo(t,e,n,i,s){return void 0!==s&&(t=Jo(t,s,i)),Jo(t,n,i)+e}function tr(t,e=0,n=1,i,s){t.min=Qo(t.min,e,n,i,s),t.max=Qo(t.max,e,n,i,s)}function er(t,{x:e,y:n}){tr(t.x,e.translate,e.scale,e.originPoint),tr(t.y,n.translate,n.scale,n.originPoint)}const nr=.999999999999,ir=1.0000000000001;function sr(t,e){t.min=t.min+e,t.max=t.max+e}function or(t,e,n,i,s=.5){tr(t,e,n,Jt(t.min,t.max,s),i)}function rr(t,e){or(t.x,e.x,e.scaleX,e.scale,e.originX),or(t.y,e.y,e.scaleY,e.scale,e.originY)}function ar(t,e,n,i,s){return t=Jo(t-=e,1/n,i),void 0!==s&&(t=Jo(t,1/s,i)),t}function lr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Lt.test(e)&&(e=parseFloat(e),e=Jt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Jt(o.min,o.max,i);t===o&&(a-=e),t.min=ar(t.min,e,n,a,s),t.max=ar(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ur=["x","scaleX","originX"],cr=["y","scaleY","originY"];function hr(t,e,n,i){lr(t.x,e,ur,n?n.x:void 0,i?i.x:void 0),lr(t.y,e,cr,n?n.y:void 0,i?i.y:void 0)}const dr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function pr(t){return 0===t.translate&&1===t.scale}function mr(t){return pr(t.x)&&pr(t.y)}function fr(t,e){return t.min===e.min&&t.max===e.max}function gr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function yr(t,e){return gr(t.x,e.x)&&gr(t.y,e.y)}function vr(t){return po(t.x)/po(t.y)}function xr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class wr{constructor(){this.members=[]}add(t){x(this.members,t),t.scheduleRender()}remove(t){if(w(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){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Tr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const br={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Bt.test(t))return t;t=parseFloat(t)}return`${Tr(t,e.target.x)}% ${Tr(t,e.target.y)}%`}},Sr={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Gt.parse(t);if(s.length>5)return i;const o=Gt.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 u=Jt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},Pr={borderRadius:{...br,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:br,borderTopRightRadius:br,borderBottomLeftRadius:br,borderBottomRightRadius:br,boxShadow:Sr};function Er(t){return[t("x"),t("y")]}const Ar={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Cr=["","X","Y","Z"];let Vr=0;function kr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Rr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ro(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",at,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Rr(i)}function Dr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Vr++,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,ot.value&&(Mr.nodes=Mr.calculatedTargetDeltas=Mr.calculatedProjections=0),this.nodes.forEach(Or),this.nodes.forEach(Nr),this.nodes.forEach(zr),this.nodes.forEach(jr),ot.addProjectionMetrics&&ot.addProjectionMetrics(Mr)},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 Lo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new L),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=rs(e)&&!As(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;at.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=Bo(s,250),Ar.hasAnimatedSinceResize&&(Ar.hasAnimatedSinceResize=!1,this.nodes.forEach($r)))})}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()||_r,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!yr(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...ii(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||$r(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(),lt(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(Yr),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&&Rr(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,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())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Fr);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Wr);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ur),this.nodes.forEach(Lr),this.nodes.forEach(Br)):this.nodes.forEach(Wr),this.clearAllSnapshots();const t=pt.now();ut.delta=b(0,1e3/60,t-ut.timestamp),ut.timestamp=t,ut.isProcessing=!0,ct.update.process(ut),ct.preRender.process(ut),ct.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ir),this.sharedNodes.forEach(Xr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||po(this.snapshot.measuredBox.x)||po(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={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=i(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(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!mr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||_o(this.latestValues)||o)&&(s(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)),Jr((i=n).x),Jr(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(ta))){const{scroll:t}=this.root;t&&(sr(e.x,t.offset.x),sr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Xo(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&&Xo(e,t),sr(e.x,s.offset.x),sr(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Xo(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&rr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),_o(i.latestValues)&&rr(n,i.latestValues)}return _o(this.latestValues)&&rr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Xo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!_o(n.latestValues))continue;Go(n.latestValues)&&n.updateSnapshot();const i=dr();Xo(i,n.measurePageBox()),hr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return _o(this.latestValues)&&hr(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!==ut.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=ut.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,go(r.x,a.x,l.x),go(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Xo(this.target,this.layout.layoutBox),er(this.target,this.targetDelta)):Xo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,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),ot.value&&Mr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Go(this.parent.latestValues)&&!qo(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}},vo(this.relativeTargetOrigin,e,n),Xo(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===ut.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;Xo(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(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&&rr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,er(t,r)),i&&_o(o.latestValues)&&rr(t,o.latestValues))}e.x<ir&&e.x>nr&&(e.x=1),e.y<ir&&e.y>nr&&(e.y=1)}(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?(Ho(this.prevProjectionDelta.x,this.projectionDelta.x),Ho(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),fo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&xr(this.projectionDelta.x,this.prevProjectionDelta.x)&&xr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),ot.value&&Mr.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){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={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 r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Gr));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Hr(o.x,t.x,n),Hr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Kr(t.x,e.x,n.x,i),Kr(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,fr(l.x,d.x)&&fr(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Xo(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Jt(0,n.opacity??1,$o(i)),t.opacityExit=Jt(e.opacity??1,0,No(i))):o&&(t.opacity=Jt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Io;s++){const o=`border${jo[s]}Radius`;let r=Uo(e,o),a=Uo(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Wo(r)===Wo(a)?(t[o]=Math.max(Jt(Fo(r),Fo(a),i),0),(Lt.test(a)||Lt.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Jt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),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&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{Ar.hasAnimatedSinceResize=!0,mt.layout++,this.motionValue||(this.motionValue=ji(0)),this.currentAnimation=Mo(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{mt.layout--},onComplete:()=>{mt.layout--,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&&Qr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=po(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=po(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Xo(e,n),rr(e,s),fo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new wr);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&&kr("z",t,i,this.animationValues);for(let e=0;e<Cr.length;e++)kr(`rotate${Cr[e]}`,t,i,this.animationValues),kr(`skew${Cr[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=Oo(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=Oo(e?.pointerEvents)||""),void(this.hasProjected&&!_o(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(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,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}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"}(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 Pr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Pr[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?Oo(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Fr),this.root.sharedNodes.clear()}}}function Lr(t){t.updateLayout()}function Br(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;"size"===s?Er(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=po(i);i.min=n[t].min,i.max=i.min+s}):Qr(s,e.layoutBox,n)&&Er(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=po(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}};fo(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?fo(a,t.applyTransform(i,!0),e.measuredBox):fo(a,n,e.layoutBox);const l=!mr(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};vo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};vo(a,n,o.layoutBox),yr(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Or(t){ot.value&&Mr.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 jr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ir(t){t.clearSnapshot()}function Fr(t){t.clearMeasurements()}function Wr(t){t.isLayoutDirty=!1}function Ur(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function $r(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Nr(t){t.resolveTargetDelta()}function zr(t){t.calcProjection()}function Yr(t){t.resetSkewAndRotation()}function Xr(t){t.removeLeadSnapshot()}function Hr(t,e,n){t.translate=Jt(e.translate,0,n),t.scale=Jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Kr(t,e,n,i){t.min=Jt(e.min,n.min,i),t.max=Jt(e.max,n.max,i)}function Gr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const _r={duration:.45,ease:[.4,0,.1,1]},qr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Zr=qr("applewebkit/")&&!qr("chrome/")?Math.round:V;function Jr(t){t.min=Zr(t.min),t.max=Zr(t.max)}function Qr(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=vr(e),s=vr(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function ta(t){return t!==t.root&&t.scroll?.wasRoot}function ea(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const na=Dr({attachResizeListener:(t,e)=>ea(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ia={current:void 0},sa=Dr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ia.current){const t=new na({});t.mount(window),t.setOptions({layoutScroll:!0}),ia.current=t}return ia.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function oa({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ra(t,e){return oa(function(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}}(t.getBoundingClientRect(),e))}const aa={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"]},la={};for(const t in aa)la[t]={isEnabled:e=>aa[t].some(t=>!!e[t])};const ua={current:null},ca={current:!1};function ha(){if(ca.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ua.current=t.matches;t.addEventListener("change",e),e()}else ua.current=!1}const da=new WeakMap;function pa(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ma(t){return"string"==typeof t||Array.isArray(t)}const fa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ga=["initial",...fa];function ya(t){return pa(t.animate)||ga.some(e=>ma(t[e]))}function va(t){return Boolean(ya(t)||t.variants)}function xa(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function wa(t,e,n,i){if("function"==typeof e){const[s,o]=xa(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]=xa(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Ta=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ba{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Pn,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=pt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,at.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;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=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=ya(e),this.isVariantNode=va(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]&&ks(e)&&e.set(a[t])}}mount(t){this.current=t,da.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:(ca.current||ha(),this.shouldReduceMotion=ua.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(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=dn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&at.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 la){const e=la[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<Ta.length;e++){const n=Ta[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=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ks(s))t.addValue(i,s);else if(ks(o))t.addValue(i,ji(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,ji(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);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=ji(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&&(E(n)||M(n))?n=parseFloat(n):!Os(n)&&Gt.test(e)&&(n=vi(t,e)),this.setBaseTarget(t,ks(n)?n.get():n)),ks(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=wa(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||ks(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 L),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){zi.render(this.render)}}class Sa extends ba{constructor(){super(...arguments),this.KeyframeResolver=wi}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;ks(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const Pa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ea=hn.length;function Aa(t,e,n){let i="",s=!0;for(let o=0;o<Ea;o++){const r=hn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Mi(a,fi[r]);if(!l){s=!1;i+=`${Pa[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Ma(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(dn.has(t))r=!0;else if(gt(t))s[t]=n;else{const e=Mi(n,fi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Aa(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 Ca(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 Va(t,{layout:e,layoutId:n}){return dn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Pr[t]||"opacity"===t)}function ka(t,e,n){const{style:i}=t,s={};for(const o in i)(ks(i[o])||e.style&&ks(e.style[o])||Va(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class Ra extends Sa{constructor(){super(...arguments),this.type="html",this.renderInstance=Ca}readValueFromInstance(t,e){if(dn.has(e))return this.projection?.isProjecting?an(e):un(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(gt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ra(t,e)}build(t,e,n){Ma(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ka(t,e,n)}}function Da(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>at.postRender(s),[s]),n]}const La=t=>!0===t,Ba=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(ho),[r,a]=Da(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>La(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:La(i)&&s.group||wo()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Oa=e.createContext({strict:!1});function ja(t){for(const e in t)la[e]={...la[e],...t[e]}}function Ia(t){return"function"==typeof t}const Fa=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wa(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Fa.has(t)}let Ua=t=>!Wa(t);function $a(t){"function"==typeof t&&(Ua=e=>e.startsWith("on")?!Wa(e):t(e))}try{$a(require("@emotion/is-prop-valid").default)}catch{}function Na(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Ua(s)||!0===n&&Wa(s)||!e&&!Wa(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const za=e.createContext(null),Ya={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xa={offset:"strokeDashoffset",array:"strokeDasharray"};const Ha=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ka(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Ma(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);for(const t of Ha)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ya:Xa;t[o.offset]=Bt.transform(-i);const r=Bt.transform(e),a=Bt.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const Ga=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"]),_a=t=>"string"==typeof t&&"svg"===t.toLowerCase();function qa(t,e,n){const i=ka(t,e,n);for(const n in t)if(ks(t[n])||ks(e[n])){i[-1!==hn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Za extends Sa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(dn.has(e)){const t=yi(e);return t&&t.default||0}return e=Ga.has(e)?e:Co(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return qa(t,e,n)}build(t,e,n){Ka(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){Ca(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ga.has(n)?n:Co(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=_a(t.tagName),super.mount(t)}}const Ja=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Qa(t){return"string"==typeof t&&!t.includes("-")&&!!(Ja.indexOf(t)>-1||/[A-Z]/u.test(t))}const tl=(t,n)=>n.isSVG??Qa(t)?new Za(n):new Ra(n,{allowProjection:t!==e.Fragment}),el=e.createContext({});function nl(t){const{initial:n,animate:i}=function(t,e){if(ya(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ma(e)?e:void 0,animate:ma(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(el));return e.useMemo(()=>({initial:n,animate:i}),[il(n),il(i)])}function il(t){return Array.isArray(t)?t.join(" "):t}const sl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ol(t,e,n){for(const i in e)ks(e[i])||Va(i,n)||(t[i]=e[i])}function rl(t,n){const i={};return ol(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Ma(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function al(t,e){const n={},i=rl(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const ll=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function ul(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ka(e,n,_a(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};ol(e,t.style,t),o.style={...e,...o.style}}return o}function cl(t,n,i,{latestValues:s},o,r=!1,a){const l=(a??Qa(t)?ul:al)(n,s,o,t),u=Na(n,"string"==typeof t,r),c=t!==e.Fragment?{...u,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>ks(h)?h.get():h,[h]);return e.createElement(t,{...c,children:d})}function hl(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Oo(o[t]);let{initial:r,animate:a}=t;const l=ya(t),u=va(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!pa(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=wa(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const dl=t=>(n,i)=>{const s=e.useContext(el),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:hl(n,i,s,t),renderState:e()}}(t,n,s,o);return i?r():f(r)},pl=dl({scrapeMotionValuesFromProps:ka,createRenderState:sl}),ml=dl({scrapeMotionValuesFromProps:qa,createRenderState:ll}),fl=Symbol.for("motionComponentSymbol");function gl(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function yl(t,e){if("function"==typeof t)return t(e);gl(t)&&(t.current=e)}function vl(t,n,i){const s=e.useRef(null);return e.useCallback(e=>{if(e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i)if(e){const t=yl(i,e);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):yl(i,e)},[n,t,i])}const xl=e.createContext({});function wl(t,n,i,s,o,r){const{visualElement:a}=e.useContext(el),l=e.useContext(Oa),u=e.useContext(v),c=e.useContext(eo).reducedMotion,h=e.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:n,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c,isSVG:r}));const d=h.current,p=e.useContext(xl);!d||d.projection||!o||"html"!==d.type&&"svg"!==d.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Tl(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&gl(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,i,o,p);const m=e.useRef(!1);e.useInsertionEffect(()=>{d&&m.current&&d.update(i,u)});const f=i[ko],g=e.useRef(Boolean(f)&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return y(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),e.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),g.current=!1),d.enteringChildren=void 0)}),d}function Tl(t){if(t)return!1!==t.options.allowProjection?t.projection:Tl(t.parent)}function bl(t,{forwardMotionProps:n=!1,type:i}={},s,o){s&&ja(s);const r=i?"svg"===i:Qa(t),a=r?ml:pl;function l(i,s){let l;const u={...e.useContext(eo),...i,layoutId:Sl(i)},{isStatic:c}=u,h=nl(i),m=a(i,c);if(!c&&g){e.useContext(Oa).strict;const n=function(t){const{drag:e,layout:n}=la;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=n.MeasureLayout,h.visualElement=wl(t,m,u,o,n.ProjectionNode,r)}return p(el.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...u}):null,cl(t,i,vl(m,h.visualElement,s),m,c,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const u=e.forwardRef(l);return u[fl]=t,u}function Sl({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function Pl(t,e){if("undefined"==typeof Proxy)return bl;const n=new Map,i=(n,i)=>bl(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(s,o)=>"create"===o?i:(n.has(o)||n.set(o,bl(o,void 0,t,e)),n.get(o))})}function El(t,e,n){const i=t.getProps();return wa(i,e,void 0!==n?n:i.custom,t)}const Al=t=>Array.isArray(t);function Ml(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ji(n))}function Cl(t){return Al(t)?t[t.length-1]||0:t}function Vl(t,e){const n=El(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Ml(t,e,Cl(o[e]))}}function kl(t,e){const n=t.getValue("willChange");if(i=n,Boolean(ks(i)&&i.add))return n.add(e);if(!n&&P.WillChange){const n=new P.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Rl({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Dl(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||u&&Rl(u,e))continue;const r={delay:n,...ii(o||{},e)},c=i.get();if(void 0!==c&&!i.isAnimating&&!Array.isArray(s)&&s===c&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=Ro(t);if(n){const t=window.MotionHandoffAnimation(n,e,at);null!==t&&(r.startTime=t,h=!0)}}kl(t,e),i.start(Ao(e,i,s,t.shouldReduceMotion&&si.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{at.update(()=>{r&&Vl(t,r)})}),l}function Ll(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}function Bl(t,e,n={}){const i=El(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(Dl(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(Bl(l,e,{...r,delay:n+("function"==typeof i?0:i)+Ll(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 Ol(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Bl(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Bl(t,e,n);else{const s="function"==typeof e?El(t,e,n.custom):e;i=Promise.all(Dl(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function jl(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 Il=ga.length;function Fl(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Fl(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Il;n++){const i=ga[n],s=t.props[i];(ma(s)||!1===s)&&(e[i]=s)}return e}const Wl=[...fa].reverse(),Ul=fa.length;function $l(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ol(t,e,n)))}(t),n=Yl(),i=!0;const s=e=>(n,i)=>{const s=El(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 o(o){const{props:r}=t,a=Fl(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Ul;e++){const d=Wl[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=ma(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||pa(m)||"boolean"==typeof m)continue;const v=Nl(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const T=Array.isArray(m)?m:[m];let b=T.reduce(s(d),{});!1===g&&(b={});const{prevResolvedValues:S={}}=p,P={...S,...b},E=e=>{x=!0,u.has(e)&&(w=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Al(e)&&Al(n)?!jl(e,n):e!==n,i?null!=e?E(t):u.add(t):void 0!==e&&u.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const A=y&&v;x&&(!A||w)&&l.push(...T.map(e=>{const n={type:d};if("string"==typeof e&&i&&!A&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=El(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Ll(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=El(t,Array.isArray(r.initial)?r.initial[0]:r.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}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,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=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Yl()}}}function Nl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!jl(e,t)}function zl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yl(){return{animate:zl(!0),whileInView:zl(),whileHover:zl(),whileTap:zl(),whileDrag:zl(),whileFocus:zl(),exit:zl()}}class Xl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Hl=0;const Kl={animation:{Feature:class extends Xl{constructor(t){super(t),t.animationState||(t.animationState=$l(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();pa(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Xl{constructor(){super(...arguments),this.id=Hl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Gl(t){return{point:{x:t.pageX,y:t.pageY}}}const _l=t=>e=>Ji(e)&&t(e,Gl(e));function ql(t,e,n,i){return ea(t,e,_l(n),i)}const Zl=({current:t})=>t?t.ownerDocument.defaultView:null,Jl=(t,e)=>Math.abs(t-e);function Ql(t,e){const n=Jl(t.x,e.x),i=Jl(t.y,e.y);return Math.sqrt(n**2+i**2)}class tu{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=iu(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ql(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ut;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=eu(e,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=iu("pointercancel"===t.type?this.lastMoveEventInfo:eu(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Ji(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const r=eu(Gl(t),this.transformPagePoint),{point:a}=r,{timestamp:l}=ut;this.history=[{...a,timestamp:l}];const{onSessionStart:u}=e;u&&u(t,iu(r,this.history)),this.removeListeners=R(ql(this.contextWindow,"pointermove",this.handlePointerMove),ql(this.contextWindow,"pointerup",this.handlePointerUp),ql(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),lt(this.updatePoint)}}function eu(t,e){return e?{point:e(t.point)}:t}function nu(t,e){return{x:t.x-e.x,y:t.y-e.y}}function iu({point:t},e){return{point:t,delta:nu(t,ou(e)),offset:nu(t,su(e)),velocity:ru(e,.1)}}function su(t){return t[0]}function ou(t){return t[t.length-1]}function ru(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ou(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>B(e)));)n--;if(!i)return{x:0,y:0};const o=O(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function au(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function lu(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const uu=.35;function cu(t,e,n){return{min:hu(t,e),max:hu(t,n)}}function hu(t,e){return"number"==typeof t?t:t[e]||0}const du=new WeakMap;class pu{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new tu(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Gl(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ki(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Er(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Lt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=po(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&at.postRender(()=>s(t,e)),kl(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Er(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:Zl(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&at.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!mu(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Jt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Jt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&gl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:au(t.x,n,s),y:au(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=uu){return!1===t?t=0:!0===t&&(t=uu),{x:cu(t,"left","right"),y:cu(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Er(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!gl(e))return!1;const i=e.current;t.invariant(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=function(t,e,n){const i=ra(t,n),{scroll:s}=e;return s&&(sr(i.x,s.offset.x),sr(i.y,s.offset.y)),i}(i,s.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:lu(t.x,e.x),y:lu(t.y,e.y)}}(s.layout.layoutBox,o);if(n){const t=n(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(r));this.hasMutatedConstraints=!!t,t&&(r=oa(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Er(r=>{if(!mu(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return kl(this.visualElement,t),n.start(Ao(t,n,0,e,this.visualElement,!1))}stopAnimation(){Er(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Er(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Er(e=>{const{drag:n}=this.getProps();if(!mu(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e],r=s.get()||0;s.set(t[e]-Jt(n,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!gl(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Er(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=po(t),s=po(e);return s>i?n=D(e.min,e.max-i,t.min):i>s&&(n=D(t.min,t.max-s,e.min)),b(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Er(e=>{if(!mu(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Jt(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;du.set(this.visualElement,this);const t=ql(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();gl(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),at.read(e);const s=ea(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Er(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=uu,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function mu(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const fu=t=>(e,n)=>{t&&at.postRender(()=>t(e,n))};let gu=!1;class yu extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),gu&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ar.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,gu=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||at.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),zi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;gu=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vu(t){const[n,i]=lo(),s=e.useContext(m);return d(yu,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(xl),isPresent:n,safeToRemove:i})}const xu={pan:{Feature:class extends Xl{constructor(){super(...arguments),this.removePointerDownListener=V}onPointerDown(t){this.session=new tu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:fu(t),onStart:fu(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&at.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=ql(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Xl{constructor(t){super(t),this.removeGroupControls=V,this.removeListeners=V,this.controls=new pu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||V}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:sa,MeasureLayout:vu}};function wu(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&at.postRender(()=>s(e,Gl(e)))}function Tu(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&at.postRender(()=>s(e,Gl(e)))}const bu=new WeakMap,Su=new WeakMap,Pu=t=>{const e=bu.get(t.target);e&&e(t)},Eu=t=>{t.forEach(Pu)};function Au(t,e,n){const i=function({root:t,...e}){const n=t||document;Su.has(n)||Su.set(n,{});const i=Su.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Eu,{root:t,...e})),i[s]}(e);return bu.set(t,n),i.observe(t),()=>{bu.delete(t),i.unobserve(t)}}const Mu={some:0,all:1};const Cu={inView:{Feature:class extends Xl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Mu[i]};return Au(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Xl{mount(){const{current:t}=this.node;t&&(this.unmount=ss(t,(t,e)=>(Tu(this.node,e,"Start"),(t,{success:e})=>Tu(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Xl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=R(ea(this.node.current,"focus",()=>this.onFocus()),ea(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Xl{mount(){const{current:t}=this.node;t&&(this.unmount=qi(t,(t,e)=>(wu(this.node,e,"Start"),t=>wu(this.node,t,"End"))))}unmount(){}}}},Vu={layout:{ProjectionNode:sa,MeasureLayout:vu}},ku=Pl({...Kl,...Cu,...xu,...Vu},tl);function Ru({children:n,as:i="ul",axis:s="y",onReorder:o,values:r,...a},l){const u=f(()=>ku[i]),c=[],h=e.useRef(!1);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const p={axis:s,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[s]:c.push({value:t,layout:e[s]}),c.sort(Bu)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Jt(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?T(t,s,s+o):t}(c,t,e,n);c!==i&&(h.current=!0,o(i.map(Lu).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),d(u,{...a,ref:l,ignoreStrict:!0,children:d(za.Provider,{value:p,children:n})})}const Du=e.forwardRef(Ru);function Lu(t){return t.value}function Bu(t,e){return t.layout.min-e.layout.min}function Ou(t){const n=f(()=>ji(t)),{isStatic:i}=e.useContext(eo);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function ju(t,e){const n=Ou(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>at.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),lt(i)}}),n}function Iu(t,e,n,i){if("function"==typeof t)return function(t){Bi.current=[],t();const e=ju(Bi.current,t);return Bi.current=void 0,e}(t);const s="function"==typeof e?e:Cs(e,n,i);return Array.isArray(t)?Fu(t,s):Fu([t],([t])=>s(t))}function Fu(t,e){const n=f(()=>[]);return ju(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Wu(t,e=0){return ks(t)?t:Ou(e)}function Uu({children:n,style:i={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=f(()=>ku[o]),h=e.useContext(za),p={x:Wu(i.x),y:Wu(i.y)},m=Iu([p.x,p.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(h),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:g,registerItem:y,updateOrder:v}=h;return d(c,{drag:g,...l,dragSnapToOrigin:!0,style:{...i,x:p.x,y:p.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[g]&&v(s,p[g].get(),n[g]),r&&r(t,e)},onLayoutMeasure:t=>y(s,t),ref:u,ignoreStrict:!0,children:n})}const $u=e.forwardRef(Uu);var Nu=Object.freeze({__proto__:null,Group:Du,Item:$u});function zu(t){return"object"==typeof t&&!Array.isArray(t)}function Yu(t,e,n,i){return"string"==typeof t&&zu(e)?Ei(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Xu(t,e,n){return t*(e+1)}function Hu(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 Ku(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(w(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Jt(s,o,i[r]),easing:tt(n,r)})}function Gu(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function _u(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function qu(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Zu(t,e){return e[t]||(e[t]=[]),e[t]}function Ju(t){return Array.isArray(t)?t:[t]}function Qu(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const tc=t=>"number"==typeof t,ec=t=>t.every(tc);class nc extends ba{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}}function ic(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=rs(t)&&!As(t)?new Za(e):new Ra(e);n.mount(t),da.set(t,n)}function sc(t){const e=new nc({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),da.set(t,e)}function oc(e,n,i,s){const o=[];if(function(t,e){return ks(t)||"number"==typeof t||"string"==typeof t&&!zu(e)}(e,n))o.push(Mo(e,zu(n)&&n.default||n,i&&i.default||i));else{const r=Yu(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){const s=r[e];t.invariant(null!==s,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const l=s instanceof Element?ic:sc;da.has(s)||l(s);const u=da.get(s),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(e,a)),o.push(...Dl(u,{...n,transition:c},{}))}}return o}function rc(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,p=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,Hu(d,a.at,h,c));continue}let[m,f,g={}]=a;void 0!==g.at&&(d=Hu(d,g.at,h,c));let y=0;const v=(e,i,s,a=0,l=0)=>{const u=Ju(e),{delay:c=0,times:h=$e(u),type:m="keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const b="function"==typeof c?c(a,l):c,S=u.length,P=On(m)?m:o?.[m||"keyframes"];if(S<=2&&P){let t=100;if(2===S&&ec(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...x};void 0!==T&&(e.duration=B(T));const n=fe(e,t,P);w=n.ease,T=n.duration}T??(T=r);const E=d+b;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-u.length;if(A>0&&Ue(h,A),1===u.length&&u.unshift(null),f){t.invariant(f<20,"Repeat count too high, must be less than 20","repeat-count-high"),T=Xu(T,f);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<f;t++){u.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":tt(i,s-1))}Gu(h,f)}const M=E+T;Ku(s,u,w,h,E,M),y=Math.max(b+T,y),p=Math.max(M,p)};if(ks(m))v(f,g,Zu("default",qu(m,l)));else{const t=Yu(m,f,s,u),e=t.length;for(let n=0;n<e;n++){const i=qu(t[n],l);for(const t in f)v(f[t],Qu(g,t),Zu(t,i),n,e)}}h=d,d+=y}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(_u);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(D(0,p,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[s]=r,c.transition[s]={...n,duration:p,ease:u,times:l,...i}}}),a}(e,n,i,{spring:Ie});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...oc(n,t,e))}),s}function ac(t){return function(e,n,i){let s,o=[];if(r=e,Array.isArray(r)&&r.some(Array.isArray))o=rc(e,n,t);else{const{onComplete:r,...a}=i||{};"function"==typeof r&&(s=r),o=oc(e,n,a,t)}var r;const a=new _n(o);return s&&a.finished.then(s),t&&(t.animations.push(a),a.finished.then(()=>{w(t.animations,a)})),a}}const lc=ac();const uc=e=>function(n,i,s){return new _n(function(e,n,i,s){const o=Ei(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={...ii(s,t)};o.duration&&(o.duration=B(o.duration)),o.delay&&(o.delay=B(o.delay));const r=Qn(e),l=Jn(t,o.pseudoElement||""),u=r.get(l);u&&u.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]=os(i,s)),Je(e),bi(e,s),!o&&e.length<2&&e.unshift(os(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 In(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},cc=uc(),hc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function dc(t,e,n,i){const s=n[e],{length:o,position:r}=hc[e],a=s.current,l=n.time;s.current=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 u=i-l;s.velocity=u>50?0:j(s.current-a,u)}const pc={start:0,center:.5,end:1};function mc(t,e,n=0){let i=0;if(t in pc&&(t=pc[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 fc=[0,0];function gc(t,e,n,i){let s=Array.isArray(t)?t:fc,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,pc[t]?t:"0"]),o=mc(s[0],n,i),r=mc(s[1],e),o-r}const yc={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},vc={x:0,y:0};function xc(t,e,n){const{offset:i=yc.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Li(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}(s,t):vc,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=gc(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=We(e[o].offset,$e(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=b(0,1,e[o].interpolate(e[o].current))}function wc(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){dc(t,"x",e,n),dc(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&xc(t,n,i)},notify:()=>e(n)}}const Tc=new WeakMap,bc=new WeakMap,Sc=new WeakMap,Pc=t=>t===document.scrollingElement?window:t;function Ec(t,{container:e=document.scrollingElement,...n}={}){if(!e)return V;let i=Sc.get(e);i||(i=new Set,Sc.set(e,i));const s=wc(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(i.add(s),!Tc.has(e)){const t=()=>{for(const t of i)t.measure(ut.timestamp);at.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>at.read(t);Tc.set(e,s);const o=Pc(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&bc.set(e,vs(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=Tc.get(e);return at.read(o,!1,!0),()=>{lt(o);const t=Sc.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=Tc.get(e);Tc.delete(e),n&&(Pc(e).removeEventListener("scroll",n),bc.get(e)?.(),window.removeEventListener("resize",n))}}const Ac=new Map;function Mc({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Ac.get(e)??new Map;Ac.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Mn()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Ec(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}function Cc(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return V;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Ec(n=>{t(n[e.axis].progress,n)},e):xs(t,Mc(e))}(t,s):function(t,e){const n=Mc(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),xs(e=>{t.time=t.iterationDuration*e},n))})}(t,s)}const Vc={some:0,all:1};function kc(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ei(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:Vc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}const Rc=Pl();function Dc(t){return e.useEffect(()=>()=>t(),[])}const Lc={renderer:tl,...Kl,...Cu},Bc={...Lc,...xu,...Vu},Oc={renderer:tl,...Kl};function jc(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const Ic=()=>({scrollX:ji(0),scrollY:ji(0),scrollXProgress:ji(0),scrollYProgress:ji(0)}),Fc=t=>!!t&&!t.current;function Wc({container:n,target:i,...s}={}){const o=f(Ic),r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=Cc((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)},{...s,container:n?.current||void 0,target:i?.current||void 0}),()=>{r.current?.()}),[n,i,JSON.stringify(s.offset)]);return y(()=>(a.current=!1,Fc(n)||Fc(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>a.current?(t.invariant(!Fc(n),"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!Fc(i),"Target ref is defined but not hydrated","use-scroll-ref"),l()):void 0,[l]),o}function Uc(t){const n=e.useRef(0),{isStatic:i}=e.useContext(eo);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return at.update(e,!0),()=>lt(e)},[t])}class $c extends Oi{constructor(){super(...arguments),this.isEnabled=!1}add(t){(dn.has(t)||Pi.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function Nc(){!ca.current&&ha();const[t]=e.useState(ua.current);return t}function zc(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Vl(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{zc(t,e)})})}function Yc(){let e=!1;const n=new Set,i={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(i,s){t.invariant(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const o=[];return n.forEach(t=>{o.push(Ol(t,i,{transitionOverride:s}))}),Promise.all(o)},set:i=>(t.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(t=>{!function(t,e){Array.isArray(e)?zc(t,e):"string"==typeof e?zc(t,[e]):Vl(t,e)}(t,i)})),stop(){n.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(e=!0,()=>{e=!1,i.stop()})};return i}function Xc(){const t=f(Yc);return y(t.mount,[]),t}const Hc=Xc;class Kc{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const Gc=()=>new Kc;function _c(t){return null!==t&&"object"==typeof t&&fl in t}function qc(){return Zc}function Zc(t){ia.current&&(ia.current.isUpdating=!1,ia.current.blockUpdate(),t&&t())}const Jc=new Map,Qc=new Map,th=(t,e)=>`${t}: ${dn.has(e)?"transform":e}`;function eh(t,e,n){const i=th(t,e),s=Jc.get(i);if(!s)return null;const{animation:o,startTime:r}=s;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return o.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let nh,ih;const sh=new Set;function oh(){sh.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),sh.clear()}const rh=()=>({});class ah extends ba{constructor(){super(...arguments),this.measureInstanceViewportBox=dr}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const lh=dl({scrapeMotionValuesFromProps:rh,createRenderState:rh});let uh=0;const ch=t=>t>.001?1/t:1e5;let hh=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",root:u})=>{const[c,p]=lo(a),g=e.useMemo(()=>co(t),[t]),v=a&&!c?[]:g.map(uo),x=e.useRef(!0),w=e.useRef(g),T=f(()=>new Map),b=e.useRef(new Set),[S,P]=e.useState(g),[E,A]=e.useState(g);y(()=>{x.current=!1,w.current=g;for(let t=0;t<E.length;t++){const e=uo(E[t]);v.includes(e)?(T.delete(e),b.current.delete(e)):!0!==T.get(e)&&T.set(e,!1)}},[E,v.length,v.join("-")]);const M=[];if(g!==S){let t=[...g];for(let e=0;e<E.length;e++){const n=E[e],i=uo(n);v.includes(i)||(t.splice(e,0,n),M.push(n))}return"wait"===r&&M.length&&(t=M),A(co(t)),P(g),null}const{forceRender:C}=e.useContext(m);return d(h,{children:E.map(t=>{const e=uo(t),h=!(a&&!c)&&(g===E||v.includes(e));return d(ro,{isPresent:h,initial:!(x.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,root:u,onExitComplete:h?void 0:()=>{if(b.current.has(e))return;if(b.current.add(e),!T.has(e))return;T.set(e,!0);let t=!0;T.forEach(e=>{e||(t=!1)}),t&&(C?.(),A(w.current),a&&p?.(),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:e})=>(i.useEffect(()=>{t.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),d(Ba,{id:f(()=>"asl-"+uh++),children:e})),t.AsyncMotionValueAnimation=Hn,t.DOMKeyframesResolver=wi,t.DeprecatedLayoutGroupContext=ho,t.DragControls=Kc,t.GroupAnimation=Kn,t.GroupAnimationWithThen=_n,t.JSAnimation=Ze,t.KeyframeResolver=Pn,t.LayoutGroup=Ba,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Ia(n)),o=e.useRef(void 0);if(!Ia(n)){const{renderer:t,...e}=n;o.current=t,ja(e)}return e.useEffect(()=>{Ia(n)&&n().then(({renderer:t,...e})=>{ja(e),o.current=t,s(!0)})},[]),d(Oa.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&$a(n),(i={...e.useContext(eo),...i}).isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(eo.Provider,{value:s,children:t})},t.MotionConfigContext=eo,t.MotionContext=el,t.MotionGlobalConfig=P,t.MotionValue=Oi,t.NativeAnimation=In,t.NativeAnimationExtended=Un,t.NativeAnimationWrapper=qn,t.PopChild=oo,t.PresenceChild=ro,t.PresenceContext=v,t.Reorder=Nu,t.SubscriptionManager=L,t.SwitchLayoutGroupContext=xl,t.ViewTransitionBuilder=Js,t.VisualElement=ba,t.WillChangeMotionValue=$c,t.acceleratedValues=Pi,t.activeAnimations=mt,t.addAttrValue=ki,t.addPointerEvent=ql,t.addPointerInfo=_l,t.addScaleCorrector=function(t){for(const e in t)Pr[e]=t[e],gt(e)&&(Pr[e].isCSSVariable=!0)},t.addStyleValue=Wi,t.addUniqueItem=x,t.alpha=Tt,t.analyseComplexValue=Yt,t.animate=lc,t.animateMini=cc,t.animateValue=function(t){return new Ze(t)},t.animateView=function(t,e={}){return new Js(t,e)},t.animateVisualElement=Ol,t.animationControls=Yc,t.animationMapKey=Jn,t.animations=Kl,t.anticipate=H,t.applyGeneratorOptions=jn,t.applyPxDefaults=bi,t.attachSpring=Rs,t.attrEffect=Ri,t.backIn=Y,t.backInOut=X,t.backOut=z,t.buildTransform=Aa,t.calcGeneratorDuration=me,t.calcLength=po,t.cancelFrame=lt,t.cancelMicrotask=Yi,t.cancelSync=to,t.circIn=K,t.circInOut=_,t.circOut=G,t.clamp=b,t.collectMotionValues=Bi,t.color=Wt,t.complex=Gt,t.convertOffsetToTimes=Ne,t.createBox=dr,t.createGeneratorEasing=fe,t.createRenderBatcher=rt,t.createScopedAnimate=ac,t.cubicBezier=U,t.cubicBezierAsString=Rn,t.defaultEasing=ze,t.defaultOffset=$e,t.defaultTransformValue=an,t.defaultValueTypes=gi,t.degrees=Dt,t.delay=Bo,t.dimensionValueTypes=ri,t.disableInstantTransitions=function(){P.instantAnimations=!1},t.distance=Jl,t.distance2D=Ql,t.domAnimation=Lc,t.domMax=Bc,t.domMin=Oc,t.easeIn=q,t.easeInOut=J,t.easeOut=Z,t.easingDefinitionToFunction=it,t.fillOffset=Ue,t.fillWildcards=Je,t.filterProps=Na,t.findDimensionValueType=ai,t.findValueType=Os,t.flushKeyframeResolvers=Sn,t.frame=at,t.frameData=ut,t.frameSteps=ct,t.generateLinearEasing=de,t.getAnimatableNone=vi,t.getAnimationMap=Qn,t.getComputedStyle=os,t.getDefaultValueType=yi,t.getEasingForSegment=tt,t.getMixer=re,t.getOriginIndex=Ms,t.getValueAsType=Mi,t.getValueTransition=ii,t.getVariableValue=ni,t.getViewAnimationLayerInfo=Ns,t.getViewAnimations=Ys,t.hasWarned=function(t){return I.has(t)},t.hex=kt,t.hover=qi,t.hsla=Ft,t.hslaToRgba=qt,t.inView=kc,t.inertia=Fe,t.interpolate=We,t.invisibleValues=ie,t.isBezierDefinition=et,t.isBrowser=g,t.isCSSVariableName=gt,t.isCSSVariableToken=vt,t.isDragActive=Hi,t.isDragging=Xi,t.isEasingArray=Q,t.isGenerator=On,t.isHTMLElement=Li,t.isMotionComponent=_c,t.isMotionValue=ks,t.isNodeOrChild=Zi,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Ji,t.isSVGElement=rs,t.isSVGSVGElement=As,t.isValidMotionProp=Wa,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&kn()||!e||"string"==typeof e&&(e in Dn||kn())||et(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=M,t.keyframes=Ye,t.m=Rc,t.makeAnimationInstant=Nn,t.makeUseVisualState=dl,t.mapEasingToNativeEasing=Ln,t.mapValue=function(t,e,n,i){const s=Cs(e,n,i);return Vs(()=>s(t.get()))},t.maxGeneratorDuration=pe,t.memo=C,t.microtask=zi,t.millisecondsToSeconds=O,t.mirrorEasing=$,t.mix=ce,t.mixArray=ae,t.mixColor=ne,t.mixComplex=ue,t.mixImmediate=Zt,t.mixLinearColor=Qt,t.mixNumber=Jt,t.mixObject=le,t.mixVisibility=se,t.motion=ku,t.motionValue=ji,t.moveItem=T,t.noop=V,t.number=wt,t.numberValueTypes=fi,t.observeTimeline=xs,t.optimizedAppearDataAttribute=ko,t.parseCSSVariable=ei,t.parseValueFromTransform=ln,t.percent=Lt,t.pipe=R,t.positionalKeys=si,t.press=ss,t.progress=D,t.progressPercentage=It,t.propEffect=Di,t.px=Bt,t.readTransformValue=un,t.recordStats=function(){if(ot.value)throw Ps(),new Error("Stats are already being measured");const t=ot;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)},at.postRender(ws,!0),Es},t.removeItem=w,t.resize=vs,t.resolveElements=Ei,t.resolveMotionValue=Oo,t.reverseEasing=N,t.rgbUnit=Ct,t.rgba=Vt,t.scale=bt,t.scroll=Cc,t.scrollInfo=Ec,t.secondsToMilliseconds=B,t.setDragLock=Ki,t.setStyle=An,t.spring=Ie,t.springValue=function(t,e){const n=ji(ks(t)?t.get():t);return Rs(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Ms(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=it(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset[Vo];if(!o)return;window.MotionHandoffAnimation=eh;const r=th(o,e);ih||(ih=Bn(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Jc.set(r,{animation:ih,startTime:null}),window.MotionHandoffAnimation=eh,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Qc.has(t);const n=th(t,e);return Boolean(Jc.get(n))},window.MotionHandoffMarkAsComplete=t=>{Qc.has(t)&&Qc.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Qc.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=th(t,e),o=Jc.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(sh.add(o),n.render(oh)):(Jc.delete(s),Jc.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Ro(t);if(!i)return;const s=window.MotionHasOptimisedAnimation?.(i,e),o=t.props.values?.[e];if(!s||!o)return;const r=n.on("change",t=>{o.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())});return r});const a=()=>{ih.cancel();const o=Bn(t,e,n,i);void 0===nh&&(nh=performance.now()),o.startTime=nh,Jc.set(r,{animation:o,startTime:nh}),s&&s(o)};Qc.set(o,!1),ih.ready?ih.ready.then(a).catch(V):a()},t.startWaapiAnimation=Bn,t.statsBuffer=ot,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return b(0,1,s/t)}},t.styleEffect=Ui,t.supportedWaapiEasing=Dn,t.supportsBrowserAnimation=Xn,t.supportsFlags=Cn,t.supportsLinearEasing=kn,t.supportsPartialKeyframes=Si,t.supportsScrollTimeline=Mn,t.svgEffect=Ni,t.sync=Qs,t.testValueType=oi,t.time=pt,t.transform=Cs,t.transformPropOrder=hn,t.transformProps=dn,t.transformValue=Vs,t.transformValueTypes=mi,t.unwrapMotionComponent=function(t){if(_c(t))return t[fl]},t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>ac(t));return Dc(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,e]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>uc(t));return Dc(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Hc,t.useAnimationControls=Xc,t.useAnimationFrame=Uc,t.useComposedRefs=io,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]),o=e.useCallback(e=>{n.current="number"!=typeof e?F(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t]);return[i,o]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=lh({},!1),o=f(()=>new ah({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,f(()=>t=>Ol(o,t))]},t.useDeprecatedInvertedScale=function(n){let i=Ou(1),s=Ou(1);const{visualElement:o}=e.useContext(el);return t.invariant(!(!n&&!o),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(hh,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),hh=!0,n?(i=n.scaleX||i,s=n.scaleY||s):o&&(i=o.getValue("scaleX",1),s=o.getValue("scaleY",1)),{scaleX:Iu(i,ch),scaleY:Iu(s,ch)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return ea(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return f(Gc)},t.useElementScroll=function(t){return Wc({container:t})},t.useForceUpdate=Da,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return kc(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=qc,t.useInstantTransition=function(){const[t,n]=Da(),i=qc(),s=e.useRef(-1);return e.useEffect(()=>{at.postRender(()=>at.postRender(()=>{n===s.current&&(P.instantAnimations=!1)}))},[n]),e=>{i(()=>{P.instantAnimations=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return ju(e.filter(ks),function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=ks(n)?n.get():n)}return i})},t.useMotionValue=Ou,t.useMotionValueEvent=jc,t.usePageInView=function(){const[t,n]=e.useState(!0);return e.useEffect(()=>{const t=()=>n(!document.hidden);return document.hidden&&t(),document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[]),t},t.usePresence=lo,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Nc,t.useReducedMotionConfig=function(){const t=Nc(),{reducedMotion:n}=e.useContext(eo);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=ia.current;t&&t.resetTree()},[])},t.useScroll=Wc,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(eo),s=()=>ks(t)?t.get():t;if(i)return Iu(s);const o=Ou(s());return e.useInsertionEffect(()=>Rs(o,t,n),[o,JSON.stringify(n)]),o},t.useTime=function(){const t=Ou(0);return Uc(e=>t.set(e)),t},t.useTransform=Iu,t.useUnmountEffect=Dc,t.useVelocity=function(t){const e=Ou(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&at.update(n)};return jc(t,"change",()=>{at.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Wc()},t.useWillChange=function(){return f(()=>new $c("auto"))},t.velocityPerSecond=j,t.vh=Ot,t.visualElementStore=da,t.vw=jt,t.warnOnce=function(t,e,n){t||I.has(e)||(console.warn(S(e,n)),I.add(e))},t.wrap=F});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null);function x(t,e){-1===t.indexOf(e)&&t.push(e)}function w(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function T([...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}const b=(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 P={},E=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function A(t){return"object"==typeof t&&null!==t}const C=t=>/^0[^.\s]+$/u.test(t);function M(t){let e;return()=>(void 0===e&&(e=t()),e)}const V=t=>t,k=(t,e)=>n=>e(t(n)),R=(...t)=>t.reduce(k),D=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class L{constructor(){this.subscriptions=[]}add(t){return x(this.subscriptions,t),()=>w(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 B=t=>1e3*t,O=t=>t/1e3;function j(t,e){return e?t*(1e3/e):0}const I=new Set;const F=(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 U(t,e,n,i){if(t===e&&n===i)return V;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 $=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,N=t=>e=>1-t(1-e),z=U(.33,1.53,.69,.99),Y=N(z),X=$(Y),H=t=>(t*=2)<1?.5*Y(t):.5*(2-Math.pow(2,-10*(t-1))),K=t=>1-Math.sin(Math.acos(t)),G=N(K),_=$(K),q=U(.42,0,1,1),Z=U(0,0,.58,1),J=U(.42,0,.58,1);const Q=t=>Array.isArray(t)&&"number"!=typeof t[0];function tt(t,e){return Q(t)?t[F(0,t.length,e)]:t}const et=t=>Array.isArray(t)&&"number"==typeof t[0],nt={linear:V,easeIn:q,easeInOut:J,easeOut:Z,circIn:K,circInOut:_,circOut:G,backIn:Y,backInOut:X,backOut:z,anticipate:H},it=e=>{if(et(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return U(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==nt[e],`Invalid easing type '${e}'`,"invalid-easing-type"),nt[e]):e},st=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ot={value:null,addProjectionMetrics:null};function rt(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=st.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(u),e&&ot.value&&ot.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=P.useManualTiming?s.timestamp:performance.now();n=!1,P.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(f))};return{schedule:st.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<st.length;e++)r[st[e]].cancel(t)},state:s,steps:r}}const{schedule:at,cancel:lt,state:ut,steps:ct}=rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:V,!0);let ht;function dt(){ht=void 0}const pt={now:()=>(void 0===ht&&pt.set(ut.isProcessing||P.useManualTiming?ut.timestamp:performance.now()),ht),set:t=>{ht=t,queueMicrotask(dt)}},mt={layout:0,mainThread:0,waapi:0},ft=t=>e=>"string"==typeof e&&e.startsWith(t),gt=ft("--"),yt=ft("var(--"),vt=t=>!!yt(t)&&xt.test(t.split("/*")[0].trim()),xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wt(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const Tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},bt={...Tt,transform:t=>b(0,1,t)},St={...Tt,default:1},Pt=t=>Math.round(1e5*t)/1e5,Et=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const At=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ct=(t,e)=>n=>Boolean("string"==typeof n&&At.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Mt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(Et);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Vt={...Tt,transform:t=>Math.round((t=>b(0,255,t))(t))},kt={test:Ct("rgb","red"),parse:Mt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Vt.transform(t)+", "+Vt.transform(e)+", "+Vt.transform(n)+", "+Pt(bt.transform(i))+")"};const Rt={test:Ct("#"),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:kt.transform},Dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Lt=Dt("deg"),Bt=Dt("%"),Ot=Dt("px"),jt=Dt("vh"),It=Dt("vw"),Ft=(()=>({...Bt,parse:t=>Bt.parse(t)/100,transform:t=>Bt.transform(100*t)}))(),Wt={test:Ct("hsl","hue"),parse:Mt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Bt.transform(Pt(e))+", "+Bt.transform(Pt(n))+", "+Pt(bt.transform(i))+")"},Ut={test:t=>kt.test(t)||Rt.test(t)||Wt.test(t),parse:t=>kt.test(t)?kt.parse(t):Wt.test(t)?Wt.parse(t):Rt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?kt.transform(t):Wt.transform(t),getAnimatableNone:t=>{const e=Ut.parse(t);return e.alpha=0,Ut.transform(e)}},$t=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Nt="number",zt="color",Yt=/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 Xt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Yt,t=>(Ut.test(t)?(i.color.push(o),s.push(zt),n.push(Ut.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(Nt),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Ht(t){return Xt(t).values}function Kt(t){const{split:e,types:n}=Xt(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===Nt?Pt(t[o]):e===zt?Ut.transform(t[o]):t[o]}return s}}const Gt=t=>"number"==typeof t?0:Ut.test(t)?Ut.getAnimatableNone(t):t;const _t={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Et)?.length||0)+(t.match($t)?.length||0)>0},parse:Ht,createTransformer:Kt,getAnimatableNone:function(t){const e=Ht(t);return Kt(t)(e.map(Gt))}};function qt(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 Zt({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=qt(a,i,t+1/3),o=qt(a,i,t),r=qt(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 Jt(t,e){return n=>n>0?e:t}const Qt=(t,e,n)=>t+(e-t)*n,te=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},ee=[Rt,kt,Wt];function ne(e){const n=(i=e,ee.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===Wt&&(s=Zt(s)),s}const ie=(t,e)=>{const n=ne(t),i=ne(e);if(!n||!i)return Jt(t,e);const s={...n};return t=>(s.red=te(n.red,i.red,t),s.green=te(n.green,i.green,t),s.blue=te(n.blue,i.blue,t),s.alpha=Qt(n.alpha,i.alpha,t),kt.transform(s))},se=new Set(["none","hidden"]);function oe(t,e){return se.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function re(t,e){return n=>Qt(t,e,n)}function ae(t){return"number"==typeof t?re:"string"==typeof t?vt(t)?Jt:Ut.test(t)?ie:ce:Array.isArray(t)?le:"object"==typeof t?Ut.test(t)?ie:ue:Jt}function le(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>ae(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function ue(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=ae(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const ce=(e,n)=>{const i=_t.createTransformer(n),s=Xt(e),o=Xt(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?se.has(e)&&!o.values.length||se.has(n)&&!s.values.length?oe(e,n):R(le(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"),Jt(e,n))};function he(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Qt(t,e,n);return ae(t)(t,e)}const de=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>at.update(e,t),stop:()=>lt(e),now:()=>ut.isProcessing?ut.timestamp:pt.now()}},pe=(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)})`},me=2e4;function fe(t){let e=0;let n=t.next(e);for(;!n.done&&e<me;)e+=50,n=t.next(e);return e>=me?1/0:e}function ge(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(fe(i),me);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:O(s)}}function ye(t,e,n){const i=Math.max(e-5,0);return j(n-t(i),e-i)}const ve=100,xe=10,we=1,Te=0,be=800,Se=.3,Pe=.3,Ee={granular:.01,default:2},Ae={granular:.005,default:.5},Ce=.01,Me=10,Ve=.05,ke=1,Re=.001;function De({duration:e=be,bounce:n=Se,velocity:i=Te,mass:s=we}){let o,r;t.warning(e<=B(Me),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=b(Ve,ke,a),e=b(Ce,Me,O(e)),a<1?(o=t=>{const n=t*a,s=n*e,o=n-i,r=Be(t,a),l=Math.exp(-s);return Re-o/r*l},r=t=>{const n=t*a*e,s=n*i+i,r=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-n),u=Be(Math.pow(t,2),a);return(-o(t)+Re>0?-1:1)*((s-r)*l)/u}):(o=t=>Math.exp(-t*e)*((t-i)*e+1)-.001,r=t=>Math.exp(-t*e)*(e*e*(i-t)));const l=function(t,e,n){let i=n;for(let n=1;n<Le;n++)i-=t(i)/e(i);return i}(o,r,5/e);if(e=B(e),isNaN(l))return{stiffness:ve,damping:xe,duration:e};{const t=Math.pow(l,2)*s;return{stiffness:t,damping:2*a*Math.sqrt(s*t),duration:e}}}const Le=12;function Be(t,e){return t*Math.sqrt(1-e*e)}const Oe=["duration","bounce"],je=["stiffness","damping","mass"];function Ie(t,e){return e.some(e=>void 0!==t[e])}function Fe(t=Pe,e=Se){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:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Te,stiffness:ve,damping:xe,mass:we,isResolvedFromDuration:!1,...t};if(!Ie(t,je)&&Ie(t,Oe))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*b(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:we,stiffness:s,damping:o}}else{const n=De(t);e={...e,...n,mass:we},e.isResolvedFromDuration=!0}return e}({...n,velocity:-O(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=O(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?Ee.granular:Ee.default),s||(s=v?Ae.granular:Ae.default),f<1){const t=Be(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0===t?m:0;f<1&&(n=0===t?B(m):ye(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(fe(w),me),e=pe(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function We({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,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 m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g: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=Fe({keyframes:[d.value,p(d.value)],velocity:ye(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};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 Ue(e,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=e.length;if(t.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),n=[...n].reverse());const l=function(t,e,n){const i=[],s=n||P.mix||he,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||V:e;o=R(t,o)}i.push(o)}return i}(n,s,o),u=l.length,c=t=>{if(a&&t<e[0])return n[0];let i=0;if(u>1)for(;i<e.length-2&&!(t<e[i+1]);i++);const s=D(e[i],e[i+1],t);return l[i](s)};return i?t=>c(b(e[0],e[r-1],t)):c}function $e(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=D(0,e,i);t.push(Qt(n,1,s))}}function Ne(t){const e=[0];return $e(e,t.length-1),e}function ze(t,e){return t.map(t=>t*e)}function Ye(t,e){return t.map(()=>e||J).splice(0,t.length-1)}function Xe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Q(i)?i.map(it):it(i),o={done:!1,value:e[0]},r=Ue(ze(n&&n.length===e.length?n:Ne(e),t),e,{ease:Array.isArray(s)?s:Ye(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}Fe.applyToOptions=t=>{const e=ge(t,100,Fe);return t.ease=e.ease,t.duration=B(e.duration),t.type="keyframes",t};const He=t=>null!==t;function Ke(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(He),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Ge={decay:We,inertia:We,tween:Xe,keyframes:Xe,spring:Fe};function _e(t){"string"==typeof t.type&&(t.type=Ge[t.type])}class qe{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 Ze=t=>t/100;class Je extends qe{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!==pt.now()&&this.tick(pt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},mt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;_e(t);const{type:e=Xe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Xe;a!==Xe&&"number"!=typeof r[0]&&(this.mixKeyframes=R(Ze,he(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=fe(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+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:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:f}=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 g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let v=this.currentTime,x=n;if(c){const t=Math.min(this.currentTime,i)/r;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=o)),v=b(0,1,n)*r}const w=y?{done:!1,value:u[0]}:x.next(v);s&&(w.value=s(w.value));let{done:T}=w;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&p!==We&&(w.value=Ke(u,this.options,f,this.speed)),m&&m(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+O(t)}get time(){return O(this.currentTime)}set time(t){t=B(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(pt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=de,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(pt.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,mt.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 Qe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const tn=t=>180*t/Math.PI,en=t=>{const e=tn(Math.atan2(t[1],t[0]));return sn(e)},nn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:en,rotateZ:en,skewX:t=>tn(Math.atan(t[1])),skewY:t=>tn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},sn=t=>((t%=360)<0&&(t+=360),t),on=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),rn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),an={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:on,scaleY:rn,scale:t=>(on(t)+rn(t))/2,rotateX:t=>sn(tn(Math.atan2(t[6],t[5]))),rotateY:t=>sn(tn(Math.atan2(-t[2],t[0]))),rotateZ:en,rotate:en,skewX:t=>tn(Math.atan(t[4])),skewY:t=>tn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ln(t){return t.includes("scale")?1:0}function un(t,e){if(!t||"none"===t)return ln(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=an,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=nn,s=e}if(!s)return ln(e);const o=i[e],r=s[1].split(",").map(hn);return"function"==typeof o?o(r):r[o]}const cn=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return un(n,e)};function hn(t){return parseFloat(t.trim())}const dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pn=(()=>new Set(dn))(),mn=t=>t===Tt||t===Ot,fn=new Set(["x","y","z"]),gn=dn.filter(t=>!fn.has(t));const yn={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})=>un(e,"x"),y:(t,{transform:e})=>un(e,"y")};yn.translateX=yn.x,yn.translateY=yn.y;const vn=new Set;let xn=!1,wn=!1,Tn=!1;function bn(){if(wn){const t=Array.from(vn).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 gn.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)})}wn=!1,xn=!1,vn.forEach(t=>t.complete(Tn)),vn.clear()}function Sn(){vn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(wn=!0)})}function Pn(){Tn=!0,Sn(),bn(),Tn=!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?(vn.add(this),xn||(xn=!0,at.read(Sn),at.resolveKeyframes(bn))):(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])}Qe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vn.delete(this)}cancel(){"scheduled"===this.state&&(vn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const An=t=>t.startsWith("--");function Cn(t,e,n){An(e)?t.style.setProperty(e,n):t.style[e]=n}const Mn=M(()=>void 0!==window.ScrollTimeline),Vn={};function kn(t,e){const n=M(t);return()=>Vn[e]??n()}const Rn=kn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Dn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Ln={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 Bn(t,e){return t?"function"==typeof t?Rn()?pe(t,e):"ease-out":et(t)?Dn(t):Array.isArray(t)?t.map(t=>Bn(t,e)||Ln.easeOut):Ln[t]:void 0}function On(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Bn(a,s);Array.isArray(h)&&(c.easing=h),ot.value&&mt.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return ot.value&&p.finished.finally(()=>{mt.waapi--}),p}function jn(t){return"function"==typeof t&&"applyToOptions"in t}function In({type:t,...e}){return jn(t)&&Rn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Fn extends qe{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!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 u=In(e);this.animation=On(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Ke(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):Cn(n,i,t),this.animation.cancel()}l?.(),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 O(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+O(t)}get time(){return O(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=B(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&&Mn()?(this.animation.timeline=t,V):e(this)}}const Wn={anticipate:H,backInOut:X,circInOut:_};function Un(t){"string"==typeof t.ease&&t.ease in Wn&&(t.ease=Wn[t.ease])}class $n extends Fn{constructor(t){Un(t),_e(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:i,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Je({...o,autoplay:!1}),a=B(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const Nn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!_t.test(t)&&"0"!==t||t.startsWith("url(")));function zn(t){t.duration=0,t.type="keyframes"}const Yn=new Set(["opacity","clipPath","filter","transform"]),Xn=M(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hn(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Xn()&&n&&Yn.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Kn extends qe{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:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=pt.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||En;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=pt.now(),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=Nn(o,n),l=Nn(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||jn(i))&&s)}(e,o,r,a)||(!P.instantAnimations&&l||c?.(Ke(e,i,n)),e[0]=e[e.length-1],zn(i),i.repeat=0);const h={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},d=!u&&Hn(h)?new $n({...h,element:h.motionValue.owner.current}):new Je(h);d.finished.then(()=>this.notifyFinished()).catch(V),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pn()),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 Gn{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 _n(this.animations,"duration")}get iterationDuration(){return _n(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 _n(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 qn extends Gn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Zn extends Fn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Jn=new WeakMap,Qn=(t,e="")=>`${t}:${e}`;function ti(t){const e=Jn.get(t)||new Map;return Jn.set(t,e),e}const ei=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ni(t){const e=ei.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function ii(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]=ni(e);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return E(t)?parseFloat(t):t}return vt(o)?ii(o,n,i+1):o}function si(t,e){return t?.[e]??t?.default??t}const oi=new Set(["width","height","top","left","right","bottom",...dn]),ri=t=>e=>e.test(t),ai=[Tt,Ot,Bt,Lt,It,jt,{test:t=>"auto"===t,parse:t=>t}],li=t=>ai.find(ri(t));function ui(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||C(t))}const ci=new Set(["brightness","contrast","saturate","opacity"]);function hi(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Et)||[];if(!i)return t;const s=n.replace(i,"");let o=ci.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const di=/\b([a-z-]*)\(.*?\)/gu,pi={..._t,getAnimatableNone:t=>{const e=t.match(di);return e?e.map(hi).join(" "):t}},mi={...Tt,transform:Math.round},fi={rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:Lt,skewX:Lt,skewY:Lt,distance:Ot,translateX:Ot,translateY:Ot,translateZ:Ot,x:Ot,y:Ot,z:Ot,perspective:Ot,transformPerspective:Ot,opacity:bt,originX:Ft,originY:Ft,originZ:Ot},gi={borderWidth:Ot,borderTopWidth:Ot,borderRightWidth:Ot,borderBottomWidth:Ot,borderLeftWidth:Ot,borderRadius:Ot,radius:Ot,borderTopLeftRadius:Ot,borderTopRightRadius:Ot,borderBottomRightRadius:Ot,borderBottomLeftRadius:Ot,width:Ot,maxWidth:Ot,height:Ot,maxHeight:Ot,top:Ot,right:Ot,bottom:Ot,left:Ot,inset:Ot,insetBlock:Ot,insetBlockStart:Ot,insetBlockEnd:Ot,insetInline:Ot,insetInlineStart:Ot,insetInlineEnd:Ot,padding:Ot,paddingTop:Ot,paddingRight:Ot,paddingBottom:Ot,paddingLeft:Ot,paddingBlock:Ot,paddingBlockStart:Ot,paddingBlockEnd:Ot,paddingInline:Ot,paddingInlineStart:Ot,paddingInlineEnd:Ot,margin:Ot,marginTop:Ot,marginRight:Ot,marginBottom:Ot,marginLeft:Ot,marginBlock:Ot,marginBlockStart:Ot,marginBlockEnd:Ot,marginInline:Ot,marginInlineStart:Ot,marginInlineEnd:Ot,backgroundPositionX:Ot,backgroundPositionY:Ot,...fi,zIndex:mi,fillOpacity:bt,strokeOpacity:bt,numOctaves:mi},yi={...gi,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:pi,WebkitFilter:pi},vi=t=>yi[t];function xi(t,e){let n=vi(t);return n!==pi&&(n=_t),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const wi=new Set(["auto","none","0"]);class Ti 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(),vt(i))){const s=ii(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!oi.has(n)||2!==t.length)return;const[i,s]=t,o=li(i),r=li(s);if(wt(i)!==wt(s)&&yn[n])this.needsMeasurement=!0;else if(o!==r)if(mn(o)&&mn(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else yn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||ui(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&&!wi.has(e)&&Xt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=xi(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=yn[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]=yn[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 bi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","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","backgroundPositionX","backgroundPositionY"]);function Si(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&bi.has(e)&&(t[n]=t[n]+"px")}const Pi=M(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Ei=new Set(["opacity","clipPath","filter","transform"]);function Ai(t,e,n){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)}function Ci(t){return(e,n)=>{const i=Ai(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Mi=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Vi{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?Mi(i,gi[t]):i,n&&at.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&<(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}destroy(){for(const t of this.values.values())t.onRemove()}}function ki(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new Vi;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const Ri=(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")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const 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)},Di=Ci(ki(Ri)),Li=ki((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Bi(t){return A(t)&&"offsetHeight"in t}const Oi={current:void 0};class ji{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=pt.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=pt.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 L);const n=this.events[t].add(e);return"change"===t?()=>{n(),at.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 Oi.current&&Oi.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=pt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return j(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 Ii(t,e){return new ji(t,e)}const Fi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Wi=new Set(["originX","originY","originZ"]),Ui=(t,e,n,i)=>{let s,o;return pn.has(n)?(e.get("transform")||(Bi(t)||e.get("transformBox")||Ui(t,e,"transformBox",new ji("fill-box")),e.set("transform",new ji("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<dn.length;i++){const s=dn[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${Fi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):Wi.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new ji(""),()=>{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=An(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},$i=Ci(ki(Ui)),Ni=Ot.transform;const zi=Ci(ki((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return at.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",Ni(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ji("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${Ni(n)} ${Ni(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Ri(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?Ui:Ri)(t,e,n,i)}));const{schedule:Yi,cancel:Xi}=rt(queueMicrotask,!1),Hi={x:!1,y:!1};function Ki(){return Hi.x||Hi.y}function Gi(t){return"x"===t||"y"===t?Hi[t]?null:(Hi[t]=!0,()=>{Hi[t]=!1}):Hi.x||Hi.y?null:(Hi.x=Hi.y=!0,()=>{Hi.x=Hi.y=!1})}function _i(t,e){const n=Ai(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function qi(t){return!("touch"===t.pointerType||Ki())}function Zi(t,e,n={}){const[i,s,o]=_i(t,n),r=t=>{if(!qi(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{qi(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}const Ji=(t,e)=>!!e&&(t===e||Ji(t,e.parentElement)),Qi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,ts=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function es(t){return ts.has(t.tagName)||!0===t.isContentEditable}const ns=new WeakSet;function is(t){return e=>{"Enter"===e.key&&t(e)}}function ss(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function os(t){return Qi(t)&&!Ki()}function rs(t,e,n={}){const[i,s,o]=_i(t,n),r=t=>{const i=t.currentTarget;if(!os(t))return;ns.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),ns.has(i)&&ns.delete(i),os(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||Ji(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Bi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=is(()=>{if(ns.has(n))return;ss(n,"down");const t=is(()=>{ss(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ss(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),es(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function as(t,e){const n=window.getComputedStyle(t);return An(e)?n.getPropertyValue(e):n[e]}function ls(t){return A(t)&&"ownerSVGElement"in t}const us=new WeakMap;let cs;const hs=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ls(i)&&"getBBox"in i?i.getBBox()[e]:i[n],ds=hs("inline","width","offsetWidth"),ps=hs("block","height","offsetHeight");function ms({target:t,borderBoxSize:e}){us.get(t)?.forEach(n=>{n(t,{get width(){return ds(t,e)},get height(){return ps(t,e)}})})}function fs(t){t.forEach(ms)}function gs(t,e){cs||"undefined"!=typeof ResizeObserver&&(cs=new ResizeObserver(fs));const n=Ai(t);return n.forEach(t=>{let n=us.get(t);n||(n=new Set,us.set(t,n)),n.add(e),cs?.observe(t)}),()=>{n.forEach(t=>{const n=us.get(t);n?.delete(e),n?.size||cs?.unobserve(t)})}}const ys=new Set;let vs;function xs(t){return ys.add(t),vs||(vs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ys.forEach(e=>e(t))},window.addEventListener("resize",vs)),()=>{ys.delete(t),ys.size||"function"!=typeof vs||(window.removeEventListener("resize",vs),vs=void 0)}}function ws(t,e){return"function"==typeof t?xs(t):gs(t,e)}function Ts(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return at.preUpdate(i,!0),()=>lt(i)}function bs(){const{value:t}=ot;null!==t?(t.frameloop.rate.push(ut.delta),t.animations.mainThread.push(mt.mainThread),t.animations.waapi.push(mt.waapi),t.animations.layout.push(mt.layout)):lt(bs)}function Ss(t){return t.reduce((t,e)=>t+e,0)/t.length}function Ps(t,e=Ss){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Es=t=>Math.round(1e3/t);function As(){ot.value=null,ot.addProjectionMetrics=null}function Cs(){const{value:t}=ot;if(!t)throw new Error("Stats are not being measured");As(),lt(bs);const e={frameloop:{setup:Ps(t.frameloop.setup),rate:Ps(t.frameloop.rate),read:Ps(t.frameloop.read),resolveKeyframes:Ps(t.frameloop.resolveKeyframes),preUpdate:Ps(t.frameloop.preUpdate),update:Ps(t.frameloop.update),preRender:Ps(t.frameloop.preRender),render:Ps(t.frameloop.render),postRender:Ps(t.frameloop.postRender)},animations:{mainThread:Ps(t.animations.mainThread),waapi:Ps(t.animations.waapi),layout:Ps(t.animations.layout)},layoutProjection:{nodes:Ps(t.layoutProjection.nodes),calculatedTargetDeltas:Ps(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ps(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Es(n.min),n.max=Es(n.max),n.avg=Es(n.avg),[n.min,n.max]=[n.max,n.min],e}function Ms(t){return ls(t)&&"svg"===t.tagName}function Vs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function ks(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=Ue(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Rs(t){const e=[];Oi.current=e;const n=t();Oi.current=void 0;const i=Ii(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>at.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),lt(i)})}(e,i,t),i}const Ds=t=>Boolean(t&&t.getVelocity);function Ls(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)};if(t.attach((e,i)=>{r=e,s=t=>i(Bs(t,a)),at.postRender(()=>{l(),o=new Je({keyframes:[Os(t.get()),Os(r)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),Ds(e)){const n=e.on("change",e=>t.set(Bs(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Bs(t,e){return e?t+e:t}function Os(t){return"number"==typeof t?t:parseFloat(t)}const js=[...ai,Ut,_t],Is=t=>js.find(ri(t));function Fs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Ws={},Us=null;const $s=(t,e)=>{Ws[t]=e},Ns=()=>{Us||(Us=document.createElement("style"),Us.id="motion-view");let t="";for(const e in Ws){const n=Ws[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Us.textContent=t,document.head.appendChild(Us),Ws={}},zs=()=>{Us&&Us.parentElement&&Us.parentElement.removeChild(Us)};function Ys(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Xs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function Hs(){return document.getAnimations().filter(Xs)}const Ks=["layout","enter","exit","new","old"];function Gs(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new Gn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||$s(":root",{"view-transition-name":"none"}),$s("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Ns();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{zs()}),new Promise(t=>{s.ready.then(()=>{const e=Hs(),s=[];n.forEach((t,e)=>{for(const n of Ks){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...si(i,t),...si(r,t)},l=Fs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=B(o.duration)),o.delay&&(o.delay=B(o.delay));const u=new Fn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(u)}}});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=Ys(o);if(!r)continue;const a=n.get(r.layer);if(a)_s(a,"enter")&&_s(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Zn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...si(i,n)};o.duration&&(o.duration=B(o.duration)),o=In(o);const a=Bn(o.ease,o.duration);e.updateTiming({delay:B(o.delay??0),duration:o.duration,easing:a}),s.push(new Zn(t))}}t(new Gn(s))})})}function _s(t,e){return t?.[e]?.keyframes.opacity}let qs=[],Zs=null;function Js(){Zs=null;const[t]=qs;var e;t&&(w(qs,e=t),Zs=e,Gs(e).then(t=>{e.notifyReady(t),t.finished.finally(Js)}))}function Qs(){for(let t=qs.length-1;t>=0;t--){const e=qs[t],{interrupt:n}=e.options;if("immediate"===n){const n=qs.slice(0,t+1).map(t=>t.update),i=qs.slice(t+1);e.update=()=>{n.forEach(t=>t())},qs=[e,...i];break}}Zs&&"immediate"!==qs[0]?.options.interrupt||Js()}class to{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=V,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,qs.push(n),Yi.render(Qs)}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: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 eo=at,no=st.reduce((t,e)=>(t[e]=t=>lt(t),t),{}),io=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function so(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function oo(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=so(t,e);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let e=0;e<i.length;e++){const n=i[e];"function"==typeof n?n():so(t[e],null)}}}}(...t),t)}class ro extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=Bi(t)&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function ao({children:t,isPresent:n,anchorX:s,root:o}){const r=e.useId(),a=e.useRef(null),l=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=e.useContext(io),c=t.props?.ref??t?.ref,h=oo(a,c);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:c,right:h}=l.current;if(n||!a.current||!t||!e)return;const d="left"===s?`left: ${c}`:`right: ${h}`;a.current.dataset.motionPopId=r;const p=document.createElement("style");u&&(p.nonce=u);const m=o??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${d}px !important;\n top: ${i}px !important;\n }\n `),()=>{m.contains(p)&&m.removeChild(p)}},[n]),d(ro,{isPresent:n,childRef:a,sizeRef:l,children:i.cloneElement(t,{ref:h})})}const lo=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u,root:c})=>{const h=f(uo),p=e.useId();let m=!0,g=e.useMemo(()=>(m=!1,{id:p,initial:n,isPresent:s,custom:r,onExitComplete:t=>{h.set(t,!0);for(const t of h.values())if(!t)return;o&&o()},register:t=>(h.set(t,!1),()=>h.delete(t))}),[s,h,o]);return a&&m&&(g={...g}),e.useMemo(()=>{h.forEach((t,e)=>h.set(e,!1))},[s]),i.useEffect(()=>{!s&&!h.size&&o&&o()},[s]),"popLayout"===l&&(t=d(ao,{isPresent:s,anchorX:u,root:c,children:t})),d(v.Provider,{value:g,children:t})};function uo(){return new Map}function co(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const ho=t=>t.key||"";function po(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const mo=e.createContext(null);function fo(t){return t.max-t.min}function go(t,e,n,i=.5){t.origin=i,t.originPoint=Qt(e.min,e.max,t.origin),t.scale=fo(n)/fo(e),t.translate=Qt(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 yo(t,e,n,i){go(t.x,e.x,n.x,i?i.originX:void 0),go(t.y,e.y,n.y,i?i.originY:void 0)}function vo(t,e,n){t.min=n.min+e.min,t.max=t.min+fo(e)}function xo(t,e,n){t.min=e.min-n.min,t.max=t.min+fo(e)}function wo(t,e,n){xo(t.x,e.x,n.x),xo(t.y,e.y,n.y)}const To=t=>!t.isLayoutDirty&&t.willUpdate(!1);function bo(){const t=new Set,e=new WeakMap,n=()=>t.forEach(To);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}}const So=t=>null!==t;const Po={type:"spring",stiffness:500,damping:25,restSpeed:10},Eo={type:"keyframes",duration:.8},Ao={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Co=(t,{keyframes:e})=>e.length>2?Eo:pn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Po:Ao;const Mo=(t,e,n,i={},s,o)=>r=>{const a=si(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=B(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||Object.assign(c,Co(t,c)),c.duration&&(c.duration=B(c.duration)),c.repeatDelay&&(c.repeatDelay=B(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(zn(c),0===c.delay&&(h=!0)),(P.instantAnimations||P.skipAnimations)&&(h=!0,zn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(So),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}(c.keyframes,a);if(void 0!==t)return void at.update(()=>{c.onUpdate(t),c.onComplete()})}return a.isSync?new Je(c):new Kn(c)};function Vo(t,e,n){const i=Ds(t)?t:Ii(t);return i.start(Mo("",i,e,n)),i.animation}const ko=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ro="framerAppearId",Do="data-"+ko(Ro);function Lo(t){return t.props[Do]}const Bo=(t,e)=>t.depth-e.depth;class Oo{constructor(){this.children=[],this.isDirty=!1}add(t){x(this.children,t),this.isDirty=!0}remove(t){w(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bo),this.isDirty=!1,this.children.forEach(t)}}function jo(t,e){const n=pt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(lt(i),t(o-e))};return at.setup(i,!0),()=>lt(i)}function Io(t){return Ds(t)?t.get():t}const Fo=["TopLeft","TopRight","BottomLeft","BottomRight"],Wo=Fo.length,Uo=t=>"string"==typeof t?parseFloat(t):t,$o=t=>"number"==typeof t||Ot.test(t);function No(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const zo=Xo(0,.5,G),Yo=Xo(.5,.95,V);function Xo(t,e,n){return i=>i<t?0:i>e?1:n(D(t,e,i))}function Ho(t,e){t.min=e.min,t.max=e.max}function Ko(t,e){Ho(t.x,e.x),Ho(t.y,e.y)}function Go(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function _o(t){return void 0===t||1===t}function qo({scale:t,scaleX:e,scaleY:n}){return!_o(t)||!_o(e)||!_o(n)}function Zo(t){return qo(t)||Jo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Jo(t){return Qo(t.x)||Qo(t.y)}function Qo(t){return t&&"0%"!==t}function tr(t,e,n){return n+e*(t-n)}function er(t,e,n,i,s){return void 0!==s&&(t=tr(t,s,i)),tr(t,n,i)+e}function nr(t,e=0,n=1,i,s){t.min=er(t.min,e,n,i,s),t.max=er(t.max,e,n,i,s)}function ir(t,{x:e,y:n}){nr(t.x,e.translate,e.scale,e.originPoint),nr(t.y,n.translate,n.scale,n.originPoint)}const sr=.999999999999,or=1.0000000000001;function rr(t,e){t.min=t.min+e,t.max=t.max+e}function ar(t,e,n,i,s=.5){nr(t,e,n,Qt(t.min,t.max,s),i)}function lr(t,e){ar(t.x,e.x,e.scaleX,e.scale,e.originX),ar(t.y,e.y,e.scaleY,e.scale,e.originY)}function ur(t,e,n,i,s){return t=tr(t-=e,1/n,i),void 0!==s&&(t=tr(t,1/s,i)),t}function cr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){Bt.test(e)&&(e=parseFloat(e),e=Qt(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Qt(o.min,o.max,i);t===o&&(a-=e),t.min=ur(t.min,e,n,a,s),t.max=ur(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const hr=["x","scaleX","originX"],dr=["y","scaleY","originY"];function pr(t,e,n,i){cr(t.x,e,hr,n?n.x:void 0,i?i.x:void 0),cr(t.y,e,dr,n?n.y:void 0,i?i.y:void 0)}const mr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function fr(t){return 0===t.translate&&1===t.scale}function gr(t){return fr(t.x)&&fr(t.y)}function yr(t,e){return t.min===e.min&&t.max===e.max}function vr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function xr(t,e){return vr(t.x,e.x)&&vr(t.y,e.y)}function wr(t){return fo(t.x)/fo(t.y)}function Tr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class br{constructor(){this.members=[]}add(t){x(this.members,t),t.scheduleRender()}remove(t){if(w(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){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Sr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!Ot.test(t))return t;t=parseFloat(t)}return`${Sr(t,e.target.x)}% ${Sr(t,e.target.y)}%`}},Er={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=_t.parse(t);if(s.length>5)return i;const o=_t.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 u=Qt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},Ar={borderRadius:{...Pr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pr,borderTopRightRadius:Pr,borderBottomLeftRadius:Pr,borderBottomRightRadius:Pr,boxShadow:Er};function Cr(t){return[t("x"),t("y")]}const Mr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Vr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},kr=["","X","Y","Z"];let Rr=0;function Dr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Lr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Lo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",at,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Lr(i)}function Br({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Rr++,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,ot.value&&(Vr.nodes=Vr.calculatedTargetDeltas=Vr.calculatedProjections=0),this.nodes.forEach(Ir),this.nodes.forEach(Yr),this.nodes.forEach(Xr),this.nodes.forEach(Fr),ot.addProjectionMetrics&&ot.addProjectionMetrics(Vr)},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 Oo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new L),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=ls(e)&&!Ms(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;at.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=jo(s,250),Mr.hasAnimatedSinceResize&&(Mr.hasAnimatedSinceResize=!1,this.nodes.forEach(zr)))})}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()||Zr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!xr(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...si(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||zr(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(),lt(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(Hr),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&&Lr(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,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())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ur);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach($r);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Nr),this.nodes.forEach(Or),this.nodes.forEach(jr)):this.nodes.forEach($r),this.clearAllSnapshots();const t=pt.now();ut.delta=b(0,1e3/60,t-ut.timestamp),ut.timestamp=t,ut.isProcessing=!0,ct.update.process(ut),ct.preRender.process(ut),ct.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Wr),this.sharedNodes.forEach(Kr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||fo(this.snapshot.measuredBox.x)||fo(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={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=i(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(!s)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,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Zo(this.latestValues)||o)&&(s(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)),ta((i=n).x),ta(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(na))){const{scroll:t}=this.root;t&&(rr(e.x,t.offset.x),rr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Ko(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&&Ko(e,t),rr(e.x,s.offset.x),rr(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ko(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&lr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Zo(i.latestValues)&&lr(n,i.latestValues)}return Zo(this.latestValues)&&lr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ko(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Zo(n.latestValues))continue;qo(n.latestValues)&&n.updateSnapshot();const i=mr();Ko(i,n.measurePageBox()),pr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Zo(this.latestValues)&&pr(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!==ut.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=ut.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(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(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,vo(r.x,a.x,l.x),vo(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ko(this.target,this.layout.layoutBox),ir(this.target,this.targetDelta)):Ko(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,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),ot.value&&Vr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!qo(this.parent.latestValues)&&!Jo(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}},wo(this.relativeTargetOrigin,e,n),Ko(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===ut.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;Ko(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(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&&lr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ir(t,r)),i&&Zo(o.latestValues)&&lr(t,o.latestValues))}e.x<or&&e.x>sr&&(e.x=1),e.y<or&&e.y>sr&&(e.y=1)}(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?(Go(this.prevProjectionDelta.x,this.projectionDelta.x),Go(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),yo(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Tr(this.projectionDelta.x,this.prevProjectionDelta.x)&&Tr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),ot.value&&Vr.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){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={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 r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(qr));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Gr(o.x,t.x,n),Gr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){_r(t.x,e.x,n.x,i),_r(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,yr(l.x,d.x)&&yr(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ko(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Qt(0,n.opacity??1,zo(i)),t.opacityExit=Qt(e.opacity??1,0,Yo(i))):o&&(t.opacity=Qt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Wo;s++){const o=`border${Fo[s]}Radius`;let r=No(e,o),a=No(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||$o(r)===$o(a)?(t[o]=Math.max(Qt(Uo(r),Uo(a),i),0),(Bt.test(a)||Bt.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Qt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),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&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{Mr.hasAnimatedSinceResize=!0,mt.layout++,this.motionValue||(this.motionValue=Ii(0)),this.currentAnimation=Vo(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{mt.layout--},onComplete:()=>{mt.layout--,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&&ea(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=fo(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=fo(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ko(e,n),lr(e,s),yo(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new br);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&&Dr("z",t,i,this.animationValues);for(let e=0;e<kr.length;e++)Dr(`rotate${kr[e]}`,t,i,this.animationValues),Dr(`skew${kr[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=Io(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=Io(e?.pointerEvents)||""),void(this.hasProjected&&!Zo(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=function(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,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}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"}(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 Ar){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=Ar[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?Io(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ur),this.root.sharedNodes.clear()}}}function Or(t){t.updateLayout()}function jr(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;"size"===s?Cr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=fo(i);i.min=n[t].min,i.max=i.min+s}):ea(s,e.layoutBox,n)&&Cr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=fo(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}};yo(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?yo(a,t.applyTransform(i,!0),e.measuredBox):yo(a,n,e.layoutBox);const l=!gr(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};wo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};wo(a,n,o.layoutBox),xr(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ir(t){ot.value&&Vr.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 Fr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Wr(t){t.clearSnapshot()}function Ur(t){t.clearMeasurements()}function $r(t){t.isLayoutDirty=!1}function Nr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Yr(t){t.resolveTargetDelta()}function Xr(t){t.calcProjection()}function Hr(t){t.resetSkewAndRotation()}function Kr(t){t.removeLeadSnapshot()}function Gr(t,e,n){t.translate=Qt(e.translate,0,n),t.scale=Qt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _r(t,e,n,i){t.min=Qt(e.min,n.min,i),t.max=Qt(e.max,n.max,i)}function qr(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zr={duration:.45,ease:[.4,0,.1,1]},Jr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Qr=Jr("applewebkit/")&&!Jr("chrome/")?Math.round:V;function ta(t){t.min=Qr(t.min),t.max=Qr(t.max)}function ea(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=wr(e),s=wr(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function na(t){return t!==t.root&&t.scroll?.wasRoot}function ia(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const sa=Br({attachResizeListener:(t,e)=>ia(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oa={current:void 0},ra=Br({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!oa.current){const t=new sa({});t.mount(window),t.setOptions({layoutScroll:!0}),oa.current=t}return oa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function aa({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function la(t,e){return aa(function(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}}(t.getBoundingClientRect(),e))}const ua={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"]},ca={};for(const t in ua)ca[t]={isEnabled:e=>ua[t].some(t=>!!e[t])};const ha={current:null},da={current:!1};function pa(){if(da.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ha.current=t.matches;t.addEventListener("change",e),e()}else ha.current=!1}const ma=new WeakMap;function fa(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function ga(t){return"string"==typeof t||Array.isArray(t)}const ya=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],va=["initial",...ya];function xa(t){return fa(t.animate)||va.some(e=>ga(t[e]))}function wa(t){return Boolean(xa(t)||t.variants)}function Ta(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function ba(t,e,n,i){if("function"==typeof e){const[s,o]=Ta(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]=Ta(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Sa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Pa{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=En,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=pt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,at.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;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=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=xa(e),this.isVariantNode=wa(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]&&Ds(e)&&e.set(a[t])}}mount(t){this.current=t,ma.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:(da.current||pa(),this.shouldReduceMotion=ha.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(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=pn.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&at.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 ca){const e=ca[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<Sa.length;e++){const n=Sa[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=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Ds(s))t.addValue(i,s);else if(Ds(o))t.addValue(i,Ii(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,Ii(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);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=Ii(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&&(E(n)||C(n))?n=parseFloat(n):!Is(n)&&_t.test(e)&&(n=xi(t,e)),this.setBaseTarget(t,Ds(n)?n.get():n)),Ds(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=ba(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||Ds(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 L),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Yi.render(this.render)}}class Ea extends Pa{constructor(){super(...arguments),this.KeyframeResolver=Ti}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;Ds(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const Aa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ca=dn.length;function Ma(t,e,n){let i="",s=!0;for(let o=0;o<Ca;o++){const r=dn[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Mi(a,gi[r]);if(!l){s=!1;i+=`${Aa[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Va(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(pn.has(t))r=!0;else if(gt(t))s[t]=n;else{const e=Mi(n,gi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Ma(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 ka(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 Ra(t,{layout:e,layoutId:n}){return pn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ar[t]||"opacity"===t)}function Da(t,e,n){const{style:i}=t,s={};for(const o in i)(Ds(i[o])||e.style&&Ds(e.style[o])||Ra(o,t)||void 0!==n?.getValue(o)?.liveStyle)&&(s[o]=i[o]);return s}class La extends Ea{constructor(){super(...arguments),this.type="html",this.renderInstance=ka}readValueFromInstance(t,e){if(pn.has(e))return this.projection?.isProjecting?ln(e):cn(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(gt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return la(t,e)}build(t,e,n){Va(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Da(t,e,n)}}function Ba(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>at.postRender(s),[s]),n]}const Oa=t=>!0===t,ja=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(mo),[r,a]=Ba(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>Oa(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:Oa(i)&&s.group||bo()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Ia=e.createContext({strict:!1});function Fa(t){for(const e in t)ca[e]={...ca[e],...t[e]}}function Wa(t){return"function"==typeof t}const Ua=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $a(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ua.has(t)}let Na=t=>!$a(t);function za(t){"function"==typeof t&&(Na=e=>e.startsWith("on")?!$a(e):t(e))}try{za(require("@emotion/is-prop-valid").default)}catch{}function Ya(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Na(s)||!0===n&&$a(s)||!e&&!$a(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const Xa=e.createContext(null),Ha={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ka={offset:"strokeDashoffset",array:"strokeDasharray"};const Ga=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _a(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Va(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);for(const t of Ga)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?Ha:Ka;t[o.offset]=Ot.transform(-i);const r=Ot.transform(e),a=Ot.transform(n);t[o.array]=`${r} ${a}`}(h,s,o,r,!1)}const qa=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"]),Za=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ja(t,e,n){const i=Da(t,e,n);for(const n in t)if(Ds(t[n])||Ds(e[n])){i[-1!==dn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Qa extends Ea{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(pn.has(e)){const t=vi(e);return t&&t.default||0}return e=qa.has(e)?e:ko(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Ja(t,e,n)}build(t,e,n){_a(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){!function(t,e,n,i){ka(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(qa.has(n)?n:ko(n),e.attrs[n])}(t,e,0,i)}mount(t){this.isSVGTag=Za(t.tagName),super.mount(t)}}const tl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function el(t){return"string"==typeof t&&!t.includes("-")&&!!(tl.indexOf(t)>-1||/[A-Z]/u.test(t))}const nl=(t,n)=>n.isSVG??el(t)?new Qa(n):new La(n,{allowProjection:t!==e.Fragment}),il=e.createContext({});function sl(t){const{initial:n,animate:i}=function(t,e){if(xa(t)){const{initial:e,animate:n}=t;return{initial:!1===e||ga(e)?e:void 0,animate:ga(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(il));return e.useMemo(()=>({initial:n,animate:i}),[ol(n),ol(i)])}function ol(t){return Array.isArray(t)?t.join(" "):t}const rl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function al(t,e,n){for(const i in e)Ds(e[i])||Ra(i,n)||(t[i]=e[i])}function ll(t,n){const i={};return al(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Va(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ul(t,e){const n={},i=ll(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const cl=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function hl(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return _a(e,n,Za(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};al(e,t.style,t),o.style={...e,...o.style}}return o}function dl(t,n,i,{latestValues:s},o,r=!1,a){const l=(a??el(t)?hl:ul)(n,s,o,t),u=Ya(n,"string"==typeof t,r),c=t!==e.Fragment?{...u,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>Ds(h)?h.get():h,[h]);return e.createElement(t,{...c,children:d})}function pl(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Io(o[t]);let{initial:r,animate:a}=t;const l=xa(t),u=wa(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!fa(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=ba(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const ml=t=>(n,i)=>{const s=e.useContext(il),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:pl(n,i,s,t),renderState:e()}}(t,n,s,o);return i?r():f(r)},fl=ml({scrapeMotionValuesFromProps:Da,createRenderState:rl}),gl=ml({scrapeMotionValuesFromProps:Ja,createRenderState:cl}),yl=Symbol.for("motionComponentSymbol");function vl(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function xl(t,e){if("function"==typeof t)return t(e);vl(t)&&(t.current=e)}function wl(t,n,i){const s=e.useRef(null);return e.useCallback(e=>{if(e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i)if(e){const t=xl(i,e);"function"==typeof t&&(s.current=t)}else s.current?(s.current(),s.current=null):xl(i,e)},[n,t,i])}const Tl=e.createContext({});function bl(t,n,i,s,o,r){const{visualElement:a}=e.useContext(il),l=e.useContext(Ia),u=e.useContext(v),c=e.useContext(io).reducedMotion,h=e.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:n,parent:a,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c,isSVG:r}));const d=h.current,p=e.useContext(Tl);!d||d.projection||!o||"html"!==d.type&&"svg"!==d.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Sl(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&vl(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,i,o,p);const m=e.useRef(!1);e.useInsertionEffect(()=>{d&&m.current&&d.update(i,u)});const f=i[Do],g=e.useRef(Boolean(f)&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return y(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),e.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),g.current=!1),d.enteringChildren=void 0)}),d}function Sl(t){if(t)return!1!==t.options.allowProjection?t.projection:Sl(t.parent)}function Pl(t,{forwardMotionProps:n=!1,type:i}={},s,o){s&&Fa(s);const r=i?"svg"===i:el(t),a=r?gl:fl;function l(i,s){let l;const u={...e.useContext(io),...i,layoutId:El(i)},{isStatic:c}=u,h=sl(i),m=a(i,c);if(!c&&g){e.useContext(Ia).strict;const n=function(t){const{drag:e,layout:n}=ca;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(u);l=n.MeasureLayout,h.visualElement=bl(t,m,u,o,n.ProjectionNode,r)}return p(il.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...u}):null,dl(t,i,wl(m,h.visualElement,s),m,c,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const u=e.forwardRef(l);return u[yl]=t,u}function El({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function Al(t,e){if("undefined"==typeof Proxy)return Pl;const n=new Map,i=(n,i)=>Pl(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(s,o)=>"create"===o?i:(n.has(o)||n.set(o,Pl(o,void 0,t,e)),n.get(o))})}function Cl(t,e,n){const i=t.getProps();return ba(i,e,void 0!==n?n:i.custom,t)}const Ml=t=>Array.isArray(t);function Vl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ii(n))}function kl(t){return Ml(t)?t[t.length-1]||0:t}function Rl(t,e){const n=Cl(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Vl(t,e,kl(o[e]))}}function Dl(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ds(i)&&i.add))return n.add(e);if(!n&&P.WillChange){const n=new P.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function Ll({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Bl(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;i&&(o=i);const l=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||u&&Ll(u,e))continue;const r={delay:n,...si(o||{},e)},c=i.get();if(void 0!==c&&!i.isAnimating&&!Array.isArray(s)&&s===c&&!r.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=Lo(t);if(n){const t=window.MotionHandoffAnimation(n,e,at);null!==t&&(r.startTime=t,h=!0)}}Dl(t,e),i.start(Mo(e,i,s,t.shouldReduceMotion&&oi.has(e)?{type:!1}:r,t,h));const d=i.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{at.update(()=>{r&&Rl(t,r)})}),l}function Ol(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}function jl(t,e,n={}){const i=Cl(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(Bl(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(jl(l,e,{...r,delay:n+("function"==typeof i?0:i)+Ol(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 Il(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>jl(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=jl(t,e,n);else{const s="function"==typeof e?Cl(t,e,n.custom):e;i=Promise.all(Bl(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function Fl(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 Wl=va.length;function Ul(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Ul(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<Wl;n++){const i=va[n],s=t.props[i];(ga(s)||!1===s)&&(e[i]=s)}return e}const $l=[...ya].reverse(),Nl=ya.length;function zl(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Il(t,e,n)))}(t),n=Hl(),i=!0;const s=e=>(n,i)=>{const s=Cl(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 o(o){const{props:r}=t,a=Ul(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Nl;e++){const d=$l[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=ga(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||fa(m)||"boolean"==typeof m)continue;const v=Yl(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const T=Array.isArray(m)?m:[m];let b=T.reduce(s(d),{});!1===g&&(b={});const{prevResolvedValues:S={}}=p,P={...S,...b},E=e=>{x=!0,u.has(e)&&(w=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Ml(e)&&Ml(n)?!Fl(e,n):e!==n,i?null!=e?E(t):u.add(t):void 0!==e&&u.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const A=y&&v;x&&(!A||w)&&l.push(...T.map(e=>{const n={type:d};if("string"==typeof e&&i&&!A&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Cl(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=Ol(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=Cl(t,Array.isArray(r.initial)?r.initial[0]:r.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}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,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=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Hl()}}}function Yl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Fl(e,t)}function Xl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hl(){return{animate:Xl(!0),whileInView:Xl(),whileHover:Xl(),whileTap:Xl(),whileDrag:Xl(),whileFocus:Xl(),exit:Xl()}}class Kl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Gl=0;const _l={animation:{Feature:class extends Kl{constructor(t){super(t),t.animationState||(t.animationState=zl(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fa(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends Kl{constructor(){super(...arguments),this.id=Gl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ql(t){return{point:{x:t.pageX,y:t.pageY}}}const Zl=t=>e=>Qi(e)&&t(e,ql(e));function Jl(t,e,n,i){return ia(t,e,Zl(n),i)}const Ql=({current:t})=>t?t.ownerDocument.defaultView:null,tu=(t,e)=>Math.abs(t-e);function eu(t,e){const n=tu(t.x,e.x),i=tu(t.y,e.y);return Math.sqrt(n**2+i**2)}class nu{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=ou(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=eu(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ut;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=iu(e,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ou("pointercancel"===t.type?this.lastMoveEventInfo:iu(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Qi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const r=iu(ql(t),this.transformPagePoint),{point:a}=r,{timestamp:l}=ut;this.history=[{...a,timestamp:l}];const{onSessionStart:u}=e;u&&u(t,ou(r,this.history)),this.removeListeners=R(Jl(this.contextWindow,"pointermove",this.handlePointerMove),Jl(this.contextWindow,"pointerup",this.handlePointerUp),Jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),lt(this.updatePoint)}}function iu(t,e){return e?{point:e(t.point)}:t}function su(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ou({point:t},e){return{point:t,delta:su(t,au(e)),offset:su(t,ru(e)),velocity:lu(e,.1)}}function ru(t){return t[0]}function au(t){return t[t.length-1]}function lu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=au(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>B(e)));)n--;if(!i)return{x:0,y:0};const o=O(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function uu(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function cu(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const hu=.35;function du(t,e,n){return{min:pu(t,e),max:pu(t,n)}}function pu(t,e){return"number"==typeof t?t:t[e]||0}const mu=new WeakMap;class fu{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:n}={}){const{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new nu(t,{onSessionStart:t=>{e?(this.stopAnimation(),this.snapToCursor(ql(t).point)):this.pauseAnimation()},onStart:(t,e)=>{this.stopAnimation();const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gi(n),!this.openDragLock))return;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(Bt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=fo(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&at.postRender(()=>s(t,e)),Dl(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Cr(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:Ql(this.visualElement)})}stop(t,e){const n=t||this.latestPointerEvent,i=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!n)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&at.postRender(()=>r(n,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!gu(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Qt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Qt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&vl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:uu(t.x,n,s),y:uu(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=hu){return!1===t?t=0:!0===t&&(t=hu),{x:du(t,"left","right"),y:du(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Cr(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vl(e))return!1;const i=e.current;t.invariant(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=function(t,e,n){const i=la(t,n),{scroll:s}=e;return s&&(rr(i.x,s.offset.x),rr(i.y,s.offset.y)),i}(i,s.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:cu(t.x,e.x),y:cu(t.y,e.y)}}(s.layout.layoutBox,o);if(n){const t=n(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(r));this.hasMutatedConstraints=!!t,t&&(r=aa(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Cr(r=>{if(!gu(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Dl(this.visualElement,t),n.start(Mo(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cr(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Cr(e=>{const{drag:n}=this.getProps();if(!gu(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e],r=s.get()||0;s.set(t[e]-Qt(n,o,.5)+r)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!vl(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cr(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=fo(t),s=fo(e);return s>i?n=D(e.min,e.max-i,t.min):i>s&&(n=D(t.min,t.max-s,e.min)),b(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Cr(e=>{if(!gu(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Qt(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;mu.set(this.visualElement,this);const t=Jl(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&!es(t.target)&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();vl(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),at.read(e);const s=ia(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cr(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hu,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function gu(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const yu=t=>(e,n)=>{t&&at.postRender(()=>t(e,n))};let vu=!1;class xu extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),vu&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Mr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,vu=!0,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||at.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;vu=!0,i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wu(t){const[n,i]=co(),s=e.useContext(m);return d(xu,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(Tl),isPresent:n,safeToRemove:i})}const Tu={pan:{Feature:class extends Kl{constructor(){super(...arguments),this.removePointerDownListener=V}onPointerDown(t){this.session=new nu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ql(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:yu(t),onStart:yu(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&at.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Jl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Kl{constructor(t){super(t),this.removeGroupControls=V,this.removeListeners=V,this.controls=new fu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||V}update(){const{dragControls:t}=this.node.getProps(),{dragControls:e}=this.node.prevProps||{};t!==e&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ra,MeasureLayout:wu}};function bu(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&at.postRender(()=>s(e,ql(e)))}function Su(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&at.postRender(()=>s(e,ql(e)))}const Pu=new WeakMap,Eu=new WeakMap,Au=t=>{const e=Pu.get(t.target);e&&e(t)},Cu=t=>{t.forEach(Au)};function Mu(t,e,n){const i=function({root:t,...e}){const n=t||document;Eu.has(n)||Eu.set(n,{});const i=Eu.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Cu,{root:t,...e})),i[s]}(e);return Pu.set(t,n),i.observe(t),()=>{Pu.delete(t),i.unobserve(t)}}const Vu={some:0,all:1};const ku={inView:{Feature:class extends Kl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Vu[i]};return Mu(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Kl{mount(){const{current:t}=this.node;t&&(this.unmount=rs(t,(t,e)=>(Su(this.node,e,"Start"),(t,{success:e})=>Su(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Kl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=R(ia(this.node.current,"focus",()=>this.onFocus()),ia(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Kl{mount(){const{current:t}=this.node;t&&(this.unmount=Zi(t,(t,e)=>(bu(this.node,e,"Start"),t=>bu(this.node,t,"End"))))}unmount(){}}}},Ru={layout:{ProjectionNode:ra,MeasureLayout:wu}},Du=Al({..._l,...ku,...Tu,...Ru},nl);function Lu({children:n,as:i="ul",axis:s="y",onReorder:o,values:r,...a},l){const u=f(()=>Du[i]),c=[],h=e.useRef(!1);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const p={axis:s,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[s]:c.push({value:t,layout:e[s]}),c.sort(ju)},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Qt(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?T(t,s,s+o):t}(c,t,e,n);c!==i&&(h.current=!0,o(i.map(Ou).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),d(u,{...a,ref:l,ignoreStrict:!0,children:d(Xa.Provider,{value:p,children:n})})}const Bu=e.forwardRef(Lu);function Ou(t){return t.value}function ju(t,e){return t.layout.min-e.layout.min}function Iu(t){const n=f(()=>Ii(t)),{isStatic:i}=e.useContext(io);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Fu(t,e){const n=Iu(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>at.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),lt(i)}}),n}function Wu(t,e,n,i){if("function"==typeof t)return function(t){Oi.current=[],t();const e=Fu(Oi.current,t);return Oi.current=void 0,e}(t);const s="function"==typeof e?e:ks(e,n,i);return Array.isArray(t)?Uu(t,s):Uu([t],([t])=>s(t))}function Uu(t,e){const n=f(()=>[]);return Fu(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function $u(t,e=0){return Ds(t)?t:Iu(e)}function Nu({children:n,style:i={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=f(()=>Du[o]),h=e.useContext(Xa),p={x:$u(i.x),y:$u(i.y)},m=Wu([p.x,p.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(h),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:g,registerItem:y,updateOrder:v}=h;return d(c,{drag:g,...l,dragSnapToOrigin:!0,style:{...i,x:p.x,y:p.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[g]&&v(s,p[g].get(),n[g]),r&&r(t,e)},onLayoutMeasure:t=>y(s,t),ref:u,ignoreStrict:!0,children:n})}const zu=e.forwardRef(Nu);var Yu=Object.freeze({__proto__:null,Group:Bu,Item:zu});function Xu(t){return"object"==typeof t&&!Array.isArray(t)}function Hu(t,e,n,i){return"string"==typeof t&&Xu(e)?Ai(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ku(t,e,n){return t*(e+1)}function Gu(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 _u(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(w(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Qt(s,o,i[r]),easing:tt(n,r)})}function qu(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Zu(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ju(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Qu(t,e){return e[t]||(e[t]=[]),e[t]}function tc(t){return Array.isArray(t)?t:[t]}function ec(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const nc=t=>"number"==typeof t,ic=t=>t.every(nc);class sc extends Pa{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}}function oc(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ls(t)&&!Ms(t)?new Qa(e):new La(e);n.mount(t),ma.set(t,n)}function rc(t){const e=new sc({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),ma.set(t,e)}function ac(e,n,i,s){const o=[];if(function(t,e){return Ds(t)||"number"==typeof t||"string"==typeof t&&!Xu(e)}(e,n))o.push(Vo(e,Xu(n)&&n.default||n,i&&i.default||i));else{const r=Hu(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let e=0;e<a;e++){const s=r[e];t.invariant(null!==s,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const l=s instanceof Element?oc:rc;ma.has(s)||l(s);const u=ma.get(s),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(e,a)),o.push(...Bl(u,{...n,transition:c},{}))}}return o}function lc(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,u={},c=new Map;let h=0,d=0,p=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){c.set(a,d);continue}if(!Array.isArray(a)){c.set(a.name,Gu(d,a.at,h,c));continue}let[m,f,g={}]=a;void 0!==g.at&&(d=Gu(d,g.at,h,c));let y=0;const v=(e,i,s,a=0,l=0)=>{const u=tc(e),{delay:c=0,times:h=Ne(u),type:m="keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const b="function"==typeof c?c(a,l):c,S=u.length,P=jn(m)?m:o?.[m||"keyframes"];if(S<=2&&P){let t=100;if(2===S&&ic(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...x};void 0!==T&&(e.duration=B(T));const n=ge(e,t,P);w=n.ease,T=n.duration}T??(T=r);const E=d+b;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-u.length;if(A>0&&$e(h,A),1===u.length&&u.unshift(null),f){t.invariant(f<20,"Repeat count too high, must be less than 20","repeat-count-high"),T=Ku(T,f);const e=[...u],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<f;t++){u.push(...e);for(let s=0;s<e.length;s++)h.push(n[s]+(t+1)),w.push(0===s?"linear":tt(i,s-1))}qu(h,f)}const C=E+T;_u(s,u,w,h,E,C),y=Math.max(b+T,y),p=Math.max(C,p)};if(Ds(m))v(f,g,Qu("default",Ju(m,l)));else{const t=Hu(m,f,s,u),e=t.length;for(let n=0;n<e;n++){const i=Ju(t[n],l);for(const t in f)v(f[t],ec(g,t),Qu(t,i),n,e)}}h=d,d+=y}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(Zu);const r=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(D(0,p,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const c=a.get(e);c.keyframes[s]=r,c.transition[s]={...n,duration:p,ease:u,times:l,...i}}}),a}(e,n,i,{spring:Fe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...ac(n,t,e))}),s}function uc(t){return function(e,n,i){let s,o=[];if(r=e,Array.isArray(r)&&r.some(Array.isArray))o=lc(e,n,t);else{const{onComplete:r,...a}=i||{};"function"==typeof r&&(s=r),o=ac(e,n,a,t)}var r;const a=new qn(o);return s&&a.finished.then(s),t&&(t.animations.push(a),a.finished.then(()=>{w(t.animations,a)})),a}}const cc=uc();const hc=e=>function(n,i,s){return new qn(function(e,n,i,s){const o=Ai(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={...si(s,t)};o.duration&&(o.duration=B(o.duration)),o.delay&&(o.delay=B(o.delay));const r=ti(e),l=Qn(t,o.pseudoElement||""),u=r.get(l);u&&u.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]=as(i,s)),Qe(e),Si(e,s),!o&&e.length<2&&e.unshift(as(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 Fn(i);e.set(n,s),s.finished.finally(()=>e.delete(n)),l.push(s)}return l}(n,i,s,e))},dc=hc(),pc={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function mc(t,e,n,i){const s=n[e],{length:o,position:r}=pc[e],a=s.current,l=n.time;s.current=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 u=i-l;s.velocity=u>50?0:j(s.current-a,u)}const fc={start:0,center:.5,end:1};function gc(t,e,n=0){let i=0;if(t in fc&&(t=fc[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 yc=[0,0];function vc(t,e,n,i){let s=Array.isArray(t)?t:yc,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,fc[t]?t:"0"]),o=gc(s[0],n,i),r=gc(s[1],e),o-r}const xc={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},wc={x:0,y:0};function Tc(t,e,n){const{offset:i=xc.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Bi(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}(s,t):wc,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=vc(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=Ue(e[o].offset,Ne(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=b(0,1,e[o].interpolate(e[o].current))}function bc(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){mc(t,"x",e,n),mc(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Tc(t,n,i)},notify:()=>e(n)}}const Sc=new WeakMap,Pc=new WeakMap,Ec=new WeakMap,Ac=t=>t===document.scrollingElement?window:t;function Cc(t,{container:e=document.scrollingElement,...n}={}){if(!e)return V;let i=Ec.get(e);i||(i=new Set,Ec.set(e,i));const s=bc(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(i.add(s),!Sc.has(e)){const t=()=>{for(const t of i)t.measure(ut.timestamp);at.preUpdate(n)},n=()=>{for(const t of i)t.notify()},s=()=>at.read(t);Sc.set(e,s);const o=Ac(e);window.addEventListener("resize",s,{passive:!0}),e!==document.documentElement&&Pc.set(e,ws(e,s)),o.addEventListener("scroll",s,{passive:!0}),s()}const o=Sc.get(e);return at.read(o,!1,!0),()=>{lt(o);const t=Ec.get(e);if(!t)return;if(t.delete(s),t.size)return;const n=Sc.get(e);Sc.delete(e),n&&(Ac(e).removeEventListener("scroll",n),Pc.get(e)?.(),window.removeEventListener("resize",n))}}const Mc=new Map;function Vc({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Mc.get(e)??new Map;Mc.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Mn()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Cc(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}function kc(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return V;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Cc(n=>{t(n[e.axis].progress,n)},e):Ts(t,Vc(e))}(t,s):function(t,e){const n=Vc(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Ts(e=>{t.time=t.iterationDuration*e},n))})}(t,s)}const Rc={some:0,all:1};function Dc(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ai(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:Rc[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}const Lc=Al();function Bc(t){return e.useEffect(()=>()=>t(),[])}const Oc={renderer:nl,..._l,...ku},jc={...Oc,...Tu,...Ru},Ic={renderer:nl,..._l};function Fc(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const Wc=()=>({scrollX:Ii(0),scrollY:Ii(0),scrollXProgress:Ii(0),scrollYProgress:Ii(0)}),Uc=t=>!!t&&!t.current;function $c({container:n,target:i,...s}={}){const o=f(Wc),r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=kc((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)},{...s,container:n?.current||void 0,target:i?.current||void 0}),()=>{r.current?.()}),[n,i,JSON.stringify(s.offset)]);return y(()=>(a.current=!1,Uc(n)||Uc(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>a.current?(t.invariant(!Uc(n),"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!Uc(i),"Target ref is defined but not hydrated","use-scroll-ref"),l()):void 0,[l]),o}function Nc(t){const n=e.useRef(0),{isStatic:i}=e.useContext(io);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return at.update(e,!0),()=>lt(e)},[t])}class zc extends ji{constructor(){super(...arguments),this.isEnabled=!1}add(t){(pn.has(t)||Ei.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function Yc(){!da.current&&pa();const[t]=e.useState(ha.current);return t}function Xc(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Rl(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Xc(t,e)})})}function Hc(){let e=!1;const n=new Set,i={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(i,s){t.invariant(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const o=[];return n.forEach(t=>{o.push(Il(t,i,{transitionOverride:s}))}),Promise.all(o)},set:i=>(t.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach(t=>{!function(t,e){Array.isArray(e)?Xc(t,e):"string"==typeof e?Xc(t,[e]):Rl(t,e)}(t,i)})),stop(){n.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(e=!0,()=>{e=!1,i.stop()})};return i}function Kc(){const t=f(Hc);return y(t.mount,[]),t}const Gc=Kc;class _c{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const qc=()=>new _c;function Zc(t){return null!==t&&"object"==typeof t&&yl in t}function Jc(){return Qc}function Qc(t){oa.current&&(oa.current.isUpdating=!1,oa.current.blockUpdate(),t&&t())}const th=new Map,eh=new Map,nh=(t,e)=>`${t}: ${pn.has(e)?"transform":e}`;function ih(t,e,n){const i=nh(t,e),s=th.get(i);if(!s)return null;const{animation:o,startTime:r}=s;function a(){window.MotionCancelOptimisedAnimation?.(t,e,n)}return o.onfinish=a,null===r||window.MotionHandoffIsComplete?.(t)?(a(),null):r}let sh,oh;const rh=new Set;function ah(){rh.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),rh.clear()}const lh=()=>({});class uh extends Pa{constructor(){super(...arguments),this.measureInstanceViewportBox=mr}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const ch=ml({scrapeMotionValuesFromProps:lh,createRenderState:lh});let hh=0;const dh=t=>t>.001?1/t:1e5;let ph=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",root:u})=>{const[c,p]=co(a),g=e.useMemo(()=>po(t),[t]),v=a&&!c?[]:g.map(ho),x=e.useRef(!0),w=e.useRef(g),T=f(()=>new Map),b=e.useRef(new Set),[S,P]=e.useState(g),[E,A]=e.useState(g);y(()=>{x.current=!1,w.current=g;for(let t=0;t<E.length;t++){const e=ho(E[t]);v.includes(e)?(T.delete(e),b.current.delete(e)):!0!==T.get(e)&&T.set(e,!1)}},[E,v.length,v.join("-")]);const C=[];if(g!==S){let t=[...g];for(let e=0;e<E.length;e++){const n=E[e],i=ho(n);v.includes(i)||(t.splice(e,0,n),C.push(n))}return"wait"===r&&C.length&&(t=C),A(po(t)),P(g),null}const{forceRender:M}=e.useContext(m);return d(h,{children:E.map(t=>{const e=ho(t),h=!(a&&!c)&&(g===E||v.includes(e));return d(lo,{isPresent:h,initial:!(x.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,root:u,onExitComplete:h?void 0:()=>{if(b.current.has(e))return;if(b.current.add(e),!T.has(e))return;T.set(e,!0);let t=!0;T.forEach(e=>{e||(t=!1)}),t&&(M?.(),A(w.current),a&&p?.(),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:e})=>(i.useEffect(()=>{t.invariant(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")},[]),d(ja,{id:f(()=>"asl-"+hh++),children:e})),t.AsyncMotionValueAnimation=Kn,t.DOMKeyframesResolver=Ti,t.DeprecatedLayoutGroupContext=mo,t.DragControls=_c,t.GroupAnimation=Gn,t.GroupAnimationWithThen=qn,t.JSAnimation=Je,t.KeyframeResolver=En,t.LayoutGroup=ja,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Wa(n)),o=e.useRef(void 0);if(!Wa(n)){const{renderer:t,...e}=n;o.current=t,Fa(e)}return e.useEffect(()=>{Wa(n)&&n().then(({renderer:t,...e})=>{Fa(e),o.current=t,s(!0)})},[]),d(Ia.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&za(n),(i={...e.useContext(io),...i}).isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(io.Provider,{value:s,children:t})},t.MotionConfigContext=io,t.MotionContext=il,t.MotionGlobalConfig=P,t.MotionValue=ji,t.NativeAnimation=Fn,t.NativeAnimationExtended=$n,t.NativeAnimationWrapper=Zn,t.PopChild=ao,t.PresenceChild=lo,t.PresenceContext=v,t.Reorder=Yu,t.SubscriptionManager=L,t.SwitchLayoutGroupContext=Tl,t.ViewTransitionBuilder=to,t.VisualElement=Pa,t.WillChangeMotionValue=zc,t.acceleratedValues=Ei,t.activeAnimations=mt,t.addAttrValue=Ri,t.addPointerEvent=Jl,t.addPointerInfo=Zl,t.addScaleCorrector=function(t){for(const e in t)Ar[e]=t[e],gt(e)&&(Ar[e].isCSSVariable=!0)},t.addStyleValue=Ui,t.addUniqueItem=x,t.alpha=bt,t.analyseComplexValue=Xt,t.animate=cc,t.animateMini=dc,t.animateValue=function(t){return new Je(t)},t.animateView=function(t,e={}){return new to(t,e)},t.animateVisualElement=Il,t.animationControls=Hc,t.animationMapKey=Qn,t.animations=_l,t.anticipate=H,t.applyGeneratorOptions=In,t.applyPxDefaults=Si,t.attachSpring=Ls,t.attrEffect=Di,t.backIn=Y,t.backInOut=X,t.backOut=z,t.buildTransform=Ma,t.calcGeneratorDuration=fe,t.calcLength=fo,t.cancelFrame=lt,t.cancelMicrotask=Xi,t.cancelSync=no,t.circIn=K,t.circInOut=_,t.circOut=G,t.clamp=b,t.collectMotionValues=Oi,t.color=Ut,t.complex=_t,t.containsCSSVariable=wt,t.convertOffsetToTimes=ze,t.createBox=mr,t.createGeneratorEasing=ge,t.createRenderBatcher=rt,t.createScopedAnimate=uc,t.cubicBezier=U,t.cubicBezierAsString=Dn,t.defaultEasing=Ye,t.defaultOffset=Ne,t.defaultTransformValue=ln,t.defaultValueTypes=yi,t.degrees=Lt,t.delay=jo,t.dimensionValueTypes=ai,t.disableInstantTransitions=function(){P.instantAnimations=!1},t.distance=tu,t.distance2D=eu,t.domAnimation=Oc,t.domMax=jc,t.domMin=Ic,t.easeIn=q,t.easeInOut=J,t.easeOut=Z,t.easingDefinitionToFunction=it,t.fillOffset=$e,t.fillWildcards=Qe,t.filterProps=Ya,t.findDimensionValueType=li,t.findValueType=Is,t.flushKeyframeResolvers=Pn,t.frame=at,t.frameData=ut,t.frameSteps=ct,t.generateLinearEasing=pe,t.getAnimatableNone=xi,t.getAnimationMap=ti,t.getComputedStyle=as,t.getDefaultValueType=vi,t.getEasingForSegment=tt,t.getMixer=ae,t.getOriginIndex=Vs,t.getValueAsType=Mi,t.getValueTransition=si,t.getVariableValue=ii,t.getViewAnimationLayerInfo=Ys,t.getViewAnimations=Hs,t.hasWarned=function(t){return I.has(t)},t.hex=Rt,t.hover=Zi,t.hsla=Wt,t.hslaToRgba=Zt,t.inView=Dc,t.inertia=We,t.interpolate=Ue,t.invisibleValues=se,t.isBezierDefinition=et,t.isBrowser=g,t.isCSSVariableName=gt,t.isCSSVariableToken=vt,t.isDragActive=Ki,t.isDragging=Hi,t.isEasingArray=Q,t.isElementKeyboardAccessible=es,t.isGenerator=jn,t.isHTMLElement=Bi,t.isMotionComponent=Zc,t.isMotionValue=Ds,t.isNodeOrChild=Ji,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Qi,t.isSVGElement=ls,t.isSVGSVGElement=Ms,t.isValidMotionProp=$a,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&Rn()||!e||"string"==typeof e&&(e in Ln||Rn())||et(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=C,t.keyframes=Xe,t.m=Lc,t.makeAnimationInstant=zn,t.makeUseVisualState=ml,t.mapEasingToNativeEasing=Bn,t.mapValue=function(t,e,n,i){const s=ks(e,n,i);return Rs(()=>s(t.get()))},t.maxGeneratorDuration=me,t.memo=M,t.microtask=Yi,t.millisecondsToSeconds=O,t.mirrorEasing=$,t.mix=he,t.mixArray=le,t.mixColor=ie,t.mixComplex=ce,t.mixImmediate=Jt,t.mixLinearColor=te,t.mixNumber=Qt,t.mixObject=ue,t.mixVisibility=oe,t.motion=Du,t.motionValue=Ii,t.moveItem=T,t.noop=V,t.number=Tt,t.numberValueTypes=gi,t.observeTimeline=Ts,t.optimizedAppearDataAttribute=Do,t.parseCSSVariable=ni,t.parseValueFromTransform=un,t.percent=Bt,t.pipe=R,t.positionalKeys=oi,t.press=rs,t.progress=D,t.progressPercentage=Ft,t.propEffect=Li,t.px=Ot,t.readTransformValue=cn,t.recordStats=function(){if(ot.value)throw As(),new Error("Stats are already being measured");const t=ot;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)},at.postRender(bs,!0),Cs},t.removeItem=w,t.resize=ws,t.resolveElements=Ai,t.resolveMotionValue=Io,t.reverseEasing=N,t.rgbUnit=Vt,t.rgba=kt,t.scale=St,t.scroll=kc,t.scrollInfo=Cc,t.secondsToMilliseconds=B,t.setDragLock=Gi,t.setStyle=Cn,t.spring=Fe,t.springValue=function(t,e){const n=Ii(Ds(t)?t.get():t);return Ls(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Vs(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=it(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset[Ro];if(!o)return;window.MotionHandoffAnimation=ih;const r=nh(o,e);oh||(oh=On(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),th.set(r,{animation:oh,startTime:null}),window.MotionHandoffAnimation=ih,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return eh.has(t);const n=nh(t,e);return Boolean(th.get(n))},window.MotionHandoffMarkAsComplete=t=>{eh.has(t)&&eh.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===eh.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=nh(t,e),o=th.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(rh.add(o),n.render(ah)):(th.delete(s),th.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Lo(t);if(!i)return;const s=window.MotionHasOptimisedAnimation?.(i,e),o=t.props.values?.[e];if(!s||!o)return;const r=n.on("change",t=>{o.get()!==t&&(window.MotionCancelOptimisedAnimation?.(i,e),r())});return r});const a=()=>{oh.cancel();const o=On(t,e,n,i);void 0===sh&&(sh=performance.now()),o.startTime=sh,th.set(r,{animation:o,startTime:sh}),s&&s(o)};eh.set(o,!1),oh.ready?oh.ready.then(a).catch(V):a()},t.startWaapiAnimation=On,t.statsBuffer=ot,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return b(0,1,s/t)}},t.styleEffect=$i,t.supportedWaapiEasing=Ln,t.supportsBrowserAnimation=Hn,t.supportsFlags=Vn,t.supportsLinearEasing=Rn,t.supportsPartialKeyframes=Pi,t.supportsScrollTimeline=Mn,t.svgEffect=zi,t.sync=eo,t.testValueType=ri,t.time=pt,t.transform=ks,t.transformPropOrder=dn,t.transformProps=pn,t.transformValue=Rs,t.transformValueTypes=fi,t.unwrapMotionComponent=function(t){if(Zc(t))return t[yl]},t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>uc(t));return Bc(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,e]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>hc(t));return Bc(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Gc,t.useAnimationControls=Kc,t.useAnimationFrame=Nc,t.useComposedRefs=oo,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]),o=e.useCallback(e=>{n.current="number"!=typeof e?F(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t]);return[i,o]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=ch({},!1),o=f(()=>new uh({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,f(()=>t=>Il(o,t))]},t.useDeprecatedInvertedScale=function(n){let i=Iu(1),s=Iu(1);const{visualElement:o}=e.useContext(il);return t.invariant(!(!n&&!o),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(ph,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),ph=!0,n?(i=n.scaleX||i,s=n.scaleY||s):o&&(i=o.getValue("scaleX",1),s=o.getValue("scaleY",1)),{scaleX:Wu(i,dh),scaleY:Wu(s,dh)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return ia(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return f(qc)},t.useElementScroll=function(t){return $c({container:t})},t.useForceUpdate=Ba,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return Dc(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=Jc,t.useInstantTransition=function(){const[t,n]=Ba(),i=Jc(),s=e.useRef(-1);return e.useEffect(()=>{at.postRender(()=>at.postRender(()=>{n===s.current&&(P.instantAnimations=!1)}))},[n]),e=>{i(()=>{P.instantAnimations=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Fu(e.filter(Ds),function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Ds(n)?n.get():n)}return i})},t.useMotionValue=Iu,t.useMotionValueEvent=Fc,t.usePageInView=function(){const[t,n]=e.useState(!0);return e.useEffect(()=>{const t=()=>n(!document.hidden);return document.hidden&&t(),document.addEventListener("visibilitychange",t),()=>{document.removeEventListener("visibilitychange",t)}},[]),t},t.usePresence=co,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Yc,t.useReducedMotionConfig=function(){const t=Yc(),{reducedMotion:n}=e.useContext(io);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=oa.current;t&&t.resetTree()},[])},t.useScroll=$c,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(io),s=()=>Ds(t)?t.get():t;if(i)return Wu(s);const o=Iu(s());return e.useInsertionEffect(()=>Ls(o,t,n),[o,JSON.stringify(n)]),o},t.useTime=function(){const t=Iu(0);return Nc(e=>t.set(e)),t},t.useTransform=Wu,t.useUnmountEffect=Bc,t.useVelocity=function(t){const e=Iu(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&at.update(n)};return Fc(t,"change",()=>{at.update(n,!1,!0)}),e},t.useViewportScroll=function(){return $c()},t.useWillChange=function(){return f(()=>new zc("auto"))},t.velocityPerSecond=j,t.vh=jt,t.visualElementStore=ma,t.vw=It,t.warnOnce=function(t,e,n){t||I.has(e)||(console.warn(S(e,n)),I.add(e))},t.wrap=F});
|