framer-motion
Version:
A simple and powerful React animation library
1 lines • 111 kB
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){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var r=n(e),i=o(e);const s=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({});function l(){return e.useContext(a).visualElement}const u=e.createContext(null),c="undefined"!=typeof document,d=c?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1});function f(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function p(t){return"object"==typeof t&&"function"==typeof t.start}const g=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function y(t){return p(t.animate)||g.some(e=>m(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:o}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:o}),[b(n),b(o)])}function b(t){return Array.isArray(t)?t.join(" "):t}const w=t=>({isEnabled:e=>t.some(t=>!!e[t])}),E={measureLayout:w(["layout","layoutId","drag"]),animation:w(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:w(["exit"]),drag:w(["drag","dragControls"]),focus:w(["whileFocus"]),hover:w(["whileHover","onHoverStart","onHoverEnd"]),tap:w(["whileTap","onTap","onTapStart","onTapCancel"]),pan:w(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:w(["whileInView","onViewportEnter","onViewportLeave"])};function S(t){for(const e in t)"projectionNodeConstructor"===e?E.projectionNodeConstructor=t[e]:E[e].Component=t[e]}function A(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const P={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let T=1;const C=e.createContext({});class V extends r.default.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:e}=this.props;return t&&t.setProps(e),null}componentDidUpdate(){}render(){return this.props.children}}const M=e.createContext({}),R=Symbol.for("motionComponentSymbol");function L({preloadedFeatures:t,createVisualElement:n,projectionNodeConstructor:o,useRender:r,useVisualState:m,Component:p}){t&&S(t);const g=e.forwardRef((function(g,y){const v={...e.useContext(s),...g,layoutId:O(g)},{isStatic:b}=v;let w=null;const S=x(g),C=b?void 0:A(()=>{if(P.hasEverUpdated)return T++}),R=m(g,b);if(!b&&c){S.visualElement=function(t,n,o,r){const i=l(),a=e.useContext(h),c=e.useContext(u),f=e.useContext(s).reducedMotion,m=e.useRef(void 0);r=r||a.renderer,!m.current&&r&&(m.current=r(t,{visualState:n,parent:i,props:o,presenceId:c?c.id:void 0,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f}));const p=m.current;return d(()=>{p&&p.syncRender()}),e.useEffect(()=>{p&&p.animationState&&p.animationState.animateChanges()}),d(()=>()=>p&&p.notifyUnmount(),[]),p}(p,R,v,n);const r=e.useContext(h).strict,i=e.useContext(M);S.visualElement&&(w=S.visualElement.loadFeatures(g,r,t,C,o||E.projectionNodeConstructor,i))}return i.createElement(V,{visualElement:S.visualElement,props:v},w,i.createElement(a.Provider,{value:S},r(p,g,C,function(t,n,o){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):f(o)&&(o.current=e))},[n])}(R,S.visualElement,y),R,b,S.visualElement)))}));return g[R]=p,g}function O({layoutId:t}){const n=e.useContext(C).id;return n&&void 0!==t?n+"-"+t:t}function k(t){function e(e,n={}){return L(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const D=["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"];function j(t){return"string"==typeof t&&!t.includes("-")&&!!(D.indexOf(t)>-1||/[A-Z]/.test(t))}const F={};function I(t){Object.assign(F,t)}const B=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U=new Set(B);function z(t,{layout:e,layoutId:n}){return U.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!F[t]||"opacity"===t)}const N=t=>void 0!==t&&!!t.getVelocity,W={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},H=(t,e)=>B.indexOf(t)-B.indexOf(e);function $(t){return t.startsWith("--")}const Y=(t,e)=>e&&"number"==typeof t?e.transform(t):t,X=(t,e)=>n=>Math.max(Math.min(n,e),t),G=t=>t%1?Number(t.toFixed(5)):t,q=/(-)?([\d]*\.?[\d])+/g,Z=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,K=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function _(t){return"string"==typeof t}const J={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Q=Object.assign(Object.assign({},J),{transform:X(0,1)}),tt=Object.assign(Object.assign({},J),{default:1}),et=t=>({test:e=>_(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),nt=et("deg"),ot=et("%"),rt=et("px"),it=et("vh"),st=et("vw"),at=Object.assign(Object.assign({},ot),{parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)}),lt=(t,e)=>n=>Boolean(_(n)&&K.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ut=(t,e,n)=>o=>{if(!_(o))return o;const[r,i,s,a]=o.match(q);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},ct={test:lt("hsl","hue"),parse:ut("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:o=1})=>"hsla("+Math.round(t)+", "+ot.transform(G(e))+", "+ot.transform(G(n))+", "+G(Q.transform(o))+")"},dt=X(0,255),ht=Object.assign(Object.assign({},J),{transform:t=>Math.round(dt(t))}),ft={test:lt("rgb","red"),parse:ut("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:o=1})=>"rgba("+ht.transform(t)+", "+ht.transform(e)+", "+ht.transform(n)+", "+G(Q.transform(o))+")"};const mt={test:lt("#"),parse:function(t){let e="",n="",o="",r="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),r=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),r=t.substr(4,1),e+=e,n+=n,o+=o,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}},transform:ft.transform},pt={test:t=>ft.test(t)||mt.test(t)||ct.test(t),parse:t=>ft.test(t)?ft.parse(t):ct.test(t)?ct.parse(t):mt.parse(t),transform:t=>_(t)?t:t.hasOwnProperty("red")?ft.transform(t):ct.transform(t)};function gt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const o=t.match(Z);o&&(n=o.length,t=t.replace(Z,"${c}"),e.push(...o.map(pt.parse)));const r=t.match(q);return r&&(t=t.replace(q,"${n}"),e.push(...r.map(J.parse))),{values:e,numColors:n,tokenised:t}}function yt(t){return gt(t).values}function vt(t){const{values:e,numColors:n,tokenised:o}=gt(t),r=e.length;return t=>{let e=o;for(let o=0;o<r;o++)e=e.replace(o<n?"${c}":"${n}",o<n?pt.transform(t[o]):G(t[o]));return e}}const xt=t=>"number"==typeof t?0:t;const bt={test:function(t){var e,n,o,r;return isNaN(t)&&_(t)&&(null!==(n=null===(e=t.match(q))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(r=null===(o=t.match(Z))||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0},parse:yt,createTransformer:vt,getAnimatableNone:function(t){const e=yt(t);return vt(t)(e.map(xt))}},wt=new Set(["brightness","contrast","saturate","opacity"]);function Et(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[o]=n.match(q)||[];if(!o)return t;const r=n.replace(o,"");let i=wt.has(e)?1:0;return o!==n&&(i*=100),e+"("+i+r+")"}const St=/([a-z-]*)\(.*?\)/g,At=Object.assign(Object.assign({},bt),{getAnimatableNone:t=>{const e=t.match(St);return e?e.map(Et).join(" "):t}}),Pt={...J,transform:Math.round},Tt={borderWidth:rt,borderTopWidth:rt,borderRightWidth:rt,borderBottomWidth:rt,borderLeftWidth:rt,borderRadius:rt,radius:rt,borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomRightRadius:rt,borderBottomLeftRadius:rt,width:rt,maxWidth:rt,height:rt,maxHeight:rt,size:rt,top:rt,right:rt,bottom:rt,left:rt,padding:rt,paddingTop:rt,paddingRight:rt,paddingBottom:rt,paddingLeft:rt,margin:rt,marginTop:rt,marginRight:rt,marginBottom:rt,marginLeft:rt,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:nt,skewX:nt,skewY:nt,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:Q,originX:at,originY:at,originZ:rt,zIndex:Pt,fillOpacity:Q,strokeOpacity:Q,numOctaves:Pt};function Ct(t,e,n,o){const{style:r,vars:i,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($(t)){i[t]=n;continue}const o=Tt[t],h=Y(n,o);if(U.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):r[t]=h}if(u||o?r.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:o=!0},r,i){let s="";e.sort(H);for(const n of e)s+=`${W[n]||n}(${t[n]}) `;return n&&!t.z&&(s+="translateZ(0)"),s=s.trim(),i?s=i(t,r?"":s):o&&r&&(s="none"),s}(t,n,d,o):!e.transform&&r.transform&&(r.transform="none"),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;r.transformOrigin=`${t} ${e} ${n}`}}const Vt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Mt(t,e,n){for(const o in e)N(e[o])||z(o,n)||(t[o]=e[o])}function Rt(t,n,o){const r={};return Mt(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,o){return e.useMemo(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Ct(e,n,{enableHardwareAcceleration:!o},t),Object.assign({},e.vars,e.style)},[n])}(t,n,o)),t.transformValues?t.transformValues(r):r}function Lt(t,e,n){const o={},r=Rt(t,e,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),o.style=r,o}const Ot=new Set(["initial","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function kt(t){return Ot.has(t)}let Dt=t=>!kt(t);function jt(t){t&&(Dt=e=>e.startsWith("on")?!kt(e):t(e))}try{jt(require("@emotion/is-prop-valid").default)}catch(t){}function Ft(t,e,n){const o={};for(const r in t)(Dt(r)||!0===n&&kt(r)||!e&&!kt(r)||t.draggable&&r.startsWith("onDrag"))&&(o[r]=t[r]);return o}function It(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const Bt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ut={offset:"strokeDashoffset",array:"strokeDasharray"};function zt(t,{attrX:e,attrY:n,originX:o,originY:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...l},u,c){Ct(t,l,u,c),t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:f}=t;d.transform&&(f&&(h.transform=d.transform),delete d.transform),f&&(void 0!==o||void 0!==r||h.transform)&&(h.transformOrigin=function(t,e,n){return`${It(e,t.x,t.width)} ${It(n,t.y,t.height)}`}(f,void 0!==o?o:.5,void 0!==r?r:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&function(t,e,n=1,o=0,r=!0){t.pathLength=1;const i=r?Bt:Ut;t[i.offset]=rt.transform(-o);const s=rt.transform(e),a=rt.transform(n);t[i.array]=`${s} ${a}`}(d,i,s,a,!1)}const Nt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}});function Wt(t,n){const o=e.useMemo(()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return zt(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Mt(e,t.style,t),o.style={...e,...o.style}}return o}function Ht(t=!1){return(n,o,r,i,{latestValues:s},a)=>{const l=(j(n)?Wt:Lt)(o,s,a),u={...Ft(o,"string"==typeof n,t),...l,ref:i};return r&&(u["data-projection-id"]=r),e.createElement(n,u)}}const $t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Yt(t,{style:e,vars:n},o,r){Object.assign(t.style,e,r&&r.getProjectionStyles(o));for(const e in n)t.style.setProperty(e,n[e])}const Xt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Gt(t,e,n,o){Yt(t,e,void 0,o);for(const n in e.attrs)t.setAttribute(Xt.has(n)?n:$t(n),e.attrs[n])}function qt(t){const{style:e}=t,n={};for(const o in e)(N(e[o])||z(o,t))&&(n[o]=e[o]);return n}function Zt(t){const e=qt(t);for(const n in t)if(N(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function Kt(t,e,n,o={},r={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,r)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,r)),e}const _t=t=>Array.isArray(t),Jt=t=>_t(t)?t[t.length-1]||0:t;function Qt(t){const e=N(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const te=t=>(n,o)=>{const r=e.useContext(a),i=e.useContext(u),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},o,r,i){const s={latestValues:ee(o,r,i,t),renderState:e()};return n&&(s.mount=t=>n(o,t,s)),s}(t,n,r,i);return o?s():A(s)};function ee(t,e,n,o){const r={},i=o(t);for(const t in i)r[t]=Qt(i[t]);let{initial:s,animate:a}=t;const l=y(t),u=v(t);e&&u&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const d=c?a:s;if(d&&"boolean"!=typeof d&&!p(d)){(Array.isArray(d)?d:[d]).forEach(e=>{const n=Kt(t,e);if(!n)return;const{transitionEnd:o,transition:i,...s}=n;for(const t in s){let e=s[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(r[t]=e)}for(const t in o)r[t]=o[t]})}return r}const ne={useVisualState:te({scrapeMotionValuesFromProps:Zt,createRenderState:Nt,onMount:(t,e,{renderState:n,latestValues:o})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}zt(n,o,{enableHardwareAcceleration:!1},t.transformTemplate),Gt(e,n)}})},oe={useVisualState:te({scrapeMotionValuesFromProps:qt,createRenderState:Vt})};function re(t,{forwardMotionProps:e=!1},n,o,r){return{...j(t)?ne:oe,preloadedFeatures:n,useRender:Ht(e),createVisualElement:o,projectionNodeConstructor:r,Component:t}}var ie;function se(t,e,n,o={passive:!0}){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function ae(t,n,o,r){e.useEffect(()=>{const e=t.current;if(o&&e)return se(e,n,o,r)},[t,n,o,r])}function le(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function ue(t){return!!t.touches}t.AnimationType=void 0,(ie=t.AnimationType||(t.AnimationType={})).Animate="animate",ie.Hover="whileHover",ie.Tap="whileTap",ie.Drag="whileDrag",ie.Focus="whileFocus",ie.InView="whileInView",ie.Exit="exit";const ce={pageX:0,pageY:0};function de(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||ce;return{x:n[e+"X"],y:n[e+"Y"]}}function he(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function fe(t,e="page"){return{point:ue(t)?de(t,e):he(t,e)}}const me=(t,e=!1)=>{const n=e=>t(e,fe(e));return e?(o=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&o(t)}):n;var o},pe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},ge={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ye(t){return c&&null===window.onpointerdown?t:c&&null===window.ontouchstart?ge[t]:c&&null===window.onmousedown?pe[t]:t}function ve(t,e,n,o){return se(t,ye(e),me(n,"pointerdown"===e),o)}function xe(t,e,n,o){return ae(t,ye(e),n&&me(n,"pointerdown"===e),o)}function be(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const we=be("dragHorizontal"),Ee=be("dragVertical");function Se(t){let e=!1;if("y"===t)e=Ee();else if("x"===t)e=we();else{const t=we(),n=Ee();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ae(){const t=Se(!0);return!t||(t(),!1)}function Pe(e,n,o){return(r,i)=>{le(r)&&!Ae()&&(e.animationState&&e.animationState.setActive(t.AnimationType.Hover,n),o&&o(r,i))}}const Te=(t,e)=>!!e&&(t===e||Te(t,e.parentElement));function Ce(t){return e.useEffect(()=>()=>t(),[])}function Ve(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 r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}const Me=(t,e,n)=>Math.min(Math.max(n,t),e);function Re({duration:t=800,bounce:e=.25,velocity:n=0,mass:o=1}){let r,i,s=1-e;s=Me(.05,1,s),t=Me(.01,10,t/1e3),s<1?(r=e=>{const o=e*s,r=o*t;return.001-(o-n)/Le(e,s)*Math.exp(-r)},i=e=>{const o=e*s*t,i=o*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-o),u=Le(Math.pow(e,2),s);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let o=n;for(let n=1;n<12;n++)o-=t(o)/e(o);return o}(r,i,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*o;return{stiffness:e,damping:2*s*Math.sqrt(o*e),duration:t}}}function Le(t,e){return t*Math.sqrt(1-e*e)}const Oe=["duration","bounce"],ke=["stiffness","damping","mass"];function De(t,e){return e.some(e=>void 0!==t[e])}function je(t){var{from:e=0,to:n=1,restSpeed:o=2,restDelta:r}=t,i=Ve(t,["from","to","restSpeed","restDelta"]);const s={done:!1,value:e};let{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:h}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!De(t,ke)&&De(t,Oe)){const n=Re(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),f=Fe,m=Fe;function p(){const t=c?-c/1e3:0,o=n-e,i=l/(2*Math.sqrt(a*u)),s=Math.sqrt(a/u)/1e3;if(void 0===r&&(r=Math.min(Math.abs(n-e)/100,.4)),i<1){const e=Le(s,i);f=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))},m=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)f=e=>n-Math.exp(-s*e)*(o+(t+s*o)*e);else{const e=s*Math.sqrt(i*i-1);f=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 p(),{next:t=>{const e=f(t);if(h)s.done=t>=d;else{const i=1e3*m(t),a=Math.abs(i)<=o,l=Math.abs(n-e)<=r;s.done=a&&l}return s.value=s.done?n:e,s},flipTarget:()=>{c=-c,[e,n]=[n,e],p()}}}je.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Fe=t=>0,Ie=(t,e,n)=>{const o=e-t;return 0===o?1:(n-t)/o},Be=(t,e,n)=>-n*t+n*e+t;function Ue(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 ze({hue:t,saturation:e,lightness:n,alpha:o}){t/=360,n/=100;let r=0,i=0,s=0;if(e/=100){const o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;r=Ue(a,o,t+1/3),i=Ue(a,o,t),s=Ue(a,o,t-1/3)}else r=i=s=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*s),alpha:o}}const Ne=(t,e,n)=>{const o=t*t,r=e*e;return Math.sqrt(Math.max(0,n*(r-o)+o))},We=[mt,ft,ct],He=t=>We.find(e=>e.test(t)),$e=(t,e)=>{let n=He(t),o=He(e),r=n.parse(t),i=o.parse(e);n===ct&&(r=ze(r),n=ft),o===ct&&(i=ze(i),o=ft);const s=Object.assign({},r);return t=>{for(const e in s)"alpha"!==e&&(s[e]=Ne(r[e],i[e],t));return s.alpha=Be(r.alpha,i.alpha,t),n.transform(s)}},Ye=t=>"number"==typeof t,Xe=(t,e)=>n=>e(t(n)),Ge=(...t)=>t.reduce(Xe);function qe(t,e){return Ye(t)?n=>Be(t,e,n):pt.test(t)?$e(t,e):Je(t,e)}const Ze=(t,e)=>{const n=[...t],o=n.length,r=t.map((t,n)=>qe(t,e[n]));return t=>{for(let e=0;e<o;e++)n[e]=r[e](t);return n}},Ke=(t,e)=>{const n=Object.assign(Object.assign({},t),e),o={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(o[r]=qe(t[r],e[r]));return t=>{for(const e in o)n[e]=o[e](t);return n}};function _e(t){const e=bt.parse(t),n=e.length;let o=0,r=0,i=0;for(let t=0;t<n;t++)o||"number"==typeof e[t]?o++:void 0!==e[t].hue?i++:r++;return{parsed:e,numNumbers:o,numRGB:r,numHSL:i}}const Je=(t,e)=>{const n=bt.createTransformer(e),o=_e(t),r=_e(e);return o.numHSL===r.numHSL&&o.numRGB===r.numRGB&&o.numNumbers>=r.numNumbers?Ge(Ze(o.parsed,r.parsed),n):n=>""+(n>0?e:t)},Qe=(t,e)=>n=>Be(t,e,n);function tn(t,e,n){const o=[],r=n||("number"==typeof(i=t[0])?Qe:"string"==typeof i?pt.test(i)?$e:Je:Array.isArray(i)?Ze:"object"==typeof i?Ke:void 0);var i;const s=t.length-1;for(let n=0;n<s;n++){let i=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=Ge(t,i)}o.push(i)}return o}function en(t,e,{clamp:n=!0,ease:o,mixer:r}={}){const i=t.length;e.length,!o||!Array.isArray(o)||o.length,t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const s=tn(e,o,r),a=2===i?function([t,e],[n]){return o=>n(Ie(t,e,o))}(t,s):function(t,e){const n=t.length,o=n-1;return r=>{let i=0,s=!1;if(r<=t[0]?s=!0:r>=t[o]&&(i=o-1,s=!0),!s){let e=1;for(;e<n&&!(t[e]>r||e===o);e++);i=e-1}const a=Ie(t[i],t[i+1],r);return e[i](a)}}(t,s);return n?e=>a(Me(t[0],t[i-1],e)):a}const nn=t=>e=>1-t(1-e),on=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,rn=t=>e=>e*e*((t+1)*e-t),sn=t=>t,an=(ln=2,t=>Math.pow(t,ln));var ln;const un=nn(an),cn=on(an),dn=t=>1-Math.sin(Math.acos(t)),hn=nn(dn),fn=on(hn),mn=rn(1.525),pn=nn(mn),gn=on(mn),yn=(t=>{const e=rn(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),vn=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},xn=nn(vn);function bn(t,e){return t.map(()=>e||cn).splice(0,t.length-1)}function wn({from:t=0,to:e=1,ease:n,offset:o,duration:r=300}){const i={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),r);function l(){return en(a,s,{ease:Array.isArray(n)?n:bn(s,n)})}let u=l();return{next:t=>(i.value=u(t),i.done=t>=r,i),flipTarget:()=>{s.reverse(),u=l()}}}const En={keyframes:wn,spring:je,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:o=350,restDelta:r=.5,modifyTarget:i}){const s={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===i?l:i(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/o);return s.done=!(e>r||e<-r),s.value=s.done?u:u+e,s},flipTarget:()=>{}}}};const Sn="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),An="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Sn()),1/60*1e3);let Pn=!0,Tn=!1,Cn=!1;const Vn={delta:0,timestamp:0},Mn=["read","update","preRender","render","postRender"],Rn=Mn.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],o=0,r=!1,i=!1;const s=new WeakSet,a={schedule:(t,i=!1,a=!1)=>{const l=a&&r,u=l?e:n;return i&&s.add(t),-1===u.indexOf(t)&&(u.push(t),l&&r&&(o=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),s.delete(t)},process:l=>{if(r)i=!0;else{if(r=!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())}r=!1,i&&(i=!1,a.process(l))}}};return a}(()=>Tn=!0),t),{}),Ln=Mn.reduce((t,e)=>{const n=Rn[e];return t[e]=(t,e=!1,o=!1)=>(Tn||Fn(),n.schedule(t,e,o)),t},{}),On=Mn.reduce((t,e)=>(t[e]=Rn[e].cancel,t),{}),kn=Mn.reduce((t,e)=>(t[e]=()=>Rn[e].process(Vn),t),{}),Dn=t=>Rn[t].process(Vn),jn=t=>{Tn=!1,Vn.delta=Pn?1/60*1e3:Math.max(Math.min(t-Vn.timestamp,40),1),Vn.timestamp=t,Cn=!0,Mn.forEach(Dn),Cn=!1,Tn&&(Pn=!1,An(jn))},Fn=()=>{Tn=!0,Pn=!0,Cn||An(jn)},In=()=>Vn;function Bn(t,e,n=0){return t-e-n}const Un=t=>{const e=({delta:e})=>t(e);return{start:()=>Ln.update(e,!0),stop:()=>On.update(e)}};function zn(t){var e,n,{from:o,autoplay:r=!0,driver:i=Un,elapsed:s=0,repeat:a=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:d,onComplete:h,onRepeat:f,onUpdate:m}=t,p=Ve(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,y,v,{to:x}=p,b=0,w=p.duration,E=!1,S=!0;const A=function(t){if(Array.isArray(t.to))return wn;if(En[t.type])return En[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?wn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?je:wn}(p);(null===(n=(e=A).needsInterpolation)||void 0===n?void 0:n.call(e,o,x))&&(v=en([0,100],[o,x],{clamp:!1}),o=0,x=100);const P=A(Object.assign(Object.assign({},p),{from:o,to:x}));function T(){b++,"reverse"===l?(S=b%2==0,s=function(t,e,n=0,o=!0){return o?Bn(e+-t,e,n):e-(t-e)+n}(s,w,u,S)):(s=Bn(s,w,u),"mirror"===l&&P.flipTarget()),E=!1,f&&f()}function C(t){if(S||(t=-t),s+=t,!E){const t=P.next(Math.max(0,s));y=t.value,v&&(y=v(y)),E=S?t.done:s<=0}null==m||m(y),E&&(0===b&&(null!=w||(w=s)),b<a?function(t,e,n,o){return o?t>=e+n:t<=-n}(s,w,u,S)&&T():(g.stop(),h&&h()))}return r&&(null==c||c(),g=i(C),g.start()),{stop:()=>{null==d||d(),g.stop()}}}function Nn(t,e){return e?t*(1e3/e):0}const Wn=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),Hn=t=>Wn(t)&&t.hasOwnProperty("z"),$n=(t,e)=>Math.abs(t-e);function Yn(t,e){if(Ye(t)&&Ye(e))return $n(t,e);if(Wn(t)&&Wn(e)){const n=$n(t.x,e.x),o=$n(t.y,e.y),r=Hn(t)&&Hn(e)?$n(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(r,2))}}const Xn=(t,e)=>1-3*e+3*t,Gn=(t,e)=>3*e-6*t,qn=t=>3*t,Zn=(t,e,n)=>((Xn(e,n)*t+Gn(e,n))*t+qn(e))*t,Kn=(t,e,n)=>3*Xn(e,n)*t*t+2*Gn(e,n)*t+qn(e);function _n(t,e,n,o){if(t===e&&n===o)return sn;const r=new Float32Array(11);for(let e=0;e<11;++e)r[e]=Zn(.1*e,t,n);function i(e){let o=0,i=1;for(;10!==i&&r[i]<=e;++i)o+=.1;--i;const s=o+.1*((e-r[i])/(r[i+1]-r[i])),a=Kn(s,t,n);return a>=.001?function(t,e,n,o){for(let r=0;r<8;++r){const r=Kn(e,n,o);if(0===r)return e;e-=(Zn(e,n,o)-t)/r}return e}(e,s,t,n):0===a?s:function(t,e,n,o,r){let i,s,a=0;do{s=e+(n-e)/2,i=Zn(s,o,r)-t,i>0?n=s:e=s}while(Math.abs(i)>1e-7&&++a<10);return s}(e,o,o+.1,t,n)}return t=>0===t||1===t?t:Zn(i(t),e,o)}const Jn=("undefined"==typeof process||process.env,"production"),Qn=new Set;function to(t,e,n){t||Qn.has(e)||(console.warn(e),n&&console.warn(n),Qn.add(e))}const eo=new WeakMap,no=new WeakMap,oo=t=>{const e=eo.get(t.target);e&&e(t)},ro=t=>{t.forEach(oo)};function io(t,e,n){const o=function({root:t,...e}){const n=t||document;no.has(n)||no.set(n,{});const o=no.get(n),r=JSON.stringify(e);return o[r]||(o[r]=new IntersectionObserver(ro,{root:t,...e})),o[r]}(e);return eo.set(t,n),o.observe(t),()=>{eo.delete(t),o.unobserve(t)}}const so={some:0,all:1};function ao(n,o,r,{root:i,margin:s,amount:a="some",once:l}){e.useEffect(()=>{if(!n)return;const e={root:null==i?void 0:i.current,rootMargin:s,threshold:"number"==typeof a?a:so[a]};return io(r.getInstance(),e,e=>{const{isIntersecting:n}=e;if(o.isInView===n)return;if(o.isInView=n,l&&!n&&o.hasEnteredView)return;n&&(o.hasEnteredView=!0),r.animationState&&r.animationState.setActive(t.AnimationType.InView,n);const i=r.getProps(),s=n?i.onViewportEnter:i.onViewportLeave;s&&s(e)})},[n,i,s,a])}function lo(n,o,r,{fallback:i=!0}){e.useEffect(()=>{n&&i&&("production"!==Jn&&to(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{o.hasEnteredView=!0;const{onViewportEnter:e}=r.getProps();e&&e(null),r.animationState&&r.animationState.setActive(t.AnimationType.InView,!0)}))},[n])}const uo=t=>e=>(t(e),null),co={inView:uo((function({visualElement:t,whileInView:n,onViewportEnter:o,onViewportLeave:r,viewport:i={}}){const s=e.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(n||o||r);i.once&&s.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?lo:ao)(a,s.current,t,i)})),tap:uo((function({onTap:n,onTapStart:o,onTapCancel:r,whileTap:i,visualElement:s}){const a=n||o||r||i,l=e.useRef(!1),u=e.useRef(null),c={passive:!(o||n||r||p)};function d(){u.current&&u.current(),u.current=null}function h(){return d(),l.current=!1,s.animationState&&s.animationState.setActive(t.AnimationType.Tap,!1),!Ae()}function f(t,e){h()&&(Te(s.getInstance(),t.target)?n&&n(t,e):r&&r(t,e))}function m(t,e){h()&&r&&r(t,e)}function p(e,n){d(),l.current||(l.current=!0,u.current=Ge(ve(window,"pointerup",f,c),ve(window,"pointercancel",m,c)),s.animationState&&s.animationState.setActive(t.AnimationType.Tap,!0),o&&o(e,n))}xe(s,"pointerdown",a?p:void 0,c),Ce(d)})),focus:uo((function({whileFocus:e,visualElement:n}){const{animationState:o}=n;ae(n,"focus",e?()=>{o&&o.setActive(t.AnimationType.Focus,!0)}:void 0),ae(n,"blur",e?()=>{o&&o.setActive(t.AnimationType.Focus,!1)}:void 0)})),hover:uo((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:o}){xe(o,"pointerenter",t||n?Pe(o,!0,t):void 0,{passive:!t}),xe(o,"pointerleave",e||n?Pe(o,!1,e):void 0,{passive:!e})}))};function ho(){const t=e.useContext(u);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,i=e.useId();e.useEffect(()=>r(i),[]);return!n&&o?[!1,()=>o&&o(i)]:[!0]}function fo(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}const mo=t=>1e3*t,po={linear:sn,easeIn:an,easeInOut:cn,easeOut:un,circIn:dn,circInOut:fn,circOut:hn,backIn:mn,backInOut:gn,backOut:pn,anticipate:yn,bounceIn:xn,bounceInOut:t=>t<.5?.5*(1-vn(1-2*t)):.5*vn(2*t-1)+.5,bounceOut:vn},go=t=>{if(Array.isArray(t)){t.length;const[e,n,o,r]=t;return _n(e,n,o,r)}return"string"==typeof t?po[t]:t},yo=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!bt.test(e)||e.startsWith("url("))),vo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xo=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),bo=()=>({type:"keyframes",ease:"linear",duration:.3}),wo=t=>({type:"keyframes",duration:.8,values:t}),Eo={x:vo,y:vo,z:vo,rotate:vo,rotateX:vo,rotateY:vo,rotateZ:vo,scaleX:xo,scaleY:xo,scale:xo,opacity:bo,backgroundColor:bo,color:bo,default:xo},So=(t,e)=>{let n;return n=_t(e)?wo:Eo[t]||Eo.default,{to:e,...n(e)}},Ao={...Tt,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:At,WebkitFilter:At},Po=t=>Ao[t];function To(t,e){var n;let o=Po(t);return o!==At&&(o=bt),null===(n=o.getAnimatableNone)||void 0===n?void 0:n.call(o,e)}const Co={current:!1};function Vo({ease:t,times:e,yoyo:n,flip:o,loop:r,...i}){const s={...i};return e&&(s.offset=e),i.duration&&(s.duration=mo(i.duration)),i.repeatDelay&&(s.repeatDelay=mo(i.repeatDelay)),t&&(s.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(t)?t.map(go):go(t)),"tween"===i.type&&(s.type="keyframes"),(n||r||o)&&(n?s.repeatType="reverse":r?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=r||n||o||i.repeat),"spring"!==i.type&&(s.type="keyframes"),s}function Mo(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:r,repeat:i,repeatType:s,repeatDelay:a,from:l,...u}){return!!Object.keys(u).length}(t)||(t={...t,...So(n,e.to)}),{...e,...Vo(t)}}function Ro(t,e,n,o,r){const i=ko(o,t)||{};let s=void 0!==i.from?i.from:e.get();const a=yo(t,n);"none"===s&&a&&"string"==typeof n?s=To(t,n):Lo(s)&&"string"==typeof n?s=Oo(n):!Array.isArray(n)&&Lo(n)&&"string"==typeof s&&(n=Oo(s));return yo(t,s)&&a&&!1!==i.type?function(){const o={from:s,to:n,velocity:e.getVelocity(),onComplete:r,onUpdate:t=>e.set(t)};return"inertia"===i.type||"decay"===i.type?function({from:t=0,velocity:e=0,min:n,max:o,power:r=.8,timeConstant:i=750,bounceStiffness:s=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:d,onComplete:h,onStop:f}){let m;function p(t){return void 0!==n&&t<n||void 0!==o&&t>o}function g(t){return void 0===n?o:void 0===o||Math.abs(n-t)<Math.abs(o-t)?n:o}function y(t){null==m||m.stop(),m=zn(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:f}))}function v(t){y(Object.assign({type:"spring",stiffness:s,damping:a,restDelta:l},t))}if(p(t))v({from:t,velocity:e,to:g(t)});else{let o=r*e+t;void 0!==u&&(o=u(o));const s=g(o),a=s===n?-1:1;let c,d;const h=t=>{c=d,d=t,e=Nn(t-c,In().delta),(1===a&&t>s||-1===a&&t<s)&&v({from:t,to:s,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:i,power:r,restDelta:l,modifyTarget:u,onUpdate:p(o)?h:void 0})}return{stop:()=>null==m?void 0:m.stop()}}({...o,...i}):zn({...Mo(i,o,t),onUpdate:t=>{o.onUpdate(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{o.onComplete(),i.onComplete&&i.onComplete()}})}:function(){const t=Jt(n);return e.set(t),r(),i.onUpdate&&i.onUpdate(t),i.onComplete&&i.onComplete(),{stop:()=>{}}}}function Lo(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Oo(t){return"number"==typeof t?0:To("",t)}function ko(t,e){return t[e]||t.default||t}function Do(t,e,n,o={}){return Co.current&&(o={type:!1}),e.start(r=>{let i,s;const a=Ro(t,e,n,o,r),l=function(t,e){var n,o;return null!==(o=null!==(n=(ko(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==o?o:0}(o,t),u=()=>s=a();return l?i=window.setTimeout(u,mo(l)):u(),()=>{clearTimeout(i),s&&s.stop()}})}const jo=t=>/^0[^.\s]+$/.test(t);function Fo(t,e){-1===t.indexOf(e)&&t.push(e)}function Io(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Bo{constructor(){this.subscriptions=[]}add(t){return Fo(this.subscriptions,t),()=>Io(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 r=0;r<o;r++){const o=this.subscriptions[r];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Uo{constructor(t){var e;this.version="7.3.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Bo,this.velocityUpdateSubscribers=new Bo,this.renderSubscribers=new Bo,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:o}=In();this.lastUpdated!==o&&(this.timeDelta=n,this.lastUpdated=o,Ln.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=()=>Ln.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?Nn(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 zo(t){return new Uo(t)}const No=t=>e=>e.test(t),Wo=[J,rt,ot,nt,st,it,{test:t=>"auto"===t,parse:t=>t}],Ho=t=>Wo.find(No(t)),$o=[...Wo,pt,bt],Yo=t=>$o.find(No(t));function Xo(t,e,n){const o=t.getProps();return Kt(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 Go(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,zo(n))}function qo(t,e){const n=Xo(t,e);let{transitionEnd:o={},transition:r={},...i}=n?t.makeTargetAnimatable(n,!1):{};i={...i,...o};for(const e in i){Go(t,e,Jt(i[e]))}}function Zo(t,e){[...e].reverse().forEach(n=>{var o;const r=t.getVariant(n);r&&qo(t,r),null===(o=t.variantChildren)||void 0===o||o.forEach(t=>{Zo(t,e)})})}function Ko(t,e,n){var o,r;const i=Object.keys(e).filter(e=>!t.hasValue(e)),s=i.length;if(s)for(let a=0;a<s;a++){const s=i[a],l=e[s];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(r=null!==(o=n[s])&&void 0!==o?o:t.readValue(s))&&void 0!==r?r:e[s]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||jo(u))?u=parseFloat(u):!Yo(u)&&bt.test(l)&&(u=To(s,l)),t.addValue(s,zo(u)),void 0===n[s]&&(n[s]=u),t.setBaseTarget(s,u))}}function _o(t,e){if(!e)return;return(e[t]||e.default||e).from}function Jo(t,e,n){var o;const r={};for(const i in t){const t=_o(i,e);r[i]=void 0!==t?t:null===(o=n.getValue(i))||void 0===o?void 0:o.get()}return r}function Qo(t){return Boolean(N(t)&&t.add)}function tr(t,e,n={}){let o;if(t.notifyAnimationStart(e),Array.isArray(e)){const r=e.map(e=>er(t,e,n));o=Promise.all(r)}else if("string"==typeof e)o=er(t,e,n);else{const r="function"==typeof e?Xo(t,e,n.custom):e;o=nr(t,r,n)}return o.then(()=>t.notifyAnimationComplete(e))}function er(t,e,n={}){var o;const r=Xo(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>nr(t,r,n):()=>Promise.resolve(),a=(null===(o=t.variantChildren)||void 0===o?void 0:o.size)?(o=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=i;return function(t,e,n=0,o=0,r=1,i){const s=[],a=(t.variantChildren.size-1)*o,l=1===r?(t=0)=>t*o:(t=0)=>a-t*o;return Array.from(t.variantChildren).sort(or).forEach((t,o)=>{s.push(er(t,e,{...i,delay:n+l(o)}).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(s)}(t,e,r+o,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then(e)}return Promise.all([s(),a(n.delay)])}function nr(t,e,{delay:n=0,transitionOverride:o,type:r}={}){var i;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");o&&(s=o);const c=[],d=r&&(null===(i=t.animationState)||void 0===i?void 0:i.getState()[r]);for(const e in l){const o=t.getValue(e),r=l[e];if(!o||void 0===r||d&&rr(d,e))continue;let i={delay:n,...s};t.shouldReduceMotion&&U.has(e)&&(i={...i,type:!1,delay:0});let a=Do(e,o,r,i);Qo(u)&&(u.add(e),a=a.then(()=>u.remove(e))),c.push(a)}return Promise.all(c).then(()=>{a&&qo(t,a)})}function or(t,e){return t.sortNodePosition(e)}function rr({protectedKeys:t,needsAnimating:e},n){const o=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,o}const ir=[t.AnimationType.Animate,t.AnimationType.InView,t.AnimationType.Focus,t.AnimationType.Hover,t.AnimationType.Tap,t.AnimationType.Drag,t.AnimationType.Exit],sr=[...ir].reverse(),ar=ir.length;function lr(e){let n=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>tr(t,e,n)))}(e);const o={[t.AnimationType.Animate]:cr(!0),[t.AnimationType.InView]:cr(),[t.AnimationType.Hover]:cr(),[t.AnimationType.Tap]:cr(),[t.AnimationType.Drag]:cr(),[t.AnimationType.Focus]:cr(),[t.AnimationType.Exit]:cr()};let r=!0;const i=(t,n)=>{const o=Xo(e,n);if(o){const{transition:e,transitionEnd:n,...r}=o;t={...t,...r,...n}}return t};function s(t,s){var a;const l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],d=new Set;let h={},f=1/0;for(let n=0;n<ar;n++){const g=sr[n],y=o[g],v=null!==(a=l[g])&&void 0!==a?a:u[g],x=m(v),b=g===s?y.isActive:null;!1===b&&(f=n);let w=v===u[g]&&v!==l[g]&&x;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),y.protectedKeys={...h},!y.isActive&&null===b||!v&&!y.prevProp||p(v)||"boolean"==typeof v)continue;const E=ur(y.prevProp,v);let S=E||g===s&&y.isActive&&!w&&x||n>f&&x;const A=Array.isArray(v)?v:[v];let P=A.reduce(i,{});!1===b&&(P={});const{prevResolvedValues:T={}}=y,C={...T,...P},V=t=>{S=!0,d.delete(t),y.needsAnimating[t]=!0};for(const t in C){const e=P[t],n=T[t];h.hasOwnProperty(t)||(e!==n?_t(e)&&_t(n)?!fo(e,n)||E?V(t):y.protectedKeys[t]=!0:void 0!==e?V(t):d.add(t):void 0!==e&&d.has(t)?V(t):y.protectedKeys[t]=!0)}y.prevProp=v,y.prevResolvedValues=P,y.isActive&&(h={...h,...P}),r&&e.blockInitialAnimation&&(S=!1),S&&!w&&c.push(...A.map(e=>({animation:e,options:{type:g,...t}})))}if(d.size){const t={};d.forEach(n=>{const o=e.getBaseTarget(n);void 0!==o&&(t[n]=o)}),c.push({animation:t})}let g=Boolean(c.length);return r&&!1===l.initial&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?n(c):Promise.resolve()}return{animateChanges:s,setActive:function(t,n,r){var i;if(o[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var o;return null===(o=e.animationState)||void 0===o?void 0:o.setActive(t,n)}),o[t].isActive=n;const a=s(r,t);for(const t in o)o[t].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:()=>o}}function ur(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!fo(e,t)}function cr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const dr={animation:uo(({visualElement:t,animate:n})=>{t.animationState||(t.animationState=lr(t)),p(n)&&e.useEffect(()=>n.subscribe(t),[n])}),exit:uo(n=>{const{custom:o,visualElement:r}=n,[i,s]=ho(),a=e.useContext(u);e.useEffect(()=>{r.isPresent=i;const e=r.animationState&&r.animationState.setActive(t.AnimationType.Exit,!i,{custom:a&&a.custom||o});e&&!i&&e.then(s)},[i])})};class hr{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=pr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Yn(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:o}=t,{timestamp:r}=In();this.history.push({...o,timestamp:r});const{onStart:i,onMove:s}=this.handlers;e||(i&&i(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=fr(e,this.transformPagePoint),le(t)&&0===t.buttons?this.handlePointerUp(t,e):Ln.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:o}=this.handlers,r=pr(fr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,r),o&&o(t,r)},ue(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const o=fr(fe(t),this.transformPagePoint),{point:r}=o,{timestamp:i}=In();this.history=[{...r,timestamp:i}];const{onSessionStart:s}=e;s&&s(t,pr(o,this.history)),this.removeListeners=Ge(ve(window,"pointermove",this.handlePointerMove),ve(window,"pointerup",this.handlePointerUp),ve(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),On.update(this.updatePoint)}}function fr(t,e){return e?{point:e(t.point)}:t}function mr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pr({point:t},e){return{point:t,delta:mr(t,yr(e)),offset:mr(t,gr(e)),velocity:vr(e,.1)}}function gr(t){return t[0]}function yr(t){return t[t.length-1]}function vr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,o=null;const r=yr(t);for(;n>=0&&(o=t[n],!(r.timestamp-o.timestamp>mo(e)));)n--;if(!o)return{x:0,y:0};const i=(r.timestamp-o.timestamp)/1e3;if(0===i)return{x:0,y:0};const s={x:(r.x-o.x)/i,y:(r.y-o.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function xr(t){return t.max-t.min}function br(t,e=0,n=.01){return Yn(t,e)<n}function wr(t,e,n,o=.5){t.origin=o,t.originPoint=Be(e.min,e.max,t.origin),t.scale=xr(n)/xr(e),(br(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Be(n.min,n.max,t.origin)-t.originPoint,(br(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Er(t,e,n,o){wr(t.x,e.x,n.x,null==o?void 0:o.originX),wr(t.y,e.y,n.y,null==o?void 0:o.originY)}function Sr(t,e,n){t.min=n.min+e.min,t.max=t.min+xr(e)}function Ar(t,e,n){t.min=e.min-n.min,t.max=t.min+xr(e)}function Pr(t,e,n){Ar(t.x,e.x,n.x),Ar(t.y,e.y,n.y)}function Tr(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 Cr(t,e){let n=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,o]=[o,n]),{min:n,max:o}}const Vr=.35;function Mr(t,e,n){return{min:Rr(t,e),max:Rr(t,n)}}function Rr(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}const Lr=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Or(t){return[t("x"),t("y")]}function kr({top:t,left:e,right:n,bottom:o}){return{x:{min:e,max:n},y:{min:t,max:o}}}function Dr(t){return void 0===t||1===t}function jr({scale:t,scaleX:e,scaleY:n}){return!Dr(t)||!Dr(e)||!Dr(n)}function Fr(t){return jr(t)||Ir(t.x)||Ir(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function Ir(t){return t&&"0%"!==t}function Br(t,e,n){return n+e*(t-n)}function Ur(t,e,n,o,r){return void 0!==r&&(t=Br(t,r,o)),Br(t,n,o)+e}function zr(t,e=0,n=1,o,r){t.min=Ur(t.min,e,n,o,r),t.max=Ur(t.max,e,n,o,r)}function Nr(t,{x:e,y:n}){zr(t.x,e.translate,e.scale,e.originPoint),zr(t.y,n.translate,n.scale,n.originPoint)}function Wr(t,e){t.min=t.min+e,t.max=t.max+e}function Hr(t,e,[n,o,r]){const i=void 0!==e[r]?e[r]:.5,s=Be(t.min,t.max,i);zr(t,e[n],e[o],s,e.scale)}const $r=["x","scaleX","originX"],Yr=["y","scaleY","originY"];function Xr(t,e){Hr(t.x,e,$r),Hr(t.y,e,Yr)}function Gr(t,e){return kr(function(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}}(t.getBoundingClientRect(),e))}const qr=new WeakMap;class Zr{constructor(t){this.openGlobalLock=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.visualElement=t}start(e,{snapToCursor:n=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new hr(e,{onSessionStart:t=>{this.stopAnimation(),n&&this.snapToCursor(fe(t,"page").point)},onStart:(e,n)=>{var o;const{drag:r,dragPropagation:i,onDragStart:s}=this.getProps();(!r||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Se(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Or(t=>{var e,n;let o=this.getAxisMotionValue(t).get()||0;if(ot.test(o)){const r=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.actual[t];if(r){o=xr(r)*(parseFloat(o)/100)}}this.originPoint[t]=o}),null==s||s(e,n),null===(o=this.visualElement.animationState)||void 0===o||o.setActive(t.AnimationType.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:o,onDirectionLock:r,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(o&&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}(s),void(null!==this.currentDirection&&(null==r||r(this.currentDirection)));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.syncRender(),null==i||i(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:o}=e;this.startAnimation(o);const{onDragEnd:r}=this.getProps();null==r||r(t,e)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(t.AnimationType.Drag,!1)}updateAxis(t,e,n){const{drag:o}=this.getProps();if(!n||!Kr(t,o,this.currentDirection))return;const r=this.getAxisMotionValue(t);let i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=function(t,{min:e,max:n},o){return void 0!==e&&t<e?t=o?Be(e,t,o.min):Math.max(t,