vendor: 5,549 bytes, lines 1-9
1import{r as m,j as I}from"./vendor-react-BfATglas.js";import{i as ei,m as Gt,a as zt,t as X,b as Kt,g as on,n as rn,c as w,p as Q,d as W,e as _t,f as T,J as ni,A as ii,h as si,j as an,k as A,l as R,o as k,s as oi,q as pt,r as It,u as Xt,v as ri,w as ai,x as wt,y as ui,z as li,K as ci,B as hi,C as fi,D as di,E as mi,F as pi,G as gi,H as Dt,I as yi,L as vi}from"./vendor-motion-dom-DYeiCbo8.js";import{M as gt,s as ft,p as un,m as xi,a as kt,c as ln,n as K,b as cn,r as hn,d as Pi,S as fn,i as Si,e as Ti}from"./vendor-motion-utils-UsaZgHOw.js";const Yt=m.createContext({});function at(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const qt=typeof window<"u",Zt=qt?m.useLayoutEffect:m.useEffect,Pt=m.createContext(null),Y=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Vi extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=ei(i)&&i.offsetWidth||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ci({children:t,isPresent:e,anchorX:n}){const i=m.useId(),s=m.useRef(null),a=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=m.useContext(Y);return m.useInsertionEffect(()=>{const{width:r,height:l,top:c,left:u,right:h}=a.current;if(e||!s.current||!r||!l)return;const f=n==="left"?`left: ${u}`:`right: ${h}`;s.current.dataset.motionPopId=i;const d=document.createElement("style");return o&&(d.nonce=o),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` 2 [data-motion-pop-id="${i}"] { 3 position: absolute !important; 4 width: ${r}px !important; 5 height: ${l}px !important; 6 ${f}px !important; 7 top: ${c}px !important; 8 } 9 `),()=>{document.head.contains(d)&&document.head.removeChild(d)}},[e]),I.jsx(Vi,{isPresent:e,childRef:s,sizeRef:a,children:m.cloneElement(t,{ref:s})})}const Ai=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:a,mode:o,anchorX:r})=>{const l=at(wi),c=m.useId();let u=!0,h=m.useMemo(()=>(u=!1,{id:c,initial:e,isPresent:n,custom:s,onExitComplete:f=>{l.set(f,!0);for(const d of l.values())if(!d)return;i&&i()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,i]);return a&&u&&(h={...h}),m.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[n]),m.useEffect(()=>{!n&&!l.size&&i&&i()},[n]),o==="popLayout"&&(t=I.jsx(Ci,{isPresent:n,anchorX:r,children:t})),I.jsx(Pt.Provider,{value:h,children:t})};function wi(){return new Map}function dn(t=!0){const e=m.useContext(Pt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,a=m.useId();m.useEffect(()=>{if(t)return s(a)},[t]);const o=m.useCallback(()=>t&&i&&i(a),[a,i,t]);return!n&&i?[!1,o]:[!0]}const ct=t=>t.key||"";function he(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const yr=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1,anchorX:r="left"})=>{const[l,c]=dn(o),u=m.useMemo(()=>he(t),[t]),h=o&&!l?[]:u.map(ct),f=m.useRef(!0),d=m.useRef(u),p=at(()=>new Map),[v,x]=m.useState(u),[g,P]=m.useState(u);Zt(()=>{f.current=!1,d.current=u;for(let V=0;V<g.length;V++){const C=ct(g[V]);h.includes(C)?p.delete(C):p.get(C)!==!0&&p.set(C,!1)}},[g,h.length,h.join("-")]);const y=[];if(u!==v){let V=[...u];for(let C=0;C<g.length;C++){const j=g[C],O=ct(j);h.includes(O)||(V.splice(C,0,j),y.push(j))}return a==="wait"&&y.length&&(V=y),P(he(V)),x(u),null}const{forceRender:L}=m.useContext(Yt);return I.jsx(I.Fragment,{children:g.map(V=>{const C=ct(V),j=o&&!l?!1:u===g||h.includes(C),O=()=>{if(p.has(C))p.set(C,!0);else return;let q=!0;p.forEach(lt=>{lt||(q=!1)}),q&&(L==null||L(),P(d.current),o&&(c==null||c()),i&&i())};return I.jsx(Ai,{isPresent:j,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:a,onExitComplete:j?void 0:O,anchorX:r,children:V},C)})})},mn=m.createContext({strict:!1}),fe={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"]},_={};for(const t in fe)_[t]={isEnabled:e=>fe[t].some(n=>!!e[n])};function Di(t){for(const e in t)_[e]={..._[e],...t[e]}}const Mi=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 yt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mi.has(t)}let pn=t=>!yt(t);function Ri(t){t&&(pn=e=>e.startsWith("on")?!yt(e):t(e))}try{Ri(require("@emotion/is-prop-valid").default)}catch{}function Li(t,e,n){const i={};for(const s in t)s==="values"&&typeof t.values=="object"||(pn(s)||n===!0&&yt
vendor: 70,543 bytes, line 9
9(s)||!e&&!yt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function bi(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...i)=>t(...i);return new Proxy(n,{get:(i,s)=>s==="create"?t:(e.has(s)||e.set(s,t(s)),e.get(s))})}const St=m.createContext({});function Tt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function it(t){return typeof t=="string"||Array.isArray(t)}const Jt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Qt=["initial",...Jt];function Vt(t){return Tt(t.animate)||Qt.some(e=>it(t[e]))}function gn(t){return!!(Vt(t)||t.variants)}function Ei(t,e){if(Vt(t)){const{initial:n,animate:i}=t;return{initial:n===!1||it(n)?n:void 0,animate:it(i)?i:void 0}}return t.inherit!==!1?e:{}}function ji(t){const{initial:e,animate:n}=Ei(t,m.useContext(St));return m.useMemo(()=>({initial:e,animate:n}),[de(e),de(n)])}function de(t){return Array.isArray(t)?t.join(" "):t}const Bi=Symbol.for("motionComponentSymbol");function $(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ii(t,e,n){return m.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):$(n)&&(n.current=i))},[e])}const te=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ki="framerAppearId",yn="data-"+te(ki),vn=m.createContext({});function Fi(t,e,n,i,s){var v,x;const{visualElement:a}=m.useContext(St),o=m.useContext(mn),r=m.useContext(Pt),l=m.useContext(Y).reducedMotion,c=m.useRef(null);i=i||o.renderer,!c.current&&i&&(c.current=i(t,{visualState:e,parent:a,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=m.useContext(vn);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&Oi(c.current,n,s,h);const f=m.useRef(!1);m.useInsertionEffect(()=>{u&&f.current&&u.update(n,r)});const d=n[yn],p=m.useRef(!!d&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,d))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,d)));return Zt(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Gt.render(u.render),p.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,d)}),p.current=!1))}),u}function Oi(t,e,n,i){const{layoutId:s,layout:a,drag:o,dragConstraints:r,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:xn(t.parent)),t.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||r&&$(r),visualElement:t,animationType:typeof a=="string"?a:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:l,layoutRoot:c})}function xn(t){if(t)return t.options.allowProjection!==!1?t.projection:xn(t.parent)}function Ui({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:s}){t&&Di(t);function a(r,l){let c;const u={...m.useContext(Y),...r,layoutId:Ni(r)},{isStatic:h}=u,f=ji(r),d=i(r,h);if(!h&&qt){Wi();const p=$i(u);c=p.MeasureLayout,f.visualElement=Fi(s,d,u,e,p.ProjectionNode)}return I.jsxs(St.Provider,{value:f,children:[c&&f.visualElement?I.jsx(c,{visualElement:f.visualElement,...u}):null,n(s,r,Ii(d,f.visualElement,l),d,h,f.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${s.displayName??s.name??""})`}`;const o=m.forwardRef(a);return o[Bi]=s,o}function Ni({layoutId:t}){const e=m.useContext(Yt).id;return e&&t!==void 0?e+"-"+t:t}function Wi(t,e){m.useContext(mn).strict}function $i(t){const{drag:e,layout:n}=_;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const st={};function Hi(t){for(const e in t)st[e]=t[e],zt(e)&&(st[e].isCSSVariable=!0)}function Pn(t,{layout:e,layoutId:n}){return X.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!st[t]||t==="opacity")}const Gi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zi=Kt.length;function Ki(t,e,n){let i="",s=!0;for(let a=0;a<zi;a++){const o=Kt[a],r=t[o];if(r===void 0)continue;let l=!0;if(typeof r=="number"?l=r===(o.startsWith("scale")?1:0):l=parseFloat(r)===0,!l||n){const c=on(r,rn[o]);if(!l){s=!1;const u=Gi[o]||o;i+=`${u}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function ee(t,e,n){const{style:i,vars:s,transformOrigin:a}=t;let o=!1,r=!1;for(const l in e){const c=e[l];if(X.has(l)){o=!0;continue}else if(zt(l)){s[l]=c;continue}else{const u=on(c,rn[l]);l.startsWith("origin")?(r=!0,a[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=Ki(e,t.transform,n):i.transform&&(i.transform="none")),r){const{originX:l="50%",originY:c="50%",originZ:u=0}=a;i.transformOrigin=`${l} ${c} ${u}`}}const ne=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sn(t,e,n){for(const i in e)!w(e[i])&&!Pn(i,n)&&(t[i]=e[i])}function _i({transformTemplate:t},e){return m.useMemo(()=>{const n=ne();return ee(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Xi(t,e){const n=t.style||{},i={};return Sn(i,n,t),Object.assign(i,_i(t,e)),i}function Yi(t,e){const n={},i=Xi(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const qi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zi={offset:"strokeDashoffset",array:"strokeDasharray"};function Ji(t,e,n=1,i=0,s=!0){t.pathLength=1;const a=s?qi:Zi;t[a.offset]=Q.transform(-i);const o=Q.transform(e),r=Q.transform(n);t[a.array]=`${o} ${r}`}function Tn(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:a=1,pathOffset:o=0,...r},l,c,u){if(ee(t,r,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Ji(h,s,a,o,!1)}const Vn=()=>({...ne(),attrs:{}}),Cn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Qi(t,e,n,i){const s=m.useMemo(()=>{const a=Vn();return Tn(a,e,Cn(i),t.transformTemplate,t.style),{...a.attrs,style:{...a.style}}},[e]);if(t.style){const a={};Sn(a,t.style,t),s.style={...a,...s.style}}return s}const ts=["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 ie(t){return typeof t!="string"||t.includes("-")?!1:!!(ts.indexOf(t)>-1||/[A-Z]/u.test(t))}function es(t=!1){return(n,i,s,{latestValues:a},o)=>{const l=(ie(n)?Qi:Yi)(i,a,o,n),c=Li(i,typeof n=="string",t),u=n!==m.Fragment?{...c,...l,ref:s}:{},{children:h}=i,f=m.useMemo(()=>w(h)?h.get():h,[h]);return m.createElement(n,{...u,children:f})}}function me(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function se(t,e,n,i){if(typeof e=="function"){const[s,a]=me(i);e=e(n!==void 0?n:t.custom,s,a)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,a]=me(i);e=e(n!==void 0?n:t.custom,s,a)}return e}function dt(t){return w(t)?t.get():t}function ns({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,s){return{latestValues:is(n,i,s,t),renderState:e()}}const An=t=>(e,n)=>{const i=m.useContext(St),s=m.useContext(Pt),a=()=>ns(t,e,i,s);return n?a():at(a)};function is(t,e,n,i){const s={},a=i(t,{});for(const f in a)s[f]=dt(a[f]);let{initial:o,animate:r}=t;const l=Vt(t),c=gn(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),r===void 0&&(r=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?r:o;if(h&&typeof h!="boolean"&&!Tt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=se(t,f[d]);if(p){const{transitionEnd:v,transition:x,...g}=p;for(const P in g){let y=g[P];if(Array.isArray(y)){const L=u?y.length-1:0;y=y[L]}y!==null&&(s[P]=y)}for(const P in v)s[P]=v[P]}}}return s}function oe(t,e,n){var a;const{style:i}=t,s={};for(const o in i)(w(i[o])||e.style&&w(e.style[o])||Pn(o,t)||((a=n==null?void 0:n.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(s[o]=i[o]);return s}const ss={useVisualState:An({scrapeMotionValuesFromProps:oe,createRenderState:ne})};function wn(t,e,n){const i=oe(t,e,n);for(const s in t)if(w(t[s])||w(e[s])){const a=Kt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[a]=t[s]}return i}const os={useVisualState:An({scrapeMotionValuesFromProps:wn,createRenderState:Vn})};function rs(t,e){return function(i,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...ie(i)?os:ss,preloadedFeatures:t,useRender:es(s),createVisualElement:e,Component:i};return Ui(o)}}function ot(t,e,n){const i=t.getProps();return se(i,e,n!==void 0?n:i.custom,t)}const Ft=t=>Array.isArray(t);function as(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,W(n))}function us(t){return Ft(t)?t[t.length-1]||0:t}function ls(t,e){const n=ot(t,e);let{transitionEnd:i={},transition:s={},...a}=n||{};a={...a,...i};for(const o in a){const r=us(a[o]);as(t,o,r)}}function cs(t){return!!(w(t)&&t.add)}function Ot(t,e){const n=t.getValue("willChange");if(cs(n))return n.add(e);if(!n&>.WillChange){const i=new gt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Dn(t){return t.props[yn]}const hs=t=>t!==null;function fs(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(hs),a=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[a]}const ds={type:"spring",stiffness:500,damping:25,restSpeed:10},ms=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ps={type:"keyframes",duration:.8},gs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ys=(t,{keyframes:e})=>e.length>2?ps:X.has(t)?t.startsWith("scale")?ms(e[1]):ds:gs;function vs({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:r,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const re=(t,e,n,i={},s,a)=>o=>{const r=_t(i,t)||{},l=r.delay||i.delay||0;let{elapsed:c=0}=i;c=c-ft(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...r,delay:-c,onUpdate:f=>{e.set(f),r.onUpdate&&r.onUpdate(f)},onComplete:()=>{o(),r.onComplete&&r.onComplete()},name:t,motionValue:e,element:a?void 0:s};vs(r)||Object.assign(u,ys(t,u)),u.duration&&(u.duration=ft(u.duration)),u.repeatDelay&&(u.repeatDelay=ft(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),(gt.instantAnimations||gt.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),u.allowFlatten=!r.type&&!r.ease,h&&!a&&e.get()!==void 0){const f=fs(u.keyframes,r);if(f!==void 0){T.update(()=>{u.onUpdate(f),u.onComplete()});return}}return r.isSync?new ni(u):new ii(u)};function xs({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Mn(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:a=t.getDefaultTransition(),transitionEnd:o,...r}=e;i&&(a=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const u in r){const h=t.getValue(u,t.latestValues[u]??null),f=r[u];if(f===void 0||c&&xs(c,u))continue;const d={delay:n,..._t(a||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===p&&!d.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const g=Dn(t);if(g){const P=window.MotionHandoffAnimation(g,u,T);P!==null&&(d.startTime=P,v=!0)}}Ot(t,u),h.start(re(u,h,f,t.shouldReduceMotion&&si.has(u)?{type:!1}:d,t,v));const x=h.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{T.update(()=>{o&&ls(t,o)})}),l}function Ut(t,e,n={}){var l;const i=ot(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const a=i?()=>Promise.all(Mn(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=s;return Ps(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:r}=s;if(r){const[c,u]=r==="beforeChildren"?[a,o]:[o,a];return c().then(()=>u())}else return Promise.all([a(),o(n.delay)])}function Ps(t,e,n=0,i=0,s=1,a){const o=[],r=(t.variantChildren.size-1)*i,l=s===1?(c=0)=>c*i:(c=0)=>r-c*i;return Array.from(t.variantChildren).sort(Ss).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(Ut(c,e,{...a,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function Ss(t,e){return t.sortNodePosition(e)}function Ts(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(a=>Ut(t,a,n));i=Promise.all(s)}else if(typeof e=="string")i=Ut(t,e,n);else{const s=typeof e=="function"?ot(t,e,n.custom):e;i=Promise.all(Mn(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function Rn(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Vs=Qt.length;function Ln(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ln(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Vs;n++){const i=Qt[n],s=t.props[i];(it(s)||s===!1)&&(e[i]=s)}return e}const Cs=[...Jt].reverse(),As=Jt.length;function ws(t){return e=>Promise.all(e.map(({animation:n,options:i})=>Ts(t,n,i)))}function Ds(t){let e=ws(t),n=pe(),i=!0;const s=l=>(c,u)=>{var f;const h=ot(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:p,...v}=h;c={...c,...v,...p}}return c};function a(l){e=l(t)}function o(l){const{props:c}=t,u=Ln(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let x=0;x<As;x++){const g=Cs[x],P=n[g],y=c[g]!==void 0?c[g]:u[g],L=it(y),V=g===l?P.isActive:null;V===!1&&(p=x);let C=y===u[g]&&y!==c[g]&&L;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),P.protectedKeys={...d},!P.isActive&&V===null||!y&&!P.prevProp||Tt(y)||typeof y=="boolean")continue;const j=Ms(P.prevProp,y);let O=j||g===l&&P.isActive&&!C&&L||x>p&&L,q=!1;const lt=Array.isArray(y)?y:[y];let Z=lt.reduce(s(g),{});V===!1&&(Z={});const{prevResolvedValues:le={}}=P,ti={...le,...Z},ce=D=>{O=!0,f.has(D)&&(q=!0,f.delete(D)),P.needsAnimating[D]=!0;const B=t.getValue(D);B&&(B.liveStyle=!1)};for(const D in ti){const B=Z[D],Ct=le[D];if(d.hasOwnProperty(D))continue;let At=!1;Ft(B)&&Ft(Ct)?At=!Rn(B,Ct):At=B!==Ct,At?B!=null?ce(D):f.add(D):B!==void 0&&f.has(D)?ce(D):P.protectedKeys[D]=!0}P.prevProp=y,P.prevResolvedValues=Z,P.isActive&&(d={...d,...Z}),i&&t.blockInitialAnimation&&(O=!1),O&&(!(C&&j)||q)&&h.push(...lt.map(D=>({animation:D,options:{type:g}})))}if(f.size){const x={};if(typeof c.initial!="boolean"){const g=ot(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(x.transition=g.transition)}f.forEach(g=>{const P=t.getBaseTarget(g),y=t.getValue(g);y&&(y.liveStyle=!0),x[g]=P??null}),h.push({animation:x})}let v=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(v=!1),i=!1,v?e(h):Promise.resolve()}function r(l,c){var h;if(n[l].isActive===c)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:o,setActive:r,setAnimateFunction:a,getState:()=>n,reset:()=>{n=pe(),i=!0}}}function Ms(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Rn(e,t):!1}function U(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pe(){return{animate:U(!0),whileInView:U(),whileHover:U(),whileTap:U(),whileDrag:U(),whileFocus:U(),exit:U()}}class F{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Rs extends F{constructor(e){super(e),e.animationState||(e.animationState=Ds(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Tt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Ls=0;class bs extends F{constructor(){super(...arguments),this.id=Ls++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Es={animation:{Feature:Rs},exit:{Feature:bs}};function rt(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function ut(t){return{point:{x:t.pageX,y:t.pageY}}}const js=t=>e=>an(e)&&t(e,ut(e));function tt(t,e,n,i){return rt(t,e,js(n),i)}function bn({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bs({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Is(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}const En=1e-4,ks=1-En,Fs=1+En,jn=.01,Os=0-jn,Us=0+jn;function M(t){return t.max-t.min}function Ns(t,e,n){return Math.abs(t-e)<=n}function ge(t,e,n,i=.5){t.origin=i,t.originPoint=A(e.min,e.max,t.origin),t.scale=M(n)/M(e),t.translate=A(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ks&&t.scale<=Fs||isNaN(t.scale))&&(t.scale=1),(t.translate>=Os&&t.translate<=Us||isNaN(t.translate))&&(t.translate=0)}function et(t,e,n,i){ge(t.x,e.x,n.x,i?i.originX:void 0),ge(t.y,e.y,n.y,i?i.originY:void 0)}function ye(t,e,n){t.min=n.min+e.min,t.max=t.min+M(e)}function Ws(t,e,n){ye(t.x,e.x,n.x),ye(t.y,e.y,n.y)}function ve(t,e,n){t.min=e.min-n.min,t.max=t.min+M(e)}function nt(t,e,n){ve(t.x,e.x,n.x),ve(t.y,e.y,n.y)}const xe=()=>({translate:0,scale:1,origin:0,originPoint:0}),H=()=>({x:xe(),y:xe()}),Pe=()=>({min:0,max:0}),S=()=>({x:Pe(),y:Pe()});function E(t){return[t("x"),t("y")]}function Mt(t){return t===void 0||t===1}function Nt({scale:t,scaleX:e,scaleY:n}){return!Mt(t)||!Mt(e)||!Mt(n)}function N(t){return Nt(t)||Bn(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Bn(t){return Se(t.x)||Se(t.y)}function Se(t){return t&&t!=="0%"}function vt(t,e,n){const i=t-n,s=e*i;return n+s}function Te(t,e,n,i,s){return s!==void 0&&(t=vt(t,s,i)),vt(t,n,i)+e}function Wt(t,e=0,n=1,i,s){t.min=Te(t.min,e,n,i,s),t.max=Te(t.max,e,n,i,s)}function In(t,{x:e,y:n}){Wt(t.x,e.translate,e.scale,e.originPoint),Wt(t.y,n.translate,n.scale,n.originPoint)}const Ve=.999999999999,Ce=1.0000000000001;function $s(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let a,o;for(let r=0;r<s;r++){a=n[r],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&z(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,In(t,o)),i&&N(a.latestValues)&&z(t,a.latestValues))}e.x<Ce&&e.x>Ve&&(e.x=1),e.y<Ce&&e.y>Ve&&(e.y=1)}function G(t,e){t.min=t.min+e,t.max=t.max+e}function Ae(t,e,n,i,s=.5){const a=A(t.min,t.max,s);Wt(t,e,n,a,i)}function z(t,e){Ae(t.x,e.x,e.scaleX,e.scale,e.originX),Ae(t.y,e.y,e.scaleY,e.scale,e.originY)}function kn(t,e){return bn(Is(t.getBoundingClientRect(),e))}function Hs(t,e,n){const i=kn(t,n),{scroll:s}=e;return s&&(G(i.x,s.offset.x),G(i.y,s.offset.y)),i}const Fn=({current:t})=>t?t.ownerDocument.defaultView:null,we=(t,e)=>Math.abs(t-e);function Gs(t,e){const n=we(t.x,e.x),i=we(t.y,e.y);return Math.sqrt(n**2+i**2)}class On{constructor(e,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:a=!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=Lt(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Gs(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:v}=R;this.history.push({...p,timestamp:v});const{onStart:x,onMove:g}=this.handlers;f||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Rt(f,this.transformPagePoint),T.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Lt(h.type==="pointercancel"?this.lastMoveEventInfo:Rt(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,x),p&&p(h,x)},!an(e))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const o=ut(e),r=Rt(o,this.transformPagePoint),{point:l}=r,{timestamp:c}=R;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Lt(r,this.history)),this.removeListeners=un(tt(this.contextWindow,"pointermove",this.handlePointerMove),tt(this.contextWindow,"pointerup",this.handlePointerUp),tt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),k(this.updatePoint)}}function Rt(t,e){return e?{point:e(t.point)}:t}function De(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Lt({point:t},e){return{point:t,delta:De(t,Un(e)),offset:De(t,zs(e)),velocity:Ks(e,.1)}}function zs(t){return t[0]}function Un(t){return t[t.length-1]}function Ks(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Un(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>ft(e)));)n--;if(!i)return{x:0,y:0};const a=xi(s.timestamp-i.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-i.x)/a,y:(s.y-i.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _s(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?A(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?A(n,t,i.max):Math.min(t,n)),t}function Me(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Xs(t,{top:e,left:n,bottom:i,right:s}){return{x:Me(t.x,n,s),y:Me(t.y,e,i)}}function Re(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function Ys(t,e){return{x:Re(t.x,e.x),y:Re(t.y,e.y)}}function qs(t,e){let n=.5;const i=M(t),s=M(e);return s>i?n=kt(e.min,e.max-i,t.min):i>s&&(n=kt(t.min,t.max-s,e.min)),ln(0,1,n)}function Zs(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const $t=.35;function Js(t=$t){return t===!1?t=0:t===!0&&(t=$t),{x:Le(t,"left","right"),y:Le(t,"top","bottom")}}function Le(t,e,n){return{min:be(t,e),max:be(t,n)}}function be(t,e){return typeof t=="number"?t:t[e]||0}const Qs=new WeakMap;class to{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=S(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ut(u).point)},a=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oi(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),E(x=>{let g=this.getAxisMotionValue(x).get()||0;if(pt.test(g)){const{projection:P}=this.visualElement;if(P&&P.layout){const y=P.layout.layoutBox[x];y&&(g=M(y)*(parseFloat(g)/100))}}this.originPoint[x]=g}),p&&T.postRender(()=>p(u,h)),Ot(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=h;if(d&&this.currentDirection===null){this.currentDirection=eo(x),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),v&&v(u,h)},r=(u,h)=>this.stop(u,h),l=()=>E(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)==null?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new On(e,{onSessionStart:s,onStart:a,onMove:o,onSessionEnd:r,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Fn(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&T.postRender(()=>a(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!ht(e,s,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=_s(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,s=this.constraints;e&&$(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=Xs(i.layoutBox,e):this.constraints=!1,this.elastic=Js(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&E(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zs(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!$(e))return!1;const i=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=Hs(i,s.root,this.visualElement.getTransformPagePoint());let o=Ys(s.layout.layoutBox,a);if(n){const r=n(Bs(o));this.hasMutatedConstraints=!!r,r&&(o=bn(r))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),l=this.constraints||{},c=E(u=>{if(!ht(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,p={type:"inertia",velocity:i?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(r)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return Ot(this.visualElement,e),i.start(re(e,i,0,n,this.visualElement,!1))}stopAnimation(){E(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){E(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){E(n=>{const{drag:i}=this.getProps();if(!ht(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:r}=s.layout.layoutBox[n];a.set(e[n]-A(o,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!$(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};E(o=>{const r=this.getAxisMotionValue(o);if(r&&this.constraints!==!1){const l=r.get();s[o]=qs({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),E(o=>{if(!ht(o,e,null))return;const r=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];r.set(A(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;Qs.set(this.visualElement,this);const e=this.visualElement.current,n=tt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();$(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),T.read(i);const o=rt(window,"resize",()=>this.scalePositionWithinConstraints()),r=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(E(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=$t,dragMomentum:r=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:r}}}function ht(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function eo(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class no extends F{constructor(e){super(e),this.removeGroupControls=K,this.removeListeners=K,this.controls=new to(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ee=t=>(e,n)=>{t&&T.postRender(()=>t(e,n))};class io extends F{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(e){this.session=new On(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fn(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ee(e),onStart:Ee(n),onMove:i,onEnd:(a,o)=>{delete this.session,s&&T.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=tt(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 mt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function je(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const J={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Q.test(t))t=parseFloat(t);else return t;const n=je(t,e.target.x),i=je(t,e.target.y);return`${n}% ${i}%`}},so={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=It.parse(t);if(s.length>5)return i;const a=It.createTransformer(t),o=typeof s[0]!="number"?1:0,r=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=r,s[1+o]/=l;const c=A(r,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),a(s)}};class oo extends m.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:a}=e;Hi(ro),a&&(n.group&&n.group.add(a),i&&i.register&&s&&i.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),mt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:a}=this.props,{projection:o}=i;return o&&(o.isPresent=a,s||e.layoutDependency!==n||n===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||T.postRender(()=>{const r=o.getStack();(!r||!r.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Gt.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Nn(t){const[e,n]=dn(),i=m.useContext(Yt);return I.jsx(oo,{...t,layoutGroup:i,switchLayoutGroup:m.useContext(vn),isPresent:e,safeToRemove:n})}const ro={borderRadius:{...J,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:J,borderTopRightRadius:J,borderBottomLeftRadius:J,borderBottomRightRadius:J,boxShadow:so};function ao(t,e,n){const i=w(t)?t:W(t);return i.start(re("",i,e,n)),i.animation}const uo=(t,e)=>t.depth-e.depth;class lo{constructor(){this.children=[],this.isDirty=!1}add(e){cn(this.children,e),this.isDirty=!0}remove(e){hn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(uo),this.isDirty=!1,this.children.forEach(e)}}function co(t,e){const n=Xt.now(),i=({timestamp:s})=>{const a=s-n;a>=e&&(k(i),t(a-e))};return T.setup(i,!0),()=>k(i)}const Wn=["TopLeft","TopRight","BottomLeft","BottomRight"],ho=Wn.length,Be=t=>typeof t=="string"?parseFloat(t):t,Ie=t=>typeof t=="number"||Q.test(t);function fo(t,e,n,i,s,a){s?(t.opacity=A(0,n.opacity??1,mo(i)),t.opacityExit=A(e.opacity??1,0,po(i))):a&&(t.opacity=A(e.opacity??1,n.opacity??1,i));for(let o=0;o<ho;o++){const r=`border${Wn[o]}Radius`;let l=ke(e,r),c=ke(n,r);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ie(l)===Ie(c)?(t[r]=Math.max(A(Be(l),Be(c),i),0),(pt.test(c)||pt.test(l))&&(t[r]+="%")):t[r]=c}(e.rotate||n.rotate)&&(t.rotate=A(e.rotate||0,n.rotate||0,i))}function ke(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const mo=$n(0,.5,Pi),po=$n(.5,.95,K);function $n(t,e,n){return i=>i<t?0:i>e?1:n(kt(t,e,i))}function Fe(t,e){t.min=e.min,t.max=e.max}function b(t,e){Fe(t.x,e.x),Fe(t.y,e.y)}function Oe(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ue(t,e,n,i,s){return t-=e,t=vt(t,1/n,i),s!==void 0&&(t=vt(t,1/s,i)),t}function go(t,e=0,n=1,i=.5,s,a=t,o=t){if(pt.test(e)&&(e=parseFloat(e),e=A(o.min,o.max,e/100)-o.min),typeof e!="number")return;let r=A(a.min,a.max,i);t===a&&(r-=e),t.min=Ue(t.min,e,n,r,s),t.max=Ue(t.max,e,n,r,s)}function Ne(t,e,[n,i,s],a,o){go(t,e[n],e[i],e[s],e.scale,a,o)}const yo=["x","scaleX","originX"],vo=["y","scaleY","originY"];function We(t,e,n,i){Ne(t.x,e,yo,n?n.x:void 0,i?i.x:void 0),Ne(t.y,e,vo,n?n.y:void 0,i?i.y:void 0)}function $e(t){return t.translate===0&&t.scale===1}function Hn(t){return $e(t.x)&&$e(t.y)}function He(t,e){return t.min===e.min&&t.max===e.max}function xo(t,e){return He(t.x,e.x)&&He(t.y,e.y)}function Ge(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gn(t,e){return Ge(t.x,e.x)&&Ge(t.y,e.y)}function ze(t){return M(t.x)/M(t.y)}function Ke(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Po{constructor(){this.members=[]}add(e){cn(this.members,e),e.scheduleRender()}remove(e){if(hn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){i=a;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function So(t,e,n){let i="";const s=t.x.translate/e.x,a=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||a||o)&&(i=`translate3d(${s}px, ${a}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),p&&(i+=`skewY(${p}deg) `)}const r=t.x.scale*e.x,l=t.y.scale*e.y;return(r!==1||l!==1)&&(i+=`scale(${r}, ${l})`),i||"none"}const bt=["","X","Y","Z"],To={visibility:"hidden"},Vo=1e3;let Co=0;function Et(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function zn(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Dn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",T,!(s||a))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&zn(i)}function Kn({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},r=e==null?void 0:e()){this.id=Co++,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=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Do),this.nodes.forEach(Eo),this.nodes.forEach(jo),this.nodes.forEach(Mo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new lo)}addEventListener(o,r){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new fn),this.eventHandlers.get(o).add(r)}notifyListeners(o,...r){const l=this.eventHandlers.get(o);l&&l.notify(...r)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ri(o)&&!ai(o),this.instance=o;const{layoutId:r,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||r)&&(this.isLayoutDirty=!0),t){let u;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=co(h,250),mt.hasAnimatedSinceResize&&(mt.hasAnimatedSinceResize=!1,this.nodes.forEach(Xe))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&c&&(r||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Oo,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=c.getProps(),g=!this.targetLayout||!Gn(this.targetLayout,d),P=!h&&f;if(this.options.layoutRoot||this.resumeFrom||P||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={..._t(p,"layout"),onPlay:v,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(u,P)}else h||Xe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),k(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(Bo),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zn(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:r,layout:l}=this.options;if(r===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_e);return}this.isUpdating||this.nodes.forEach(Lo),this.isUpdating=!1,this.nodes.forEach(bo),this.nodes.forEach(Ao),this.nodes.forEach(wo),this.clearAllSnapshots();const r=Xt.now();R.delta=ln(0,1e3/60,r-R.timestamp),R.timestamp=r,R.isProcessing=!0,wt.update.process(R),wt.preRender.process(R),wt.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ro),this.sharedNodes.forEach(Io)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,T.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){T.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!M(this.snapshot.measuredBox.x)&&!M(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 o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=S(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:r}=this.options;r&&r.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let r=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(r=!1),r&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,r=this.projectionDelta&&!Hn(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(r||N(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const r=this.measurePageBox();let l=this.removeElementScroll(r);return o&&(l=this.removeTransform(l)),Uo(l),{animationId:this.root.animationId,measuredBox:r,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return S();const r=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(No))){const{scroll:u}=this.root;u&&(G(r.x,u.offset.x),G(r.y,u.offset.y))}return r}removeElementScroll(o){var l;const r=S();if(b(r,o),(l=this.scroll)!=null&&l.wasRoot)return r;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&b(r,o),G(r.x,h.offset.x),G(r.y,h.offset.y))}return r}applyTransform(o,r=!1){const l=S();b(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!r&&u.options.layoutScroll&&u.scroll&&u!==u.root&&z(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),N(u.latestValues)&&z(l,u.latestValues)}return N(this.latestValues)&&z(l,this.latestValues),l}removeTransform(o){const r=S();b(r,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!N(c.latestValues))continue;Nt(c.latestValues)&&c.updateSnapshot();const u=S(),h=c.measurePageBox();b(u,h),We(r,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return N(this.latestValues)&&We(r,this.latestValues),r}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const r=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=r.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=r.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=r.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==r;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=S(),this.relativeTargetOrigin=S(),nt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),b(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=S(),this.targetWithTransforms=S()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ws(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):b(this.target,this.layout.layoutBox),In(this.target,this.targetDelta)):b(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=S(),this.relativeTargetOrigin=S(),nt(this.relativeTargetOrigin,this.target,d.target),b(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Nt(this.parent.latestValues)||Bn(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 o=this.getLead(),r=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),r&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===R.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;b(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;$s(this.layoutCorrected,this.treeScale,this.path,r),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=S());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Oe(this.prevProjectionDelta.x,this.projectionDelta.x),Oe(this.prevProjectionDelta.y,this.projectionDelta.y)),et(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Ke(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ke(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var r;if((r=this.options.visualElement)==null||r.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=H(),this.projectionDelta=H(),this.projectionDeltaWithTransform=H()}setAnimationOrigin(o,r=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=H();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!r;const f=S(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,v=d!==p,x=this.getStack(),g=!x||x.members.length<=1,P=!!(v&&!g&&this.options.crossfade===!0&&!this.path.some(Fo));this.animationProgress=0;let y;this.mixTargetDelta=L=>{const V=L/1e3;Ye(h.x,o.x,V),Ye(h.y,o.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(nt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ko(this.relativeTarget,this.relativeTargetOrigin,f,V),y&&xo(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=S()),b(y,this.relativeTarget)),v&&(this.animationValues=u,fo(u,c,this.latestValues,V,P,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var r,l,c;this.notifyListeners("animationStart"),(r=this.currentAnimation)==null||r.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(k(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=T.update(()=>{mt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=W(0)),this.currentAnimation=ao(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Vo),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:r,target:l,layout:c,latestValues:u}=o;if(!(!r||!l||!c)){if(this!==o&&this.layout&&c&&_n(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||S();const h=M(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=M(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}b(r,l),z(r,u),et(this.projectionDeltaWithTransform,this.layoutCorrected,r,u)}}registerSharedNode(o,r){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Po),this.sharedNodes.get(o).add(r);const c=r.options.initialPromotionConfig;r.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(r):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var r;const{layoutId:o}=this.options;return o?((r=this.getStack())==null?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:o}=this.options;return o?(r=this.getStack())==null?void 0:r.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:r,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let r=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(r=!0),!r)return;const c={};l.z&&Et("z",o,c,this.animationValues);for(let u=0;u<bt.length;u++)Et(`rotate${bt[u]}`,o,c,this.animationValues),Et(`skew${bt[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return To;const r={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=dt(o==null?void 0:o.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none",r;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=dt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!N(this.latestValues)&&(d.transform=l?l({},""):"none",this.hasProjected=!1),d}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),r.transform=So(this.projectionDeltaWithTransform,this.treeScale,u),l&&(r.transform=l(u,r.transform));const{x:h,y:f}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const d in st){if(u[d]===void 0)continue;const{correct:p,applyTo:v,isCSSVariable:x}=st[d],g=r.transform==="none"?u[d]:p(u[d],c);if(v){const P=v.length;for(let y=0;y<P;y++)r[v[y]]=g}else x?this.options.visualElement.renderState.vars[d]=g:r[d]=g}return this.options.layoutId&&(r.pointerEvents=c===this?dt(o==null?void 0:o.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var r;return(r=o.currentAnimation)==null?void 0:r.stop()}),this.root.nodes.forEach(_e),this.root.sharedNodes.clear()}}}function Ao(t){t.updateLayout()}function wo(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:a}=t.options,o=e.source!==t.layout.source;a==="size"?E(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=M(f);f.min=i[h].min,f.max=f.min+d}):_n(a,e.layoutBox,i)&&E(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=M(i[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const r=H();et(r,i,e.layoutBox);const l=H();o?et(l,t.applyTransform(s,!0),e.measuredBox):et(l,i,e.layoutBox);const c=!Hn(r);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=S();nt(p,e.layoutBox,f.layoutBox);const v=S();nt(v,i,d.layoutBox),Gn(p,v)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=v,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:l,layoutDelta:r,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function Do(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 Mo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ro(t){t.clearSnapshot()}function _e(t){t.clearMeasurements()}function Lo(t){t.isLayoutDirty=!1}function bo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xe(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Eo(t){t.resolveTargetDelta()}function jo(t){t.calcProjection()}function Bo(t){t.resetSkewAndRotation()}function Io(t){t.removeLeadSnapshot()}function Ye(t,e,n){t.translate=A(e.translate,0,n),t.scale=A(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function qe(t,e,n,i){t.min=A(e.min,n.min,i),t.max=A(e.max,n.max,i)}function ko(t,e,n,i){qe(t.x,e.x,n.x,i),qe(t.y,e.y,n.y,i)}function Fo(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Oo={duration:.45,ease:[.4,0,.1,1]},Ze=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Je=Ze("applewebkit/")&&!Ze("chrome/")?Math.round:K;function Qe(t){t.min=Je(t.min),t.max=Je(t.max)}function Uo(t){Qe(t.x),Qe(t.y)}function _n(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ns(ze(e),ze(n),.2)}function No(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Wo=Kn({attachResizeListener:(t,e)=>rt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jt={current:void 0},Xn=Kn({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!jt.current){const t=new Wo({});t.mount(window),t.setOptions({layoutScroll:!0}),jt.current=t}return jt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),$o={pan:{Feature:io},drag:{Feature:no,ProjectionNode:Xn,MeasureLayout:Nn}};function tn(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,a=i[s];a&&T.postRender(()=>a(e,ut(e)))}class Ho extends F{mount(){const{current:e}=this.node;e&&(this.unmount=ui(e,(n,i)=>(tn(this.node,i,"Start"),s=>tn(this.node,s,"End"))))}unmount(){}}class Go extends F{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=un(rt(this.node.current,"focus",()=>this.onFocus()),rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function en(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),a=i[s];a&&T.postRender(()=>a(e,ut(e)))}class zo extends F{mount(){const{current:e}=this.node;e&&(this.unmount=li(e,(n,i)=>(en(this.node,i,"Start"),(s,{success:a})=>en(this.node,s,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ht=new WeakMap,Bt=new WeakMap,Ko=t=>{const e=Ht.get(t.target);e&&e(t)},_o=t=>{t.forEach(Ko)};function Xo({root:t,...e}){const n=t||document;Bt.has(n)||Bt.set(n,{});const i=Bt.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(_o,{root:t,...e})),i[s]}function Yo(t,e,n){const i=Xo(e);return Ht.set(t,n),i.observe(t),()=>{Ht.delete(t),i.unobserve(t)}}const qo={some:0,all:1};class Zo extends F{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:a}=e,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:qo[s]},r=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return Yo(this.node.current,o,r)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Jo(e,n))&&this.startObserver()}unmount(){}}function Jo({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Qo={inView:{Feature:Zo},tap:{Feature:zo},focus:{Feature:Go},hover:{Feature:Ho}},tr={layout:{ProjectionNode:Xn,MeasureLayout:Nn}},xt={current:null},ae={current:!1};function Yn(){if(ae.current=!0,!!qt)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xt.current=t.matches;t.addListener(e),e()}else xt.current=!1}const er=new WeakMap;function nr(t,e,n){for(const i in e){const s=e[i],a=n[i];if(w(s))t.addValue(i,s);else if(w(a))t.addValue(i,W(s,{owner:t}));else if(a!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,W(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const nn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ir{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:a,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ci,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 f=Xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,T.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=r,this.blockInitialAnimation=!!a,this.isControllingVariants=Vt(n),this.isVariantNode=gn(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&w(d)&&d.set(l[f],!1)}}mount(e){this.current=e,er.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((n,i)=>this.bindToMotionValue(i,n)),ae.current||Yn(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xt.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),k(this.notifyUpdate),k(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 n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=X.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&T.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),a(),o&&o(),n.owner&&n.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 _){const n=_[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):S()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<nn.length;i++){const s=nn[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=e[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=nr(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=W(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Si(i)||Ti(i))?i=parseFloat(i):!hi(i)&&It.test(n)&&(i=fi(e,n)),this.setBaseTarget(e,w(i)?i.get():i)),w(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var a;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=se(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);o&&(i=o[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!w(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new fn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class qn extends ir{constructor(){super(...arguments),this.KeyframeResolver=di}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;w(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Zn(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const a in n)t.style.setProperty(a,n[a])}function sr(t){return window.getComputedStyle(t)}class or extends qn{constructor(){super(...arguments),this.type="html",this.renderInstance=Zn}readValueFromInstance(e,n){var i;if(X.has(n))return(i=this.projection)!=null&&i.isProjecting?mi(n):pi(e,n);{const s=sr(e),a=(zt(n)?s.getPropertyValue(n):s[n])||0;
9return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:n}){return kn(e,n)}build(e,n,i){ee(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return oe(e,n,i)}}const Jn=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 rr(t,e,n,i){Zn(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Jn.has(s)?s:te(s),e.attrs[s])}class ar extends qn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=S}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(X.has(n)){const i=gi(n);return i&&i.default||0}return n=Jn.has(n)?n:te(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return wn(e,n,i)}build(e,n,i){Tn(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){rr(e,n,i,s)}mount(e){this.isSVGTag=Cn(e.tagName),super.mount(e)}}const ur=(t,e)=>ie(t)?new ar(e):new or(e,{allowProjection:t!==m.Fragment}),lr=rs({...Es,...Qo,...$o,...tr},ur),xr=bi(lr);function Qn(t){const e=at(()=>W(t)),{isStatic:n}=m.useContext(Y);if(n){const[,i]=m.useState(t);m.useEffect(()=>e.on("change",i),[])}return e}function ue(t,e){const n=Qn(e()),i=()=>n.set(e());return i(),Zt(()=>{const s=()=>T.preRender(i,!1,!0),a=t.map(o=>o.on("change",s));return()=>{a.forEach(o=>o()),k(i)}}),n}function Pr(t,...e){const n=t.length;function i(){let s="";for(let a=0;a<n;
9a++){s+=t[a];const o=e[a];o&&(s+=w(o)?o.get():o)}return s}return ue(e.filter(w),i)}function cr(t){Dt.current=[],t();const e=ue(Dt.current,t);return Dt.current=void 0,e}function hr(t,e,n,i){if(typeof t=="function")return cr(t);const s=typeof e=="function"?e:yi(e,n,i);return Array.isArray(t)?sn(t,s):sn([t],([a])=>s(a))}function sn(t,e){const n=at(()=>[]);return ue(t,()=>{n.length=0;const i=t.length;for(let s=0;s<i;s++)n[s]=t[s].get();return e(n)})}function Sr(t,e={}){const{isStatic:n}=m.useContext(Y),i=()=>w(t)?t.get():t;if(n)return hr(i);const s=Qn(i());return m.useInsertionEffect(()=>vi(s,t,e),[s,JSON.stringify(e)]),s}function Tr(t){const e=m.useRef(0),{isStatic:n}=m.useContext(Y);m.useEffect(()=>{if(n)return;const i=({timestamp:s,delta:a})=>{e.current||(e.current=s),t(s-e.current,a)};return T.update(i,!0),()=>k(i)},[t])}function Vr(){!ae.current&&Yn();const[t]=m.useState(xt.current);return t}export{yr as A,hr as a,Tr as b,Pr as c,Vr as d,xr as m,Sr as u}; 10//# sourceMappingURL=vendor-motion-CasvI0mg.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.