yacd/assets/index-534e085e.js
2023-02-12 15:03:37 +00:00

9 lines
112 KiB
JavaScript

import{r as p,R as rn}from"./index-3e6aad90.js";const K=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ce=p.createContext({});function ei(){return p.useContext(ce).visualElement}const gt=p.createContext(null),ue=typeof document<"u",Q=ue?p.useLayoutEffect:p.useEffect,on=p.createContext({strict:!1});function jr(t,e,n,s){const i=ei(),o=p.useContext(on),r=p.useContext(gt),a=p.useContext(K).reducedMotion,c=p.useRef();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceId:r?r.id:void 0,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;return Q(()=>{u&&u.render()}),(window.HandoffAppearAnimations?Q:p.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function ft(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function _r(t,e,n){return p.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ft(n)&&(n.current=s))},[e])}function Et(t){return typeof t=="string"||Array.isArray(t)}function le(t){return typeof t=="object"&&typeof t.start=="function"}const Ur=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function fe(t){return le(t.animate)||Ur.some(e=>Et(t[e]))}function ni(t){return Boolean(fe(t)||t.variants)}function zr(t,e){if(fe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Et(n)?n:void 0,animate:Et(s)?s:void 0}}return t.inherit!==!1?e:{}}function Nr(t){const{initial:e,animate:n}=zr(t,p.useContext(ce));return p.useMemo(()=>({initial:e,animate:n}),[Wn(e),Wn(n)])}function Wn(t){return Array.isArray(t)?t.join(" "):t}const G=t=>({isEnabled:e=>t.some(n=>!!e[n])}),Lt={measureLayout:G(["layout","layoutId","drag"]),animation:G(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:G(["exit"]),drag:G(["drag","dragControls"]),focus:G(["whileFocus"]),hover:G(["whileHover","onHoverStart","onHoverEnd"]),tap:G(["whileTap","onTap","onTapStart","onTapCancel"]),pan:G(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:G(["whileInView","onViewportEnter","onViewportLeave"])};function Be(t){for(const e in t)e==="projectionNodeConstructor"?Lt.projectionNodeConstructor=t[e]:Lt[e].Component=t[e]}function D(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Pt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Wr=1;function $r(){return D(()=>{if(Pt.hasEverUpdated)return Wr++})}const Dt=p.createContext({});class Gr extends rn.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:n}=this.props;return e&&e.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const si=p.createContext({}),an=Symbol.for("motionComponentSymbol");function ii({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:n,useRender:s,useVisualState:i,Component:o}){t&&Be(t);function r(c,u){const l={...p.useContext(K),...c,layoutId:Hr(c)},{isStatic:d}=l;let f=null;const h=Nr(c),m=d?void 0:$r(),g=i(c,d);if(!d&&ue){h.visualElement=jr(o,g,l,e);const b=p.useContext(si);h.visualElement&&(f=h.visualElement.loadFeatures(l,p.useContext(on).strict,t,m,n||Lt.projectionNodeConstructor,b))}return p.createElement(Gr,{visualElement:h.visualElement,props:l},f,p.createElement(ce.Provider,{value:h},s(o,c,m,_r(g,h.visualElement,u),g,d,h.visualElement)))}const a=p.forwardRef(r);return a[an]=o,a}function Hr({layoutId:t}){const e=p.useContext(Dt).id;return e&&t!==void 0?e+"-"+t:t}function ri(t){function e(s,i={}){return ii(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Kr=["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 cn(t){return typeof t!="string"||t.includes("-")?!1:!!(Kr.indexOf(t)>-1||/[A-Z]/.test(t))}const Yt={};function Xr(t){Object.assign(Yt,t)}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],X=new Set(qt);function oi(t,{layout:e,layoutId:n}){return X.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Yt[t]||t==="opacity")}const L=t=>!!(t!=null&&t.getVelocity),Yr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qr=(t,e)=>qt.indexOf(t)-qt.indexOf(e);function Zr({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:s=!0},i,o){let r="";e.sort(qr);for(const a of e)r+=`${Yr[a]||a}(${t[a]}) `;return n&&!t.z&&(r+="translateZ(0)"),r=r.trim(),o?r=o(t,i?"":r):s&&i&&(r="none"),r}function un(t){return t.startsWith("--")}const Jr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,mt=(t,e,n)=>Math.min(Math.max(n,t),e),ut={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ct={...ut,transform:t=>mt(0,1,t)},zt={...ut,default:1},St=t=>Math.round(t*1e5)/1e5,It=/(-)?([\d]*\.?[\d])+/g,Fe=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Qr=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jt(t){return typeof t=="string"}const _t=t=>({test:e=>jt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=_t("deg"),W=_t("%"),V=_t("px"),to=_t("vh"),eo=_t("vw"),$n={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},Gn={...ut,transform:Math.round},ai={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,size:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:zt,scaleX:zt,scaleY:zt,scaleZ:zt,skew:Y,skewX:Y,skewY:Y,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Ct,originX:$n,originY:$n,originZ:V,zIndex:Gn,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:Gn};function ln(t,e,n,s){const{style:i,vars:o,transform:r,transformKeys:a,transformOrigin:c}=t;a.length=0;let u=!1,l=!1,d=!0;for(const f in e){const h=e[f];if(un(f)){o[f]=h;continue}const m=ai[f],g=Jr(h,m);if(X.has(f)){if(u=!0,r[f]=g,a.push(f),!d)continue;h!==(m.default||0)&&(d=!1)}else f.startsWith("origin")?(l=!0,c[f]=g):i[f]=g}if(e.transform||(u||s?i.transform=Zr(t,n,d,s):i.transform&&(i.transform="none")),l){const{originX:f="50%",originY:h="50%",originZ:m=0}=c;i.transformOrigin=`${f} ${h} ${m}`}}const fn=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function ci(t,e,n){for(const s in e)!L(e[s])&&!oi(s,n)&&(t[s]=e[s])}function no({transformTemplate:t},e,n){return p.useMemo(()=>{const s=fn();return ln(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function so(t,e,n){const s=t.style||{},i={};return ci(i,s,t),Object.assign(i,no(t,e,n)),t.transformValues?t.transformValues(i):i}function io(t,e,n){const s={},i=so(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const ro=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 Zt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||ro.has(t)}let ui=t=>!Zt(t);function li(t){t&&(ui=e=>e.startsWith("on")?!Zt(e):t(e))}try{li(require("@emotion/is-prop-valid").default)}catch{}function oo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ui(i)||n===!0&&Zt(i)||!e&&!Zt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Hn(t,e,n){return typeof t=="string"?t:V.transform(e+n*t)}function ao(t,e,n){const s=Hn(e,t.x,t.width),i=Hn(n,t.y,t.height);return`${s} ${i}`}const co={offset:"stroke-dashoffset",array:"stroke-dasharray"},uo={offset:"strokeDashoffset",array:"strokeDasharray"};function lo(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?co:uo;t[o.offset]=V.transform(-s);const r=V.transform(e),a=V.transform(n);t[o.array]=`${r} ${a}`}function dn(t,{attrX:e,attrY:n,originX:s,originY:i,pathLength:o,pathSpacing:r=1,pathOffset:a=0,...c},u,l,d){if(ln(t,c,u,d),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h,dimensions:m}=t;f.transform&&(m&&(h.transform=f.transform),delete f.transform),m&&(s!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=ao(m,s!==void 0?s:.5,i!==void 0?i:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),o!==void 0&&lo(f,o,r,a,!1)}const fi=()=>({...fn(),attrs:{}}),hn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fo(t,e,n,s){const i=p.useMemo(()=>{const o=fi();return dn(o,e,{enableHardwareAcceleration:!1},hn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ci(o,t.style,t),i.style={...o,...i.style}}return i}function ho(t=!1){return(n,s,i,o,{latestValues:r},a)=>{const u=(cn(n)?fo:io)(s,r,a,n),d={...oo(s,typeof n=="string",t),...u,ref:o},{children:f}=s,h=p.useMemo(()=>L(f)?f.get():f,[f]);return i&&(d["data-projection-id"]=i),p.createElement(n,{...d,children:h})}}const Ot=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function di(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const hi=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 pi(t,e,n,s){di(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(hi.has(i)?i:Ot(i),e.attrs[i])}function pn(t,e){const{style:n}=t,s={};for(const i in n)(L(n[i])||e.style&&L(e.style[i])||oi(i,t))&&(s[i]=n[i]);return s}function mi(t,e){const n=pn(t,e);for(const s in t)if(L(t[s])||L(e[s])){const i=s==="x"||s==="y"?"attr"+s.toUpperCase():s;n[i]=t[s]}return n}function mn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}const Jt=t=>Array.isArray(t),po=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),mo=t=>Jt(t)?t[t.length-1]||0:t;function Gt(t){const e=L(t)?t.get():t;return po(e)?e.toValue():e}function go({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:yo(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const gn=t=>(e,n)=>{const s=p.useContext(ce),i=p.useContext(gt),o=()=>go(t,e,s,i);return n?o():D(o)};function yo(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Gt(o[f]);let{initial:r,animate:a}=t;const c=fe(t),u=ni(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const d=l?a:r;return d&&typeof d!="boolean"&&!le(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const m=mn(t,h);if(!m)return;const{transitionEnd:g,transition:b,...T}=m;for(const x in T){let v=T[x];if(Array.isArray(v)){const y=l?v.length-1:0;v=v[y]}v!==null&&(i[x]=v)}for(const x in g)i[x]=g[x]}),i}const vo={useVisualState:gn({scrapeMotionValuesFromProps:mi,createRenderState:fi,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}dn(n,s,{enableHardwareAcceleration:!1},hn(e.tagName),t.transformTemplate),pi(e,n)}})},xo={useVisualState:gn({scrapeMotionValuesFromProps:pn,createRenderState:fn})};function yn(t,{forwardMotionProps:e=!1},n,s,i){return{...cn(t)?vo:xo,preloadedFeatures:n,useRender:ho(e),createVisualElement:s,projectionNodeConstructor:i,Component:t}}var S;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(S||(S={}));function ot(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Qt(t,e,n,s){p.useEffect(()=>{const i=t.current;if(n&&i)return ot(i,e,n,s)},[t,e,n,s])}function bo({whileFocus:t,visualElement:e}){const n=p.useRef(!1),{animationState:s}=e,i=p.useCallback(()=>{let r=!1;try{r=e.current.matches(":focus-visible")}catch{r=!0}!r||!s||(s.setActive(S.Focus,!0),n.current=!0)},[s]),o=p.useCallback(()=>{!n.current||!s||(s.setActive(S.Focus,!1),n.current=!1)},[s]);Qt(e,"focus",t?i:void 0),Qt(e,"blur",t?o:void 0)}const gi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function de(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const yi=t=>e=>gi(e)&&t(e,de(e));function pt(t,e,n,s){return ot(t,e,yi(n),s)}function te(t,e,n,s){return Qt(t,e,n&&yi(n),s)}function vi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Kn=vi("dragHorizontal"),Xn=vi("dragVertical");function xi(t){let e=!1;if(t==="y")e=Xn();else if(t==="x")e=Kn();else{const n=Kn(),s=Xn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function bi(){const t=xi(!0);return t?(t(),!1):!0}function Yn(t,e,n,s){return(i,o)=>{i.type==="touch"||bi()||(n&&t.animationState&&t.animationState.setActive(S.Hover,e),s&&s(i,o))}}function To({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:s}){te(s,"pointerenter",p.useMemo(()=>t||n?Yn(s,!0,Boolean(n),t):void 0,[t,Boolean(n),s]),{passive:!t}),te(s,"pointerleave",p.useMemo(()=>e||n?Yn(s,!1,Boolean(n),e):void 0,[t,Boolean(n),s]),{passive:!e})}const Ti=(t,e)=>e?t===e?!0:Ti(t,e.parentElement):!1;function vn(t){return p.useEffect(()=>()=>t(),[])}const Vo=(t,e)=>n=>e(t(n)),he=(...t)=>t.reduce(Vo);function be(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,de(n))}function Po({onTap:t,onTapStart:e,onTapCancel:n,whileTap:s,visualElement:i,...o}){const r=t||e||n||s,a=p.useRef(!1),c=p.useRef(null),u={passive:!(e||t||n||o.onPointerDown)};function l(){c.current&&c.current(),c.current=null}function d(){return l(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(S.Tap,!1),!bi()}function f(x,v){var y,P,C,w;d()&&(Ti(i.current,x.target)?(w=(C=i.getProps()).onTap)===null||w===void 0||w.call(C,x,v):(P=(y=i.getProps()).onTapCancel)===null||P===void 0||P.call(y,x,v))}function h(x,v){var y,P;d()&&((P=(y=i.getProps()).onTapCancel)===null||P===void 0||P.call(y,x,v))}function m(x,v){var y;const P=i.getProps();P.whileTap&&i.animationState&&i.animationState.setActive(S.Tap,!0),(y=P.onTapStart)===null||y===void 0||y.call(P,x,v)}const g=[Boolean(e),Boolean(t),Boolean(s),i],b=p.useCallback((x,v)=>{l(),!a.current&&(a.current=!0,c.current=he(pt(window,"pointerup",f,u),pt(window,"pointercancel",h,u)),m(x,v))},g);te(i,"pointerdown",r?b:void 0,u);const T=p.useCallback(()=>{const x=ot(i.current,"keydown",y=>{y.key!=="Enter"||a.current||(a.current=!0,c.current=ot(i.current,"keyup",()=>{y.key!=="Enter"||!d()||be("up",i.getProps().onTap)},u),be("down",m))}),v=ot(i.current,"blur",()=>{x(),v(),a.current&&be("cancel",h)})},g);Qt(i,"focus",r?T:void 0),vn(l)}const ke=new WeakMap,Te=new WeakMap,Co=t=>{const e=ke.get(t.target);e&&e(t)},So=t=>{t.forEach(Co)};function Ao({root:t,...e}){const n=t||document;Te.has(n)||Te.set(n,{});const s=Te.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(So,{root:t,...e})),s[i]}function wo(t,e,n){const s=Ao(e);return ke.set(t,n),s.observe(t),()=>{ke.delete(t),s.unobserve(t)}}function Mo({visualElement:t,whileInView:e,onViewportEnter:n,onViewportLeave:s,viewport:i={}}){const o=p.useRef({hasEnteredView:!1,isInView:!1});let r=Boolean(e||n||s);i.once&&o.current.hasEnteredView&&(r=!1),(typeof IntersectionObserver>"u"?Lo:Eo)(r,o.current,t,i)}const Ro={some:0,all:1};function Eo(t,e,n,{root:s,margin:i,amount:o="some",once:r}){p.useEffect(()=>{if(!t||!n.current)return;const a={root:s==null?void 0:s.current,rootMargin:i,threshold:typeof o=="number"?o:Ro[o]},c=u=>{const{isIntersecting:l}=u;if(e.isInView===l||(e.isInView=l,r&&!l&&e.hasEnteredView))return;l&&(e.hasEnteredView=!0),n.animationState&&n.animationState.setActive(S.InView,l);const d=n.getProps(),f=l?d.onViewportEnter:d.onViewportLeave;f&&f(u)};return wo(n.current,a,c)},[t,s,i,o])}function Lo(t,e,n,{fallback:s=!0}){p.useEffect(()=>{!t||!s||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(S.InView,!0)})},[t])}const J=t=>e=>(t(e),null),Vi={inView:J(Mo),tap:J(Po),focus:J(bo),hover:J(To)};function Pi(){const t=p.useContext(gt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=p.useId();return p.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function kl(){return Do(p.useContext(gt))}function Do(t){return t===null?!0:t.isPresent}function Ci(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 Io=t=>/^\-?\d*\.?\d+$/.test(t),Oo=t=>/^0[^.\s]+$/.test(t),H={delta:0,timestamp:0},Si=1/60*1e3,Bo=typeof performance<"u"?()=>performance.now():()=>Date.now(),Ai=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Bo()),Si);function Fo(t){let e=[],n=[],s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const d=l&&i,f=d?e:n;return u&&r.add(c),f.indexOf(c)===-1&&(f.push(c),d&&i&&(s=e.length)),c},cancel:c=>{const u=n.indexOf(c);u!==-1&&n.splice(u,1),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let u=0;u<s;u++){const l=e[u];l(c),r.has(l)&&(a.schedule(l),t())}i=!1,o&&(o=!1,a.process(c))}};return a}const ko=40;let je=!0,Bt=!1,_e=!1;const Ut=["read","update","preRender","render","postRender"],pe=Ut.reduce((t,e)=>(t[e]=Fo(()=>Bt=!0),t),{}),E=Ut.reduce((t,e)=>{const n=pe[e];return t[e]=(s,i=!1,o=!1)=>(Bt||_o(),n.schedule(s,i,o)),t},{}),$=Ut.reduce((t,e)=>(t[e]=pe[e].cancel,t),{}),Ve=Ut.reduce((t,e)=>(t[e]=()=>pe[e].process(H),t),{}),jo=t=>pe[t].process(H),wi=t=>{Bt=!1,H.delta=je?Si:Math.max(Math.min(t-H.timestamp,ko),1),H.timestamp=t,_e=!0,Ut.forEach(jo),_e=!1,Bt&&(je=!1,Ai(wi))},_o=()=>{Bt=!0,je=!0,_e||Ai(wi)};function me(t,e){t.indexOf(e)===-1&&t.push(e)}function Ft(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Uo([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[o]=t.splice(e,1);t.splice(i,0,o)}return t}class xn{constructor(){this.subscriptions=[]}add(e){return me(this.subscriptions,e),()=>Ft(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function bn(t,e){return e?t*(1e3/e):0}const zo=t=>!isNaN(parseFloat(t));class Mi{constructor(e,n={}){this.version="9.0.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=H;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,E.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()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>E.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=zo(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new xn);const s=this.events[e].add(n);return e==="change"?()=>{s(),E.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?bn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n)||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 z(t,e){return new Mi(t,e)}const Tn=(t,e)=>n=>Boolean(jt(n)&&Qr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ri=(t,e,n)=>s=>{if(!jt(s))return s;const[i,o,r,a]=s.match(It);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},No=t=>mt(0,255,t),Pe={...ut,transform:t=>Math.round(No(t))},rt={test:Tn("rgb","red"),parse:Ri("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Pe.transform(t)+", "+Pe.transform(e)+", "+Pe.transform(n)+", "+St(Ct.transform(s))+")"};function Wo(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}}const Ue={test:Tn("#"),parse:Wo,transform:rt.transform},dt={test:Tn("hsl","hue"),parse:Ri("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(St(e))+", "+W.transform(St(n))+", "+St(Ct.transform(s))+")"},O={test:t=>rt.test(t)||Ue.test(t)||dt.test(t),parse:t=>rt.test(t)?rt.parse(t):dt.test(t)?dt.parse(t):Ue.parse(t),transform:t=>jt(t)?t:t.hasOwnProperty("red")?rt.transform(t):dt.transform(t)},Ei="${c}",Li="${n}";function $o(t){var e,n;return isNaN(t)&&jt(t)&&(((e=t.match(It))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Fe))===null||n===void 0?void 0:n.length)||0)>0}function ee(t){typeof t=="number"&&(t=`${t}`);const e=[];let n=0,s=0;const i=t.match(Fe);i&&(n=i.length,t=t.replace(Fe,Ei),e.push(...i.map(O.parse)));const o=t.match(It);return o&&(s=o.length,t=t.replace(It,Li),e.push(...o.map(ut.parse))),{values:e,numColors:n,numNumbers:s,tokenised:t}}function Di(t){return ee(t).values}function Ii(t){const{values:e,numColors:n,tokenised:s}=ee(t),i=e.length;return o=>{let r=s;for(let a=0;a<i;a++)r=r.replace(a<n?Ei:Li,a<n?O.transform(o[a]):St(o[a]));return r}}const Go=t=>typeof t=="number"?0:t;function Ho(t){const e=Di(t);return Ii(t)(e.map(Go))}const tt={test:$o,parse:Di,createTransformer:Ii,getAnimatableNone:Ho},Ko=new Set(["brightness","contrast","saturate","opacity"]);function Xo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(It)||[];if(!s)return t;const i=n.replace(s,"");let o=Ko.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Yo=/([a-z-]*)\(.*?\)/g,ze={...tt,getAnimatableNone:t=>{const e=t.match(Yo);return e?e.map(Xo).join(" "):t}},qo={...ai,color:O,backgroundColor:O,outlineColor:O,fill:O,stroke:O,borderColor:O,borderTopColor:O,borderRightColor:O,borderBottomColor:O,borderLeftColor:O,filter:ze,WebkitFilter:ze},Vn=t=>qo[t];function Pn(t,e){var n;let s=Vn(t);return s!==ze&&(s=tt),(n=s.getAnimatableNone)===null||n===void 0?void 0:n.call(s,e)}const Oi=t=>e=>e.test(t),Zo={test:t=>t==="auto",parse:t=>t},Bi=[ut,V,W,Y,eo,to,Zo],xt=t=>Bi.find(Oi(t)),Jo=[...Bi,O,tt],Qo=t=>Jo.find(Oi(t));function ta(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function ea(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function ge(t,e,n){const s=t.getProps();return mn(s,e,n!==void 0?n:s.custom,ta(t),ea(t))}function na(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,z(n))}function Cn(t,e){const n=ge(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=mo(o[r]);na(t,r,a)}}function Ne(t,e){[...e].reverse().forEach(s=>{var i;const o=t.getVariant(s);o&&Cn(t,o),(i=t.variantChildren)===null||i===void 0||i.forEach(r=>{Ne(r,e)})})}function sa(t,e){if(Array.isArray(e))return Ne(t,e);if(typeof e=="string")return Ne(t,[e]);Cn(t,e)}function Fi(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;a<r;a++){const c=o[a],u=e[c];let l=null;Array.isArray(u)&&(l=u[0]),l===null&&(l=(i=(s=n[c])!==null&&s!==void 0?s:t.readValue(c))!==null&&i!==void 0?i:e[c]),l!=null&&(typeof l=="string"&&(Io(l)||Oo(l))?l=parseFloat(l):!Qo(l)&&tt.test(u)&&(l=Pn(c,u)),t.addValue(c,z(l,{owner:t})),n[c]===void 0&&(n[c]=l),l!==null&&t.setBaseTarget(c,l))}}function ia(t,e){return e?(e[t]||e.default||e).from:void 0}function ki(t,e,n){var s;const i={};for(const o in t){const r=ia(o,e);i[o]=r!==void 0?r:(s=n.getValue(o))===null||s===void 0?void 0:s.get()}return i}function ne(t){return Boolean(L(t)&&t.add)}const ji="framerAppearId",ra="data-"+Ot(ji);var _i=function(){},se=function(){};const Ht=t=>t*1e3,We={current:!1},Sn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,An=t=>e=>1-t(1-e),wn=t=>t*t,oa=An(wn),Mn=Sn(wn),A=(t,e,n)=>-n*t+n*e+t;function Ce(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function aa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ce(c,a,t+1/3),o=Ce(c,a,t),r=Ce(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const Se=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ca=[Ue,rt,dt],ua=t=>ca.find(e=>e.test(t));function qn(t){const e=ua(t);let n=e.parse(t);return e===dt&&(n=aa(n)),n}const Ui=(t,e)=>{const n=qn(t),s=qn(e),i={...n};return o=>(i.red=Se(n.red,s.red,o),i.green=Se(n.green,s.green,o),i.blue=Se(n.blue,s.blue,o),i.alpha=A(n.alpha,s.alpha,o),rt.transform(i))};function zi(t,e){return typeof t=="number"?n=>A(t,e,n):O.test(t)?Ui(t,e):Wi(t,e)}const Ni=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>zi(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}},la=(t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=zi(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},Wi=(t,e)=>{const n=tt.createTransformer(e),s=ee(t),i=ee(e);return s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?he(Ni(s.values,i.values),n):r=>`${r>0?e:t}`},ie=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Zn=(t,e)=>n=>A(t,e,n);function fa(t){return typeof t=="number"?Zn:typeof t=="string"?O.test(t)?Ui:Wi:Array.isArray(t)?Ni:typeof t=="object"?la:Zn}function da(t,e,n){const s=[],i=n||fa(t[0]),o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const c=Array.isArray(e)?e[r]:e;a=he(c,a)}s.push(a)}return s}function Rn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;se(o===e.length),se(!s||!Array.isArray(s)||s.length===o-1),t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=da(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;l<t.length-2&&!(u<t[l+1]);l++);const d=ie(t[l],t[l+1],u);return r[l](d)};return n?u=>c(mt(t[0],t[o-1],u)):c}const ye=t=>t,$i=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ha=1e-7,pa=12;function ma(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=$i(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ha&&++a<pa);return r}function Gi(t,e,n,s){if(t===e&&n===s)return ye;const i=o=>ma(o,0,1,t,n);return o=>o===0||o===1?o:$i(i(o),e,s)}const Hi=t=>1-Math.sin(Math.acos(t)),En=An(Hi),ga=Sn(En),Ki=Gi(.33,1.53,.69,.99),Ln=An(Ki),ya=Sn(Ln),va=t=>(t*=2)<1?.5*Ln(t):.5*(2-Math.pow(2,-10*(t-1))),xa={linear:ye,easeIn:wn,easeInOut:Mn,easeOut:oa,circIn:Hi,circInOut:ga,circOut:En,backIn:Ln,backInOut:ya,backOut:Ki,anticipate:va},Jn=t=>{if(Array.isArray(t)){se(t.length===4);const[e,n,s,i]=t;return Gi(e,n,s,i)}else if(typeof t=="string")return xa[t];return t},ba=t=>Array.isArray(t)&&typeof t[0]!="number";function Ta(t,e){return t.map(()=>e||Mn).splice(0,t.length-1)}function Va(t){const e=t.length;return t.map((n,s)=>s!==0?s/(e-1):0)}function Pa(t,e){return t.map(n=>n*e)}function $e({keyframes:t,ease:e=Mn,times:n,duration:s=300}){t=[...t];const i=ba(e)?e.map(Jn):Jn(e),o={done:!1,value:t[0]},r=Pa(n&&n.length===t.length?n:Va(t),s);function a(){return Rn(r,t,{ease:Array.isArray(i)?i:Ta(t,i)})}let c=a();return{next:u=>(o.value=c(u),o.done=u>=s,o),flipTarget:()=>{t.reverse(),c=a()}}}const Ae=.001,Ca=.01,Qn=10,Sa=.05,Aa=1;function wa({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;_i(t<=Qn*1e3);let r=1-e;r=mt(Sa,Aa,r),t=mt(Ca,Qn,t/1e3),r<1?(i=u=>{const l=u*r,d=l*t,f=l-n,h=Ge(u,r),m=Math.exp(-d);return Ae-f/h*m},o=u=>{const d=u*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-d),g=Ge(Math.pow(u,2),r);return(-i(u)+Ae>0?-1:1)*((f-h)*m)/g}):(i=u=>{const l=Math.exp(-u*t),d=(u-n)*t+1;return-Ae+l*d},o=u=>{const l=Math.exp(-u*t),d=(n-u)*(t*t);return l*d});const a=5/t,c=Ra(i,o,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Ma=12;function Ra(t,e,n){let s=n;for(let i=1;i<Ma;i++)s=s-t(s)/e(s);return s}function Ge(t,e){return t*Math.sqrt(1-e*e)}const Ea=["duration","bounce"],La=["stiffness","damping","mass"];function ts(t,e){return e.some(n=>t[n]!==void 0)}function Da(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ts(t,La)&&ts(t,Ea)){const n=wa(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Ia=5;function Xi({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:d,isResolvedFromDuration:f}=Da(s);let h=Oa,m=l?-(l/1e3):0;const g=c/(2*Math.sqrt(a*u));function b(){const T=o-i,x=Math.sqrt(a/u)/1e3,v=Math.abs(T)<5;if(n||(n=v?.01:2),e||(e=v?.005:.5),g<1){const y=Ge(x,g);h=P=>{const C=Math.exp(-g*x*P);return o-C*((m+g*x*T)/y*Math.sin(y*P)+T*Math.cos(y*P))}}else if(g===1)h=y=>o-Math.exp(-x*y)*(T+(m+x*T)*y);else{const y=x*Math.sqrt(g*g-1);h=P=>{const C=Math.exp(-g*x*P),w=Math.min(y*P,300);return o-C*((m+g*x*T)*Math.sinh(w)+y*T*Math.cosh(w))/y}}}return b(),{next:T=>{const x=h(T);if(f)r.done=T>=d;else{let v=m;if(T!==0)if(g<1){const C=Math.max(0,T-Ia);v=bn(x-h(C),T-C)}else v=0;const y=Math.abs(v)<=n,P=Math.abs(o-x)<=e;r.done=y&&P}return r.value=r.done?o:x,r},flipTarget:()=>{m=-m,[i,o]=[o,i],b()}}}Xi.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Oa=t=>0;function Ba({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=o===void 0?u:o(u);return l!==u&&(c=l-r),{next:d=>{const f=-c*Math.exp(-d/s);return a.done=!(f>i||f<-i),a.value=a.done?l:l+f,a},flipTarget:()=>{}}}const Fa={decay:Ba,keyframes:$e,tween:$e,spring:Xi};function Yi(t,e,n=0){return t-e-n}function ka(t,e=0,n=0,s=!0){return s?Yi(e+-t,e,n):e-(t-e)+n}function ja(t,e,n,s){return s?t>=e+n:t<=-n}const _a=t=>{const e=({delta:n})=>t(n);return{start:()=>E.update(e,!0),stop:()=>$.update(e)}};function kt({duration:t,driver:e=_a,elapsed:n=0,repeat:s=0,repeatType:i="loop",repeatDelay:o=0,keyframes:r,autoplay:a=!0,onPlay:c,onStop:u,onComplete:l,onRepeat:d,onUpdate:f,type:h="keyframes",...m}){var g,b;const T=n;let x,v=0,y=t,P=!1,C=!0,w;const F=Fa[r.length>2?"keyframes":h]||$e,k=r[0],I=r[r.length-1];let j={done:!1,value:k};!((b=(g=F).needsInterpolation)===null||b===void 0)&&b.call(g,k,I)&&(w=Rn([0,100],[k,I],{clamp:!1}),r=[0,100]);const yt=F({...m,duration:t,keyframes:r});function ve(){v++,i==="reverse"?(C=v%2===0,n=ka(n,y,o,C)):(n=Yi(n,y,o),i==="mirror"&&yt.flipTarget()),P=!1,d&&d()}function vt(){x&&x.stop(),l&&l()}function M(_){C||(_=-_),n+=_,P||(j=yt.next(Math.max(0,n)),w&&(j.value=w(j.value)),P=C?j.done:n<=0),f&&f(j.value),P&&(v===0&&(y=y!==void 0?y:n),v<s?ja(n,y,o,C)&&ve():vt())}function et(){c&&c(),x=e(M),x.start()}return a&&et(),{stop:()=>{u&&u(),x&&x.stop()},set currentTime(_){n=T,M(_)},sample:_=>{n=T;const Nn=t&&typeof t=="number"?Math.max(t*.5,50):50;let xe=0;for(M(0);xe<=_;){const kr=_-xe;M(Math.min(kr,Nn)),xe+=Nn}return j}}}function Ua(t){return!t||Array.isArray(t)||typeof t=="string"&&qi[t]}const Vt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,qi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vt([0,.65,.55,1]),circOut:Vt([.55,0,1,.45]),backIn:Vt([.31,.01,.66,-.59]),backOut:Vt([.33,1.53,.69,.99])};function za(t){if(t)return Array.isArray(t)?Vt(t):qi[t]}function He(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:za(a),fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const es={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},we={},Zi={};for(const t in es)Zi[t]=()=>(we[t]===void 0&&(we[t]=es[t]()),we[t]);function Na(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Wa=new Set(["opacity"]),Nt=10;function $a(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Zi.waapi()&&Wa.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:r,duration:a=300,elapsed:c=0,ease:u}=i;if(i.type==="spring"||!Ua(i.ease)){if(i.repeat===1/0)return;const d=kt({...i,elapsed:0});let f={done:!1,value:r[0]};const h=[];let m=0;for(;!f.done&&m<2e4;)f=d.sample(m),h.push(f.value),m+=Nt;r=h,a=m-Nt,u="linear"}const l=He(t.owner.current,e,r,{...i,delay:-c,duration:a,ease:u});return l.onfinish=()=>{t.set(Na(r,i)),E.update(()=>l.cancel()),s&&s()},{get currentTime(){return l.currentTime||0},set currentTime(d){l.currentTime=d},stop:()=>{const{currentTime:d}=l;if(d){const f=kt({...i,autoplay:!1});t.setWithVelocity(f.sample(d-Nt).value,f.sample(d).value,Nt)}E.update(()=>l.cancel())}}}function Ji(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&($.read(s),t(o-e))};return E.read(s,!0),()=>$.read(s)}function Ga({keyframes:t,elapsed:e,onUpdate:n,onComplete:s}){const i=()=>{n&&n(t[t.length-1]),s&&s()};return e?{stop:Ji(i,-e)}:i()}function Ha({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:d,onComplete:f,onStop:h}){const m=t[0];let g;function b(y){return n!==void 0&&y<n||s!==void 0&&y>s}function T(y){return n===void 0?s:s===void 0||Math.abs(n-y)<Math.abs(s-y)?n:s}function x(y){g==null||g.stop(),g=kt({keyframes:[0,1],velocity:0,...y,driver:l,onUpdate:P=>{var C;d==null||d(P),(C=y.onUpdate)===null||C===void 0||C.call(y,P)},onComplete:f,onStop:h})}function v(y){x({type:"spring",stiffness:r,damping:a,restDelta:c,...y})}if(b(m))v({velocity:e,keyframes:[m,T(m)]});else{let y=i*e+m;typeof u<"u"&&(y=u(y));const P=T(y),C=P===n?-1:1;let w,F;const k=I=>{w=F,F=I,e=bn(I-w,H.delta),(C===1&&I>P||C===-1&&I<P)&&v({keyframes:[I,P],velocity:e})};x({type:"decay",keyframes:[m,0],velocity:e,timeConstant:o,power:i,restDelta:c,modifyTarget:u,onUpdate:b(y)?k:void 0})}return{stop:()=>g==null?void 0:g.stop()}}const nt=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Wt=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Me=()=>({type:"keyframes",ease:"linear",duration:.3}),Ka={type:"keyframes",duration:.8},ns={x:nt,y:nt,z:nt,rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scaleX:Wt,scaleY:Wt,scale:Wt,opacity:Me,backgroundColor:Me,color:Me,default:Wt},Xa=(t,{keyframes:e})=>e.length>2?Ka:(ns[t]||ns.default)(e[1]),Ke=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&tt.test(e)&&!e.startsWith("url("));function Ya({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}function ss(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function is(t){return typeof t=="number"?0:Pn("",t)}function Qi(t,e){return t[e]||t.default||t}function qa(t,e,n,s){const i=Ke(e,n);let o=s.from!==void 0?s.from:t.get();return o==="none"&&i&&typeof n=="string"?o=Pn(e,n):ss(o)&&typeof n=="string"?o=is(n):!Array.isArray(n)&&ss(n)&&typeof o=="string"&&(n=is(o)),Array.isArray(n)?(n[0]===null&&(n[0]=o),n):[o,n]}const Dn=(t,e,n,s={})=>i=>{const o=Qi(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-Ht(r);const c=qa(e,t,n,o),u=c[0],l=c[c.length-1],d=Ke(t,u),f=Ke(t,l);let h={keyframes:c,velocity:e.getVelocity(),...o,elapsed:a,onUpdate:b=>{e.set(b),o.onUpdate&&o.onUpdate(b)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!d||!f||We.current||o.type===!1)return Ga(h);if(o.type==="inertia")return Ha(h);Ya(o)||(h={...h,...Xa(t,h)}),h.duration&&(h.duration=Ht(h.duration)),h.repeatDelay&&(h.repeatDelay=Ht(h.repeatDelay));const m=e.owner,g=m&&m.current;if(m&&g instanceof HTMLElement&&!(m!=null&&m.getProps().onUpdate)){const b=$a(e,t,h);if(b)return b}return kt(h)};function In(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Xe(t,e,n);else{const i=typeof e=="function"?ge(t,e,n.custom):e;s=tr(t,i,n)}return s.then(()=>t.notify("AnimationComplete",e))}function Xe(t,e,n={}){var s;const i=ge(t,e,n.custom);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>tr(t,i,n):()=>Promise.resolve(),a=!((s=t.variantChildren)===null||s===void 0)&&s.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=o;return Za(t,e,l+u,d,f,n)}:()=>Promise.resolve(),{when:c}=o;if(c){const[u,l]=c==="beforeChildren"?[r,a]:[a,r];return u().then(l)}else return Promise.all([r(),a(n.delay)])}function tr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...c}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");s&&(r=s);const l=[],d=i&&((o=t.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const f in c){const h=t.getValue(f),m=c[f];if(!h||m===void 0||d&&tc(d,f))continue;const g={delay:n,elapsed:0,...r};if(window.HandoffAppearAnimations&&!h.hasAnimated){const T=t.getProps()[ra];T&&(g.elapsed=window.HandoffAppearAnimations(T,f,h,E))}let b=h.start(Dn(f,h,m,t.shouldReduceMotion&&X.has(f)?{type:!1}:g));ne(u)&&(u.add(f),b=b.then(()=>u.remove(f))),l.push(b)}return Promise.all(l).then(()=>{a&&Cn(t,a)})}function Za(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Qa).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(Xe(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function Ja(t){t.values.forEach(e=>e.stop())}function Qa(t,e){return t.sortNodePosition(e)}function tc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}const On=[S.Animate,S.InView,S.Focus,S.Hover,S.Tap,S.Drag,S.Exit],ec=[...On].reverse(),nc=On.length;function sc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>In(t,n,s)))}function ic(t){let e=sc(t);const n=oc();let s=!0;const i=(c,u)=>{const l=ge(t,u);if(l){const{transition:d,transitionEnd:f,...h}=l;c={...c,...h,...f}}return c};function o(c){e=c(t)}function r(c,u){const l=t.getProps(),d=t.getVariantContext(!0)||{},f=[],h=new Set;let m={},g=1/0;for(let T=0;T<nc;T++){const x=ec[T],v=n[x],y=l[x]!==void 0?l[x]:d[x],P=Et(y),C=x===u?v.isActive:null;C===!1&&(g=T);let w=y===d[x]&&y!==l[x]&&P;if(w&&s&&t.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...m},!v.isActive&&C===null||!y&&!v.prevProp||le(y)||typeof y=="boolean")continue;const F=rc(v.prevProp,y);let k=F||x===u&&v.isActive&&!w&&P||T>g&&P;const I=Array.isArray(y)?y:[y];let j=I.reduce(i,{});C===!1&&(j={});const{prevResolvedValues:yt={}}=v,ve={...yt,...j},vt=M=>{k=!0,h.delete(M),v.needsAnimating[M]=!0};for(const M in ve){const et=j[M],_=yt[M];m.hasOwnProperty(M)||(et!==_?Jt(et)&&Jt(_)?!Ci(et,_)||F?vt(M):v.protectedKeys[M]=!0:et!==void 0?vt(M):h.add(M):et!==void 0&&h.has(M)?vt(M):v.protectedKeys[M]=!0)}v.prevProp=y,v.prevResolvedValues=j,v.isActive&&(m={...m,...j}),s&&t.blockInitialAnimation&&(k=!1),k&&!w&&f.push(...I.map(M=>({animation:M,options:{type:x,...c}})))}if(h.size){const T={};h.forEach(x=>{const v=t.getBaseTarget(x);v!==void 0&&(T[x]=v)}),f.push({animation:T})}let b=Boolean(f.length);return s&&l.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),s=!1,b?e(f):Promise.resolve()}function a(c,u,l){var d;if(n[c].isActive===u)return Promise.resolve();(d=t.variantChildren)===null||d===void 0||d.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),n[c].isActive=u;const f=r(l,c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function rc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ci(e,t):!1}function st(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function oc(){return{[S.Animate]:st(!0),[S.InView]:st(),[S.Hover]:st(),[S.Tap]:st(),[S.Drag]:st(),[S.Focus]:st(),[S.Exit]:st()}}const er={animation:J(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=ic(t)),le(e)&&p.useEffect(()=>e.subscribe(t),[e])}),exit:J(t=>{const{custom:e,visualElement:n}=t,[s,i]=Pi(),o=p.useContext(gt);p.useEffect(()=>{n.isPresent=s;const r=n.animationState&&n.animationState.setActive(S.Exit,!s,{custom:o&&o.custom||e});r&&!s&&r.then(i)},[s])})},rs=(t,e)=>Math.abs(t-e);function ac(t,e){const n=rs(t.x,e.x),s=rs(t.y,e.y);return Math.sqrt(n**2+s**2)}class nr{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ee(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,d=ac(u.offset,{x:0,y:0})>=3;if(!l&&!d)return;const{point:f}=u,{timestamp:h}=H;this.history.push({...f,timestamp:h});const{onStart:m,onMove:g}=this.handlers;l||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,u)},this.handlePointerMove=(u,l)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Re(l,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(u,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=Ee(u.type==="pointercancel"?this.lastMoveEventInfo:Re(l,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!gi(e))return;this.handlers=n,this.transformPagePoint=s;const i=de(e),o=Re(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=H;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Ee(o,this.history)),this.removeListeners=he(pt(window,"pointermove",this.handlePointerMove),pt(window,"pointerup",this.handlePointerUp),pt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),$.update(this.updatePoint)}}function Re(t,e){return e?{point:e(t.point)}:t}function os(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ee({point:t},e){return{point:t,delta:os(t,sr(e)),offset:os(t,cc(e)),velocity:uc(e,.1)}}function cc(t){return t[0]}function sr(t){return t[t.length-1]}function uc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=sr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Ht(e)));)n--;if(!s)return{x:0,y:0};const o=(i.timestamp-s.timestamp)/1e3;if(o===0)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 B(t){return t.max-t.min}function Ye(t,e=0,n=.01){return Math.abs(t-e)<=n}function as(t,e,n,s=.5){t.origin=s,t.originPoint=A(e.min,e.max,t.origin),t.scale=B(n)/B(e),(Ye(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=A(n.min,n.max,t.origin)-t.originPoint,(Ye(t.translate)||isNaN(t.translate))&&(t.translate=0)}function At(t,e,n,s){as(t.x,e.x,n.x,s==null?void 0:s.originX),as(t.y,e.y,n.y,s==null?void 0:s.originY)}function cs(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function lc(t,e,n){cs(t.x,e.x,n.x),cs(t.y,e.y,n.y)}function us(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function wt(t,e,n){us(t.x,e.x,n.x),us(t.y,e.y,n.y)}function fc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?A(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?A(n,t,s.max):Math.min(t,n)),t}function ls(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function dc(t,{top:e,left:n,bottom:s,right:i}){return{x:ls(t.x,n,i),y:ls(t.y,e,s)}}function fs(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}}function hc(t,e){return{x:fs(t.x,e.x),y:fs(t.y,e.y)}}function pc(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=ie(e.min,e.max-s,t.min):s>i&&(n=ie(t.min,t.max-i,e.min)),mt(0,1,n)}function mc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const qe=.35;function gc(t=qe){return t===!1?t=0:t===!0&&(t=qe),{x:ds(t,"left","right"),y:ds(t,"top","bottom")}}function ds(t,e,n){return{min:hs(t,e),max:hs(t,n)}}function hs(t,e){return typeof t=="number"?t:t[e]||0}const ps=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mt=()=>({x:ps(),y:ps()}),ms=()=>({min:0,max:0}),R=()=>({x:ms(),y:ms()});function N(t){return[t("x"),t("y")]}function ir({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function yc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function vc(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}}function Le(t){return t===void 0||t===1}function Ze({scale:t,scaleX:e,scaleY:n}){return!Le(t)||!Le(e)||!Le(n)}function it(t){return Ze(t)||rr(t)||t.z||t.rotate||t.rotateX||t.rotateY}function rr(t){return gs(t.x)||gs(t.y)}function gs(t){return t&&t!=="0%"}function re(t,e,n){const s=t-n,i=e*s;return n+i}function ys(t,e,n,s,i){return i!==void 0&&(t=re(t,i,s)),re(t,n,s)+e}function Je(t,e=0,n=1,s,i){t.min=ys(t.min,e,n,s,i),t.max=ys(t.max,e,n,s,i)}function or(t,{x:e,y:n}){Je(t.x,e.translate,e.scale,e.originPoint),Je(t.y,n.translate,n.scale,n.originPoint)}function xc(t,e,n,s=!1){var i,o;const r=n.length;if(!r)return;e.x=e.y=1;let a,c;for(let u=0;u<r;u++)a=n[u],c=a.projectionDelta,((o=(i=a.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&ht(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),c&&(e.x*=c.x.scale,e.y*=c.y.scale,or(t,c)),s&&it(a.latestValues)&&ht(t,a.latestValues));e.x=vs(e.x),e.y=vs(e.y)}function vs(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Z(t,e){t.min=t.min+e,t.max=t.max+e}function xs(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=A(t.min,t.max,o);Je(t,e[n],e[s],r,e.scale)}const bc=["x","scaleX","originX"],Tc=["y","scaleY","originY"];function ht(t,e){xs(t.x,e,bc),xs(t.y,e,Tc)}function ar(t,e){return ir(vc(t.getBoundingClientRect(),e))}function Vc(t,e,n){const s=ar(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const Pc=new WeakMap;class Cc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const s=a=>{this.stopAnimation(),n&&this.snapToCursor(de(a,"page").point)},i=(a,c)=>{var u;const{drag:l,dragPropagation:d,onDragStart:f}=this.getProps();l&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xi(l),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(h=>{var m,g;let b=this.getAxisMotionValue(h).get()||0;if(W.test(b)){const T=(g=(m=this.visualElement.projection)===null||m===void 0?void 0:m.layout)===null||g===void 0?void 0:g.layoutBox[h];T&&(b=B(T)*(parseFloat(b)/100))}this.originPoint[h]=b}),f==null||f(a,c),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(S.Drag,!0))},o=(a,c)=>{const{dragPropagation:u,dragDirectionLock:l,onDirectionLock:d,onDrag:f}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:h}=c;if(l&&this.currentDirection===null){this.currentDirection=Sc(h),this.currentDirection!==null&&(d==null||d(this.currentDirection));return}this.updateAxis("x",c.point,h),this.updateAxis("y",c.point,h),this.visualElement.render(),f==null||f(a,c)},r=(a,c)=>this.stop(a,c);this.panSession=new nr(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:r},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(e,n)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(S.Drag,!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=fc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=dc(s.layoutBox,e):this.constraints=!1,this.elastic=gc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=mc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ft(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Vc(s,i.root,this.visualElement.getTransformPagePoint());let r=hc(i.layout.layoutBox,o);if(n){const a=n(yc(r));this.hasMutatedConstraints=!!a,a&&(r=ir(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=N(l=>{if(!$t(l,n,this.currentDirection))return;let d=(c==null?void 0:c[l])||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[l]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(l,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Dn(e,s,0,n))}stopAnimation(){N(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var n;const s="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[s];return i||this.visualElement.getValue(e,((n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[e])||0)}snapToCursor(e){N(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-A(r,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!ft(s)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};N(a=>{const c=this.getAxisMotionValue(a);if(c){const u=c.get();o[a]=pc({min:u,max:u},this.constraints[a])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),N(a=>{if(!$t(a,n,null))return;const c=this.getAxisMotionValue(a),{min:u,max:l}=this.constraints[a];c.set(A(u,l,o[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Pc.set(this.visualElement,this);const n=this.visualElement.current,s=pt(n,"pointerdown",u=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();ft(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&((e=o.root)===null||e===void 0||e.updateScroll(),o.updateLayout()),i();const a=ot(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:l})=>{this.isDragging&&l&&(N(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),s(),r(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=qe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Sc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}function Ac(t){const{dragControls:e,visualElement:n}=t,s=D(()=>new Cc(n));p.useEffect(()=>e&&e.subscribe(s),[s,e]),p.useEffect(()=>s.addListeners(),[s])}function wc({onPan:t,onPanStart:e,onPanEnd:n,onPanSessionStart:s,visualElement:i}){const o=t||e||n||s,r=p.useRef(null),{transformPagePoint:a}=p.useContext(K),c={onSessionStart:s,onStart:e,onMove:t,onEnd:(l,d)=>{r.current=null,n&&n(l,d)}};p.useEffect(()=>{r.current!==null&&r.current.updateHandlers(c)});function u(l){r.current=new nr(l,c,{transformPagePoint:a})}te(i,"pointerdown",o&&u),vn(()=>r.current&&r.current.end())}const cr={pan:J(wc),drag:J(Ac)};function Qe(t){return typeof t=="string"&&t.startsWith("var(--")}const ur=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Mc(t){const e=ur.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function tn(t,e,n=1){const[s,i]=Mc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);return o?o.trim():Qe(i)?tn(i,e,n+1):i}function Rc(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!Qe(o))return;const r=tn(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!Qe(o))continue;const r=tn(o,s);r&&(e[i]=r,n&&n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Ec=new Set(["width","height","top","left","right","bottom","x","y"]),lr=t=>Ec.has(t),Lc=t=>Object.keys(t).some(lr),bs=t=>t===ut||t===V;var Ts;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Ts||(Ts={}));const Vs=(t,e)=>parseFloat(t.split(", ")[e]),Ps=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Vs(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?Vs(o[1],t):0}},Dc=new Set(["x","y","z"]),Ic=qt.filter(t=>!Dc.has(t));function Oc(t){const e=[];return Ic.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Cs={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:Ps(4,13),y:Ps(5,14)},Bc=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=Cs[u](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const l=e.getValue(u);l&&l.jump(a[u]),t[u]=Cs[u](c,o)}),t},Fc=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(lr);let o=[],r=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let l=n[c],d=xt(l);const f=e[c];let h;if(Jt(f)){const m=f.length,g=f[0]===null?1:0;l=f[g],d=xt(l);for(let b=g;b<m;b++)h?se(xt(f[b])===h):h=xt(f[b])}else h=xt(f);if(d!==h)if(bs(d)&&bs(h)){const m=u.get();typeof m=="string"&&u.set(parseFloat(m)),typeof f=="string"?e[c]=parseFloat(f):Array.isArray(f)&&h===V&&(e[c]=f.map(parseFloat))}else d!=null&&d.transform&&(h!=null&&h.transform)&&(l===0||f===0)?l===0?u.set(h.transform(l)):e[c]=d.transform(f):(r||(o=Oc(t),r=!0),a.push(c),s[c]=s[c]!==void 0?s[c]:e[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=Bc(e,t,a);return o.length&&o.forEach(([l,d])=>{t.getValue(l).set(d)}),t.render(),ue&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}};function kc(t,e,n,s){return Lc(e)?Fc(t,e,n,s):{target:e,transitionEnd:s}}const jc=(t,e,n,s)=>{const i=Rc(t,e,s);return e=i.target,s=i.transitionEnd,kc(t,e,n,s)},oe={current:null},Bn={current:!1};function fr(){if(Bn.current=!0,!!ue)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>oe.current=t.matches;t.addListener(e),e()}else oe.current=!1}function _c(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),ne(s)&&s.add(i);else if(L(r))t.addValue(i,z(o,{owner:t})),ne(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,z(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const dr=Object.keys(Lt),Uc=dr.length,Ss=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hr{constructor({parent:e,props: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.isPresent=!0,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=()=>E.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=n.initial?{...r}:{},this.renderState=a,this.parent=e,this.props=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=fe(n),this.isVariantNode=ni(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const l in u){const d=u[l];r[l]!==void 0&&L(d)&&(d.set(r[l],!1),ne(c)&&c.add(l))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){var n;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),Bn.current||fr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:oe.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,n,s;(e=this.projection)===null||e===void 0||e.unmount(),$.update(this.notifyUpdate),$.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(s=this.parent)===null||s===void 0||s.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,n){const s=X.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&E.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o,r,a){const c=[];for(let u=0;u<Uc;u++){const l=dr[u],{isEnabled:d,Component:f}=Lt[l];d(n)&&f&&c.push(p.createElement(f,{key:l,...n,visualElement:this}))}if(!this.projection&&r){this.projection=new r(o,this.latestValues,this.parent&&this.parent.projection);const{layoutId:u,layout:l,drag:d,dragConstraints:f,layoutScroll:h,layoutRoot:m}=n;this.projection.setOptions({layoutId:u,layout:l,alwaysMeasureLayout:Boolean(d)||f&&ft(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:m})}return c}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const n=this.props;this.props=e;for(let s=0;s<Ss.length;s++){const i=Ss[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=_c(this,this.scrapeMotionValuesFromProps(e,n),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var n,s;if(e)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((s=this.parent)===null||s===void 0?void 0:s.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<zc;o++){const r=pr[o],a=this.props[r];(Et(a)||a===!1)&&(i[r]=a)}return i}addVariantChild(e){var n;const s=this.getClosestVariantNode();if(s)return(n=s.variantChildren)===null||n===void 0||n.add(e),()=>s.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){var n;this.values.delete(e),(n=this.valueSubscriptions.get(e))===null||n===void 0||n(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=z(n,{owner:this}),this.addValue(e,s)),s}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=mn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new xn),this.events[e].add(n)}notify(e,...n){var s;(s=this.events[e])===null||s===void 0||s.notify(...n)}}const pr=["initial",...On],zc=pr.length;class mr extends hr{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){var s;return(s=e.style)===null||s===void 0?void 0:s[n]}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=ki(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){Fi(this,s,r);const a=jc(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Nc(t){return window.getComputedStyle(t)}class Wc extends mr{readValueFromInstance(e,n){if(X.has(n)){const s=Vn(n);return s&&s.default||0}else{const s=Nc(e),i=(un(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return ar(e,n)}build(e,n,s,i){ln(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return pn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){di(e,n,s,i)}}class $c extends mr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){var s;return X.has(n)?((s=Vn(n))===null||s===void 0?void 0:s.default)||0:(n=hi.has(n)?n:Ot(n),e.getAttribute(n))}measureInstanceViewportBox(){return R()}scrapeMotionValuesFromProps(e,n){return mi(e,n)}build(e,n,s,i){dn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){pi(e,n,s,i)}mount(e){this.isSVGTag=hn(e.tagName),super.mount(e)}}const Fn=(t,e)=>cn(t)?new $c(e,{enableHardwareAcceleration:!1}):new Wc(e,{enableHardwareAcceleration:!0});function As(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=As(t,e.target.x),s=As(t,e.target.y);return`${n}% ${s}%`}},ws="_$css",Gc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=t.includes("var("),o=[];i&&(t=t.replace(ur,h=>(o.push(h),ws)));const r=tt.parse(t);if(r.length>5)return s;const a=tt.createTransformer(t),c=typeof r[0]!="number"?1:0,u=n.x.scale*e.x,l=n.y.scale*e.y;r[0+c]/=u,r[1+c]/=l;const d=A(u,l,.5);typeof r[2+c]=="number"&&(r[2+c]/=d),typeof r[3+c]=="number"&&(r[3+c]/=d);let f=a(r);if(i){let h=0;f=f.replace(ws,()=>{const m=o[h];return h++,m})}return f}};class Hc extends rn.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Xr(Xc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Pt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||E.postRender(()=>{var a;!((a=r.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),s!=null&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function Kc(t){const[e,n]=Pi(),s=p.useContext(Dt);return rn.createElement(Hc,{...t,layoutGroup:s,switchLayoutGroup:p.useContext(si),isPresent:e,safeToRemove:n})}const Xc={borderRadius:{...bt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:Gc},gr={measureLayout:Kc};function Yc(t,e,n={}){const s=L(t)?t:z(t);return s.start(Dn("",s,e,n)),{stop:()=>s.stop(),isAnimating:()=>s.isAnimating()}}const yr=["TopLeft","TopRight","BottomLeft","BottomRight"],qc=yr.length,Ms=t=>typeof t=="string"?parseFloat(t):t,Rs=t=>typeof t=="number"||V.test(t);function Zc(t,e,n,s,i,o){i?(t.opacity=A(0,n.opacity!==void 0?n.opacity:1,Jc(s)),t.opacityExit=A(e.opacity!==void 0?e.opacity:1,0,Qc(s))):o&&(t.opacity=A(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<qc;r++){const a=`border${yr[r]}Radius`;let c=Es(e,a),u=Es(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Rs(c)===Rs(u)?(t[a]=Math.max(A(Ms(c),Ms(u),s),0),(W.test(u)||W.test(c))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=A(e.rotate||0,n.rotate||0,s))}function Es(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Jc=vr(0,.5,En),Qc=vr(.5,.95,ye);function vr(t,e,n){return s=>s<t?0:s>e?1:n(ie(t,e,s))}function Ls(t,e){t.min=e.min,t.max=e.max}function U(t,e){Ls(t.x,e.x),Ls(t.y,e.y)}function Ds(t,e,n,s,i){return t-=e,t=re(t,1/n,s),i!==void 0&&(t=re(t,1/i,s)),t}function tu(t,e=0,n=1,s=.5,i,o=t,r=t){if(W.test(e)&&(e=parseFloat(e),e=A(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=A(o.min,o.max,s);t===o&&(a-=e),t.min=Ds(t.min,e,n,a,i),t.max=Ds(t.max,e,n,a,i)}function Is(t,e,[n,s,i],o,r){tu(t,e[n],e[s],e[i],e.scale,o,r)}const eu=["x","scaleX","originX"],nu=["y","scaleY","originY"];function Os(t,e,n,s){Is(t.x,e,eu,n==null?void 0:n.x,s==null?void 0:s.x),Is(t.y,e,nu,n==null?void 0:n.y,s==null?void 0:s.y)}function Bs(t){return t.translate===0&&t.scale===1}function xr(t){return Bs(t.x)&&Bs(t.y)}function br(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 Fs(t){return B(t.x)/B(t.y)}class su{constructor(){this.members=[]}add(e){me(this.members,e),e.scheduleRender()}remove(e){if(Ft(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){var s;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((s=e.root)===null||s===void 0)&&s.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,o,r;(s=(n=e.options).onExitComplete)===null||s===void 0||s.call(n),(r=(i=e.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||r===void 0||r.call(o)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ks(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) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:l}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),l&&(s+=`rotateY(${l}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const iu=(t,e)=>t.depth-e.depth;class ru{constructor(){this.children=[],this.isDirty=!1}add(e){me(this.children,e),this.isDirty=!0}remove(e){Ft(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(iu),this.isDirty=!1,this.children.forEach(e)}}const js=["","X","Y","Z"],_s=1e3;let ou=0;function Tr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r,a={},c=e==null?void 0:e()){this.id=ou++,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(uu),this.nodes.forEach(du),this.nodes.forEach(hu)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=r,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,r&&this.root.registerPotentialNode(r,this);for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new ru)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new xn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const c=this.eventHandlers.get(r);c==null||c.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}registerPotentialNode(r,a){this.potentialNodes.set(r,a)}mount(r,a=!1){var c;if(this.instance)return;this.isSVG=r instanceof SVGElement&&r.tagName!=="svg",this.instance=r;const{layoutId:u,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),(c=this.parent)===null||c===void 0||c.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),a&&(l||u)&&(this.isLayoutDirty=!0),t){let f;const h=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Ji(h,250),Pt.hasAnimatedSinceResize&&(Pt.hasAnimatedSinceResize=!1,this.nodes.forEach(zs))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:g})=>{var b,T,x,v,y;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=(T=(b=this.options.transition)!==null&&b!==void 0?b:d.getDefaultTransition())!==null&&T!==void 0?T:vu,{onLayoutAnimationStart:C,onLayoutAnimationComplete:w}=d.getProps(),F=!this.targetLayout||!br(this.targetLayout,g)||m,k=!h&&m;if(this.options.layoutRoot||!((x=this.resumeFrom)===null||x===void 0)&&x.instance||k||h&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,k);const I={...Qi(P,"layout"),onPlay:C,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else!h&&this.animationProgress===0&&zs(this),this.isLead()&&((y=(v=this.options).onExitComplete)===null||y===void 0||y.call(v));this.targetLayout=g})}unmount(){var r,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(r=this.getStack())===null||r===void 0||r.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,$.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var r;return this.isAnimationBlocked||((r=this.parent)===null||r===void 0?void 0:r.isTreeAnimationBlocked())||!1}startUpdate(){var r;this.isUpdateBlocked()||(this.isUpdating=!0,(r=this.nodes)===null||r===void 0||r.forEach(pu),this.animationId++)}getTransformTemplate(){var r;return(r=this.options.visualElement)===null||r===void 0?void 0:r.getProps().transformTemplate}willUpdate(r=!0){var a,c,u;if(this.root.isUpdateBlocked()){(c=(a=this.options).onExitComplete)===null||c===void 0||c.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:d}=this.options;l===void 0&&!d||(this.prevTransformTemplateValue=(u=this.getTransformTemplate())===null||u===void 0?void 0:u(this.latestValues,""),this.updateSnapshot(),r&&this.notifyListeners("willUpdate"))}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Us);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(xu),this.potentialNodes.clear()),this.nodes.forEach(fu),this.nodes.forEach(au),this.nodes.forEach(cu),this.clearAllSnapshots(),Ve.update(),Ve.preRender(),Ve.render())}clearAllSnapshots(){this.nodes.forEach(lu),this.sharedNodes.forEach(mu)}scheduleUpdateProjection(){E.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var r;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(r=this.options.visualElement)===null||r===void 0||r.notify("LayoutMeasure",this.layout.layoutBox,a==null?void 0:a.layoutBox)}updateScroll(r="measure"){let a=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){var r;if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform,c=this.projectionDelta&&!xr(this.projectionDelta),u=(r=this.getTransformTemplate())===null||r===void 0?void 0:r(this.latestValues,""),l=u!==this.prevTransformTemplateValue;a&&(c||it(this.latestValues)||l)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return r&&(c=this.removeTransform(c)),bu(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return R();const a=r.measureViewportBox(),{scroll:c}=this.root;return c&&(Z(a.x,c.offset.x),Z(a.y,c.offset.y)),a}removeElementScroll(r){const a=R();U(a,r);for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:l,options:d}=u;if(u!==this.root&&l&&d.layoutScroll){if(l.isRoot){U(a,r);const{scroll:f}=this.root;f&&(Z(a.x,-f.offset.x),Z(a.y,-f.offset.y))}Z(a.x,l.offset.x),Z(a.y,l.offset.y)}}return a}applyTransform(r,a=!1){const c=R();U(c,r);for(let u=0;u<this.path.length;u++){const l=this.path[u];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&ht(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),it(l.latestValues)&&ht(c,l.latestValues)}return it(this.latestValues)&&ht(c,this.latestValues),c}removeTransform(r){var a;const c=R();U(c,r);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!l.instance||!it(l.latestValues))continue;Ze(l.latestValues)&&l.updateSnapshot();const d=R(),f=l.measurePageBox();U(d,f),Os(c,l.latestValues,(a=l.snapshot)===null||a===void 0?void 0:a.layoutBox,d)}return it(this.latestValues)&&Os(c,this.latestValues),c}setTargetDelta(r){this.targetDelta=r,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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 r;const a=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:c,layoutId:u}=this.options;if(!(!this.layout||!(c||u))){if(!this.targetDelta&&!this.relativeTarget){const l=this.getClosestProjectingParent();l&&l.layout?(this.relativeParent=l,this.relativeTarget=R(),this.relativeTargetOrigin=R(),wt(this.relativeTargetOrigin,this.layout.layoutBox,l.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&(!((r=this.relativeParent)===null||r===void 0)&&r.target)?lc(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),or(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const l=this.getClosestProjectingParent();l&&Boolean(l.resumingFrom)===Boolean(this.resumingFrom)&&!l.options.layoutScroll&&l.target?(this.relativeParent=l,this.relativeTarget=R(),this.relativeTargetOrigin=R(),wt(this.relativeTargetOrigin,this.target,l.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ze(this.parent.latestValues)||rr(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta||this.parent.options.layoutRoot)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var r;const{isProjectionDirty:a,isTransformDirty:c}=this;this.isProjectionDirty=this.isTransformDirty=!1;const u=this.getLead(),l=Boolean(this.resumingFrom)||this!==u;let d=!0;if(a&&(d=!1),l&&c&&(d=!1),d)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=Boolean(((r=this.parent)===null||r===void 0?void 0:r.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;U(this.layoutCorrected,this.layout.layoutBox),xc(this.layoutCorrected,this.treeScale,this.path,l);const{target:m}=u;if(!m)return;this.projectionDelta||(this.projectionDelta=Mt(),this.projectionDeltaWithTransform=Mt());const g=this.treeScale.x,b=this.treeScale.y,T=this.projectionTransform;At(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=ks(this.projectionDelta,this.treeScale),(this.projectionTransform!==T||this.treeScale.x!==g||this.treeScale.y!==b)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a,c,u;(c=(a=this.options).scheduleRender)===null||c===void 0||c.call(a),r&&((u=this.getStack())===null||u===void 0||u.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){var c,u;const l=this.snapshot,d=(l==null?void 0:l.latestValues)||{},f={...this.latestValues},h=Mt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=R(),g=(l==null?void 0:l.source)!==((c=this.layout)===null||c===void 0?void 0:c.source),b=(((u=this.getStack())===null||u===void 0?void 0:u.members.length)||0)<=1,T=Boolean(g&&!b&&this.options.crossfade===!0&&!this.path.some(yu));this.animationProgress=0,this.mixTargetDelta=x=>{var v;const y=x/1e3;Ns(h.x,r.x,y),Ns(h.y,r.y,y),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((v=this.relativeParent)===null||v===void 0)&&v.layout)&&(wt(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gu(this.relativeTarget,this.relativeTargetOrigin,m,y)),g&&(this.animationValues=f,Zc(f,d,this.latestValues,y,T,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&($.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{Pt.hasAnimatedSinceResize=!0,this.currentAnimation=Yc(0,_s,{...r,onUpdate:u=>{var l;this.mixTargetDelta(u),(l=r.onUpdate)===null||l===void 0||l.call(r,u)},onComplete:()=>{var u;(u=r.onComplete)===null||u===void 0||u.call(r),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var r;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(r=this.getStack())===null||r===void 0||r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var r;this.currentAnimation&&((r=this.mixTargetDelta)===null||r===void 0||r.call(this,_s),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Vr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||R();const d=B(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+d;const f=B(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+f}U(a,c),ht(a,l),At(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){var c,u,l;this.sharedNodes.has(r)||this.sharedNodes.set(r,new su),this.sharedNodes.get(r).add(a),a.promote({transition:(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(l=(u=a.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||l===void 0?void 0:l.call(u,a)})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let l=0;l<js.length;l++){const d="rotate"+js[l];c[d]&&(u[d]=c[d],r.setStaticValue(d,0))}r==null||r.render();for(const l in u)r.setStaticValue(l,u[l]);r.scheduleRender()}getProjectionStyles(r={}){var a,c;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Gt(r.pointerEvents)||"",u.transform=l?l(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Gt(r.pointerEvents)||""),this.hasProjected&&!it(this.latestValues)&&(g.transform=l?l({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=ks(this.projectionDeltaWithTransform,this.treeScale,f),l&&(u.transform=l(f,u.transform));const{x:h,y:m}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,d.animationValues?u.opacity=d===this?(c=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Yt){if(f[g]===void 0)continue;const{correct:b,applyTo:T}=Yt[g],x=u.transform==="none"?f[g]:b(f[g],d);if(T){const v=T.length;for(let y=0;y<v;y++)u[T[y]]=x}else u[g]=x}return this.options.layoutId&&(u.pointerEvents=d===this?Gt(r.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function au(t){t.updateLayout()}function cu(t){var e,n,s;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=t.layout,{animationType:a}=t.options,c=i.source!==t.layout.source;a==="size"?N(h=>{const m=c?i.measuredBox[h]:i.layoutBox[h],g=B(m);m.min=o[h].min,m.max=m.min+g}):Vr(a,i.layoutBox,o)&&N(h=>{const m=c?i.measuredBox[h]:i.layoutBox[h],g=B(o[h]);m.max=m.min+g});const u=Mt();At(u,o,i.layoutBox);const l=Mt();c?At(l,t.applyTransform(r,!0),i.measuredBox):At(l,o,i.layoutBox);const d=!xr(u);let f=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:g}=h;if(m&&g){const b=R();wt(b,i.layoutBox,m.layoutBox);const T=R();wt(T,o,g.layoutBox),br(b,T)||(f=!0),h.options.layoutRoot&&(t.relativeTarget=T,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:l,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else t.isLead()&&((s=(n=t.options).onExitComplete)===null||s===void 0||s.call(n));t.options.transition=void 0}function uu(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function lu(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function fu(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function du(t){t.resolveTargetDelta()}function hu(t){t.calcProjection()}function pu(t){t.resetRotation()}function mu(t){t.removeLeadSnapshot()}function Ns(t,e,n){t.translate=A(e.translate,0,n),t.scale=A(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ws(t,e,n,s){t.min=A(e.min,n.min,s),t.max=A(e.max,n.max,s)}function gu(t,e,n,s){Ws(t.x,e.x,n.x,s),Ws(t.y,e.y,n.y,s)}function yu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const vu={duration:.45,ease:[.4,0,.1,1]};function xu(t,e){let n=t.root;for(let o=t.path.length-1;o>=0;o--)if(Boolean(t.path[o].instance)){n=t.path[o];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function $s(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function bu(t){$s(t.x),$s(t.y)}function Vr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ye(Fs(e),Fs(n),.2)}const Tu=Tr({attachResizeListener:(t,e)=>ot(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),at={current:void 0},kn=Tr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!at.current){const t=new Tu(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),at.current=t}return at.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),Pr={...er,...Vi,...cr,...gr},Cr=ri((t,e)=>yn(t,e,Pr,Fn,kn));function _l(t){return ii(yn(t,{forwardMotionProps:!1},Pr,Fn,kn))}const Ul=ri(yn);function Sr(){const t=p.useRef(!1);return Q(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function jn(){const t=Sr(),[e,n]=p.useState(0),s=p.useCallback(()=>{t.current&&n(e+1)},[e]);return[p.useCallback(()=>E.postRender(s),[s]),e]}class Vu extends p.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Pu({children:t,isPresent:e}){const n=p.useId(),s=p.useRef(null),i=p.useRef({width:0,height:0,top:0,left:0});return p.useInsertionEffect(()=>{const{width:o,height:r,top:a,left:c}=i.current;if(e||!s.current||!o||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${r}px !important;
top: ${a}px !important;
left: ${c}px !important;
}
`),()=>{document.head.removeChild(u)}},[e]),p.createElement(Vu,{isPresent:e,childRef:s,sizeRef:i},p.cloneElement(t,{ref:s}))}const De=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r})=>{const a=D(Cu),c=p.useId(),u=p.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:l=>{a.set(l,!0);for(const d of a.values())if(!d)return;s&&s()},register:l=>(a.set(l,!1),()=>a.delete(l))}),o?void 0:[n]);return p.useMemo(()=>{a.forEach((l,d)=>a.set(d,!1))},[n]),p.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),r==="popLayout"&&(t=p.createElement(Pu,{isPresent:n},t)),p.createElement(gt.Provider,{value:u},t)};function Cu(){return new Map}const lt=t=>t.key||"";function Su(t,e){t.forEach(n=>{const s=lt(n);e.set(s,n)})}function Au(t){const e=[];return p.Children.forEach(t,n=>{p.isValidElement(n)&&e.push(n)}),e}const zl=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:r="sync"})=>{i&&(r="wait");let[a]=jn();const c=p.useContext(Dt).forceRender;c&&(a=c);const u=Sr(),l=Au(t);let d=l;const f=new Set,h=p.useRef(d),m=p.useRef(new Map).current,g=p.useRef(!0);if(Q(()=>{g.current=!1,Su(l,m),h.current=d}),vn(()=>{g.current=!0,m.clear(),f.clear()}),g.current)return p.createElement(p.Fragment,null,d.map(v=>p.createElement(De,{key:lt(v),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:r},v)));d=[...d];const b=h.current.map(lt),T=l.map(lt),x=b.length;for(let v=0;v<x;v++){const y=b[v];T.indexOf(y)===-1&&f.add(y)}return r==="wait"&&f.size&&(d=[]),f.forEach(v=>{if(T.indexOf(v)!==-1)return;const y=m.get(v);if(!y)return;const P=b.indexOf(v),C=()=>{m.delete(v),f.delete(v);const w=h.current.findIndex(F=>F.key===v);if(h.current.splice(w,1),!f.size){if(h.current=l,u.current===!1)return;a(),s&&s()}};d.splice(P,0,p.createElement(De,{key:lt(y),isPresent:!1,onExitComplete:C,custom:e,presenceAffectsLayout:o,mode:r},y))}),d=d.map(v=>{const y=v.key;return f.has(y)?v:p.createElement(De,{key:lt(v),isPresent:!0,presenceAffectsLayout:o,mode:r},v)}),p.createElement(p.Fragment,null,f.size?d:d.map(v=>p.cloneElement(v)))},wu=p.createContext(null),Mu=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Gs(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Mu);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{var i;t.delete(s),(i=e.get(s))===null||i===void 0||i(),e.delete(s),n()},dirty:n}}const Ar=t=>t===!0,Ru=t=>Ar(t===!0)||t==="id",Eu=({children:t,id:e,inheritId:n,inherit:s=!0})=>{n!==void 0&&(s=n);const i=p.useContext(Dt),o=p.useContext(wu),[r,a]=jn(),c=p.useRef(null),u=i.id||o;c.current===null&&(Ru(s)&&u&&(e=e?u+"-"+e:u),c.current={id:e,group:Ar(s)&&i.group||Gs()});const l=p.useMemo(()=>({...c.current,forceRender:r}),[a]);return p.createElement(Dt.Provider,{value:l},t)};let Lu=0;const Nl=({children:t})=>(p.useEffect(()=>{},[]),p.createElement(Eu,{id:D(()=>`asl-${Lu++}`)},t));function Wl({children:t,isValidProp:e,...n}){e&&li(e),n={...p.useContext(K),...n},n.isStatic=D(()=>n.isStatic);const s=p.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return p.createElement(K.Provider,{value:s},t)}function $l({children:t,features:e,strict:n=!1}){const[,s]=p.useState(!Ie(e)),i=p.useRef(void 0);if(!Ie(e)){const{renderer:o,...r}=e;i.current=o,Be(r)}return p.useEffect(()=>{Ie(e)&&e().then(({renderer:o,...r})=>{Be(r),i.current=o,s(!0)})},[]),p.createElement(on.Provider,{value:{renderer:i.current,strict:n}},t)}function Ie(t){return typeof t=="function"}const wr=p.createContext(null);function Du(t,e,n,s){if(!s)return t;const i=t.findIndex(l=>l.value===e);if(i===-1)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],c=r.layout,u=A(c.min,c.max,.5);return o===1&&a.layout.max+n>u||o===-1&&a.layout.min+n<u?Uo(t,i,i+o):t}function Iu({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...o},r){const a=D(()=>Cr(e)),c=[],u=p.useRef(!1),l={axis:n,registerItem:(d,f)=>{f&&c.findIndex(h=>d===h.value)===-1&&(c.push({value:d,layout:f[n]}),c.sort(Fu))},updateOrder:(d,f,h)=>{if(u.current)return;const m=Du(c,d,f,h);c!==m&&(u.current=!0,s(m.map(Bu).filter(g=>i.indexOf(g)!==-1)))}};return p.useEffect(()=>{u.current=!1}),p.createElement(a,{...o,ref:r,ignoreStrict:!0},p.createElement(wr.Provider,{value:l},t))}const Ou=p.forwardRef(Iu);function Bu(t){return t.value}function Fu(t,e){return t.layout.min-e.layout.min}function ct(t){const e=D(()=>z(t)),{isStatic:n}=p.useContext(K);if(n){const[,s]=p.useState(t);p.useEffect(()=>e.on("change",s),[])}return e}const ku=t=>typeof t=="object"&&t.mix,ju=t=>ku(t)?t.mix:void 0;function _u(...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=Rn(i,o,{mixer:ju(o[0]),...r});return e?a(s):a}function Mr(t,e){const n=ct(e()),s=()=>n.set(e());return s(),Q(()=>{const i=()=>E.update(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),$.update(s)}}),n}function en(t,e,n,s){const i=typeof e=="function"?e:_u(e,n,s);return Array.isArray(t)?Hs(t,i):Hs([t],([o])=>i(o))}function Hs(t,e){const n=D(()=>[]);return Mr(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Ks(t,e=0){return L(t)?t:ct(e)}function Uu({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:o=!0,...r},a){const c=D(()=>Cr(s)),u=p.useContext(wr),l={x:Ks(e.x),y:Ks(e.y)},d=en([l.x,l.y],([b,T])=>b||T?1:"unset"),f=p.useRef(null),{axis:h,registerItem:m,updateOrder:g}=u;return p.useEffect(()=>{m(n,f.current)},[u]),p.createElement(c,{drag:h,...r,dragSnapToOrigin:!0,style:{...e,x:l.x,y:l.y,zIndex:d},layout:o,onDrag:(b,T)=>{const{velocity:x}=T;x[h]&&g(n,l[h].get(),x[h]),i&&i(b,T)},onLayoutMeasure:b=>{f.current=b},ref:a,ignoreStrict:!0},t)}const zu=p.forwardRef(Uu),Gl={Group:Ou,Item:zu},Nu={renderer:Fn,...er,...Vi},Hl={...Nu,...cr,...gr,projectionNodeConstructor:kn};function Kl(t,...e){const n=t.length;function s(){let i="";for(let o=0;o<n;o++){i+=t[o];const r=e[o];r&&(i+=L(r)?r.get():r)}return i}return Mr(e.filter(L),s)}function Xl(t,e={}){const{isStatic:n}=p.useContext(K),s=p.useRef(null),i=ct(L(t)?t.get():t),o=()=>{s.current&&s.current.stop()};return p.useInsertionEffect(()=>i.attach((r,a)=>n?a(r):(o(),s.current=kt({keyframes:[i.get(),r],velocity:i.getVelocity(),type:"spring",...e,onUpdate:a}),i.get()),o),[JSON.stringify(e)]),Q(()=>{if(L(t))return t.on("change",r=>i.set(parseFloat(r)))},[i]),i}function Yl(t){const e=ct(t.getVelocity());return p.useEffect(()=>t.on("velocityChange",n=>{e.set(n)}),[t]),e}const Wu=(t,e,n)=>Math.min(Math.max(n,t),e),_n=t=>typeof t=="number",$u=t=>Array.isArray(t)&&!_n(t[0]),Gu=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Hu(t,e){return $u(t)?t[Gu(0,t.length,e)]:t}const Rr=(t,e,n)=>-n*t+n*e+t,Er=t=>t,Un=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function Lr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Un(0,e,s);t.push(Rr(n,1,i))}}function Dr(t){const e=[0];return Lr(e,t-1),e}function Ku(t,e=Dr(t.length),n=Er){const s=t.length,i=s-e.length;return i>0&&Lr(e,i),o=>{let r=0;for(;r<s-2&&!(o<e[r+1]);r++);let a=Wu(0,1,Un(e[r],e[r+1],o));return a=Hu(n,r)(a),Rr(t[r],t[r+1],a)}}const zn=t=>typeof t=="function",Ir=t=>typeof t=="string";function Xu(t,e){return e?t*(1e3/e):0}function Or(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}function Yu(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}const qu={any:0,all:1};function Zu(t,e,{root:n,margin:s,amount:i="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=Or(t),r=new WeakMap,a=u=>{u.forEach(l=>{const d=r.get(l.target);if(l.isIntersecting!==Boolean(d))if(l.isIntersecting){const f=e(l);zn(f)?r.set(l.target,f):c.unobserve(l.target)}else d&&(d(l),r.delete(l.target))})},c=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:qu[i]});return o.forEach(u=>c.observe(u)),()=>c.disconnect()}const Kt=new WeakMap;let q;function Ju(t,e){if(e){const{inlineSize:n,blockSize:s}=e[0];return{width:n,height:s}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function Qu({target:t,contentRect:e,borderBoxSize:n}){var s;(s=Kt.get(t))===null||s===void 0||s.forEach(i=>{i({target:t,contentSize:e,get size(){return Ju(t,n)}})})}function tl(t){t.forEach(Qu)}function el(){typeof ResizeObserver>"u"||(q=new ResizeObserver(tl))}function nl(t,e){q||el();const n=Or(t);return n.forEach(s=>{let i=Kt.get(s);i||(i=new Set,Kt.set(s,i)),i.add(e),q==null||q.observe(s)}),()=>{n.forEach(s=>{const i=Kt.get(s);i==null||i.delete(e),i!=null&&i.size||q==null||q.unobserve(s)})}}const Xt=new Set;let Rt;function sl(){Rt=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Xt.forEach(n=>n(e))},window.addEventListener("resize",Rt)}function il(t){return Xt.add(t),Rt||sl(),()=>{Xt.delete(t),!Xt.size&&Rt&&(Rt=void 0)}}function rl(t,e){return zn(t)?il(t):nl(t,e)}const ol=50,Xs=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),al=()=>({time:0,x:Xs(),y:Xs()}),cl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ys(t,e,n,s){const i=n[e],{length:o,position:r}=cl[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=Un(0,i.scrollLength,i.current);const u=s-c;i.velocity=u>ol?0:Xu(i.current-a,u)}function ul(t,e,n){Ys(t,"x",e,n),Ys(t,"y",e,n),e.time=n}function ll(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:i,left:o}=s.getBBox();for(n.x+=o,n.y+=i;s&&s.tagName!=="svg";)s=s.parentNode}return n}const fl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},nn={start:0,center:.5,end:1};function qs(t,e,n=0){let s=0;if(nn[t]!==void 0&&(t=nn[t]),Ir(t)){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return _n(t)&&(s=e*t),n+s}const dl=[0,0];function hl(t,e,n,s){let i=Array.isArray(t)?t:dl,o=0,r=0;return _n(t)?i=[t,t]:Ir(t)&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,nn[t]?t:"0"]),o=qs(i[0],n,s),r=qs(i[1],e),o-r}const pl={x:0,y:0};function ml(t,e,n){let{offset:s=fl.All}=n;const{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?ll(i,t):pl,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 d=s.length;for(let f=0;f<d;f++){const h=hl(s[f],u[r],c[r],a[o]);!l&&h!==e[o].interpolatorOffsets[f]&&(l=!0),e[o].offset[f]=h}l&&(e[o].interpolate=Ku(Dr(d),e[o].offset),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function gl(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}function yl(t,e,n,s={}){const i=s.axis||"y";return{measure:()=>gl(t,s.target,n),update:o=>{ul(t,n,o),(s.offset||s.target)&&ml(t,n,s)},notify:zn(e)?()=>e(n):vl(e,n[i])}}function vl(t,e){return t.pause(),t.forEachNative((n,{easing:s})=>{var i,o;if(n.updateDuration)s||(n.easing=Er),n.updateDuration(1);else{const r={duration:1e3};s||(r.easing="linear"),(o=(i=n.effect)===null||i===void 0?void 0:i.updateTiming)===null||o===void 0||o.call(i,r)}}),()=>{t.currentTime=e.progress}}const Tt=new WeakMap,Zs=new WeakMap,Oe=new WeakMap,Js=t=>t===document.documentElement?window:t;function xl(t,e={}){var{container:n=document.documentElement}=e,s=Yu(e,["container"]);let i=Oe.get(n);i||(i=new Set,Oe.set(n,i));const o=al(),r=yl(n,t,o,s);if(i.add(r),!Tt.has(n)){const u=()=>{const d=performance.now();for(const f of i)f.measure();for(const f of i)f.update(d);for(const f of i)f.notify()};Tt.set(n,u);const l=Js(n);window.addEventListener("resize",u,{passive:!0}),n!==document.documentElement&&Zs.set(n,rl(n,u)),l.addEventListener("scroll",u,{passive:!0})}const a=Tt.get(n),c=requestAnimationFrame(a);return()=>{var u;typeof t!="function"&&t.stop(),cancelAnimationFrame(c);const l=Oe.get(n);if(!l||(l.delete(r),l.size))return;const d=Tt.get(n);Tt.delete(n),d&&(Js(n).removeEventListener("scroll",d),(u=Zs.get(n))===null||u===void 0||u(),window.removeEventListener("resize",d))}}function Qs(t,e){_i(Boolean(!e||e.current))}const bl=()=>({scrollX:z(0),scrollY:z(0),scrollXProgress:z(0),scrollYProgress:z(0)});function Br({container:t,target:e,layoutEffect:n=!0,...s}={}){const i=D(bl);return(n?Q:p.useEffect)(()=>(Qs("target",e),Qs("container",t),xl(({x:r,y:a})=>{i.scrollX.set(r.current),i.scrollXProgress.set(r.progress),i.scrollY.set(a.current),i.scrollYProgress.set(a.progress)},{...s,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0})),[]),i}function ql(t){return Br({container:t})}function Zl(){return Br()}function Tl(t){const e=p.useRef(0),{isStatic:n}=p.useContext(K);p.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:o})=>{e.current||(e.current=i),t(i-e.current,o)};return E.update(s,!0),()=>$.update(s)},[t])}function Jl(){const t=ct(0);return Tl(e=>t.set(e)),t}class Vl extends Mi{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(e){let n;X.has(e)?(this.transforms.add(e),n="transform"):!e.startsWith("origin")&&!un(e)&&e!=="willChange"&&(n=Ot(e)),n&&(me(this.members,n),this.update())}remove(e){X.has(e)?(this.transforms.delete(e),this.transforms.size||Ft(this.members,"transform")):Ft(this.members,Ot(e)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Ql(){return D(()=>new Vl("auto"))}function tf(t,e,n){p.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function Pl(){!Bn.current&&fr();const[t]=p.useState(oe.current);return t}function ef(){const t=Pl(),{reducedMotion:e}=p.useContext(K);return e==="never"?!1:e==="always"?!0:t}function Cl(){const t=new Set,e={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,s){const i=[];return t.forEach(o=>{i.push(In(o,n,{transitionOverride:s}))}),Promise.all(i)},set(n){return t.forEach(s=>{sa(s,n)})},stop(){t.forEach(n=>{Ja(n)})},mount(){return()=>{e.stop()}}};return e}function Sl(){const t=D(Cl);return Q(t.mount,[]),t}const nf=Sl,Al=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function sf(...t){const e=p.useRef(0),[n,s]=p.useState(t[e.current]),i=p.useCallback(o=>{e.current=typeof o!="number"?Al(0,t.length,e.current+1):o,s(t[e.current])},[t.length,...t]);return[n,i]}function rf(t,{root:e,margin:n,amount:s,once:i=!1}={}){const[o,r]=p.useState(!1);return p.useEffect(()=>{if(!t.current||i&&o)return;const a=()=>(r(!0),i?void 0:()=>r(!1)),c={root:e&&e.current||void 0,margin:n,amount:s==="some"?"any":s};return Zu(t.current,a,c)},[e,t,n,i]),o}class wl{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const Ml=()=>new wl;function of(){return D(Ml)}function Rl(t){return t!==null&&typeof t=="object"&&an in t}function af(t){if(Rl(t))return t[an]}function El(){return Ll}function Ll(t){at.current&&(at.current.isUpdating=!1,at.current.blockUpdate(),t&&t())}function cf(){const[t,e]=jn(),n=El();return p.useEffect(()=>{E.postRender(()=>E.postRender(()=>We.current=!1))},[e]),s=>{n(()=>{We.current=!0,t(),s()})}}function uf(){return p.useCallback(()=>{const e=at.current;e&&e.resetTree()},[])}const Fr=(t,e)=>`${t}: ${e}`,ae=new Map;function Dl(t,e,n,s){const i=Fr(t,X.has(e)?"transform":e),o=ae.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,c=()=>{ae.delete(i);try{r.cancel()}catch{}};if(a!==null){const u=performance.now();return s.update(()=>{n.animation&&(n.animation.currentTime=performance.now()-u)}),s.render(c),u-a||0}else return c(),0}function lf(t,e,n,s,i){const o=t.dataset[ji];if(!o)return;window.HandoffAppearAnimations=Dl;const r=Fr(o,e),a=He(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});ae.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const u=He(t,e,n,s);document.timeline&&(u.startTime=document.timeline.currentTime),ae.set(r,{animation:u,startTime:performance.now()}),i&&i(u)};a.ready?a.ready.then(c).catch(ye):c()}const sn=()=>({});class Il extends hr{build(){}measureInstanceViewportBox(){return R()}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return sn()}getBaseTargetFromProps(){}readValueFromInstance(e,n,s){return s.initialState[n]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s}){const i=ki(s,e||{},this);return Fi(this,s,i),{transition:e,transitionEnd:n,...s}}}const Ol=gn({scrapeMotionValuesFromProps:sn,createRenderState:sn});function ff(t){const[e,n]=p.useState(t),s=Ol({},!1),i=D(()=>new Il({props:{},visualState:s},{initialState:t}));p.useEffect(()=>(i.mount({}),()=>i.unmount()),[i]),p.useEffect(()=>{i.setProps({onUpdate:r=>{n({...r})}})},[n,i]);const o=D(()=>r=>In(i,r));return[e,o]}const Bl=1e5,ti=t=>t>.001?1/t:Bl;function df(t){let e=ct(1),n=ct(1);const s=ei();t?(e=t.scaleX||e,n=t.scaleY||n):s&&(e=s.getValue("scaleX",1),n=s.getValue("scaleY",1));const i=en(e,ti),o=en(n,ti);return{scaleX:i,scaleY:o}}export{zl as AnimatePresence,Nl as AnimateSharedLayout,S as AnimationType,wu as DeprecatedLayoutGroupContext,wl as DragControls,ru as FlatTree,Eu as LayoutGroup,Dt as LayoutGroupContext,$l as LazyMotion,Wl as MotionConfig,K as MotionConfigContext,ce as MotionContext,Mi as MotionValue,gt as PresenceContext,Gl as Reorder,si as SwitchLayoutGroupContext,hr as VisualElement,pt as addPointerEvent,yi as addPointerInfo,Xr as addScaleCorrector,Yc as animate,In as animateVisualElement,Cl as animationControls,er as animations,va as anticipate,Ln as backIn,ya as backInOut,Ki as backOut,Zr as buildTransform,B as calcLength,Fi as checkTargetForNewValues,Hi as circIn,ga as circInOut,En as circOut,mt as clamp,R as createBox,_l as createDomMotionComponent,ii as createMotionComponent,Gi as cubicBezier,Ji as delay,rs as distance,ac as distance2D,Nu as domAnimation,Hl as domMax,wn as easeIn,Mn as easeInOut,oa as easeOut,oo as filterProps,H as frameData,ue as isBrowser,bi as isDragActive,Rl as isMotionComponent,L as isMotionValue,Zt as isValidMotionProp,Ul as m,gn as makeUseVisualState,A as mix,Cr as motion,z as motionValue,ra as optimizedAppearDataAttribute,he as pipe,Gt as resolveMotionValue,Xi as spring,lf as startOptimizedAppearAnimation,E as sync,_u as transform,af as unwrapMotionComponent,nf as useAnimation,Sl as useAnimationControls,Tl as useAnimationFrame,sf as useCycle,ff as useDeprecatedAnimatedState,df as useDeprecatedInvertedScale,Qt as useDomEvent,of as useDragControls,ql as useElementScroll,jn as useForceUpdate,rf as useInView,El as useInstantLayoutTransition,cf as useInstantTransition,kl as useIsPresent,Q as useIsomorphicLayoutEffect,Kl as useMotionTemplate,ct as useMotionValue,tf as useMotionValueEvent,Pi as usePresence,Pl as useReducedMotion,ef as useReducedMotionConfig,uf as useResetProjection,Br as useScroll,Xl as useSpring,Jl as useTime,en as useTransform,vn as useUnmountEffect,Yl as useVelocity,Zl as useViewportScroll,ei as useVisualElementContext,Ql as useWillChange,Al as wrap};