UNPKG

framer-motion

Version:

A simple and powerful React animation library

1 lines • 90.9 kB
(()=>{"use strict";var t={9340:(t,e,n)=>{n.d(e,{K:()=>o,k:()=>i});var o=function(){},i=function(){}},2819:(t,e,n)=>{n.d(e,{C:()=>o});const o=t=>Array.isArray(t)},3880:(t,e,n)=>{n.d(e,{ev:()=>bt,b8:()=>Pt});function o(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}Object.create;Object.create;var i=n(9340),r=n(1698);const s=.001;function a({duration:t=800,bounce:e=.25,velocity:n=0,mass:o=1}){let a,u;(0,i.K)(t<=1e4,"Spring duration must be 10 seconds or less");let c=1-e;c=(0,r.u)(.05,1,c),t=(0,r.u)(.01,10,t/1e3),c<1?(a=e=>{const o=e*c,i=o*t,r=o-n,a=l(e,c),u=Math.exp(-i);return s-r/a*u},u=e=>{const o=e*c*t,i=o*n+n,r=Math.pow(c,2)*Math.pow(e,2)*t,u=Math.exp(-o),d=l(Math.pow(e,2),c);return(-a(e)+s>0?-1:1)*((i-r)*u)/d}):(a=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,u=e=>Math.exp(-e*t)*(t*t*(n-e)));const d=function(t,e,n){let o=n;for(let n=1;n<12;n++)o-=t(o)/e(o);return o}(a,u,5/t);if(t*=1e3,isNaN(d))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(d,2)*o;return{stiffness:e,damping:2*c*Math.sqrt(o*e),duration:t}}}function l(t,e){return t*Math.sqrt(1-e*e)}const u=["duration","bounce"],c=["stiffness","damping","mass"];function d(t,e){return e.some((e=>void 0!==t[e]))}function h(t){var{from:e=0,to:n=1,restSpeed:i=2,restDelta:r}=t,s=o(t,["from","to","restSpeed","restDelta"]);const h={done:!1,value:e};let{stiffness:m,damping:f,mass:v,velocity:g,duration:y,isResolvedFromDuration:x}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!d(t,c)&&d(t,u)){const n=a(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(s),b=p,P=p;function w(){const t=g?-g/1e3:0,o=n-e,i=f/(2*Math.sqrt(m*v)),s=Math.sqrt(m/v)/1e3;if(void 0===r&&(r=Math.min(Math.abs(n-e)/100,.4)),i<1){const e=l(s,i);b=r=>{const a=Math.exp(-i*s*r);return n-a*((t+i*s*o)/e*Math.sin(e*r)+o*Math.cos(e*r))},P=n=>{const r=Math.exp(-i*s*n);return i*s*r*(Math.sin(e*n)*(t+i*s*o)/e+o*Math.cos(e*n))-r*(Math.cos(e*n)*(t+i*s*o)-e*o*Math.sin(e*n))}}else if(1===i)b=e=>n-Math.exp(-s*e)*(o+(t+s*o)*e);else{const e=s*Math.sqrt(i*i-1);b=r=>{const a=Math.exp(-i*s*r),l=Math.min(e*r,300);return n-a*((t+i*s*o)*Math.sinh(l)+e*o*Math.cosh(l))/e}}}return w(),{next:t=>{const e=b(t);if(x)h.done=t>=y;else{const o=1e3*P(t),s=Math.abs(o)<=i,a=Math.abs(n-e)<=r;h.done=s&&a}return h.value=h.done?n:e,h},flipTarget:()=>{g=-g,[e,n]=[n,e],w()}}}h.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const p=t=>0;var m=n(1790),f=n(8481),v=n(9012),g=n(3203),y=n(7493);function x(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 b({hue:t,saturation:e,lightness:n,alpha:o}){t/=360,n/=100;let i=0,r=0,s=0;if(e/=100){const o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;i=x(a,o,t+1/3),r=x(a,o,t),s=x(a,o,t-1/3)}else i=r=s=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*s),alpha:o}}const P=(t,e,n)=>{const o=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-o)+o))},w=[v.$,g.m,y.J],A=t=>w.find((e=>e.test(t))),T=t=>`'${t}' is not an animatable color. Use the equivalent color code instead.`,E=(t,e)=>{let n=A(t),o=A(e);(0,i.k)(!!n,T(t)),(0,i.k)(!!o,T(e));let r=n.parse(t),s=o.parse(e);n===y.J&&(r=b(r),n=g.m),o===y.J&&(s=b(s),o=g.m);const a=Object.assign({},r);return t=>{for(const e in a)"alpha"!==e&&(a[e]=P(r[e],s[e],t));return a.alpha=(0,f.C)(r.alpha,s.alpha,t),n.transform(a)}};var S=n(7576),V=n(6002),C=n(5091),R=n(934);function M(t,e){return(0,C.e)(t)?n=>(0,f.C)(t,e,n):S.$.test(t)?E(t,e):O(t,e)}const L=(t,e)=>{const n=[...t],o=n.length,i=t.map(((t,n)=>M(t,e[n])));return t=>{for(let e=0;e<o;e++)n[e]=i[e](t);return n}},k=(t,e)=>{const n=Object.assign(Object.assign({},t),e),o={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(o[i]=M(t[i],e[i]));return t=>{for(const e in o)n[e]=o[e](t);return n}};function D(t){const e=V.P.parse(t),n=e.length;let o=0,i=0,r=0;for(let t=0;t<n;t++)o||"number"==typeof e[t]?o++:void 0!==e[t].hue?r++:i++;return{parsed:e,numNumbers:o,numRGB:i,numHSL:r}}const O=(t,e)=>{const n=V.P.createTransformer(e),o=D(t),r=D(e);return o.numHSL===r.numHSL&&o.numRGB===r.numRGB&&o.numNumbers>=r.numNumbers?(0,R.z)(L(o.parsed,r.parsed),n):((0,i.K)(!0,`Complex values '${t}' and '${e}' 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.`),n=>`${n>0?e:t}`)},j=(t,e)=>n=>(0,f.C)(t,e,n);function F(t,e,n){const o=[],i=n||("number"==typeof(r=t[0])?j:"string"==typeof r?S.$.test(r)?E:O:Array.isArray(r)?L:"object"==typeof r?k:void 0);var r;const s=t.length-1;for(let n=0;n<s;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;r=(0,R.z)(t,r)}o.push(r)}return o}function B(t,e,{clamp:n=!0,ease:o,mixer:s}={}){const a=t.length;(0,i.k)(a===e.length,"Both input and output ranges must be the same length"),(0,i.k)(!o||!Array.isArray(o)||o.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),t[0]>t[a-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const l=F(e,o,s),u=2===a?function([t,e],[n]){return o=>n((0,m.Y)(t,e,o))}(t,l):function(t,e){const n=t.length,o=n-1;return i=>{let r=0,s=!1;if(i<=t[0]?s=!0:i>=t[o]&&(r=o-1,s=!0),!s){let e=1;for(;e<n&&!(t[e]>i||e===o);e++);r=e-1}const a=(0,m.Y)(t[r],t[r+1],i);return e[r](a)}}(t,l);return n?e=>u((0,r.u)(t[0],t[a-1],e)):u}var I=n(6924);function U(t,e){return t.map((()=>e||I.mZ)).splice(0,t.length-1)}function $({from:t=0,to:e=1,ease:n,offset:o,duration:i=300}){const r={done:!1,value:t},s=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map((t=>t*e))}(o&&o.length===s.length?o:function(t){const e=t.length;return t.map(((t,n)=>0!==n?n/(e-1):0))}(s),i);function l(){return B(a,s,{ease:Array.isArray(n)?n:U(s,n)})}let u=l();return{next:t=>(r.value=u(t),r.done=t>=i,r),flipTarget:()=>{s.reverse(),u=l()}}}const N={keyframes:$,spring:h,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:o=350,restDelta:i=.5,modifyTarget:r}){const s={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===r?l:r(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/o);return s.done=!(e>i||e<-i),s.value=s.done?u:u+e,s},flipTarget:()=>{}}}};var z=n(6162);function Y(t,e,n=0){return t-e-n}const W=t=>{const e=({delta:e})=>t(e);return{start:()=>z.ZP.update(e,!0),stop:()=>z.qY.update(e)}};function H(t){var e,n,{from:i,autoplay:r=!0,driver:s=W,elapsed:a=0,repeat:l=0,repeatType:u="loop",repeatDelay:c=0,onPlay:d,onStop:p,onComplete:m,onRepeat:f,onUpdate:v}=t,g=o(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,x,b,{to:P}=g,w=0,A=g.duration,T=!1,E=!0;const S=function(t){if(Array.isArray(t.to))return $;if(N[t.type])return N[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?$:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?h:$}(g);(null===(n=(e=S).needsInterpolation)||void 0===n?void 0:n.call(e,i,P))&&(b=B([0,100],[i,P],{clamp:!1}),i=0,P=100);const V=S(Object.assign(Object.assign({},g),{from:i,to:P}));function C(){w++,"reverse"===u?(E=w%2==0,a=function(t,e,n=0,o=!0){return o?Y(e+-t,e,n):e-(t-e)+n}(a,A,c,E)):(a=Y(a,A,c),"mirror"===u&&V.flipTarget()),T=!1,f&&f()}function R(t){if(E||(t=-t),a+=t,!T){const t=V.next(Math.max(0,a));x=t.value,b&&(x=b(x)),T=E?t.done:a<=0}null==v||v(x),T&&(0===w&&(null!=A||(A=a)),w<l?function(t,e,n,o){return o?t>=e+n:t<=-n}(a,A,c,E)&&C():(y.stop(),m&&m()))}return r&&(null==d||d(),y=s(R),y.start()),{stop:()=>{null==p||p(),y.stop()}}}var q=n(4060);var X=n(1818);const Z=(t,e)=>1-3*e+3*t,G=(t,e)=>3*e-6*t,K=t=>3*t,J=(t,e,n)=>((Z(e,n)*t+G(e,n))*t+K(e))*t,Q=(t,e,n)=>3*Z(e,n)*t*t+2*G(e,n)*t+K(e);const _=.1;function tt(t,e,n,o){if(t===e&&n===o)return I.GE;const i=new Float32Array(11);for(let e=0;e<11;++e)i[e]=J(e*_,t,n);function r(e){let o=0,r=1;for(;10!==r&&i[r]<=e;++r)o+=_;--r;const s=o+(e-i[r])/(i[r+1]-i[r])*_,a=Q(s,t,n);return a>=.001?function(t,e,n,o){for(let i=0;i<8;++i){const i=Q(e,n,o);if(0===i)return e;e-=(J(e,n,o)-t)/i}return e}(e,s,t,n):0===a?s:function(t,e,n,o,i){let r,s,a=0;do{s=e+(n-e)/2,r=J(s,o,i)-t,r>0?n=s:e=s}while(Math.abs(r)>1e-7&&++a<10);return s}(e,o,o+_,t,n)}return t=>0===t||1===t?t:J(r(t),e,o)}const et={linear:I.GE,easeIn:I.YQ,easeInOut:I.mZ,easeOut:I.Vv,circIn:I.Z7,circInOut:I.X7,circOut:I.Bn,backIn:I.G2,backInOut:I.XL,backOut:I.CG,anticipate:I.LU,bounceIn:I.h9,bounceInOut:I.yD,bounceOut:I.gJ},nt=t=>{if(Array.isArray(t)){(0,i.k)(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,o,r]=t;return tt(e,n,o,r)}return"string"==typeof t?((0,i.k)(void 0!==et[t],`Invalid easing type '${t}'`),et[t]):t},ot=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!V.P.test(e)||e.startsWith("url(")));var it=n(2819);const rt=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),st=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),at=()=>({type:"keyframes",ease:"linear",duration:.3}),lt=t=>({type:"keyframes",duration:.8,values:t}),ut={x:rt,y:rt,z:rt,rotate:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scaleX:st,scaleY:st,scale:st,opacity:at,backgroundColor:at,color:at,default:st},ct=(t,e)=>{let n;return n=(0,it.C)(e)?lt:ut[t]||ut.default,{to:e,...n(e)}};var dt=n(6914);const ht=!1;var pt=n(7048);let mt=!1;function ft({ease:t,times:e,yoyo:n,flip:o,loop:r,...s}){const a={...s};return e&&(a.offset=e),s.duration&&(a.duration=(0,X.w)(s.duration)),s.repeatDelay&&(a.repeatDelay=(0,X.w)(s.repeatDelay)),t&&(a.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(nt):nt(t)),"tween"===s.type&&(a.type="keyframes"),(n||r||o)&&((0,i.K)(!mt,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),mt=!0,n?a.repeatType="reverse":r?a.repeatType="loop":o&&(a.repeatType="mirror"),a.repeat=r||n||o||s.repeat),"spring"!==s.type&&(a.type="keyframes"),a}function vt(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(t.duration=.8),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function({when:t,delay:e,delayChildren:n,staggerChildren:o,staggerDirection:i,repeat:r,repeatType:s,repeatDelay:a,from:l,...u}){return!!Object.keys(u).length}(t)||(t={...t,...ct(n,e.to)}),{...e,...ft(t)}}function gt(t,e,n,o,r){const s=bt(o,t)||{};let a=void 0!==s.from?s.from:e.get();const l=ot(t,n);"none"===a&&l&&"string"==typeof n?a=(0,dt.T)(t,n):yt(a)&&"string"==typeof n?a=xt(n):!Array.isArray(n)&&yt(n)&&"string"==typeof a&&(n=xt(a));const u=ot(t,a);return(0,i.K)(u===l,`You are trying to animate ${t} from "${a}" to "${n}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${n} via the \`style\` property.`),u&&l&&!1!==s.type?function(){const o={from:a,to:n,velocity:e.getVelocity(),onComplete:r,onUpdate:t=>e.set(t)};return"inertia"===s.type||"decay"===s.type?function({from:t=0,velocity:e=0,min:n,max:o,power:i=.8,timeConstant:r=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:h,onStop:p}){let m;function f(t){return void 0!==n&&t<n||void 0!==o&&t>o}function v(t){return void 0===n?o:void 0===o||Math.abs(n-t)<Math.abs(o-t)?n:o}function g(t){null==m||m.stop(),m=H(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:h,onStop:p}))}function y(t){g(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:l},t))}if(f(t))y({from:t,velocity:e,to:v(t)});else{let o=i*e+t;void 0!==u&&(o=u(o));const s=v(o),a=s===n?-1:1;let c,d;const h=t=>{c=d,d=t,e=(0,q.R)(t-c,(0,z.$B)().delta),(1===a&&t>s||-1===a&&t<s)&&y({from:t,to:s,velocity:e})};g({type:"decay",from:t,velocity:e,timeConstant:r,power:i,restDelta:l,modifyTarget:u,onUpdate:f(o)?h:void 0})}return{stop:()=>null==m?void 0:m.stop()}}({...o,...s}):H({...vt(s,o,t),onUpdate:t=>{o.onUpdate(t),s.onUpdate&&s.onUpdate(t)},onComplete:()=>{o.onComplete(),s.onComplete&&s.onComplete()}})}:function(){const t=(0,pt.Y)(n);return e.set(t),r(),s.onUpdate&&s.onUpdate(t),s.onComplete&&s.onComplete(),{stop:()=>{}}}}function yt(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function xt(t){return"number"==typeof t?0:(0,dt.T)("",t)}function bt(t,e){return t[e]||t.default||t}function Pt(t,e,n,o={}){return ht&&(o={type:!1}),e.start((i=>{let r,s;const a=gt(t,e,n,o,i),l=function(t,e){var n,o;return null!==(o=null!==(n=(bt(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==o?o:0}(o,t),u=()=>s=a();return l?r=window.setTimeout(u,(0,X.w)(l)):u(),()=>{clearTimeout(r),s&&s.stop()}}))}},1930:(t,e,n)=>{n.d(e,{oO:()=>r});var o=n(8370),i=n(7866);function r(){const t=(0,o.useContext)(i.O);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,s=(0,o.useId)();(0,o.useEffect)((()=>r(s)),[]);return!e&&n?[!1,()=>n&&n(s)]:[!0]}},7866:(t,e,n)=>{n.d(e,{O:()=>i});var o=n(8370);const i=(0,o.createContext)(null)},409:(t,e,n)=>{n.d(e,{Qk:()=>a,qT:()=>l});var o=n(3541);const i={pageX:0,pageY:0};function r(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||i;return{x:n[e+"X"],y:n[e+"Y"]}}function s(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function a(t,e="page"){return{point:(0,o.z)(t)?r(t,e):s(t,e)}}const l=(t,e=!1)=>{const n=e=>t(e,a(e));return e?(o=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&o(t)}):n;var o}},1876:(t,e,n)=>{n.d(e,{E:()=>i,p:()=>r});var o=n(8370);function i(t,e,n,o={passive:!0}){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function r(t,e,n,r){(0,o.useEffect)((()=>{const o=t.current;if(n&&o)return i(o,e,n,r)}),[t,e,n,r])}},1395:(t,e,n)=>{n.d(e,{a:()=>u,m:()=>c});var o=n(1876),i=n(409),r=n(3093);const s={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},a={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function l(t){return r.j&&null===window.onpointerdown?t:r.j&&null===window.ontouchstart?a[t]:r.j&&null===window.onmousedown?s[t]:t}function u(t,e,n,r){return(0,o.E)(t,l(e),(0,i.qT)(n,"pointerdown"===e),r)}function c(t,e,n,r){return(0,o.p)(t,l(e),n&&(0,i.qT)(n,"pointerdown"===e),r)}},5856:(t,e,n)=>{function o(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}n.d(e,{fJ:()=>s,gD:()=>a});const i=o("dragHorizontal"),r=o("dragVertical");function s(t){let e=!1;if("y"===t)e=r();else if("x"===t)e=i();else{const t=i(),n=r();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function a(){const t=s(!0);return!t||(t(),!1)}},3541:(t,e,n)=>{function o(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function i(t){return!!t.touches}n.d(e,{N:()=>o,z:()=>i})},6295:(t,e,n)=>{n.d(e,{x:()=>o});const o=t=>e=>(t(e),null)},483:(t,e,n)=>{function o({top:t,left:e,right:n,bottom:o}){return{x:{min:e,max:n},y:{min:t,max:o}}}function i({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function r(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}n.d(e,{d7:()=>r,i8:()=>o,z2:()=>i})},1360:(t,e,n)=>{n.d(e,{D2:()=>m,YY:()=>u,am:()=>c,o2:()=>l,q2:()=>r});var o=n(8481),i=n(4918);function r(t,e,n){return n+e*(t-n)}function s(t,e,n,o,i){return void 0!==i&&(t=r(t,i,o)),r(t,n,o)+e}function a(t,e=0,n=1,o,i){t.min=s(t.min,e,n,o,i),t.max=s(t.max,e,n,o,i)}function l(t,{x:e,y:n}){a(t.x,e.translate,e.scale,e.originPoint),a(t.y,n.translate,n.scale,n.originPoint)}function u(t,e,n,o=!1){var r,s;const a=n.length;if(!a)return;let u,c;e.x=e.y=1;for(let d=0;d<a;d++)u=n[d],c=u.projectionDelta,"contents"!==(null===(s=null===(r=u.instance)||void 0===r?void 0:r.style)||void 0===s?void 0:s.display)&&(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&m(t,{x:-u.scroll.x,y:-u.scroll.y}),c&&(e.x*=c.x.scale,e.y*=c.y.scale,l(t,c)),o&&(0,i.u)(u.latestValues)&&m(t,u.latestValues))}function c(t,e){t.min=t.min+e,t.max=t.max+e}function d(t,e,[n,i,r]){const s=void 0!==e[r]?e[r]:.5,l=(0,o.C)(t.min,t.max,s);a(t,e[n],e[i],l,e.scale)}const h=["x","scaleX","originX"],p=["y","scaleY","originY"];function m(t,e){d(t.x,e,h),d(t.y,e,p)}},798:(t,e,n)=>{n.d(e,{B:()=>i,P:()=>o});const o={};function i(t){Object.assign(o,t)}},4918:(t,e,n)=>{function o(t){return void 0===t||1===t}function i({scale:t,scaleX:e,scaleY:n}){return!o(t)||!o(e)||!o(n)}function r(t){return i(t)||s(t.x)||s(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function s(t){return t&&"0%"!==t}n.d(e,{L:()=>i,u:()=>r})},8834:(t,e,n)=>{n.d(e,{J:()=>r,z:()=>s});var o=n(483),i=n(1360);function r(t,e){return(0,o.i8)((0,o.d7)(t.getBoundingClientRect(),e))}function s(t,e,n){const o=r(t,n),{scroll:s}=e;return s&&((0,i.am)(o.x,s.x),(0,i.am)(o.y,s.y)),o}},4515:(t,e,n)=>{n.d(e,{H:()=>ue});var o=n(8370);function i(t){return"object"==typeof t&&"function"==typeof t.start}var r=n(1930),s=n(7866),a=n(2819);function l(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}var u=n(3880),c=n(6002);const d=t=>/^0[^.\s]+$/.test(t);var h=n(7048),p=n(1421),m=n(6914),f=n(7576),v=n(1513),g=n(155);const y=t=>e=>e.test(t),x=[v.Rx,g.px,g.aQ,g.RW,g.vw,g.vh,{test:t=>"auto"===t,parse:t=>t}],b=t=>x.find(y(t)),P=[...x,f.$,c.P],w=t=>P.find(y(t));function A(t,e,n){const o=t.getProps();return function(t,e,n,o={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,i)),e}(o,e,void 0!==n?n:o.custom,function(t){const e={};return t.forEachValue(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.forEachValue(((t,n)=>e[n]=t.getVelocity())),e}(t))}function T(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,(0,p.B)(n))}function E(t,e){const n=A(t,e);let{transitionEnd:o={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...o};for(const e in r){T(t,e,(0,h.Y)(r[e]))}}function S(t,e){if(!e)return;return(e[t]||e.default||e).from}const V=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],C=new Set(V);var R=n(7846);function M(t){return Boolean((0,R.i)(t)&&t.add)}function L(t,e,n={}){var o;const i=A(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>k(t,i,n):()=>Promise.resolve(),a=(null===(o=t.variantChildren)||void 0===o?void 0:o.size)?(o=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=r;return function(t,e,n=0,o=0,i=1,r){const s=[],a=(t.variantChildren.size-1)*o,l=1===i?(t=0)=>t*o:(t=0)=>a-t*o;return Array.from(t.variantChildren).sort(D).forEach(((t,o)=>{s.push(L(t,e,{...r,delay:n+l(o)}).then((()=>t.notifyAnimationComplete(e))))})),Promise.all(s)}(t,e,i+o,s,a,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then(e)}return Promise.all([s(),a(n.delay)])}function k(t,e,{delay:n=0,transitionOverride:o,type:i}={}){var r;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");o&&(s=o);const d=[],h=i&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[i]);for(const e in l){const o=t.getValue(e),i=l[e];if(!o||void 0===i||h&&O(h,e))continue;let r={delay:n,...s};t.shouldReduceMotion&&C.has(e)&&(r={...r,type:!1,delay:0});let a=(0,u.b8)(e,o,i,r);M(c)&&(c.add(e),a=a.then((()=>c.remove(e)))),d.push(a)}return Promise.all(d).then((()=>{a&&E(t,a)}))}function D(t,e){return t.sortNodePosition(e)}function O({protectedKeys:t,needsAnimating:e},n){const o=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,o}function j(t){return"string"==typeof t||Array.isArray(t)}var F=n(7921);const B=[F.r.Animate,F.r.InView,F.r.Focus,F.r.Hover,F.r.Tap,F.r.Drag,F.r.Exit],I=[...B].reverse(),U=B.length;function $(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let o;if(t.notifyAnimationStart(e),Array.isArray(e)){const i=e.map((e=>L(t,e,n)));o=Promise.all(i)}else if("string"==typeof e)o=L(t,e,n);else{const i="function"==typeof e?A(t,e,n.custom):e;o=k(t,i,n)}return o.then((()=>t.notifyAnimationComplete(e)))}(t,e,n))))}function N(t){let e=$(t);const n={[F.r.Animate]:Y(!0),[F.r.InView]:Y(),[F.r.Hover]:Y(),[F.r.Tap]:Y(),[F.r.Drag]:Y(),[F.r.Focus]:Y(),[F.r.Exit]:Y()};let o=!0;const r=(e,n)=>{const o=A(t,n);if(o){const{transition:t,transitionEnd:n,...i}=o;e={...e,...i,...n}}return e};function s(s,u){var c;const d=t.getProps(),h=t.getVariantContext(!0)||{},p=[],m=new Set;let f={},v=1/0;for(let e=0;e<U;e++){const g=I[e],y=n[g],x=null!==(c=d[g])&&void 0!==c?c:h[g],b=j(x),P=g===u?y.isActive:null;!1===P&&(v=e);let w=x===h[g]&&x!==d[g]&&b;if(w&&o&&t.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...f},!y.isActive&&null===P||!x&&!y.prevProp||i(x)||"boolean"==typeof x)continue;const A=z(y.prevProp,x);let T=A||g===u&&y.isActive&&!w&&b||e>v&&b;const E=Array.isArray(x)?x:[x];let S=E.reduce(r,{});!1===P&&(S={});const{prevResolvedValues:V={}}=y,C={...V,...S},R=t=>{T=!0,m.delete(t),y.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=V[t];f.hasOwnProperty(t)||(e!==n?(0,a.C)(e)&&(0,a.C)(n)?!l(e,n)||A?R(t):y.protectedKeys[t]=!0:void 0!==e?R(t):m.add(t):void 0!==e&&m.has(t)?R(t):y.protectedKeys[t]=!0)}y.prevProp=x,y.prevResolvedValues=S,y.isActive&&(f={...f,...S}),o&&t.blockInitialAnimation&&(T=!1),T&&!w&&p.push(...E.map((t=>({animation:t,options:{type:g,...s}}))))}if(m.size){const e={};m.forEach((n=>{const o=t.getBaseTarget(n);void 0!==o&&(e[n]=o)})),p.push({animation:e})}let g=Boolean(p.length);return o&&!1===d.initial&&!t.manuallyAnimateOnMount&&(g=!1),o=!1,g?e(p):Promise.resolve()}return{animateChanges:s,setActive:function(e,o,i){var r;if(n[e].isActive===o)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,o)})),n[e].isActive=o;const a=s(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function z(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!l(e,t)}function Y(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var W=n(6295);const H={animation:(0,W.x)((({visualElement:t,animate:e})=>{t.animationState||(t.animationState=N(t)),i(e)&&(0,o.useEffect)((()=>e.subscribe(t)),[e])})),exit:(0,W.x)((t=>{const{custom:e,visualElement:n}=t,[i,a]=(0,r.oO)(),l=(0,o.useContext)(s.O);(0,o.useEffect)((()=>{n.isPresent=i;const t=n.animationState&&n.animationState.setActive(F.r.Exit,!i,{custom:l&&l.custom||e});t&&!i&&t.then(a)}),[i])}))};var q=n(1876);var X=n(3541),Z=n(1395),G=n(5856);function K(t,e,n){return(o,i)=>{(0,X.N)(o)&&!(0,G.gD)()&&(t.animationState&&t.animationState.setActive(F.r.Hover,e),n&&n(o,i))}}const J=(t,e)=>!!e&&(t===e||J(t,e.parentElement));var Q=n(9531),_=n(934);const tt=("undefined"==typeof process||process.env,"production"),et=new Set;const nt=new WeakMap,ot=new WeakMap,it=t=>{const e=nt.get(t.target);e&&e(t)},rt=t=>{t.forEach(it)};function st(t,e,n){const o=function({root:t,...e}){const n=t||document;ot.has(n)||ot.set(n,{});const o=ot.get(n),i=JSON.stringify(e);return o[i]||(o[i]=new IntersectionObserver(rt,{root:t,...e})),o[i]}(e);return nt.set(t,n),o.observe(t),()=>{nt.delete(t),o.unobserve(t)}}const at={some:0,all:1};function lt(t,e,n,{root:i,margin:r,amount:s="some",once:a}){(0,o.useEffect)((()=>{if(!t)return;const o={root:null==i?void 0:i.current,rootMargin:r,threshold:"number"==typeof s?s:at[s]};return st(n.getInstance(),o,(t=>{const{isIntersecting:o}=t;if(e.isInView===o)return;if(e.isInView=o,a&&!o&&e.hasEnteredView)return;o&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(F.r.InView,o);const i=n.getProps(),r=o?i.onViewportEnter:i.onViewportLeave;r&&r(t)}))}),[t,i,r,s])}function ut(t,e,n,{fallback:i=!0}){(0,o.useEffect)((()=>{var o,r;t&&i&&("production"!==tt&&(o="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||et.has(o)||(console.warn(o),r&&console.warn(r),et.add(o))),requestAnimationFrame((()=>{e.hasEnteredView=!0;const{onViewportEnter:t}=n.getProps();t&&t(null),n.animationState&&n.animationState.setActive(F.r.InView,!0)})))}),[t])}const ct={inView:(0,W.x)((function({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:i,viewport:r={}}){const s=(0,o.useRef)({hasEnteredView:!1,isInView:!1});let a=Boolean(e||n||i);r.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?ut:lt)(a,s.current,t,r)})),tap:(0,W.x)((function({onTap:t,onTapStart:e,onTapCancel:n,whileTap:i,visualElement:r}){const s=t||e||n||i,a=(0,o.useRef)(!1),l=(0,o.useRef)(null),u={passive:!(e||t||n||m)};function c(){l.current&&l.current(),l.current=null}function d(){return c(),a.current=!1,r.animationState&&r.animationState.setActive(F.r.Tap,!1),!(0,G.gD)()}function h(e,o){d()&&(J(r.getInstance(),e.target)?t&&t(e,o):n&&n(e,o))}function p(t,e){d()&&n&&n(t,e)}function m(t,n){c(),a.current||(a.current=!0,l.current=(0,_.z)((0,Z.a)(window,"pointerup",h,u),(0,Z.a)(window,"pointercancel",p,u)),r.animationState&&r.animationState.setActive(F.r.Tap,!0),e&&e(t,n))}(0,Z.m)(r,"pointerdown",s?m:void 0,u),(0,Q.z)(c)})),focus:(0,W.x)((function({whileFocus:t,visualElement:e}){const{animationState:n}=e;(0,q.p)(e,"focus",t?()=>{n&&n.setActive(F.r.Focus,!0)}:void 0),(0,q.p)(e,"blur",t?()=>{n&&n.setActive(F.r.Focus,!1)}:void 0)})),hover:(0,W.x)((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:o}){(0,Z.m)(o,"pointerenter",t||n?K(o,!0,t):void 0,{passive:!t}),(0,Z.m)(o,"pointerleave",e||n?K(o,!1,e):void 0,{passive:!e})}))};var dt=n(6162),ht=n(3093);const pt={current:null},mt={current:!1};var ft=n(1065);const vt=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const gt=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function yt(t){return i(t.animate)||gt.some((e=>j(t[e])))}var xt=n(9340);const bt=t=>({isEnabled:e=>t.some((t=>!!e[t]))}),Pt={measureLayout:bt(["layout","layoutId","drag"]),animation:bt(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:bt(["exit"]),drag:bt(["drag","dragControls"]),focus:bt(["whileFocus"]),hover:bt(["whileHover","onHoverStart","onHoverEnd"]),tap:bt(["whileTap","onTap","onTapStart","onTapCancel"]),pan:bt(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:bt(["whileInView","onViewportEnter","onViewportLeave"])};var wt=n(3491);const At=Object.keys(Pt),Tt=At.length,Et=({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:i,measureViewportBox:r,render:s,readValueFromInstance:a,removeValueFromRenderState:l,sortNodePosition:u,scrapeMotionValuesFromProps:c})=>({parent:d,props:h,presenceId:m,blockInitialAnimation:f,visualState:v,reducedMotionConfig:g},y={})=>{let x=!1;const{latestValues:b,renderState:P}=v;let w;const A=function(){const t=vt.map((()=>new ft.L)),e={},n={clearAllListeners:()=>t.forEach((t=>t.clear())),updatePropListeners:t=>{vt.forEach((o=>{var i;const r="on"+o,s=t[r];null===(i=e[o])||void 0===i||i.call(e),s&&(e[o]=n[r](s))}))}};return t.forEach(((t,e)=>{n["on"+vt[e]]=e=>t.add(e),n["notify"+vt[e]]=(...e)=>t.notify(...e)})),n}(),T=new Map,E=new Map;let S={};const V={...b};let C;function L(){w&&x&&(k(),s(w,P,h.style,$.projection))}function k(){e($,P,b,y,h)}function D(){A.notifyUpdate(b)}function O(t,e){const n=e.onChange((e=>{b[t]=e,h.onUpdate&&dt.ZP.update(D,!1,!0)})),o=e.onRenderRequest($.scheduleRender);E.set(t,(()=>{n(),o()}))}const{willChange:F,...B}=c(h);for(const t in B){const e=B[t];void 0!==b[t]&&(0,R.i)(e)&&(e.set(b[t],!1),M(F)&&F.add(t))}const I=yt(h),U=function(t){return Boolean(yt(t)||t.variants)}(h),$={treeType:t,current:null,depth:d?d.depth+1:0,parent:d,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:f,isMounted:()=>Boolean(w),mount(t){x=!0,w=$.current=t,$.projection&&$.projection.mount(t),U&&d&&!I&&(C=null==d?void 0:d.addVariantChild($)),T.forEach(((t,e)=>O(e,t))),mt.current||function(){if(mt.current=!0,ht.j)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pt.current=t.matches;t.addListener(e),e()}else pt.current=!1}(),$.shouldReduceMotion="never"!==g&&("always"===g||pt.current),null==d||d.children.add($),$.setProps(h)},unmount(){var t;null===(t=$.projection)||void 0===t||t.unmount(),dt.qY.update(D),dt.qY.render(L),E.forEach((t=>t())),null==C||C(),null==d||d.children.delete($),A.clearAllListeners(),w=void 0,x=!1},loadFeatures(t,e,n,i,r,s){const a=[];"production"!==tt&&n&&e&&(0,xt.k)(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(let e=0;e<Tt;e++){const n=At[e],{isEnabled:i,Component:r}=Pt[n];i(h)&&r&&a.push((0,o.createElement)(r,{key:n,...t,visualElement:$}))}if(!$.projection&&r){$.projection=new r(i,$.getLatestValues(),d&&d.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:l}=t;$.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&(0,wt.I)(a),visualElement:$,scheduleRender:()=>$.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l})}return a},addVariantChild(t){var e;const n=$.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>u&&t===e.treeType?u($.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>U?$:null==d?void 0:d.getClosestVariantNode(),getLayoutId:()=>h.layoutId,getInstance:()=>w,getStaticValue:t=>b[t],setStaticValue:(t,e)=>b[t]=e,getLatestValues:()=>b,setVisibility(t){$.isVisible!==t&&($.isVisible=t,$.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>i($,t,h,e),measureViewportBox:()=>r(w,h),addValue(t,e){$.hasValue(t)&&$.removeValue(t),T.set(t,e),b[t]=e.get(),O(t,e)},removeValue(t){var e;T.delete(t),null===(e=E.get(t))||void 0===e||e(),E.delete(t),delete b[t],l(t,P)},hasValue:t=>T.has(t),getValue(t,e){let n=T.get(t);return void 0===n&&void 0!==e&&(n=(0,p.B)(e),$.addValue(t,n)),n},forEachValue:t=>T.forEach(t),readValue:t=>void 0!==b[t]?b[t]:a(w,t,y),setBaseTarget(t,e){V[t]=e},getBaseTarget(t){if(n){const e=n(h,t);if(void 0!==e&&!(0,R.i)(e))return e}return V[t]},...A,build:()=>(k(),P),scheduleRender(){dt.ZP.render(L,!1,!0)},syncRender:L,setProps(t){(t.transformTemplate||h.transformTemplate)&&$.scheduleRender(),h=t,A.updatePropListeners(t),S=function(t,e,n){const{willChange:o}=e;for(const i in e){const r=e[i],s=n[i];if((0,R.i)(r))t.addValue(i,r),M(o)&&o.add(i);else if((0,R.i)(s))t.addValue(i,(0,p.B)(r)),M(o)&&o.remove(i);else if(s!==r)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,(0,p.B)(void 0!==e?e:r))}}for(const o in n)void 0===e[o]&&t.removeValue(o);return e}($,c(h),S)},getProps:()=>h,getVariant:t=>{var e;return null===(e=h.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>h.transition,getTransformPagePoint:()=>h.transformPagePoint,getVariantContext(t=!1){if(t)return null==d?void 0:d.getVariantContext();if(!I){const t=(null==d?void 0:d.getVariantContext())||{};return void 0!==h.initial&&(t.initial=h.initial),t}const e={};for(let t=0;t<Vt;t++){const n=St[t],o=h[n];(j(o)||!1===o)&&(e[n]=o)}return e}};return $},St=["initial",...B],Vt=St.length,Ct={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rt=(t,e)=>V.indexOf(t)-V.indexOf(e);function Mt(t){return t.startsWith("--")}const Lt=(t,e)=>e&&"number"==typeof t?e.transform(t):t;var kt=n(4923);function Dt(t,e,n,o){const{style:i,vars:r,transform:s,transformKeys:a,transformOrigin:l}=t;a.length=0;let u=!1,c=!1,d=!0;for(const t in e){const n=e[t];if(Mt(t)){r[t]=n;continue}const o=kt.j[t],h=Lt(n,o);if(C.has(t)){if(u=!0,s[t]=h,a.push(t),!d)continue;n!==(o.default||0)&&(d=!1)}else t.startsWith("origin")?(c=!0,l[t]=h):i[t]=h}if(u||o?i.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:o=!0},i,r){let s="";e.sort(Rt);for(const n of e)s+=`${Ct[n]||n}(${t[n]}) `;return n&&!t.z&&(s+="translateZ(0)"),s=s.trim(),r?s=r(t,i?"":s):o&&i&&(s="none"),s}(t,n,d,o):!e.transform&&i.transform&&(i.transform="none"),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;i.transformOrigin=`${t} ${e} ${n}`}}var Ot=n(6978);const jt=new Set(["width","height","top","left","right","bottom","x","y"]),Ft=t=>jt.has(t),Bt=(t,e)=>{t.set(e,!1),t.set(e)},It=t=>t===v.Rx||t===g.px;var Ut;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ut||(Ut={}));const $t=(t,e)=>parseFloat(t.split(", ")[e]),Nt=(t,e)=>(n,{transform:o})=>{if("none"===o||!o)return 0;const i=o.match(/^matrix3d\((.+)\)$/);if(i)return $t(i[1],e);{const e=o.match(/^matrix\((.+)\)$/);return e?$t(e[1],t):0}},zt=new Set(["x","y","z"]),Yt=V.filter((t=>!zt.has(t)));const Wt={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:Nt(4,13),y:Nt(5,14)},Ht=(t,e,n={},o={})=>{e={...e},o={...o};const i=Object.keys(e).filter(Ft);let r=[],s=!1;const l=[];if(i.forEach((i=>{const u=t.getValue(i);if(!t.hasValue(i))return;let c=n[i],d=b(c);const h=e[i];let p;if((0,a.C)(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],d=b(c);for(let n=e;n<t;n++)p?(0,xt.k)(b(h[n])===p,"All keyframes must be of the same type"):(p=b(h[n]),(0,xt.k)(p===d||It(d)&&It(p),"Keyframes must be of the same dimension as the current value"))}else p=b(h);if(d!==p)if(It(d)&&It(p)){const t=u.get();"string"==typeof t&&u.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&p===g.px&&(e[i]=h.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==p?void 0:p.transform)&&(0===c||0===h)?0===c?u.set(p.transform(c)):e[i]=d.transform(h):(s||(r=function(t){const e=[];return Yt.forEach((n=>{const o=t.getValue(n);void 0!==o&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),l.push(i),o[i]=void 0!==o[i]?o[i]:e[i],Bt(u,h))})),l.length){const n=l.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const o=e.measureViewportBox(),i=e.getInstance(),r=getComputedStyle(i),{display:s}=r,a={};"none"===s&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=Wt[t](o,r)})),e.syncRender();const l=e.measureViewportBox();return n.forEach((n=>{const o=e.getValue(n);Bt(o,a[n]),t[n]=Wt[n](l,r)})),t})(e,t,l);return r.length&&r.forEach((([e,n])=>{t.getValue(e).set(n)})),t.syncRender(),ht.j&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:o}}return{target:e,transitionEnd:o}};function qt(t,e,n,o){return(t=>Object.keys(t).some(Ft))(e)?Ht(t,e,n,o):{target:e,transitionEnd:o}}var Xt=n(798);function Zt(t,{layout:e,layoutId:n}){return C.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Xt.P[t]||"opacity"===t)}function Gt(t){const{style:e}=t,n={};for(const o in e)((0,R.i)(e[o])||Zt(o,t))&&(n[o]=e[o]);return n}function Kt(t,{style:e,vars:n},o,i){Object.assign(t.style,e,i&&i.getProjectionStyles(o));for(const e in n)t.style.setProperty(e,n[e])}var Jt=n(7557),Qt=n(8834);const _t={treeType:"dom",readValueFromInstance(t,e){if(C.has(e)){const t=(0,Jt.A)(e);return t&&t.default||0}{const o=(n=t,window.getComputedStyle(n)),i=(Mt(e)?o.getPropertyValue(e):o[e])||0;return"string"==typeof i?i.trim():i}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:(t,{transformPagePoint:e})=>(0,Qt.J)(t,e),resetTransform(t,e,n){const{transformTemplate:o}=n;e.style.transform=o?o({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,{transition:e,transitionEnd:n,...o},{transformValues:i},r=!0){let s=function(t,e,n){var o;const i={};for(const r in t){const t=S(r,e);i[r]=void 0!==t?t:null===(o=n.getValue(r))||void 0===o?void 0:o.get()}return i}(o,e||{},t);if(i&&(n&&(n=i(n)),o&&(o=i(o)),s&&(s=i(s))),r){!function(t,e,n){var o,i;const r=Object.keys(e).filter((e=>!t.hasValue(e))),s=r.length;if(s)for(let a=0;a<s;a++){const s=r[a],l=e[s];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(i=null!==(o=n[s])&&void 0!==o?o:t.readValue(s))&&void 0!==i?i:e[s]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||d(u))?u=parseFloat(u):!w(u)&&c.P.test(l)&&(u=(0,m.T)(s,l)),t.addValue(s,(0,p.B)(u)),void 0===n[s]&&(n[s]=u),t.setBaseTarget(s,u))}}(t,o,s);const e=((t,e,n,o)=>{const i=(0,Ot.mH)(t,e,o);return qt(t,e=i.target,n,o=i.transitionEnd)})(t,o,s,n);n=e.transitionEnd,o=e.target}return{transition:e,transitionEnd:n,...o}},scrapeMotionValuesFromProps:Gt,build(t,e,n,o,i){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Dt(e,n,o,i.transformTemplate)},render:Kt},te=Et(_t);function ee(t,e,n){return"string"==typeof t?t:g.px.transform(e+n*t)}const ne={offset:"stroke-dashoffset",array:"stroke-dasharray"},oe={offset:"strokeDashoffset",array:"strokeDasharray"};function ie(t,{attrX:e,attrY:n,originX:o,originY:i,pathLength:r,pathSpacing:s=1,pathOffset:a=0,...l},u,c){Dt(t,l,u,c),t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(void 0!==o||void 0!==i||h.transform)&&(h.transformOrigin=function(t,e,n){return`${ee(e,t.x,t.width)} ${ee(n,t.y,t.height)}`}(p,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==r&&function(t,e,n=1,o=0,i=!0){t.pathLength=1;const r=i?ne:oe;t[r.offset]=g.px.transform(-o);const s=g.px.transform(e),a=g.px.transform(n);t[r.array]=`${s} ${a}`}(d,r,s,a,!1)}const re=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),se=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);const ae=Et({..._t,getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return C.has(e)?(null===(n=(0,Jt.A)(e))||void 0===n?void 0:n.default)||0:(e=se.has(e)?e:re(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){const e=Gt(t);for(const n in t)if((0,R.i)(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build(t,e,n,o,i){ie(e,n,o,i.transformTemplate)},render:function(t,e,n,o){Kt(t,e,void 0,o);for(const n in e.attrs)t.setAttribute(se.has(n)?n:re(n),e.attrs[n])}}),le=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];const ue={renderer:(t,e)=>function(t){return"string"==typeof t&&!t.includes("-")&&!!(le.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?ae(e,{enableHardwareAcceleration:!1}):te(e,{enableHardwareAcceleration:!0}),...H,...ct}},6978:(t,e,n)=>{n.d(e,{Xp:()=>r,mH:()=>a});var o=n(9340);function i(t){return"string"==typeof t&&t.startsWith("var(--")}const r=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function s(t,e,n=1){(0,o.k)(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[a,l]=function(t){const e=r.exec(t);if(!e)return[,];const[,n,o]=e;return[n,o]}(t);if(!a)return;const u=window.getComputedStyle(e).getPropertyValue(a);return u?u.trim():i(l)?s(l,e,n+1):l}function a(t,{...e},n){const o=t.getInstance();if(!(o instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.forEachValue((t=>{const e=t.get();if(!i(e))return;const n=s(e,o);n&&t.set(n)}));for(const t in e){const r=e[t];if(!i(r))continue;const a=s(r,o);a&&(e[t]=a,n&&void 0===n[t]&&(n[t]=r))}return{target:e,transitionEnd:n}}},6914:(t,e,n)=>{n.d(e,{T:()=>s});var o=n(9500),i=n(6002),r=n(7557);function s(t,e){var n;let s=(0,r.A)(t);return s!==o.h&&(s=i.P),null===(n=s.getAnimatableNone)||void 0===n?void 0:n.call(s,e)}},7557:(t,e,n)=>{n.d(e,{A:()=>s});var o=n(7576),i=n(9500);const r={...n(4923).j,color:o.$,backgroundColor:o.$,outlineColor:o.$,fill:o.$,stroke:o.$,borderColor:o.$,borderTopColor:o.$,borderRightColor:o.$,borderBottomColor:o.$,borderLeftColor:o.$,filter:i.h,WebkitFilter:i.h},s=t=>r[t]},4923:(t,e,n)=>{n.d(e,{j:()=>s});var o=n(155),i=n(1513),r=n(6933);const s={borderWidth:o.px,borderTopWidth:o.px,borderRightWidth:o.px,borderBottomWidth:o.px,borderLeftWidth:o.px,borderRadius:o.px,radius:o.px,borderTopLeftRadius:o.px,borderTopRightRadius:o.px,borderBottomRightRadius:o.px,borderBottomLeftRadius:o.px,width:o.px,maxWidth:o.px,height:o.px,maxHeight:o.px,size:o.px,top:o.px,right:o.px,bottom:o.px,left:o.px,padding:o.px,paddingTop:o.px,paddingRight:o.px,paddingBottom:o.px,paddingLeft:o.px,margin:o.px,marginTop:o.px,marginRight:o.px,marginBottom:o.px,marginLeft:o.px,rotate:o.RW,rotateX:o.RW,rotateY:o.RW,rotateZ:o.RW,scale:i.bA,scaleX:i.bA,scaleY:i.bA,scaleZ:i.bA,skew:o.RW,skewX:o.RW,skewY:o.RW,distance:o.px,translateX:o.px,translateY:o.px,translateZ:o.px,x:o.px,y:o.px,z:o.px,perspective:o.px,transformPerspective:o.px,opacity:i.Fq,originX:o.$C,originY:o.$C,originZ:o.px,zIndex:r.e,fillOpacity:i.Fq,strokeOpacity:i.Fq,numOctaves:r.e}},6933:(t,e,n)=>{n.d(e,{e:()=>o});const o={...n(1513).Rx,transform:Math.round}},7921:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(o||(o={}))},1180:(t,e,n)=>{function o(t,e){-1===t.indexOf(e)&&t.push(e)}function i(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}n.d(e,{cl:()=>i,y4:()=>o})},3093:(t,e,n)=>{n.d(e,{j:()=>o});const o="undefined"!=typeof document},3491:(t,e,n)=>{function o(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}n.d(e,{I:()=>o})},7048:(t,e,n)=>{n.d(e,{Y:()=>r,p:()=>i});var o=n(2819);const i=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),r=t=>(0,o.C)(t)?t[t.length-1]||0:t},1065:(t,e,n)=>{n.d(e,{L:()=>i});var o=n(1180);class i{constructor(){this.subscriptions=[]}add(t){return(0,o.y4)(this.subscriptions,t),()=>(0,o.cl)(this.subscriptions,t)}notify(t,e,n){const o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](t,e,n);else for(let i=0;i<o;i++){const o=this.subscriptions[i];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},1818:(t,e,n)=>{n.d(e,{w:()=>o});const o=t=>1e3*t},9531:(t,e,n)=>{n.d(e,{z:()=>i});var o=n(8370);function i(t){return(0,o.useEffect)((()=>()=>t()),[])}},1421:(t,e,n)=>{n.d(e,{B:()=>a});var o=n(6162),i=n(4060),r=n(1065);class s{constructor(t){var e;this.version="__VERSION__",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new r.L,this.velocityUpdateSubscribers=new r.L,this.renderSubscribers=new r.L,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=(0,o.$B)();this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,o.ZP.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>o.ZP.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?(0,i.R)(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.stopAnimation=t(e)})).then((()=>this.clearAnimation()))}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function a(t){return new s(t)}},7846:(t,e,n)=>{n.d(e,{i:()=>o});const o=t=>void 0!==t&&!!t.getVelocity},8370:t=>{t.exports=void 0},6162:(t,e,n)=>{n.d(e,{qY:()=>p,ZP:()=>x,iW:()=>m,$B:()=>y});const o=1/60*1e3,i="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),r="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout((()=>t(i())),o);let s=!0,a=!1,l=!1;const u={delta:0,timestamp:0},c=["read","update","preRender","render","postRender"],d=c.reduce(((t,e)=>(t[e]=function(t){let e=[],n=[],o=0,i=!1,r=!1;const s=new WeakSet,a={schedule:(t,r=!1,a=!1)=>{const l=a&&i,u=l?e:n;return r&&s.add(t),-1===u.indexOf(t)&&(u.push(t),l&&i&&(o=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),s.delete(t)},process:l=>{if(i)r=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,o=e.length,o)for(let n=0;n<o;n++){const o=e[n];o(l),s.has(o)&&(a.schedule(o),t())}i=!1,r&&(r=!1,a.process(l))}}};return a}((()=>a=!0)),t)),{}),h=c.reduce(((t,e)=>{const n=d[e];return t[e]=(t,e=!1,o=!1)=>(a||g(),n.schedule(t,e,o)),t}),{}),p=c.reduce(((t,e)=>(t[e]=d[e].cancel,t)),{}),m=c.reduce(((t,e)=>(t[e]=()=>d[e].process(u),t)),{}),f=t=>d[t].process(u),v=t=>{a=!1,u.delta=s?o:Math.max(Math.min(t-u.timestamp,40),1),u.timestamp=t,l=!0,c.forEach(f),l=!1,a&&(s=!1,r(v))},g=()=>{a=!0,s=!0,l||r(v)},y=()=>u,x=h},6924:(t,e,n)=>{n.d(e,{LU:()=>g,G2:()=>m,XL:()=>v,CG:()=>f,h9:()=>x,yD:()=>b,gJ:()=>y,Z7:()=>d,X7:()=>p,Bn:()=>h,YQ:()=>a,mZ:()=>c,Vv:()=>u,GE:()=>s});const o=t=>e=>1-t(1-e),i=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,r=t=>e=>e*e*((t+1)*e-t),s=t=>t,a=(l=2,t=>Math.pow(t,l));var l;const u=o(a),c=i(a),d=t=>1-Math.sin(Math.acos(t)),h=o(d),p=i(h),m=r(1.525),f=o(m),v=i(m),g=(t=>{const e=r(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),y=t=>{if(1===t||0===t)return t;const e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},x=o(y),b=t=>t<.5?.5*(1-y(1-2*t)):.5*y(2*t-1)+.5},1698:(t,e,n)=>{n.d(e,{u:()=>o});const o=(t,e,n)=>Math.min(Math.max(n,t),e)},5091:(t,e,n)=>{n.d(e,{e:()=>o});const o=t=>"number"==typeof t},8481:(t,e,n)=>{n.d(e,{C:()=>o});const o=(t,e,n)=>-n*t+n*e+t},934:(t,e,n)=>{n.d(e,{z:()=>i});const o=(t,e)=>n=>e(t(n)),i=(...t)=>t.reduce(o)},1790:(t,e,n)=>{n.d(e,{Y:()=>o});const o=(t,e,n)=>{const o=e-t;return 0===o?1:(n-t)/o}},4060:(t,e,n)=>{function o(t,e){return e?t*(1e3/e):0}n.d(e,{R:()=>o})},9012:(t,e,n)=>{n.d(e,{$:()=>i});var o=n(3203);const i={test:(0,n(1552).i)("#"),parse:function(t){let e="",n="",o="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}},transform:o.m.transform}},7493:(t,e,n)=>{n.d(e,{J:()=>a});var o=n(1513),i=n(155),r=n(5757),s=n(1552);const a={test:(0,s.i)("hsl","hue"),parse:(0,s.d)("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+i.aQ.transform((0,r.Nw)(e))+", "+i.aQ.transform((0,r.Nw)(n))+", "+(0,r.Nw)(o.Fq.transform(s))+")"}},7576:(t,e,n)=>{n.d(e,{$:()=>a});var o=n(5757),i=n(9012),r=n(7493),s=n(3203);const a={test:t=>s.m.test(t)||i.$.test(t)||r.J.test(t),parse:t=>s.m.test(t)?s.m.parse(t):r.J.test(t)?r.J.parse(t):i.$.parse(t),transform:t=>(0,o.HD)(t)?t:t.hasOwnProperty("red")?s.m.transform(t):r.J.transform(t)}},3203:(t,e,n)=>{n.d(e,{m:()=>l});var o=n(1513),i=n(5757),r=n(1552);const s=(0,i.uZ)(0,255),a=Object.assign(Object.assign({},o.Rx),{transform:t=>Math.round(s(t))}),l={test:(0,r.i)("rgb","red"),parse:(0,r.d)("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+a.transform(t)+", "+a.transform(e)+", "+a.transform(n)+", "+(0,i.Nw)(o.Fq.transform(r))+")"}},1552:(t,e,n)=>{n.d(e,{d:()=>r,i:()=>i});var o=n(5757);const i=(t,e)=>n=>Boolean((0,o.HD)(n)&&o.mj.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),r=(t,e,n)=>i=>{if(!(0,o.HD)(i))return i;const[r,s,a,l]=i.match(o.KP);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},9500:(t,e,n)=>{n.d(e,{h:()=>l});var o=n(6002),i=n(5757);const r=new Set(["brightness","contrast","saturate","opacity"]);function s(t){let[e,n]=t.s