1var _u=Object.defineProperty;var Hu=(t,e,s)=>e in t?_u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var A=(t,e,s)=>Hu(t,typeof e!="symbol"?e+"":e,s);import{j as w,r as v}from"./jsx-runtime-BMrMXMSG.js";import{B as Gu,e as Rt}from"./button-Oow4zAKA.js";import{W as Fa}from"./Wrapper-D5Z6EQyl.js";import{b as Xu}from"./crownAwards-qzdGRv-K.js";import{L as H}from"./components-DyOeu3Gm.js";import{t as Yu}from"./analytics.client-_YoDyUjg.js";const Ba=({label:t="Schedule a call with us",...e})=>{const s=()=>{Yu("schedule_call_click",{event_category:"engagement",event_label:"schedule_call_page_link"})};return w.jsx(Gu,{...e,asChild:!0,children:w.jsx(H,{viewTransition:!0,to:"/schedule",onClick:s,children:t})})},Cx=({isTransparent:t,isFocused:e,hideCta:s=!1,showBanner:n=!1})=>{const i=n||Xu();return w.jsxs(w.Fragment,{children:[i&&w.jsx("div",{className:"bg-brand-sienna text-white py-3 text-center",children:w.jsx("div",{className:"container mx-auto px-4",children:w.jsxs("p",{className:"font-serif text-lg",children:["Monarch Announces Winners of the 2025 Monarch Crown Awards Honoring Excellence in Women's Health."," ",w.jsx(H,{to:"/crownawards/winners",className:"font-bold hover:text-white/80 transition-colors",children:"Winners of the 2025 Monarch Crown Awards â"})]})})}),w.jsx("header",{className:Rt("hidden w-full h-32 z-10 lg:flex items-center",t?"bg-transparent text-brand-cream":"bg-brand-cream text-brand-umber"),children:w.jsx(Fa,{children:w.jsxs("div",{className:"grid grid-cols-12 items-center",children:[w.jsx("div",{className:"col-span-3",children:w.jsxs(H,{viewTransition:!0,to:"/",children:[t&&w.jsx("img",{src:"/img/logo-dark-alt.svg",alt:"MonarchMD",className:"w-[200px]"}),!t&&w.jsx("img",{src:"/img/logo-alt.svg",alt:"MonarchMD",className:"w-[200px]"})]})}),w.jsx("div",{className:"flex justify-center col-span-6",children:!e&&w.jsxs("div",{className:`px-2.5 py-2.5 ${t?"bg-white/30":"bg-white text-brand-umber"} backdrop-blur-lg rounded-xl flex items-center gap-2.5 justify-center text-brand-cream text-lg`,children:[w.jsx(H,{viewTransition:!0,to:"/",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"Home"}),w.jsx(H,{viewTransition:!0,to:"/how-it-works",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"How it works"}),w.jsx(H,{viewTransition:!0,to:"/our-mission",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"Our mission"}),w.jsx(H,{viewTransition:!0,to:"/insights",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"Insights"}),w.jsx(H,{viewTransition:!0,to:"/careers",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"Careers"}),!s&&w.jsx(H,{viewTransition:!0,to:"/contact",className:"px-4 py-1 hover:bg-white/10 bg-transparent rounded-md focus:bg-white/10 transition-colors",children:"Contact"})]})}),w.jsx("div",{className:"flex justify-end items-center gap-8 col-span-3",children:!s&&w.jsx(Ba,{label:"Schedule a call with us",className:"text-lg",size:"lg",variant:t?"secondary":"default"})})]})})})]})};var qu="1.2.3";function Oa(t,e,s){return Math.max(t,Math.min(e,s))}function Zu(t,e,s){return(1-s)*t+s*e}function Ju(t,e,s,n){return Zu(t,e,1-Math.exp(-s*n))}function Qu(t,e){return(t%e+e)%e}var th=class{constructor(){A(this,"isRunning",!1);A(this,"value",0);A(this,"from",0);A(this,"to",0);A(this,"currentTime",0);A(this,"lerp");A(this,"duration");A(this,"easing");A(this,"onUpdate")}advance(t){var s;if(!this.isRunning)return;let e=!1;if(this.duration&&this.easing){this.currentTime+=t;const n=Oa(0,this.currentTime/this.duration,1);e=n>=1;const i=e?1:this.easing(n);this.value=this.from+(this.to-this.from)*i}else this.lerp?(this.value=Ju(this.value,this.to,this.lerp*60,t),Math.round(this.value)===this.to&&(this.value=this.to,e=!0)):(this.value=this.to,e=!0);e&&this.stop(),(s=this.onUpdate)==null||s.call(this,this.value,e)}stop(){this.isRunning=!1}
1fromTo(t,e,{lerp:s,duration:n,easing:i,onStart:o,onUpdate:r}){this.from=this.value=t,this.to=e,this.lerp=s,this.duration=n,this.easing=i,this.currentTime=0,this.isRunning=!0,o==null||o(),this.onUpdate=r}};function eh(t,e){let s;return function(...n){let i=this;clearTimeout(s),s=setTimeout(()=>{s=void 0,t.apply(i,n)},e)}}var sh=class{constructor(t,e,{autoResize:s=!0,debounce:n=250}={}){A(this,"width",0);A(this,"height",0);A(this,"scrollHeight",0);A(this,"scrollWidth",0);A(this,"debouncedResize");A(this,"wrapperResizeObserver");A(this,"contentResizeObserver");A(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});A(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});A(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=t,this.content=e,s&&(this.debouncedResize=eh(this.resize,n),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var t,e;(t=this.wrapperResizeObserver)==null||t.disconnect(),(e=this.contentResizeObserver)==null||e.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},Ia=class{constructor(){A(this,"events",{})}emit(t,...e){var n;let s=this.events[t]||[];for(let i=0,o=s.length;i<o;i++)(n=s[i])==null||n.call(s,...e)}on(t,e){var s;return(s=this.events[t])!=null&&s.push(e)||(this.events[t]=[e]),()=>{var n;this.events[t]=(n=this.events[t])==null?void 0:n.filter(i=>e!==i)}}off(t,e){var s;this.events[t]=(s=this.events[t])==null?void 0:s.filter(n=>e!==n)}destroy(){this.events={}}},Qi=100/6,vt={passive:!1},nh=class{constructor(t,e={wheelMultiplier:1,touchMultiplier:1}){A(this,"touchStart",{x:0,y:0});A(this,"lastDelta",{x:0,y:0});A(this,"window",{width:0,height:0});A(this,"emitter",new Ia);A(this,"onTouchStart",t=>{const{clientX:e,clientY:s}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=s,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})});A(this,"onTouchMove",t=>{const{clientX:e,clientY:s}=t.targetTouches?t.targetTouches[0]:t,n=-(e-this.touchStart.x)*this.options.touchMultiplier,i=-(s-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=e,this.touchStart.y=s,this.lastDelta={x:n,y:i},this.emitter.emit("scroll",{deltaX:n,deltaY:i,event:t})});A(this,"onTouchEnd",t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})});A(this,"onWheel",t=>{let{deltaX:e,deltaY:s,deltaMode:n}=t;const i=n===1?Qi:n===2?this.window.width:1,o=n===1?Qi:n===2?this.window.height:1;e*=i,s*=o,e*=this.options.wheelMultiplier,s*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:e,deltaY:s,event:t})});A(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=t,this.options=e,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,vt),this.element.addEventListener("touchstart",this.onTouchStart,vt),this.element.addEventListener("touchmove",this.onTouchMove,vt),this.element.addEventListener("touchend",this.onTouchEnd,vt)}on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,vt),this.element.removeEventListener("touchstart",this.onTouchStart,vt),this.element.removeEventListener("touchmove",this.onTouchMove,vt),this.element.removeEventListener("touchend",this.onTouchEnd,vt)}},ih=class{constructor({wrapper:t=window,content:e=document.documentElement,eventsTarget:s=t,smoothWheel:n=!0,syncTouch:i=!1,syncTouchLerp:o=.075,touchInertiaMultiplier:r=35,duration:a,easing:l=P=>Math.min(1,1.001-Math.pow(2,-10*P)),lerp:u=.1,infinite:c=!1,orientation:h="vertical",gestureOrientation:f="vertical",touchMultiplier:d=1,wheelMultiplier:p=1,autoResize:g=!0,prevent:y,virtualScroll:m,overscroll:x=!0,autoRaf:T=!1,anchors:V=!1,__experimental__naiveDimensions:S=!1}={}){A(this,"_isScrolling",!1);A(this,"_isStopped",!1);A(this,"_isLocked",!1);A(this,"_preventNextNativeScrollEvent",!1);A(this,"_resetVelocityTimeout",null);A(this,"__rafID",null);A(this,"isTouching");A(this,"time",0);A(this,"userData",{});A(this,"lastVelocity",0);A(this,"velocity",0);A(this,"direction",0);A(this,"options");A(this,"targetScroll");A(this,"animatedScroll");A(this,"animate",new th);A(this,"emitter",new Ia);A(this,"dimensions");A(this,"virtualScroll");A(this,"onScrollEnd",t=>{t instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&t.stopPropagation()});A(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});A(this,"onClick",t=>{const s=t.composedPath().find(n=>{var i,o,r;return n instanceof HTMLAnchorElement&&(((i=n.getAttribute("href"))==null?void 0:i.startsWith("#"))||((o=n.getAttribute("href"))==null?void 0:o.startsWith("/#"))||((r=n.getAttribute("href"))==null?void 0:r.startsWith("./#")))});if(s){const n=s.getAttribute("href");if(n){const i=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0;this.scrollTo(`#${n.split("#")[1]}`,i)}}});A(this,"onPointerDown",t=>{t.button===1&&this.reset()});A(this,"onVirtualScroll",t=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(t)===!1)return;const{deltaX:e,deltaY:s,event:n}=t;if(this.emitter.emit("virtual-scroll",{deltaX:e,deltaY:s,event:n}),n.ctrlKey||n.lenisStopPropagation)return;const i=n.type.includes("touch"),o=n.type.includes("wheel");this.isTouching=n.type==="touchstart"||n.type==="touchmove";
1const r=e===0&&s===0;if(this.options.syncTouch&&i&&n.type==="touchstart"&&r&&!this.isStopped&&!this.isLocked){this.reset();return}const l=this.options.gestureOrientation==="vertical"&&s===0||this.options.gestureOrientation==="horizontal"&&e===0;if(r||l)return;let u=n.composedPath();u=u.slice(0,u.indexOf(this.rootElement));const c=this.options.prevent;if(u.find(y=>{var m,x,T;return y instanceof HTMLElement&&(typeof c=="function"&&(c==null?void 0:c(y))||((m=y.hasAttribute)==null?void 0:m.call(y,"data-lenis-prevent"))||i&&((x=y.hasAttribute)==null?void 0:x.call(y,"data-lenis-prevent-touch"))||o&&((T=y.hasAttribute)==null?void 0:T.call(y,"data-lenis-prevent-wheel")))}))return;if(this.isStopped||this.isLocked){n.preventDefault();return}if(!(this.options.syncTouch&&i||this.options.smoothWheel&&o)){this.isScrolling="native",this.animate.stop(),n.lenisStopPropagation=!0;return}let f=s;this.options.gestureOrientation==="both"?f=Math.abs(s)>Math.abs(e)?s:e:this.options.gestureOrientation==="horizontal"&&(f=e),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&s>0||this.animatedScroll===this.limit&&s<0))&&(n.lenisStopPropagation=!0),n.preventDefault();const d=i&&this.options.syncTouch,g=i&&n.type==="touchend"&&Math.abs(f)>5;g&&(f=this.velocity*this.options.touchInertiaMultiplier),this.scrollTo(this.targetScroll+f,{programmatic:!1,...d?{lerp:g?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});A(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});A(this,"raf",t=>{const e=t-(this.time||t);this.time=t,this.animate.advance(e*.001),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))});window.lenisVersion=qu,(!t||t===document.documentElement)&&(t=window),this.options={wrapper:t,content:e,eventsTarget:s,smoothWheel:n,syncTouch:i,syncTouchLerp:o,touchInertiaMultiplier:r,duration:a,easing:l,lerp:u,infinite:c,gestureOrientation:f,orientation:h,touchMultiplier:d,wheelMultiplier:p,autoResize:g,prevent:y,virtualScroll:m,overscroll:x,autoRaf:T,anchors:V,__experimental__naiveDimensions:S},this.dimensions=new sh(t,e,{autoResize:g}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.anchors&&this.options.wrapper===window&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new nh(s,{touchMultiplier:d,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoRaf&&(this.__rafID=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.options.anchors&&this.options.wrapper===window&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this.__rafID&&cancelAnimationFrame(this.__rafID)}on(t,e){return this.emitter.on(t,e)}off(t,e){return this.emitter.off(t,e)}setScroll(t){this.isHorizontal?this.options.wrapper.scrollTo({left:t,behavior:"instant"}):this.options.wrapper.scrollTo({top:t,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit
1()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){this.isStopped&&(this.reset(),this.isStopped=!1)}stop(){this.isStopped||(this.reset(),this.isStopped=!0)}scrollTo(t,{offset:e=0,immediate:s=!1,lock:n=!1,duration:i=this.options.duration,easing:o=this.options.easing,lerp:r=this.options.lerp,onStart:a,onComplete:l,force:u=!1,programmatic:c=!0,userData:h}={}){if(!((this.isStopped||this.isLocked)&&!u)){if(typeof t=="string"&&["top","left","start"].includes(t))t=0;else if(typeof t=="string"&&["bottom","right","end"].includes(t))t=this.limit;else{let f;if(typeof t=="string"?f=document.querySelector(t):t instanceof HTMLElement&&(t!=null&&t.nodeType)&&(f=t),f){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();e-=this.isHorizontal?p.left:p.top}const d=f.getBoundingClientRect();t=(this.isHorizontal?d.left:d.top)+this.animatedScroll}}if(typeof t=="number"){if(t+=e,t=Math.round(t),this.options.infinite?c&&(this.targetScroll=this.animatedScroll=this.scroll):t=Oa(0,t,this.limit),t===this.targetScroll){a==null||a(this),l==null||l(this);return}if(this.userData=h??{},s){this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),l==null||l(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}c||(this.targetScroll=t),this.animate.fromTo(this.animatedScroll,t,{duration:i,easing:o,lerp:r,onStart:()=>{n&&(this.isLocked=!0),this.isScrolling="smooth",a==null||a(this)},onUpdate:(f,d)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=f-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=f,this.setScroll(this.scroll),c&&(this.targetScroll=f),d||this.emit(),d&&(this.reset(),this.emit(),l==null||l(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.__experimental__naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const t=this.options.wrapper;return this.isHorizontal?t.scrollX??t.scrollLeft:t.scrollY??t.scrollTop}get scroll(){return this.options.infinite?Qu(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(t){this._isStopped!==t&&(this._isStopped=t,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(t){this._isLocked!==t&&(this._isLocked=t,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let t="lenis";return this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),this.isScrolling==="smooth"&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}},rh=class{constructor(t){A(this,"listeners",[]);this.state=t}set(t){this.state=t;for(let e of this.listeners)e(this.state)}subscribe(t){return this.listeners=[...this.listeners,t],()=>{this.listeners=this.listeners.filter(e=>e!==t)}}get(){return this.state}};function oh(t){const[e,s]=v.useState(t.get());return v.useEffect(()=>t.subscribe(n=>s(n)),[t]),e}var Na=v.createContext(null),en=new rh(null);v.forwardRef(({children:t,root:e=!1,options:s={},className:n,autoRaf:i=!0,style:o,props:r},a)=>{const l=v.useRef(null),u=v.useRef(null),[c,h]=v.useState(void 0);v.useImperativeHandle(a,()=>({wrapper:l.current,content:u.current,lenis:c}),[c]),v.useEffect(()=>{const g=new ih({...s,...!e&&{wrapper:l.current,content:u.current},autoRaf:(s==null?void 0:s.autoRaf)??i});return h(g),()=>{g.destroy(),h(void 0)}},[e,JSON.stringify(s)]);const f=v.useRef([]),d=v.useCallback((g,y)=>{f.current.push({callback:g,priority:y}),f.current.sort((m,x)=>m.priority-x.priority)},[]),p=v.useCallback(g=>{f.current=f.current.filter(y=>y.callback!==g)},[]);return v.useEffect(()=>{if(e&&c)return en.set({lenis:c,addCallback:d,removeCallback:p}),()=>en.set(null)},[e,c,d,p]),v.useEffect(()=>{if(!c)return;const g=y=>{var m;for(let x=0;x<f.current.length;x++)(m=f.current[x])==null||m.callback(y)};return c.on("scroll",g),()=>{c.off("scroll",g)}},[c]),w.jsx(Na.Provider,{value:{lenis:c,addCallback:d,removeCallback:p},children:e?t:w.jsx("div",{ref:l,className:n,style:o,...r,children:w.jsx("div",{ref:u,children:t})})})});var ah={};function lh(t,e=[],s=0){const n=v.useContext(Na),i=oh(en),o=n??i??ah,{lenis:r,addCallback:a,removeCallback:l}=o;return v.useEffect(()=>{},[r,a,l,s,...e]),r}const In=v.createContext({});function Nn(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const Un=typeof window<"u",Ua=Un?v.useLayoutEffect:v.useEffect,Ss=v.createContext(null),Wn=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class ch extends v.Component{getSnapshotBeforeUpdate(e){const s=this.props.childRef.current;if(s&&e.isPresent&&!this.props.isPresent){const n=s.offsetParent,
1i=n instanceof HTMLElement&&n.offsetWidth||0,o=this.props.sizeRef.current;o.height=s.offsetHeight||0,o.width=s.offsetWidth||0,o.top=s.offsetTop,o.left=s.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function uh({children:t,isPresent:e,anchorX:s}){const n=v.useId(),i=v.useRef(null),o=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:r}=v.useContext(Wn);return v.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:c,right:h}=o.current;if(e||!i.current||!a||!l)return;const f=s==="left"?`left: ${c}`:`right: ${h}`;i.current.dataset.motionPopId=n;const d=document.createElement("style");return r&&(d.nonce=r),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` 2 [data-motion-pop-id="${n}"] { 3 position: absolute !important; 4 width: ${a}px !important; 5 height: ${l}px !important; 6 ${f}px !important; 7 top: ${u}px !important; 8 } 9 `),()=>{document.head.removeChild(d)}},[e]),w.jsx(ch,{isPresent:e,childRef:i,sizeRef:o,children:v.cloneElement(t,{ref:i})})}const hh=({children:t,initial:e,isPresent:s,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a})=>{const l=Nn(fh),u=v.useId(),c=v.useCallback(f=>{l.set(f,!0);for(const d of l.values())if(!d)return;n&&n()},[l,n]),h=v.useMemo(()=>({id:u,initial:e,isPresent:s,custom:i,onExitComplete:c,register:f=>(l.set(f,!1),()=>l.delete(f))}),o?[Math.random(),c]:[s,c]);return v.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[s]),v.useEffect(()=>{!s&&!l.size&&n&&n()},[s]),r==="popLayout"&&(t=w.jsx(uh,{isPresent:s,anchorX:a,children:t})),w.jsx(Ss.Provider,{value:h,children:t})};function fh(){return new Map}function Wa(t=!0){const e=v.useContext(Ss);if(e===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:i}=e,o=v.useId();v.useEffect(()=>{if(t)return i(o)},[t]);const r=v.useCallback(()=>t&&n&&n(o),[o,n,t]);return!s&&n?[!1,r]:[!0]}const Xe=t=>t.key||"";function tr(t){const e=[];return v.Children.forEach(t,s=>{v.isValidElement(s)&&e.push(s)}),e}const dh=({children:t,custom:e,initial:s=!0,onExitComplete:n,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left"})=>{const[l,u]=Wa(r),c=v.useMemo(()=>tr(t),[t]),h=r&&!l?[]:c.map(Xe),f=v.useRef(!0),d=v.useRef(c),p=Nn(()=>new Map),[g,y]=v.useState(c),[m,x]=v.useState(c);Ua(()=>{f.current=!1,d.current=c;for(let S=0;S<m.length;S++){const P=Xe(m[S]);h.includes(P)?p.delete(P):p.get(P)!==!0&&p.set(P,!1)}},[m,h.length,h.join("-")]);const T=[];if(c!==g){let S=[...c];for(let P=0;P<m.length;P++){const $=m[P],b=Xe($);h.includes(b)||(S.splice(P,0,$),T.push($))}return o==="wait"&&T.length&&(S=T),x(tr(S)),y(c),null}const{forceRender:V}=v.useContext(In);return w.jsx(w.Fragment,{children:m.map(S=>{const P=Xe(S),$=r&&!l?!1:c===m||h.includes(P),b=()=>{if(p.has(P))p.set(P,!0);else return;let D=!0;p.forEach(E=>{E||(D=!1)}),D&&(V==null||V(),x(d.current),r&&(u==null||u()),n&&n())};return w.jsx(hh,{isPresent:$,initial:!f.current||s?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,onExitComplete:$?void 0:b,anchorX:a,children:S},P)})})};function Kn(t,e){t.indexOf(e)===-1&&t.push(e)}function zn(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}let Mx=()=>{},Ka=()=>{};const ph={useManualTiming:!1};function _n(t){let e;return()=>(e===void 0&&(e=t()),e)}const nt=t=>t,we=(t,e,s)=>{const n=e-t;return n===0?1:(s-t)/n};let Hn=class{constructor(){this.subscriptions=[]}add(e){return Kn(this.subscriptions,e),()=>zn(this.subscriptions,e)}notify(e,s,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,s,n);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const lt=t=>t*1e3,ct=t=>t/1e3;function za(t,e){return e?t*(1e3/e):0}const mh=_n(()=>window.ScrollTimeline!==void 0);let gh=class{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=s}attachTimeline(e,s){const n=this.animations.map(i=>{if(mh()&&i.attachTimeline)return i.attachTimeline(e);if(typeof s=="function")return s(i)});return()=>
vendor: 73,610 bytes, line 9
9{n.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let s=0;s<this.animations.length;s++)e=Math.max(e,this.animations[s].duration);return e}runAll(e){this.animations.forEach(s=>s[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},yh=class extends gh{then(e,s){return this.finished.finally(e).then(()=>{})}};const Gn=t=>Array.isArray(t)&&typeof t[0]=="number",vh={};function xh(t,e){const s=_n(t);return()=>vh[e]??s()}const be=xh(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_a=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let o=0;o<i;o++)n+=t(o/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},ue=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,sn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ue([0,.65,.55,1]),circOut:ue([.55,0,1,.45]),backIn:ue([.31,.01,.66,-.59]),backOut:ue([.33,1.53,.69,.99])};function Ha(t,e){if(t)return typeof t=="function"&&be()?_a(t,e):Gn(t)?ue(t):Array.isArray(t)?t.map(s=>Ha(s,e)||sn.easeOut):sn[t]}function Th(t,e,s,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:s};l&&(c.offset=l);const h=Ha(a,i);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:n,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal",pseudoElement:u})}function Xn(t){return typeof t=="function"&&"applyToOptions"in t}function Yn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const as=2e4;function qn(t){let e=0;const s=50;let n=t.next(e);for(;!n.done&&e<as;)e+=s,n=t.next(e);return e>=as?1/0:e}function Sh(t,e=100,s){const n=s({...t,keyframes:[0,e]}),i=Math.min(qn(n),as);return{type:"keyframes",ease:o=>n.next(i*o).value/e,duration:ct(i)}}function Ga(t){return!!(typeof t=="function"&&be()||!t||typeof t=="string"&&(t in sn||be())||Gn(t)||Array.isArray(t)&&t.every(Ga))}function er(t,e){t.timeline=e,t.onfinish=null}const Ye=["read","resolveKeyframes","update","preRender","render","postRender"];function wh(t,e){let s=new Set,n=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const p=f&&i?s:n;return h&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[s,n]=[n,s],s.forEach(l),s.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const bh=40;function Xa(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,r=Ye.reduce((m,x)=>(m[x]=wh(o),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=r,d=()=>{const m=performance.now();s=!1,i.delta=n?1e3/60:Math.max(Math.min(m-i.timestamp,bh),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(d))},p=()=>{s=!0,n=!0,i.isProcessing||t(d)};return{schedule:Ye.reduce((m,x)=>{const T=r[x];return m[x]=(V,S=!1,P=!1)=>(s||p(),T.schedule(V,S,P)),m},{}),cancel:m=>{for(let x=0;x<Ye.length;x++)r[Ye[x]].cancel(m)},state:i,steps:r}}const{schedule:L,cancel:St,state:W,steps:Rs}=Xa(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0),{schedule:Zn}=Xa(queueMicrotask,!1);let es;function Ph(){es=void 0}const ut={now:()=>(es===void 0&&ut.set(W.isProcessing||ph.useManualTiming?W.timestamp:performance.now()),es),set:t=>{es=t,queueMicrotask(Ph)}},rt={x:!1,y:!1};function Ya(){return rt.x||rt.y}function Ah(t){return t==="x"||t==="y"?rt[t]?null:(rt[t]=!0,()=>{rt[t]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function Vh(t,e,s){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function qa(t,e){const s=Vh(t),n=new AbortController,i={passive:!0,...e,signal:n.signal};return[s,i,()=>n.abort()]}function sr(t){return!(t.pointerType==="touch"||Ya())}function Ch(t,e,s={}){const[n,i,o]=qa(t,s),r=a=>{if(!sr(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{sr(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return n.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Za=(t,e)=>e?t===e?!0:Za(t,e.parentElement):!1,Jn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Mh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $h(t){return Mh.has(t.tagName)||t.tabIndex!==-1}const he=new WeakSet;function nr(t){return e=>{e.key==="Enter"&&t(e)}}function Es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Dh=(t,e)=>{const s=t.currentTarget;if(!s)return;const n=nr(()=>{if(he.has(s))return;Es(s,"down");const i=nr(()=>{Es(s,"up")}),o=()=>Es(s,"cancel");s.addEventListener("keyup",i,e),s.addEventListener("blur",o,e)});s.addEventListener("keydown",n,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),e)};function ir(t){return Jn(t)&&!Ya()}function Rh(t,e,s={}){const[n,i,o]=qa(t,s),r=a=>{const l=a.currentTarget;if(!ir(a)||he.has(l))return;he.add(l);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!ir(d)||!he.has(l))&&(he.delete(l),typeof u=="function"&&u(d,{success:p}))},h=d=>{c(d,l===window||l===document||s.useGlobalTarget||Za(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>Dh(u,i)),!$h(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}const rr=30,Eh=t=>!isNaN(parseFloat(t)),or={current:void 0};let Lh=class{constructor(e,s={}){this.version="12.6.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{const o=ut.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=ut.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Eh(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Hn);const n=this.events[e].add(s);return e==="change"?()=>{n(),L.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e,s=!0){!s||!this.passiveEffect?this.updateAndNotify(e,s):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return or.current&&or.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>rr)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,rr);return za(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Pe(t,e){return new Lh(t,e)}const Ja=v.createContext({strict:!1}),ar={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Jt={};for(const t in ar)Jt[t]={isEnabled:e=>ar[t].some(s=>!!e[s])};function kh(t){for(const e in t)Jt[e]={...Jt[e],...t[e]}}const jh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ls(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||jh.has(t)}let Qa=t=>!ls(t);function Fh(t){t&&(Qa=e=>e.startsWith("on")?!ls(e):t(e))}try{Fh(require("@emotion/is-prop-valid").default)}catch{}function Bh(t,e,s){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(Qa(i)||s===!0&&ls(i)||!e&&!ls(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Oh(t){if(typeof Proxy>"u")return t;const e=new Map,s=(...n)=>t(...n);return new Proxy(s,{get:(n,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const ws=v.createContext({});function bs(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ae(t){return typeof t=="string"||Array.isArray(t)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ti=["initial",...Qn];function Ps(t){return bs(t.animate)||ti.some(e=>Ae(t[e]))}function tl(t){return!!(Ps(t)||t.variants)}function Ih(t,e){if(Ps(t)){const{initial:s,animate:n}=t;return{initial:s===!1||Ae(s)?s:void 0,animate:Ae(n)?n:void 0}}return t.inherit!==!1?e:{}}function Nh(t){const{initial:e,animate:s}=Ih(t,v.useContext(ws));return v.useMemo(()=>({initial:e,animate:s}),[lr(e),lr(s)])}function lr(t){return Array.isArray(t)?t.join(" "):t}const Uh=Symbol.for("motionComponentSymbol");function Wt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Wh(t,e,s){return v.useCallback(n=>{n&&t.onMount&&t.onMount(n),e&&(n?e.mount(n):e.unmount()),s&&(typeof s=="function"?s(n):Wt(s)&&(s.current=n))},[e])}const ei=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Kh="framerAppearId",el="data-"+ei(Kh),sl=v.createContext({});function zh(t,e,s,n,i){var g,y;const{visualElement:o}=v.useContext(ws),r=v.useContext(Ja),a=v.useContext(Ss),l=v.useContext(Wn).reducedMotion,u=v.useRef(null);n=n||r.renderer,!u.current&&n&&(u.current=n(t,{visualState:e,parent:o,props:s,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=v.useContext(sl);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&_h(u.current,s,i,h);const f=v.useRef(!1);v.useInsertionEffect(()=>{c&&f.current&&c.update(s,a)});const d=s[el],p=v.useRef(!!d&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,d))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,d)));return Ua(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),Zn.render(c.render),p.current&&c.animationState&&c.animationState.animateChanges())}),v.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,d)}),p.current=!1))}),c}function _h(t,e,s,n){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new s(t.latestValues,e["data-framer-portal-id"]?void 0:nl(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Wt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}function nl(t){if(t)return t.options.allowProjection!==!1?t.projection:nl(t.parent)}function Hh({preloadedFeatures:t,createVisualElement:e,useRender:s,useVisualState:n,Component:i}){t&&kh(t);function o(a,l){let u;const c={...v.useContext(Wn),...a,layoutId:Gh(a)},{isStatic:h}=c,f=Nh(a),d=n(a,h);if(!h&&Un){Xh();const p=Yh(c);u=p.MeasureLayout,f.visualElement=zh(i,d,c,e,p.ProjectionNode)}return w.jsxs(ws.Provider,{value:f,children:[u&&f.visualElement?w.jsx(u,{visualElement:f.visualElement,...c}):null,s(i,a,Wh(d,f.visualElement,l),d,h,f.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const r=v.forwardRef(o);return r[Uh]=i,r}function Gh({layoutId:t}){const e=v.useContext(In).id;return e&&t!==void 0?e+"-"+t:t}function Xh(t,e){v.useContext(Ja).strict}function Yh(t){const{drag:e,layout:s}=Jt;if(!e&&!s)return{};const n={...e,...s};return{MeasureLayout:e!=null&&e.isEnabled(t)||s!=null&&s.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const il=t=>e=>typeof e=="string"&&e.startsWith(t),si=il("--"),qh=il("var(--"),ni=t=>qh(t)?Zh.test(t.split("/*")[0].trim()):!1,Zh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ve={};function Jh(t){for(const e in t)Ve[e]=t[e],si(e)&&(Ve[e].isCSSVariable=!0)}const se=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nt=new Set(se);function rl(t,{layout:e,layoutId:s}){return Nt.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!Ve[t]||t==="opacity")}const G=t=>!!(t&&t.getVelocity),ol=(t,e)=>e&&typeof t=="number"?e.transform(t):t,gt=(t,e,s)=>s>e?e:s<t?t:s,ne={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ce={...ne,transform:t=>gt(0,1,t)},qe={...ne,default:1},Ne=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),xt=Ne("deg"),ht=Ne("%"),C=Ne("px"),Qh=Ne("vh"),tf=Ne("vw"),cr={...ht,parse:t=>ht.parse(t)/100,transform:t=>ht.transform(t*100)},ef={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,backgroundPositionX:C,backgroundPositionY:C},sf={rotate:xt,rotateX:xt,rotateY:xt,rotateZ:xt,scale:qe,scaleX:qe,scaleY:qe,scaleZ:qe,skew:xt,skewX:xt,skewY:xt,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:Ce,originX:cr,originY:cr,originZ:C},ur={...ne,transform:Math.round},ii={...ef,...sf,zIndex:ur,size:C,fillOpacity:Ce,strokeOpacity:Ce,numOctaves:ur},nf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rf=se.length;function of(t,e,s){let n="",i=!0;for(let o=0;o<rf;o++){const r=se[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||s){const u=ol(a,ii[r]);if(!l){i=!1;const c=nf[r]||r;n+=`${c}(${u}) `}s&&(e[r]=u)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}function ri(t,e,s){const{style:n,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Nt.has(l)){r=!0;continue}else if(si(l)){i[l]=u;continue}else{const c=ol(u,ii[l]);l.startsWith("origin")?(a=!0,o[l]=c):n[l]=c}}if(e.transform||(r||s?n.transform=of(e,t.transform,s):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;n.transformOrigin=`${l} ${u} ${c}`}}const oi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function al(t,e,s){for(const n in e)!G(e[n])&&!rl(n,s)&&(t[n]=e[n])}function af({transformTemplate:t},e){return v.useMemo(()=>{const s=oi();return ri(s,e,t),Object.assign({},s.vars,s.style)},[e])}function lf(t,e){const s=t.style||{},n={};return al(n,s,t),Object.assign(n,af(t,e)),n}function cf(t,e){const s={},n=lf(t,e);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,s}const uf=["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 ai(t){return typeof t!="string"||t.includes("-")?!1:!!(uf.indexOf(t)>-1||/[A-Z]/u.test(t))}const hf={offset:"stroke-dashoffset",array:"stroke-dasharray"},ff={offset:"strokeDashoffset",array:"strokeDasharray"};function df(t,e,s=1,n=0,i=!0){t.pathLength=1;const o=i?hf:ff;t[o.offset]=C.transform(-n);const r=C.transform(e),a=C.transform(s);t[o.array]=`${r} ${a}`}function hr(t,e,s){return typeof t=="string"?t:C.transform(e+s*t)}function pf(t,e,s){const n=hr(e,t.x,t.width),i=hr(s,t.y,t.height);return`${n} ${i}`}function li(t,{attrX:e,attrY:s,attrScale:n,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(ri(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=pf(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),s!==void 0&&(f.y=s),n!==void 0&&(f.scale=n),r!==void 0&&df(f,r,a,l,!1)}const ll=()=>({...oi(),attrs:{}}),ci=t=>typeof t=="string"&&t.toLowerCase()==="svg";function mf(t,e,s,n){const i=v.useMemo(()=>{const o=ll();return li(o,e,ci(n),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};al(o,t.style,t),i.style={...o,...i.style}}return i}function gf(t=!1){return(s,n,i,{latestValues:o},r)=>{const l=(ai(s)?mf:cf)(n,o,r,s),u=Bh(n,typeof s=="string",t),c=s!==v.Fragment?{...u,...l,ref:i}:{},{children:h}=n,f=v.useMemo(()=>G(h)?h.get():h,[h]);return v.createElement(s,{...c,children:f})}}function fr(t){const e=[{},{}];return t==null||t.values.forEach((s,n)=>{e[0][n]=s.get(),e[1][n]=s.getVelocity()}),e}function ui(t,e,s,n){if(typeof e=="function"){const[i,o]=fr(n);e=e(s!==void 0?s:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=fr(n);e=e(s!==void 0?s:t.custom,i,o)}return e}const nn=t=>Array.isArray(t),yf=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),vf=t=>nn(t)?t[t.length-1]||0:t;function ss(t){const e=G(t)?t.get():t;return yf(e)?e.toValue():e}function xf({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:s},n,i,o){const r={latestValues:Tf(n,i,o,t),renderState:e()};return s&&(r.onMount=a=>s({props:n,current:a,...r}),r.onUpdate=a=>s(a)),r}const cl=t=>(e,s)=>{const n=v.useContext(ws),i=v.useContext(Ss),o=()=>xf(t,e,n,i);return s?o():Nn(o)};function Tf(t,e,s,n){const i={},o=n(t,{});for(const f in o)i[f]=ss(o[f]);let{initial:r,animate:a}=t;const l=Ps(t),u=tl(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=s?s.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!bs(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=ui(t,f[d]);if(p){const{transitionEnd:g,transition:y,...m}=p;for(const x in m){let T=m[x];if(Array.isArray(T)){const V=c?T.length-1:0;T=T[V]}T!==null&&(i[x]=T)}for(const x in g)i[x]=g[x]}}}return i}function hi(t,e,s){var o;const{style:n}=t,i={};for(const r in n)(G(n[r])||e.style&&G(e.style[r])||rl(r,t)||((o=s==null?void 0:s.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=n[r]);return i}const Sf={useVisualState:cl({scrapeMotionValuesFromProps:hi,createRenderState:oi})};function ul(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}function hl(t,{style:e,vars:s},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const o in s)t.style.setProperty(o,s[o])}const fl=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 dl(t,e,s,n){hl(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(fl.has(i)?i:ei(i),e.attrs[i])}function pl(t,e,s){const n=hi(t,e,s);for(const i in t)if(G(t[i])||G(e[i])){const o=se.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=t[i]}return n}const dr=["x","y","width","height","cx","cy","r"],wf={useVisualState:cl({scrapeMotionValuesFromProps:pl,createRenderState:ll,onUpdate:({props:t,prevProps:e,current:s,renderState:n,latestValues:i})=>{if(!s)return;let o=!!t.drag;if(!o){for(const a in i)if(Nt.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a<dr.length;a++){const l=dr[a];t[l]!==e[l]&&(r=!0)}r&&L.read(()=>{ul(s,n),L.render(()=>{li(n,i,ci(s.tagName),t.transformTemplate),dl(s,n)})})}})};function bf(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...ai(n)?wf:Sf,preloadedFeatures:t,useRender:gf(i),createVisualElement:e,Component:n};return Hh(r)}}function Me(t,e,s){const n=t.getProps();return ui(n,e,s!==void 0?s:n.custom,t)}const ml=new Set(["width","height","top","left","right","bottom",...se]);function Pf(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,Pe(s))}function Af(t,e){const s=Me(t,e);let{transitionEnd:n={},transition:i={},...o}=s||{};o={...o,...n};for(const r in o){const a=vf(o[r]);Pf(t,r,a)}}function Vf(t){return!!(G(t)&&t.add)}function rn(t,e){const s=t.getValue("willChange");if(Vf(s))return s.add(e)}function gl(t){return t.props[el]}const yl=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Cf=1e-7,Mf=12;function $f(t,e,s,n,i){let o,r,a=0;do r=e+(s-e)/2,o=yl(r,n,i)-t,o>0?s=r:e=r;while(Math.abs(o)>Cf&&++a<Mf);return r}function Ue(t,e,s,n){if(t===e&&s===n)return nt;const i=o=>$f(o,0,1,t,s);return o=>o===0||o===1?o:yl(i(o),e,n)}const vl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xl=t=>e=>1-t(1-e),Tl=Ue(.33,1.53,.69,.99),fi=xl(Tl),Sl=vl(fi),wl=t=>(t*=2)<1?.5*fi(t):.5*(2-Math.pow(2,-10*(t-1))),di=t=>1-Math.sin(Math.acos(t)),bl=xl(di),Pl=vl(di),Al=t=>/^0[^.\s]+$/u.test(t);function Df(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Al(t):!0}const pe=t=>Math.round(t*1e5)/1e5,pi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Rf(t){return t==null}const Ef=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mi=(t,e)=>s=>!!(typeof s=="string"&&Ef.test(s)&&s.startsWith(t)||e&&!Rf(s)&&Object.prototype.hasOwnProperty.call(s,e)),Vl=(t,e,s)=>n=>{if(typeof n!="string")return n;const[i,o,r,a]=n.match(pi);return{[t]:parseFloat(i),[e]:parseFloat(o),[s]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Lf=t=>gt(0,255,t),Ls={...ne,transform:t=>Math.round(Lf(t))},kt={test:mi("rgb","red"),parse:Vl("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+Ls.transform(t)+", "+Ls.transform(e)+", "+Ls.transform(s)+", "+pe(Ce.transform(n))+")"};function kf(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const on={test:mi("#"),parse:kf,transform:kt.transform},Kt={test:mi("hsl","hue"),parse:Vl("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+ht.transform(pe(e))+", "+ht.transform(pe(s))+", "+pe(Ce.transform(n))+")"},z={test:t=>kt.test(t)||on.test(t)||Kt.test(t),parse:t=>kt.test(t)?kt.parse(t):Kt.test(t)?Kt.parse(t):on.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?kt.transform(t):Kt.transform(t)},jf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ff(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(pi))==null?void 0:e.length)||0)+(((s=t.match(jf))==null?void 0:s.length)||0)>0}const Cl="number",Ml="color",Bf="var",Of="var(",pr="${}",If=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $e(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(If,l=>(z.test(l)?(n.color.push(o),i.push(Ml),s.push(z.parse(l))):l.startsWith(Of)?(n.var.push(o),i.push(Bf),s.push(l)):(n.number.push(o),i.push(Cl),s.push(parseFloat(l))),++o,pr)).split(pr);return{values:s,split:a,indexes:n,types:i}}function $l(t){return $e(t).values}function Dl(t){const{split:e,types:s}=$e(t),n=e.length;return i=>{let o="";for(let r=0;r<n;r++)if(o+=e[r],i[r]!==void 0){const a=s[r];a===Cl?o+=pe(i[r]):a===Ml?o+=z.transform(i[r]):o+=i[r]}return o}}const Nf=t=>typeof t=="number"?0:t;function Uf(t){const e=$l(t);return Dl(t)(e.map(Nf))}const wt={test:Ff,parse:$l,createTransformer:Dl,getAnimatableNone:Uf},Wf=new Set(["brightness","contrast","saturate","opacity"]);function Kf(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=s.match(pi)||[];if(!n)return t;const i=s.replace(n,"");let o=Wf.has(e)?1:0;return n!==s&&(o*=100),e+"("+o+i+")"}const zf=/\b([a-z-]*)\(.*?\)/gu,an={...wt,getAnimatableNone:t=>{const e=t.match(zf);return e?e.map(Kf).join(" "):t}},_f={...ii,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:an,WebkitFilter:an},Rl=t=>_f[t];function El(t,e){let s=Rl(t);return s!==an&&(s=wt),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const Hf=new Set(["auto","none","0"]);function Gf(t,e,s){let n=0,i;for(;n<t.length&&!i;){const o=t[n];typeof o=="string"&&!Hf.has(o)&&$e(o).values.length&&(i=t[n]),n++}if(i&&s)for(const o of e)t[o]=El(s,i)}const jt=t=>t*180/Math.PI,ln=t=>{const e=jt(Math.atan2(t[1],t[0]));return cn(e)},Xf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ln,rotateZ:ln,skewX:t=>jt(Math.atan(t[1])),skewY:t=>jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},cn=t=>(t=t%360,t<0&&(t+=360),t),mr=ln,gr=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),yr=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Yf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gr,scaleY:yr,scale:t=>(gr(t)+yr(t))/2,rotateX:t=>cn(jt(Math.atan2(t[6],t[5]))),rotateY:t=>cn(jt(Math.atan2(-t[2],t[0]))),rotateZ:mr,rotate:mr,skewX:t=>jt(Math.atan(t[4])),skewY:t=>jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function vr(t){return t.includes("scale")?1:0}function un(t,e){if(!t||t==="none")return vr(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=Yf,i=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Xf,i=a}if(!i)return vr(e);const o=n[e],r=i[1].split(",").map(Zf);return typeof o=="function"?o(r):r[o]}const qf=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return un(s,e)};function Zf(t){return parseFloat(t.trim())}const xr=t=>t===ne||t===C,Jf=new Set(["x","y","z"]),Qf=se.filter(t=>!Jf.has(t));function td(t){const e=[];return Qf.forEach(s=>{const n=t.getValue(s);n!==void 0&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}const Qt={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>un(e,"x"),y:(t,{transform:e})=>un(e,"y")};Qt.translateX=Qt.x;Qt.translateY=Qt.y;const Ot=new Set;let hn=!1,fn=!1;function Ll(){if(fn){const t=Array.from(Ot).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),s=new Map;e.forEach(n=>{const i=td(n);i.length&&(s.set(n,i),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const i=s.get(n);i&&i.forEach(([o,r])=>{var a;(a=n.getValue(o))==null||a.set(r)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}fn=!1,hn=!1,Ot.forEach(t=>t.complete()),Ot.clear()}function kl(){Ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(fn=!0)})}function ed(){kl(),Ll()}let gi=class{constructor(e,s,n,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=n,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ot.add(this),hn||(hn=!0,L.read(kl),L.resolveKeyframes(Ll))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:n,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(n&&s){const l=n.readValue(s,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};const jl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),sd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nd(t){const e=sd.exec(t);if(!e)return[,];const[,s,n,i]=e;return[`--${s??n}`,i]}function Fl(t,e,s=1){const[n,i]=nd(t);if(!n)return;const o=window.getComputedStyle(e).getPropertyValue(n);if(o){const r=o.trim();return jl(r)?parseFloat(r):r}return ni(i)?Fl(i,e,s+1):i}const Bl=t=>e=>e.test(t),id={test:t=>t==="auto",parse:t=>t},Ol=[ne,C,ht,xt,tf,Qh,id],Tr=t=>Ol.find(Bl(t));let Il=class extends gi{constructor(e,s,n,i,o){super(e,s,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),ni(u))){const c=Fl(u,s.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ml.has(n)||e.length!==2)return;const[i,o]=e,r=Tr(i),a=Tr(o);if(r!==a)if(xr(r)&&xr(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,n=[];for(let i=0;i<e.length;i++)Df(e[i])&&n.push(i);n.length&&Gf(e,n,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Qt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const i=s[s.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:s,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const i=e.getValue(s);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=Qt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};const Sr=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(wt.test(t)||t==="0")&&!t.startsWith("url("));function rd(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function od(t,e,s,n){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Sr(i,e),a=Sr(o,e);return!r||!a?!1:rd(t)||(s==="spring"||Xn(s))&&n}const ad=t=>t!==null;function As(t,{repeat:e,repeatType:s="loop"},n){const i=t.filter(ad),o=e&&s!=="loop"&&e%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const ld=40;let Nl=class{constructor({autoplay:e=!0,delay:s=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ut.now(),this.options={autoplay:e,delay:s,type:n,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ld?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ed(),this._resolved}onKeyframesResolved(e,s){this.resolvedAt=ut.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!od(e,n,i,o))if(r)this.options.duration=0;else{l&&l(As(e,this.options,s)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,s);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:s,...c},this.onPostResolved())}onPostResolved(){}then(e,s){return this.currentFinishedPromise.then(e,s)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}};const j=(t,e,s)=>t+(e-t)*s;function ks(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function cd({hue:t,saturation:e,lightness:s,alpha:n}){t/=360,e/=100,s/=100;let i=0,o=0,r=0;if(!e)i=o=r=s;else{const a=s<.5?s*(1+e):s+e-s*e,l=2*s-a;i=ks(l,a,t+1/3),o=ks(l,a,t),r=ks(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:n}}function cs(t,e){return s=>s>0?e:t}const js=(t,e,s)=>{const n=t*t,i=s*(e*e-n)+n;return i<0?0:Math.sqrt(i)},ud=[on,kt,Kt],hd=t=>ud.find(e=>e.test(t));function wr(t){const e=hd(t);if(!e)return!1;let s=e.parse(t);return e===Kt&&(s=cd(s)),s}const br=(t,e)=>{const s=wr(t),n=wr(e);if(!s||!n)return cs(t,e);const i={...s};return o=>(i.red=js(s.red,n.red,o),i.green=js(s.green,n.green,o),i.blue=js(s.blue,n.blue,o),i.alpha=j(s.alpha,n.alpha,o),kt.transform(i))},fd=(t,e)=>s=>e(t(s)),We=(...t)=>t.reduce(fd),dn=new Set(["none","hidden"]);function dd(t,e){return dn.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function pd(t,e){return s=>j(t,e,s)}function yi(t){return typeof t=="number"?pd:typeof t=="string"?ni(t)?cs:z.test(t)?br:yd:Array.isArray(t)?Ul:typeof t=="object"?z.test(t)?br:md:cs}function Ul(t,e){const s=[...t],n=s.length,i=t.map((o,r)=>yi(o)(o,e[r]));return o=>{for(let r=0;r<n;r++)s[r]=i[r](o);return s}}function md(t,e){const s={...t,...e},n={};for(const i in s)t[i]!==void 0&&e[i]!==void 0&&(n[i]=yi(t[i])(t[i],e[i]));return i=>{for(const o in n)s[o]=n[o](i);return s}}function gd(t,e){const s=[],n={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][n[o]],a=t.values[r]??0;s[i]=a,n[o]++}return s}const yd=(t,e)=>{const s=wt.createTransformer(e),n=$e(t),i=$e(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?dn.has(t)&&!i.values.length||dn.has(e)&&!n.values.length?dd(t,e):We(Ul(gd(n,i),i.values),s):cs(t,e)};function Wl(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?j(t,e,s):yi(t)(t,e)}const vd=5;function Kl(t,e,s){const n=Math.max(e-vd,0);return za(s-t(n),e-n)}const B={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Pr=.001;function xd({duration:t=B.duration,bounce:e=B.bounce,velocity:s=B.velocity,mass:n=B.mass}){let i,o,r=1-e;r=gt(B.minDamping,B.maxDamping,r),t=gt(B.minDuration,B.maxDuration,ct(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-s,d=pn(u,r),p=Math.exp(-h);return Pr-f/d*p},o=u=>{const h=u*r*t,f=h*s+s,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-h),g=pn(Math.pow(u,2),r);return(-i(u)+Pr>0?-1:1)*((f-d)*p)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-s)*t+1;return-.001+c*h},o=u=>{const c=Math.exp(-u*t),h=(s-u)*(t*t);return c*h});const a=5/t,l=Sd(i,o,a);if(t=lt(t),isNaN(l))return{stiffness:B.stiffness,damping:B.damping,duration:t};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:r*2*Math.sqrt(n*u),duration:t}}}const Td=12;function Sd(t,e,s){let n=s;for(let i=1;i<Td;i++)n=n-t(n)/e(n);return n}function pn(t,e){return t*Math.sqrt(1-e*e)}const wd=["duration","bounce"],bd=["stiffness","damping","mass"];function Ar(t,e){return e.some(s=>t[s]!==void 0)}function Pd(t){let e={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...t};if(!Ar(t,bd)&&Ar(t,wd))if(t.visualDuration){const s=t.visualDuration,n=2*Math.PI/(s*1.2),i=n*n,o=2*gt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:B.mass,stiffness:i,damping:o}}else{const s=xd(t);e={...e,...s,mass:B.mass},e.isResolvedFromDuration=!0}return e}function us(t=B.visualDuration,e=B.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:i}=s;const o=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Pd({...s,velocity:-ct(s.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),y=r-o,m=ct(Math.sqrt(l/c)),x=Math.abs(y)<5;n||(n=x?B.restSpeed.granular:B.restSpeed.default),i||(i=x?B.restDelta.granular:B.restDelta.default);let T;if(g<1){const S=pn(m,g);T=P=>{const $=Math.exp(-g*m*P);return r-$*((p+g*m*y)/S*Math.sin(S*P)+y*Math.cos(S*P))}}else if(g===1)T=S=>r-Math.exp(-m*S)*(y+(p+m*y)*S);else{const S=m*Math.sqrt(g*g-1);T=P=>{const $=Math.exp(-g*m*P),b=Math.min(S*P,300);return r-$*((p+g*m*y)*Math.sinh(b)+S*y*Math.cosh(b))/S}}const V={calculatedDuration:d&&h||null,next:S=>{const P=T(S);if(d)a.done=S>=h;else{let $=0;g<1&&($=S===0?lt(p):Kl(T,S,P));const b=Math.abs($)<=n,D=Math.abs(r-P)<=i;a.done=b&&D}return a.value=a.done?r:P,a},toString:()=>{const S=Math.min(qn(V),as),P=_a($=>V.next(S*$).value,S,30);return S+"ms "+P},toTransition:()=>{}};return V}us.applyToOptions=t=>{const e=Sh(t,100,us);return t.ease=be()?e.ease:"easeOut",t.duration=lt(e.duration),t.type="keyframes",t};function Vr({keyframes:t,velocity:e=0,power:s=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let g=s*e;const y=h+g,m=r===void 0?y:r(y);m!==y&&(g=m-h);const x=b=>-g*Math.exp(-b/n),T=b=>m+x(b),V=b=>{const D=x(b),E=T(b);f.done=Math.abs(D)<=u,f.value=f.done?m:E};let S,P;const $=b=>{d(f.value)&&(S=b,P=us({keyframes:[f.value,p(f.value)],velocity:Kl(T,b,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return $(0),{calculatedDuration:null,next:b=>{let D=!1;return!P&&S===void 0&&(D=!0,V(b),$(b)),S!==void 0&&b>=S?P.next(b-S):(!D&&V(b),f)}}}const Ad=Ue(.42,0,1,1),Vd=Ue(0,0,.58,1),zl=Ue(.42,0,.58,1),Cd=t=>Array.isArray(t)&&typeof t[0]!="number",Md={linear:nt,easeIn:Ad,easeInOut:zl,easeOut:Vd,circIn:di,circInOut:Pl,circOut:bl,backIn:fi,backInOut:Sl,backOut:Tl,anticipate:wl},Cr=t=>{if(Gn(t)){Ka(t.length===4);const[e,s,n,i]=t;return Ue(e,s,n,i)}else if(typeof t=="string")return Md[t];return t};function $d(t,e,s){const n=[],i=s||Wl,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||nt:e;a=We(l,a)}n.push(a)}return n}function Dd(t,e,{clamp:s=!0,ease:n,mixer:i}={}){const o=t.length;if(Ka(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=$d(e,n,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=we(t[h],t[h+1],c);return a[h](f)};return s?c=>u(gt(t[0],t[o-1],c)):u}function Rd(t,e){const s=t[t.length-1];for(let n=1;n<=e;n++){const i=we(0,e,n);t.push(j(s,1,i))}}function Ed(t){const e=[0];return Rd(e,t.length-1),e}function Ld(t,e){return t.map(s=>s*e)}function kd(t,e){return t.map(()=>e||zl).splice(0,t.length-1)}function hs({duration:t=300,keyframes:e,times:s,ease:n="easeInOut"}){const i=Cd(n)?n.map(Cr):Cr(n),o={done:!1,value:e[0]},r=Ld(s&&s.length===e.length?s:Ed(e),t),a=Dd(r,e,{ease:Array.isArray(i)?i:kd(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const jd=t=>{const e=({timestamp:s})=>t(s);return{start:()=>L.update(e,!0),stop:()=>St(e),now:()=>W.isProcessing?W.timestamp:ut.now()}},Fd={decay:Vr,inertia:Vr,tween:hs,keyframes:hs,spring:us},Bd=t=>t/100;let vi=class extends Nl{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:s,motionValue:n,element:i,keyframes:o}=this.options,r=(i==null?void 0:i.KeyframeResolver)||gi,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new r(o,a,s,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:s="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Xn(s)?s:Fd[s]||hs;let l,u;a!==hs&&typeof e[0]!="number"&&(l=We(Bd,Wl(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});o==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=qn(c));const{calculatedDuration:h}=c,f=h+i,d=f*(n+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,s=!1){const{resolved:n}=this;if(!n){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=n;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),s?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let T=this.currentTime,V=o;if(d){const b=Math.min(this.currentTime,c)/h;let D=Math.floor(b),E=b%1;!E&&b>=1&&(E=1),E===1&&D--,D=Math.min(D,d+1),!!(D%2)&&(p==="reverse"?(E=1-E,g&&(E-=g/h)):p==="mirror"&&(V=r)),T=gt(0,1,E)*h}const S=x?{done:!1,value:l[0]}:V.next(T);a&&(S.value=a(S.value));let{done:P}=S;!x&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return $&&i!==void 0&&(S.value=As(l,this.options,i)),y&&y(S.value),$&&this.finish(),S}get duration(){const{resolved:e}=this;return e?ct(e.calculatedDuration):0}get time(){return ct(this.currentTime)}set time(e){e=lt(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;this.playbackSpeed=e,s&&(this.time=ct(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=jd,onPlay:s,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),s&&s();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}get finished(){return this.currentFinishedPromise}};const Od=new Set(["opacity","clipPath","filter","transform"]),Id=_n(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fs=10,Nd=2e4;function Ud(t){return Xn(t.type)||t.type==="spring"||!Ga(t.ease)}function Wd(t,e){const s=new vi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:t[0]};const i=[];let o=0;for(;!n.done&&o<Nd;)n=s.sample(o),i.push(n.value),o+=fs;return{times:void 0,keyframes:i,duration:o-fs,ease:"linear"}}const _l={anticipate:wl,backInOut:Sl,circInOut:Pl};function Kd(t){return t in _l}let Mr=class extends Nl{constructor(e){super(e);const{name:s,motionValue:n,element:i,keyframes:o}=this.options;this.resolver=new Il(o,(r,a)=>this.onKeyframesResolved(r,a),s,n,i),this.resolver.scheduleResolve()}initPlayback(e,s){let{duration:n=300,times:i,ease:o,type:r,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&be()&&Kd(o)&&(o=_l[o]),Ud(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:p,...g}=this.options,y=Wd(e,g);e=y.keyframes,e.length===1&&(e[1]=e[0]),n=y.duration,i=y.times,o=y.ease,r="keyframes"}const c=Th(a.owner.current,l,e,{...this.options,duration:n,times:i,ease:o});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(er(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set(As(e,this.options,s)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:r,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:s}=e;return ct(s)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:s}=e;return ct(s.currentTime||0)}set time(e){const{resolved:s}=this;if(!s)return;const{animation:n}=s;n.currentTime=lt(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:s}=e;return s.playbackRate}get finished(){return this.resolved.animation.finished}set speed(e){const{resolved:s}=this;if(!s)return;const{animation:n}=s;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:s}=e;return s.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:s}=e;return s.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:s}=this;if(!s)return nt;const{animation:n}=s;er(n,e)}return nt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.playState==="finished"&&this.updateFinishedPromise(),s.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:s,keyframes:n,duration:i,type:o,ease:r,times:a}=e;if(s.playState==="idle"||s.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new vi({...d,keyframes:n,duration:i,type:o,ease:r,times:a,isGenerator:!0}),g=lt(this.time);u.setWithVelocity(p.sample(g-fs).value,p.sample(g).value,fs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:s,name:n,repeatDelay:i,repeatType:o,damping:r,type:a}=e;if(!s||!s.owner||!(s.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=s.owner.getProps();return Id()&&n&&Od.has(n)&&(n!=="transform"||!u)&&!l&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}};const zd={type:"spring",stiffness:500,damping:25,restSpeed:10},_d=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Hd={type:"keyframes",duration:.8},Gd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xd=(t,{keyframes:e})=>e.length>2?Hd:Nt.has(t)?t.startsWith("scale")?_d(e[1]):zd:Gd;function Yd({when:t,delay:e,delayChildren:s,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const xi=(t,e,s,n={},i,o)=>r=>{const a=Yn(n,t)||{},l=a.delay||n.delay||0;let{elapsed:u=0}=n;u=u-lt(l);let c={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Yd(a)||(c={...c,...Xd(t,c)}),c.duration&&(c.duration=lt(c.duration)),c.repeatDelay&&(c.repeatDelay=lt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=As(c.keyframes,a);if(f!==void 0)return L.update(()=>{c.onUpdate(f),c.onComplete()}),new yh([])}return!o&&Mr.supports(c)?new Mr(c):new vi(c)};function qd({protectedKeys:t,needsAnimating:e},s){const n=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,n}function Hl(t,e,{delay:s=0,transitionOverride:n,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;n&&(o=n);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&qd(u,c))continue;const d={delay:s,...Yn(o||{},c)};let p=!1;if(window.MotionHandoffAnimation){const y=gl(t);if(y){const m=window.MotionHandoffAnimation(y,c,L);m!==null&&(d.startTime=m,p=!0)}}rn(t,c),h.start(xi(c,h,f,t.shouldReduceMotion&&ml.has(c)?{type:!1}:d,t,p));const g=h.animation;g&&l.push(g)}return r&&Promise.all(l).then(()=>{L.update(()=>{r&&Af(t,r)})}),l}function mn(t,e,s={}){var l;const n=Me(t,e,s.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(i=s.transitionOverride);const o=n?()=>Promise.all(Hl(t,n,s)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Zd(t,e,c+u,h,f,s)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(s.delay)])}function Zd(t,e,s=0,n=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(t.variantChildren).sort(Jd).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(mn(u,e,{...o,delay:s+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function Jd(t,e){return t.sortNodePosition(e)}function Qd(t,e,s={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(o=>mn(t,o,s));n=Promise.all(i)}else if(typeof e=="string")n=mn(t,e,s);else{const i=typeof e=="function"?Me(t,e,s.custom):e;n=Promise.all(Hl(t,i,s))}return n.then(()=>{t.notify("AnimationComplete",e)})}function Gl(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let n=0;n<s;n++)if(e[n]!==t[n])return!1;return!0}const tp=ti.length;function Xl(t){if(!t)return;if(!t.isControllingVariants){const s=t.parent?Xl(t.parent)||{}:{};return t.props.initial!==void 0&&(s.initial=t.props.initial),s}const e={};for(let s=0;s<tp;s++){const n=ti[s],i=t.props[n];(Ae(i)||i===!1)&&(e[n]=i)}return e}const ep=[...Qn].reverse(),sp=Qn.length;function np(t){return e=>Promise.all(e.map(({animation:s,options:n})=>Qd(t,s,n)))}function ip(t){let e=np(t),s=$r(),n=!0;const i=l=>(u,c)=>{var f;const h=Me(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...g}=h;u={...u,...g,...p}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Xl(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<sp;y++){const m=ep[y],x=s[m],T=u[m]!==void 0?u[m]:c[m],V=Ae(T),S=m===l?x.isActive:null;S===!1&&(p=y);let P=T===c[m]&&T!==u[m]&&V;if(P&&n&&t.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...d},!x.isActive&&S===null||!T&&!x.prevProp||bs(T)||typeof T=="boolean")continue;const $=rp(x.prevProp,T);let b=$||m===l&&x.isActive&&!P&&V||y>p&&V,D=!1;const E=Array.isArray(T)?T:[T];let Z=E.reduce(i(m),{});S===!1&&(Z={});const{prevResolvedValues:oe={}}=x,Ds={...oe,...Z},ae=R=>{b=!0,f.has(R)&&(D=!0,f.delete(R)),x.needsAnimating[R]=!0;const U=t.getValue(R);U&&(U.liveStyle=!1)};for(const R in Ds){const U=Z[R],Ct=oe[R];if(d.hasOwnProperty(R))continue;let Mt=!1;nn(U)&&nn(Ct)?Mt=!Gl(U,Ct):Mt=U!==Ct,Mt?U!=null?ae(R):f.add(R):U!==void 0&&f.has(R)?ae(R):x.protectedKeys[R]=!0}x.prevProp=T,x.prevResolvedValues=Z,x.isActive&&(d={...d,...Z}),n&&t.blockInitialAnimation&&(b=!1),b&&(!(P&&$)||D)&&h.push(...E.map(R=>({animation:R,options:{type:m}})))}if(f.size){const y={};if(typeof u.initial!="boolean"){const m=Me(t,Array.isArray(u.initial)?u.initial[0]:u.initial);m&&m.transition&&(y.transition=m.transition)}f.forEach(m=>{const x=t.getBaseTarget(m),T=t.getValue(m);T&&(T.liveStyle=!0),y[m]=x??null}),h.push({animation:y})}let g=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(h):Promise.resolve()}function a(l,u){var h;if(s[l].isActive===u)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),s[l].isActive=u;const c=r(l);for(const f in s)s[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>s,reset:()=>{s=$r(),n=!0}}}function rp(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gl(e,t):!1}function $t(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $r(){return{animate:$t(!0),whileInView:$t(),whileHover:$t(),whileTap:$t(),whileDrag:$t(),whileFocus:$t(),exit:$t()}}let At=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},op=class extends At{constructor(e){super(e),e.animationState||(e.animationState=ip(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();bs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:s}=this.node.prevProps||{};e!==s&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},ap=0,lp=class extends At{constructor(){super(...arguments),this.id=ap++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);s&&!e&&i.then(()=>{s(this.id)})}mount(){const{register:e,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),e&&(this.unmount=e(this.id))}unmount(){}};const cp={animation:{Feature:op},exit:{Feature:lp}};function De(t,e,s,n={passive:!0}){return t.addEventListener(e,s,n),()=>t.removeEventListener(e,s)}function Ke(t){return{point:{x:t.pageX,y:t.pageY}}}const up=t=>e=>Jn(e)&&t(e,Ke(e));function me(t,e,s,n){return De(t,e,up(s),n)}function Yl({top:t,left:e,right:s,bottom:n}){return{x:{min:e,max:s},y:{min:t,max:n}}}function hp({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function fp(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}const ql=1e-4,dp=1-ql,pp=1+ql,Zl=.01,mp=0-Zl,gp=0+Zl;function Y(t){return t.max-t.min}function yp(t,e,s){return Math.abs(t-e)<=s}function Dr(t,e,s,n=.5){t.origin=n,t.originPoint=j(e.min,e.max,t.origin),t.scale=Y(s)/Y(e),t.translate=j(s.min,s.max,t.origin)-t.originPoint,(t.scale>=dp&&t.scale<=pp||isNaN(t.scale))&&(t.scale=1),(t.translate>=mp&&t.translate<=gp||isNaN(t.translate))&&(t.translate=0)}function ge(t,e,s,n){Dr(t.x,e.x,s.x,n?n.originX:void 0),Dr(t.y,e.y,s.y,n?n.originY:void 0)}function Rr(t,e,s){t.min=s.min+e.min,t.max=t.min+Y(e)}function vp(t,e,s){Rr(t.x,e.x,s.x),Rr(t.y,e.y,s.y)}function Er(t,e,s){t.min=e.min-s.min,t.max=t.min+Y(e)}function ye(t,e,s){Er(t.x,e.x,s.x),Er(t.y,e.y,s.y)}const Lr=()=>({translate:0,scale:1,origin:0,originPoint:0}),zt=()=>({x:Lr(),y:Lr()}),kr=()=>({min:0,max:0}),I=()=>({x:kr(),y:kr()});function et(t){return[t("x"),t("y")]}function Fs(t){return t===void 0||t===1}function gn({scale:t,scaleX:e,scaleY:s}){return!Fs(t)||!Fs(e)||!Fs(s)}function Et(t){return gn(t)||Jl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Jl(t){return jr(t.x)||jr(t.y)}function jr(t){return t&&t!=="0%"}function ds(t,e,s){const n=t-s,i=e*n;return s+i}function Fr(t,e,s,n,i){return i!==void 0&&(t=ds(t,i,n)),ds(t,s,n)+e}function yn(t,e=0,s=1,n,i){t.min=Fr(t.min,e,s,n,i),t.max=Fr(t.max,e,s,n,i)}function Ql(t,{x:e,y:s}){yn(t.x,e.translate,e.scale,e.originPoint),yn(t.y,s.translate,s.scale,s.originPoint)}const Br=.999999999999,Or=1.0000000000001;function xp(t,e,s,n=!1){const i=s.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=s[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ht(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ql(t,r)),n&&Et(o.latestValues)&&Ht(t,o.latestValues))}e.x<Or&&e.x>Br&&(e.x=1),e.y<Or&&e.y>Br&&(e.y=1)}function _t(t,e){t.min=t.min+e,t.max=t.max+e}function Ir(t,e,s,n,i=.5){const o=j(t.min,t.max,i);yn(t,e,s,o,n)}function Ht(t,e){Ir(t.x,e.x,e.scaleX,e.scale,e.originX),Ir(t.y,e.y,e.scaleY,e.scale,e.originY)}function tc(t,e){return Yl(fp(t.getBoundingClientRect(),e))}function Tp(t,e,s){const n=tc(t,s),{scroll:i}=e;return i&&(_t(n.x,i.offset.x),_t(n.y,i.offset.y)),n}const ec=({current:t})=>t?t.ownerDocument.defaultView:null,Nr=(t,e)=>Math.abs(t-e);function Sp(t,e){const s=Nr(t.x,e.x),n=Nr(t.y,e.y);return Math.sqrt(s**2+n**2)}let sc=class{constructor(e,s,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Os(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Sp(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:g}=W;this.history.push({...p,timestamp:g});const{onStart:y,onMove:m}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Bs(f,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Os(h.type==="pointercancel"?this.lastMoveEventInfo:Bs(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Jn(e))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.contextWindow=i||window;const r=Ke(e),a=Bs(r,this.transformPagePoint),{point:l}=a,{timestamp:u}=W;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=s;c&&c(e,Os(a,this.history)),this.removeListeners=We(me(this.contextWindow,"pointermove",this.handlePointerMove),me(this.contextWindow,"pointerup",this.handlePointerUp),me(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),St(this.updatePoint)}};function Bs(t,e){return e?{point:e(t.point)}:t}function Ur(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Os({point:t},e){return{point:t,delta:Ur(t,nc(e)),offset:Ur(t,wp(e)),velocity:bp(e,.1)}}function wp(t){return t[0]}function nc(t){return t[t.length-1]}function bp(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,n=null;const i=nc(t);for(;s>=0&&(n=t[s],!(i.timestamp-n.timestamp>lt(e)));)s--;if(!n)return{x:0,y:0};const o=ct(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Pp(t,{min:e,max:s},n){return e!==void 0&&t<e?t=n?j(e,t,n.min):Math.max(t,e):s!==void 0&&t>s&&(t=n?j(s,t,n.max):Math.min(t,s)),t}function Wr(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function Ap(t,{top:e,left:s,bottom:n,right:i}){return{x:Wr(t.x,s,i),y:Wr(t.y,e,n)}}function Kr(t,e){let s=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,n]=[n,s]),{min:s,max:n}}function Vp(t,e){return{x:Kr(t.x,e.x),y:Kr(t.y,e.y)}}function Cp(t,e){let s=.5;const n=Y(t),i=Y(e);return i>n?s=we(e.min,e.max-n,t.min):n>i&&(s=we(t.min,t.max-i,e.min)),gt(0,1,s)}function Mp(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}const vn=.35;function $p(t=vn){return t===!1?t=0:t===!0&&(t=vn),{x:zr(t,"left","right"),y:zr(t,"top","bottom")}}function zr(t,e,s){return{min:_r(t,e),max:_r(t,s)}}function _r(t,e){return typeof t=="number"?t:t[e]||0}const Dp=new WeakMap;let Rp=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=I(),this.visualElement=e}start(e,{snapToCursor:s=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(Ke(c).point)},o=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ah(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(y=>{let m=this.getAxisMotionValue(y).get()||0;if(ht.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(m=Y(T)*(parseFloat(m)/100))}}this.originPoint[y]=m}),p&&L.postRender(()=>p(c,h)),rn(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},r=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ep(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),g&&g(c,h)},a=(c,h)=>this.stop(c,h),l=()=>et(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sc(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ec(this.visualElement)})}stop(e,s){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&L.postRender(()=>o(e,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:s}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(e,s,n){const{drag:i}=this.getProps();if(!n||!Ze(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(r=Pp(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Wt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=Ap(n.layoutBox,e):this.constraints=!1,this.elastic=$p(s),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&et(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Mp(n.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:s}=this.getProps();if(!e||!Wt(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Tp(n,i.root,this.visualElement.getTransformPagePoint());let r=Vp(i.layout.layoutBox,o);if(s){const a=s(hp(r));this.hasMutatedConstraints=!!a,a&&(r=Yl(a))}return r}startAnimation(e){const{drag:s,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=et(c=>{if(!Ze(c,s,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:n?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,s){const n=this.getAxisMotionValue(e);return rn(this.visualElement,e),n.start(xi(e,n,0,s,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){et(e=>{var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.pause()})}getAnimationState(e){var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.state}getAxisMotionValue(e){const s=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),i=n[s];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){et(s=>{const{drag:n}=this.getProps();if(!Ze(s,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(s);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[s];o.set(e[s]-j(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!Wt(s)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};et(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Cp({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),et(r=>{if(!Ze(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(j(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Dp.set(this.visualElement,this);const e=this.visualElement.current,s=me(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();Wt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),L.read(n);const r=De(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(et(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),s(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=vn,dragMomentum:a=!0}=e;return{...e,drag:s,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}};function Ze(t,e,s){return(e===!0||e===t)&&(s===null||s===t)}function Ep(t,e=10){let s=null;return Math.abs(t.y)>e?s="y":Math.abs(t.x)>e&&(s="x"),s}let Lp=class extends At{constructor(e){super(e),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new Rp(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}};const Hr=t=>(e,s)=>{t&&L.postRender(()=>t(e,s))};let kp=class extends At{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(e){this.session=new sc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ec(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:s,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hr(e),onStart:Hr(s),onMove:n,onEnd:(o,r)=>{delete this.session,i&&L.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=me(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const le={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(C.test(t))t=parseFloat(t);else return t;const s=Gr(t,e.target.x),n=Gr(t,e.target.y);return`${s}% ${n}%`}},jp={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=wt.parse(t);if(i.length>5)return n;const o=wt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=s.x.scale*e.x,l=s.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=j(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Fp=class extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=e;Jh(Bp),o&&(s.group&&s.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ns.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:s,visualElement:n,drag:i,isPresent:o}=this.props,r=n.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==s||s===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||L.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Zn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ic(t){const[e,s]=Wa(),n=v.useContext(In);return w.jsx(Fp,{...t,layoutGroup:n,switchLayoutGroup:v.useContext(sl),isPresent:e,safeToRemove:s})}const Bp={borderRadius:{...le,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomLeftRadius:le,borderBottomRightRadius:le,boxShadow:jp};function Op(t,e,s){const n=G(t)?t:Pe(t);return n.start(xi("",n,e,s)),n.animation}function Ip(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Np=(t,e)=>t.depth-e.depth;let Up=class{constructor(){this.children=[],this.isDirty=!1}add(e){Kn(this.children,e),this.isDirty=!0}remove(e){zn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Np),this.isDirty=!1,this.children.forEac
vendor: 5,166 bytes, line 9
9h(e)}};function Wp(t,e){const s=ut.now(),n=({timestamp:i})=>{const o=i-s;o>=e&&(St(n),t(o-e))};return L.read(n,!0),()=>St(n)}const rc=["TopLeft","TopRight","BottomLeft","BottomRight"],Kp=rc.length,Xr=t=>typeof t=="string"?parseFloat(t):t,Yr=t=>typeof t=="number"||C.test(t);function zp(t,e,s,n,i,o){i?(t.opacity=j(0,s.opacity!==void 0?s.opacity:1,_p(n)),t.opacityExit=j(e.opacity!==void 0?e.opacity:1,0,Hp(n))):o&&(t.opacity=j(e.opacity!==void 0?e.opacity:1,s.opacity!==void 0?s.opacity:1,n));for(let r=0;r<Kp;r++){const a=`border${rc[r]}Radius`;let l=qr(e,a),u=qr(s,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Yr(l)===Yr(u)?(t[a]=Math.max(j(Xr(l),Xr(u),n),0),(ht.test(u)||ht.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||s.rotate)&&(t.rotate=j(e.rotate||0,s.rotate||0,n))}function qr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const _p=oc(0,.5,bl),Hp=oc(.5,.95,nt);function oc(t,e,s){return n=>n<t?0:n>e?1:s(we(t,e,n))}function Zr(t,e){t.min=e.min,t.max=e.max}function J(t,e){Zr(t.x,e.x),Zr(t.y,e.y)}function Jr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Qr(t,e,s,n,i){return t-=e,t=ds(t,1/s,n),i!==void 0&&(t=ds(t,1/i,n)),t}function Gp(t,e=0,s=1,n=.5,i,o=t,r=t){if(ht.test(e)&&(e=parseFloat(e),e=j(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=j(o.min,o.max,n);t===o&&(a-=e),t.min=Qr(t.min,e,s,a,i),t.max=Qr(t.max,e,s,a,i)}function to(t,e,[s,n,i],o,r){Gp(t,e[s],e[n],e[i],e.scale,o,r)}const Xp=["x","scaleX","originX"],Yp=["y","scaleY","originY"];function eo(t,e,s,n){to(t.x,e,Xp,s?s.x:void 0,n?n.x:void 0),to(t.y,e,Yp,s?s.y:void 0,n?n.y:void 0)}function so(t){return t.translate===0&&t.scale===1}function ac(t){return so(t.x)&&so(t.y)}function no(t,e){return t.min===e.min&&t.max===e.max}function qp(t,e){return no(t.x,e.x)&&no(t.y,e.y)}function io(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function lc(t,e){return io(t.x,e.x)&&io(t.y,e.y)}function ro(t){return Y(t.x)/Y(t.y)}function oo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}let Zp=class{constructor(){this.members=[]}add(e){Kn(this.members,e),e.scheduleRender()}remove(e){if(zn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(i=>e===i);if(s===0)return!1;let n;for(let i=s;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(e,s){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,s&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:n}=e;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Jp(t,e,s){let n="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(s==null?void 0:s.z)||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=s;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),d&&(n+=`skewX(${d}deg) `),p&&(n+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const Is=["","X","Y","Z"],Qp={visibility:"hidden"},ao=1e3;let tm=0;function Ns(t,e,s,n){const{latestValues:i}=e;i[t]&&(s[t]=i[t],e.setStaticValue(t,0),n&&(n[t]=0))}function cc(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=gl(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",L,!(i||o))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&cc(n)}function uc({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=tm++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 32,236 bytes, line 9
9{this.projectionUpdateScheduled=!1,this.nodes.forEach(nm),this.nodes.forEach(lm),this.nodes.forEach(cm),this.nodes.forEach(im)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Up)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Hn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ip(r),this.instance=r;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Wp(f,250),ns.hasAnimatedSinceResize&&(ns.hasAnimatedSinceResize=!1,this.nodes.forEach(co))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||pm,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),x=!this.targetLayout||!lc(this.targetLayout,p),T=!f&&d;if(this.options.layoutRoot||this.resumeFrom||T||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,T);const V={...Yn(g,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else f||co(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,St(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(um),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lo);return}this.isUpdating||this.nodes.forEach(om),this.isUpdating=!1,this.nodes.forEach(am),this.nodes.forEach(em),this.nodes.forEach(sm),this.clearAllSnapshots();const a=ut.now();W.delta=gt(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Rs.update.process(W),Rs.preRender.process(W),Rs.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rm),this.sharedNodes.forEach(hm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Y(this.snapshot.measuredBox.x)&&!Y(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=I(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ac(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&(a||Et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),mm(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return I();const a=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(gm))){const{scroll:c}=this.root;c&&(_t(a.x,c.offset.x),_t(a.y,c.offset.y))}return a}removeElementScroll(r){var l;const a=I();if(J(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&J(a,r),_t(a.x,h.offset.x),_t(a.y,h.offset.y))}return a}applyTransform(r,a=!1){const l=I();J(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Et(c.latestValues)&&Ht(l,c.latestValues)}return Et(this.latestValues)&&Ht(l,this.latestValues),l}removeTransform(r){const a=I();J(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Et(u.latestValues))continue;gn(u.latestValues)&&u.updateSnapshot();const c=I(),h=u.measurePageBox();J(c,h),eo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Et(this.latestValues)&&eo(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=W.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),ye(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),J(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vp(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):J(this.target,this.layout.layoutBox),Ql(this.target,this.targetDelta)):J(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),ye(this.relativeTargetOrigin,this.target,d.target),J(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||gn(this.parent.latestValues)||Jl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var p;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;J(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;xp(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=I());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jr(this.prevProjectionDelta.x,this.projectionDelta.x),Jr(this.prevProjectionDelta.y,this.projectionDelta.y)),ge(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!oo(this.projectionDelta.x,this.prevProjectionDelta.x)||!oo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zt(),this.projectionDelta=zt(),this.projectionDeltaWithTransform=zt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=I(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,y=this.getStack(),m=!y||y.members.length<=1,x=!!(g&&!m&&this.options.crossfade===!0&&!this.path.some(dm));this.animationProgress=0;let T;this.mixTargetDelta=V=>{const S=V/1e3;uo(h.x,r.x,S),uo(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ye(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fm(this.relativeTarget,this.relativeTargetOrigin,f,S),T&&qp(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=I()),J(T,this.relativeTarget)),g&&(this.animationValues=c,zp(c,u,this.latestValues,S,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(St(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{ns.hasAnimatedSinceResize=!0,this.currentAnimation=Op(0,ao,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ao),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&hc(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||I();const h=Y(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=Y(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}J(a,l),Ht(a,c),ge(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Zp),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ns("z",r,u,this.animationValues);for(let c=0;c<Is.length;c++)Ns(`rotate${Is[c]}`,r,u,this.animationValues),Ns(`skew${Is[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Qp;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=ss(r==null?void 0:r.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=ss(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!Et(this.latestValues)&&(d.transform=l?l({},""):"none",this.hasProjected=!1),d}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=Jp(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:h,y:f}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Ve){if(c[d]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:y}=Ve[d],m=a.transform==="none"?c[d]:p(c[d],u);if(g){const x=g.length;for(let T=0;T<x;T++)a[g[T]]=m}else y?this.options.visualElement.renderState.vars[d]=m:a[d]=m}return this.options.layoutId&&(a.pointerEvents=u===this?ss(r==null?void 0:r.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(lo),this.root.sharedNodes.clear()}}}function em(t){t.updateLayout()}function sm(t){var s;const e=((s=t.resumeFrom)==null?void 0:s.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?et(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=Y(f);f.min=n[h].min,f.max=f.min+d}):hc(o,e.layoutBox,n)&&et(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=Y(n[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=zt();ge(a,n,e.layoutBox);const l=zt();r?ge(l,t.applyTransform(i,!0),e.measuredBox):ge(l,n,e.layoutBox);const u=!ac(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=I();ye(p,e.layoutBox,f.layoutBox);const g=I();ye(g,n,d.layoutBox),lc(p,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function nm(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function im(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function rm(t){t.clearSnapshot()}function lo(t){t.clearMeasurements()}function om(t){t.isLayoutDirty=!1}function am(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function co(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function lm(t){t.resolveTargetDelta()}function cm(t){t.calcProjection()}function um(t){t.resetSkewAndRotation()}function hm(t){t.removeLeadSnapshot()}function uo(t,e,s){t.translate=j(e.translate,0,s),t.scale=j(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function ho(t,e,s,n){t.min=j(e.min,s.min,n),t.max=j(e.max,s.max,n)}function fm(t,e,s,n){ho(t.x,e.x,s.x,n),ho(t.y,e.y,s.y,n)}function dm(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const pm={duration:.45,ease:[.4,0,.1,1]},fo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),po=fo("applewebkit/")&&!fo("chrome/")?Math.round:nt;function mo(t){t.min=po(t.min),t.max=po(t.max)}function mm(t){mo(t.x),mo(t.y)}function hc(t,e,s){return t==="position"||t==="preserve-aspect"&&!yp(ro(e),ro(s),.2)}function gm(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const ym=uc({attachResizeListener:(t,e)=>De(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Us={current:void 0},fc=uc({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Us.current){const t=new ym({});t.mount(window),t.setOptions({layoutScroll:!0}),Us.current=t}return Us.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),vm={pan:{Feature:kp},drag:{Feature:Lp,ProjectionNode:fc,MeasureLayout:ic}};function go(t,e,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover",s==="Start");const i="onHover"+s,o=n[i];o&&L.postRender(()=>o(e,Ke(e)))}let xm=class extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Ch(e,(s,n)=>(go(this.node,n,"Start"),i=>go(this.node,i,"End"))))}unmount(){}},Tm=class extends At{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=We(De(this.node.current,"focus",()=>this.onFocus()),De(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function yo(t,e,s){const{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap",s==="Start");const i="onTap"+(s==="End"?"":s),o=n[i];o&&L.postRender(()=>o(e,Ke(e)))}let Sm=class extends At{mount(){const{current:e}=this.node;e&&(this.unmount=Rh(e,(s,n)=>(yo(this.node,n,"Start"),(i,{success:o})=>yo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const xn=new WeakMap,Ws=new WeakMap,wm=t=>{const e=xn.get(t.target);e&&e(t)},bm=t=>{t.forEach(wm)};function Pm({root:t,...e}){const s=t||document;Ws.has(s)||Ws.set(s,{});const n=Ws.get(s),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(bm,{root:t,...e})),n[i]}function Am(t,e,s){const n=Pm(e);return xn.set(t,s),n.observe(t),()=>{xn.delete(t),n.unobserve(t)}}const Vm={some:0,all:1};let Cm=class extends At{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:s,margin:n,amount:i="some",once:o}=e,r={root:s?s.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:Vm[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Am(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:s}=this.node;["amount","margin","root"].some(Mm(e,s))&&this.startObserver()}unmount(){}};function Mm({viewport:t={}},{viewport:e={}}={}){return s=>t[s]!==e[s]}const $m={inView:{Feature:Cm},tap:{Feature:Sm},focus:{Feature:Tm},hover:{Feature:xm}},Dm={layout:{ProjectionNode:fc,MeasureLayout:ic}},Tn={current:null},dc={current:!1};function Rm(){if(dc.current=!0,!!Un)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Tn.current=t.matches;t.addListener(e),e()}else Tn.current=!1}const Em=[...Ol,z,wt],Lm=t=>Em.find(Bl(t)),km=new WeakMap;function jm(t,e,s){for(const n in e){const i=e[n],o=s[n];if(G(i))t.addValue(n,i);else if(G(o))t.addValue(n,Pe(i,{owner:t}));else if(o!==i)if(t.hasValue(n)){const r=t.getValue(n);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(n);t.addValue(n,Pe(r!==void 0?r:i,{owner:t}))}}for(const n in s)e[n]===void 0&&t.removeValue(n);return e}const vo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Fm=class{scrapeMotionValuesFromProps(e,s,n){return{}}constructor({parent:e,props:s,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=ut.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=r;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=s.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=s,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Ps(s),this.isVariantNode=tl(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&G(p)&&p.set(l[d],!1)}}mount(e){this.current=e,km.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),dc.current||Rm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Tn.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),St(this.notifyUpdate),St(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}bindToMotionValue(e,s){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Nt.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=s.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&L.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=s.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),s.owner&&s.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Jt){const s=Jt[e];if(!s)continue;const{isEnabled:n,Feature:i}=s;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):I()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<vo.length;n++){const i=vo[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=jm(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.variantChildren.delete(e)}addValue(e,s){const n=this.values.get(e);s!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&s!==void 0&&(n=Pe(s===null?void 0:s,{owner:this}),this.addValue(e,n)),n}readValue(e,s){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(jl(n)||Al(n))?n=parseFloat(n):!Lm(n)&&wt.test(s)&&(n=El(e,s)),this.setBaseTarget(e,G(n)?n.get():n)),G(n)?n.get():n}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){var o;const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const r=ui(this.props,s,(o=this.presenceContext)==null?void 0:o.custom);r&&(n=r[e])}if(s&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!G(i)?i:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Hn),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}},pc=class extends Fm{constructor(){super(...arguments),this.KeyframeResolver=Il}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){return e.style?e.style[s]:void 0}removeValueFromRenderState(e,{vars:s,style:n}){delete s[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;G(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}};function Bm(t){return window.getComputedStyle(t)}let Om=class extends pc{constructor(){super(...arguments),this.type="html",this.renderInstance=hl}readValueFromInstance(e,s){if(Nt.has(s))return qf(e,s);{const n=Bm(e),i=(si(s)?n.getPropertyValue(s):n[s])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:s}){return tc(e,s)}build(e,s,n){ri(e,s,n.transformTemplate)}scrapeMotionValuesFromProps(e,s,n){return hi(e,s,n)}},Im=class extends pc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=I,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ul(this.current,this.renderState)}}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(Nt.has(s)){const n=Rl(s);return n&&n.default||0}return s=fl.has(s)?s:ei(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,n){return pl(e,s,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&L.postRender(this.updateDimensions)}
9build(e,s,n){li(e,s,this.isSVGTag,n.transformTemplate)}renderInstance(e,s,n,i){dl(e,s,n,i)}mount(e){this.isSVGTag=ci(e.tagName),super.mount(e)}};const Nm=(t,e)=>ai(t)?new Im(e):new Om(e,{allowProjection:t!==v.Fragment}),Um=bf({...cp,...$m,...vm,...Dm},Nm),Q=Oh(Um),Wm={hidden:{opacity:0},visible:{opacity:1,transition:{when:"beforeChildren",staggerChildren:.12}},exit:{opacity:0,transition:{when:"afterChildren"}}},at={hidden:{opacity:0,y:-10},visible:{opacity:1,y:0,transition:{duration:.6}}},n1=({isTransparent:t,className:e,hideCta:s=!1})=>{const[n,i]=v.useState(!1),o=lh(),r=()=>{i(!n)};return v.useEffect(()=>{n?(document.body.classList.add("is-menu-open"),document.documentElement.classList.add("is-menu-open"),o==null||o.stop()):(document.body.classList.remove("is-menu-open"),document.documentElement.classList.remove("is-menu-open"),o==null||o.start())},[n]),w.jsx(w.Fragment,{children:w.jsx("header",{className:Rt("w-full h-16 flex items-center lg:hidden rounded-xl",{"absolute top-0 left-0":n}),children:w.jsxs(Fa,{children:[w.jsxs("div",{className:Rt("flex items-center justify-between w-full px-4 rounded-md overflow-hidden mt-4 z-[100] relative transition-all","bg-white/80 backdrop-blur-2xl",n?"!bg-transparent !backdrop-blur-none !px-0":"",e),children:[w.jsx(H,{viewTransition:!0,to:"/",children:w.jsx("img",{src:"/img/logo-alt.svg",alt:"MonarchMD",className:"w-[120px]"})}),w.jsx("div",{children:w.jsx("button",{"aria-controls":"menu","aria-expanded":n,onClick:r,className:"w-12 h-12 flex items-center justify-end relative group",children:w.jsxs("div",{className:Rt("w-6 h-4 relative transition-all"),children:[w.jsx("div",{className:Rt("w-full h-0.5 absolute top-0 bg-brand-umber transition-all",n?"rotate-45 top-1/2 -translate-y-1/2":"rotate-0")}),w.jsx("div",{className:Rt("w-full h-0.5 absolute top-1/2 -translate-y-1/2 bg-brand-umber transition-all",n?"opacity-0":"opacity-100")}),w.jsx("div",{className:Rt("w-full h-0.5 absolute bottom-0 bg-brand-umber transition-all",n?"-rotate-45 bottom-1/2 translate-y-[1px]":"rotate-0")})]})})})]}),w.jsx(dh,{children:n&&w.jsx(Q.div,{id:"menu",className:"fixed bg-brand-cream/50 backdrop-blur-2xl top-0 left-0 w-full overflow-auto h-available-screen z-50",variants:Wm,initial:"hidden",animate:"visible",exit:"exit",children:w.jsxs(Q.div,{className:"grid items-center gap-16 text-left px-8 md:px-16 pt-24 pb-8",children:[w.jsxs("div",{className:"grid gap-4",children:[w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/",className:"font-light text-3xl font-serif",children:"Home"})}),w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/how-it-works",className:"font-light text-3xl font-serif",children:"How it works"})}),w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/our-mission",className:"font-light text-3xl font-serif",children:"Our mission"})}),w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/insights",className:"font-light text-3xl font-serif",children:"Insights"})}),w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/careers",className:"font-light text-3xl font-serif",children:"Careers"})}),!s&&w.jsx(Q.div,{variants:at,children:w.jsx(H,{viewTransition:!0,to:"/contact",className:"font-light text-3xl font-serif",children:"Contact"})})]}),w.jsx(Q.div,{variants:at,children:!s&&w.jsx(Ba,{label:"Schedule a call with us",className:"w-full",size:"lg",variant:"outline"})}),w.jsxs(Q.div,{variants:at,className:"max-w-[45ch]",children:[w.jsxs(Q.h2,{variants:at,className:"text-brand-sienna text-base mb-4",children:[w.jsx("span",{className:"uppercase",children:"call"}),","," ",w.jsx("span",{className:"uppercase",children:"text"}),","," ",w.jsx("span",{className:"italic",children:"or"})," ",w.jsx("span",{className:"uppercase",children:"visit us"})]}),w.jsxs(Q.div,{variants:at,className:"font-medium text-2xl font-serif space-y-4",children:[w.jsx("p",{children:w.jsx("a",{href:"tel:+1 (212) 235-0323",className:"break-all underline underline-offset-4",children:"(212) 235-0323"})}),w.jsx("p",{className:"max-w-[24ch]",children:"1 Rockefeller Plaza, New York, NY 10020"})]})]})]})})})]})})})},mc=v.createContext({});function Km(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ti=typeof window<"u",zm=Ti?v.useLayoutEffect:v.useEffect,Si=v.createContext(null),gc=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function _m(t=!0){const e=v.useContext(Si);if(e===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:i}=e,o=v.useId();v.useEffect(()=>{if(t)return i(o)},[t]);const r=v.useCallback(()=>t&&n&&n(o),[o,n,t]);return!s&&n?[!1,r]:[!0]}let yc=()=>{};const it=t=>t,Hm={useManualTiming:!1},Je=["read","resolveKeyframes","update","preRender","render","postRender"],xo={value:null};function Gm(t,e){let s=new Set,n=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(h){r.has(h)&&(c.schedule(h),t()),l++,h(a)}const c={schedule:(h,f=!1,d=!1)=>{const g=d&&i?s:n;return f&&r.add(h),g.has(h)||g.add(h),h},cancel:h=>{n.delete(h),r.delete(h)},process:h=>{if(a=h,i){o=!0;return}
vendor: 72,248 bytes, line 9
9i=!0,[s,n]=[n,s],s.forEach(u),e&&xo.value&&xo.value.frameloop[e].push(l),l=0,s.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const Xm=40;function vc(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>s=!0,r=Je.reduce((m,x)=>(m[x]=Gm(o,e?x:void 0),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=r,d=()=>{const m=performance.now();s=!1,i.delta=n?1e3/60:Math.max(Math.min(m-i.timestamp,Xm),1),i.timestamp=m,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(d))},p=()=>{s=!0,n=!0,i.isProcessing||t(d)};return{schedule:Je.reduce((m,x)=>{const T=r[x];return m[x]=(V,S=!1,P=!1)=>(s||p(),T.schedule(V,S,P)),m},{}),cancel:m=>{for(let x=0;x<Je.length;x++)r[Je[x]].cancel(m)},state:i,steps:r}}const{schedule:k,cancel:bt,state:K,steps:Ks}=vc(typeof requestAnimationFrame<"u"?requestAnimationFrame:it,!0),xc=v.createContext({strict:!1}),To={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},te={};for(const t in To)te[t]={isEnabled:e=>To[t].some(s=>!!e[s])};function Ym(t){for(const e in t)te[e]={...te[e],...t[e]}}const qm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ps(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||qm.has(t)}let Tc=t=>!ps(t);function Zm(t){t&&(Tc=e=>e.startsWith("on")?!ps(e):t(e))}try{Zm(require("@emotion/is-prop-valid").default)}catch{}function Jm(t,e,s){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(Tc(i)||s===!0&&ps(i)||!e&&!ps(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Qm(t){if(typeof Proxy>"u")return t;const e=new Map,s=(...n)=>t(...n);return new Proxy(s,{get:(n,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const Vs=v.createContext({});function Cs(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Re(t){return typeof t=="string"||Array.isArray(t)}const wi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bi=["initial",...wi];function Ms(t){return Cs(t.animate)||bi.some(e=>Re(t[e]))}function Sc(t){return!!(Ms(t)||t.variants)}function tg(t,e){if(Ms(t)){const{initial:s,animate:n}=t;return{initial:s===!1||Re(s)?s:void 0,animate:Re(n)?n:void 0}}return t.inherit!==!1?e:{}}function eg(t){const{initial:e,animate:s}=tg(t,v.useContext(Vs));return v.useMemo(()=>({initial:e,animate:s}),[So(e),So(s)])}function So(t){return Array.isArray(t)?t.join(" "):t}const sg=Symbol.for("motionComponentSymbol");function Gt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ng(t,e,s){return v.useCallback(n=>{n&&t.onMount&&t.onMount(n),e&&(n?e.mount(n):e.unmount()),s&&(typeof s=="function"?s(n):Gt(s)&&(s.current=n))},[e])}const{schedule:Pi}=vc(queueMicrotask,!1),Ai=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ig="framerAppearId",wc="data-"+Ai(ig),bc=v.createContext({});function rg(t,e,s,n,i){var g,y;const{visualElement:o}=v.useContext(Vs),r=v.useContext(xc),a=v.useContext(Si),l=v.useContext(gc).reducedMotion,u=v.useRef(null);n=n||r.renderer,!u.current&&n&&(u.current=n(t,{visualState:e,parent:o,props:s,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=v.useContext(bc);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&og(u.current,s,i,h);const f=v.useRef(!1);v.useInsertionEffect(()=>{c&&f.current&&c.update(s,a)});const d=s[wc],p=v.useRef(!!d&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,d))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,d)));return zm(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),Pi.render(c.render),p.current&&c.animationState&&c.animationState.animateChanges())}),v.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)==null||m.call(window,d)}),p.current=!1))}),c}function og(t,e,s,n){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new s(t.latestValues,e["data-framer-portal-id"]?void 0:Pc(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Gt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:u})}function Pc(t){if(t)return t.options.allowProjection!==!1?t.projection:Pc(t.parent)}function ag({preloadedFeatures:t,createVisualElement:e,useRender:s,useVisualState:n,Component:i}){t&&Ym(t);function o(a,l){let u;const c={...v.useContext(gc),...a,layoutId:lg(a)},{isStatic:h}=c,f=eg(a),d=n(a,h);if(!h&&Ti){cg();const p=ug(c);u=p.MeasureLayout,f.visualElement=rg(i,d,c,e,p.ProjectionNode)}return w.jsxs(Vs.Provider,{value:f,children:[u&&f.visualElement?w.jsx(u,{visualElement:f.visualElement,...c}):null,s(i,a,ng(d,f.visualElement,l),d,h,f.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const r=v.forwardRef(o);return r[sg]=i,r}function lg({layoutId:t}){const e=v.useContext(mc).id;return e&&t!==void 0?e+"-"+t:t}function cg(t,e){v.useContext(xc).strict}function ug(t){const{drag:e,layout:s}=te;if(!e&&!s)return{};const n={...e,...s};return{MeasureLayout:e!=null&&e.isEnabled(t)||s!=null&&s.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}const Ac=t=>e=>typeof e=="string"&&e.startsWith(t),Vi=Ac("--"),hg=Ac("var(--"),Ci=t=>hg(t)?fg.test(t.split("/*")[0].trim()):!1,fg=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ee={};function dg(t){for(const e in t)Ee[e]=t[e],Vi(e)&&(Ee[e].isCSSVariable=!0)}const ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ut=new Set(ie);function Vc(t,{layout:e,layoutId:s}){return Ut.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!Ee[t]||t==="opacity")}const X=t=>!!(t&&t.getVelocity),Cc=(t,e)=>e&&typeof t=="number"?e.transform(t):t,yt=(t,e,s)=>s>e?e:s<t?t:s,re={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Le={...re,transform:t=>yt(0,1,t)},Qe={...re,default:1},ze=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Tt=ze("deg"),ft=ze("%"),M=ze("px"),pg=ze("vh"),mg=ze("vw"),wo={...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(t*100)},gg={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M},yg={rotate:Tt,rotateX:Tt,rotateY:Tt,rotateZ:Tt,scale:Qe,scaleX:Qe,scaleY:Qe,scaleZ:Qe,skew:Tt,skewX:Tt,skewY:Tt,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Le,originX:wo,originY:wo,originZ:M},bo={...re,transform:Math.round},Mi={...gg,...yg,zIndex:bo,size:M,fillOpacity:Le,strokeOpacity:Le,numOctaves:bo},vg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xg=ie.length;function Tg(t,e,s){let n="",i=!0;for(let o=0;o<xg;o++){const r=ie[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||s){const u=Cc(a,Mi[r]);if(!l){i=!1;const c=vg[r]||r;n+=`${c}(${u}) `}s&&(e[r]=u)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}function $i(t,e,s){const{style:n,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Ut.has(l)){r=!0;continue}else if(Vi(l)){i[l]=u;continue}else{const c=Cc(u,Mi[l]);l.startsWith("origin")?(a=!0,o[l]=c):n[l]=c}}if(e.transform||(r||s?n.transform=Tg(e,t.transform,s):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;n.transformOrigin=`${l} ${u} ${c}`}}const Di=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mc(t,e,s){for(const n in e)!X(e[n])&&!Vc(n,s)&&(t[n]=e[n])}function Sg({transformTemplate:t},e){return v.useMemo(()=>{const s=Di();return $i(s,e,t),Object.assign({},s.vars,s.style)},[e])}function wg(t,e){const s=t.style||{},n={};return Mc(n,s,t),Object.assign(n,Sg(t,e)),n}function bg(t,e){const s={},n=wg(t,e);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,s}const Pg=["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 Ri(t){return typeof t!="string"||t.includes("-")?!1:!!(Pg.indexOf(t)>-1||/[A-Z]/u.test(t))}const Ag={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vg={offset:"strokeDashoffset",array:"strokeDasharray"};function Cg(t,e,s=1,n=0,i=!0){t.pathLength=1;const o=i?Ag:Vg;t[o.offset]=M.transform(-n);const r=M.transform(e),a=M.transform(s);t[o.array]=`${r} ${a}`}function Po(t,e,s){return typeof t=="string"?t:M.transform(e+s*t)}function Mg(t,e,s){const n=Po(e,t.x,t.width),i=Po(s,t.y,t.height);return`${n} ${i}`}function Ei(t,{attrX:e,attrY:s,attrScale:n,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if($i(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=Mg(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),s!==void 0&&(f.y=s),n!==void 0&&(f.scale=n),r!==void 0&&Cg(f,r,a,l,!1)}const $c=()=>({...Di(),attrs:{}}),Li=t=>typeof t=="string"&&t.toLowerCase()==="svg";function $g(t,e,s,n){const i=v.useMemo(()=>{const o=$c();return Ei(o,e,Li(n),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Mc(o,t.style,t),i.style={...o,...i.style}}return i}function Dg(t=!1){return(s,n,i,{latestValues:o},r)=>{const l=(Ri(s)?$g:bg)(n,o,r,s),u=Jm(n,typeof s=="string",t),c=s!==v.Fragment?{...u,...l,ref:i}:{},{children:h}=n,f=v.useMemo(()=>X(h)?h.get():h,[h]);return v.createElement(s,{...c,children:f})}}function Ao(t){const e=[{},{}];return t==null||t.values.forEach((s,n)=>{e[0][n]=s.get(),e[1][n]=s.getVelocity()}),e}function ki(t,e,s,n){if(typeof e=="function"){const[i,o]=Ao(n);e=e(s!==void 0?s:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Ao(n);e=e(s!==void 0?s:t.custom,i,o)}return e}const Sn=t=>Array.isArray(t),Rg=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Eg=t=>Sn(t)?t[t.length-1]||0:t;function is(t){const e=X(t)?t.get():t;return Rg(e)?e.toValue():e}function Lg({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:s},n,i,o){const r={latestValues:kg(n,i,o,t),renderState:e()};return s&&(r.onMount=a=>s({props:n,current:a,...r}),r.onUpdate=a=>s(a)),r}const Dc=t=>(e,s)=>{const n=v.useContext(Vs),i=v.useContext(Si),o=()=>Lg(t,e,n,i);return s?o():Km(o)};function kg(t,e,s,n){const i={},o=n(t,{});for(const f in o)i[f]=is(o[f]);let{initial:r,animate:a}=t;const l=Ms(t),u=Sc(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=s?s.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!Cs(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=ki(t,f[d]);if(p){const{transitionEnd:g,transition:y,...m}=p;for(const x in m){let T=m[x];if(Array.isArray(T)){const V=c?T.length-1:0;T=T[V]}T!==null&&(i[x]=T)}for(const x in g)i[x]=g[x]}}}return i}function ji(t,e,s){var o;const{style:n}=t,i={};for(const r in n)(X(n[r])||e.style&&X(e.style[r])||Vc(r,t)||((o=s==null?void 0:s.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=n[r]);return i}const jg={useVisualState:Dc({scrapeMotionValuesFromProps:ji,createRenderState:Di})};function Rc(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}function Ec(t,{style:e,vars:s},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const o in s)t.style.setProperty(o,s[o])}const Lc=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 kc(t,e,s,n){Ec(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Lc.has(i)?i:Ai(i),e.attrs[i])}function jc(t,e,s){const n=ji(t,e,s);for(const i in t)if(X(t[i])||X(e[i])){const o=ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[o]=t[i]}return n}const Vo=["x","y","width","height","cx","cy","r"],Fg={useVisualState:Dc({scrapeMotionValuesFromProps:jc,createRenderState:$c,onUpdate:({props:t,prevProps:e,current:s,renderState:n,latestValues:i})=>{if(!s)return;let o=!!t.drag;if(!o){for(const a in i)if(Ut.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a<Vo.length;a++){const l=Vo[a];t[l]!==e[l]&&(r=!0)}r&&k.read(()=>{Rc(s,n),k.render(()=>{Ei(n,i,Li(s.tagName),t.transformTemplate),kc(s,n)})})}})};function Bg(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...Ri(n)?Fg:jg,preloadedFeatures:t,useRender:Dg(i),createVisualElement:e,Component:n};return ag(r)}}function ke(t,e,s){const n=t.getProps();return ki(n,e,s!==void 0?s:n.custom,t)}function Fi(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Fc=new Set(["width","height","top","left","right","bottom",...ie]);function Bi(t,e){t.indexOf(e)===-1&&t.push(e)}function Oi(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}class Ii{constructor(){this.subscriptions=[]}add(e){return Bi(this.subscriptions,e),()=>Oi(this.subscriptions,e)}notify(e,s,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,s,n);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Bc(t,e){return e?t*(1e3/e):0}let rs;function Og(){rs=void 0}const dt={now:()=>(rs===void 0&&dt.set(K.isProcessing||Hm.useManualTiming?K.timestamp:performance.now()),rs),set:t=>{rs=t,queueMicrotask(Og)}},Co=30,Ig=t=>!isNaN(parseFloat(t));class Ng{constructor(e,s={}){this.version="12.6.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{const o=dt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=dt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ig(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Ii);const n=this.events[e].add(s);return e==="change"?()=>{n(),k.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e,s=!0){!s||!this.passiveEffect?this.updateAndNotify(e,s):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=dt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Co)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Co);return Bc(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function je(t,e){return new Ng(t,e)}function Ug(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,je(s))}function Wg(t,e){const s=ke(t,e);let{transitionEnd:n={},transition:i={},...o}=s||{};o={...o,...n};for(const r in o){const a=Eg(o[r]);Ug(t,r,a)}}function Kg(t){return!!(X(t)&&t.add)}function wn(t,e){const s=t.getValue("willChange");if(Kg(s))return s.add(e)}function Oc(t){return t.props[wc]}const pt=t=>t*1e3,mt=t=>t/1e3;function Ni(t){let e;return()=>(e===void 0&&(e=t()),e)}const zg=Ni(()=>window.ScrollTimeline!==void 0);class _g{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=s}attachTimeline(e,s){const n=this.animations.map(i=>{if(zg()&&i.attachTimeline)return i.attachTimeline(e);if(typeof s=="function")return s(i)});return()=>{n.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let s=0;s<this.animations.length;s++)e=Math.max(e,this.animations[s].duration);return e}runAll(e){this.animations.forEach(s=>s[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Hg extends _g{then(e,s){return this.finished.finally(e).then(()=>{})}}const Ui=t=>Array.isArray(t)&&typeof t[0]=="number",Gg={};function Xg(t,e){const s=Ni(t);return()=>Gg[e]??s()}const Fe=Xg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ic=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let o=0;o<i;o++)n+=t(o/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},fe=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,bn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fe([0,.65,.55,1]),circOut:fe([.55,0,1,.45]),backIn:fe([.31,.01,.66,-.59]),backOut:fe([.33,1.53,.69,.99])};function Nc(t,e){if(t)return typeof t=="function"&&Fe()?Ic(t,e):Ui(t)?fe(t):Array.isArray(t)?t.map(s=>Nc(s,e)||bn.easeOut):bn[t]}function Yg(t,e,s,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:s};l&&(c.offset=l);const h=Nc(a,i);return Array.isArray(h)&&(c.easing=h),t.animate(c,{delay:n,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal",pseudoElement:u})}function Wi(t){return typeof t=="function"&&"applyToOptions"in t}function Uc(t){return!!(typeof t=="function"&&Fe()||!t||typeof t=="string"&&(t in bn||Fe())||Ui(t)||Array.isArray(t)&&t.every(Uc))}function Mo(t,e){t.timeline=e,t.onfinish=null}const Wc=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,qg=1e-7,Zg=12;function Jg(t,e,s,n,i){let o,r,a=0;do r=e+(s-e)/2,o=Wc(r,n,i)-t,o>0?s=r:e=r;while(Math.abs(o)>qg&&++a<Zg);return r}function _e(t,e,s,n){if(t===e&&s===n)return it;const i=o=>Jg(o,0,1,t,s);return o=>o===0||o===1?o:Wc(i(o),e,n)}const Kc=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zc=t=>e=>1-t(1-e),_c=_e(.33,1.53,.69,.99),Ki=zc(_c),Hc=Kc(Ki),Gc=t=>(t*=2)<1?.5*Ki(t):.5*(2-Math.pow(2,-10*(t-1))),zi=t=>1-Math.sin(Math.acos(t)),Xc=zc(zi),Yc=Kc(zi),qc=t=>/^0[^.\s]+$/u.test(t);function Qg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||qc(t):!0}const ve=t=>Math.round(t*1e5)/1e5,_i=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ty(t){return t==null}const ey=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Hi=(t,e)=>s=>!!(typeof s=="string"&&ey.test(s)&&s.startsWith(t)||e&&!ty(s)&&Object.prototype.hasOwnProperty.call(s,e)),Zc=(t,e,s)=>n=>{if(typeof n!="string")return n;const[i,o,r,a]=n.match(_i);return{[t]:parseFloat(i),[e]:parseFloat(o),[s]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},sy=t=>yt(0,255,t),zs={...re,transform:t=>Math.round(sy(t))},Ft={test:Hi("rgb","red"),parse:Zc("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+zs.transform(t)+", "+zs.transform(e)+", "+zs.transform(s)+", "+ve(Le.transform(n))+")"};function ny(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Pn={test:Hi("#"),parse:ny,transform:Ft.transform},Xt={test:Hi("hsl","hue"),parse:Zc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+ft.transform(ve(e))+", "+ft.transform(ve(s))+", "+ve(Le.transform(n))+")"},_={test:t=>Ft.test(t)||Pn.test(t)||Xt.test(t),parse:t=>Ft.test(t)?Ft.parse(t):Xt.test(t)?Xt.parse(t):Pn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ft.transform(t):Xt.transform(t)},iy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ry(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(_i))==null?void 0:e.length)||0)+(((s=t.match(iy))==null?void 0:s.length)||0)>0}const Jc="number",Qc="color",oy="var",ay="var(",$o="${}",ly=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Be(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ly,l=>(_.test(l)?(n.color.push(o),i.push(Qc),s.push(_.parse(l))):l.startsWith(ay)?(n.var.push(o),i.push(oy),s.push(l)):(n.number.push(o),i.push(Jc),s.push(parseFloat(l))),++o,$o)).split($o);return{values:s,split:a,indexes:n,types:i}}function tu(t){return Be(t).values}function eu(t){const{split:e,types:s}=Be(t),n=e.length;return i=>{let o="";for(let r=0;r<n;r++)if(o+=e[r],i[r]!==void 0){const a=s[r];a===Jc?o+=ve(i[r]):a===Qc?o+=_.transform(i[r]):o+=i[r]}return o}}const cy=t=>typeof t=="number"?0:t;function uy(t){const e=tu(t);return eu(t)(e.map(cy))}const Pt={test:ry,parse:tu,createTransformer:eu,getAnimatableNone:uy},hy=new Set(["brightness","contrast","saturate","opacity"]);function fy(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=s.match(_i)||[];if(!n)return t;const i=s.replace(n,"");let o=hy.has(e)?1:0;return n!==s&&(o*=100),e+"("+o+i+")"}const dy=/\b([a-z-]*)\(.*?\)/gu,An={...Pt,getAnimatableNone:t=>{const e=t.match(dy);return e?e.map(fy).join(" "):t}},py={...Mi,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:An,WebkitFilter:An},su=t=>py[t];function nu(t,e){let s=su(t);return s!==An&&(s=Pt),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const my=new Set(["auto","none","0"]);function gy(t,e,s){let n=0,i;for(;n<t.length&&!i;){const o=t[n];typeof o=="string"&&!my.has(o)&&Be(o).values.length&&(i=t[n]),n++}if(i&&s)for(const o of e)t[o]=nu(s,i)}const Bt=t=>t*180/Math.PI,Vn=t=>{const e=Bt(Math.atan2(t[1],t[0]));return Cn(e)},yy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Vn,rotateZ:Vn,skewX:t=>Bt(Math.atan(t[1])),skewY:t=>Bt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Cn=t=>(t=t%360,t<0&&(t+=360),t),Do=Vn,Ro=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Eo=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),vy={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ro,scaleY:Eo,scale:t=>(Ro(t)+Eo(t))/2,rotateX:t=>Cn(Bt(Math.atan2(t[6],t[5]))),rotateY:t=>Cn(Bt(Math.atan2(-t[2],t[0]))),rotateZ:Do,rotate:Do,skewX:t=>Bt(Math.atan(t[4])),skewY:t=>Bt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Lo(t){return t.includes("scale")?1:0}function Mn(t,e){if(!t||t==="none")return Lo(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=vy,i=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=yy,i=a}if(!i)return Lo(e);const o=n[e],r=i[1].split(",").map(Ty);return typeof o=="function"?o(r):r[o]}const xy=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return Mn(s,e)};function Ty(t){return parseFloat(t.trim())}const ko=t=>t===re||t===M,Sy=new Set(["x","y","z"]),wy=ie.filter(t=>!Sy.has(t));function by(t){const e=[];return wy.forEach(s=>{const n=t.getValue(s);n!==void 0&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}const ee={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Mn(e,"x"),y:(t,{transform:e})=>Mn(e,"y")};ee.translateX=ee.x;ee.translateY=ee.y;const It=new Set;let $n=!1,Dn=!1;function iu(){if(Dn){const t=Array.from(It).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),s=new Map;e.forEach(n=>{const i=by(n);i.length&&(s.set(n,i),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const i=s.get(n);i&&i.forEach(([o,r])=>{var a;(a=n.getValue(o))==null||a.set(r)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Dn=!1,$n=!1,It.forEach(t=>t.complete()),It.clear()}function ru(){It.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Dn=!0)})}function Py(){ru(),iu()}class Gi{constructor(e,s,n,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=n,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(It.add(this),$n||($n=!0,k.read(ru),k.resolveKeyframes(iu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:n,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(n&&s){const l=n.readValue(s,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),It.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,It.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ou=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ay=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vy(t){const e=Ay.exec(t);if(!e)return[,];const[,s,n,i]=e;return[`--${s??n}`,i]}function au(t,e,s=1){const[n,i]=Vy(t);if(!n)return;const o=window.getComputedStyle(e).getPropertyValue(n);if(o){const r=o.trim();return ou(r)?parseFloat(r):r}return Ci(i)?au(i,e,s+1):i}const lu=t=>e=>e.test(t),Cy={test:t=>t==="auto",parse:t=>t},cu=[re,M,ft,Tt,mg,pg,Cy],jo=t=>cu.find(lu(t));class uu extends Gi{constructor(e,s,n,i,o){super(e,s,n,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Ci(u))){const c=au(u,s.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Fc.has(n)||e.length!==2)return;const[i,o]=e,r=jo(i),a=jo(o);if(r!==a)if(ko(r)&&ko(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,n=[];for(let i=0;i<e.length;i++)Qg(e[i])&&n.push(i);n.length&&gy(e,n,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ee[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const i=s[s.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:s,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const i=e.getValue(s);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=ee[s](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Fo=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Pt.test(t)||t==="0")&&!t.startsWith("url("));function My(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function $y(t,e,s,n){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Fo(i,e),a=Fo(o,e);return!r||!a?!1:My(t)||(s==="spring"||Wi(s))&&n}const Dy=t=>t!==null;function $s(t,{repeat:e,repeatType:s="loop"},n){const i=t.filter(Dy),o=e&&s!=="loop"&&e%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ry=40;class hu{constructor({autoplay:e=!0,delay:s=0,type:n="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=dt.now(),this.options={autoplay:e,delay:s,type:n,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Ry?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Py(),this._resolved}onKeyframesResolved(e,s){this.resolvedAt=dt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!$y(e,n,i,o))if(r)this.options.duration=0;else{l&&l($s(e,this.options,s)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,s);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:s,...c},this.onPostResolved())}onPostResolved(){}then(e,s){return this.currentFinishedPromise.then(e,s)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const ms=2e4;function Xi(t){let e=0;const s=50;let n=t.next(e);for(;!n.done&&e<ms;)e+=s,n=t.next(e);return e>=ms?1/0:e}const F=(t,e,s)=>t+(e-t)*s;function _s(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Ey({hue:t,saturation:e,lightness:s,alpha:n}){t/=360,e/=100,s/=100;let i=0,o=0,r=0;if(!e)i=o=r=s;else{const a=s<.5?s*(1+e):s+e-s*e,l=2*s-a;i=_s(l,a,t+1/3),o=_s(l,a,t),r=_s(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:n}}function gs(t,e){return s=>s>0?e:t}const Hs=(t,e,s)=>{const n=t*t,i=s*(e*e-n)+n;return i<0?0:Math.sqrt(i)},Ly=[Pn,Ft,Xt],ky=t=>Ly.find(e=>e.test(t));function Bo(t){const e=ky(t);if(!e)return!1;let s=e.parse(t);return e===Xt&&(s=Ey(s)),s}const Oo=(t,e)=>{const s=Bo(t),n=Bo(e);if(!s||!n)return gs(t,e);const i={...s};return o=>(i.red=Hs(s.red,n.red,o),i.green=Hs(s.green,n.green,o),i.blue=Hs(s.blue,n.blue,o),i.alpha=F(s.alpha,n.alpha,o),Ft.transform(i))},jy=(t,e)=>s=>e(t(s)),He=(...t)=>t.reduce(jy),Rn=new Set(["none","hidden"]);function Fy(t,e){return Rn.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function By(t,e){return s=>F(t,e,s)}function Yi(t){return typeof t=="number"?By:typeof t=="string"?Ci(t)?gs:_.test(t)?Oo:Ny:Array.isArray(t)?fu:typeof t=="object"?_.test(t)?Oo:Oy:gs}function fu(t,e){const s=[...t],n=s.length,i=t.map((o,r)=>Yi(o)(o,e[r]));return o=>{for(let r=0;r<n;r++)s[r]=i[r](o);return s}}function Oy(t,e){const s={...t,...e},n={};for(const i in s)t[i]!==void 0&&e[i]!==void 0&&(n[i]=Yi(t[i])(t[i],e[i]));return i=>{for(const o in n)s[o]=n[o](i);return s}}function Iy(t,e){const s=[],n={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][n[o]],a=t.values[r]??0;s[i]=a,n[o]++}return s}const Ny=(t,e)=>{const s=Pt.createTransformer(e),n=Be(t),i=Be(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Rn.has(t)&&!i.values.length||Rn.has(e)&&!n.values.length?Fy(t,e):He(fu(Iy(n,i),i.values),s):gs(t,e)};function du(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?F(t,e,s):Yi(t)(t,e)}function Uy(t,e=100,s){const n=s({...t,keyframes:[0,e]}),i=Math.min(Xi(n),ms);return{type:"keyframes",ease:o=>n.next(i*o).value/e,duration:mt(i)}}const Wy=5;function pu(t,e,s){const n=Math.max(e-Wy,0);return Bc(s-t(n),e-n)}const O={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Io=.001;function Ky({duration:t=O.duration,bounce:e=O.bounce,velocity:s=O.velocity,mass:n=O.mass}){let i,o,r=1-e;r=yt(O.minDamping,O.maxDamping,r),t=yt(O.minDuration,O.maxDuration,mt(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-s,d=En(u,r),p=Math.exp(-h);return Io-f/d*p},o=u=>{const h=u*r*t,f=h*s+s,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-h),g=En(Math.pow(u,2),r);return(-i(u)+Io>0?-1:1)*((f-d)*p)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-s)*t+1;return-.001+c*h},o=u=>{const c=Math.exp(-u*t),h=(s-u)*(t*t);return c*h});const a=5/t,l=_y(i,o,a);if(t=pt(t),isNaN(l))return{stiffness:O.stiffness,damping:O.damping,duration:t};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:r*2*Math.sqrt(n*u),duration:t}}}const zy=12;function _y(t,e,s){let n=s;for(let i=1;i<zy;i++)n=n-t(n)/e(n);return n}function En(t,e){return t*Math.sqrt(1-e*e)}const Hy=["duration","bounce"],Gy=["stiffness","damping","mass"];function No(t,e){return e.some(s=>t[s]!==void 0)}function Xy(t){let e={velocity:O.velocity,stiffness:O.stiffness,damping:O.damping,mass:O.mass,isResolvedFromDuration:!1,...t};if(!No(t,Gy)&&No(t,Hy))if(t.visualDuration){const s=t.visualDuration,n=2*Math.PI/(s*1.2),i=n*n,o=2*yt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:O.mass,stiffness:i,damping:o}}else{const s=Ky(t);e={...e,...s,mass:O.mass},e.isResolvedFromDuration=!0}return e}function ys(t=O.visualDuration,e=O.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:i}=s;const o=s.keyframes[0],r=s.keyframes[s.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Xy({...s,velocity:-mt(s.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),y=r-o,m=mt(Math.sqrt(l/c)),x=Math.abs(y)<5;n||(n=x?O.restSpeed.granular:O.restSpeed.default),i||(i=x?O.restDelta.granular:O.restDelta.default);let T;if(g<1){const S=En(m,g);T=P=>{const $=Math.exp(-g*m*P);return r-$*((p+g*m*y)/S*Math.sin(S*P)+y*Math.cos(S*P))}}else if(g===1)T=S=>r-Math.exp(-m*S)*(y+(p+m*y)*S);else{const S=m*Math.sqrt(g*g-1);T=P=>{const $=Math.exp(-g*m*P),b=Math.min(S*P,300);return r-$*((p+g*m*y)*Math.sinh(b)+S*y*Math.cosh(b))/S}}const V={calculatedDuration:d&&h||null,next:S=>{const P=T(S);if(d)a.done=S>=h;else{let $=0;g<1&&($=S===0?pt(p):pu(T,S,P));const b=Math.abs($)<=n,D=Math.abs(r-P)<=i;a.done=b&&D}return a.value=a.done?r:P,a},toString:()=>{const S=Math.min(Xi(V),ms),P=Ic($=>V.next(S*$).value,S,30);return S+"ms "+P},toTransition:()=>{}};return V}ys.applyToOptions=t=>{const e=Uy(t,100,ys);return t.ease=Fe()?e.ease:"easeOut",t.duration=pt(e.duration),t.type="keyframes",t};function Uo({keyframes:t,velocity:e=0,power:s=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let g=s*e;const y=h+g,m=r===void 0?y:r(y);m!==y&&(g=m-h);const x=b=>-g*Math.exp(-b/n),T=b=>m+x(b),V=b=>{const D=x(b),E=T(b);f.done=Math.abs(D)<=u,f.value=f.done?m:E};let S,P;const $=b=>{d(f.value)&&(S=b,P=ys({keyframes:[f.value,p(f.value)],velocity:pu(T,b,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return $(0),{calculatedDuration:null,next:b=>{let D=!1;return!P&&S===void 0&&(D=!0,V(b),$(b)),S!==void 0&&b>=S?P.next(b-S):(!D&&V(b),f)}}}const Yy=_e(.42,0,1,1),qy=_e(0,0,.58,1),mu=_e(.42,0,.58,1),Zy=t=>Array.isArray(t)&&typeof t[0]!="number",Jy={linear:it,easeIn:Yy,easeInOut:mu,easeOut:qy,circIn:zi,circInOut:Yc,circOut:Xc,backIn:Ki,backInOut:Hc,backOut:_c,anticipate:Gc},Wo=t=>{if(Ui(t)){yc(t.length===4);const[e,s,n,i]=t;return _e(e,s,n,i)}else if(typeof t=="string")return Jy[t];return t},Oe=(t,e,s)=>{const n=e-t;return n===0?1:(s-t)/n};function Qy(t,e,s){const n=[],i=s||du,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||it:e;a=He(l,a)}n.push(a)}return n}function tv(t,e,{clamp:s=!0,ease:n,mixer:i}={}){const o=t.length;if(yc(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Qy(e,n,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Oe(t[h],t[h+1],c);return a[h](f)};return s?c=>u(yt(t[0],t[o-1],c)):u}function ev(t,e){const s=t[t.length-1];for(let n=1;n<=e;n++){const i=Oe(0,e,n);t.push(F(s,1,i))}}function sv(t){const e=[0];return ev(e,t.length-1),e}function nv(t,e){return t.map(s=>s*e)}function iv(t,e){return t.map(()=>e||mu).splice(0,t.length-1)}function vs({duration:t=300,keyframes:e,times:s,ease:n="easeInOut"}){const i=Zy(n)?n.map(Wo):Wo(n),o={done:!1,value:e[0]},r=nv(s&&s.length===e.length?s:sv(e),t),a=tv(r,e,{ease:Array.isArray(i)?i:iv(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const rv=t=>{const e=({timestamp:s})=>t(s);return{start:()=>k.update(e,!0),stop:()=>bt(e),now:()=>K.isProcessing?K.timestamp:dt.now()}},ov={decay:Uo,inertia:Uo,tween:vs,keyframes:vs,spring:ys},av=t=>t/100;class qi extends hu{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:s,motionValue:n,element:i,keyframes:o}=this.options,r=(i==null?void 0:i.KeyframeResolver)||Gi,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new r(o,a,s,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:s="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Wi(s)?s:ov[s]||vs;let l,u;a!==vs&&typeof e[0]!="number"&&(l=He(av,du(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});o==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Xi(c));const{calculatedDuration:h}=c,f=h+i,d=f*(n+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,s=!1){const{resolved:n}=this;if(!n){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=n;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),s?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const m=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let T=this.currentTime,V=o;if(d){const b=Math.min(this.currentTime,c)/h;let D=Math.floor(b),E=b%1;!E&&b>=1&&(E=1),E===1&&D--,D=Math.min(D,d+1),!!(D%2)&&(p==="reverse"?(E=1-E,g&&(E-=g/h)):p==="mirror"&&(V=r)),T=yt(0,1,E)*h}const S=x?{done:!1,value:l[0]}:V.next(T);a&&(S.value=a(S.value));let{done:P}=S;!x&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const $=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return $&&i!==void 0&&(S.value=$s(l,this.options,i)),y&&y(S.value),$&&this.finish(),S}get duration(){const{resolved:e}=this;return e?mt(e.calculatedDuration):0}get time(){return mt(this.currentTime)}set time(e){e=pt(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;this.playbackSpeed=e,s&&(this.time=mt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=rv,onPlay:s,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),s&&s();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}get finished(){return this.currentFinishedPromise}}const lv=new Set(["opacity","clipPath","filter","transform"]),cv=Ni(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),xs=10,uv=2e4;function hv(t){return Wi(t.type)||t.type==="spring"||!Uc(t.ease)}function fv(t,e){const s=new qi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let n={done:!1,value:t[0]};const i=[];let o=0;for(;!n.done&&o<uv;)n=s.sample(o),i.push(n.value),o+=xs;return{times:void 0,keyframes:i,duration:o-xs,ease:"linear"}}const gu={anticipate:Gc,backInOut:Hc,circInOut:Yc};function dv(t){return t in gu}class Ko extends hu{constructor(e){super(e);const{name:s,motionValue:n,element:i,keyframes:o}=this.options;this.resolver=new uu(o,(r,a)=>this.onKeyframesResolved(r,a),s,n,i),this.resolver.scheduleResolve()}initPlayback(e,s){let{duration:n=300,times:i,ease:o,type:r,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&Fe()&&dv(o)&&(o=gu[o]),hv(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:p,...g}=this.options,y=fv(e,g);e=y.keyframes,e.length===1&&(e[1]=e[0]),n=y.duration,i=y.times,o=y.ease,r="keyframes"}const c=Yg(a.owner.current,l,e,{...this.options,duration:n,times:i,ease:o});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(Mo(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set($s(e,this.options,s)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:r,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:s}=e;return mt(s)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:s}=e;return mt(s.currentTime||0)}set time(e){const{resolved:s}=this;if(!s)return;const{animation:n}=s;n.currentTime=pt(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:s}=e;return s.playbackRate}get finished(){return this.resolved.animation.finished}set speed(e){const{resolved:s}=this;if(!s)return;const{animation:n}=s;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:s}=e;return s.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:s}=e;return s.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:s}=this;if(!s)return it;const{animation:n}=s;Mo(n,e)}return it}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.playState==="finished"&&this.updateFinishedPromise(),s.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:s,keyframes:n,duration:i,type:o,ease:r,times:a}=e;if(s.playState==="idle"||s.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new qi({...d,keyframes:n,duration:i,type:o,ease:r,times:a,isGenerator:!0}),g=pt(this.time);u.setWithVelocity(p.sample(g-xs).value,p.sample(g).value,xs)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:s,name:n,repeatDelay:i,repeatType:o,damping:r,type:a}=e;if(!s||!s.owner||!(s.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=s.owner.getProps();return cv()&&n&&lv.has(n)&&(n!=="transform"||!u)&&!l&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const pv={type:"spring",stiffness:500,damping:25,restSpeed:10},mv=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),gv={type:"keyframes",duration:.8},yv={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vv=(t,{keyframes:e})=>e.length>2?gv:Ut.has(t)?t.startsWith("scale")?mv(e[1]):pv:yv;function xv({when:t,delay:e,delayChildren:s,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Zi=(t,e,s,n={},i,o)=>r=>{const a=Fi(n,t)||{},l=a.delay||n.delay||0;let{elapsed:u=0}=n;u=u-pt(l);let c={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};xv(a)||(c={...c,...vv(t,c)}),c.duration&&(c.duration=pt(c.duration)),c.repeatDelay&&(c.repeatDelay=pt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=$s(c.keyframes,a);if(f!==void 0)return k.update(()=>{c.onUpdate(f),c.onComplete()}),new Hg([])}return!o&&Ko.supports(c)?new Ko(c):new qi(c)};function Tv({protectedKeys:t,needsAnimating:e},s){const n=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,n}function yu(t,e,{delay:s=0,transitionOverride:n,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;n&&(o=n);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Tv(u,c))continue;const d={delay:s,...Fi(o||{},c)};let p=!1;if(window.MotionHandoffAnimation){const y=Oc(t);if(y){const m=window.MotionHandoffAnimation(y,c,k);m!==null&&(d.startTime=m,p=!0)}}wn(t,c),h.start(Zi(c,h,f,t.shouldReduceMotion&&Fc.has(c)?{type:!1}:d,t,p));const g=h.animation;g&&l.push(g)}return r&&Promise.all(l).then(()=>{k.update(()=>{r&&Wg(t,r)})}),l}function Ln(t,e,s={}){var l;const n=ke(t,e,s.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(i=s.transitionOverride);const o=n?()=>Promise.all(yu(t,n,s)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Sv(t,e,c+u,h,f,s)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(s.delay)])}function Sv(t,e,s=0,n=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(t.variantChildren).sort(wv).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(Ln(u,e,{...o,delay:s+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function wv(t,e){return t.sortNodePosition(e)}function bv(t,e,s={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(o=>Ln(t,o,s));n=Promise.all(i)}else if(typeof e=="string")n=Ln(t,e,s);else{const i=typeof e=="function"?ke(t,e,s.custom):e;n=Promise.all(yu(t,i,s))}return n.then(()=>{t.notify("AnimationComplete",e)})}function vu(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let n=0;n<s;n++)if(e[n]!==t[n])return!1;return!0}const Pv=bi.length;function xu(t){if(!t)return;if(!t.isControllingVariants){const s=t.parent?xu(t.parent)||{}:{};return t.props.initial!==void 0&&(s.initial=t.props.initial),s}const e={};for(let s=0;s<Pv;s++){const n=bi[s],i=t.props[n];(Re(i)||i===!1)&&(e[n]=i)}return e}const Av=[...wi].reverse(),Vv=wi.length;function Cv(t){return e=>Promise.all(e.map(({animation:s,options:n})=>bv(t,s,n)))}function Mv(t){let e=Cv(t),s=zo(),n=!0;const i=l=>(u,c)=>{var f;const h=ke(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...g}=h;u={...u,...g,...p}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=xu(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<Vv;y++){const m=Av[y],x=s[m],T=u[m]!==void 0?u[m]:c[m],V=Re(T),S=m===l?x.isActive:null;S===!1&&(p=y);let P=T===c[m]&&T!==u[m]&&V;if(P&&n&&t.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...d},!x.isActive&&S===null||!T&&!x.prevProp||Cs(T)||typeof T=="boolean")continue;const $=$v(x.prevProp,T);let b=$||m===l&&x.isActive&&!P&&V||y>p&&V,D=!1;const E=Array.isArray(T)?T:[T];let Z=E.reduce(i(m),{});S===!1&&(Z={});const{prevResolvedValues:oe={}}=x,Ds={...oe,...Z},ae=R=>{b=!0,f.has(R)&&(D=!0,f.delete(R)),x.needsAnimating[R]=!0;const U=t.getValue(R);U&&(U.liveStyle=!1)};for(const R in Ds){const U=Z[R],Ct=oe[R];if(d.hasOwnProperty(R))continue;let Mt=!1;Sn(U)&&Sn(Ct)?Mt=!vu(U,Ct):Mt=U!==Ct,Mt?U!=null?ae(R):f.add(R):U!==void 0&&f.has(R)?ae(R):x.protectedKeys[R]=!0}x.prevProp=T,x.prevResolvedValues=Z,x.isActive&&(d={...d,...Z}),n&&t.blockInitialAnimation&&(b=!1),b&&(!(P&&$)||D)&&h.push(...E.map(R=>({animation:R,options:{type:m}})))}if(f.size){const y={};if(typeof u.initial!="boolean"){const m=ke(t,Array.isArray(u.initial)?u.initial[0]:u.initial);m&&m.transition&&(y.transition=m.transition)}f.forEach(m=>{const x=t.getBaseTarget(m),T=t.getValue(m);T&&(T.liveStyle=!0),y[m]=x??null}),h.push({animation:y})}let g=!!h.length;return n&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(h):Promise.resolve()}function a(l,u){var h;if(s[l].isActive===u)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),s[l].isActive=u;const c=r(l);for(const f in s)s[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>s,reset:()=>{s=zo(),n=!0}}}function $v(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!vu(e,t):!1}function Dt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zo(){return{animate:Dt(!0),whileInView:Dt(),whileHover:Dt(),whileTap:Dt(),whileDrag:Dt(),whileFocus:Dt(),exit:Dt()}}class Vt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Dv extends Vt{constructor(e){super(e),e.animationState||(e.animationState=Mv(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Cs(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:s}=this.node.prevProps||{};e!==s&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Rv=0;class Ev extends Vt{constructor(){super(...arguments),this.id=Rv++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);s&&!e&&i.then(()=>{s(this.id)})}mount(){const{register:e,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Lv={animation:{Feature:Dv},exit:{Feature:Ev}},ot={x:!1,y:!1};function Tu(){return ot.x||ot.y}function kv(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=!0,()=>{ot[t]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function Ie(t,e,s,n={passive:!0}){return t.addEventListener(e,s,n),()=>t.removeEventListener(e,s)}const Ji=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ge(t){return{point:{x:t.pageX,y:t.pageY}}}const jv=t=>e=>Ji(e)&&t(e,Ge(e));function xe(t,e,s,n){return Ie(t,e,jv(s),n)}function Su({top:t,left:e,right:s,bottom:n}){return{x:{min:e,max:s},y:{min:t,max:n}}}function Fv({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Bv(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}const wu=1e-4,Ov=1-wu,Iv=1+wu,bu=.01,Nv=0-bu,Uv=0+bu;function q(t){return t.max-t.min}function Wv(t,e,s){return Math.abs(t-e)<=s}function _o(t,e,s,n=.5){t.origin=n,t.originPoint=F(e.min,e.max,t.origin),t.scale=q(s)/q(e),t.translate=F(s.min,s.max,t.origin)-t.originPoint,(t.scale>=Ov&&t.scale<=Iv||isNaN(t.scale))&&(t.scale=1),(t.translate>=Nv&&t.translate<=Uv||isNaN(t.translate))&&(t.translate=0)}function Te(t,e,s,n){_o(t.x,e.x,s.x,n?n.originX:void 0),_o(t.y,e.y,s.y,n?n.originY:void 0)}function Ho(t,e,s){t.min=s.min+e.min,t.max=t.min+q(e)}function Kv(t,e,s){Ho(t.x,e.x,s.x),Ho(t.y,e.y,s.y)}function Go(t,e,s){t.min=e.min-s.min,t.max=t.min+q(e)}function Se(t,e,s){Go(t.x,e.x,s.x),Go(t.y,e.y,s.y)}const Xo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Xo(),y:Xo()}),Yo=()=>({min:0,max:0}),N=()=>({x:Yo(),y:Yo()});function st(t){return[t("x"),t("y")]}function Gs(t){return t===void 0||t===1}function kn({scale:t,scaleX:e,scaleY:s}){return!Gs(t)||!Gs(e)||!Gs(s)}function Lt(t){return kn(t)||Pu(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pu(t){return qo(t.x)||qo(t.y)}function qo(t){return t&&t!=="0%"}function Ts(t,e,s){const n=t-s,i=e*n;return s+i}function Zo(t,e,s,n,i){return i!==void 0&&(t=Ts(t,i,n)),Ts(t,s,n)+e}function jn(t,e=0,s=1,n,i){t.min=Zo(t.min,e,s,n,i),t.max=Zo(t.max,e,s,n,i)}function Au(t,{x:e,y:s}){jn(t.x,e.translate,e.scale,e.originPoint),jn(t.y,s.translate,s.scale,s.originPoint)}const Jo=.999999999999,Qo=1.0000000000001;function zv(t,e,s,n=!1){const i=s.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=s[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Au(t,r)),n&&Lt(o.latestValues)&&Zt(t,o.latestValues))}e.x<Qo&&e.x>Jo&&(e.x=1),e.y<Qo&&e.y>Jo&&(e.y=1)}function qt(t,e){t.min=t.min+e,t.max=t.max+e}function ta(t,e,s,n,i=.5){const o=F(t.min,t.max,i);jn(t,e,s,o,n)}function Zt(t,e){ta(t.x,e.x,e.scaleX,e.scale,e.originX),ta(t.y,e.y,e.scaleY,e.scale,e.originY)}function Vu(t,e){return Su(Bv(t.getBoundingClientRect(),e))}function _v(t,e,s){const n=Vu(t,s),{scroll:i}=e;return i&&(qt(n.x,i.offset.x),qt(n.y,i.offset.y)),n}const Cu=({current:t})=>t?t.ownerDocument.defaultView:null,ea=(t,e)=>Math.abs(t-e);function Hv(t,e){const s=ea(t.x,e.x),n=ea(t.y,e.y);return Math.sqrt(s**2+n**2)}class Mu{constructor(e,s,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Ys(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Hv(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:g}=K;this.history.push({...p,timestamp:g});const{onStart:y,onMove:m}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Xs(f,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ys(h.type==="pointercancel"?this.lastMoveEventInfo:Xs(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Ji(e))return;this.dragSnapToOrigin=o,this.handlers=s,this.transformPagePoint=n,this.contextWindow=i||window;const r=Ge(e),a=Xs(r,this.transformPagePoint),{point:l}=a,{timestamp:u}=K;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=s;c&&c(e,Ys(a,this.history)),this.removeListeners=He(xe(this.contextWindow,"pointermove",this.handlePointerMove),xe(this.contextWindow,"pointerup",this.handlePointerUp),xe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),bt(this.updatePoint)}}function Xs(t,e){return e?{point:e(t.point)}:t}function sa(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ys({point:t},e){return{point:t,delta:sa(t,$u(e)),offset:sa(t,Gv(e)),velocity:Xv(e,.1)}}function Gv(t){return t[0]}function $u(t){return t[t.length-1]}function Xv(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,n=null;const i=$u(t);for(;s>=0&&(n=t[s],!(i.timestamp-n.timestamp>pt(e)));)s--;if(!n)return{x:0,y:0};const o=mt(i.timestamp-n.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Yv(t,{min:e,max:s},n){return e!==void 0&&t<e?t=n?F(e,t,n.min):Math.max(t,e):s!==void 0&&t>s&&(t=n?F(s,t,n.max):Math.min(t,s)),t}function na(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function qv(t,{top:e,left:s,bottom:n,right:i}){return{x:na(t.x,s,i),y:na(t.y,e,n)}}function ia(t,e){let s=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,n]=[n,s]),{min:s,max:n}}function Zv(t,e){return{x:ia(t.x,e.x),y:ia(t.y,e.y)}}function Jv(t,e){let s=.5;const n=q(t),i=q(e);return i>n?s=Oe(e.min,e.max-n,t.min):n>i&&(s=Oe(t.min,t.max-i,e.min)),yt(0,1,s)}function Qv(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}const Fn=.35;function t0(t=Fn){return t===!1?t=0:t===!0&&(t=Fn),{x:ra(t,"left","right"),y:ra(t,"top","bottom")}}function ra(t,e,s){return{min:oa(t,e),max:oa(t,s)}}function oa(t,e){return typeof t=="number"?t:t[e]||0}const e0=new WeakMap;class s0{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=N(),this.visualElement=e}start(e,{snapToCursor:s=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(Ge(c).point)},o=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kv(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),st(y=>{let m=this.getAxisMotionValue(y).get()||0;if(ft.test(m)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[y];T&&(m=q(T)*(parseFloat(m)/100))}}this.originPoint[y]=m}),p&&k.postRender(()=>p(c,h)),wn(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},r=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=n0(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),g&&g(c,h)},a=(c,h)=>this.stop(c,h),l=()=>st(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Mu(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Cu(this.visualElement)})}stop(e,s){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&k.postRender(()=>o(e,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:s}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(e,s,n){const{drag:i}=this.getProps();if(!n||!ts(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(r=Yv(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Gt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=qv(n.layoutBox,e):this.constraints=!1,this.elastic=t0(s),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&st(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Qv(n.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:s}=this.getProps();if(!e||!Gt(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=_v(n,i.root,this.visualElement.getTransformPagePoint());let r=Zv(i.layout.layoutBox,o);if(s){const a=s(Fv(r));this.hasMutatedConstraints=!!a,a&&(r=Su(a))}return r}startAnimation(e){const{drag:s,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=st(c=>{if(!ts(c,s,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:n?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,s){const n=this.getAxisMotionValue(e);return wn(this.visualElement,e),n.start(Zi(e,n,0,s,this.visualElement,!1))}stopAnimation(){st(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){st(e=>{var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.pause()})}getAnimationState(e){var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.state}getAxisMotionValue(e){const s=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),i=n[s];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){st(s=>{const{drag:n}=this.getProps();if(!ts(s,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(s);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[s];o.set(e[s]-F(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!Gt(s)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};st(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Jv({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),st(r=>{if(!ts(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;e0.set(this.visualElement,this);const e=this.visualElement.current,s=xe(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();Gt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(n);const r=Ie(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(st(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),s(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Fn,dragMomentum:a=!0}=e;return{...e,drag:s,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ts(t,e,s){return(e===!0||e===t)&&(s===null||s===t)}function n0(t,e=10){let s=null;return Math.abs(t.y)>e?s="y":Math.abs(t.x)>e&&(s="x"),s}class i0 extends Vt{constructor(e){super(e),this.removeGroupControls=it,this.removeListeners=it,this.controls=new s0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||it}unmount(){this.removeGroupControls(),this.removeListeners()}}const aa=t=>(e,s)=>{t&&k.postRender(()=>t(e,s))};class r0 extends Vt{constructor(){super(...arguments),this.removePointerDownListener=it}onPointerDown(e){this.session=new Mu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cu(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:s,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:aa(e),onStart:aa(s),onMove:n,onEnd:(o,r)=>{delete this.session,i&&k.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=xe(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const os={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function la(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ce={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(M.test(t))t=parseFloat(t);else return t;const s=la(t,e.target.x),n=la(t,e.target.y);return`${s}% ${n}%`}},o0={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=Pt.parse(t);if(i.length>5)return n;const o=Pt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=s.x.scale*e.x,l=s.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class a0 extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=e;dg(l0),o&&(s.group&&s.group.add(o),n&&n.register&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),os.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:s,visualElement:n,drag:i,isPresent:o}=this.props,r=n.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==s||s===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Pi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Du(t){const[e,s]=_m(),n=v.useContext(mc);return w.jsx(a0,{...t,layoutGroup:n,switchLayoutGroup:v.useContext(bc),isPresent:e,safeToRemove:s})}const l0={borderRadius:{...ce,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomLeftRadius:ce,borderBottomRightRadius:ce,boxShadow:o0};function c0(t,e,s){const n=X(t)?t:je(t);return n.start(Zi("",n,e,s)),n.animation}function u0(t){return t instanceof SVGElement&&t.tagName!=="svg"}const h0=(t,e)=>t.depth-e.depth;class f0{constructor(){this.children=[],this.isDirty=!1}add(e){Bi(this.children,e),this.isDirty=!0}remove(e){Oi(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(h0),this.isDirty=!1,this.children.forEac
vendor: 5,161 bytes, line 9
9h(e)}}function d0(t,e){const s=dt.now(),n=({timestamp:i})=>{const o=i-s;o>=e&&(bt(n),t(o-e))};return k.read(n,!0),()=>bt(n)}const Ru=["TopLeft","TopRight","BottomLeft","BottomRight"],p0=Ru.length,ca=t=>typeof t=="string"?parseFloat(t):t,ua=t=>typeof t=="number"||M.test(t);function m0(t,e,s,n,i,o){i?(t.opacity=F(0,s.opacity!==void 0?s.opacity:1,g0(n)),t.opacityExit=F(e.opacity!==void 0?e.opacity:1,0,y0(n))):o&&(t.opacity=F(e.opacity!==void 0?e.opacity:1,s.opacity!==void 0?s.opacity:1,n));for(let r=0;r<p0;r++){const a=`border${Ru[r]}Radius`;let l=ha(e,a),u=ha(s,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ua(l)===ua(u)?(t[a]=Math.max(F(ca(l),ca(u),n),0),(ft.test(u)||ft.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||s.rotate)&&(t.rotate=F(e.rotate||0,s.rotate||0,n))}function ha(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const g0=Eu(0,.5,Xc),y0=Eu(.5,.95,it);function Eu(t,e,s){return n=>n<t?0:n>e?1:s(Oe(t,e,n))}function fa(t,e){t.min=e.min,t.max=e.max}function tt(t,e){fa(t.x,e.x),fa(t.y,e.y)}function da(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function pa(t,e,s,n,i){return t-=e,t=Ts(t,1/s,n),i!==void 0&&(t=Ts(t,1/i,n)),t}function v0(t,e=0,s=1,n=.5,i,o=t,r=t){if(ft.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,n);t===o&&(a-=e),t.min=pa(t.min,e,s,a,i),t.max=pa(t.max,e,s,a,i)}function ma(t,e,[s,n,i],o,r){v0(t,e[s],e[n],e[i],e.scale,o,r)}const x0=["x","scaleX","originX"],T0=["y","scaleY","originY"];function ga(t,e,s,n){ma(t.x,e,x0,s?s.x:void 0,n?n.x:void 0),ma(t.y,e,T0,s?s.y:void 0,n?n.y:void 0)}function ya(t){return t.translate===0&&t.scale===1}function Lu(t){return ya(t.x)&&ya(t.y)}function va(t,e){return t.min===e.min&&t.max===e.max}function S0(t,e){return va(t.x,e.x)&&va(t.y,e.y)}function xa(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ku(t,e){return xa(t.x,e.x)&&xa(t.y,e.y)}function Ta(t){return q(t.x)/q(t.y)}function Sa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class w0{constructor(){this.members=[]}add(e){Bi(this.members,e),e.scheduleRender()}remove(e){if(Oi(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(i=>e===i);if(s===0)return!1;let n;for(let i=s;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){n=o;break}}return n?(this.promote(n),!0):!1}promote(e,s){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,s&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:n}=e;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function b0(t,e,s){let n="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(s==null?void 0:s.z)||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=s;u&&(n=`perspective(${u}px) ${n}`),c&&(n+=`rotate(${c}deg) `),h&&(n+=`rotateX(${h}deg) `),f&&(n+=`rotateY(${f}deg) `),d&&(n+=`skewX(${d}deg) `),p&&(n+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}const qs=["","X","Y","Z"],P0={visibility:"hidden"},wa=1e3;let A0=0;function Zs(t,e,s,n){const{latestValues:i}=e;i[t]&&(s[t]=i[t],e.setStaticValue(t,0),n&&(n[t]=0))}function ju(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=Oc(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",k,!(i||o))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&ju(n)}function Fu({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=A0++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>
vendor: 34,249 bytes, line 9
9{this.projectionUpdateScheduled=!1,this.nodes.forEach(M0),this.nodes.forEach(L0),this.nodes.forEach(k0),this.nodes.forEach($0)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new f0)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ii),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=u0(r),this.instance=r;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=d0(f,250),os.hasAnimatedSinceResize&&(os.hasAnimatedSinceResize=!1,this.nodes.forEach(Pa))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||I0,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),x=!this.targetLayout||!ku(this.targetLayout,p),T=!f&&d;if(this.options.layoutRoot||this.resumeFrom||T||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,T);const V={...Fi(g,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else f||Pa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,bt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(j0),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ju(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ba);return}this.isUpdating||this.nodes.forEach(R0),this.isUpdating=!1,this.nodes.forEach(E0),this.nodes.forEach(V0),this.nodes.forEach(C0),this.clearAllSnapshots();const a=dt.now();K.delta=yt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Ks.update.process(K),Ks.preRender.process(K),Ks.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(D0),this.sharedNodes.forEach(F0)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!q(this.snapshot.measuredBox.x)&&!q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=N(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Lu(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&(a||Lt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),N0(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return N();const a=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(U0))){const{scroll:c}=this.root;c&&(qt(a.x,c.offset.x),qt(a.y,c.offset.y))}return a}removeElementScroll(r){var l;const a=N();if(tt(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&tt(a,r),qt(a.x,h.offset.x),qt(a.y,h.offset.y))}return a}applyTransform(r,a=!1){const l=N();tt(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Zt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Lt(c.latestValues)&&Zt(l,c.latestValues)}return Lt(this.latestValues)&&Zt(l,this.latestValues),l}removeTransform(r){const a=N();tt(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Lt(u.latestValues))continue;kn(u.latestValues)&&u.updateSnapshot();const c=N(),h=u.measurePageBox();tt(c,h),ga(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Lt(this.latestValues)&&ga(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}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}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),Se(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=N(),this.targetWithTransforms=N()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kv(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tt(this.target,this.layout.layoutBox),Au(this.target,this.targetDelta)):tt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),Se(this.relativeTargetOrigin,this.target,d.target),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||kn(this.parent.latestValues)||Pu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var p;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===K.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;tt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;zv(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=N());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(da(this.prevProjectionDelta.x,this.projectionDelta.x),da(this.prevProjectionDelta.y,this.projectionDelta.y)),Te(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Sa(this.projectionDelta.x,this.prevProjectionDelta.x)||!Sa(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yt(),this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=N(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=d!==p,y=this.getStack(),m=!y||y.members.length<=1,x=!!(g&&!m&&this.options.crossfade===!0&&!this.path.some(O0));this.animationProgress=0;let T;this.mixTargetDelta=V=>{const S=V/1e3;Aa(h.x,r.x,S),Aa(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Se(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),B0(this.relativeTarget,this.relativeTargetOrigin,f,S),T&&S0(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=N()),tt(T,this.relativeTarget)),g&&(this.animationValues=c,m0(c,u,this.latestValues,S,x,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{os.hasAnimatedSinceResize=!0,this.currentAnimation=c0(0,wa,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wa),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Bu(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||N();const h=q(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=q(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}tt(a,l),Zt(a,c),Te(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new w0),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Zs("z",r,u,this.animationValues);for(let c=0;c<qs.length;c++)Zs(`rotate${qs[c]}`,r,u,this.animationValues),Zs(`skew${qs[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return P0;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=is(r==null?void 0:r.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=is(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!Lt(this.latestValues)&&(d.transform=l?l({},""):"none",this.hasProjected=!1),d}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=b0(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:h,y:f}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Ee){if(c[d]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:y}=Ee[d],m=a.transform==="none"?c[d]:p(c[d],u);if(g){const x=g.length;for(let T=0;T<x;T++)a[g[T]]=m}else y?this.options.visualElement.renderState.vars[d]=m:a[d]=m}return this.options.layoutId&&(a.pointerEvents=u===this?is(r==null?void 0:r.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ba),this.root.sharedNodes.clear()}}}function V0(t){t.updateLayout()}function C0(t){var s;const e=((s=t.resumeFrom)==null?void 0:s.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?st(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=q(f);f.min=n[h].min,f.max=f.min+d}):Bu(o,e.layoutBox,n)&&st(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=q(n[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=Yt();Te(a,n,e.layoutBox);const l=Yt();r?Te(l,t.applyTransform(i,!0),e.measuredBox):Te(l,n,e.layoutBox);const u=!Lu(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=N();Se(p,e.layoutBox,f.layoutBox);const g=N();Se(g,n,d.layoutBox),ku(p,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function M0(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $0(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function D0(t){t.clearSnapshot()}function ba(t){t.clearMeasurements()}function R0(t){t.isLayoutDirty=!1}function E0(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function L0(t){t.resolveTargetDelta()}function k0(t){t.calcProjection()}function j0(t){t.resetSkewAndRotation()}function F0(t){t.removeLeadSnapshot()}function Aa(t,e,s){t.translate=F(e.translate,0,s),t.scale=F(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function Va(t,e,s,n){t.min=F(e.min,s.min,n),t.max=F(e.max,s.max,n)}function B0(t,e,s,n){Va(t.x,e.x,s.x,n),Va(t.y,e.y,s.y,n)}function O0(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const I0={duration:.45,ease:[.4,0,.1,1]},Ca=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ma=Ca("applewebkit/")&&!Ca("chrome/")?Math.round:it;function $a(t){t.min=Ma(t.min),t.max=Ma(t.max)}function N0(t){$a(t.x),$a(t.y)}function Bu(t,e,s){return t==="position"||t==="preserve-aspect"&&!Wv(Ta(e),Ta(s),.2)}function U0(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const W0=Fu({attachResizeListener:(t,e)=>Ie(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Js={current:void 0},Ou=Fu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Js.current){const t=new W0({});t.mount(window),t.setOptions({layoutScroll:!0}),Js.current=t}return Js.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),K0={pan:{Feature:r0},drag:{Feature:i0,ProjectionNode:Ou,MeasureLayout:Du}};function z0(t,e,s){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let n=document;const i=(s==null?void 0:s[t])??n.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Iu(t,e){const s=z0(t),n=new AbortController,i={passive:!0,...e,signal:n.signal};return[s,i,()=>n.abort()]}function Da(t){return!(t.pointerType==="touch"||Tu())}function _0(t,e,s={}){const[n,i,o]=Iu(t,s),r=a=>{if(!Da(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{Da(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return n.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}function Ra(t,e,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover",s==="Start");const i="onHover"+s,o=n[i];o&&k.postRender(()=>o(e,Ge(e)))}class H0 extends Vt{mount(){const{current:e}=this.node;e&&(this.unmount=_0(e,(s,n)=>(Ra(this.node,n,"Start"),i=>Ra(this.node,i,"End"))))}unmount(){}}class G0 extends Vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=He(Ie(this.node.current,"focus",()=>this.onFocus()),Ie(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Nu=(t,e)=>e?t===e?!0:Nu(t,e.parentElement):!1,X0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Y0(t){return X0.has(t.tagName)||t.tabIndex!==-1}const de=new WeakSet;function Ea(t){return e=>{e.key==="Enter"&&t(e)}}function Qs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const q0=(t,e)=>{const s=t.currentTarget;if(!s)return;const n=Ea(()=>{if(de.has(s))return;Qs(s,"down");const i=Ea(()=>{Qs(s,"up")}),o=()=>Qs(s,"cancel");s.addEventListener("keyup",i,e),s.addEventListener("blur",o,e)});s.addEventListener("keydown",n,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),e)};function La(t){return Ji(t)&&!Tu()}function Z0(t,e,s={}){const[n,i,o]=Iu(t,s),r=a=>{const l=a.currentTarget;if(!La(a)||de.has(l))return;de.add(l);const u=e(l,a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!La(d)||!de.has(l))&&(de.delete(l),typeof u=="function"&&u(d,{success:p}))},h=d=>{c(d,l===window||l===document||s.useGlobalTarget||Nu(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a instanceof HTMLElement&&(a.addEventListener("focus",u=>q0(u,i)),!Y0(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ka(t,e,s){const{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap",s==="Start");const i="onTap"+(s==="End"?"":s),o=n[i];o&&k.postRender(()=>o(e,Ge(e)))}class J0 extends Vt{mount(){const{current:e}=this.node;e&&(this.unmount=Z0(e,(s,n)=>(ka(this.node,n,"Start"),(i,{success:o})=>ka(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bn=new WeakMap,tn=new WeakMap,Q0=t=>{const e=Bn.get(t.target);e&&e(t)},tx=t=>{t.forEach(Q0)};function ex({root:t,...e}){const s=t||document;tn.has(s)||tn.set(s,{});const n=tn.get(s),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(tx,{root:t,...e})),n[i]}function sx(t,e,s){const n=ex(e);return Bn.set(t,s),n.observe(t),()=>{Bn.delete(t),n.unobserve(t)}}const nx={some:0,all:1};class ix extends Vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:s,margin:n,amount:i="some",once:o}=e,r={root:s?s.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:nx[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return sx(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:s}=this.node;["amount","margin","root"].some(rx(e,s))&&this.startObserver()}unmount(){}}function rx({viewport:t={}},{viewport:e={}}={}){return s=>t[s]!==e[s]}const ox={inView:{Feature:ix},tap:{Feature:J0},focus:{Feature:G0},hover:{Feature:H0}},ax={layout:{ProjectionNode:Ou,MeasureLayout:Du}},On={current:null},Uu={current:!1};function lx(){if(Uu.current=!0,!!Ti)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>On.current=t.matches;t.addListener(e),e()}else On.current=!1}const cx=[...cu,_,Pt],ux=t=>cx.find(lu(t)),hx=new WeakMap;function fx(t,e,s){for(const n in e){const i=e[n],o=s[n];if(X(i))t.addValue(n,i);else if(X(o))t.addValue(n,je(i,{owner:t}));else if(o!==i)if(t.hasValue(n)){const r=t.getValue(n);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(n);t.addValue(n,je(r!==void 0?r:i,{owner:t}))}}for(const n in s)e[n]===void 0&&t.removeValue(n);return e}const ja=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dx{scrapeMotionValuesFromProps(e,s,n){return{}}constructor({parent:e,props:s,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=dt.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,k.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=r;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=s.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=s,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Ms(s),this.isVariantNode=Sc(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&X(p)&&p.set(l[d],!1)}}mount(e){this.current=e,hx.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),Uu.current||lx(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:On.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}bindToMotionValue(e,s){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Ut.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=s.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=s.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),s.owner&&s.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in te){const s=te[e];if(!s)continue;const{isEnabled:n,Feature:i}=s;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):N()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<ja.length;n++){const i=ja[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=fx(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.variantChildren.delete(e)}addValue(e,s){const n=this.values.get(e);s!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&s!==void 0&&(n=je(s===null?void 0:s,{owner:this}),this.addValue(e,n)),n}readValue(e,s){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(ou(n)||qc(n))?n=parseFloat(n):!ux(n)&&Pt.test(s)&&(n=nu(e,s)),this.setBaseTarget(e,X(n)?n.get():n)),X(n)?n.get():n}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){var o;const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const r=ki(this.props,s,(o=this.presenceContext)==null?void 0:o.custom);r&&(n=r[e])}if(s&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!X(i)?i:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Ii),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}}class Wu extends dx{constructor(){super(...arguments),this.KeyframeResolver=uu}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){return e.style?e.style[s]:void 0}removeValueFromRenderState(e,{vars:s,style:n}){delete s[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function px(t){return window.getComputedStyle(t)}class mx extends Wu{constructor(){super(...arguments),this.type="html",this.renderInstance=Ec}readValueFromInstance(e,s){if(Ut.has(s))return xy(e,s);{const n=px(e),i=(Vi(s)?n.getPropertyValue(s):n[s])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:s}){return Vu(e,s)}build(e,s,n){$i(e,s,n.transformTemplate)}scrapeMotionValuesFromProps(e,s,n){return ji(e,s,n)}}class gx extends Wu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=N,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Rc(this.current,this.renderState)}}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(Ut.has(s)){const n=su(s);return n&&n.default||0}return s=Lc.has(s)?s:Ai(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,n){return jc(e,s,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&k.postRender(this.updateDimensions)}
9build(e,s,n){Ei(e,s,this.isSVGTag,n.transformTemplate)}renderInstance(e,s,n,i){kc(e,s,n,i)}mount(e){this.isSVGTag=Li(e.tagName),super.mount(e)}}const yx=(t,e)=>Ri(t)?new gx(e):new mx(e,{allowProjection:t!==v.Fragment}),vx=Bg({...Lv,...ox,...K0,...ax},yx),xx=Qm(vx),r1=({children:t,isFocused:e=!1,entryDelay:s=0})=>w.jsx(xx.div,{className:`${e?"absolute":"fixed"} lg:absolute top-0 left-0 z-40 w-full`,initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:s},children:t});export{r1 as B,Cx as H,n1 as M,Ba as S,gt as a,W as b,St as c,Ed as d,Ua as e,L as f,Wn as g,or as h,Dd as i,Q as j,Pe as m,nt as n,we as p,Vh as r,mh as s,Nn as u,za as v,Mx as w}; 10//# sourceMappingURL=BannerAndHeaderContainer-BEErMHV9.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.