2 lines
172 KiB
JavaScript
2 lines
172 KiB
JavaScript
!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,c={key:!0,ref:!0,__self:!0,__source:!0};function u(t,e,n){var i,s={},r=null,u=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!c.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:u,props:s,_owner:l.current}}const h=r,d=u,p=u,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 S=(t,e,n)=>n>e?e:n<t?t:n;function P(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(P(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(P(e,n))});const b={},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 V(t){let e;return()=>(void 0===e&&(e=t()),e)}const C=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,j=t=>t/1e3;function I(t,e){return e?t*(1e3/e):0}const O=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 C;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 N=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$=t=>e=>1-t(1-e),Y=U(.33,1.53,.69,.99),H=$(Y),z=N(H),X=t=>(t*=2)<1?.5*H(t):.5*(2-Math.pow(2,-10*(t-1))),K=t=>1-Math.sin(Math.acos(t)),G=$(K),_=N(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:C,easeIn:q,easeInOut:J,easeOut:Z,circIn:K,circInOut:_,circOut:G,backIn:H,backInOut:z,backOut:Y,anticipate:X},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 c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={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(c),e&&ot.value&&ot.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(o,e?n:void 0),t),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:p,postRender:m}=r,f=()=>{const o=b.useManualTiming?s.timestamp:performance.now();n=!1,b.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),c.process(s),u.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:ct,steps:ut}=rt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:C,!0);let ht;function dt(){ht=void 0}const pt={now:()=>(void 0===ht&&pt.set(ct.isProcessing||b.useManualTiming?ct.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},St={...Tt,transform:t=>S(0,1,t)},Pt={...Tt,default:1},bt=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,Mt=(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)),Vt=(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}},Ct={...Tt,transform:t=>Math.round((t=>S(0,255,t))(t))},kt={test:Mt("rgb","red"),parse:Vt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ct.transform(t)+", "+Ct.transform(e)+", "+Ct.transform(n)+", "+bt(St.transform(i))+")"};const Rt={test:Mt("#"),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("%"),jt=Dt("px"),It=Dt("vh"),Ot=Dt("vw"),Ft=(()=>({...Bt,parse:t=>Bt.parse(t)/100,transform:t=>Bt.transform(100*t)}))(),Wt={test:Mt("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Bt.transform(bt(e))+", "+Bt.transform(bt(n))+", "+bt(St.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)}},Nt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const $t="number",Yt="color",Ht=/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 zt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Ht,t=>(Ut.test(t)?(i.color.push(o),s.push(Yt),n.push(Ut.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 zt(t).values}function Kt(t){const{split:e,types:n}=zt(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?bt(t[o]):e===Yt?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(Nt)?.length||0)>0},parse:Xt,createTransformer:Kt,getAnimatableNone:function(t){const e=Xt(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:ue:Array.isArray(t)?le:"object"==typeof t?Ut.test(t)?ie:ce: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 ce(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 ue=(e,n)=>{const i=_t.createTransformer(n),s=zt(e),o=zt(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:()=>ct.isProcessing?ct.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:j(s)}}function ye(t,e,n){const i=Math.max(e-5,0);return I(n-t(i),e-i)}const ve=100,xe=10,we=1,Te=0,Se=800,Pe=.3,be=.3,Ee={granular:.01,default:2},Ae={granular:.005,default:.5},Me=.01,Ve=10,Ce=.05,ke=1,Re=.001;function De({duration:e=Se,bounce:n=Pe,velocity:i=Te,mass:s=we}){let o,r;t.warning(e<=B(Ve),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=S(Ce,ke,a),e=S(Me,Ve,j(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),c=Be(Math.pow(t,2),a);return(-o(t)+Re>0?-1:1)*((s-r)*l)/c}):(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 je=["duration","bounce"],Ie=["stiffness","damping","mass"];function Oe(t,e){return e.some(e=>void 0!==t[e])}function Fe(t=be,e=Pe){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Te,stiffness:ve,damping:xe,mass:we,isResolvedFromDuration:!1,...t};if(!Oe(t,Ie)&&Oe(t,je))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*S(.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:-j(n.velocity||0)}),m=d||0,f=c/(2*Math.sqrt(l*u)),g=r-o,y=j(Math.sqrt(l/u)),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:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,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)<=c,d.value=d.done?g:n};let w,T;const S=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:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,x(t),S(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||b.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]||C:e;o=R(t,o)}i.push(o)}return i}(n,s,o),c=l.length,u=t=>{if(a&&t<e[0])return n[0];let i=0;if(c>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=>u(S(e[0],e[r-1],t)):u}function Ne(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 $e(t){const e=[0];return Ne(e,t.length-1),e}function Ye(t,e){return t.map(t=>t*e)}function He(t,e){return t.map(()=>e||J).splice(0,t.length-1)}function ze({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(Ye(n&&n.length===e.length?n:$e(e),t),e,{ease:Array.isArray(s)?s:He(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 Xe=t=>null!==t;function Ke(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 Ge={decay:We,inertia:We,tween:ze,keyframes:ze,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=ze,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||ze;a!==ze&&"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:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,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(u){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,u+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/r)):"mirror"===h&&(x=o)),v=S(0,1,n)*r}const w=y?{done:!1,value:c[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 P=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return P&&p!==We&&(w.value=Ke(c,this.options,f,this.speed)),m&&m(w.value),P&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return j(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(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=j(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 cn(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 un=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return cn(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===jt,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})=>cn(e,"x"),y:(t,{transform:e})=>cn(e,"y")};yn.translateX=yn.x,yn.translateY=yn.y;const vn=new Set;let xn=!1,wn=!1,Tn=!1;function Sn(){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 Pn(){vn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(wn=!0)})}function bn(){Tn=!0,Pn(),Sn(),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(Pn),at.resolveKeyframes(Sn))):(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 Mn(t,e,n){An(e)?t.style.setProperty(e,n):t.style[e]=n}const Vn={};function Cn(t,e){const n=V(t);return()=>Vn[e]??n()}const kn=Cn(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Rn=Cn(()=>{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 jn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Bn(a,s);Array.isArray(h)&&(u.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"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return ot.value&&p.finished.finally(()=>{mt.waapi--}),p}function In(t){return"function"==typeof t&&"applyToOptions"in t}function On({type:t,...e}){return In(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,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=On(e);this.animation=jn(n,i,s,c,o),!1===c.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):Mn(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return j(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+j(t)}get time(){return j(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&kn()?(this.animation.timeline=t,C):e(this)}}const Wn={anticipate:X,backInOut:z,circInOut:_};function Un(t){"string"==typeof t.ease&&t.ease in Wn&&(t.ease=Wn[t.ease])}class Nn extends Fn{constructor(t){Un(t),_e(t),super(t),void 0!==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=Math.max(10,pt.now()-this.startTime),l=S(0,10,a-10);e.setWithVelocity(r.sample(Math.max(0,a-l)).value,r.sample(a).value,l),r.stop()}}const $n=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!_t.test(t)&&"0"!==t||t.startsWith("url(")));function Yn(t){t.duration=0,t.type="keyframes"}const Hn=new Set(["opacity","clipPath","filter","transform"]),zn=V(()=>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:c}=e.owner.getProps();return zn()&&n&&Hn.has(n)&&("transform"!==n||!c)&&!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:c,...u}){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:c,...u},d=c?.KeyframeResolver||En;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=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||In(i))&&s)}(e,o,r,a)||(!b.instantAnimations&&l||u?.(Ke(e,i,n)),e[0]=e[e.length-1],Yn(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=!c&&Xn(h),p=h.motionValue?.owner?.current,m=d?new Nn({...h,element:p}):new Je(h);m.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}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(),bn()),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}function ei(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const ni=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ii(t){const e=ni.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function si(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]=ii(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)?si(o,n,i+1):o}const oi={type:"spring",stiffness:500,damping:25,restSpeed:10},ri={type:"keyframes",duration:.8},ai={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},li=(t,{keyframes:e})=>e.length>2?ri:pn.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:oi:ai,ci=t=>null!==t;function ui(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(ci),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function hi(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function di(t,e){const n=t?.[e]??t?.default??t;return n!==t?hi(n,t):n}function pi({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const mi=(t,e,n,i={},s,o)=>r=>{const a=di(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=B(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,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};pi(a)||Object.assign(u,li(t,u)),u.duration&&(u.duration=B(u.duration)),u.repeatDelay&&(u.repeatDelay=B(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let h=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Yn(u),0===u.delay&&(h=!0)),(b.instantAnimations||b.skipAnimations||s?.shouldSkipAnimations)&&(h=!0,Yn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=ui(u.keyframes,a);if(void 0!==t)return void at.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new Je(u):new Kn(u)};function fi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function gi(t,e,n,i){if("function"==typeof e){const[s,o]=fi(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]=fi(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function yi(t,e,n){const i=t.getProps();return gi(i,e,void 0!==n?n:i.custom,t)}const vi=new Set(["width","height","top","left","right","bottom",...dn]),xi={current:void 0};class wi{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 xi.current&&xi.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 I(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 Ti(t,e){return new wi(t,e)}const Si=t=>Array.isArray(t);function Pi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ti(n))}function bi(t){return Si(t)?t[t.length-1]||0:t}function Ei(t,e){const n=yi(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){Pi(t,e,bi(o[e]))}}const Ai=t=>Boolean(t&&t.getVelocity);function Mi(t){return Boolean(Ai(t)&&t.add)}function Vi(t,e){const n=t.getValue("willChange");if(Mi(n))return n.add(e);if(!n&&b.WillChange){const n=new b.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function Ci(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const ki="framerAppearId",Ri="data-"+Ci(ki);function Di(t){return t.props[Ri]}function Li({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Bi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?hi(o,l):l;const c=o?.reduceMotion;i&&(o=i);const u=[],h=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||h&&Li(h,e))continue;const r={delay:n,...di(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(s)&&s===l&&!r.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=Di(t);if(n){const t=window.MotionHandoffAnimation(n,e,at);null!==t&&(r.startTime=t,d=!0)}}Vi(t,e);const p=c??t.shouldReduceMotion;i.start(mi(e,i,s,p&&vi.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&u.push(m)}if(r){const e=()=>at.update(()=>{r&&Ei(t,r)});u.length?Promise.all(u).then(e):e()}return u}function ji(t,e,n={}){const i=yi(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(Bi(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(ji(l,e,{...r,delay:n+("function"==typeof i?0:i)+ei(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 Ii(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>ji(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=ji(t,e,n);else{const s="function"==typeof e?yi(t,e,n.custom):e;i=Promise.all(Bi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Oi=t=>e=>e.test(t),Fi=[Tt,jt,Bt,Lt,Ot,It,{test:t=>"auto"===t,parse:t=>t}],Wi=t=>Fi.find(Oi(t));function Ui(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||M(t))}const Ni=new Set(["brightness","contrast","saturate","opacity"]);function $i(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=Ni.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Yi=/\b([a-z-]*)\(.*?\)/gu,Hi={..._t,getAnimatableNone:t=>{const e=t.match(Yi);return e?e.map($i).join(" "):t}},zi={..._t,getAnimatableNone:t=>{const e=_t.parse(t);return _t.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Xi={...Tt,transform:Math.round},Ki={rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:Pt,scaleX:Pt,scaleY:Pt,scaleZ:Pt,skew:Lt,skewX:Lt,skewY:Lt,distance:jt,translateX:jt,translateY:jt,translateZ:jt,x:jt,y:jt,z:jt,perspective:jt,transformPerspective:jt,opacity:St,originX:Ft,originY:Ft,originZ:jt},Gi={borderWidth:jt,borderTopWidth:jt,borderRightWidth:jt,borderBottomWidth:jt,borderLeftWidth:jt,borderRadius:jt,borderTopLeftRadius:jt,borderTopRightRadius:jt,borderBottomRightRadius:jt,borderBottomLeftRadius:jt,width:jt,maxWidth:jt,height:jt,maxHeight:jt,top:jt,right:jt,bottom:jt,left:jt,inset:jt,insetBlock:jt,insetBlockStart:jt,insetBlockEnd:jt,insetInline:jt,insetInlineStart:jt,insetInlineEnd:jt,padding:jt,paddingTop:jt,paddingRight:jt,paddingBottom:jt,paddingLeft:jt,paddingBlock:jt,paddingBlockStart:jt,paddingBlockEnd:jt,paddingInline:jt,paddingInlineStart:jt,paddingInlineEnd:jt,margin:jt,marginTop:jt,marginRight:jt,marginBottom:jt,marginLeft:jt,marginBlock:jt,marginBlockStart:jt,marginBlockEnd:jt,marginInline:jt,marginInlineStart:jt,marginInlineEnd:jt,fontSize:jt,backgroundPositionX:jt,backgroundPositionY:jt,...Ki,zIndex:Xi,fillOpacity:St,strokeOpacity:St,numOctaves:Xi},_i={...Gi,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:Hi,WebkitFilter:Hi,mask:zi,WebkitMask:zi},qi=t=>_i[t],Zi=new Set([Hi,zi]);function Ji(t,e){let n=qi(t);return Zi.has(n)||(n=_t),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Qi=new Set(["auto","none","0"]);class ts 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=si(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!vi.has(n)||2!==t.length)return;const[i,s]=t,o=Wi(i),r=Wi(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&&!Qi.has(e)&&zt(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ji(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 es=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","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","fontSize","backgroundPositionX","backgroundPositionY"]);function ns(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&es.has(e)&&(t[n]=t[n]+"px")}const is=V(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),ss=new Set(["opacity","clipPath","filter","transform"]);function os(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function rs(t){return(e,n)=>{const i=os(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const as=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ls{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?as(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 cs(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new ls;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 us=(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")?Ci(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},hs=rs(cs(us)),ds=cs((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function ps(t){return A(t)&&"offsetHeight"in t}const ms={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const fs=new Set(["originX","originY","originZ"]),gs=(t,e,n,i)=>{let s,o;return pn.has(n)?(e.get("transform")||(ps(t)||e.get("transformBox")||gs(t,e,"transformBox",new wi("fill-box")),e.set("transform",new wi("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;if("number"==typeof o)r=o===(s.startsWith("scale")?1:0);else{const t=parseFloat(o);r=s.startsWith("scale")?1===t:0===t}r||(n=!1,e+=`${ms[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):fs.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new wi(""),()=>{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)},ys=rs(cs(gs));const vs=rs(cs((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,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new wi("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return us(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?gs:us)(t,e,n,i)}));const{schedule:xs,cancel:ws}=rt(queueMicrotask,!1),Ts={x:!1,y:!1};function Ss(){return Ts.x||Ts.y}function Ps(t){return"x"===t||"y"===t?Ts[t]?null:(Ts[t]=!0,()=>{Ts[t]=!1}):Ts.x||Ts.y?null:(Ts.x=Ts.y=!0,()=>{Ts.x=Ts.y=!1})}function bs(t,e){const n=os(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function Es(t,e,n={}){const[i,s,o]=bs(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||Ss())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o}const As=(t,e)=>!!e&&(t===e||As(t,e.parentElement)),Ms=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Vs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Cs(t){return Vs.has(t.tagName)||!0===t.isContentEditable}const ks=new Set(["INPUT","SELECT","TEXTAREA"]);function Rs(t){return ks.has(t.tagName)||!0===t.isContentEditable}const Ds=new WeakSet;function Ls(t){return e=>{"Enter"===e.key&&t(e)}}function Bs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function js(t){return Ms(t)&&!Ss()}const Is=new WeakSet;function Os(t,e,n={}){const[i,s,o]=bs(t,n),r=t=>{const i=t.currentTarget;if(!js(t))return;if(Is.has(t))return;Ds.add(i),n.stopPropagation&&Is.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Ds.has(i)&&Ds.delete(i),js(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||As(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),ps(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Ls(()=>{if(Ds.has(n))return;Bs(n,"down");const t=Ls(()=>{Bs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bs(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Cs(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Fs(t,e){const n=window.getComputedStyle(t);return An(e)?n.getPropertyValue(e):n[e]}function Ws(t){return A(t)&&"ownerSVGElement"in t}const Us=new WeakMap;let Ns;const $s=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ws(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ys=$s("inline","width","offsetWidth"),Hs=$s("block","height","offsetHeight");function zs({target:t,borderBoxSize:e}){Us.get(t)?.forEach(n=>{n(t,{get width(){return Ys(t,e)},get height(){return Hs(t,e)}})})}function Xs(t){t.forEach(zs)}function Ks(t,e){Ns||"undefined"!=typeof ResizeObserver&&(Ns=new ResizeObserver(Xs));const n=os(t);return n.forEach(t=>{let n=Us.get(t);n||(n=new Set,Us.set(t,n)),n.add(e),Ns?.observe(t)}),()=>{n.forEach(t=>{const n=Us.get(t);n?.delete(e),n?.size||Ns?.unobserve(t)})}}const Gs=new Set;let _s;function qs(t){return Gs.add(t),_s||(_s=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Gs.forEach(e=>e(t))},window.addEventListener("resize",_s)),()=>{Gs.delete(t),Gs.size||"function"!=typeof _s||(window.removeEventListener("resize",_s),_s=void 0)}}function Zs(t,e){return"function"==typeof t?qs(t):Ks(t,e)}function Js(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 Qs(){const{value:t}=ot;null!==t?(t.frameloop.rate.push(ct.delta),t.animations.mainThread.push(mt.mainThread),t.animations.waapi.push(mt.waapi),t.animations.layout.push(mt.layout)):lt(Qs)}function to(t){return t.reduce((t,e)=>t+e,0)/t.length}function eo(t,e=to){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const no=t=>Math.round(1e3/t);function io(){ot.value=null,ot.addProjectionMetrics=null}function so(){const{value:t}=ot;if(!t)throw new Error("Stats are not being measured");io(),lt(Qs);const e={frameloop:{setup:eo(t.frameloop.setup),rate:eo(t.frameloop.rate),read:eo(t.frameloop.read),resolveKeyframes:eo(t.frameloop.resolveKeyframes),preUpdate:eo(t.frameloop.preUpdate),update:eo(t.frameloop.update),preRender:eo(t.frameloop.preRender),render:eo(t.frameloop.render),postRender:eo(t.frameloop.postRender)},animations:{mainThread:eo(t.animations.mainThread),waapi:eo(t.animations.waapi),layout:eo(t.animations.layout)},layoutProjection:{nodes:eo(t.layoutProjection.nodes),calculatedTargetDeltas:eo(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:eo(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=no(n.min),n.max=no(n.max),n.avg=no(n.avg),[n.min,n.max]=[n.max,n.min],e}function oo(t){return Ws(t)&&"svg"===t.tagName}function ro(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function ao(...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 lo(t,e){const n=Ti(Ai(t)?t.get():t);return co(n,t,e),n}function co(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(uo(t,a)),at.postRender(()=>{(()=>{l();const e=ho(t.get()),i=ho(r);e!==i&&(o=new Je({keyframes:[e,i],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}))})(),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),Ai(e)){const n=e.on("change",e=>t.set(uo(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function uo(t,e){return e?t+e:t}function ho(t){return"number"==typeof t?t:parseFloat(t)}function po(t){const e=[];xi.current=e;const n=t();xi.current=void 0;const i=Ti(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 mo=[...Fi,Ut,_t],fo=t=>mo.find(Oi(t));function go(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let yo={},vo=null;const xo=(t,e)=>{yo[t]=e},wo=()=>{vo||(vo=document.createElement("style"),vo.id="motion-view");let t="";for(const e in yo){const n=yo[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}vo.textContent=t,document.head.appendChild(vo),yo={}},To=()=>{vo&&vo.parentElement&&vo.parentElement.removeChild(vo)};function So(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Po(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function bo(){return document.getAnimations().filter(Po)}const Eo=["layout","enter","exit","new","old"];function Ao(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)||xo(":root",{"view-transition-name":"none"}),xo("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),wo();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{To()}),new Promise(t=>{s.ready.then(()=>{const e=bo(),s=[];n.forEach((t,e)=>{for(const n of Eo){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...di(i,t),...di(r,t)},l=go(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 c=new Fn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=So(o);if(!r)continue;const a=n.get(r.layer);if(a)Mo(a,"enter")&&Mo(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Zn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...di(i,n)};o.duration&&(o.duration=B(o.duration)),o=On(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 Mo(t,e){return t?.[e]?.keyframes.opacity}let Vo=[],Co=null;function ko(){Co=null;const[t]=Vo;var e;t&&(w(Vo,e=t),Co=e,Ao(e).then(t=>{e.notifyReady(t),t.finished.finally(ko)}))}function Ro(){for(let t=Vo.length-1;t>=0;t--){const e=Vo[t],{interrupt:n}=e.options;if("immediate"===n){const n=Vo.slice(0,t+1).map(t=>t.update),i=Vo.slice(t+1);e.update=()=>{n.forEach(t=>t())},Vo=[e,...i];break}}Co&&"immediate"!==Vo[0]?.options.interrupt||ko()}class Do{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=C,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Vo.push(n),xs.render(Ro)}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 Lo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),jo=()=>({min:0,max:0}),Io=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Oo=new WeakMap;function Fo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Wo(t){return"string"==typeof t||Array.isArray(t)}const Uo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],No=["initial",...Uo];function $o(t){return Fo(t.animate)||No.some(e=>Wo(t[e]))}function Yo(t){return Boolean($o(t)||t.variants)}function Ho(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Ai(s))t.addValue(i,s);else if(Ai(o))t.addValue(i,Ti(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,Ti(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const zo={current:null},Xo={current:!1},Ko="undefined"!=typeof window;function Go(){if(Xo.current=!0,Ko)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>zo.current=t.matches;t.addEventListener("change",e),e()}else zo.current=!1}const _o=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let qo={};function Zo(t){qo=t}function Jo(){return qo}class Qo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=En,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=pt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,at.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=a,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=$o(e),this.isVariantNode=Yo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&Ai(e)&&e.set(l[t])}}mount(t){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=t,Oo.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:(Xo.current||Go(),this.shouldReduceMotion=zo.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),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){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&ss.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new Fn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:B(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}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;"undefined"!=typeof window&&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 qo){const e=qo[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<_o.length;e++){const n=_o[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=Ho(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=Ti(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):!fo(n)&&_t.test(e)&&(n=Ji(t,e)),this.setBaseTarget(t,Ai(n)?n.get():n)),Ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=gi(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||Ai(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(){xs.render(this.render)}}class tr extends Qo{constructor(){super(...arguments),this.KeyframeResolver=ts}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class er{constructor(t){this.isMounted=!1,this.node=t}update(){}}function nr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ir({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sr(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function or(t){return void 0===t||1===t}function rr({scale:t,scaleX:e,scaleY:n}){return!or(t)||!or(e)||!or(n)}function ar(t){return rr(t)||lr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function lr(t){return cr(t.x)||cr(t.y)}function cr(t){return t&&"0%"!==t}function ur(t,e,n){return n+e*(t-n)}function hr(t,e,n,i,s){return void 0!==s&&(t=ur(t,s,i)),ur(t,n,i)+e}function dr(t,e=0,n=1,i,s){t.min=hr(t.min,e,n,i,s),t.max=hr(t.max,e,n,i,s)}function pr(t,{x:e,y:n}){dr(t.x,e.translate,e.scale,e.originPoint),dr(t.y,n.translate,n.scale,n.originPoint)}const mr=.999999999999,fr=1.0000000000001;function gr(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&&xr(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,pr(t,r)),i&&ar(o.latestValues)&&xr(t,o.latestValues))}e.x<fr&&e.x>mr&&(e.x=1),e.y<fr&&e.y>mr&&(e.y=1)}function yr(t,e){t.min=t.min+e,t.max=t.max+e}function vr(t,e,n,i,s=.5){dr(t,e,n,Qt(t.min,t.max,s),i)}function xr(t,e){vr(t.x,e.x,e.scaleX,e.scale,e.originX),vr(t.y,e.y,e.scaleY,e.scale,e.originY)}function wr(t,e){return nr(sr(t.getBoundingClientRect(),e))}function Tr(t,e,n){const i=wr(t,n),{scroll:s}=e;return s&&(yr(i.x,s.offset.x),yr(i.y,s.offset.y)),i}const Sr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pr=dn.length;function br(t,e,n){let i="",s=!0;for(let o=0;o<Pr;o++){const r=dn[o],a=t[r];if(void 0===a)continue;let l=!0;if("number"==typeof a)l=a===(r.startsWith("scale")?1:0);else{const t=parseFloat(a);l=r.startsWith("scale")?1===t:0===t}if(!l||n){const t=as(a,Gi[r]);if(!l){s=!1;i+=`${Sr[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Er(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(pn.has(t))r=!0;else if(gt(t))s[t]=n;else{const e=as(n,Gi[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=br(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 Ar(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 Mr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vr={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!jt.test(t))return t;t=parseFloat(t)}return`${Mr(t,e.target.x)}% ${Mr(t,e.target.y)}%`}},Cr={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 c=Qt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},kr={borderRadius:{...Vr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vr,borderTopRightRadius:Vr,borderBottomLeftRadius:Vr,borderBottomRightRadius:Vr,boxShadow:Cr};function Rr(t,{layout:e,layoutId:n}){return pn.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!kr[t]||"opacity"===t)}function Dr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Ai(i[e])||s&&Ai(s[e])||Rr(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class Lr extends tr{constructor(){super(...arguments),this.type="html",this.renderInstance=Ar}readValueFromInstance(t,e){if(pn.has(e))return this.projection?.isProjecting?ln(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 wr(t,e)}build(t,e,n){Er(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Dr(t,e,n)}}class Br extends Qo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const jr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ir={offset:"strokeDashoffset",array:"strokeDasharray"};function Or(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?jr:Ir;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const Fr=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Wr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Er(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;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=u?.transformBox??"fill-box",delete h.transformBox);for(const t of Fr)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&&Or(h,s,o,r,!1)}const Ur=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"]),Nr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function $r(t,e,n,i){Ar(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ur.has(n)?n:Ci(n),e.attrs[n])}function Yr(t,e,n){const i=Dr(t,e,n);for(const n in t)if(Ai(t[n])||Ai(e[n])){i[-1!==dn.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class Hr extends tr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Io}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(pn.has(e)){const t=qi(e);return t&&t.default||0}return e=Ur.has(e)?e:Ci(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Yr(t,e,n)}build(t,e,n){Wr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){$r(t,e,0,i)}mount(t){this.isSVGTag=Nr(t.tagName),super.mount(t)}}const zr=No.length;function Xr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Xr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<zr;n++){const i=No[n],s=t.props[i];(Wo(s)||!1===s)&&(e[i]=s)}return e}function Kr(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 Gr=[...Uo].reverse(),_r=Uo.length;function qr(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ii(t,e,n)))}(t),n=Qr(),i=!0;const s=e=>(n,i)=>{const s=yi(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=Xr(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;e<_r;e++){const d=Gr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=Wo(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={...u},!p.isActive&&null===g||!m&&!p.prevProp||Fo(m)||"boolean"==typeof m)continue;if("exit"===d&&p.isActive&&!0!==g){p.prevResolvedValues&&(u={...u,...p.prevResolvedValues});continue}const v=Zr(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 S=T.reduce(s(d),{});!1===g&&(S={});const{prevResolvedValues:P={}}=p,b={...P,...S},E=e=>{x=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in b){const e=S[t],n=P[t];if(u.hasOwnProperty(t))continue;let i=!1;i=Si(e)&&Si(n)?!Kr(e,n):e!==n,i?null!=e?E(t):c.add(t):void 0!==e&&c.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),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=yi(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=ei(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=yi(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.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=Qr()}}}function Zr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Kr(e,t)}function Jr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qr(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function ta(t,e){t.min=e.min,t.max=e.max}function ea(t,e){ta(t.x,e.x),ta(t.y,e.y)}function na(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ia(t){return t.max-t.min}function sa(t,e,n){return Math.abs(t-e)<=n}function oa(t,e,n,i=.5){t.origin=i,t.originPoint=Qt(e.min,e.max,t.origin),t.scale=ia(n)/ia(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 ra(t,e,n,i){oa(t.x,e.x,n.x,i?i.originX:void 0),oa(t.y,e.y,n.y,i?i.originY:void 0)}function aa(t,e,n){t.min=n.min+e.min,t.max=t.min+ia(e)}function la(t,e,n){aa(t.x,e.x,n.x),aa(t.y,e.y,n.y)}function ca(t,e,n){t.min=e.min-n.min,t.max=t.min+ia(e)}function ua(t,e,n){ca(t.x,e.x,n.x),ca(t.y,e.y,n.y)}function ha(t,e,n,i,s){return t=ur(t-=e,1/n,i),void 0!==s&&(t=ur(t,1/s,i)),t}function da(t,e=0,n=1,i=.5,s,o=t,r=t){if(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=ha(t.min,e,n,a,s),t.max=ha(t.max,e,n,a,s)}function pa(t,e,[n,i,s],o,r){da(t,e[n],e[i],e[s],e.scale,o,r)}const ma=["x","scaleX","originX"],fa=["y","scaleY","originY"];function ga(t,e,n,i){pa(t.x,e,ma,n?n.x:void 0,i?i.x:void 0),pa(t.y,e,fa,n?n.y:void 0,i?i.y:void 0)}function ya(t){return 0===t.translate&&1===t.scale}function va(t){return ya(t.x)&&ya(t.y)}function xa(t,e){return t.min===e.min&&t.max===e.max}function wa(t,e){return xa(t.x,e.x)&&xa(t.y,e.y)}function Ta(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Sa(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function Pa(t){return ia(t.x)/ia(t.y)}function ba(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ea(t){return[t("x"),t("y")]}function Aa(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"}const Ma=["TopLeft","TopRight","BottomLeft","BottomRight"],Va=Ma.length,Ca=t=>"string"==typeof t?parseFloat(t):t,ka=t=>"number"==typeof t||jt.test(t);function Ra(t,e,n,i,s,o){s?(t.opacity=Qt(0,n.opacity??1,La(i)),t.opacityExit=Qt(e.opacity??1,0,Ba(i))):o&&(t.opacity=Qt(e.opacity??1,n.opacity??1,i));for(let s=0;s<Va;s++){const o=`border${Ma[s]}Radius`;let r=Da(e,o),a=Da(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||ka(r)===ka(a)?(t[o]=Math.max(Qt(Ca(r),Ca(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))}function Da(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const La=ja(0,.5,G),Ba=ja(.5,.95,C);function ja(t,e,n){return i=>i<t?0:i>e?1:n(D(t,e,i))}function Ia(t,e,n){const i=Ai(t)?t:Ti(t);return i.start(mi("",i,e,n)),i.animation}function Oa(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Fa=(t,e)=>t.depth-e.depth;class Wa{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(Fa),this.isDirty=!1,this.children.forEach(t)}}function Ua(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 Na(t){return Ai(t)?t.get():t}class $a{constructor(){this.members=[]}add(t){x(this.members,t);for(let e=this.members.length-1;e>=0;e--){const n=this.members[e];if(n===t||n===this.lead||n===this.prevLead)continue;const i=n.instance;i&&!1===i.isConnected&&!1!==n.isPresent&&!n.snapshot&&w(this.members,n)}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],i=e.instance;if(!1!==e.isPresent&&(!i||!1!==i.isConnected)){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();const i=n.options.layoutDependency,s=t.options.layoutDependency;if(!(void 0!==i&&void 0!==s&&i===s)){const i=n.instance;i&&!1===i.isConnected&&!n.snapshot||(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:o}=t.options;!1===o&&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)}}const Ya={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ha={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},za=["","X","Y","Z"];let Xa=0;function Ka(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ga(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Di(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&&Ga(i)}function _a({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=e?.()){this.id=Xa++,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&&(Ha.nodes=Ha.calculatedTargetDeltas=Ha.calculatedProjections=0),this.nodes.forEach(Ja),this.nodes.forEach(ol),this.nodes.forEach(rl),this.nodes.forEach(Qa),ot.addProjectionMetrics&&ot.addProjectionMetrics(Ha)},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 Wa)}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=Ws(e)&&!oo(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=Ua(s,250),Ya.hasAnimatedSinceResize&&(Ya.hasAnimatedSinceResize=!1,this.nodes.forEach(sl)))})}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()||dl,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Sa(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...di(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||sl(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(al),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&&Ga(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(el);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(nl);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(il),this.nodes.forEach(qa),this.nodes.forEach(Za)):this.nodes.forEach(nl),this.clearAllSnapshots();const t=pt.now();ct.delta=S(0,1e3/60,t-ct.timestamp),ct.timestamp=t,ct.isProcessing=!0,ut.update.process(ct),ut.preRender.process(ct),ut.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,xs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tl),this.sharedNodes.forEach(ll)}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||ia(this.snapshot.measuredBox.x)||ia(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&&!va(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||ar(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)),fl((i=n).x),fl(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(yl))){const{scroll:t}=this.root;t&&(yr(e.x,t.offset.x),yr(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ea(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&&ea(e,t),yr(e.x,s.offset.x),yr(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ea(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&&xr(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),ar(i.latestValues)&&xr(n,i.latestValues)}return ar(this.latestValues)&&xr(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ea(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ar(n.latestValues))continue;rr(n.latestValues)&&n.updateSnapshot();const i=Io();ea(i,n.measurePageBox()),ga(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return ar(this.latestValues)&&ga(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!==ct.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=ct.timestamp;const o=this.getClosestProjectingParent();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(),la(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ea(this.target,this.layout.layoutBox),pr(this.target,this.targetDelta)):ea(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&&Ha.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!rr(this.parent.latestValues)&&!lr(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}},ua(this.relativeTargetOrigin,e,n),ea(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===ct.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;ea(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;gr(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?(na(this.prevProjectionDelta.x,this.projectionDelta.x),na(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ra(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&ba(this.projectionDelta.x,this.prevProjectionDelta.x)&&ba(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a)),ot.value&&Ha.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(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(hl));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;cl(o.x,t.x,n),cl(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ua(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){ul(t.x,e.x,n.x,i),ul(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&wa(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ea(h,this.relativeTarget)),a&&(this.animationValues=s,Ra(s,i,this.latestValues,n,u,c)),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(()=>{Ya.hasAnimatedSinceResize=!0,mt.layout++,this.motionValue||(this.motionValue=Ti(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ia(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&&gl(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ia(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ia(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}ea(e,n),xr(e,s),ra(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new $a);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&&Ka("z",t,i,this.animationValues);for(let e=0;e<za.length;e++)Ka(`rotate${za[e]}`,t,i,this.animationValues),Ka(`skew${za[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=Na(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=Na(e?.pointerEvents)||""),void(this.hasProjected&&!ar(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=Aa(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 kr){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=kr[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?Na(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function qa(t){t.updateLayout()}function Za(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?Ea(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=ia(i);i.min=n[t].min,i.max=i.min+s}):gl(s,e.layoutBox,n)&&Ea(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=ia(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}};ra(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?ra(a,t.applyTransform(i,!0),e.measuredBox):ra(a,n,e.layoutBox);const l=!va(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ua(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ua(a,n,o.layoutBox),Sa(r,a)||(c=!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:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ja(t){ot.value&&Ha.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 Qa(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tl(t){t.clearSnapshot()}function el(t){t.clearMeasurements()}function nl(t){t.isLayoutDirty=!1}function il(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function sl(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ol(t){t.resolveTargetDelta()}function rl(t){t.calcProjection()}function al(t){t.resetSkewAndRotation()}function ll(t){t.removeLeadSnapshot()}function cl(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 ul(t,e,n,i){t.min=Qt(e.min,n.min,i),t.max=Qt(e.max,n.max,i)}function hl(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const dl={duration:.45,ease:[.4,0,.1,1]},pl=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ml=pl("applewebkit/")&&!pl("chrome/")?Math.round:C;function fl(t){t.min=ml(t.min),t.max=ml(t.max)}function gl(t,e,n){return"position"===t||"preserve-aspect"===t&&!sa(Pa(e),Pa(n),.2)}function yl(t){return t!==t.root&&t.scroll?.wasRoot}const vl=_a({attachResizeListener:(t,e)=>Oa(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),xl=t=>!t.isLayoutDirty&&t.willUpdate(!1);function wl(){const t=new Set,e=new WeakMap,n=()=>t.forEach(xl);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 Tl={current:void 0},Sl=_a({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Tl.current){const t=new vl({});t.mount(window),t.setOptions({layoutScroll:!0}),Tl.current=t}return Tl.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Pl="[data-layout], [data-layout-id]",bl=()=>{};function El(t){const e=Array.from(t.querySelectorAll(Pl));return t instanceof Element&&t.matches(Pl)&&(e.includes(t)||e.unshift(t)),e}function Al(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Ml(t,e,n){const i=Oo.get(t),s=i??new Lr({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Sl(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||Oo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function Vl(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const Cl=at,kl=st.reduce((t,e)=>(t[e]=t=>lt(t),t),{}),Rl=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Dl(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function Ll(...t){return i.useCallback(function(...t){return e=>{let n=!1;const i=t.map(t=>{const i=Dl(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():Dl(t[e],null)}}}}(...t),t)}class Bl extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,n=ps(t)&&t.offsetWidth||0,i=ps(t)&&t.offsetHeight||0,s=this.props.sizeRef.current;s.height=e.offsetHeight||0,s.width=e.offsetWidth||0,s.top=e.offsetTop,s.left=e.offsetLeft,s.right=n-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function jl({children:t,isPresent:n,anchorX:s,anchorY:o,root:r,pop:a}){const l=e.useId(),c=e.useRef(null),u=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:h}=e.useContext(Rl),p=t.props?.ref??t?.ref,m=Ll(c,p);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:d,right:p,bottom:m}=u.current;if(n||!1===a||!c.current||!t||!e)return;const f="left"===s?`left: ${d}`:`right: ${p}`,g="bottom"===o?`bottom: ${m}`:`top: ${i}`;c.current.dataset.motionPopId=l;const y=document.createElement("style");h&&(y.nonce=h);const v=r??document.head;return v.appendChild(y),y.sheet&&y.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${f}px !important;\n ${g}px !important;\n }\n `),()=>{v.contains(y)&&v.removeChild(y)}},[n]),d(Bl,{isPresent:n,childRef:c,sizeRef:u,pop:a,children:!1===a?t:i.cloneElement(t,{ref:m})})}const Il=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=f(Ol),m=e.useId();let g=!0,y=e.useMemo(()=>(g=!1,{id:m,initial:n,isPresent:s,custom:r,onExitComplete:t=>{p.set(t,!0);for(const t of p.values())if(!t)return;o&&o()},register:t=>(p.set(t,!1),()=>p.delete(t))}),[s,p,o]);return a&&g&&(y={...y}),e.useMemo(()=>{p.forEach((t,e)=>p.set(e,!1))},[s]),i.useEffect(()=>{!s&&!p.size&&o&&o()},[s]),t=d(jl,{pop:"popLayout"===l,isPresent:s,anchorX:c,anchorY:u,root:h,children:t}),d(v.Provider,{value:y,children:t})};function Ol(){return new Map}function Fl(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 Wl=t=>t.key||"";function Ul(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Nl=e.createContext(null);function $l(){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 Yl=t=>!0===t,Hl=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(Nl),[r,a]=$l(),l=e.useRef(null),c=s.id||o;null===l.current&&((t=>Yl(!0===t)||"id"===t)(i)&&c&&(n=n?c+"-"+n:c),l.current={id:n,group:Yl(i)&&s.group||wl()});const u=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:u,children:t})},zl=e.createContext({strict:!1}),Xl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Kl=!1;function Gl(){return function(){if(Kl)return;const t={};for(const e in Xl)t[e]={isEnabled:t=>Xl[e].some(e=>!!t[e])};Zo(t),Kl=!0}(),Jo()}function _l(t){const e=Gl();for(const n in t)e[n]={...e[n],...t[n]};Zo(e)}function ql(t){return"function"==typeof t}const Zl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Jl(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Zl.has(t)}let Ql=t=>!Jl(t);function tc(t){"function"==typeof t&&(Ql=e=>e.startsWith("on")?!Jl(e):t(e))}try{tc(require("@emotion/is-prop-valid").default)}catch{}function ec(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Ql(s)||!0===n&&Jl(s)||!e&&!Jl(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const nc=e.createContext(null),ic=["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 sc(t){return"string"==typeof t&&!t.includes("-")&&!!(ic.indexOf(t)>-1||/[A-Z]/u.test(t))}const oc=(t,n)=>n.isSVG??sc(t)?new Hr(n):new Lr(n,{allowProjection:t!==e.Fragment}),rc=e.createContext({});function ac(t){const{initial:n,animate:i}=function(t,e){if($o(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Wo(e)?e:void 0,animate:Wo(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(rc));return e.useMemo(()=>({initial:n,animate:i}),[lc(n),lc(i)])}function lc(t){return Array.isArray(t)?t.join(" "):t}const cc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uc(t,e,n){for(const i in e)Ai(e[i])||Rr(i,n)||(t[i]=e[i])}function hc(t,n){const i={};return uc(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Er(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function dc(t,e){const n={},i=hc(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 pc=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function mc(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Wr(e,n,Nr(s),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};uc(e,t.style,t),o.style={...e,...o.style}}return o}function fc(t,n,i,{latestValues:s},o,r=!1,a){const l=(a??sc(t)?mc:dc)(n,s,o,t),c=ec(n,"string"==typeof t,r),u=t!==e.Fragment?{...c,...l,ref:i}:{},{children:h}=n,d=e.useMemo(()=>Ai(h)?h.get():h,[h]);return e.createElement(t,{...u,children:d})}function gc(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Na(o[t]);let{initial:r,animate:a}=t;const l=$o(t),c=Yo(t);e&&c&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!Fo(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=gi(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[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const yc=t=>(n,i)=>{const s=e.useContext(rc),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:gc(n,i,s,t),renderState:e()}}(t,n,s,o);return i?r():f(r)},vc=yc({scrapeMotionValuesFromProps:Dr,createRenderState:cc}),xc=yc({scrapeMotionValuesFromProps:Yr,createRenderState:pc}),wc=Symbol.for("motionComponentSymbol");function Tc(t,n,i){const s=e.useRef(i);e.useInsertionEffect(()=>{s.current=i});const o=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e),n&&(e?n.mount(e):n.unmount());const i=s.current;if("function"==typeof i)if(e){const t=i(e);"function"==typeof t&&(o.current=t)}else o.current?(o.current(),o.current=null):i(e);else i&&(i.current=e)},[n])}const Sc=e.createContext({});function Pc(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function bc(t,n,i,s,o,r){const{visualElement:a}=e.useContext(rc),l=e.useContext(zl),c=e.useContext(v),u=e.useContext(Rl),h=u.reducedMotion,d=u.skipAnimations,p=e.useRef(null),m=e.useRef(!1);s=s||l.renderer,!p.current&&s&&(p.current=s(t,{visualState:n,parent:a,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h,skipAnimations:d,isSVG:r}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const f=p.current,g=e.useContext(Sc);!f||f.projection||!o||"html"!==f.type&&"svg"!==f.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ec(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&Pc(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}(p.current,i,o,g);const x=e.useRef(!1);e.useInsertionEffect(()=>{f&&x.current&&f.update(i,c)});const w=i[Ri],T=e.useRef(Boolean(w)&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return y(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),T.current&&f.animationState&&f.animationState.animateChanges())}),e.useEffect(()=>{f&&(!T.current&&f.animationState&&f.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),T.current=!1),f.enteringChildren=void 0)}),f}function Ec(t){if(t)return!1!==t.options.allowProjection?t.projection:Ec(t.parent)}function Ac(t,{forwardMotionProps:n=!1,type:i}={},s,o){s&&_l(s);const r=i?"svg"===i:sc(t),a=r?xc:vc;function l(i,s){let l;const c={...e.useContext(Rl),...i,layoutId:Mc(i)},{isStatic:u}=c,h=ac(i),m=a(i,u);if(!u&&g){e.useContext(zl).strict;const n=function(t){const e=Gl(),{drag:n,layout:i}=e;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(t)||i?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}(c);l=n.MeasureLayout,h.visualElement=bc(t,m,c,o,n.ProjectionNode,r)}return p(rc.Provider,{value:h,children:[l&&h.visualElement?d(l,{visualElement:h.visualElement,...c}):null,fc(t,i,Tc(m,h.visualElement,s),m,u,n,r)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(l);return c[wc]=t,c}function Mc({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}function Vc(t,e){if("undefined"==typeof Proxy)return Ac;const n=new Map,i=(n,i)=>Ac(n,i,t,e);return new Proxy((t,e)=>i(t,e),{get:(s,o)=>"create"===o?i:(n.has(o)||n.set(o,Ac(o,void 0,t,e)),n.get(o))})}let Cc=0;const kc={animation:{Feature:class extends er{constructor(t){super(t),t.animationState||(t.animationState=qr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fo(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 er{constructor(){super(...arguments),this.id=Cc++}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 Rc(t){return{point:{x:t.pageX,y:t.pageY}}}const Dc=t=>e=>Ms(e)&&t(e,Rc(e));function Lc(t,e,n,i){return Oa(t,e,Dc(n),i)}const Bc=({current:t})=>t?t.ownerDocument.defaultView:null,jc=(t,e)=>Math.abs(t-e);function Ic(t,e){const n=jc(t.x,e.x),i=jc(t.y,e.y);return Math.sqrt(n**2+i**2)}const Oc=new Set(["auto","scroll"]);class Fc{constructor(t,e,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=t=>{this.handleScroll(t.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Nc(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ic(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ct;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=Wc(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=Nc("pointercancel"===t.type?this.lastMoveEventInfo:Wc(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Ms(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=i||window;const a=Wc(Rc(t),this.transformPagePoint),{point:l}=a,{timestamp:c}=ct;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=e;u&&u(t,Nc(a,this.history)),this.removeListeners=R(Lc(this.contextWindow,"pointermove",this.handlePointerMove),Lc(this.contextWindow,"pointerup",this.handlePointerUp),Lc(this.contextWindow,"pointercancel",this.handlePointerUp)),r&&this.startScrollTracking(r)}startScrollTracking(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e);(Oc.has(t.overflowX)||Oc.has(t.overflowY))&&this.scrollPositions.set(e,{x:e.scrollLeft,y:e.scrollTop}),e=e.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const e=this.scrollPositions.get(t);if(!e)return;const n=t===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s=i.x-e.x,o=i.y-e.y;0===s&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=s,this.history[0].y-=o),this.scrollPositions.set(t,i),at.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function Wc(t,e){return e?{point:e(t.point)}:t}function Uc(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Nc({point:t},e){return{point:t,delta:Uc(t,Yc(e)),offset:Uc(t,$c(e)),velocity:Hc(e,.1)}}function $c(t){return t[0]}function Yc(t){return t[t.length-1]}function Hc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Yc(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>B(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&s.timestamp-i.timestamp>2*B(e)&&(i=t[1]);const o=j(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 zc(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 Xc(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 Kc=.35;function Gc(t,e,n){return{min:_c(t,e),max:_c(t,n)}}function _c(t,e){return"number"==typeof t?t:t[e]||0}const qc=new WeakMap;class Zc{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 Fc(t,{onSessionStart:t=>{e&&this.snapToCursor(Rc(t).point),this.stopAnimation()},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ps(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),Ea(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=ia(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&at.update(()=>s(t,e),!1,!0),Vi(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&&at.update(()=>o(t,e),!1,!0)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:t}=this.getProps();(t||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:n,contextWindow:Bc(this.visualElement),element:this.visualElement.current})}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.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Qc(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&&Pc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:zc(t.x,n,s),y:zc(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=Kc){return!1===t?t=0:!0===t&&(t=Kc),{x:Gc(t,"left","right"),y:Gc(t,"top","bottom")}}(e),i!==this.constraints&&!Pc(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ea(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||!Pc(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=Tr(i,s.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:Xc(t.x,e.x),y:Xc(t.y,e.y)}}(s.layout.layoutBox,o);if(n){const t=n(ir(r));this.hasMutatedConstraints=!!t,t&&(r=nr(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ea(r=>{if(!Qc(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const c=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:u,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 Vi(this.visualElement,t),n.start(mi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Ea(t=>this.getAxisMotionValue(t).stop())}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){Ea(e=>{const{drag:n}=this.getProps();if(!Qc(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(!Pc(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ea(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=ia(t),s=ia(e);return s>i?n=D(e.min,e.max-i,t.min):i>s&&(n=D(t.min,t.max-s,e.min)),S(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.constraints=!1,this.resolveConstraints(),Ea(e=>{if(!Qc(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Qt(s,o,i[e]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qc.set(this.visualElement,this);const t=this.visualElement.current,e=Lc(t,"pointerdown",e=>{const{drag:n,dragListener:i=!0}=this.getProps(),s=e.target,o=s!==t&&Rs(s);n&&i&&!o&&this.start(e)});let n;const i=()=>{const{dragConstraints:e}=this.getProps();Pc(e)&&e.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(t,e,n){const i=Zs(t,Jc(n)),s=Zs(e,Jc(n));return()=>{i(),s()}}(t,e.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),at.read(i);const r=Oa(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ea(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{r(),e(),o(),a&&a(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Kc,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Jc(t){let e=!0;return()=>{e?e=!1:t()}}function Qc(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const tu=t=>(e,n)=>{t&&at.update(()=>t(e,n),!1,!0)};let eu=!1;class nu 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),eu&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ya.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,{projection:o}=n;return o?(o.isPresent=s,t.layoutDependency!==e&&o.setOptions({...o.options,layoutDependency:e}),eu=!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(),xs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;eu=!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 iu(t){const[n,i]=Fl(),s=e.useContext(m);return d(nu,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(Sc),isPresent:n,safeToRemove:i})}const su={pan:{Feature:class extends er{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(t){this.session=new Fc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:tu(t),onStart:tu(e),onMove:tu(n),onEnd:(t,e)=>{delete this.session,i&&at.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Lc(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 er{constructor(t){super(t),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Zc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}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(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Sl,MeasureLayout:iu}};function ou(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,Rc(e)))}function ru(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,Rc(e)))}const au=new WeakMap,lu=new WeakMap,cu=t=>{const e=au.get(t.target);e&&e(t)},uu=t=>{t.forEach(cu)};function hu(t,e,n){const i=function({root:t,...e}){const n=t||document;lu.has(n)||lu.set(n,{});const i=lu.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(uu,{root:t,...e})),i[s]}(e);return au.set(t,n),i.observe(t),()=>{au.delete(t),i.unobserve(t)}}const du={some:0,all:1};const pu={inView:{Feature:class extends er{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:du[i]};return hu(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 er{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:e,propagate:n}=this.node.props;this.unmount=Os(t,(t,e)=>(ru(this.node,e,"Start"),(t,{success:e})=>ru(this.node,t,e?"End":"Cancel")),{useGlobalTarget:e,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends er{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(Oa(this.node.current,"focus",()=>this.onFocus()),Oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends er{mount(){const{current:t}=this.node;t&&(this.unmount=Es(t,(t,e)=>(ou(this.node,e,"Start"),t=>ou(this.node,t,"End"))))}unmount(){}}}},mu={layout:{ProjectionNode:Sl,MeasureLayout:iu}},fu=Vc({...kc,...pu,...su,...mu},oc);function gu({children:n,as:i="ul",axis:s="y",onReorder:o,values:r,...a},l){const c=f(()=>fu[i]),u=[],h=e.useRef(!1),p=e.useRef(null);t.invariant(Boolean(r),"Reorder.Group must be provided a values prop","reorder-values");const m={axis:s,groupRef:p,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[s]:u.push({value:t,layout:e[s]}),u.sort(xu)},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,c=Qt(l.min,l.max,.5);return 1===o&&a.layout.max+n>c||-1===o&&a.layout.min+n<c?T(t,s,s+o):t}(u,t,e,n);u!==i&&(h.current=!0,o(i.map(vu).filter(t=>-1!==r.indexOf(t))))}};e.useEffect(()=>{h.current=!1});const g={overflowAnchor:"none",...a.style};return d(c,{...a,style:g,ref:t=>{p.current=t,"function"==typeof l?l(t):l&&(l.current=t)},ignoreStrict:!0,children:d(nc.Provider,{value:m,children:n})})}const yu=e.forwardRef(gu);function vu(t){return t.value}function xu(t,e){return t.layout.min-e.layout.min}function wu(t){const n=f(()=>Ti(t)),{isStatic:i}=e.useContext(Rl);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Tu(t,e){const n=wu(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 Su(t,e,n,i){if("function"==typeof t)return function(t){xi.current=[],t();const e=Tu(xi.current,t);return xi.current=void 0,e}(t);if(void 0!==n&&!Array.isArray(n)&&"function"!=typeof e)return function(t,e,n,i){const s=f(()=>Object.keys(n)),o=f(()=>({}));for(const r of s)o[r]=Su(t,e,n[r],i);return o}(t,e,n,i);const s="function"==typeof e?e:ao(e,n,i),o=Array.isArray(t)?Pu(t,s):Pu([t],([t])=>s(t)),r=Array.isArray(t)?void 0:t.accelerate;return r&&!r.isTransformed&&"function"!=typeof e&&Array.isArray(n)&&!1!==i?.clamp&&(o.accelerate={...r,times:e,keyframes:n,isTransformed:!0,...i?.ease?{ease:i.ease}:{}}),o}function Pu(t,e){const n=f(()=>[]);return Tu(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}const bu=new Set(["auto","scroll"]),Eu=new WeakMap,Au=new WeakMap;let Mu=null;function Vu(t,e){const n=getComputedStyle(t),i="x"===e?n.overflowX:n.overflowY,s=t===document.body||t===document.documentElement;return bu.has(i)||s}function Cu(t,e){let n=t?.parentElement;for(;n;){if(Vu(n,e))return n;n=n.parentElement}return null}function ku(t,e,n,i){if(!t)return;Mu=t;const s=Cu(t,n);if(!s)return;const o=e-("x"===n?window.scrollX:window.scrollY),{amount:r,edge:a}=function(t,e,n){const i=e.getBoundingClientRect(),s=t-("x"===n?Math.max(0,i.left):Math.max(0,i.top)),o=("x"===n?Math.min(window.innerWidth,i.right):Math.min(window.innerHeight,i.bottom))-t;if(s<50){const t=1-s/50;return{amount:-25*t*t,edge:"start"}}if(o<50){const t=1-o/50;return{amount:25*t*t,edge:"end"}}return{amount:0,edge:null}}(o,s,n);if(null===a)return Au.delete(s),void Eu.delete(s);const l=Au.get(s),c=s===document.body||s===document.documentElement;if(l!==a){if(!("start"===a&&i<0||"end"===a&&i>0))return;Au.set(s,a);const t="x"===n?s.scrollWidth-(c?window.innerWidth:s.clientWidth):s.scrollHeight-(c?window.innerHeight:s.clientHeight);Eu.set(s,t)}if(r>0){const t=Eu.get(s);if(("x"===n?c?window.scrollX:s.scrollLeft:c?window.scrollY:s.scrollTop)>=t)return}"x"===n?c?window.scrollBy({left:r}):s.scrollLeft+=r:c?window.scrollBy({top:r}):s.scrollTop+=r}function Ru(t,e=0){return Ai(t)?t:wu(e)}function Du({children:n,style:i={},value:s,as:o="li",onDrag:r,onDragEnd:a,layout:l=!0,...c},u){const h=f(()=>fu[o]),p=e.useContext(nc),m={x:Ru(i.x),y:Ru(i.y)},g=Su([m.x,m.y],([t,e])=>t||e?1:"unset");t.invariant(Boolean(p),"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:y,registerItem:v,updateOrder:x,groupRef:w}=p;return d(h,{drag:y,...c,dragSnapToOrigin:!0,style:{...i,x:m.x,y:m.y,zIndex:g},layout:l,onDrag:(t,e)=>{const{velocity:n,point:i}=e,o=m[y].get();x(s,o,n[y]),ku(w.current,i[y],y,n[y]),r&&r(t,e)},onDragEnd:(t,e)=>{!function(){if(Mu){const t=Cu(Mu,"y");t&&(Au.delete(t),Eu.delete(t));const e=Cu(Mu,"x");e&&e!==t&&(Au.delete(e),Eu.delete(e)),Mu=null}}(),a&&a(t,e)},onLayoutMeasure:t=>{v(s,t)},ref:u,ignoreStrict:!0,children:n})}const Lu=e.forwardRef(Du);var Bu=Object.freeze({__proto__:null,Group:yu,Item:Lu});function ju(t){return"object"==typeof t&&!Array.isArray(t)}function Iu(t,e,n,i){return null==t?[]:"string"==typeof t&&ju(e)?os(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function Ou(t,e,n){return t*(e+1)}function Fu(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 Wu(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 Uu(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Nu(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function $u(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Yu(t,e){return e[t]||(e[t]=[]),e[t]}function Hu(t){return Array.isArray(t)?t:[t]}function zu(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Xu=t=>"number"==typeof t,Ku=t=>t.every(Xu);function Gu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ws(t)&&!oo(t)?new Hr(e):new Lr(e);n.mount(t),Oo.set(t,n)}function _u(t){const e=new Br({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Oo.set(t,e)}function qu(e,n,i,s){const o=[];if(function(t,e){return Ai(t)||"number"==typeof t||"string"==typeof t&&!ju(e)}(e,n))o.push(Ia(e,ju(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=Iu(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t<a;t++){const e=r[t],s=e instanceof Element?Gu:_u;Oo.has(e)||s(e);const l=Oo.get(e),c={...i};"delay"in c&&"function"==typeof c.delay&&(c.delay=c.delay(t,a)),o.push(...Bi(l,{...n,transition:c},{}))}}return o}function Zu(e,n,i){const s=[],o=function(e,{defaultTransition:n={},...i}={},s,o){const r=n.duration||.3,a=new Map,l=new Map,c={},u=new Map;let h=0,d=0,p=0;for(let i=0;i<e.length;i++){const a=e[i];if("string"==typeof a){u.set(a,d);continue}if(!Array.isArray(a)){u.set(a.name,Fu(d,a.at,h,u));continue}let[m,f,g={}]=a;void 0!==g.at&&(d=Fu(d,g.at,h,u));let y=0;const v=(e,i,s,a=0,l=0)=>{const c=Hu(e),{delay:u=0,times:h=$e(c),type:m=n.type||"keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...x}=i;let{ease:w=n.ease||"easeOut",duration:T}=i;const S="function"==typeof u?u(a,l):u,P=c.length,b=In(m)?m:o?.[m||"keyframes"];if(P<=2&&b){let t=100;if(2===P&&Ku(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...x};void 0!==T&&(e.duration=B(T));const i=ge(e,t,b);w=i.ease,T=i.duration}T??(T=r);const E=d+S;1===h.length&&0===h[0]&&(h[1]=1);const A=h.length-c.length;if(A>0&&Ne(h,A),1===c.length&&c.unshift(null),f){t.invariant(f<20,"Repeat count too high, must be less than 20","repeat-count-high"),T=Ou(T,f);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t<f;t++){c.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))}Uu(h,f)}const M=E+T;Wu(s,c,w,h,E,M),y=Math.max(S+T,y),p=Math.max(M,p)};if(Ai(m))v(f,g,Yu("default",$u(m,l)));else{const t=Iu(m,f,s,c),e=t.length;for(let n=0;n<e;n++){const i=$u(t[n],l);for(const t in f)v(f[t],zu(g,t),Yu(t,i),n,e)}}h=d,d+=y}return l.forEach((t,e)=>{for(const s in t){const o=t[s];o.sort(Nu);const r=[],l=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];r.push(n),l.push(D(0,p,e)),c.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),r.unshift(r[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),r.push(null)),a.has(e)||a.set(e,{keyframes:{},transition:{}});const u=a.get(e);u.keyframes[s]=r;const{type:h,...d}=n;u.transition[s]={...d,duration:p,ease:c,times:l,...i}}}),a}(e.map(t=>{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=Ti(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:Fe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...qu(n,t,e))}),s}function Ju(t={}){const{scope:e,reduceMotion:n}=t;return function(t,i,s){let o,r=[];if(a=t,Array.isArray(a)&&a.some(Array.isArray))r=Zu(t,void 0!==n?{reduceMotion:n,...i}:i,e);else{const{onComplete:a,...l}=s||{};"function"==typeof a&&(o=a),r=qu(t,i,void 0!==n?{reduceMotion:n,...l}:l,e)}var a;const l=new qn(r);return o&&l.finished.then(o),e&&(e.animations.push(l),l.finished.then(()=>{w(e.animations,l)})),l}}const Qu=Ju();const th=e=>function(n,i,s){return new qn(function(e,n,i,s){if(null==e)return[];const o=os(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={...di(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||""),c=r.get(l);c&&c.stop(),a.push({map:r,key:l,unresolvedKeyframes:i,options:{...o,element:e,name:t,allowFlatten:!s.type&&!s.ease}})}}for(let t=0;t<a.length;t++){const{unresolvedKeyframes:e,options:n}=a[t],{element:i,name:s,pseudoElement:o}=n;o||null!==e[0]||(e[0]=Fs(i,s)),Qe(e),ns(e,s),!o&&e.length<2&&e.unshift(Fs(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))},eh=th(),nh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ih(t,e,n,i){const s=n[e],{length:o,position:r}=nh[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 c=i-l;s.velocity=c>50?0:I(s.current-a,c)}const sh={start:0,center:.5,end:1};function oh(t,e,n=0){let i=0;if(t in sh&&(t=sh[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 rh=[0,0];function ah(t,e,n,i){let s=Array.isArray(t)?t:rh,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,sh[t]?t:"0"]),o=oh(s[0],n,i),r=oh(s[1],e),o-r}const lh={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ch={x:0,y:0};function uh(t,e,n){const{offset:i=lh.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(ps(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):ch,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),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=ah(i[t],c[r],l[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=Ue(e[o].offset,$e(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=S(0,1,e[o].interpolate(e[o].current))}function hh(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){ih(t,"x",e,n),ih(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&uh(t,n,i)},notify:()=>e(n)}}const dh=new WeakMap,ph=new WeakMap,mh=new WeakMap,fh=new WeakMap,gh=new WeakMap,yh=t=>t===document.scrollingElement?window:t;function vh(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return C;let s=mh.get(e);s||(s=new Set,mh.set(e,s));const o=hh(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!dh.has(e)){const t=()=>{for(const t of s)t.measure(ct.timestamp);at.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>at.read(t);dh.set(e,i);const o=yh(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&ph.set(e,Zs(e,i)),o.addEventListener("scroll",i,{passive:!0}),i()}if(n&&!gh.has(e)){const t=dh.get(e),n={width:e.scrollWidth,height:e.scrollHeight};fh.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=at.read(i,!0);gh.set(e,s)}const r=dh.get(e);return at.read(r,!1,!0),()=>{lt(r);const t=mh.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=dh.get(e);dh.delete(e),n&&(yh(e).removeEventListener("scroll",n),ph.get(e)?.(),window.removeEventListener("resize",n));const i=gh.get(e);i&&(lt(i),gh.delete(e)),fh.delete(e)}}function xh(t){return"undefined"!=typeof window&&!t&&kn()}const wh=new Map;function Th({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=wh.get(e)??new Map;wh.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");return r[a]||(r[a]=xh(n.target)?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=vh(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),r[a]}function Sh(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return C;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?vh(n=>{t(n[e.axis].progress,n)},e):Js(t,Th(e))}(t,s):function(t,e){const n=Th(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),Js(e=>{t.time=t.iterationDuration*e},n))})}(t,s)}const Ph={some:0,all:1};function bh(t,e,{root:n,margin:i,amount:s="some"}={}){const o=os(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:Ph[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}const Eh=Vc();function Ah(t){return e.useEffect(()=>()=>t(),[])}const Mh={renderer:oc,...kc,...pu},Vh={...Mh,...su,...mu},Ch={renderer:oc,...kc};function kh(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}const Rh=()=>({scrollX:Ti(0),scrollY:Ti(0),scrollXProgress:Ti(0),scrollYProgress:Ti(0)}),Dh=t=>!!t&&!t.current;function Lh(t,e,n){return{factory:i=>Sh(i,{...e,axis:t,container:n}),times:[0,1],keyframes:[0,1],ease:t=>t,duration:1}}function Bh({container:n,target:i,...s}={}){const o=f(Rh);if(!i&&xh()){const t=n?.current||void 0;o.scrollXProgress.accelerate=Lh("x",s,t),o.scrollYProgress.accelerate=Lh("y",s,t)}const r=e.useRef(null),a=e.useRef(!1),l=e.useCallback(()=>(r.current=Sh((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,Dh(n)||Dh(i)?void(a.current=!0):l()),[l]),e.useEffect(()=>a.current?(t.invariant(!Dh(n),"Container ref is defined but not hydrated","use-scroll-ref"),t.invariant(!Dh(i),"Target ref is defined but not hydrated","use-scroll-ref"),l()):void 0,[l]),o}function jh(t,n={}){const{isStatic:i}=e.useContext(Rl),s=()=>Ai(t)?t.get():t;if(i)return Su(s);const o=wu(s());return e.useInsertionEffect(()=>co(o,t,n),[o,JSON.stringify(n)]),o}function Ih(t){const n=e.useRef(0),{isStatic:i}=e.useContext(Rl);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 Oh extends wi{constructor(){super(...arguments),this.isEnabled=!1}add(t){(pn.has(t)||ss.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function Fh(){!Xo.current&&Go();const[t]=e.useState(zo.current);return t}function Wh(){const t=Fh(),{reducedMotion:n}=e.useContext(Rl);return"never"!==n&&("always"===n||t)}function Uh(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&Ei(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{Uh(t,e)})})}function Nh(){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(Ii(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)?Uh(t,e):"string"==typeof e?Uh(t,[e]):Ei(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 $h(){const t=f(Nh);return y(t.mount,[]),t}const Yh=$h;class Hh{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 zh=()=>new Hh;function Xh(t){return null!==t&&"object"==typeof t&&wc in t}function Kh(){return Gh}function Gh(t){Tl.current&&(Tl.current.isUpdating=!1,Tl.current.blockUpdate(),t&&t())}const _h=new Map,qh=new Map,Zh=(t,e)=>`${t}: ${pn.has(e)?"transform":e}`;function Jh(t,e,n){const i=Zh(t,e),s=_h.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 Qh,td;const ed=new Set;function nd(){ed.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),ed.clear()}const id=()=>({});class sd extends Qo{constructor(){super(...arguments),this.measureInstanceViewportBox=Io}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const od=yc({scrapeMotionValuesFromProps:id,createRenderState:id});let rd=0;const ad=t=>t>.001?1/t:1e5;let ld=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[p,g]=Fl(a),v=e.useMemo(()=>Ul(t),[t]),x=a&&!p?[]:v.map(Wl),w=e.useRef(!0),T=e.useRef(v),S=f(()=>new Map),P=e.useRef(new Set),[b,E]=e.useState(v),[A,M]=e.useState(v);y(()=>{w.current=!1,T.current=v;for(let t=0;t<A.length;t++){const e=Wl(A[t]);x.includes(e)?(S.delete(e),P.current.delete(e)):!0!==S.get(e)&&S.set(e,!1)}},[A,x.length,x.join("-")]);const V=[];if(v!==b){let t=[...v];for(let e=0;e<A.length;e++){const n=A[e],i=Wl(n);x.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),M(Ul(t)),E(v),null}const{forceRender:C}=e.useContext(m);return d(h,{children:A.map(t=>{const e=Wl(t),h=!(a&&!p)&&(v===A||x.includes(e));return d(Il,{isPresent:h,initial:!(w.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,root:u,onExitComplete:h?void 0:()=>{if(P.current.has(e))return;if(P.current.add(e),!S.has(e))return;S.set(e,!0);let t=!0;S.forEach(e=>{e||(t=!1)}),t&&(C?.(),M(T.current),a&&g?.(),s&&s())},anchorX:l,anchorY:c,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(Hl,{id:f(()=>"asl-"+rd++),children:e})),t.AsyncMotionValueAnimation=Kn,t.DOMKeyframesResolver=ts,t.DOMVisualElement=tr,t.DeprecatedLayoutGroupContext=Nl,t.DocumentProjectionNode=vl,t.DragControls=Hh,t.Feature=er,t.FlatTree=Wa,t.GroupAnimation=Gn,t.GroupAnimationWithThen=qn,t.HTMLProjectionNode=Sl,t.HTMLVisualElement=Lr,t.JSAnimation=Je,t.KeyframeResolver=En,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=bl,this.rejectReady=bl,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),at.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=El(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return ea(n,e),ea(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=El(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{at.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new Gn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=Vl(i,n,this.scope),{layout:s,layoutId:o}=Al(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=Ml(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),Oo.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.LayoutGroup=Hl,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!ql(n)),o=e.useRef(void 0);if(!ql(n)){const{renderer:t,...e}=n;o.current=t,_l(e)}return e.useEffect(()=>{ql(n)&&n().then(({renderer:t,...e})=>{_l(e),o.current=t,s(!0)})},[]),d(zl.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&tc(n);const s=e.useContext(Rl);(i={...s,...i}).transition=hi(i.transition,s.transition),i.isStatic=f(()=>i.isStatic);const o=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion,i.skipAnimations]);return d(Rl.Provider,{value:o,children:t})},t.MotionConfigContext=Rl,t.MotionContext=rc,t.MotionGlobalConfig=b,t.MotionValue=wi,t.NativeAnimation=Fn,t.NativeAnimationExtended=Nn,t.NativeAnimationWrapper=Zn,t.NodeStack=$a,t.ObjectVisualElement=Br,t.PopChild=jl,t.PresenceChild=Il,t.PresenceContext=v,t.Reorder=Bu,t.SVGVisualElement=Hr,t.SubscriptionManager=L,t.SwitchLayoutGroupContext=Sc,t.ViewTransitionBuilder=Do,t.VisualElement=Qo,t.WillChangeMotionValue=Oh,t.acceleratedValues=ss,t.activeAnimations=mt,t.addAttrValue=us,t.addDomEvent=Oa,t.addPointerEvent=Lc,t.addPointerInfo=Dc,t.addScaleCorrector=function(t){for(const e in t)kr[e]=t[e],gt(e)&&(kr[e].isCSSVariable=!0)},t.addStyleValue=gs,t.addUniqueItem=x,t.addValueToWillChange=Vi,t.alpha=St,t.analyseComplexValue=zt,t.animate=Qu,t.animateMini=eh,t.animateMotionValue=mi,t.animateSingleValue=Ia,t.animateTarget=Bi,t.animateValue=function(t){return new Je(t)},t.animateVariant=ji,t.animateView=function(t,e={}){return new Do(t,e)},t.animateVisualElement=Ii,t.animationControls=Nh,t.animationMapKey=Qn,t.animations=kc,t.anticipate=X,t.applyAxisDelta=dr,t.applyBoxDelta=pr,t.applyGeneratorOptions=On,t.applyPointDelta=hr,t.applyPxDefaults=ns,t.applyTreeDeltas=gr,t.aspectRatio=Pa,t.attachFollow=co,t.attachSpring=function(t,e,n){return co(t,e,{type:"spring",...n})},t.attrEffect=hs,t.axisDeltaEquals=ba,t.axisEquals=xa,t.axisEqualsRounded=Ta,t.backIn=H,t.backInOut=z,t.backOut=Y,t.boxEquals=wa,t.boxEqualsRounded=Sa,t.buildHTMLStyles=Er,t.buildProjectionTransform=Aa,t.buildSVGAttrs=Wr,t.buildSVGPath=Or,t.buildTransform=br,t.calcAxisDelta=oa,t.calcBoxDelta=ra,t.calcChildStagger=ei,t.calcGeneratorDuration=fe,t.calcLength=ia,t.calcRelativeAxis=aa,t.calcRelativeAxisPosition=ca,t.calcRelativeBox=la,t.calcRelativePosition=ua,t.camelCaseAttributes=Ur,t.camelToDash=Ci,t.cancelFrame=lt,t.cancelMicrotask=ws,t.cancelSync=kl,t.checkVariantsDidChange=Zr,t.circIn=K,t.circInOut=_,t.circOut=G,t.clamp=S,t.cleanDirtyNodes=Qa,t.collectMotionValues=xi,t.color=Ut,t.compareByDepth=Fa,t.complex=_t,t.containsCSSVariable=wt,t.convertBoundingBoxToBox=nr,t.convertBoxToBoundingBox=ir,t.convertOffsetToTimes=Ye,t.copyAxisDeltaInto=na,t.copyAxisInto=ta,t.copyBoxInto=ea,t.correctBorderRadius=Vr,t.correctBoxShadow=Cr,t.createAnimationState=qr,t.createAxis=jo,t.createAxisDelta=Lo,t.createBox=Io,t.createDelta=Bo,t.createGeneratorEasing=ge,t.createProjectionNode=_a,t.createRenderBatcher=rt,t.createScopedAnimate=Ju,t.cubicBezier=U,t.cubicBezierAsString=Dn,t.defaultEasing=He,t.defaultOffset=$e,t.defaultTransformValue=ln,t.defaultValueTypes=_i,t.degrees=Lt,t.delay=Ua,t.delayInSeconds=function(t,e){return Ua(t,B(e))},t.dimensionValueTypes=Fi,t.disableInstantTransitions=function(){b.instantAnimations=!1},t.distance=jc,t.distance2D=Ic,t.domAnimation=Mh,t.domMax=Vh,t.domMin=Ch,t.eachAxis=Ea,t.easeIn=q,t.easeInOut=J,t.easeOut=Z,t.easingDefinitionToFunction=it,t.fillOffset=Ne,t.fillWildcards=Qe,t.filterProps=ec,t.findDimensionValueType=Wi,t.findValueType=fo,t.flushKeyframeResolvers=bn,t.followValue=lo,t.frame=at,t.frameData=ct,t.frameSteps=ut,t.generateLinearEasing=pe,t.getAnimatableNone=Ji,t.getAnimationMap=ti,t.getComputedStyle=Fs,t.getDefaultTransition=li,t.getDefaultValueType=qi,t.getEasingForSegment=tt,t.getFeatureDefinitions=Jo,t.getFinalKeyframe=ui,t.getMixer=ae,t.getOptimisedAppearId=Di,t.getOriginIndex=ro,t.getValueAsType=as,t.getValueTransition=di,t.getVariableValue=si,t.getVariantContext=Xr,t.getViewAnimationLayerInfo=So,t.getViewAnimations=bo,t.globalProjectionState=Ya,t.has2DTranslate=lr,t.hasReducedMotionListener=Xo,t.hasScale=rr,t.hasTransform=ar,t.hasWarned=function(t){return O.has(t)},t.hex=Rt,t.hover=Es,t.hsla=Wt,t.hslaToRgba=Zt,t.inView=bh,t.inertia=We,t.initPrefersReducedMotion=Go,t.interpolate=Ue,t.invisibleValues=se,t.isAnimationControls=Fo,t.isBezierDefinition=et,t.isBrowser=g,t.isCSSVariableName=gt,t.isCSSVariableToken=vt,t.isControllingVariants=$o,t.isDeltaZero=va,t.isDragActive=Ss,t.isDragging=Ts,t.isEasingArray=Q,t.isElementKeyboardAccessible=Cs,t.isElementTextInput=Rs,t.isForcedMotionValue=Rr,t.isGenerator=In,t.isHTMLElement=ps,t.isKeyframesTarget=Si,t.isMotionComponent=Xh,t.isMotionValue=Ai,t.isNear=sa,t.isNodeOrChild=As,t.isNumericalString=E,t.isObject=A,t.isPrimaryPointer=Ms,t.isSVGElement=Ws,t.isSVGSVGElement=oo,t.isSVGTag=Nr,t.isTransitionDefined=pi,t.isValidMotionProp=Jl,t.isVariantLabel=Wo,t.isVariantNode=Yo,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.isWillChangeMotionValue=Mi,t.isZeroValueString=M,t.keyframes=ze,t.m=Eh,t.makeAnimationInstant=Yn,t.makeUseVisualState=yc,t.mapEasingToNativeEasing=Bn,t.mapValue=function(t,e,n,i){const s=ao(e,n,i);return po(()=>s(t.get()))},t.maxGeneratorDuration=me,t.measurePageBox=Tr,t.measureViewportBox=wr,t.memo=V,t.microtask=xs,t.millisecondsToSeconds=j,t.mirrorEasing=N,t.mix=he,t.mixArray=le,t.mixColor=ie,t.mixComplex=ue,t.mixImmediate=Jt,t.mixLinearColor=te,t.mixNumber=Qt,t.mixObject=ce,t.mixValues=Ra,t.mixVisibility=oe,t.motion=fu,t.motionValue=Ti,t.moveItem=T,t.nodeGroup=wl,t.noop=C,t.number=Tt,t.numberValueTypes=Gi,t.observeTimeline=Js,t.optimizedAppearDataAttribute=Ri,t.optimizedAppearDataId=ki,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:os(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=ii,t.parseValueFromTransform=cn,t.percent=Bt,t.pipe=R,t.pixelsToPercent=Mr,t.positionalKeys=vi,t.prefersReducedMotion=zo,t.press=Os,t.progress=D,t.progressPercentage=Ft,t.propEffect=ds,t.propagateDirtyNodes=Ja,t.px=jt,t.readTransformValue=un,t.recordStats=function(){if(ot.value)throw io(),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(Qs,!0),so},t.removeAxisDelta=da,t.removeAxisTransforms=pa,t.removeBoxTransforms=ga,t.removeItem=w,t.removePointDelta=ha,t.renderHTML=Ar,t.renderSVG=$r,t.resize=Zs,t.resolveElements=os,t.resolveMotionValue=Na,t.resolveTransition=hi,t.resolveVariant=yi,t.resolveVariantFromProps=gi,t.reverseEasing=$,t.rgbUnit=Ct,t.rgba=kt,t.rootProjectionNode=Tl,t.scale=Pt,t.scaleCorrectors=kr,t.scalePoint=ur,t.scrapeHTMLMotionValuesFromProps=Dr,t.scrapeSVGMotionValuesFromProps=Yr,t.scroll=Sh,t.scrollInfo=vh,t.secondsToMilliseconds=B,t.setDragLock=Ps,t.setFeatureDefinitions=Zo,t.setStyle=Mn,t.setTarget=Ei,t.spring=Fe,t.springValue=function(t,e){return lo(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:ro(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[ki];if(!o)return;window.MotionHandoffAnimation=Jh;const r=Zh(o,e);td||(td=jn(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),_h.set(r,{animation:td,startTime:null}),window.MotionHandoffAnimation=Jh,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return qh.has(t);const n=Zh(t,e);return Boolean(_h.get(n))},window.MotionHandoffMarkAsComplete=t=>{qh.has(t)&&qh.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===qh.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Zh(t,e),o=_h.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(ed.add(o),n.render(nd)):(_h.delete(s),_h.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{const i=Di(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=()=>{td.cancel();const o=jn(t,e,n,i);void 0===Qh&&(Qh=performance.now()),o.startTime=Qh,_h.set(r,{animation:o,startTime:Qh}),s&&s(o)};qh.set(o,!1),td.ready?td.ready.then(a).catch(C):a()},t.startWaapiAnimation=jn,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 S(0,1,s/t)}},t.styleEffect=ys,t.supportedWaapiEasing=Ln,t.supportsBrowserAnimation=Xn,t.supportsFlags=Vn,t.supportsLinearEasing=Rn,t.supportsPartialKeyframes=is,t.supportsScrollTimeline=kn,t.svgEffect=vs,t.sync=Cl,t.testValueType=Oi,t.time=pt,t.transform=ao,t.transformAxis=vr,t.transformBox=xr,t.transformBoxPoints=sr,t.transformPropOrder=dn,t.transformProps=pn,t.transformValue=po,t.transformValueTypes=Ki,t.transformViewBoxPoint=function(t){return e=>{const n=t.current;if(!n)return e;const i=n.viewBox?.baseVal;if(!i||0===i.width&&0===i.height)return e;const s=n.getBoundingClientRect();if(0===s.width||0===s.height)return e;const o=i.width/s.width,r=i.height/s.height,a=s.left+window.scrollX,l=s.top+window.scrollY;return{x:(e.x-a)*o+a,y:(e.y-l)*r+l}}},t.translateAxis=yr,t.unwrapMotionComponent=function(t){if(Xh(t))return t[wc]},t.updateMotionValuesFromProps=Ho,t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),n=Wh()??void 0,i=e.useMemo(()=>Ju({scope:t,reduceMotion:n}),[t,n]);return Ah(()=>{t.animations.forEach(t=>t.stop()),t.animations.length=0}),[t,i]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>th(t));return Ah(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Yh,t.useAnimationControls=$h,t.useAnimationFrame=Ih,t.useComposedRefs=Ll,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=od({},!1),o=f(()=>new sd({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,f(()=>t=>Ii(o,t))]},t.useDeprecatedInvertedScale=function(n){let i=wu(1),s=wu(1);const{visualElement:o}=e.useContext(rc);return t.invariant(!(!n&&!o),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),t.warning(ld,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),ld=!0,n?(i=n.scaleX||i,s=n.scaleY||s):o&&(i=o.getValue("scaleX",1),s=o.getValue("scaleY",1)),{scaleX:Su(i,ad),scaleY:Su(s,ad)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Oa(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return f(zh)},t.useElementScroll=function(t){return Bh({container:t})},t.useFollowValue=jh,t.useForceUpdate=$l,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 bh(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=Kh,t.useInstantTransition=function(){const[t,n]=$l(),i=Kh(),s=e.useRef(-1);return e.useEffect(()=>{at.postRender(()=>at.postRender(()=>{n===s.current&&(b.instantAnimations=!1)}))},[n]),e=>{i(()=>{b.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 Tu(e.filter(Ai),function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Ai(n)?n.get():n)}return i})},t.useMotionValue=wu,t.useMotionValueEvent=kh,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=Fl,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=Fh,t.useReducedMotionConfig=Wh,t.useResetProjection=function(){return e.useCallback(()=>{const t=Tl.current;t&&t.resetTree()},[])},t.useScroll=Bh,t.useSpring=function(t,e={}){return jh(t,{type:"spring",...e})},t.useTime=function(){const t=wu(0);return Ih(e=>t.set(e)),t},t.useTransform=Su,t.useUnmountEffect=Ah,t.useVelocity=function(t){const e=wu(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&at.update(n)};return kh(t,"change",()=>{at.update(n,!1,!0)}),e},t.useViewportScroll=function(){return Bh()},t.useWillChange=function(){return f(()=>new Oh("auto"))},t.variantPriorityOrder=Uo,t.variantProps=No,t.velocityPerSecond=I,t.vh=It,t.visualElementStore=Oo,t.vw=Ot,t.warnOnce=function(t,e,n){t||O.has(e)||(console.warn(P(e,n)),O.add(e))},t.wrap=F});
|