framer-motion 9.1.2 → 9.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({});function c(){return e.useContext(a).visualElement}const u=e.createContext(null),l="undefined"!=typeof document,h=l?e.useLayoutEffect:e.useEffect,d=e.createContext({strict:!1});function p(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function f(t){return"object"==typeof t&&"function"==typeof t.start}const g=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function y(t){return f(t.animate)||g.some(e=>m(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:s}=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:s}),[P(n),P(s)])}function P(t){return Array.isArray(t)?t.join(" "):t}const w={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},E={};for(const t in w)E[t]={isEnabled:e=>w[t].some(t=>!!e[t])};function b(t){for(const e in t)E[e]={...E[e],...t[e]}}function T(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const S={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let C=1;const A=e.createContext({}),V=e.createContext({}),M=Symbol.for("motionComponentSymbol");function L({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:m}){t&&b(t);const f=e.forwardRef((function(f,g){let y;const v={...e.useContext(r),...f,layoutId:R(f)},{isStatic:P}=v,w=x(f),E=P?void 0:T(()=>{if(S.hasEverUpdated)return C++}),b=o(f,P);if(!P&&l){w.visualElement=function(t,n,s,i){const o=c(),a=e.useContext(d),l=e.useContext(u),p=e.useContext(r).reducedMotion,m=e.useRef();i=i||a.renderer,!m.current&&i&&(m.current=i(t,{visualState:n,parent:o,props:s,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(s,l)}),h(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?h:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(m,b,v,n);const s=e.useContext(V),i=e.useContext(d).strict;w.visualElement&&(y=w.visualElement.loadFeatures(v,i,t,E,s))}return i.createElement(a.Provider,{value:w},y&&w.visualElement?i.createElement(y,{visualElement:w.visualElement,...v}):null,s(m,f,E,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):p(s)&&(s.current=e))},[n])}(b,w.visualElement,g),b,P,w.visualElement))}));return f[M]=m,f}function R({layoutId:t}){const n=e.useContext(A).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,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const D=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function B(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 O=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],j=new Set(O);function U(t,{layout:e,layoutId:n}){return j.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!F[t]||"opacity"===t)}const N=t=>Boolean(t&&t.getVelocity),z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W=O.length;function H(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<W;e++){const n=O[e];if(void 0!==t[n]){o+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const $=t=>e=>"string"==typeof e&&e.startsWith(t),Y=$("--"),X=$("var(--"),G=(t,e)=>e&&"number"==typeof t?e.transform(t):t,q=(t,e,n)=>Math.min(Math.max(n,t),e),Z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...Z,transform:t=>q(0,1,t)},K={...Z,default:1},J=t=>Math.round(1e5*t)/1e5,Q=/(-)?([\d]*\.?[\d])+/g,tt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,et=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nt(t){return"string"==typeof t}const st=t=>({test:e=>nt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=st("deg"),ot=st("%"),rt=st("px"),at=st("vh"),ct=st("vw"),ut={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},lt={...Z,transform:Math.round},ht={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:it,rotateX:it,rotateY:it,rotateZ:it,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:it,skewX:it,skewY:it,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:ut,originY:ut,originZ:rt,zIndex:lt,fillOpacity:_,strokeOpacity:_,numOctaves:lt};function dt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const t in e){const n=e[t];if(Y(t)){o[t]=n;continue}const s=ht[t],h=G(n,s);if(j.has(t)){if(c=!0,r[t]=h,!l)continue;n!==(s.default||0)&&(l=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):i[t]=h}if(e.transform||(c||s?i.transform=H(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mt(t,e,n){for(const s in e)N(e[s])||U(s,n)||(t[s]=e[s])}function ft(t,n,s){const i={};return mt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return dt(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),t.transformValues?t.transformValues(i):i}function gt(t,e,n){const s={},i=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const yt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function vt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||yt.has(t)}let xt=t=>!vt(t);function Pt(t){t&&(xt=e=>e.startsWith("on")?!vt(e):t(e))}try{Pt(require("@emotion/is-prop-valid").default)}catch(t){}function wt(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(xt(i)||!0===n&&vt(i)||!e&&!vt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Et(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const bt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tt={offset:"strokeDashoffset",array:"strokeDasharray"};function St(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:o,pathSpacing:r=1,pathOffset:a=0,...c},u,l,h){if(dt(t,c,u,h),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Et(e,t.x,t.width)} ${Et(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==o&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?bt:Tt;t[o.offset]=rt.transform(-s);const r=rt.transform(e),a=rt.transform(n);t[o.array]=`${r} ${a}`}(d,o,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return St(e,n,{enableHardwareAcceleration:!1},At(i),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 Mt(t=!1){return(n,s,i,o,{latestValues:r},a)=>{const c=(B(n)?Vt:gt)(s,r,a,n),u={...wt(s,"string"==typeof n,t),...c,ref:o},{children:l}=s,h=e.useMemo(()=>N(l)?l.get():l,[l]);return i&&(u["data-projection-id"]=i),e.createElement(n,{...u,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Rt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const kt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dt(t,e,n,s){Rt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(kt.has(n)?n:Lt(n),e.attrs[n])}function Bt(t,e){const{style:n}=t,s={};for(const i in n)(N(n[i])||e.style&&N(e.style[i])||U(i,t))&&(s[i]=n[i]);return s}function Ft(t,e){const n=Bt(t,e);for(const s in t)if(N(t[s])||N(e[s])){n["x"===s||"y"===s?"attr"+s.toUpperCase():s]=t[s]}return n}function It(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}const Ot=t=>Array.isArray(t);function jt(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 Ut=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(u),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Nt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():T(r)};function Nt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=jt(o[t]);let{initial:r,animate:a}=t;const c=y(t),u=v(t);e&&u&&!c&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let l=!!n&&!1===n.initial;l=l||!1===r;const h=l?a:r;if(h&&"boolean"!=typeof h&&!f(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=It(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[l?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const zt={useVisualState:Ut({scrapeMotionValuesFromProps:Ft,createRenderState:Ct,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}St(n,s,{enableHardwareAcceleration:!1},At(e.tagName),t.transformTemplate),Dt(e,n)}})},Wt={useVisualState:Ut({scrapeMotionValuesFromProps:Bt,createRenderState:pt})};function Ht(t,{forwardMotionProps:e=!1},n,s){return{...B(t)?zt:Wt,preloadedFeatures:n,useRender:Mt(e),createVisualElement:s,Component:t}}function $t(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Yt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Xt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Gt=t=>e=>Yt(e)&&t(e,Xt(e));function qt(t,e,n,s){return $t(t,e,Gt(n),s)}const Zt=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce(Zt);function Kt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Jt=Kt("dragHorizontal"),Qt=Kt("dragVertical");function te(t){let e=!1;if("y"===t)e=Qt();else if("x"===t)e=Jt();else{const t=Jt(),n=Qt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ee(){const t=te(!0);return!t||(t(),!1)}class ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}function se(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return qt(t.current,n,(n,i)=>{if("touch"===n.type||ee())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&o[s](n,i)},{passive:!t.getProps()[s]})}const ie=(t,e)=>!!e&&(t===e||ie(t,e.parentElement)),oe=t=>t;function re(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const ae=new WeakMap,ce=new WeakMap,ue=t=>{const e=ae.get(t.target);e&&e(t)},le=t=>{t.forEach(ue)};function he(t,e,n){const s=function({root:t,...e}){const n=t||document;ce.has(n)||ce.set(n,{});const s=ce.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(le,{root:t,...e})),s[i]}(e);return ae.set(t,n),s.observe(t),()=>{ae.delete(t),s.unobserve(t)}}const de={some:0,all:1};const pe={inView:{Feature:class extends ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i,fallback:o=!0}=t;if("undefined"==typeof IntersectionObserver)return void(o&&this.viewportFallback());const r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:de[s]};return he(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ne{constructor(){super(...arguments),this.removeStartListeners=oe,this.removeEndListeners=oe,this.removeAccessibleListeners=oe,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),s=qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s}=this.node.getProps();ie(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),i=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=$t(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=$t(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&re("up",this.node.getProps().onTap)}),re("down",(t,e)=>{this.startPress(t,e)})}),e=$t(this.node.current,"blur",()=>{this.isPressing&&re("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=_t(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ee()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=$t(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ne{mount(){this.unmount=_t(se(this.node,!0),se(this.node,!1))}unmount(){}}}};function me(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const fe=t=>/^0[^.\s]+$/.test(t),ge={delta:0,timestamp:0},ye="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),ve="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(ye()),1/60*1e3);let xe=!0,Pe=!1,we=!1;const Ee=["read","update","preRender","render","postRender"],be=Ee.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const c=a&&i,u=c?e:n;return o&&r.add(t),-1===u.indexOf(t)&&(u.push(t),c&&i&&(s=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:c=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let n=0;n<s;n++){const s=e[n];s(c),r.has(s)&&(a.schedule(s),t())}i=!1,o&&(o=!1,a.process(c))}}};return a}(()=>Pe=!0),t),{}),Te=Ee.reduce((t,e)=>{const n=be[e];return t[e]=(t,e=!1,s=!1)=>(Pe||Me(),n.schedule(t,e,s)),t},{}),Se=Ee.reduce((t,e)=>(t[e]=be[e].cancel,t),{}),Ce=Ee.reduce((t,e)=>(t[e]=()=>be[e].process(ge),t),{}),Ae=t=>be[t].process(ge),Ve=t=>{Pe=!1,ge.delta=xe?1/60*1e3:Math.max(Math.min(t-ge.timestamp,40),1),ge.timestamp=t,we=!0,Ee.forEach(Ae),we=!1,Pe&&(xe=!1,ve(Ve))},Me=()=>{Pe=!0,xe=!0,we||ve(Ve)};function Le(t,e){-1===t.indexOf(e)&&t.push(e)}function Re(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ke{constructor(){this.subscriptions=[]}add(t){return Le(this.subscriptions,t),()=>Re(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function De(t,e){return e?t*(1e3/e):0}class Be{constructor(t,e={}){var n;this.version="9.1.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:s}=ge;this.lastUpdated!==s&&(this.timeDelta=n,this.lastUpdated=s,Te.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Te.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new ke);const n=this.events[t].add(e);return"change"===t?()=>{n(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?De(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fe(t,e){return new Be(t,e)}const Ie=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Oe=(t,e,n)=>s=>{if(!nt(s))return s;const[i,o,r,a]=s.match(Q);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},je={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Ue={test:Ie("rgb","red"),parse:Oe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+je.transform(t)+", "+je.transform(e)+", "+je.transform(n)+", "+J(_.transform(s))+")"};const Ne={test:Ie("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:Ue.transform},ze={test:Ie("hsl","hue"),parse:Oe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(J(e))+", "+ot.transform(J(n))+", "+J(_.transform(s))+")"},We={test:t=>Ue.test(t)||Ne.test(t)||ze.test(t),parse:t=>Ue.test(t)?Ue.parse(t):ze.test(t)?ze.parse(t):Ne.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Ue.transform(t):ze.transform(t)};function He(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,s=0;const i=t.match(tt);i&&(n=i.length,t=t.replace(tt,"${c}"),e.push(...i.map(We.parse)));const o=t.match(Q);return o&&(s=o.length,t=t.replace(Q,"${n}"),e.push(...o.map(Z.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function $e(t){return He(t).values}function Ye(t){const{values:e,numColors:n,tokenised:s}=He(t),i=e.length;return t=>{let e=s;for(let s=0;s<i;s++)e=e.replace(s<n?"${c}":"${n}",s<n?We.transform(t[s]):J(t[s]));return e}}const Xe=t=>"number"==typeof t?0:t;const Ge={test:function(t){var e,n;return isNaN(t)&&nt(t)&&((null===(e=t.match(Q))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(tt))||void 0===n?void 0:n.length)||0)>0},parse:$e,createTransformer:Ye,getAnimatableNone:function(t){const e=$e(t);return Ye(t)(e.map(Xe))}},qe=new Set(["brightness","contrast","saturate","opacity"]);function Ze(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Q)||[];if(!s)return t;const i=n.replace(s,"");let o=qe.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const _e=/([a-z-]*)\(.*?\)/g,Ke={...Ge,getAnimatableNone:t=>{const e=t.match(_e);return e?e.map(Ze).join(" "):t}},Je={...ht,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:Ke,WebkitFilter:Ke},Qe=t=>Je[t];function tn(t,e){let n=Qe(t);return n!==Ke&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const en=t=>e=>e.test(t),nn=[Z,rt,ot,it,ct,at,{test:t=>"auto"===t,parse:t=>t}],sn=t=>nn.find(en(t)),on=[...nn,We,Ge],rn=t=>on.find(en(t));function an(t,e,n){const s=t.getProps();return It(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function cn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Fe(n))}function un(t,e){const n=an(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o){cn(t,e,(r=o[e],Ot(r)?r[r.length-1]||0:r))}var r}function ln(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&un(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{ln(t,e)})})}function hn(t,e,n){var s,i;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;if(r)for(let a=0;a<r;a++){const r=o[a],c=e[r];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||fe(u))?u=parseFloat(u):!rn(u)&&Ge.test(c)&&(u=tn(r,c)),t.addValue(r,Fe(u,{owner:t})),void 0===n[r]&&(n[r]=u),null!==u&&t.setBaseTarget(r,u))}}function dn(t,e){if(!e)return;return(e[t]||e.default||e).from}function pn(t,e,n){const s={};for(const i in t){const t=dn(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}function mn(t){return Boolean(N(t)&&t.add)}const fn="data-"+Lt("framerAppearId");let gn=oe,yn=oe;const vn=t=>1e3*t,xn={current:!1},Pn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,wn=t=>e=>1-t(1-e),En=t=>t*t,bn=wn(En),Tn=Pn(En),Sn=(t,e,n)=>-n*t+n*e+t;function Cn(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}const An=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},Vn=[Ne,Ue,ze];function Mn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;yn(Boolean(e));let s=e.parse(t);return e===ze&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Cn(a,s,t+1/3),o=Cn(a,s,t),r=Cn(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const Ln=(t,e)=>{const n=Mn(t),s=Mn(e),i={...n};return t=>(i.red=An(n.red,s.red,t),i.green=An(n.green,s.green,t),i.blue=An(n.blue,s.blue,t),i.alpha=Sn(n.alpha,s.alpha,t),Ue.transform(i))};function Rn(t,e){return"number"==typeof t?n=>Sn(t,e,n):We.test(t)?Ln(t,e):Bn(t,e)}const kn=(t,e)=>{const n=[...t],s=n.length,i=t.map((t,n)=>Rn(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}},Dn=(t,e)=>{const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Rn(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}},Bn=(t,e)=>{const n=Ge.createTransformer(e),s=He(t),i=He(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?_t(kn(s.values,i.values),n):(gn(!0),n=>""+(n>0?e:t))},Fn=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},In=(t,e)=>n=>Sn(t,e,n);function On(t,e,n){const s=[],i=n||("number"==typeof(o=t[0])?In:"string"==typeof o?We.test(o)?Ln:Bn:Array.isArray(o)?kn:"object"==typeof o?Dn:In);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=_t(t,o)}s.push(o)}return s}function jn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;yn(o===e.length),yn(!s||!Array.isArray(s)||s.length===o-1),t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=On(e,s,i),a=r.length,c=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Fn(t[n],t[n+1],e);return r[n](s)};return n?e=>c(q(t[0],t[o-1],e)):c}function Un(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Fn(0,e,s);t.push(Sn(n,1,i))}}(e,t.length-1),e}const Nn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zn(t,e,n,s){if(t===e&&n===s)return oe;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=Nn(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nn(i(t),e,s)}const Wn=t=>1-Math.sin(Math.acos(t)),Hn=wn(Wn),$n=Pn(Hn),Yn=zn(.33,1.53,.69,.99),Xn=wn(Yn),Gn=Pn(Xn),qn=t=>(t*=2)<1?.5*Xn(t):.5*(2-Math.pow(2,-10*(t-1))),Zn={linear:oe,easeIn:En,easeInOut:Tn,easeOut:bn,circIn:Wn,circInOut:$n,circOut:Hn,backIn:Xn,backInOut:Gn,backOut:Yn,anticipate:qn},_n=t=>{if(Array.isArray(t)){yn(4===t.length);const[e,n,s,i]=t;return zn(e,n,s,i)}return"string"==typeof t?(yn(void 0!==Zn[t]),Zn[t]):t};function Kn({keyframes:t,ease:e=Tn,times:n,duration:s=300}){t=[...t];const i=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(_n):_n(e),o={done:!1,value:t[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:Un(t),s);function a(){return jn(r,t,{ease:Array.isArray(i)?i:(e=t,n=i,e.map(()=>n||Tn).splice(0,e.length-1))});var e,n}let c=a();return{next:t=>(o.value=c(t),o.done=t>=s,o),flipTarget:()=>{t.reverse(),c=a()}}}function Jn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;gn(t<=1e4);let r=1-e;r=q(.05,1,r),t=q(.01,10,t/1e3),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/Qn(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,c=Math.exp(-s),u=Qn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*c)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function Qn(t,e){return t*Math.sqrt(1-e*e)}const ts=["duration","bounce"],es=["stiffness","damping","mass"];function ns(t,e){return e.some(e=>void 0!==t[e])}function ss({keyframes:t,restDelta:e,restSpeed:n,...s}){let i=t[0],o=t[t.length-1];const r={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:l,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ns(t,es)&&ns(t,ts)){const n=Jn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(s);let p=is,m=l?-l/1e3:0;const f=c/(2*Math.sqrt(a*u));function g(){const t=o-i,s=Math.sqrt(a/u)/1e3,r=Math.abs(t)<5;if(n||(n=r?.01:2),e||(e=r?.005:.5),f<1){const e=Qn(s,f);p=n=>{const i=Math.exp(-f*s*n);return o-i*((m+f*s*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===f)p=e=>o-Math.exp(-s*e)*(t+(m+s*t)*e);else{const e=s*Math.sqrt(f*f-1);p=n=>{const i=Math.exp(-f*s*n),r=Math.min(e*n,300);return o-i*((m+f*s*t)*Math.sinh(r)+e*t*Math.cosh(r))/e}}}return g(),{next:t=>{const s=p(t);if(d)r.done=t>=h;else{let i=m;if(0!==t)if(f<1){const e=Math.max(0,t-5);i=De(s-p(e),t-e)}else i=0;const a=Math.abs(i)<=n,c=Math.abs(o-s)<=e;r.done=a&&c}return r.value=r.done?o:s,r},flipTarget:()=>{m=-m,[i,o]=[o,i],g()}}}ss.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const is=t=>0;const os={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:s=350,restDelta:i=.5,modifyTarget:o}){const r=t[0],a={done:!1,value:r};let c=n*e;const u=r+c,l=void 0===o?u:o(u);return l!==u&&(c=l-r),{next:t=>{const e=-c*Math.exp(-t/s);return a.done=!(e>i||e<-i),a.value=a.done?l:l+e,a},flipTarget:()=>{}}},keyframes:Kn,tween:Kn,spring:ss};function rs(t,e,n=0){return t-e-n}const as=t=>{const e=({delta:e})=>t(e);return{start:()=>Te.update(e,!0),stop:()=>Se.update(e)}};function cs({duration:t,driver:e=as,elapsed:n=0,repeat:s=0,repeatType:i="loop",repeatDelay:o=0,keyframes:r,autoplay:a=!0,onPlay:c,onStop:u,onComplete:l,onRepeat:h,onUpdate:d,type:p="keyframes",...m}){const f=n;let g,y,v=0,x=t,P=!1,w=!0;const E=os[r.length>2?"keyframes":p]||Kn,b=r[0],T=r[r.length-1];let S={done:!1,value:b};const{needsInterpolation:C}=E;C&&C(b,T)&&(y=jn([0,100],[b,T],{clamp:!1}),r=[0,100]);const A=E({...m,duration:t,keyframes:r});function V(){v++,"reverse"===i?(w=v%2==0,n=function(t,e=0,n=0,s=!0){return s?rs(e+-t,e,n):e-(t-e)+n}(n,x,o,w)):(n=rs(n,x,o),"mirror"===i&&A.flipTarget()),P=!1,h&&h()}function M(t){w||(t=-t),n+=t,P||(S=A.next(Math.max(0,n)),y&&(S.value=y(S.value)),P=w?S.done:n<=0),d&&d(S.value),P&&(0===v&&(x=void 0!==x?x:n),v<s?function(t,e,n,s){return s?t>=e+n:t<=-n}(n,x,o,w)&&V():(g&&g.stop(),l&&l()))}return a&&(c&&c(),g=e(M),g.start()),{stop:()=>{u&&u(),g&&g.stop()},set currentTime(t){n=f,M(t)},sample:e=>{n=f;const s=t&&"number"==typeof t?Math.max(.5*t,50):50;let i=0;for(M(0);i<=e;){const t=e-i;M(Math.min(t,s)),i+=s}return S}}}const us=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:us([0,.65,.55,1]),circOut:us([.55,0,1,.45]),backIn:us([.31,.01,.66,-.59]),backOut:us([.33,1.53,.69,.99])};function hs(t){if(t)return Array.isArray(t)?us(t):ls[t]}function ds(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){return t.animate({[e]:n,offset:c},{delay:s,duration:i,easing:hs(a),fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const ps={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},ms={},fs={};for(const t in ps)fs[t]=()=>(void 0===ms[t]&&(ms[t]=ps[t]()),ms[t]);const gs=new Set(["opacity","clipPath","filter","transform"]);function ys(t,e,{onUpdate:n,onComplete:s,...i}){if(!(fs.waapi()&&gs.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping))return!1;let{keyframes:o,duration:r=300,elapsed:a=0,ease:c}=i;if("spring"===i.type||!(!(u=i.ease)||Array.isArray(u)||"string"==typeof u&&ls[u])){if(i.repeat===1/0)return;const t=cs({...i,elapsed:0});let e={done:!1,value:o[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;o=n,r=s-10,c="linear"}var u;const l=ds(t.owner.current,e,o,{...i,delay:-a,duration:r,ease:c});return l.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(o,i)),Te.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(t){l.currentTime=t},stop:()=>{const{currentTime:e}=l;if(e){const n=cs({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Te.update(()=>l.cancel())}}}function vs(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Se.read(s),t(o-e))};return Te.read(s,!0),()=>Se.read(s)}function xs({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const i=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:vs(i,-e)}:i()}function Ps({keyframes:t,velocity:e=0,min:n,max:s,power:i=.8,timeConstant:o=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:u,driver:l,onUpdate:h,onComplete:d,onStop:p}){const m=t[0];let f;function g(t){return void 0!==n&&t<n||void 0!==s&&t>s}function y(t){return void 0===n?s:void 0===s||Math.abs(n-t)<Math.abs(s-t)?n:s}function v(t){f&&f.stop(),f=cs({keyframes:[0,1],velocity:0,...t,driver:l,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:d,onStop:p})}function x(t){v({type:"spring",stiffness:r,damping:a,restDelta:c,...t})}if(g(m))x({velocity:e,keyframes:[m,y(m)]});else{let t=i*e+m;void 0!==u&&(t=u(t));const s=y(t),r=s===n?-1:1;let a,l;const h=t=>{a=l,l=t,e=De(t-a,ge.delta),(1===r&&t>s||-1===r&&t<s)&&x({keyframes:[t,s],velocity:e})};v({type:"decay",keyframes:[m,0],velocity:e,timeConstant:o,power:i,restDelta:c,modifyTarget:u,onUpdate:g(t)?h:void 0})}return{stop:()=>f&&f.stop()}}const ws={type:"spring",stiffness:500,damping:25,restSpeed:10},Es={type:"keyframes",duration:.8},bs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ts=(t,{keyframes:e})=>e.length>2?Es:j.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ws:bs,Ss=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ge.test(e)||e.startsWith("url(")));function Cs(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function As(t){return"number"==typeof t?0:tn("",t)}function Vs(t,e){return t[e]||t.default||t}const Ms=(t,e,n,s={})=>i=>{const o=Vs(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=vn(r);const c=function(t,e,n,s){const i=Ss(e,n);let o=void 0!==s.from?s.from:t.get();return"none"===o&&i&&"string"==typeof n?o=tn(e,n):Cs(o)&&"string"==typeof n?o=As(n):!Array.isArray(n)&&Cs(n)&&"string"==typeof o&&(n=As(o)),Array.isArray(n)?(null===n[0]&&(n[0]=o),n):[o,n]}(e,t,n,o),u=c[0],l=c[c.length-1],h=Ss(t,u),d=Ss(t,l);gn(h===d);let p={keyframes:c,velocity:e.getVelocity(),...o,elapsed:a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!h||!d||xn.current||!1===o.type)return xs(p);if("inertia"===o.type)return Ps(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}(o)||(p={...p,...Ts(t,p)}),p.duration&&(p.duration=vn(p.duration)),p.repeatDelay&&(p.repeatDelay=vn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=ys(e,t,p);if(n)return n}return cs(p)};function Ls(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Rs(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Rs(t,e,n);else{const i="function"==typeof e?an(t,e,n.custom):e;s=ks(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Rs(t,e,n={}){const s=an(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>ks(t,s,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(Ds).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Rs(t,e,{...o,delay:n+c(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(e)}return Promise.all([o(),r(n.delay)])}function ks(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");s&&(o=s);const u=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||l&&Bs(l,e))continue;const r={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!s.hasAnimated){const n=t.getProps()[fn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,s,Te))}let h=s.start(Ms(e,s,i,t.shouldReduceMotion&&j.has(e)?{type:!1}:r));mn(c)&&(c.add(e),h=h.then(()=>c.remove(e))),u.push(h)}return Promise.all(u).then(()=>{r&&un(t,r)})}function Ds(t,e){return t.sortNodePosition(e)}function Bs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}const Fs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Is=[...Fs].reverse(),Os=Fs.length;function js(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ls(t,e,n)))}(t);const n={animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()};let s=!0;const i=(e,n)=>{const s=an(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),c=t.getVariantContext(!0)||{},u=[],l=new Set;let h={},d=1/0;for(let e=0;e<Os;e++){const p=Is[e],g=n[p],y=void 0!==a[p]?a[p]:c[p],v=m(y),x=p===r?g.isActive:null;!1===x&&(d=e);let P=y===c[p]&&y!==a[p]&&v;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||f(y)||"boolean"==typeof y)continue;const w=Us(g.prevProp,y);let E=w||p===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let T=b.reduce(i,{});!1===x&&(T={});const{prevResolvedValues:S={}}=g,C={...S,...T},A=t=>{E=!0,l.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=T[t],n=S[t];h.hasOwnProperty(t)||(e!==n?Ot(e)&&Ot(n)?!me(e,n)||w?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):l.add(t):void 0!==e&&l.has(t)?A(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=T,g.isActive&&(h={...h,...T}),s&&t.blockInitialAnimation&&(E=!1),E&&!P&&u.push(...b.map(t=>({animation:t,options:{type:p,...o}})))}if(l.size){const e={};l.forEach(n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)}),u.push({animation:e})}let p=Boolean(u.length);return s&&!1===a.initial&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)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,s)}),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Us(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!me(e,t)}function Ns(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let zs=0;const Ws={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=js(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),f(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ne{constructor(){super(...arguments),this.id=zs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Hs=(t,e)=>Math.abs(t-e);function $s(t,e){const n=Hs(t.x,e.x),s=Hs(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ys{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=qs(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=$s(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=ge;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Xs(e,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:s}=this.handlers,i=qs("pointercancel"===t.type?this.lastMoveEventInfo:Xs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),s&&s(t,i)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const s=Xs(Xt(t),this.transformPagePoint),{point:i}=s,{timestamp:o}=ge;this.history=[{...i,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,qs(s,this.history)),this.removeListeners=_t(qt(window,"pointermove",this.handlePointerMove),qt(window,"pointerup",this.handlePointerUp),qt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Se.update(this.updatePoint)}}function Xs(t,e){return e?{point:e(t.point)}:t}function Gs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function qs({point:t},e){return{point:t,delta:Gs(t,_s(e)),offset:Gs(t,Zs(e)),velocity:Ks(e,.1)}}function Zs(t){return t[0]}function _s(t){return t[t.length-1]}function Ks(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=_s(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>vn(e)));)n--;if(!s)return{x:0,y:0};const o=(i.timestamp-s.timestamp)/1e3;if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Js(t){return t.max-t.min}function Qs(t,e=0,n=.01){return Math.abs(t-e)<=n}function ti(t,e,n,s=.5){t.origin=s,t.originPoint=Sn(e.min,e.max,t.origin),t.scale=Js(n)/Js(e),(Qs(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Sn(n.min,n.max,t.origin)-t.originPoint,(Qs(t.translate)||isNaN(t.translate))&&(t.translate=0)}function ei(t,e,n,s){ti(t.x,e.x,n.x,s?s.originX:void 0),ti(t.y,e.y,n.y,s?s.originY:void 0)}function ni(t,e,n){t.min=n.min+e.min,t.max=t.min+Js(e)}function si(t,e,n){t.min=e.min-n.min,t.max=t.min+Js(e)}function ii(t,e,n){si(t.x,e.x,n.x),si(t.y,e.y,n.y)}function oi(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 ri(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const ai=.35;function ci(t,e,n){return{min:ui(t,e),max:ui(t,n)}}function ui(t,e){return"number"==typeof t?t:t[e]||0}const li=()=>({x:{min:0,max:0},y:{min:0,max:0}});function hi(t){return[t("x"),t("y")]}function di({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function pi(t){return void 0===t||1===t}function mi({scale:t,scaleX:e,scaleY:n}){return!pi(t)||!pi(e)||!pi(n)}function fi(t){return mi(t)||gi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function gi(t){return yi(t.x)||yi(t.y)}function yi(t){return t&&"0%"!==t}function vi(t,e,n){return n+e*(t-n)}function xi(t,e,n,s,i){return void 0!==i&&(t=vi(t,i,s)),vi(t,n,s)+e}function Pi(t,e=0,n=1,s,i){t.min=xi(t.min,e,n,s,i),t.max=xi(t.max,e,n,s,i)}function wi(t,{x:e,y:n}){Pi(t.x,e.translate,e.scale,e.originPoint),Pi(t.y,n.translate,n.scale,n.originPoint)}function Ei(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function bi(t,e){t.min=t.min+e,t.max=t.max+e}function Ti(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=Sn(t.min,t.max,o);Pi(t,e[n],e[s],r,e.scale)}const Si=["x","scaleX","originX"],Ci=["y","scaleY","originY"];function Ai(t,e){Ti(t.x,e,Si),Ti(t.y,e,Ci)}function Vi(t,e){return di(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const Mi=new WeakMap;class Li{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(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Ys(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=te(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),hi(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ot.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=Js(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&i(t,e);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&i(t,e)}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Ri(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Sn(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Sn(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;t&&p(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:oi(t.x,n,i),y:oi(t.y,e,s)}}(n.layoutBox,t),this.elastic=function(t=ai){return!1===t?t=0:!0===t&&(t=ai),{x:ci(t,"left","right"),y:ci(t,"top","bottom")}}(e),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hi(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!p(t))return!1;const n=t.current;yn(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Vi(t,n),{scroll:i}=e;return i&&(bi(s.x,i.offset.x),bi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ri(t.x,e.x),y:ri(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=di(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=hi(r=>{if(!Ri(r,e,this.currentDirection))return;let c=a&&a[r]||{};o&&(c={min:0,max:0});const u=s?200:1e6,l=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:l,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Ms(t,n,0,e))}stopAnimation(){hi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){hi(e=>{const{drag:n}=this.getProps();if(!Ri(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-Sn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!p(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};hi(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=Js(t),i=Js(e);return i>s?n=Fn(e.min,e.max-s,t.min):s>i&&(n=Fn(t.min,t.max-i,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),hi(e=>{if(!Ri(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Sn(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;Mi.set(this.visualElement,this);const t=qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();p(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=$t(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(hi(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ai,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Ri(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function ki(t,e,n={}){const s=N(t)?t:Fe(t);return s.start(Ms("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const Di=["TopLeft","TopRight","BottomLeft","BottomRight"],Bi=Di.length,Fi=t=>"string"==typeof t?parseFloat(t):t,Ii=t=>"number"==typeof t||rt.test(t);function Oi(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ji=Ni(0,.5,Hn),Ui=Ni(.5,.95,oe);function Ni(t,e,n){return s=>s<t?0:s>e?1:n(Fn(t,e,s))}function zi(t,e){t.min=e.min,t.max=e.max}function Wi(t,e){zi(t.x,e.x),zi(t.y,e.y)}function Hi(t,e,n,s,i){return t=vi(t-=e,1/n,s),void 0!==i&&(t=vi(t,1/i,s)),t}function $i(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(ot.test(e)){e=parseFloat(e);e=Sn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Sn(o.min,o.max,s);t===o&&(a-=e),t.min=Hi(t.min,e,n,a,i),t.max=Hi(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const Yi=["x","scaleX","originX"],Xi=["y","scaleY","originY"];function Gi(t,e,n,s){$i(t.x,e,Yi,n?n.x:void 0,s?s.x:void 0),$i(t.y,e,Xi,n?n.y:void 0,s?s.y:void 0)}function qi(t){return 0===t.translate&&1===t.scale}function Zi(t){return qi(t.x)&&qi(t.y)}function _i(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ki(t){return Js(t.x)/Js(t.y)}class Ji{constructor(){this.members=[]}add(t){Le(this.members,t),t.scheduleRender()}remove(t){if(Re(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Qi(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const to=(t,e)=>t.depth-e.depth;class eo{constructor(){this.children=[],this.isDirty=!1}add(t){Le(this.children,t),this.isDirty=!0}remove(t){Re(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(to),this.isDirty=!1,this.children.forEach(t)}}const no=["","X","Y","Z"];let so=0;function io({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t,n={},s=(null==e?void 0:e())){this.id=so++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(ao),this.nodes.forEach(po),this.nodes.forEach(mo)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new eo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ke),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=vs(s,250),S.hasAnimatedSinceResize&&(S.hasAnimatedSinceResize=!1,this.nodes.forEach(ho))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Po,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),c=!this.targetLayout||!_i(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Vs(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||ho(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Se.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fo),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(uo);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(wo),this.potentialNodes.clear()),this.nodes.forEach(lo),this.nodes.forEach(oo),this.nodes.forEach(ro),this.clearAllSnapshots(),Ce.update(),Ce.preRender(),Ce.render())}clearAllSnapshots(){this.nodes.forEach(co),this.sharedNodes.forEach(go)}scheduleUpdateProjection(){Te.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Zi(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||fi(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Eo((s=n).x),Eo(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(bi(e.x,n.offset.x),bi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Wi(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){Wi(e,t);const{scroll:n}=this.root;n&&(bi(e.x,-n.offset.x),bi(e.y,-n.offset.y))}bi(e.x,i.offset.x),bi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Wi(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ai(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),fi(s.latestValues)&&Ai(n,s.latestValues)}return fi(this.latestValues)&&Ai(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Wi(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!fi(n.latestValues))continue;mi(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};Wi(s,n.measurePageBox()),Gi(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return fi(this.latestValues)&&Gi(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){const t=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:e,layoutId:n}=this.options;if(this.layout&&(e||n)){if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ii(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,i,o;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(s=this.target,i=this.relativeTarget,o=this.relativeParent.target,ni(s.x,i.x,o.x),ni(s.y,i.y,o.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Wi(this.target,this.layout.layoutBox),wi(this.target,this.targetDelta)):Wi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ii(this.relativeTargetOrigin,this.target,t.target),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!mi(this.parent.latestValues)&&!gi(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta||this.parent.options.layoutRoot)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){const{isProjectionDirty:t,isTransformDirty:e}=this;this.isProjectionDirty=this.isTransformDirty=!1;const n=this.getLead(),s=Boolean(this.resumingFrom)||this!==n;let i=!0;if(t&&(i=!1),s&&e&&(i=!1),i)return;const{layout:o,layoutId:r}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!r)return;Wi(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ai(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,wi(t,r)),s&&fi(o.latestValues)&&Ai(t,o.latestValues))}e.x=Ei(e.x),e.y=Ei(e.y)}(this.layoutCorrected,this.treeScale,this.path,s);const{target:a}=n;if(!a)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const c=this.treeScale.x,u=this.treeScale.y,l=this.projectionTransform;ei(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.projectionTransform=Qi(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===c&&this.treeScale.y===u||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,l=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(xo));this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var c,h,d,p;yo(o.x,t.x,n),yo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ii(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,h=this.relativeTargetOrigin,d=r,p=n,vo(c.x,h.x,d.x,p),vo(c.y,h.y,d.y,p)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=Sn(0,void 0!==n.opacity?n.opacity:1,ji(s)),t.opacityExit=Sn(void 0!==e.opacity?e.opacity:1,0,Ui(s))):o&&(t.opacity=Sn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Bi;i++){const o=`border${Di[i]}Radius`;let r=Oi(e,o),a=Oi(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ii(r)===Ii(a)?(t[o]=Math.max(Sn(Fi(r),Fi(a),s),0),(ot.test(a)||ot.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Sn(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,l,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Se.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{S.hasAnimatedSinceResize=!0,this.currentAnimation=ki(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&bo(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Js(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=Js(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}Wi(e,n),Ai(e,i),ei(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Ji);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<no.length;e++){const i="rotate"+no[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n;const s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=jt(t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=jt(t.pointerEvents)||""),this.hasProjected&&!fi(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=Qi(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:c}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*c.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in F){if(void 0===r[t])continue;const{correct:e,applyTo:n}=F[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?jt(t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(uo),this.root.sharedNodes.clear()}}}function oo(t){t.updateLayout()}function ro(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?hi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Js(s);s.min=e[t].min,s.max=s.min+i}):bo(i,n.layoutBox,e)&&hi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=Js(e[t]);s.max=s.min+i});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ei(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?ei(a,t.applyTransform(s,!0),n.measuredBox):ei(a,e,n.layoutBox);const c=!Zi(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ii(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ii(a,e,o.layoutBox),_i(r,a)||(u=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function ao(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function co(t){t.clearSnapshot()}function uo(t){t.clearMeasurements()}function lo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ho(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function po(t){t.resolveTargetDelta()}function mo(t){t.calcProjection()}function fo(t){t.resetRotation()}function go(t){t.removeLeadSnapshot()}function yo(t,e,n){t.translate=Sn(e.translate,0,n),t.scale=Sn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vo(t,e,n,s){t.min=Sn(e.min,n.min,s),t.max=Sn(e.max,n.max,s)}function xo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Po={duration:.45,ease:[.4,0,.1,1]};function wo(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const s=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function Eo(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function bo(t,e,n){return"position"===t||"preserve-aspect"===t&&!Qs(Ki(e),Ki(n),.2)}const To=io({attachResizeListener:(t,e)=>$t(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),So={current:void 0},Co=io({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!So.current){const t=new To(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),So.current=t}return So.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ao=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Vo(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Ao);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function Mo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${Mo(t,e.target.x)}% ${Mo(t,e.target.y)}%`}},Ro=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function ko(t,e,n=1){yn(n<=4);const[s,i]=function(t){const e=Ro.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);return o?o.trim():X(i)?ko(i,e,n+1):i}const Do={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),o=[];i&&(t=t.replace(Ro,t=>(o.push(t),"_$css")));const r=Ge.parse(t);if(r.length>5)return s;const a=Ge.createTransformer(t),c="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,l=n.y.scale*e.y;r[0+c]/=u,r[1+c]/=l;const h=Sn(u,l,.5);"number"==typeof r[2+c]&&(r[2+c]/=h),"number"==typeof r[3+c]&&(r[3+c]/=h);let d=a(r);if(i){let t=0;d=d.replace("_$css",()=>{const e=o[t];return t++,e})}return d}},Bo=new Set(["width","height","top","left","right","bottom","x","y"]),Fo=t=>Bo.has(t),Io=t=>t===Z||t===rt,Oo=(t,e)=>parseFloat(t.split(", ")[e]),jo=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Oo(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?Oo(e[1],t):0}},Uo=new Set(["x","y","z"]),No=O.filter(t=>!Uo.has(t));const zo={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:jo(4,13),y:jo(5,14)},Wo=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Fo);let o=[],r=!1;const a=[];if(i.forEach(i=>{const c=t.getValue(i);if(!t.hasValue(i))return;let u=n[i],l=sn(u);const h=e[i];let d;if(Ot(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],l=sn(u);for(let n=e;n<t;n++)d?yn(sn(h[n])===d):(d=sn(h[n]),yn(d===l||Io(l)&&Io(d)))}else d=sn(h);if(l!==d)if(Io(l)&&Io(d)){const t=c.get();"string"==typeof t&&c.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[i]=h.map(parseFloat))}else(null==l?void 0:l.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?c.set(d.transform(u)):e[i]=l.transform(h):(r||(o=function(t){const e=[];return No.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],c.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=zo[t](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=zo[n](c,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),l&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function Ho(t,e,n,s){return(t=>Object.keys(t).some(Fo))(e)?Wo(t,e,n,s):{target:e,transitionEnd:s}}const $o=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!X(e))return;const n=ko(e,s);n&&t.set(n)});for(const t in e){const i=e[t];if(!X(i))continue;const o=ko(i,s);o&&(e[t]=o,n&&void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return Ho(t,e=i.target,n,s=i.transitionEnd)},Yo={current:null},Xo={current:!1};function Go(){if(Xo.current=!0,l)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Yo.current=t.matches;t.addListener(e),e()}else Yo.current=!1}const qo=Object.keys(E),Zo=qo.length,_o=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ko=g.length;class Jo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Te.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),mn(c)&&c.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Xo.current||Go(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Yo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Se.update(this.notifyUpdate),Se.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=j.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Te.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i,o){let r,a;for(let t=0;t<Zo;t++){const n=qo[t],{isEnabled:s,Feature:i,ProjectionNode:o,MeasureLayout:c}=E[n];o&&(r=o),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),c&&(a=c))}if(!this.projection&&r){this.projection=new r(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||a&&p(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:c,layoutRoot:u})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<_o.length;e++){const n=_o[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(N(o))t.addValue(i,o),mn(s)&&s.add(i);else if(N(r))t.addValue(i,Fe(o,{owner:t})),mn(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Fe(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Ko;t++){const n=g[t],s=this.props[n];(m(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Fe(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=It(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||N(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new ke),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Qo extends Jo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:s},i){let o=pn(n,t||{},this);if(s&&(e&&(e=s(e)),n&&(n=s(n)),o&&(o=s(o))),i){hn(this,n,o);const t=$o(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class tr extends Qo{readValueFromInstance(t,e){if(j.has(e)){const t=Qe(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Y(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Vi(t,e)}build(t,e,n,s){dt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;N(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Rt(t,e,n,s)}}function er(){const t=e.useContext(u);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class nr extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;I(ir),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),S.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Te.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function sr(t){const[n,s]=er(),i=e.useContext(A);return o.default.createElement(nr,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:s})}const ir={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:Do},or={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=oe}onPointerDown(t){this.session=new Ys(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:t,onStart:e,onMove:n,onEnd:(t,e)=>{delete this.session,s&&s(t,e)}}}mount(){this.removePointerDownListener=qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ne{constructor(t){super(t),this.removeGroupControls=oe,this.removeListeners=oe,this.controls=new Li(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oe}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Co,MeasureLayout:sr}};class rr extends Qo{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(j.has(e)){const t=Qe(e);return t&&t.default||0}return e=kt.has(e)?e:Lt(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Ft(t,e)}build(t,e,n,s){St(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Dt(t,e,0,s)}mount(t){this.isSVGTag=At(t.tagName),super.mount(t)}}const ar=(t,e)=>B(t)?new rr(e,{enableHardwareAcceleration:!1}):new tr(e,{enableHardwareAcceleration:!0}),cr={layout:{ProjectionNode:Co,MeasureLayout:sr}},ur={...Ws,...pe,...or,...cr},lr=k((t,e)=>Ht(t,e,ur,ar));const hr=k(Ht);function dr(){const t=e.useRef(!1);return h(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function pr(){const t=dr(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>Te.postRender(i),[i]),n]}class mr extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function fr({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),i.createElement(mr,{isPresent:n,childRef:o,sizeRef:r},i.cloneElement(t,{ref:o}))}const gr=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const l=T(yr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{l.set(t,!0);for(const t of l.values())if(!t)return;o&&o()},register:t=>(l.set(t,!1),()=>l.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{l.forEach((t,e)=>l.set(e,!1))},[s]),i.useEffect(()=>{!s&&!l.size&&o&&o()},[s]),"popLayout"===c&&(t=i.createElement(fr,{isPresent:s},t)),i.createElement(u.Provider,{value:d},t)};function yr(){return new Map}function vr(t){return e.useEffect(()=>()=>t(),[])}const xr=t=>t.key||"";const Pr=e.createContext(null),wr=t=>!0===t,Er=({children:t,id:n,inheritId:s,inherit:o=!0})=>{void 0!==s&&(o=s);const r=e.useContext(A),a=e.useContext(Pr),[c,u]=pr(),l=e.useRef(null),h=r.id||a;null===l.current&&((t=>wr(!0===t)||"id"===t)(o)&&h&&(n=n?h+"-"+n:h),l.current={id:n,group:wr(o)&&r.group||Vo()});const d=e.useMemo(()=>({...l.current,forceRender:c}),[u]);return i.createElement(A.Provider,{value:d},t)};let br=0;function Tr(t){return"function"==typeof t}const Sr=e.createContext(null);const Cr=e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},c){const u=T(()=>lr(n)),l=[],h=e.useRef(!1);yn(Boolean(r));const d={axis:s,registerItem:(t,e)=>{e&&-1===l.findIndex(e=>t===e.value)&&(l.push({value:t,layout:e[s]}),l.sort(Vr))},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],c=r.layout,u=Sn(c.min,c.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(l,t,e,n);l!==s&&(h.current=!0,o(s.map(Ar).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(u,{...a,ref:c,ignoreStrict:!0},i.createElement(Sr.Provider,{value:d},t))}));function Ar(t){return t.value}function Vr(t,e){return t.layout.min-e.layout.min}function Mr(t){const n=T(()=>Fe(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Lr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=jn(i,o,{mixer:(c=o[0],(t=>"object"==typeof t&&t.mix)(c)?c.mix:void 0),...r});var c;return e?a(s):a}function Rr(t,e){const n=Mr(e()),s=()=>n.set(e());return s(),h(()=>{const e=()=>Te.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Se.update(s)}}),n}function kr(t,e,n,s){const i="function"==typeof e?e:Lr(e,n,s);return Array.isArray(t)?Dr(t,i):Dr([t],([t])=>i(t))}function Dr(t,e){const n=T(()=>[]);return Rr(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function Br(t,e=0){return N(t)?t:Mr(e)}const Fr={Group:Cr,Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...c},u){const l=T(()=>lr(o)),h=e.useContext(Sr),d={x:Br(n.x),y:Br(n.y)},p=kr([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);yn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(s,m.current)},[h]),i.createElement(l,{drag:f,...c,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[f]&&y(s,d[f].get(),n[f]),r&&r(t,e)},onLayoutMeasure:t=>{m.current=t},ref:u,ignoreStrict:!0},t)}))};var Ir;t.AnimationType=void 0,(Ir=t.AnimationType||(t.AnimationType={})).Animate="animate",Ir.Hover="whileHover",Ir.Tap="whileTap",Ir.Drag="whileDrag",Ir.Focus="whileFocus",Ir.InView="whileInView",Ir.Exit="exit";const Or={renderer:ar,...Ws,...pe},jr={...Or,...or,...cr};function Ur(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Nr=new WeakMap;let zr;function Wr({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Nr.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Hr(t){t.forEach(Wr)}function $r(t,e){zr||"undefined"!=typeof ResizeObserver&&(zr=new ResizeObserver(Hr));const n=Ur(t);return n.forEach(t=>{let n=Nr.get(t);n||(n=new Set,Nr.set(t,n)),n.add(e),null==zr||zr.observe(t)}),()=>{n.forEach(t=>{const n=Nr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==zr||zr.unobserve(t)})}}const Yr=new Set;let Xr;function Gr(t){return Yr.add(t),Xr||(Xr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Yr.forEach(t=>t(e))},window.addEventListener("resize",Xr)),()=>{Yr.delete(t),!Yr.size&&Xr&&(Xr=void 0)}}const qr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Zr(t,e,n,s){const i=n[e],{length:o,position:r}=qr[e],a=i.current,c=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Fn(0,i.scrollLength,i.current);const u=s-c;i.velocity=u>50?0:De(i.current-a,u)}const _r={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Kr={start:0,center:.5,end:1};function Jr(t,e,n=0){let s=0;if(void 0!==Kr[t]&&(t=Kr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Qr=[0,0];function ta(t,e,n,s){let i=Array.isArray(t)?t:Qr,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Kr[t]?t:"0"]),o=Jr(i[0],n,s),r=Jr(i[1],e),o-r}const ea={x:0,y:0};function na(t,e,n){let{offset:s=_r.All}=n;const{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==t?function(t,e){let n={x:0,y:0},s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s instanceof SVGGraphicsElement&&"getBBox"in s){const{top:t,left:e}=s.getBBox();for(n.x+=e,n.y+=t;s&&"svg"!==s.tagName;)s=s.parentNode}return n}(i,t):ea,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let l=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=ta(s[t],u[r],c[r],a[o]);l||n===e[o].interpolatorOffsets[t]||(l=!0),e[o].offset[t]=n}l&&(e[o].interpolate=jn(e[o].offset,Un(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function sa(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){Zr(t,"x",e,n),Zr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&na(t,n,s)},notify:()=>e(n)}}const ia=new WeakMap,oa=new WeakMap,ra=new WeakMap,aa=t=>t===document.documentElement?window:t;function ca(t,{container:e=document.documentElement,...n}={}){let s=ra.get(e);s||(s=new Set,ra.set(e,s));const i=sa(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!ia.has(e)){const t=()=>{const t=performance.now();for(const t of s)t.measure();for(const e of s)e.update(t);for(const t of s)t.notify()};ia.set(e,t);const n=aa(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&oa.set(e,(r=t,"function"==typeof(o=e)?Gr(o):$r(o,r))),n.addEventListener("scroll",t,{passive:!0})}var o,r;const a=ia.get(e),c=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(c);const n=ra.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=ia.get(e);ia.delete(e),s&&(aa(e).removeEventListener("scroll",s),null===(t=oa.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}function ua(t,e){gn(Boolean(!e||e.current))}const la=()=>({scrollX:Fe(0),scrollY:Fe(0),scrollXProgress:Fe(0),scrollYProgress:Fe(0)});function ha({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=T(la);return(s?h:e.useEffect)(()=>(ua(0,n),ua(0,t),ca(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),o}function da(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return Te.update(e,!0),()=>Se.update(e)},[t])}class pa extends Be{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;j.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Le(this.members,e),this.update())}remove(t){j.has(t)?(this.transforms.delete(t),this.transforms.size||Re(this.members,"transform")):Re(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ma(){!Xo.current&&Go();const[t]=e.useState(Yo.current);return t}function fa(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){yn(t);const i=[];return e.forEach(t=>{i.push(Ls(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(yn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?ln(t,e):"string"==typeof e?ln(t,[e]):un(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function ga(){const t=T(fa);return h(t.mount,[]),t}const ya=ga,va=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};const xa={any:0,all:1};class Pa{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const wa=()=>new Pa;function Ea(t){return null!==t&&"object"==typeof t&&M in t}function ba(){return Ta}function Ta(t){So.current&&(So.current.isUpdating=!1,So.current.blockUpdate(),t&&t())}const Sa=(t,e)=>`${t}: ${e}`,Ca=new Map;function Aa(t,e,n,s){const i=Sa(t,j.has(e)?"transform":e),o=Ca.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,c=()=>{Ca.delete(i);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return s.update(()=>{n.animation&&(n.animation.currentTime=performance.now()-t)}),s.render(c),t-a||0}return c(),0}const Va=()=>({});class Ma extends Jo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return hn(this,n,pn(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const La=Ut({scrapeMotionValuesFromProps:Va,createRenderState:Va});const Ra=t=>t>.001?1/t:1e5;let ka=!1;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:c="sync"})=>{r&&(c="wait");let[u]=pr();const l=e.useContext(A).forceRender;l&&(u=l);const d=dr(),p=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=p;const f=new Set,g=e.useRef(m),y=e.useRef(new Map).current,v=e.useRef(!0);if(h(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=xr(t);e.set(n,t)})}(p,y),g.current=m}),vr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement(gr,{key:xr(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:c},t)));m=[...m];const x=g.current.map(xr),P=p.map(xr),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===c&&f.size&&(m=[]),f.forEach(t=>{if(-1!==P.indexOf(t))return;const e=y.get(t);if(!e)return;const s=x.indexOf(t);m.splice(s,0,i.createElement(gr,{key:xr(e),isPresent:!1,onExitComplete:()=>{y.delete(t),f.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!f.size){if(g.current=p,!1===d.current)return;u(),o&&o()}},custom:n,presenceAffectsLayout:a,mode:c},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:i.createElement(gr,{key:xr(t),isPresent:!0,presenceAffectsLayout:a,mode:c},t)}),i.createElement(i.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{gn(!1)},[]),i.createElement(Er,{id:T(()=>"asl-"+br++)},t)),t.DeprecatedLayoutGroupContext=Pr,t.DragControls=Pa,t.FlatTree=eo,t.LayoutGroup=Er,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!Tr(n)),r=e.useRef(void 0);if(!Tr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Tr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),i.createElement(d.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&Pt(n),(s={...e.useContext(r),...s}).isStatic=T(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=Be,t.PresenceContext=u,t.Reorder=Fr,t.SwitchLayoutGroupContext=V,t.VisualElement=Jo,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=I,t.animate=ki,t.animateValue=cs,t.animateVisualElement=Ls,t.animationControls=fa,t.animations=Ws,t.anticipate=qn,t.backIn=Xn,t.backInOut=Gn,t.backOut=Yn,t.buildTransform=H,t.calcLength=Js,t.checkTargetForNewValues=hn,t.circIn=Wn,t.circInOut=$n,t.circOut=Hn,t.clamp=q,t.color=We,t.complex=Ge,t.createBox=li,t.createDomMotionComponent=function(t){return L(Ht(t,{forwardMotionProps:!1},ur,ar))},t.createMotionComponent=L,t.cubicBezier=zn,t.delay=vs,t.distance=Hs,t.distance2D=$s,t.domAnimation=Or,t.domMax=jr,t.easeIn=En,t.easeInOut=Tn,t.easeOut=bn,t.filterProps=wt,t.frameData=ge,t.inertia=Ps,t.interpolate=jn,t.invariant=yn,t.isBrowser=l,t.isDragActive=ee,t.isMotionComponent=Ea,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=hr,t.makeUseVisualState=Ut,t.mix=Sn,t.motion=lr,t.motionValue=Fe,t.optimizedAppearDataAttribute=fn,t.pipe=_t,t.progress=Fn,t.px=rt,t.resolveMotionValue=jt,t.spring=ss,t.startOptimizedAppearAnimation=function(t,e,n,s,i){const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Aa;const r=Sa(o,e),a=ds(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Ca.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const o=ds(t,e,n,s);document.timeline&&(o.startTime=document.timeline.currentTime),Ca.set(r,{animation:o,startTime:performance.now()}),i&&i(o)};a.ready?a.ready.then(c).catch(oe):c()},t.sync=Te,t.transform=Lr,t.unwrapMotionComponent=function(t){if(Ea(t))return t[M]},t.useAnimation=ya,t.useAnimationControls=ga,t.useAnimationFrame=da,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?va(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=La({},!1),o=T(()=>new Ma({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,T(()=>t=>Ls(o,t))]},t.useDeprecatedInvertedScale=function(t){let e=Mr(1),n=Mr(1);const s=c();return yn(!(!t&&!s)),gn(ka),ka=!0,t?(e=t.scaleX||e,n=t.scaleY||n):s&&(e=s.getValue("scaleX",1),n=s.getValue("scaleY",1)),{scaleX:kr(e,Ra),scaleY:kr(n,Ra)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return $t(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return T(wa)},t.useElementScroll=function(t){return ha({container:t})},t.useForceUpdate=pr,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:"some"===i?"any":i};return function(t,e,{root:n,margin:s,amount:i="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const o=Ur(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:xa[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o]),r},t.useInstantLayoutTransition=ba,t.useInstantTransition=function(){const[t,n]=pr(),s=ba();return e.useEffect(()=>{Te.postRender(()=>Te.postRender(()=>xn.current=!1))},[n]),e=>{s(()=>{xn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(u))||t.isPresent;var t},t.useIsomorphicLayoutEffect=h,t.useMotionTemplate=function(t,...e){const n=t.length;return Rr(e.filter(N),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=N(n)?n.get():n)}return s}))},t.useMotionValue=Mr,t.useMotionValueEvent=function(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])},t.usePresence=er,t.useReducedMotion=ma,t.useReducedMotionConfig=function(){const t=ma(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=So.current;t&&t.resetTree()},[])},t.useScroll=ha,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=Mr(N(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>s?e(t):(a(),i.current=cs({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",...n,onUpdate:e}),o.get()),a),[JSON.stringify(n)]),h(()=>{if(N(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Mr(0);return da(e=>t.set(e)),t},t.useTransform=kr,t.useUnmountEffect=vr,t.useVelocity=function(t){const n=Mr(t.getVelocity());return e.useEffect(()=>t.on("velocityChange",t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return ha()},t.useVisualElementContext=c,t.useWillChange=function(){return T(()=>new pa("auto"))},t.warning=gn,t.wrap=va,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=i(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({});function c(){return e.useContext(a).visualElement}const l=e.createContext(null),u="undefined"!=typeof document,h=u?e.useLayoutEffect:e.useEffect,d=e.createContext({strict:!1});function p(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function f(t){return"object"==typeof t&&"function"==typeof t.start}const g=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function y(t){return f(t.animate)||g.some(e=>m(t[e]))}function v(t){return Boolean(y(t)||t.variants)}function x(t){const{initial:n,animate:i}=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:i}),[P(n),P(i)])}function P(t){return Array.isArray(t)?t.join(" "):t}const w={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},E={};for(const t in w)E[t]={isEnabled:e=>w[t].some(t=>!!e[t])};function b(t){for(const e in t)E[e]={...E[e],...t[e]}}function S(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const T={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let C=1;const A=e.createContext({}),V=e.createContext({}),M=Symbol.for("motionComponentSymbol");function L({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:o,Component:m}){t&&b(t);const f=e.forwardRef((function(f,g){let y;const v={...e.useContext(r),...f,layoutId:D(f)},{isStatic:P}=v,w=x(f),E=P?void 0:S(()=>{if(T.hasEverUpdated)return C++}),b=o(f,P);if(!P&&u){w.visualElement=function(t,n,i,s){const o=c(),a=e.useContext(d),u=e.useContext(l),p=e.useContext(r).reducedMotion,m=e.useRef();s=s||a.renderer,!m.current&&s&&(m.current=s(t,{visualState:n,parent:o,props:i,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:p}));const f=m.current;return e.useInsertionEffect(()=>{f&&f.update(i,u)}),h(()=>{f&&f.render()}),e.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?h:e.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}(m,b,v,n);const i=e.useContext(V),s=e.useContext(d).strict;w.visualElement&&(y=w.visualElement.loadFeatures(v,s,t,E,i))}return s.createElement(a.Provider,{value:w},y&&w.visualElement?s.createElement(y,{visualElement:w.visualElement,...v}):null,i(m,f,E,function(t,n,i){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):p(i)&&(i.current=e))},[n])}(b,w.visualElement,g),b,P,w.visualElement))}));return f[M]=m,f}function D({layoutId:t}){const n=e.useContext(A).id;return n&&void 0!==t?n+"-"+t:t}function R(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,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const k=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function B(t){return"string"==typeof t&&!t.includes("-")&&!!(k.indexOf(t)>-1||/[A-Z]/.test(t))}const F={};function j(t){Object.assign(F,t)}const I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O=new Set(I);function U(t,{layout:e,layoutId:n}){return O.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!F[t]||"opacity"===t)}const N=t=>Boolean(t&&t.getVelocity),z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},W=I.length;function H(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let e=0;e<W;e++){const n=I[e];if(void 0!==t[n]){o+=`${z[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}const $=t=>e=>"string"==typeof e&&e.startsWith(t),Y=$("--"),X=$("var(--"),G=(t,e)=>e&&"number"==typeof t?e.transform(t):t,q=(t,e,n)=>Math.min(Math.max(n,t),e),Z={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...Z,transform:t=>q(0,1,t)},K={...Z,default:1},J=t=>Math.round(1e5*t)/1e5,Q=/(-)?([\d]*\.?[\d])+/g,tt=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,et=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function nt(t){return"string"==typeof t}const it=t=>({test:e=>nt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),st=it("deg"),ot=it("%"),rt=it("px"),at=it("vh"),ct=it("vw"),lt={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},ut={...Z,transform:Math.round},ht={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:st,rotateX:st,rotateY:st,rotateZ:st,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:st,skewX:st,skewY:st,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:_,originX:lt,originY:lt,originZ:rt,zIndex:ut,fillOpacity:_,strokeOpacity:_,numOctaves:ut};function dt(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const t in e){const n=e[t];if(Y(t)){o[t]=n;continue}const i=ht[t],h=G(n,i);if(O.has(t)){if(c=!0,r[t]=h,!u)continue;n!==(i.default||0)&&(u=!1)}else t.startsWith("origin")?(l=!0,a[t]=h):s[t]=h}if(e.transform||(c||i?s.transform=H(t.transform,n,u,i):s.transform&&(s.transform="none")),l){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}const pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mt(t,e,n){for(const i in e)N(e[i])||U(i,n)||(t[i]=e[i])}function ft(t,n,i){const s={};return mt(s,t.style||{},t),Object.assign(s,function({transformTemplate:t},n,i){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return dt(e,n,{enableHardwareAcceleration:!i},t),Object.assign({},e.vars,e.style)},[n])}(t,n,i)),t.transformValues?t.transformValues(s):s}function gt(t,e,n){const i={},s=ft(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const yt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function vt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||yt.has(t)}let xt=t=>!vt(t);function Pt(t){t&&(xt=e=>e.startsWith("on")?!vt(e):t(e))}try{Pt(require("@emotion/is-prop-valid").default)}catch(t){}function wt(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(xt(s)||!0===n&&vt(s)||!e&&!vt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function Et(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const bt={offset:"stroke-dashoffset",array:"stroke-dasharray"},St={offset:"strokeDashoffset",array:"strokeDasharray"};function Tt(t,{attrX:e,attrY:n,originX:i,originY:s,pathLength:o,pathSpacing:r=1,pathOffset:a=0,...c},l,u,h){if(dt(t,c,l,h),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==i||void 0!==s||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Et(e,t.x,t.width)} ${Et(n,t.y,t.height)}`}(m,void 0!==i?i:.5,void 0!==s?s:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==o&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?bt:St;t[o.offset]=rt.transform(-i);const r=rt.transform(e),a=rt.transform(n);t[o.array]=`${r} ${a}`}(d,o,r,a,!1)}const Ct=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),At=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Vt(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Tt(e,n,{enableHardwareAcceleration:!1},At(s),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 Mt(t=!1){return(n,i,s,o,{latestValues:r},a)=>{const c=(B(n)?Vt:gt)(i,r,a,n),l={...wt(i,"string"==typeof n,t),...c,ref:o},{children:u}=i,h=e.useMemo(()=>N(u)?u.get():u,[u]);return s&&(l["data-projection-id"]=s),e.createElement(n,{...l,children:h})}}const Lt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Dt(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const Rt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kt(t,e,n,i){Dt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Rt.has(n)?n:Lt(n),e.attrs[n])}function Bt(t,e){const{style:n}=t,i={};for(const s in n)(N(n[s])||e.style&&N(e.style[s])||U(s,t))&&(i[s]=n[s]);return i}function Ft(t,e){const n=Bt(t,e);for(const i in t)if(N(t[i])||N(e[i])){n["x"===i||"y"===i?"attr"+i.toUpperCase():i]=t[i]}return n}function jt(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}const It=t=>Array.isArray(t);function Ot(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 Ut=t=>(n,i)=>{const s=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Nt(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(t,n,s,o);return i?r():S(r)};function Nt(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Ot(o[t]);let{initial:r,animate:a}=t;const c=y(t),l=v(t);e&&l&&!c&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===r;const h=u?a:r;if(h&&"boolean"!=typeof h&&!f(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=jt(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]})}return s}const zt={useVisualState:Ut({scrapeMotionValuesFromProps:Ft,createRenderState:Ct,onMount:(t,e,{renderState:n,latestValues:i})=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}Tt(n,i,{enableHardwareAcceleration:!1},At(e.tagName),t.transformTemplate),kt(e,n)}})},Wt={useVisualState:Ut({scrapeMotionValuesFromProps:Bt,createRenderState:pt})};function Ht(t,{forwardMotionProps:e=!1},n,i){return{...B(t)?zt:Wt,preloadedFeatures:n,useRender:Mt(e),createVisualElement:i,Component:t}}function $t(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Yt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Xt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Gt=t=>e=>Yt(e)&&t(e,Xt(e));function qt(t,e,n,i){return $t(t,e,Gt(n),i)}const Zt=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce(Zt);function Kt(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Jt=Kt("dragHorizontal"),Qt=Kt("dragVertical");function te(t){let e=!1;if("y"===t)e=Qt();else if("x"===t)e=Jt();else{const t=Jt(),n=Qt();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ee(){const t=te(!0);return!t||(t(),!1)}class ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ie(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return qt(t.current,n,(n,s)=>{if("touch"===n.type||ee())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&o[i](n,s)},{passive:!t.getProps()[i]})}const se=(t,e)=>!!e&&(t===e||se(t,e.parentElement)),oe=t=>t;function re(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Xt(n))}const ae=new WeakMap,ce=new WeakMap,le=t=>{const e=ae.get(t.target);e&&e(t)},ue=t=>{t.forEach(le)};function he(t,e,n){const i=function({root:t,...e}){const n=t||document;ce.has(n)||ce.set(n,{});const i=ce.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ue,{root:t,...e})),i[s]}(e);return ae.set(t,n),i.observe(t),()=>{ae.delete(t),i.unobserve(t)}}const de={some:0,all:1};const pe={inView:{Feature:class extends ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:t}=this.node.getProps();t&&t(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s,fallback:o=!0}=t;if("undefined"==typeof IntersectionObserver)return void(o&&this.viewportFallback());const r={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:de[i]};return he(this.node.current,r,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ne{constructor(){super(...arguments),this.removeStartListeners=oe,this.removeEndListeners=oe,this.removeAccessibleListeners=oe,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=qt(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i}=this.node.getProps();se(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)},{passive:!(n.onTap||n.onPointerUp)}),s=qt(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=_t(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=$t(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=$t(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&re("up",this.node.getProps().onTap)}),re("down",(t,e)=>{this.startPress(t,e)})}),e=$t(this.node.current,"blur",()=>{this.isPressing&&re("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=_t(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ee()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=qt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=$t(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_t(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_t($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ne{mount(){this.unmount=_t(ie(this.node,!0),ie(this.node,!1))}unmount(){}}}};function me(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const fe=t=>/^0[^.\s]+$/.test(t),ge={delta:0,timestamp:0},ye="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),ve="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(ye()),1/60*1e3);let xe=!0,Pe=!1,we=!1;const Ee=["read","update","preRender","render","postRender"],be=Ee.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const c=a&&s,l=c?e:n;return o&&r.add(t),-1===l.indexOf(t)&&(l.push(t),c&&s&&(i=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:c=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.length=0,i=e.length,i)for(let n=0;n<i;n++){const i=e[n];i(c),r.has(i)&&(a.schedule(i),t())}s=!1,o&&(o=!1,a.process(c))}}};return a}(()=>Pe=!0),t),{}),Se=Ee.reduce((t,e)=>{const n=be[e];return t[e]=(t,e=!1,i=!1)=>(Pe||Me(),n.schedule(t,e,i)),t},{}),Te=Ee.reduce((t,e)=>(t[e]=be[e].cancel,t),{}),Ce=Ee.reduce((t,e)=>(t[e]=()=>be[e].process(ge),t),{}),Ae=t=>be[t].process(ge),Ve=t=>{Pe=!1,ge.delta=xe?1/60*1e3:Math.max(Math.min(t-ge.timestamp,40),1),ge.timestamp=t,we=!0,Ee.forEach(Ae),we=!1,Pe&&(xe=!1,ve(Ve))},Me=()=>{Pe=!0,xe=!0,we||ve(Ve)};function Le(t,e){-1===t.indexOf(e)&&t.push(e)}function De(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Re{constructor(){this.subscriptions=[]}add(t){return Le(this.subscriptions,t),()=>De(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ke(t,e){return e?t*(1e3/e):0}class Be{constructor(t,e={}){var n;this.version="9.1.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=ge;this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,Se.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Se.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Re);const n=this.events[t].add(e);return"change"===t?()=>{n(),Se.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ke(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fe(t,e){return new Be(t,e)}const je=(t,e)=>n=>Boolean(nt(n)&&et.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ie=(t,e,n)=>i=>{if(!nt(i))return i;const[s,o,r,a]=i.match(Q);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Oe={...Z,transform:t=>Math.round((t=>q(0,255,t))(t))},Ue={test:je("rgb","red"),parse:Ie("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Oe.transform(t)+", "+Oe.transform(e)+", "+Oe.transform(n)+", "+J(_.transform(i))+")"};const Ne={test:je("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:Ue.transform},ze={test:je("hsl","hue"),parse:Ie("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ot.transform(J(e))+", "+ot.transform(J(n))+", "+J(_.transform(i))+")"},We={test:t=>Ue.test(t)||Ne.test(t)||ze.test(t),parse:t=>Ue.test(t)?Ue.parse(t):ze.test(t)?ze.parse(t):Ne.parse(t),transform:t=>nt(t)?t:t.hasOwnProperty("red")?Ue.transform(t):ze.transform(t)};function He(t){"number"==typeof t&&(t=""+t);const e=[];let n=0,i=0;const s=t.match(tt);s&&(n=s.length,t=t.replace(tt,"${c}"),e.push(...s.map(We.parse)));const o=t.match(Q);return o&&(i=o.length,t=t.replace(Q,"${n}"),e.push(...o.map(Z.parse))),{values:e,numColors:n,numNumbers:i,tokenised:t}}function $e(t){return He(t).values}function Ye(t){const{values:e,numColors:n,tokenised:i}=He(t),s=e.length;return t=>{let e=i;for(let i=0;i<s;i++)e=e.replace(i<n?"${c}":"${n}",i<n?We.transform(t[i]):J(t[i]));return e}}const Xe=t=>"number"==typeof t?0:t;const Ge={test:function(t){var e,n;return isNaN(t)&&nt(t)&&((null===(e=t.match(Q))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(tt))||void 0===n?void 0:n.length)||0)>0},parse:$e,createTransformer:Ye,getAnimatableNone:function(t){const e=$e(t);return Ye(t)(e.map(Xe))}},qe=new Set(["brightness","contrast","saturate","opacity"]);function Ze(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Q)||[];if(!i)return t;const s=n.replace(i,"");let o=qe.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const _e=/([a-z-]*)\(.*?\)/g,Ke={...Ge,getAnimatableNone:t=>{const e=t.match(_e);return e?e.map(Ze).join(" "):t}},Je={...ht,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:Ke,WebkitFilter:Ke},Qe=t=>Je[t];function tn(t,e){let n=Qe(t);return n!==Ke&&(n=Ge),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const en=t=>e=>e.test(t),nn=[Z,rt,ot,st,ct,at,{test:t=>"auto"===t,parse:t=>t}],sn=t=>nn.find(en(t)),on=[...nn,We,Ge],rn=t=>on.find(en(t));function an(t,e,n){const i=t.getProps();return jt(i,e,void 0!==n?n:i.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}function cn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Fe(n))}function ln(t,e){const n=an(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const e in o){cn(t,e,(r=o[e],It(r)?r[r.length-1]||0:r))}var r}function un(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&ln(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{un(t,e)})})}function hn(t,e,n){var i,s;const o=Object.keys(e).filter(e=>!t.hasValue(e)),r=o.length;if(r)for(let a=0;a<r;a++){const r=o[a],c=e[r];let l=null;Array.isArray(c)&&(l=c[0]),null===l&&(l=null!==(s=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==s?s:e[r]),null!=l&&("string"==typeof l&&(/^\-?\d*\.?\d+$/.test(l)||fe(l))?l=parseFloat(l):!rn(l)&&Ge.test(c)&&(l=tn(r,c)),t.addValue(r,Fe(l,{owner:t})),void 0===n[r]&&(n[r]=l),null!==l&&t.setBaseTarget(r,l))}}function dn(t,e){if(!e)return;return(e[t]||e.default||e).from}function pn(t,e,n){const i={};for(const s in t){const t=dn(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}function mn(t){return Boolean(N(t)&&t.add)}const fn="data-"+Lt("framerAppearId");let gn=oe,yn=oe;const vn=t=>1e3*t,xn={current:!1},Pn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,wn=t=>e=>1-t(1-e),En=t=>t*t,bn=wn(En),Sn=Pn(En),Tn=(t,e,n)=>-n*t+n*e+t;function Cn(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}const An=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},Vn=[Ne,Ue,ze];function Mn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;yn(Boolean(e));let i=e.parse(t);return e===ze&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Cn(a,i,t+1/3),o=Cn(a,i,t),r=Cn(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Ln=(t,e)=>{const n=Mn(t),i=Mn(e),s={...n};return t=>(s.red=An(n.red,i.red,t),s.green=An(n.green,i.green,t),s.blue=An(n.blue,i.blue,t),s.alpha=Tn(n.alpha,i.alpha,t),Ue.transform(s))};function Dn(t,e){return"number"==typeof t?n=>Tn(t,e,n):We.test(t)?Ln(t,e):Bn(t,e)}const Rn=(t,e)=>{const n=[...t],i=n.length,s=t.map((t,n)=>Dn(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}},kn=(t,e)=>{const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=Dn(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}},Bn=(t,e)=>{const n=Ge.createTransformer(e),i=He(t),s=He(e);return i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?_t(Rn(i.values,s.values),n):(gn(!0),n=>""+(n>0?e:t))},Fn=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},jn=(t,e)=>n=>Tn(t,e,n);function In(t,e,n){const i=[],s=n||("number"==typeof(o=t[0])?jn:"string"==typeof o?We.test(o)?Ln:Bn:Array.isArray(o)?Rn:"object"==typeof o?kn:jn);var o;const r=t.length-1;for(let n=0;n<r;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;o=_t(t,o)}i.push(o)}return i}function On(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;yn(o===e.length),yn(!i||!Array.isArray(i)||i.length===o-1),t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=In(e,i,s),a=r.length,c=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Fn(t[n],t[n+1],e);return r[n](i)};return n?e=>c(q(t[0],t[o-1],e)):c}function Un(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Fn(0,e,i);t.push(Tn(n,1,s))}}(e,t.length-1),e}const Nn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zn(t,e,n,i){if(t===e&&n===i)return oe;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Nn(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nn(s(t),e,i)}const Wn=t=>1-Math.sin(Math.acos(t)),Hn=wn(Wn),$n=Pn(Hn),Yn=zn(.33,1.53,.69,.99),Xn=wn(Yn),Gn=Pn(Xn),qn=t=>(t*=2)<1?.5*Xn(t):.5*(2-Math.pow(2,-10*(t-1))),Zn={linear:oe,easeIn:En,easeInOut:Sn,easeOut:bn,circIn:Wn,circInOut:$n,circOut:Hn,backIn:Xn,backInOut:Gn,backOut:Yn,anticipate:qn},_n=t=>{if(Array.isArray(t)){yn(4===t.length);const[e,n,i,s]=t;return zn(e,n,i,s)}return"string"==typeof t?(yn(void 0!==Zn[t]),Zn[t]):t};function Kn({keyframes:t,ease:e=Sn,times:n,duration:i=300}){t=[...t];const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(_n):_n(e),o={done:!1,value:t[0]},r=function(t,e){return t.map(t=>t*e)}(n&&n.length===t.length?n:Un(t),i);function a(){return On(r,t,{ease:Array.isArray(s)?s:(e=t,n=s,e.map(()=>n||Sn).splice(0,e.length-1))});var e,n}let c=a();return{next:t=>(o.value=c(t),o.done=t>=i,o),flipTarget:()=>{t.reverse(),c=a()}}}function Jn({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;gn(t<=1e4);let r=1-e;r=q(.05,1,r),t=q(.01,10,t/1e3),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/Qn(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,c=Math.exp(-i),l=Qn(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*c)/l}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function Qn(t,e){return t*Math.sqrt(1-e*e)}const ti=["duration","bounce"],ei=["stiffness","damping","mass"];function ni(t,e){return e.some(e=>void 0!==t[e])}function ii({keyframes:t,restDelta:e,restSpeed:n,...i}){let s=t[0],o=t[t.length-1];const r={done:!1,value:s},{stiffness:a,damping:c,mass:l,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ni(t,ei)&&ni(t,ti)){const n=Jn(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(i);let p=si,m=u?-u/1e3:0;const f=c/(2*Math.sqrt(a*l));function g(){const t=o-s,i=Math.sqrt(a/l)/1e3,r=Math.abs(t)<5;if(n||(n=r?.01:2),e||(e=r?.005:.5),f<1){const e=Qn(i,f);p=n=>{const s=Math.exp(-f*i*n);return o-s*((m+f*i*t)/e*Math.sin(e*n)+t*Math.cos(e*n))}}else if(1===f)p=e=>o-Math.exp(-i*e)*(t+(m+i*t)*e);else{const e=i*Math.sqrt(f*f-1);p=n=>{const s=Math.exp(-f*i*n),r=Math.min(e*n,300);return o-s*((m+f*i*t)*Math.sinh(r)+e*t*Math.cosh(r))/e}}}return g(),{next:t=>{const i=p(t);if(d)r.done=t>=h;else{let s=m;if(0!==t)if(f<1){const e=Math.max(0,t-5);s=ke(i-p(e),t-e)}else s=0;const a=Math.abs(s)<=n,c=Math.abs(o-i)<=e;r.done=a&&c}return r.value=r.done?o:i,r},flipTarget:()=>{m=-m,[s,o]=[o,s],g()}}}ii.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const si=t=>0;const oi={decay:function({keyframes:t=[0],velocity:e=0,power:n=.8,timeConstant:i=350,restDelta:s=.5,modifyTarget:o}){const r=t[0],a={done:!1,value:r};let c=n*e;const l=r+c,u=void 0===o?l:o(l);return u!==l&&(c=u-r),{next:t=>{const e=-c*Math.exp(-t/i);return a.done=!(e>s||e<-s),a.value=a.done?u:u+e,a},flipTarget:()=>{}}},keyframes:Kn,tween:Kn,spring:ii};function ri(t,e,n=0){return t-e-n}const ai=t=>{const e=({delta:e})=>t(e);return{start:()=>Se.update(e,!0),stop:()=>Te.update(e)}};function ci({duration:t,driver:e=ai,elapsed:n=0,repeat:i=0,repeatType:s="loop",repeatDelay:o=0,keyframes:r,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:h,onUpdate:d,type:p="keyframes",...m}){const f=n;let g,y,v=0,x=t,P=!1,w=!0;const E=oi[r.length>2?"keyframes":p]||Kn,b=r[0],S=r[r.length-1];let T={done:!1,value:b};const{needsInterpolation:C}=E;C&&C(b,S)&&(y=On([0,100],[b,S],{clamp:!1}),r=[0,100]);const A=E({...m,duration:t,keyframes:r});function V(){v++,"reverse"===s?(w=v%2==0,n=function(t,e=0,n=0,i=!0){return i?ri(e+-t,e,n):e-(t-e)+n}(n,x,o,w)):(n=ri(n,x,o),"mirror"===s&&A.flipTarget()),P=!1,h&&h()}function M(t){w||(t=-t),n+=t,P||(T=A.next(Math.max(0,n)),y&&(T.value=y(T.value)),P=w?T.done:n<=0),d&&d(T.value),P&&(0===v&&(x=void 0!==x?x:n),v<i?function(t,e,n,i){return i?t>=e+n:t<=-n}(n,x,o,w)&&V():(g&&g.stop(),u&&u()))}return a&&(c&&c(),g=e(M),g.start()),{stop:()=>{l&&l(),g&&g.stop()},set currentTime(t){n=f,M(t)},sample:e=>{n=f;const i=t&&"number"==typeof t?Math.max(.5*t,50):50;let s=0;for(M(0);s<=e;){const t=e-s;M(Math.min(t,i)),s+=i}return T}}}const li=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:li([0,.65,.55,1]),circOut:li([.55,0,1,.45]),backIn:li([.31,.01,.66,-.59]),backOut:li([.33,1.53,.69,.99])};function hi(t){if(t)return Array.isArray(t)?li(t):ui[t]}function di(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){return t.animate({[e]:n,offset:c},{delay:i,duration:s,easing:hi(a),fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const pi={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},mi={},fi={};for(const t in pi)fi[t]=()=>(void 0===mi[t]&&(mi[t]=pi[t]()),mi[t]);const gi=new Set(["opacity","clipPath","filter","transform"]);function yi(t,e,{onUpdate:n,onComplete:i,...s}){if(!(fi.waapi()&&gi.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping))return!1;let{keyframes:o,duration:r=300,elapsed:a=0,ease:c}=s;if("spring"===s.type||!(!(l=s.ease)||Array.isArray(l)||"string"==typeof l&&ui[l])){if(s.repeat===1/0)return;const t=ci({...s,elapsed:0});let e={done:!1,value:o[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;o=n,r=i-10,c="linear"}var l;const u=di(t.owner.current,e,o,{...s,delay:-a,duration:r,ease:c});return u.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(o,s)),Se.update(()=>u.cancel()),i&&i()},{get currentTime(){return u.currentTime||0},set currentTime(t){u.currentTime=t},stop:()=>{const{currentTime:e}=u;if(e){const n=ci({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}Se.update(()=>u.cancel())}}}function vi(t,e){const n=performance.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Te.read(i),t(o-e))};return Se.read(i,!0),()=>Te.read(i)}function xi({keyframes:t,elapsed:e,onUpdate:n,onComplete:i}){const s=()=>{n&&n(t[t.length-1]),i&&i()};return e?{stop:vi(s,-e)}:s()}function Pi({keyframes:t,velocity:e=0,min:n,max:i,power:s=.8,timeConstant:o=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:h,onComplete:d,onStop:p}){const m=t[0];let f;function g(t){return void 0!==n&&t<n||void 0!==i&&t>i}function y(t){return void 0===n?i:void 0===i||Math.abs(n-t)<Math.abs(i-t)?n:i}function v(t){f&&f.stop(),f=ci({keyframes:[0,1],velocity:0,...t,driver:u,onUpdate:e=>{h&&h(e),t.onUpdate&&t.onUpdate(e)},onComplete:d,onStop:p})}function x(t){v({type:"spring",stiffness:r,damping:a,restDelta:c,...t})}if(g(m))x({velocity:e,keyframes:[m,y(m)]});else{let t=s*e+m;void 0!==l&&(t=l(t));const i=y(t),r=i===n?-1:1;let a,u;const h=t=>{a=u,u=t,e=ke(t-a,ge.delta),(1===r&&t>i||-1===r&&t<i)&&x({keyframes:[t,i],velocity:e})};v({type:"decay",keyframes:[m,0],velocity:e,timeConstant:o,power:s,restDelta:c,modifyTarget:l,onUpdate:g(t)?h:void 0})}return{stop:()=>f&&f.stop()}}const wi={type:"spring",stiffness:500,damping:25,restSpeed:10},Ei={type:"keyframes",duration:.8},bi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Si=(t,{keyframes:e})=>e.length>2?Ei:O.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:wi:bi,Ti=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Ge.test(e)||e.startsWith("url(")));function Ci(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ai(t){return"number"==typeof t?0:tn("",t)}function Vi(t,e){return t[e]||t.default||t}const Mi=(t,e,n,i={})=>s=>{const o=Vi(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=vn(r);const c=function(t,e,n,i){const s=Ti(e,n);let o=void 0!==i.from?i.from:t.get();return"none"===o&&s&&"string"==typeof n?o=tn(e,n):Ci(o)&&"string"==typeof n?o=Ai(n):!Array.isArray(n)&&Ci(n)&&"string"==typeof o&&(n=Ai(o)),Array.isArray(n)?(null===n[0]&&(n[0]=o),n):[o,n]}(e,t,n,o),l=c[0],u=c[c.length-1],h=Ti(t,l),d=Ti(t,u);gn(h===d);let p={keyframes:c,velocity:e.getVelocity(),...o,elapsed:a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(!h||!d||xn.current||!1===o.type)return xi(p);if("inertia"===o.type)return Pi(p);if(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}(o)||(p={...p,...Si(t,p)}),p.duration&&(p.duration=vn(p.duration)),p.repeatDelay&&(p.repeatDelay=vn(p.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=yi(e,t,p);if(n)return n}return ci(p)};function Li(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Di(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Di(t,e,n);else{const s="function"==typeof e?an(t,e,n.custom):e;i=Ri(t,s,n)}return i.then(()=>t.notify("AnimationComplete",e))}function Di(t,e,n={}){const i=an(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Ri(t,i,n):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,c=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(ki).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(Di(t,e,{...o,delay:n+c(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(e)}return Promise.all([o(),r(n.delay)])}function Ri(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");i&&(o=i);const l=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e),s=a[e];if(!i||void 0===s||u&&Bi(u,e))continue;const r={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!i.hasAnimated){const n=t.getProps()[fn];n&&(r.elapsed=window.HandoffAppearAnimations(n,e,i,Se))}let h=i.start(Mi(e,i,s,t.shouldReduceMotion&&O.has(e)?{type:!1}:r));mn(c)&&(c.add(e),h=h.then(()=>c.remove(e))),l.push(h)}return Promise.all(l).then(()=>{r&&ln(t,r)})}function ki(t,e){return t.sortNodePosition(e)}function Bi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}const Fi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ji=[...Fi].reverse(),Ii=Fi.length;function Oi(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Li(t,e,n)))}(t);const n={animate:Ni(!0),whileInView:Ni(),whileHover:Ni(),whileTap:Ni(),whileDrag:Ni(),whileFocus:Ni(),exit:Ni()};let i=!0;const s=(e,n)=>{const i=an(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),c=t.getVariantContext(!0)||{},l=[],u=new Set;let h={},d=1/0;for(let e=0;e<Ii;e++){const p=ji[e],g=n[p],y=void 0!==a[p]?a[p]:c[p],v=m(y),x=p===r?g.isActive:null;!1===x&&(d=e);let P=y===c[p]&&y!==a[p]&&v;if(P&&i&&t.manuallyAnimateOnMount&&(P=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||f(y)||"boolean"==typeof y)continue;const w=Ui(g.prevProp,y);let E=w||p===r&&g.isActive&&!P&&v||e>d&&v;const b=Array.isArray(y)?y:[y];let S=b.reduce(s,{});!1===x&&(S={});const{prevResolvedValues:T={}}=g,C={...T,...S},A=t=>{E=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in C){const e=S[t],n=T[t];h.hasOwnProperty(t)||(e!==n?It(e)&&It(n)?!me(e,n)||w?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),i&&t.blockInitialAnimation&&(E=!1),E&&!P&&l.push(...b.map(t=>({animation:t,options:{type:p,...o}})))}if(u.size){const e={};u.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),l.push({animation:e})}let p=Boolean(l.length);return i&&!1===a.initial&&!t.manuallyAnimateOnMount&&(p=!1),i=!1,p?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)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,i)}),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Ui(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!me(e,t)}function Ni(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let zi=0;const Wi={animation:{Feature:class extends ne{constructor(t){super(t),t.animationState||(t.animationState=Oi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),f(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ne{constructor(){super(...arguments),this.id=zi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Hi=(t,e)=>Math.abs(t-e);function $i(t,e){const n=Hi(t.x,e.x),i=Hi(t.y,e.y);return Math.sqrt(n**2+i**2)}class Yi{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=qi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=$i(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=ge;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Xi(e,this.transformPagePoint),Se.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:i}=this.handlers,s=qi("pointercancel"===t.type?this.lastMoveEventInfo:Xi(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),i&&i(t,s)},!Yt(t))return;this.handlers=e,this.transformPagePoint=n;const i=Xi(Xt(t),this.transformPagePoint),{point:s}=i,{timestamp:o}=ge;this.history=[{...s,timestamp:o}];const{onSessionStart:r}=e;r&&r(t,qi(i,this.history)),this.removeListeners=_t(qt(window,"pointermove",this.handlePointerMove),qt(window,"pointerup",this.handlePointerUp),qt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Te.update(this.updatePoint)}}function Xi(t,e){return e?{point:e(t.point)}:t}function Gi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function qi({point:t},e){return{point:t,delta:Gi(t,_i(e)),offset:Gi(t,Zi(e)),velocity:Ki(e,.1)}}function Zi(t){return t[0]}function _i(t){return t[t.length-1]}function Ki(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=_i(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>vn(e)));)n--;if(!i)return{x:0,y:0};const o=(s.timestamp-i.timestamp)/1e3;if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ji(t){return t.max-t.min}function Qi(t,e=0,n=.01){return Math.abs(t-e)<=n}function ts(t,e,n,i=.5){t.origin=i,t.originPoint=Tn(e.min,e.max,t.origin),t.scale=Ji(n)/Ji(e),(Qi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Tn(n.min,n.max,t.origin)-t.originPoint,(Qi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function es(t,e,n,i){ts(t.x,e.x,n.x,i?i.originX:void 0),ts(t.y,e.y,n.y,i?i.originY:void 0)}function ns(t,e,n){t.min=n.min+e.min,t.max=t.min+Ji(e)}function is(t,e,n){t.min=e.min-n.min,t.max=t.min+Ji(e)}function ss(t,e,n){is(t.x,e.x,n.x),is(t.y,e.y,n.y)}function os(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 rs(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const as=.35;function cs(t,e,n){return{min:ls(t,e),max:ls(t,n)}}function ls(t,e){return"number"==typeof t?t:t[e]||0}const us=()=>({x:{min:0,max:0},y:{min:0,max:0}});function hs(t){return[t("x"),t("y")]}function ds({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ps(t){return void 0===t||1===t}function ms({scale:t,scaleX:e,scaleY:n}){return!ps(t)||!ps(e)||!ps(n)}function fs(t){return ms(t)||gs(t)||t.z||t.rotate||t.rotateX||t.rotateY}function gs(t){return ys(t.x)||ys(t.y)}function ys(t){return t&&"0%"!==t}function vs(t,e,n){return n+e*(t-n)}function xs(t,e,n,i,s){return void 0!==s&&(t=vs(t,s,i)),vs(t,n,i)+e}function Ps(t,e=0,n=1,i,s){t.min=xs(t.min,e,n,i,s),t.max=xs(t.max,e,n,i,s)}function ws(t,{x:e,y:n}){Ps(t.x,e.translate,e.scale,e.originPoint),Ps(t.y,n.translate,n.scale,n.originPoint)}function Es(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function bs(t,e){t.min=t.min+e,t.max=t.max+e}function Ss(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Tn(t.min,t.max,o);Ps(t,e[n],e[i],r,e.scale)}const Ts=["x","scaleX","originX"],Cs=["y","scaleY","originY"];function As(t,e){Ss(t.x,e,Ts),Ss(t.y,e,Cs)}function Vs(t,e){return ds(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Ms=new WeakMap;class Ls{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(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new Yi(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(Xt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=te(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),hs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ot.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Ji(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&s(t,e);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&s(t,e)}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Ds(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Tn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Tn(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&p(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:os(t.x,n,s),y:os(t.y,e,i)}}(n.layoutBox,t),this.elastic=function(t=as){return!1===t?t=0:!0===t&&(t=as),{x:cs(t,"left","right"),y:cs(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hs(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!p(t))return!1;const n=t.current;yn(null!==n);const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=Vs(t,n),{scroll:s}=e;return s&&(bs(i.x,s.offset.x),bs(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:rs(t.x,e.x),y:rs(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ds(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},c=hs(r=>{if(!Ds(r,e,this.currentDirection))return;let c=a&&a[r]||{};o&&(c={min:0,max:0});const l=i?200:1e6,u=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(r,h)});return Promise.all(c).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Mi(t,n,0,e))}stopAnimation(){hs(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){hs(e=>{const{drag:n}=this.getProps();if(!Ds(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Tn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!p(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};hs(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=Ji(t),s=Ji(e);return s>i?n=Fn(e.min,e.max-i,t.min):i>s&&(n=Fn(t.min,t.max-s,e.min)),q(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),hs(e=>{if(!Ds(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Tn(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Ms.set(this.visualElement,this);const t=qt(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();p(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=$t(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(hs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=as,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Ds(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}function Rs(t,e,n={}){const i=N(t)?t:Fe(t);return i.start(Mi("",i,e,n)),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}const ks=["TopLeft","TopRight","BottomLeft","BottomRight"],Bs=ks.length,Fs=t=>"string"==typeof t?parseFloat(t):t,js=t=>"number"==typeof t||rt.test(t);function Is(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Os=Ns(0,.5,Hn),Us=Ns(.5,.95,oe);function Ns(t,e,n){return i=>i<t?0:i>e?1:n(Fn(t,e,i))}function zs(t,e){t.min=e.min,t.max=e.max}function Ws(t,e){zs(t.x,e.x),zs(t.y,e.y)}function Hs(t,e,n,i,s){return t=vs(t-=e,1/n,i),void 0!==s&&(t=vs(t,1/s,i)),t}function $s(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(ot.test(e)){e=parseFloat(e);e=Tn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Tn(o.min,o.max,i);t===o&&(a-=e),t.min=Hs(t.min,e,n,a,s),t.max=Hs(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Ys=["x","scaleX","originX"],Xs=["y","scaleY","originY"];function Gs(t,e,n,i){$s(t.x,e,Ys,n?n.x:void 0,i?i.x:void 0),$s(t.y,e,Xs,n?n.y:void 0,i?i.y:void 0)}function qs(t){return 0===t.translate&&1===t.scale}function Zs(t){return qs(t.x)&&qs(t.y)}function _s(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ks(t){return Ji(t.x)/Ji(t.y)}class Js{constructor(){this.members=[]}add(t){Le(this.members,t),t.scheduleRender()}remove(t){if(De(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Qs(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const to=(t,e)=>t.depth-e.depth;class eo{constructor(){this.children=[],this.isDirty=!1}add(t){Le(this.children,t),this.isDirty=!0}remove(t){De(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(to),this.isDirty=!1,this.children.forEach(t)}}const no=["","X","Y","Z"];let io=0;const so={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t,n={},i=(null==e?void 0:e())){this.id=io++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;so.totalNodes=so.resolvedTargetDeltas=so.recalculatedProjection=0,this.nodes.forEach(co),this.nodes.forEach(fo),this.nodes.forEach(go),this.nodes.forEach(lo),t=so,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=n,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new eo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Re),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=vi(i,250),T.hasAnimatedSinceResize&&(T.hasAnimatedSinceResize=!1,this.nodes.forEach(mo))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Eo,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),c=!this.targetLayout||!_s(this.targetLayout,i)||n,l=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||e&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,l);const e={...Vi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||mo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Te.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(yo),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ho);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(bo),this.potentialNodes.clear()),this.nodes.forEach(po),this.nodes.forEach(ro),this.nodes.forEach(ao),this.clearAllSnapshots(),Ce.update(),Ce.preRender(),Ce.render())}clearAllSnapshots(){this.nodes.forEach(uo),this.sharedNodes.forEach(vo)}scheduleUpdateProjection(){Se.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Se.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Zs(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||fs(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),So((i=n).x),So(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(bs(e.x,n.offset.x),bs(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ws(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){Ws(e,t);const{scroll:n}=this.root;n&&(bs(e.x,-n.offset.x),bs(e.y,-n.offset.y))}bs(e.x,s.offset.x),bs(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ws(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&As(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),fs(i.latestValues)&&As(n,i.latestValues)}return fs(this.latestValues)&&As(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ws(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!fs(n.latestValues))continue;ms(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Ws(i,n.measurePageBox()),Gs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return fs(this.latestValues)&&Gs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);if(!((Boolean(this.resumingFrom)||this!==e)&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:n,layoutId:i}=this.options;if(this.layout&&(n||i)){if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ss(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,o,r;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(s=this.target,o=this.relativeTarget,r=this.relativeParent.target,ns(s.x,o.x,r.x),ns(s.y,o.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ws(this.target,this.layout.layoutBox),ws(this.target,this.targetDelta)):Ws(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},ss(this.relativeTargetOrigin,this.target,t.target),Ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}so.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ms(this.parent.latestValues)&&!gs(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Ws(this.layoutCorrected,this.layout.layoutBox),function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&As(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ws(t,r)),i&&fs(o.latestValues)&&As(t,o.latestValues))}e.x=Es(e.x),e.y=Es(e.y)}(this.layoutCorrected,this.treeScale,this.path,n);const{target:r}=e;if(!r)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const a=this.treeScale.x,c=this.treeScale.y,l=this.projectionTransform;es(this.projectionDelta,this.layoutCorrected,r,this.latestValues),this.projectionTransform=Qs(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===a&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",r)),so.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=Boolean(a&&!l&&!0===this.options.crossfade&&!this.path.some(wo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var c,d,p,m;xo(o.x,t.x,n),xo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ss(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Po(c.x,d.x,p.x,m),Po(c.y,d.y,p.y,m),h&&_s(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ws(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Tn(0,void 0!==n.opacity?n.opacity:1,Os(i)),t.opacityExit=Tn(void 0!==e.opacity?e.opacity:1,0,Us(i))):o&&(t.opacity=Tn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Bs;s++){const o=`border${ks[s]}Radius`;let r=Is(e,o),a=Is(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||js(r)===js(a)?(t[o]=Math.max(Tn(Fs(r),Fs(a),i),0),(ot.test(a)||ot.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Tn(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Te.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Se.update(()=>{T.hasAnimatedSinceResize=!0,this.currentAnimation=Rs(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&To(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ji(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ji(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ws(e,n),As(e,s),es(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Js);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<no.length;e++){const s="rotate"+no[e];n[s]&&(i[s]=n[s],t.setStaticValue(s,0))}t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n;const i={};if(!this.instance||this.isSVG)return i;if(!this.isVisible)return{visibility:"hidden"};i.visibility="";const s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Ot(t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Ot(t.pointerEvents)||""),this.hasProjected&&!fs(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=Qs(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:c}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*c.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in F){if(void 0===r[t])continue;const{correct:e,applyTo:n}=F[t],s="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?Ot(t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(ho),this.root.sharedNodes.clear()}}}function ro(t){t.updateLayout()}function ao(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?hs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Ji(i);i.min=e[t].min,i.max=i.min+s}):To(s,n.layoutBox,e)&&hs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Ji(e[t]);i.max=i.min+s});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};es(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?es(a,t.applyTransform(i,!0),n.measuredBox):es(a,e,n.layoutBox);const c=!Zs(r);let l=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};ss(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};ss(a,e,o.layoutBox),_s(r,a)||(l=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function co(t){so.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function lo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function uo(t){t.clearSnapshot()}function ho(t){t.clearMeasurements()}function po(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function mo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function fo(t){t.resolveTargetDelta()}function go(t){t.calcProjection()}function yo(t){t.resetRotation()}function vo(t){t.removeLeadSnapshot()}function xo(t,e,n){t.translate=Tn(e.translate,0,n),t.scale=Tn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Po(t,e,n,i){t.min=Tn(e.min,n.min,i),t.max=Tn(e.max,n.max,i)}function wo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Eo={duration:.45,ease:[.4,0,.1,1]};function bo(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function So(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function To(t,e,n){return"position"===t||"preserve-aspect"===t&&!Qi(Ks(e),Ks(n),.2)}const Co=oo({attachResizeListener:(t,e)=>$t(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ao={current:void 0},Vo=oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ao.current){const t=new Co(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Ao.current=t}return Ao.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Mo=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Lo(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Mo);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function Do(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ro={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${Do(t,e.target.x)}% ${Do(t,e.target.y)}%`}},ko=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Bo(t,e,n=1){yn(n<=4);const[i,s]=function(t){const e=ko.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);return o?o.trim():X(s)?Bo(s,e,n+1):s}const Fo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=t.includes("var("),o=[];s&&(t=t.replace(ko,t=>(o.push(t),"_$css")));const r=Ge.parse(t);if(r.length>5)return i;const a=Ge.createTransformer(t),c="number"!=typeof r[0]?1:0,l=n.x.scale*e.x,u=n.y.scale*e.y;r[0+c]/=l,r[1+c]/=u;const h=Tn(l,u,.5);"number"==typeof r[2+c]&&(r[2+c]/=h),"number"==typeof r[3+c]&&(r[3+c]/=h);let d=a(r);if(s){let t=0;d=d.replace("_$css",()=>{const e=o[t];return t++,e})}return d}},jo=new Set(["width","height","top","left","right","bottom","x","y"]),Io=t=>jo.has(t),Oo=t=>t===Z||t===rt,Uo=(t,e)=>parseFloat(t.split(", ")[e]),No=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return Uo(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?Uo(e[1],t):0}},zo=new Set(["x","y","z"]),Wo=I.filter(t=>!zo.has(t));const Ho={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:No(4,13),y:No(5,14)},$o=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(Io);let o=[],r=!1;const a=[];if(s.forEach(s=>{const c=t.getValue(s);if(!t.hasValue(s))return;let l=n[s],u=sn(l);const h=e[s];let d;if(It(h)){const t=h.length,e=null===h[0]?1:0;l=h[e],u=sn(l);for(let n=e;n<t;n++)d?yn(sn(h[n])===d):(d=sn(h[n]),yn(d===u||Oo(u)&&Oo(d)))}else d=sn(h);if(u!==d)if(Oo(u)&&Oo(d)){const t=c.get();"string"==typeof t&&c.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[s]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===l||0===h)?0===l?c.set(d.transform(l)):e[s]=u.transform(h):(r||(o=function(t){const e=[];return Wo.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t),r=!0),a.push(s),i[s]=void 0!==i[s]?i[s]:e[s],c.jump(h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Ho[t](i,o)}),e.render();const c=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=Ho[n](c,o)}),t})(e,t,a);return o.length&&o.forEach(([e,n])=>{t.getValue(e).set(n)}),t.render(),u&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function Yo(t,e,n,i){return(t=>Object.keys(t).some(Io))(e)?$o(t,e,n,i):{target:e,transitionEnd:i}}const Xo=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(t=>{const e=t.get();if(!X(e))return;const n=Bo(e,i);n&&t.set(n)});for(const t in e){const s=e[t];if(!X(s))continue;const o=Bo(s,i);o&&(e[t]=o,n&&void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,i);return Yo(t,e=s.target,n,i=s.transitionEnd)},Go={current:null},qo={current:!1};function Zo(){if(qo.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Go.current=t.matches;t.addListener(e),e()}else Go.current=!1}const _o=Object.keys(E),Ko=_o.length,Jo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Qo=g.length;class tr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Se.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=y(e),this.isVariantNode=v(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(e,{});for(const t in l){const e=l[t];void 0!==r[t]&&N(e)&&(e.set(r[t],!1),mn(c)&&c.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),qo.current||Zo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Go.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Te.update(this.notifyUpdate),Te.render(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=O.has(t),i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Se.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),s()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s,o){let r,a;for(let t=0;t<Ko;t++){const n=_o[t],{isEnabled:i,Feature:s,ProjectionNode:o,MeasureLayout:c}=E[n];o&&(r=o),i(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),c&&(a=c))}if(!this.projection&&r){this.projection=new r(s,this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(i)||a&&p(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:c,layoutRoot:l})}return a}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update(this.props,this.prevProps):(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Jo.length;e++){const n=Jo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(N(o))t.addValue(s,o),mn(i)&&i.add(s);else if(N(r))t.addValue(s,Fe(o,{owner:t})),mn(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,Fe(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Qo;t++){const n=g[t],i=this.props[n];(m(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Fe(e,{owner:this}),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=jt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||N(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new Re),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class er extends tr{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:i},s){let o=pn(n,t||{},this);if(i&&(e&&(e=i(e)),n&&(n=i(n)),o&&(o=i(o))),s){hn(this,n,o);const t=Xo(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class nr extends er{readValueFromInstance(t,e){if(O.has(e)){const t=Qe(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(Y(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Vs(t,e)}build(t,e,n,i){dt(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;N(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,i){Dt(t,e,n,i)}}function ir(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=e.useId();e.useEffect(()=>s(o),[]);return!n&&i?[!1,()=>i&&i(o)]:[!0]}class sr extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;j(rr),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),T.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Se.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function or(t){const[n,i]=ir(),s=e.useContext(A);return o.default.createElement(sr,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(V),isPresent:n,safeToRemove:i})}const rr={borderRadius:{...Ro,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ro,borderTopRightRadius:Ro,borderBottomLeftRadius:Ro,borderBottomRightRadius:Ro,boxShadow:Fo},ar={pan:{Feature:class extends ne{constructor(){super(...arguments),this.removePointerDownListener=oe}onPointerDown(t){this.session=new Yi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:t,onStart:e,onMove:n,onEnd:(t,e)=>{delete this.session,i&&i(t,e)}}}mount(){this.removePointerDownListener=qt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ne{constructor(t){super(t),this.removeGroupControls=oe,this.removeListeners=oe,this.controls=new Ls(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||oe}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vo,MeasureLayout:or}};class cr extends er{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(O.has(e)){const t=Qe(e);return t&&t.default||0}return e=Rt.has(e)?e:Lt(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Ft(t,e)}build(t,e,n,i){Tt(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){kt(t,e,0,i)}mount(t){this.isSVGTag=At(t.tagName),super.mount(t)}}const lr=(t,e)=>B(t)?new cr(e,{enableHardwareAcceleration:!1}):new nr(e,{enableHardwareAcceleration:!0}),ur={layout:{ProjectionNode:Vo,MeasureLayout:or}},hr={...Wi,...pe,...ar,...ur},dr=R((t,e)=>Ht(t,e,hr,lr));const pr=R(Ht);function mr(){const t=e.useRef(!1);return h(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function fr(){const t=mr(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>Se.postRender(s),[s]),n]}class gr extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function yr({children:t,isPresent:n}){const i=e.useId(),o=e.useRef(null),r=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect(()=>{const{width:t,height:e,top:s,left:a}=r.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=i;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${s}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[n]),s.createElement(gr,{isPresent:n,childRef:o,sizeRef:r},s.cloneElement(t,{ref:o}))}const vr=({children:t,initial:n,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:c})=>{const u=S(xr),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:i,custom:r,onExitComplete:t=>{u.set(t,!0);for(const t of u.values())if(!t)return;o&&o()},register:t=>(u.set(t,!1),()=>u.delete(t))}),a?void 0:[i]);return e.useMemo(()=>{u.forEach((t,e)=>u.set(e,!1))},[i]),s.useEffect(()=>{!i&&!u.size&&o&&o()},[i]),"popLayout"===c&&(t=s.createElement(yr,{isPresent:i},t)),s.createElement(l.Provider,{value:d},t)};function xr(){return new Map}function Pr(t){return e.useEffect(()=>()=>t(),[])}const wr=t=>t.key||"";const Er=e.createContext(null),br=t=>!0===t,Sr=({children:t,id:n,inheritId:i,inherit:o=!0})=>{void 0!==i&&(o=i);const r=e.useContext(A),a=e.useContext(Er),[c,l]=fr(),u=e.useRef(null),h=r.id||a;null===u.current&&((t=>br(!0===t)||"id"===t)(o)&&h&&(n=n?h+"-"+n:h),u.current={id:n,group:br(o)&&r.group||Lo()});const d=e.useMemo(()=>({...u.current,forceRender:c}),[l]);return s.createElement(A.Provider,{value:d},t)};let Tr=0;function Cr(t){return"function"==typeof t}const Ar=e.createContext(null);const Vr=e.forwardRef((function({children:t,as:n="ul",axis:i="y",onReorder:o,values:r,...a},c){const l=S(()=>dr(n)),u=[],h=e.useRef(!1);yn(Boolean(r));const d={axis:i,registerItem:(t,e)=>{e&&-1===u.findIndex(e=>t===e.value)&&(u.push({value:t,layout:e[i]}),u.sort(Lr))},updateOrder:(t,e,n)=>{if(h.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],c=r.layout,l=Tn(c.min,c.max,.5);return 1===o&&a.layout.max+n>l||-1===o&&a.layout.min+n<l?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(h.current=!0,o(i.map(Mr).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),s.createElement(l,{...a,ref:c,ignoreStrict:!0},s.createElement(Ar.Provider,{value:d},t))}));function Mr(t){return t.value}function Lr(t,e){return t.layout.min-e.layout.min}function Dr(t){const n=S(()=>Fe(t)),{isStatic:i}=e.useContext(r);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Rr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=On(s,o,{mixer:(c=o[0],(t=>"object"==typeof t&&t.mix)(c)?c.mix:void 0),...r});var c;return e?a(i):a}function kr(t,e){const n=Dr(e()),i=()=>n.set(e());return i(),h(()=>{const e=()=>Se.update(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Te.update(i)}}),n}function Br(t,e,n,i){const s="function"==typeof e?e:Rr(e,n,i);return Array.isArray(t)?Fr(t,s):Fr([t],([t])=>s(t))}function Fr(t,e){const n=S(()=>[]);return kr(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function jr(t,e=0){return N(t)?t:Dr(e)}const Ir={Group:Vr,Item:e.forwardRef((function({children:t,style:n={},value:i,as:o="li",onDrag:r,layout:a=!0,...c},l){const u=S(()=>dr(o)),h=e.useContext(Ar),d={x:jr(n.x),y:jr(n.y)},p=Br([d.x,d.y],([t,e])=>t||e?1:"unset"),m=e.useRef(null);yn(Boolean(h));const{axis:f,registerItem:g,updateOrder:y}=h;return e.useEffect(()=>{g(i,m.current)},[h]),s.createElement(u,{drag:f,...c,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:p},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[f]&&y(i,d[f].get(),n[f]),r&&r(t,e)},onLayoutMeasure:t=>{m.current=t},ref:l,ignoreStrict:!0},t)}))};var Or;t.AnimationType=void 0,(Or=t.AnimationType||(t.AnimationType={})).Animate="animate",Or.Hover="whileHover",Or.Tap="whileTap",Or.Drag="whileDrag",Or.Focus="whileFocus",Or.InView="whileInView",Or.Exit="exit";const Ur={renderer:lr,...Wi,...pe},Nr={...Ur,...ar,...ur};function zr(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const Wr=new WeakMap;let Hr;function $r({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Wr.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Yr(t){t.forEach($r)}function Xr(t,e){Hr||"undefined"!=typeof ResizeObserver&&(Hr=new ResizeObserver(Yr));const n=zr(t);return n.forEach(t=>{let n=Wr.get(t);n||(n=new Set,Wr.set(t,n)),n.add(e),null==Hr||Hr.observe(t)}),()=>{n.forEach(t=>{const n=Wr.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Hr||Hr.unobserve(t)})}}const Gr=new Set;let qr;function Zr(t){return Gr.add(t),qr||(qr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Gr.forEach(t=>t(e))},window.addEventListener("resize",qr)),()=>{Gr.delete(t),!Gr.size&&qr&&(qr=void 0)}}const _r={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Kr(t,e,n,i){const s=n[e],{length:o,position:r}=_r[e],a=s.current,c=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Fn(0,s.scrollLength,s.current);const l=i-c;s.velocity=l>50?0:ke(s.current-a,l)}const Jr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Qr={start:0,center:.5,end:1};function ta(t,e,n=0){let i=0;if(void 0!==Qr[t]&&(t=Qr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const ea=[0,0];function na(t,e,n,i){let s=Array.isArray(t)?t:ea,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Qr[t]?t:"0"]),o=ta(s[0],n,i),r=ta(s[1],e),o-r}const ia={x:0,y:0};function sa(t,e,n){let{offset:i=Jr.All}=n;const{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){let n={x:0,y:0},i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if(i instanceof SVGGraphicsElement&&"getBBox"in i){const{top:t,left:e}=i.getBBox();for(n.x+=e,n.y+=t;i&&"svg"!==i.tagName;)i=i.parentNode}return n}(s,t):ia,c=s===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:s.clientWidth,height:s.clientHeight},l={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=na(i[t],l[r],c[r],a[o]);u||n===e[o].interpolatorOffsets[t]||(u=!0),e[o].offset[t]=n}u&&(e[o].interpolate=On(e[o].offset,Un(i)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function oa(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){Kr(t,"x",e,n),Kr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&sa(t,n,i)},notify:()=>e(n)}}const ra=new WeakMap,aa=new WeakMap,ca=new WeakMap,la=t=>t===document.documentElement?window:t;function ua(t,{container:e=document.documentElement,...n}={}){let i=ca.get(e);i||(i=new Set,ca.set(e,i));const s=oa(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!ra.has(e)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};ra.set(e,t);const n=la(e);window.addEventListener("resize",t,{passive:!0}),e!==document.documentElement&&aa.set(e,(r=t,"function"==typeof(o=e)?Zr(o):Xr(o,r))),n.addEventListener("scroll",t,{passive:!0})}var o,r;const a=ra.get(e),c=requestAnimationFrame(a);return()=>{var t;cancelAnimationFrame(c);const n=ca.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=ra.get(e);ra.delete(e),i&&(la(e).removeEventListener("scroll",i),null===(t=aa.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}function ha(t,e){gn(Boolean(!e||e.current))}const da=()=>({scrollX:Fe(0),scrollY:Fe(0),scrollXProgress:Fe(0),scrollYProgress:Fe(0)});function pa({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=S(da);return(i?h:e.useEffect)(()=>(ha(0,n),ha(0,t),ua(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),o}function ma(t){const n=e.useRef(0),{isStatic:i}=e.useContext(r);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return Se.update(e,!0),()=>Te.update(e)},[t])}class fa extends Be{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;O.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Y(t)||"willChange"===t||(e=Lt(t)),e&&(Le(this.members,e),this.update())}remove(t){O.has(t)?(this.transforms.delete(t),this.transforms.size||De(this.members,"transform")):De(this.members,Lt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ga(){!qo.current&&Zo();const[t]=e.useState(Go.current);return t}function ya(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,i){yn(t);const s=[];return e.forEach(t=>{s.push(Li(t,n,{transitionOverride:i}))}),Promise.all(s)},set:n=>(yn(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?un(t,e):"string"==typeof e?un(t,[e]):ln(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function va(){const t=S(ya);return h(t.mount,[]),t}const xa=va,Pa=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};const wa={any:0,all:1};class Ea{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const ba=()=>new Ea;function Sa(t){return null!==t&&"object"==typeof t&&M in t}function Ta(){return Ca}function Ca(t){Ao.current&&(Ao.current.isUpdating=!1,Ao.current.blockUpdate(),t&&t())}const Aa=(t,e)=>`${t}: ${e}`,Va=new Map;function Ma(t,e,n,i){const s=Aa(t,O.has(e)?"transform":e),o=Va.get(s);if(!o)return 0;const{animation:r,startTime:a}=o,c=()=>{Va.delete(s);try{r.cancel()}catch(t){}};if(null!==a){const t=performance.now();return i.update(()=>{n.animation&&(n.animation.currentTime=performance.now()-t)}),i.render(c),t-a||0}return c(),0}const La=()=>({});class Da extends tr{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n}){return hn(this,n,pn(n,t||{},this)),{transition:t,transitionEnd:e,...n}}}const Ra=Ut({scrapeMotionValuesFromProps:La,createRenderState:La});const ka=t=>t>.001?1/t:1e5;let Ba=!1;t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:c="sync"})=>{r&&(c="wait");let[l]=fr();const u=e.useContext(A).forceRender;u&&(l=u);const d=mr(),p=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=p;const f=new Set,g=e.useRef(m),y=e.useRef(new Map).current,v=e.useRef(!0);if(h(()=>{v.current=!1,function(t,e){t.forEach(t=>{const n=wr(t);e.set(n,t)})}(p,y),g.current=m}),Pr(()=>{v.current=!0,y.clear(),f.clear()}),v.current)return s.createElement(s.Fragment,null,m.map(t=>s.createElement(vr,{key:wr(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:a,mode:c},t)));m=[...m];const x=g.current.map(wr),P=p.map(wr),w=x.length;for(let t=0;t<w;t++){const e=x[t];-1===P.indexOf(e)&&f.add(e)}return"wait"===c&&f.size&&(m=[]),f.forEach(t=>{if(-1!==P.indexOf(t))return;const e=y.get(t);if(!e)return;const i=x.indexOf(t);m.splice(i,0,s.createElement(vr,{key:wr(e),isPresent:!1,onExitComplete:()=>{y.delete(t),f.delete(t);const e=g.current.findIndex(e=>e.key===t);if(g.current.splice(e,1),!f.size){if(g.current=p,!1===d.current)return;l(),o&&o()}},custom:n,presenceAffectsLayout:a,mode:c},e))}),m=m.map(t=>{const e=t.key;return f.has(e)?t:s.createElement(vr,{key:wr(t),isPresent:!0,presenceAffectsLayout:a,mode:c},t)}),s.createElement(s.Fragment,null,f.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(s.useEffect(()=>{gn(!1)},[]),s.createElement(Sr,{id:S(()=>"asl-"+Tr++)},t)),t.DeprecatedLayoutGroupContext=Er,t.DragControls=Ea,t.FlatTree=eo,t.LayoutGroup=Sr,t.LayoutGroupContext=A,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,o]=e.useState(!Cr(n)),r=e.useRef(void 0);if(!Cr(n)){const{renderer:t,...e}=n;r.current=t,b(e)}return e.useEffect(()=>{Cr(n)&&n().then(({renderer:t,...e})=>{b(e),r.current=t,o(!0)})},[]),s.createElement(d.Provider,{value:{renderer:r.current,strict:i}},t)},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Pt(n),(i={...e.useContext(r),...i}).isStatic=S(()=>i.isStatic);const o=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return s.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionValue=Be,t.PresenceContext=l,t.Reorder=Ir,t.SwitchLayoutGroupContext=V,t.VisualElement=tr,t.addPointerEvent=qt,t.addPointerInfo=Gt,t.addScaleCorrector=j,t.animate=Rs,t.animateValue=ci,t.animateVisualElement=Li,t.animationControls=ya,t.animations=Wi,t.anticipate=qn,t.backIn=Xn,t.backInOut=Gn,t.backOut=Yn,t.buildTransform=H,t.calcLength=Ji,t.checkTargetForNewValues=hn,t.circIn=Wn,t.circInOut=$n,t.circOut=Hn,t.clamp=q,t.color=We,t.complex=Ge,t.createBox=us,t.createDomMotionComponent=function(t){return L(Ht(t,{forwardMotionProps:!1},hr,lr))},t.createMotionComponent=L,t.cubicBezier=zn,t.delay=vi,t.distance=Hi,t.distance2D=$i,t.domAnimation=Ur,t.domMax=Nr,t.easeIn=En,t.easeInOut=Sn,t.easeOut=bn,t.filterProps=wt,t.frameData=ge,t.inertia=Pi,t.interpolate=On,t.invariant=yn,t.isBrowser=u,t.isDragActive=ee,t.isMotionComponent=Sa,t.isMotionValue=N,t.isValidMotionProp=vt,t.m=pr,t.makeUseVisualState=Ut,t.mix=Tn,t.motion=dr,t.motionValue=Fe,t.optimizedAppearDataAttribute=fn,t.pipe=_t,t.progress=Fn,t.px=rt,t.resolveMotionValue=Ot,t.spring=ii,t.startOptimizedAppearAnimation=function(t,e,n,i,s){const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=Ma;const r=Aa(o,e),a=di(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});Va.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const o=di(t,e,n,i);document.timeline&&(o.startTime=document.timeline.currentTime),Va.set(r,{animation:o,startTime:performance.now()}),s&&s(o)};a.ready?a.ready.then(c).catch(oe):c()},t.sync=Se,t.transform=Rr,t.unwrapMotionComponent=function(t){if(Sa(t))return t[M]},t.useAnimation=xa,t.useAnimationControls=va,t.useAnimationFrame=ma,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?Pa(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ra({},!1),o=S(()=>new Da({props:{},visualState:s,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{i({...t})}},null)},[i,o]),[n,S(()=>t=>Li(o,t))]},t.useDeprecatedInvertedScale=function(t){let e=Dr(1),n=Dr(1);const i=c();return yn(!(!t&&!i)),gn(Ba),Ba=!0,t?(e=t.scaleX||e,n=t.scaleY||n):i&&(e=i.getValue("scaleX",1),n=i.getValue("scaleY",1)),{scaleX:Br(e,ka),scaleY:Br(n,ka)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return $t(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return S(ba)},t.useElementScroll=function(t){return pa({container:t})},t.useForceUpdate=fr,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:i,amount:"some"===s?"any":s};return function(t,e,{root:n,margin:i,amount:s="any"}={}){if("undefined"==typeof IntersectionObserver)return()=>{};const o=zr(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:wa[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,i,o]),r},t.useInstantLayoutTransition=Ta,t.useInstantTransition=function(){const[t,n]=fr(),i=Ta();return e.useEffect(()=>{Se.postRender(()=>Se.postRender(()=>xn.current=!1))},[n]),e=>{i(()=>{xn.current=!0,t(),e()})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=h,t.useMotionTemplate=function(t,...e){const n=t.length;return kr(e.filter(N),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=N(n)?n.get():n)}return i}))},t.useMotionValue=Dr,t.useMotionValueEvent=function(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])},t.usePresence=ir,t.useReducedMotion=ga,t.useReducedMotionConfig=function(){const t=ga(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return s.useCallback(()=>{const t=Ao.current;t&&t.resetTree()},[])},t.useScroll=pa,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(r),s=e.useRef(null),o=Dr(N(t)?t.get():t),a=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>i?e(t):(a(),s.current=ci({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",...n,onUpdate:e}),o.get()),a),[JSON.stringify(n)]),h(()=>{if(N(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Dr(0);return ma(e=>t.set(e)),t},t.useTransform=Br,t.useUnmountEffect=Pr,t.useVelocity=function(t){const n=Dr(t.getVelocity());return e.useEffect(()=>t.on("velocityChange",t=>{n.set(t)}),[t]),n},t.useViewportScroll=function(){return pa()},t.useVisualElementContext=c,t.useWillChange=function(){return S(()=>new fa("auto"))},t.warning=gn,t.wrap=Pa,Object.defineProperty(t,"__esModule",{value:!0})}));