UNPKG

pkg-components

Version:
1 lines 101 kB
import{j as le}from"./jsx-runtime-DI8_P1Ft.js";import{r as b,R as ms}from"./index-DPzuYzxM.js";import{P as G}from"./index-B3IC6ylx.js";import{C as cn}from"./index-CoXI7PFH.js";import{C as Ni}from"./index-DzG_YAXo.js";const ps=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),te=b.createContext({}),ke=b.createContext(null),ee=typeof document<"u",Wi=ee?b.useLayoutEffect:b.useEffect,gs=b.createContext({strict:!1}),je=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Gi="framerAppearId",ys="data-"+je(Gi),vs={skipAnimations:!1,useManualTiming:!1};class un{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Hi(t){let e=new un,n=new un,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Ut=["prepare","read","update","preRender","render","postRender"],$i=40;function xs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Ut.reduce((h,f)=>(h[f]=Hi(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,$i),1),i.timestamp=h,i.isProcessing=!0,Ut.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Ut.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,y=!1)=>(n||l(),d.schedule(m,p,y)),h},{}),cancel:h=>Ut.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:Oe,cancel:ic}=xs(queueMicrotask,!1);function zi(t,e,n,s){const{visualElement:i}=b.useContext(te),o=b.useContext(gs),r=b.useContext(ke),a=b.useContext(ps).reducedMotion,l=b.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;b.useInsertionEffect(()=>{c&&c.update(n,r)});const u=b.useRef(!!(n[ys]&&!window.HandoffComplete));return Wi(()=>{c&&(Oe.postRender(c.render),u.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function pt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function _i(t,e,n){return b.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):pt(n)&&(n.current=s))},[e])}function Rt(t){return typeof t=="string"||Array.isArray(t)}function ne(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ie=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ue=["initial",...Ie];function se(t){return ne(t.animate)||Ue.some(e=>Rt(t[e]))}function Ps(t){return!!(se(t)||t.variants)}function Ki(t,e){if(se(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Rt(n)?n:void 0,animate:Rt(s)?s:void 0}}return t.inherit!==!1?e:{}}function qi(t){const{initial:e,animate:n}=Ki(t,b.useContext(te));return b.useMemo(()=>({initial:e,animate:n}),[hn(e),hn(n)])}function hn(t){return Array.isArray(t)?t.join(" "):t}const fn={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"]},Ft={};for(const t in fn)Ft[t]={isEnabled:e=>fn[t].some(n=>!!e[n])};function Xi(t){for(const e in t)Ft[e]={...Ft[e],...t[e]}}const Ts=b.createContext({}),bs=b.createContext({}),Yi=Symbol.for("motionComponentSymbol");function Zi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Xi(t);function o(a,l){let c;const u={...b.useContext(ps),...a,layoutId:Qi(a)},{isStatic:h}=u,f=qi(a),d=s(a,h);if(!h&&ee){f.visualElement=zi(i,d,u,e);const m=b.useContext(bs),p=b.useContext(gs).strict;f.visualElement&&(c=f.visualElement.loadFeatures(u,p,t,m))}return b.createElement(te.Provider,{value:f},c&&f.visualElement?b.createElement(c,{visualElement:f.visualElement,...u}):null,n(i,a,_i(d,f.visualElement,l),d,h,f.visualElement))}const r=b.forwardRef(o);return r[Yi]=i,r}function Qi({layoutId:t}){const e=b.useContext(Ts).id;return e&&t!==void 0?e+"-"+t:t}function Ji(t){function e(s,i={}){return Zi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const tr=["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 Ne(t){return typeof t!="string"||t.includes("-")?!1:!!(tr.indexOf(t)>-1||/[A-Z]/.test(t))}const _t={};function er(t){Object.assign(_t,t)}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ut=new Set(Bt);function Vs(t,{layout:e,layoutId:n}){return ut.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_t[t]||t==="opacity")}const O=t=>!!(t&&t.getVelocity),nr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sr=Bt.length;function ir(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<sr;r++){const a=Bt[r];if(t[a]!==void 0){const l=nr[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const Ss=t=>e=>typeof e=="string"&&e.startsWith(t),As=Ss("--"),Te=Ss("var(--"),rr=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,or=(t,e)=>e&&typeof t=="number"?e.transform(t):t,tt=(t,e,n)=>Math.min(Math.max(n,t),e),ht={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},wt={...ht,transform:t=>tt(0,1,t)},Nt={...ht,default:1},Dt=t=>Math.round(t*1e5)/1e5,ie=/(-)?([\d]*\.?[\d])+/g,Cs=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ar=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function kt(t){return typeof t=="string"}const jt=t=>({test:e=>kt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Z=jt("deg"),H=jt("%"),P=jt("px"),lr=jt("vh"),cr=jt("vw"),dn={...H,parse:t=>H.parse(t)/100,transform:t=>H.transform(t*100)},mn={...ht,transform:Math.round},ws={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,size:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,rotate:Z,rotateX:Z,rotateY:Z,rotateZ:Z,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:Z,skewX:Z,skewY:Z,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:wt,originX:dn,originY:dn,originZ:P,zIndex:mn,fillOpacity:wt,strokeOpacity:wt,numOctaves:mn};function We(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(As(h)){o[h]=f;continue}const d=ws[h],m=or(f,d);if(ut.has(h)){if(l=!0,r[h]=m,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=ir(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Ge=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ds(t,e,n){for(const s in e)!O(e[s])&&!Vs(s,n)&&(t[s]=e[s])}function ur({transformTemplate:t},e,n){return b.useMemo(()=>{const s=Ge();return We(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function hr(t,e,n){const s=t.style||{},i={};return Ds(i,s,t),Object.assign(i,ur(t,e,n)),i}function fr(t,e,n){const s={},i=hr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const dr=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 Kt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||dr.has(t)}let Ms=t=>!Kt(t);function mr(t){t&&(Ms=e=>e.startsWith("on")?!Kt(e):t(e))}try{mr(require("@emotion/is-prop-valid").default)}catch{}function pr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ms(i)||n===!0&&Kt(i)||!e&&!Kt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function pn(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function gr(t,e,n){const s=pn(e,t.x,t.width),i=pn(n,t.y,t.height);return`${s} ${i}`}const yr={offset:"stroke-dashoffset",array:"stroke-dasharray"},vr={offset:"strokeDashoffset",array:"strokeDasharray"};function xr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?yr:vr;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function He(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(We(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=gr(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&xr(d,r,a,l,!1)}const Ls=()=>({...Ge(),attrs:{}}),$e=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Pr(t,e,n,s){const i=b.useMemo(()=>{const o=Ls();return He(o,e,{enableHardwareAcceleration:!1},$e(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Ds(o,t.style,t),i.style={...o,...i.style}}return i}function Tr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Ne(n)?Pr:fr)(s,o,r,n),u={...pr(s,typeof n=="string",t),...l,ref:i},{children:h}=s,f=b.useMemo(()=>O(h)?h.get():h,[h]);return b.createElement(n,{...u,children:f})}}function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Fs=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 Es(t,e,n,s){Rs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Fs.has(i)?i:je(i),e.attrs[i])}function ze(t,e){const{style:n}=t,s={};for(const i in n)(O(n[i])||e.style&&O(e.style[i])||Vs(i,t))&&(s[i]=n[i]);return s}function Bs(t,e){const n=ze(t,e);for(const s in t)if(O(t[s])||O(e[s])){const i=Bt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function _e(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function br(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const qt=t=>Array.isArray(t),Vr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Sr=t=>qt(t)?t[t.length-1]||0:t;function Ht(t){const e=O(t)?t.get():t;return Vr(e)?e.toValue():e}function Ar({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Cr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const ks=t=>(e,n)=>{const s=b.useContext(te),i=b.useContext(ke),o=()=>Ar(t,e,s,i);return n?o():br(o)};function Cr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ht(o[f]);let{initial:r,animate:a}=t;const l=se(t),c=Ps(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!ne(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=_e(t,d);if(!m)return;const{transitionEnd:p,transition:y,...T}=m;for(const v in T){let g=T[v];if(Array.isArray(g)){const x=u?g.length-1:0;g=g[x]}g!==null&&(i[v]=g)}for(const v in p)i[v]=p[v]}),i}const R=t=>t,{schedule:D,cancel:X,state:B,steps:ce}=xs(typeof requestAnimationFrame<"u"?requestAnimationFrame:R,!0),wr={useVisualState:ks({scrapeMotionValuesFromProps:Bs,createRenderState:Ls,onMount:(t,e,{renderState:n,latestValues:s})=>{D.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),D.render(()=>{He(n,s,{enableHardwareAcceleration:!1},$e(e.tagName),t.transformTemplate),Es(e,n)})}})},Dr={useVisualState:ks({scrapeMotionValuesFromProps:ze,createRenderState:Ge})};function Mr(t,{forwardMotionProps:e=!1},n,s){return{...Ne(t)?wr:Dr,preloadedFeatures:n,useRender:Tr(e),createVisualElement:s,Component:t}}function _(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const js=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function re(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Lr=t=>e=>js(e)&&t(e,re(e));function K(t,e,n,s){return _(t,e,Lr(n),s)}const Rr=(t,e)=>n=>e(t(n)),J=(...t)=>t.reduce(Rr);function Os(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const gn=Os("dragHorizontal"),yn=Os("dragVertical");function Is(t){let e=!1;if(t==="y")e=yn();else if(t==="x")e=gn();else{const n=gn(),s=yn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Us(){const t=Is(!0);return t?(t(),!1):!0}class nt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.pointerType==="touch"||Us())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&D.update(()=>a[s](o,r))};return K(t.current,n,i,{passive:!t.getProps()[s]})}class Fr extends nt{mount(){this.unmount=J(vn(this.node,!0),vn(this.node,!1))}unmount(){}}class Er extends nt{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=J(_(this.node.current,"focus",()=>this.onFocus()),_(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ns=(t,e)=>e?t===e?!0:Ns(t,e.parentElement):!1;function ue(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,re(n))}class Br extends nt{constructor(){super(...arguments),this.removeStartListeners=R,this.removeEndListeners=R,this.removeAccessibleListeners=R,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=K(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps();D.update(()=>{!h&&!Ns(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(s.onTap||s.onPointerUp)}),r=K(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=J(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||ue("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&D.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=_(this.node.current,"keyup",r),ue("down",(a,l)=>{this.startPress(a,l)})},n=_(this.node.current,"keydown",e),s=()=>{this.isPressing&&ue("cancel",(o,r)=>this.cancelPress(o,r))},i=_(this.node.current,"blur",s);this.removeAccessibleListeners=J(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&D.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Us()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&D.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=K(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=_(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=J(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const be=new WeakMap,he=new WeakMap,kr=t=>{const e=be.get(t.target);e&&e(t)},jr=t=>{t.forEach(kr)};function Or({root:t,...e}){const n=t||document;he.has(n)||he.set(n,{});const s=he.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(jr,{root:t,...e})),s[i]}function Ir(t,e,n){const s=Or(e);return be.set(t,n),s.observe(t),()=>{be.delete(t),s.unobserve(t)}}const Ur={some:0,all:1};class Nr extends nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Ur[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!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 Ir(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Wr(e,n))&&this.startObserver()}unmount(){}}function Wr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Gr={inView:{Feature:Nr},tap:{Feature:Br},focus:{Feature:Er},hover:{Feature:Fr}};function Ws(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Hr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function $r(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function oe(t,e,n){const s=t.getProps();return _e(s,e,n!==void 0?n:s.custom,Hr(t),$r(t))}let Ke=R;const lt=t=>t*1e3,q=t=>t/1e3,zr={current:!1},Gs=t=>Array.isArray(t)&&typeof t[0]=="number";function Hs(t){return!!(!t||typeof t=="string"&&$s[t]||Gs(t)||Array.isArray(t)&&t.every(Hs))}const Ct=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,$s={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ct([0,.65,.55,1]),circOut:Ct([.55,0,1,.45]),backIn:Ct([.31,.01,.66,-.59]),backOut:Ct([.33,1.53,.69,.99])};function zs(t){if(t)return Gs(t)?Ct(t):Array.isArray(t)?t.map(zs):$s[t]}function _r(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=zs(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function Kr(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const _s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,qr=1e-7,Xr=12;function Yr(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=_s(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>qr&&++a<Xr);return r}function Ot(t,e,n,s){if(t===e&&n===s)return R;const i=o=>Yr(o,0,1,t,n);return o=>o===0||o===1?o:_s(i(o),e,s)}const Zr=Ot(.42,0,1,1),Qr=Ot(0,0,.58,1),Ks=Ot(.42,0,.58,1),Jr=t=>Array.isArray(t)&&typeof t[0]!="number",qs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Xs=t=>e=>1-t(1-e),qe=t=>1-Math.sin(Math.acos(t)),Ys=Xs(qe),to=qs(qe),Zs=Ot(.33,1.53,.69,.99),Xe=Xs(Zs),eo=qs(Xe),no=t=>(t*=2)<1?.5*Xe(t):.5*(2-Math.pow(2,-10*(t-1))),so={linear:R,easeIn:Zr,easeInOut:Ks,easeOut:Qr,circIn:qe,circInOut:to,circOut:Ys,backIn:Xe,backInOut:eo,backOut:Zs,anticipate:no},xn=t=>{if(Array.isArray(t)){Ke(t.length===4);const[e,n,s,i]=t;return Ot(e,n,s,i)}else if(typeof t=="string")return so[t];return t},Ye=(t,e)=>n=>!!(kt(n)&&ar.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Qs=(t,e,n)=>s=>{if(!kt(s))return s;const[i,o,r,a]=s.match(ie);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},io=t=>tt(0,255,t),fe={...ht,transform:t=>Math.round(io(t))},at={test:Ye("rgb","red"),parse:Qs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Dt(wt.transform(s))+")"};function ro(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ve={test:Ye("#"),parse:ro,transform:at.transform},gt={test:Ye("hsl","hue"),parse:Qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+H.transform(Dt(e))+", "+H.transform(Dt(n))+", "+Dt(wt.transform(s))+")"},j={test:t=>at.test(t)||Ve.test(t)||gt.test(t),parse:t=>at.test(t)?at.parse(t):gt.test(t)?gt.parse(t):Ve.parse(t),transform:t=>kt(t)?t:t.hasOwnProperty("red")?at.transform(t):gt.transform(t)},w=(t,e,n)=>-n*t+n*e+t;function de(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function oo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=de(l,a,t+1/3),o=de(l,a,t),r=de(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const me=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ao=[Ve,at,gt],lo=t=>ao.find(e=>e.test(t));function Pn(t){const e=lo(t);let n=e.parse(t);return e===gt&&(n=oo(n)),n}const Js=(t,e)=>{const n=Pn(t),s=Pn(e),i={...n};return o=>(i.red=me(n.red,s.red,o),i.green=me(n.green,s.green,o),i.blue=me(n.blue,s.blue,o),i.alpha=w(n.alpha,s.alpha,o),at.transform(i))};function co(t){var e,n;return isNaN(t)&&kt(t)&&(((e=t.match(ie))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Cs))===null||n===void 0?void 0:n.length)||0)>0}const ti={regex:rr,countKey:"Vars",token:"${v}",parse:R},ei={regex:Cs,countKey:"Colors",token:"${c}",parse:j.parse},ni={regex:ie,countKey:"Numbers",token:"${n}",parse:ht.parse};function pe(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function Xt(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&pe(n,ti),pe(n,ei),pe(n,ni),n}function si(t){return Xt(t).values}function ii(t){const{values:e,numColors:n,numVars:s,tokenised:i}=Xt(t),o=e.length;return r=>{let a=i;for(let l=0;l<o;l++)l<s?a=a.replace(ti.token,r[l]):l<s+n?a=a.replace(ei.token,j.transform(r[l])):a=a.replace(ni.token,Dt(r[l]));return a}}const uo=t=>typeof t=="number"?0:t;function ho(t){const e=si(t);return ii(t)(e.map(uo))}const et={test:co,parse:si,createTransformer:ii,getAnimatableNone:ho},ri=(t,e)=>n=>`${n>0?e:t}`;function oi(t,e){return typeof t=="number"?n=>w(t,e,n):j.test(t)?Js(t,e):t.startsWith("var(")?ri(t,e):li(t,e)}const ai=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>oi(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}},fo=(t,e)=>{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=oi(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},li=(t,e)=>{const n=et.createTransformer(e),s=Xt(t),i=Xt(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?J(ai(s.values,i.values),n):ri(t,e)},Et=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Tn=(t,e)=>n=>w(t,e,n);function mo(t){return typeof t=="number"?Tn:typeof t=="string"?j.test(t)?Js:li:Array.isArray(t)?ai:typeof t=="object"?fo:Tn}function po(t,e,n){const s=[],i=n||mo(t[0]),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]||R:e;a=J(l,a)}s.push(a)}return s}function ci(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ke(o===e.length),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=po(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=Et(t[u],t[u+1],c);return r[u](h)};return n?c=>l(tt(t[0],t[o-1],c)):l}function go(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Et(0,e,s);t.push(w(n,1,i))}}function yo(t){const e=[0];return go(e,t.length-1),e}function vo(t,e){return t.map(n=>n*e)}function xo(t,e){return t.map(()=>e||Ks).splice(0,t.length-1)}function Yt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Jr(s)?s.map(xn):xn(s),o={done:!1,value:e[0]},r=vo(n&&n.length===e.length?n:yo(e),t),a=ci(r,e,{ease:Array.isArray(i)?i:xo(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function ui(t,e){return e?t*(1e3/e):0}const Po=5;function hi(t,e,n){const s=Math.max(e-Po,0);return ui(n-t(s),e-s)}const ge=.001,To=.01,bo=10,Vo=.05,So=1;function Ao({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=tt(Vo,So,r),t=tt(To,bo,q(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=Se(c,r),m=Math.exp(-h);return ge-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),p=Se(Math.pow(c,2),r);return(-i(c)+ge>0?-1:1)*((f-d)*m)/p}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ge+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=wo(i,o,a);if(t=lt(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Co=12;function wo(t,e,n){let s=n;for(let i=1;i<Co;i++)s=s-t(s)/e(s);return s}function Se(t,e){return t*Math.sqrt(1-e*e)}const Do=["duration","bounce"],Mo=["stiffness","damping","mass"];function bn(t,e){return e.some(n=>t[n]!==void 0)}function Lo(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!bn(t,Mo)&&bn(t,Do)){const n=Ao(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function fi({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=Lo({...s,velocity:-q(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*c)),p=o-i,y=q(Math.sqrt(a/c)),T=Math.abs(p)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(m<1){const g=Se(y,m);v=x=>{const V=Math.exp(-m*y*x);return o-V*((d+m*y*p)/g*Math.sin(g*x)+p*Math.cos(g*x))}}else if(m===1)v=g=>o-Math.exp(-y*g)*(p+(d+y*p)*g);else{const g=y*Math.sqrt(m*m-1);v=x=>{const V=Math.exp(-m*y*x),F=Math.min(g*x,300);return o-V*((d+m*y*p)*Math.sinh(F)+g*p*Math.cosh(F))/g}}return{calculatedDuration:f&&u||null,next:g=>{const x=v(g);if(f)r.done=g>=u;else{let V=d;g!==0&&(m<1?V=hi(v,g,x):V=0);const F=Math.abs(V)<=n,A=Math.abs(o-x)<=e;r.done=F&&A}return r.value=r.done?o:x,r}}}function Vn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let p=n*e;const y=h+p,T=r===void 0?y:r(y);T!==y&&(p=T-h);const v=S=>-p*Math.exp(-S/s),g=S=>T+v(S),x=S=>{const M=v(S),$=g(S);f.done=Math.abs(M)<=c,f.value=f.done?T:$};let V,F;const A=S=>{d(f.value)&&(V=S,F=fi({keyframes:[f.value,m(f.value)],velocity:hi(g,S,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:S=>{let M=!1;return!F&&V===void 0&&(M=!0,x(S),A(S)),V!==void 0&&S>V?F.next(S-V):(!M&&x(S),f)}}}let $t;function Ro(){$t=void 0}const ct={now:()=>($t===void 0&&ct.set(B.isProcessing||vs.useManualTiming?B.timestamp:performance.now()),$t),set:t=>{$t=t,queueMicrotask(Ro)}},Fo=t=>{const e=({timestamp:n})=>t(n);return{start:()=>D.update(e,!0),stop:()=>X(e),now:()=>B.isProcessing?B.timestamp:ct.now()}},Sn=2e4;function An(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Sn;)e+=n,s=t.next(e);return e>=Sn?1/0:e}const Eo={decay:Vn,inertia:Vn,tween:Yt,keyframes:Yt,spring:fi};function Zt({autoplay:t=!0,delay:e=0,driver:n=Fo,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...f}){let d=1,m=!1,p,y;const T=()=>{y=new Promise(C=>{p=C})};T();let v;const g=Eo[i]||Yt;let x;g!==Yt&&typeof s[0]!="number"&&(x=ci([0,100],s,{clamp:!1}),s=[0,100]);const V=g({...f,keyframes:s});let F;a==="mirror"&&(F=g({...f,keyframes:[...s].reverse(),velocity:-(f.velocity||0)}));let A="idle",S=null,M=null,$=null;V.calculatedDuration===null&&o&&(V.calculatedDuration=An(V));const{calculatedDuration:ft}=V;let W=1/0,z=1/0;ft!==null&&(W=ft+r,z=W*(o+1)-r);let k=0;const dt=C=>{if(M===null)return;d>0&&(M=Math.min(M,C)),d<0&&(M=Math.min(C-z/d,M)),S!==null?k=S:k=Math.round(C-M)*d;const bt=k-e*(d>=0?1:-1),rn=d>=0?bt<0:bt>z;k=Math.max(bt,0),A==="finished"&&S===null&&(k=z);let on=k,an=V;if(o){const ae=Math.min(k,z)/W;let It=Math.floor(ae),st=ae%1;!st&&ae>=1&&(st=1),st===1&&It--,It=Math.min(It,o+1),!!(It%2)&&(a==="reverse"?(st=1-st,r&&(st-=r/W)):a==="mirror"&&(an=F)),on=tt(0,1,st)*W}const Vt=rn?{done:!1,value:s[0]}:an.next(on);x&&(Vt.value=x(Vt.value));let{done:ln}=Vt;!rn&&ft!==null&&(ln=d>=0?k>=z:k<=0);const Ui=S===null&&(A==="finished"||A==="running"&&ln);return h&&h(Vt.value),Ui&&Tt(),Vt},E=()=>{v&&v.stop(),v=void 0},Y=()=>{A="idle",E(),p(),T(),M=$=null},Tt=()=>{A="finished",u&&u(),E(),p()},mt=()=>{if(m)return;v||(v=n(dt));const C=v.now();l&&l(),S!==null?M=C-S:(!M||A==="finished")&&(M=C),A==="finished"&&T(),$=M,S=null,A="running",v.start()};t&&mt();const sn={then(C,bt){return y.then(C,bt)},get time(){return q(k)},set time(C){C=lt(C),k=C,S!==null||!v||d===0?S=C:M=v.now()-C/d},get duration(){const C=V.calculatedDuration===null?An(V):V.calculatedDuration;return q(C)},get speed(){return d},set speed(C){C===d||!v||(d=C,sn.time=q(k))},get state(){return A},play:mt,pause:()=>{A="paused",S=k},stop:()=>{m=!0,A!=="idle"&&(A="idle",c&&c(),Y())},cancel:()=>{$!==null&&dt($),Y()},complete:()=>{A="finished"},sample:C=>(M=0,dt(C))};return sn}function Bo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ko=Bo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),jo=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Wt=10,Oo=2e4,Io=(t,e)=>e.type==="spring"||t==="backgroundColor"||!Hs(e.ease);function Uo(t,e,{onUpdate:n,onComplete:s,...i}){if(!(ko()&&jo.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,l,c=!1;const u=()=>{l=new Promise(g=>{a=g})};u();let{keyframes:h,duration:f=300,ease:d,times:m}=i;if(Io(e,i)){const g=Zt({...i,repeat:0,delay:0});let x={done:!1,value:h[0]};const V=[];let F=0;for(;!x.done&&F<Oo;)x=g.sample(F),V.push(x.value),F+=Wt;m=void 0,h=V,f=F-Wt,d="linear"}const p=_r(t.owner.current,e,h,{...i,duration:f,ease:d,times:m}),y=()=>{c=!1,p.cancel()},T=()=>{c=!0,D.update(y),a(),u()};return p.onfinish=()=>{c||(t.set(Kr(h,i)),s&&s(),T())},{then(g,x){return l.then(g,x)},attachTimeline(g){return p.timeline=g,p.onfinish=null,R},get time(){return q(p.currentTime||0)},set time(g){p.currentTime=lt(g)},get speed(){return p.playbackRate},set speed(g){p.playbackRate=g},get duration(){return q(f)},play:()=>{r||(p.play(),X(y))},pause:()=>p.pause(),stop:()=>{if(r=!0,p.playState==="idle")return;const{currentTime:g}=p;if(g){const x=Zt({...i,autoplay:!1});t.setWithVelocity(x.sample(g-Wt).value,x.sample(g).value,Wt)}T()},complete:()=>{c||p.finish()},cancel:T}}function No({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:R,pause:R,stop:R,then:o=>(o(),Promise.resolve()),cancel:R,complete:R});return e?Zt({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Wo={type:"spring",stiffness:500,damping:25,restSpeed:10},Go=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ho={type:"keyframes",duration:.8},$o={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zo=(t,{keyframes:e})=>e.length>2?Ho:ut.has(t)?t.startsWith("scale")?Go(e[1]):Wo:$o,Ae=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(et.test(e)||e==="0")&&!e.startsWith("url(")),_o=new Set(["brightness","contrast","saturate","opacity"]);function Ko(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ie)||[];if(!s)return t;const i=n.replace(s,"");let o=_o.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const qo=/([a-z-]*)\(.*?\)/g,Ce={...et,getAnimatableNone:t=>{const e=t.match(qo);return e?e.map(Ko).join(" "):t}},Xo={...ws,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:Ce,WebkitFilter:Ce},Ze=t=>Xo[t];function di(t,e){let n=Ze(t);return n!==Ce&&(n=et),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const mi=t=>/^0[^.\s]+$/.test(t);function Yo(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||mi(t)}function Zo(t,e,n,s){const i=Ae(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const l=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?r:o[c-1]),Yo(o[c])&&l.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(a=o[c]);if(i&&l.length&&a)for(let c=0;c<l.length;c++){const u=l[c];o[u]=di(e,a)}return o}function Qo({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Qe(t,e){return t[e]||t.default||t}const Je=(t,e,n,s={})=>i=>{const o=Qe(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-lt(r);const l=Zo(e,t,n,o),c=l[0],u=l[l.length-1],h=Ae(t,c),f=Ae(t,u);let d={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:m=>{e.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Qo(o)||(d={...d,...zo(t,d)}),d.duration&&(d.duration=lt(d.duration)),d.repeatDelay&&(d.repeatDelay=lt(d.repeatDelay)),!h||!f||zr.current||o.type===!1||vs.skipAnimations)return No(d);if(!s.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const m=Uo(e,t,d);if(m)return m}return Zt(d)};function Qt(t){return!!(O(t)&&t.add)}const pi=t=>/^\-?\d*\.?\d+$/.test(t);function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function en(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class nn{constructor(){this.subscriptions=[]}add(e){return tn(this.subscriptions,e),()=>en(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Cn=30,Jo=t=>!isNaN(parseFloat(t));class ta{constructor(e,n={}){this.version="11.0.3",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=ct.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),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.canTrackVelocity=Jo(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ct.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new nn);const s=this.events[e].add(n);return e==="change"?()=>{s(),D.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Cn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Cn);return ui(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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 xt(t,e){return new ta(t,e)}const gi=t=>e=>e.test(t),ea={test:t=>t==="auto",parse:t=>t},yi=[ht,P,H,Z,cr,lr,ea],St=t=>yi.find(gi(t)),na=[...yi,j,et],sa=t=>na.find(gi(t));function ia(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xt(n))}function ra(t,e){const n=oe(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=Sr(o[r]);ia(t,r,a)}}function oa(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;a<r;a++){const l=o[a],c=e[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(s=n[l])!==null&&s!==void 0?s:t.readValue(l))!==null&&i!==void 0?i:e[l]),u!=null&&(typeof u=="string"&&(pi(u)||mi(u))?u=parseFloat(u):!sa(u)&&et.test(c)&&(u=di(l,c)),t.addValue(l,xt(u,{owner:t})),n[l]===void 0&&(n[l]=u),u!==null&&t.setBaseTarget(l,u))}}function aa(t,e){return e?(e[t]||e.default||e).from:void 0}function la(t,e,n){const s={};for(const i in t){const o=aa(i,e);if(o!==void 0)s[i]=o;else{const r=n.getValue(i);r&&(s[i]=r.get())}}return s}function ca({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ua(t,e){const n=t.get();if(Array.isArray(e)){for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}else return n!==e}function vi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h),d=a[h];if(!f||d===void 0||u&&ca(u,h))continue;const m={delay:n,elapsed:0,...Qe(o||{},h)};if(window.HandoffAppearAnimations){const T=t.getProps()[ys];if(T){const v=window.HandoffAppearAnimations(T,h,f,D);v!==null&&(m.elapsed=v,m.isHandoff=!0)}}let p=!m.isHandoff&&!ua(f,d);if(m.type==="spring"&&(f.getVelocity()||m.velocity)&&(p=!1),f.animation&&(p=!1),p)continue;f.start(Je(h,f,d,t.shouldReduceMotion&&ut.has(h)?{type:!1}:m));const y=f.animation;Qt(l)&&(l.add(h),y.then(()=>l.remove(h))),c.push(y)}return r&&Promise.all(c).then(()=>{r&&ra(t,r)}),c}function we(t,e,n={}){const s=oe(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(vi(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return ha(t,e,c+l,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function ha(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(fa).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(we(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function fa(t,e){return t.sortNodePosition(e)}function da(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>we(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=we(t,e,n);else{const i=typeof e=="function"?oe(t,e,n.custom):e;s=Promise.all(vi(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const ma=[...Ie].reverse(),pa=Ie.length;function ga(t){return e=>Promise.all(e.map(({animation:n,options:s})=>da(t,n,s)))}function ya(t){let e=ga(t);const n=xa();let s=!0;const i=(l,c)=>{const u=oe(t,c);if(u){const{transition:h,transitionEnd:f,...d}=u;l={...l,...d,...f}}return l};function o(l){e=l(t)}function r(l,c){const u=t.getProps(),h=t.getVariantContext(!0)||{},f=[],d=new Set;let m={},p=1/0;for(let T=0;T<pa;T++){const v=ma[T],g=n[v],x=u[v]!==void 0?u[v]:h[v],V=Rt(x),F=v===c?g.isActive:null;F===!1&&(p=T);let A=x===h[v]&&x!==u[v]&&V;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),g.protectedKeys={...m},!g.isActive&&F===null||!x&&!g.prevProp||ne(x)||typeof x=="boolean")continue;let M=va(g.prevProp,x)||v===c&&g.isActive&&!A&&V||T>p&&V,$=!1;const ft=Array.isArray(x)?x:[x];let W=ft.reduce(i,{});F===!1&&(W={});const{prevResolvedValues:z={}}=g,k={...z,...W},dt=E=>{M=!0,d.has(E)&&($=!0,d.delete(E)),g.needsAnimating[E]=!0};for(const E in k){const Y=W[E],Tt=z[E];if(m.hasOwnProperty(E))continue;let mt=!1;qt(Y)&&qt(Tt)?mt=!Ws(Y,Tt):mt=Y!==Tt,mt?Y!==void 0?dt(E):d.add(E):Y!==void 0&&d.has(E)?dt(E):g.protectedKeys[E]=!0}g.prevProp=x,g.prevResolvedValues=W,g.isActive&&(m={...m,...W}),s&&t.blockInitialAnimation&&(M=!1),M&&(!A||$)&&f.push(...ft.map(E=>({animation:E,options:{type:v,...l}})))}if(d.size){const T={};d.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(T[v]=g)}),f.push({animation:T})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?e(f):Promise.resolve()}function a(l,c,u){var h;if(n[l].isActive===c)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(d=>{var m;return(m=d.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=r(u,l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function va(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ws(e,t):!1}function it(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xa(){return{animate:it(!0),whileInView:it(),whileHover:it(),whileTap:it(),whileDrag:it(),whileFocus:it(),exit:it()}}class Pa extends nt{constructor(e){super(e),e.animationState||(e.animationState=ya(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ne(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ta=0;class ba extends nt{constructor(){super(...arguments),this.id=Ta++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Va={animation:{Feature:Pa},exit:{Feature:ba}},wn=(t,e)=>Math.abs(t-e);function Sa(t,e){const n=wn(t.x,e.x),s=wn(t.y,e.y);return Math.sqrt(n**2+s**2)}class xi{constructor(e,n,{transformPagePoint:s,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=ve(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Sa(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=B;this.history.push({...m,timestamp:p});const{onStart:y,onMove:T}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ye(f,this.transformPagePoint),D.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ve(h.type==="pointercancel"?this.lastMoveEventInfo:ye(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!js(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=re(e),a=ye(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ve(a,this.history)),this.removeListeners=J(K(this.contextWindow,"pointermove",this.handlePointerMove),K(this.contextWindow,"pointerup",this.handlePointerUp),K(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),X(this.updatePoint)}}function ye(t,e){return e?{point:e(t.point)}:t}function Dn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ve({point:t},e){return{point:t,delta:Dn(t,Pi(e)),offset:Dn(t,Aa(e)),velocity:Ca(e,.1)}}function Aa(t){return t[0]}function Pi(t){return t[t.length-1]}function Ca(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Pi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>lt(e)));)n--;if(!s)return{x:0,y:0};const o=q(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function I(t){return t.max-t.min}function De(t,e=0,n=.01){return Math.abs(t-e)<=n}function Mn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=I(n)/I(e),(De(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(De(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){Mn(t.x,e.x,n.x,s?s.originX:void 0),Mn(t.y,e.y,n.y,s?s.originY:void 0)}function Ln(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function wa(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function Rn(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function Lt(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function Da(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function Fn(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 Ma(t,{top:e,left:n,bottom:s,right:i}){return{x:Fn(t.x,n,i),y:Fn(t.y,e,s)}}function En(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function La(t,e){return{x:En(t.x,e.x),y:En(t.y,e.y)}}function Ra(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),tt(0,1,n)}function Fa(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 Me=.35;function Ea(t=Me){return t===!1?t=0:t===!0&&(t=Me),{x:Bn(t,"left","right"),y:Bn(t,"top","bottom")}}function Bn(t,e,n){return{min:kn(t,e),max:kn(t,n)}}function kn(t,e){return typeof t=="number"?t:t[e]||0}const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),yt=()=>({x:jn(),y:jn()}),On=()=>({min:0,max:0}),L=()=>({x:On(),y:On()});function N(t){return[t("x"),t("y")]}function Ti({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ba({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ka(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function xe(t){return t===void 0||t===1}function Le({scale:t,scaleX:e,scaleY:n}){return!xe(t)||!xe(e)||!xe(n)}function rt(t){return Le(t)||bi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function bi(t){return In(t.x)||In(t.y)}function In(t){return t&&t!=="0%"}function Jt(t,e,n){const s=t-n,i=e*s;return n+i}function Un(t,e,n,s,i){return i!==void 0&&(t=Jt(t,i,s)),Jt(t,n,s)+e}function Re(t,e=0,n=1,s,i){t.min=Un(t.min,e,n,s,i),t.max=Un(t.max,e,n,s,i)}function Vi(t,{x:e,y:n}){Re(t.x,e.translate,e.scale,e.or