@moontra/moonui-pro 2.31.2 → 2.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +35 -4
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -66,7 +66,7 @@ ${t}`)}};function tP(e,t){switch(e){case"gemini":return new sT(t);case"openai":r
|
|
|
66
66
|
top: ${l}px !important;
|
|
67
67
|
left: ${c}px !important;
|
|
68
68
|
}
|
|
69
|
-
`),()=>{document.head.removeChild(u)}},[t]),(0,nye.jsx)(S7,{isPresent:t,childRef:n,sizeRef:o,children:n3.cloneElement(e,{ref:n})})}var iye=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i})=>{let s=yl(tdt),l=(0,oC.useId)(),c=(0,oC.useCallback)(d=>{s.set(d,!0);for(let f of s.values())if(!f)return;n&&n()},[s,n]),u=(0,oC.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),c]:[r,c]);return(0,oC.useMemo)(()=>{s.forEach((d,f)=>s.set(f,!1))},[r]),aye.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,P7.jsx)(oye,{isPresent:r,children:e})),(0,P7.jsx)(rb.Provider,{value:u,children:e})};function tdt(){return new Map}var nb=E(ce(),1);function o3(e=!0){let t=(0,nb.useContext)(rb);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,nb.useId)();(0,nb.useEffect)(()=>{e&&o(a)},[e]);let i=(0,nb.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var a3=E(ce(),1),SL=e=>e.key||"";function I7(e){let t=[];return a3.Children.forEach(e,r=>{(0,a3.isValidElement)(r)&&t.push(r)}),t}var i3=E(ce(),1);var WP=typeof window<"u";var Fh=WP?i3.useLayoutEffect:i3.useEffect;var _t=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1})=>{let[s,l]=o3(i),c=(0,Bh.useMemo)(()=>I7(e),[e]),u=i&&!s?[]:c.map(SL),d=(0,Bh.useRef)(!0),f=(0,Bh.useRef)(c),p=yl(()=>new Map),[m,h]=(0,Bh.useState)(c),[g,v]=(0,Bh.useState)(c);Fh(()=>{d.current=!1,f.current=c;for(let w=0;w<g.length;w++){let b=SL(g[w]);u.includes(b)?p.delete(b):p.get(b)!==!0&&p.set(b,!1)}},[g,u.length,u.join("-")]);let y=[];if(c!==m){let w=[...c];for(let b=0;b<g.length;b++){let C=g[b],S=SL(C);u.includes(S)||(w.splice(b,0,C),y.push(C))}a==="wait"&&y.length&&(w=y),v(I7(w)),h(c);return}let{forceRender:x}=(0,Bh.useContext)(qP);return(0,PL.jsx)(PL.Fragment,{children:g.map(w=>{let b=SL(w),C=i&&!s?!1:c===g||u.includes(b),S=()=>{if(p.has(b))p.set(b,!0);else return;let k=!0;p.forEach(T=>{T||(k=!1)}),k&&(x?.(),v(f.current),i&&l?.(),n&&n())};return(0,PL.jsx)(iye,{isPresent:C,initial:!d.current||r?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:o,mode:a,onExitComplete:C?void 0:S,children:w},b)})})};var Ho=e=>e;var Vv=Ho,Fi=Ho;function aC(e){let t;return()=>(t===void 0&&(t=e()),t)}var au=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Ci=e=>e*1e3,xl=e=>e/1e3;var GP={skipAnimations:!1,useManualTiming:!1};function sye(e){let t=new Set,r=new Set,n=!1,o=!1,a=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(i)}let l={schedule:(c,u=!1,d=!1)=>{let p=d&&n?t:r;return u&&a.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),a.delete(c)},process:c=>{if(i=c,n){o=!0;return}n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var s3=["read","resolveKeyframes","update","preRender","render","postRender"],rdt=40;function l3(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=s3.reduce((v,y)=>(v[y]=sye(a),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{let v=GP.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(v-o.timestamp,rdt),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(p))},m=()=>{r=!0,n=!0,o.isProcessing||e(p)};return{schedule:s3.reduce((v,y)=>{let x=i[y];return v[y]=(w,b=!1,C=!1)=>(r||m(),x.schedule(w,b,C)),v},{}),cancel:v=>{for(let y=0;y<s3.length;y++)i[s3[y]].cancel(v)},state:o,steps:i}}var{schedule:Wr,cancel:iu,state:Si,steps:c3}=l3(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ho,!0);var lye=E(ce(),1),u3=(0,lye.createContext)({strict:!1});var cye={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"]},Uv={};for(let e in cye)Uv[e]={isEnabled:t=>cye[e].some(r=>!!t[r])};function uye(e){for(let t in e)Uv[t]={...Uv[t],...e[t]}}var ndt=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 IL(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ndt.has(e)}var dye=e=>!IL(e);function odt(e){e&&(dye=t=>t.startsWith("on")?!IL(t):e(t))}try{odt(Cfe("@emotion/is-prop-valid").default)}catch{}function fye(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(dye(o)||r===!0&&IL(o)||!t&&!IL(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function pye(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var g3=E(ue(),1);var YP=E(ce(),1);var mye=E(ce(),1),ob=(0,mye.createContext)({});var p3=E(ce(),1);function zv(e){return typeof e=="string"||Array.isArray(e)}function ab(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var d3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kL=["initial",...d3];function iC(e){return ab(e.animate)||kL.some(t=>zv(e[t]))}function f3(e){return!!(iC(e)||e.variants)}function hye(e,t){if(iC(e)){let{initial:r,animate:n}=e;return{initial:r===!1||zv(r)?r:void 0,animate:zv(n)?n:void 0}}return e.inherit!==!1?t:{}}function vye(e){let{initial:t,animate:r}=hye(e,(0,p3.useContext)(ob));return(0,p3.useMemo)(()=>({initial:t,animate:r}),[gye(t),gye(r)])}function gye(e){return Array.isArray(e)?e.join(" "):e}var yye=Symbol.for("motionComponentSymbol");var xye=E(ce(),1);function Hv(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bye(e,t,r){return(0,xye.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Hv(r)&&(r.current=n))},[t])}var Ju=E(ce(),1);var KP=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var adt="framerAppearId",m3="data-"+KP(adt);var{schedule:XP,cancel:yPr}=l3(queueMicrotask,!1);var wye=E(ce(),1),h3=(0,wye.createContext)({});function Cye(e,t,r,n,o){var a,i;let{visualElement:s}=(0,Ju.useContext)(ob),l=(0,Ju.useContext)(u3),c=(0,Ju.useContext)(rb),u=(0,Ju.useContext)(_h).reducedMotion,d=(0,Ju.useRef)(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:s,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,p=(0,Ju.useContext)(h3);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&idt(d.current,r,o,p);let m=(0,Ju.useRef)(!1);(0,Ju.useInsertionEffect)(()=>{f&&m.current&&f.update(r,c)});let h=r[m3],g=(0,Ju.useRef)(!!h&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,h))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,h)));return Fh(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),XP.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,Ju.useEffect)(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,h)}),g.current=!1))}),f}function idt(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Sye(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&Hv(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}function Sye(e){if(e)return e.options.allowProjection!==!1?e.projection:Sye(e.parent)}function Pye({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){var a,i;e&&uye(e);function s(c,u){let d,f={...(0,YP.useContext)(_h),...c,layoutId:sdt(c)},{isStatic:p}=f,m=vye(c),h=n(c,p);if(!p&&WP){ldt(f,e);let g=cdt(f);d=g.MeasureLayout,m.visualElement=Cye(o,h,f,t,g.ProjectionNode)}return(0,g3.jsxs)(ob.Provider,{value:m,children:[d&&m.visualElement?(0,g3.jsx)(d,{visualElement:m.visualElement,...f}):null,r(o,c,bye(h,m.visualElement,u),h,p,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(i=(a=o.displayName)!==null&&a!==void 0?a:o.name)!==null&&i!==void 0?i:""})`}`;let l=(0,YP.forwardRef)(s);return l[yye]=o,l}function sdt({layoutId:e}){let t=(0,YP.useContext)(qP).id;return t&&e!==void 0?t+"-"+e:e}function ldt(e,t){let r=(0,YP.useContext)(u3).strict}function cdt(e){let{drag:t,layout:r}=Uv;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var Iye=["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 QP(e){return typeof e!="string"||e.includes("-")?!1:!!(Iye.indexOf(e)>-1||/[A-Z]/u.test(e))}var k7=E(ce(),1);function kye(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function ZP(e,t,r,n){if(typeof t=="function"){let[o,a]=kye(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=kye(n);t=t(r!==void 0?r:e.custom,o,a)}return t}var RL=e=>Array.isArray(e);var Rye=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Nye=e=>RL(e)?e[e.length-1]||0:e;var qn=e=>!!(e&&e.getVelocity);function JP(e){let t=qn(e)?e.get():e;return Rye(t)?t.toValue():t}function udt({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,o,a){let i={latestValues:ddt(n,o,a,e),renderState:t()};return r&&(i.onMount=s=>r({props:n,current:s,...i}),i.onUpdate=s=>r(s)),i}var v3=e=>(t,r)=>{let n=(0,k7.useContext)(ob),o=(0,k7.useContext)(rb),a=()=>udt(e,t,n,o);return r?a():yl(a)};function ddt(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=JP(a[f]);let{initial:i,animate:s}=e,l=iC(e),c=f3(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!ab(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=ZP(e,f[p]);if(m){let{transitionEnd:h,transition:g,...v}=m;for(let y in v){let x=v[y];if(Array.isArray(x)){let w=u?x.length-1:0;x=x[w]}x!==null&&(o[y]=x)}for(let y in h)o[y]=h[y]}}}return o}var Vh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ed=new Set(Vh);var Mye=e=>t=>typeof t=="string"&&t.startsWith(e),y3=Mye("--"),fdt=Mye("var(--"),eI=e=>fdt(e)?pdt.test(e.split("/*")[0].trim()):!1,pdt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var x3=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var Wl=(e,t,r)=>r>t?t:r<e?e:r;var Uh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jv={...Uh,transform:e=>Wl(0,1,e)},NL={...Uh,default:1};var ML=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zh=ML("deg"),su=ML("%"),ar=ML("px"),Tye=ML("vh"),Aye=ML("vw"),R7={...su,parse:e=>su.parse(e)/100,transform:e=>su.transform(e*100)};var Lye={borderWidth:ar,borderTopWidth:ar,borderRightWidth:ar,borderBottomWidth:ar,borderLeftWidth:ar,borderRadius:ar,radius:ar,borderTopLeftRadius:ar,borderTopRightRadius:ar,borderBottomRightRadius:ar,borderBottomLeftRadius:ar,width:ar,maxWidth:ar,height:ar,maxHeight:ar,top:ar,right:ar,bottom:ar,left:ar,padding:ar,paddingTop:ar,paddingRight:ar,paddingBottom:ar,paddingLeft:ar,margin:ar,marginTop:ar,marginRight:ar,marginBottom:ar,marginLeft:ar,backgroundPositionX:ar,backgroundPositionY:ar};var Eye={rotate:zh,rotateX:zh,rotateY:zh,rotateZ:zh,scale:NL,scaleX:NL,scaleY:NL,scaleZ:NL,skew:zh,skewX:zh,skewY:zh,distance:ar,translateX:ar,translateY:ar,translateZ:ar,x:ar,y:ar,z:ar,perspective:ar,transformPerspective:ar,opacity:jv,originX:R7,originY:R7,originZ:ar};var N7={...Uh,transform:Math.round};var tI={...Lye,...Eye,zIndex:N7,size:ar,fillOpacity:jv,strokeOpacity:jv,numOctaves:N7};var mdt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hdt=Vh.length;function Dye(e,t,r){let n="",o=!0;for(let a=0;a<hdt;a++){let i=Vh[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let c=x3(s,tI[i]);if(!l){o=!1;let u=mdt[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function rI(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(ed.has(l)){i=!0;continue}else if(y3(l)){o[l]=c;continue}else{let u=x3(c,tI[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=Dye(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var gdt={offset:"stroke-dashoffset",array:"stroke-dasharray"},vdt={offset:"strokeDashoffset",array:"strokeDasharray"};function Oye(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?gdt:vdt;e[a.offset]=ar.transform(-n);let i=ar.transform(t),s=ar.transform(r);e[a.array]=`${i} ${s}`}function _ye(e,t,r){return typeof e=="string"?e:ar.transform(t+r*e)}function Fye(e,t,r){let n=_ye(t,e.x,e.width),o=_ye(r,e.y,e.height);return`${n} ${o}`}function nI(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(rI(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(o!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Fye(m,o!==void 0?o:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&Oye(f,i,s,l,!1)}var oI=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var b3=()=>({...oI(),attrs:{}});var aI=e=>typeof e=="string"&&e.toLowerCase()==="svg";function w3(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let a in r)e.style.setProperty(a,r[a])}var C3=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 S3(e,t,r,n){w3(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(C3.has(o)?o:KP(o),t.attrs[o])}var iI={};function Bye(e){Object.assign(iI,e)}function P3(e,{layout:t,layoutId:r}){return ed.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!iI[e]||e==="opacity")}function sI(e,t,r){var n;let{style:o}=e,a={};for(let i in o)(qn(o[i])||t.style&&qn(t.style[i])||P3(i,e)||((n=r?.getValue(i))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[i]=o[i]);return a}function I3(e,t,r){let n=sI(e,t,r);for(let o in e)if(qn(e[o])||qn(t[o])){let a=Vh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}function ydt(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var Vye=["x","y","width","height","cx","cy","r"],Uye={useVisualState:v3({scrapeMotionValuesFromProps:I3,createRenderState:b3,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:o})=>{if(!r)return;let a=!!e.drag;if(!a){for(let s in o)if(ed.has(s)){a=!0;break}}if(!a)return;let i=!t;if(t)for(let s=0;s<Vye.length;s++){let l=Vye[s];e[l]!==t[l]&&(i=!0)}i&&Wr.read(()=>{ydt(r,n),Wr.render(()=>{nI(n,o,aI(r.tagName),e.transformTemplate),S3(r,n)})})}})};var zye={useVisualState:v3({scrapeMotionValuesFromProps:sI,createRenderState:oI})};var lI=E(ce(),1);var Hye=E(ce(),1);function M7(e,t,r){for(let n in t)!qn(t[n])&&!P3(n,r)&&(e[n]=t[n])}function xdt({transformTemplate:e},t){return(0,Hye.useMemo)(()=>{let r=oI();return rI(r,t,e),Object.assign({},r.vars,r.style)},[t])}function bdt(e,t){let r=e.style||{},n={};return M7(n,r,e),Object.assign(n,xdt(e,t)),n}function jye(e,t){let r={},n=bdt(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var $ye=E(ce(),1);function qye(e,t,r,n){let o=(0,$ye.useMemo)(()=>{let a=b3();return nI(a,t,aI(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};M7(a,e.style,e),o.style={...a,...o.style}}return o}function Wye(e=!1){return(r,n,o,{latestValues:a},i)=>{let l=(QP(r)?qye:jye)(n,a,i,r),c=fye(n,typeof r=="string",e),u=r!==lI.Fragment?{...c,...l,ref:o}:{},{children:d}=n,f=(0,lI.useMemo)(()=>qn(d)?d.get():d,[d]);return(0,lI.createElement)(r,{...u,children:f})}}function Gye(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){let i={...QP(n)?Uye:zye,preloadedFeatures:e,useRender:Wye(o),createVisualElement:t,Component:n};return Pye(i)}}function T7(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function ib(e,t,r){let n=e.getProps();return ZP(n,t,r!==void 0?r:n.custom,e)}var A7=aC(()=>window.ScrollTimeline!==void 0);var TL=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){let n=this.animations.map(o=>{if(A7()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{n.forEach((o,a)=>{o&&o(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var sC=class extends TL{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function sb(e,t){return e?e[t]||e.default||e:void 0}function lC(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function R3(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(lC(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:xl(o)}}function Hh(e){return typeof e=="function"}function AL(e,t){e.timeline=t,e.onfinish=null}var cI=e=>Array.isArray(e)&&typeof e[0]=="number";var L7={linearEasing:void 0};function Kye(e,t){let r=aC(e);return()=>{var n;return(n=L7[t])!==null&&n!==void 0?n:r()}}var lb=Kye(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var LL=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=e(au(0,o-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function M3(e){return!!(typeof e=="function"&&lb()||!e||typeof e=="string"&&(e in N3||lb())||cI(e)||Array.isArray(e)&&e.every(M3))}var uI=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,N3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uI([0,.65,.55,1]),circOut:uI([.55,0,1,.45]),backIn:uI([.31,.01,.66,-.59]),backOut:uI([.33,1.53,.69,.99])};function dI(e,t){if(e)return typeof e=="function"&&lb()?LL(e,t):cI(e)?uI(e):Array.isArray(e)?e.map(r=>dI(r,t)||N3.easeOut):N3[e]}var ef={x:!1,y:!1};function fI(){return ef.x||ef.y}function EL(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let a=(n=r?.[e])!==null&&n!==void 0?n:o.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function T3(e,t){let r=EL(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Xye(e){return t=>{t.pointerType==="touch"||fI()||e(t)}}function E7(e,t,r={}){let[n,o,a]=T3(e,r),i=Xye(s=>{let{target:l}=s,c=t(s);if(typeof c!="function"||!l)return;let u=Xye(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var A3=(e,t)=>t?e===t?!0:A3(e,t.parentElement):!1;var cC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var wdt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yye(e){return wdt.has(e.tagName)||e.tabIndex!==-1}var uC=new WeakSet;function Qye(e){return t=>{t.key==="Enter"&&e(t)}}function D7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Zye=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=Qye(()=>{if(uC.has(r))return;D7(r,"down");let o=Qye(()=>{D7(r,"up")}),a=()=>D7(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Jye(e){return cC(e)&&!fI()}function O7(e,t,r={}){let[n,o,a]=T3(e,r),i=s=>{let l=s.currentTarget;if(!Jye(s)||uC.has(l))return;uC.add(l);let c=t(s),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!Jye(p)||!uC.has(l))&&(uC.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{u(p,r.useGlobalTarget||A3(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{!Yye(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),s.addEventListener("focus",c=>Zye(c,o),o)}),a}function _7(e){return e==="x"||e==="y"?ef[e]?null:(ef[e]=!0,()=>{ef[e]=!1}):ef.x||ef.y?null:(ef.x=ef.y=!0,()=>{ef.x=ef.y=!1})}var L3=new Set(["width","height","top","left","right","bottom",...Vh]);var E3;function Cdt(){E3=void 0}var Cc={now:()=>(E3===void 0&&Cc.set(Si.isProcessing||GP.useManualTiming?Si.timestamp:performance.now()),E3),set:e=>{E3=e,queueMicrotask(Cdt)}};function pI(e,t){e.indexOf(t)===-1&&e.push(t)}function cb(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function txe([...e],t,r){let n=t<0?e.length+t:t;if(n>=0&&n<e.length){let o=r<0?e.length+r:r,[a]=e.splice(t,1);e.splice(o,0,a)}return e}var ub=class{constructor(){this.subscriptions=[]}add(t){return pI(this.subscriptions,t),()=>cb(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function D3(e,t){return t?e*(1e3/t):0}var rxe=30,Sdt=e=>!isNaN(parseFloat(e)),mI={current:void 0},F7=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{let a=Cc.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Cc.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Sdt(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ub);let n=this.events[t].add(r);return t==="change"?()=>{n(),Wr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return mI.current&&mI.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Cc.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rxe)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,rxe);return D3(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 Cm(e,t){return new F7(e,t)}function Pdt(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Cm(r))}function DL(e,t){let r=ib(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=Nye(a[i]);Pdt(e,i,s)}}function nxe(e){return!!(qn(e)&&e.add)}function OL(e,t){let r=e.getValue("willChange");if(nxe(r))return r.add(t)}function O3(e){return e.props[m3]}var _3={current:!1};var oxe=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Idt=1e-7,kdt=12;function Rdt(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=oxe(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>Idt&&++s<kdt);return i}function db(e,t,r,n){if(e===t&&r===n)return Ho;let o=a=>Rdt(a,0,1,e,r);return a=>a===0||a===1?a:oxe(o(a),t,n)}var F3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var B3=e=>t=>1-e(1-t);var B7=db(.33,1.53,.69,.99),_L=B3(B7),V3=F3(_L);var U3=e=>(e*=2)<1?.5*_L(e):.5*(2-Math.pow(2,-10*(e-1)));var z3=e=>1-Math.sin(Math.acos(e)),H3=B3(z3),j3=F3(z3);var $3=e=>/^0[^.\s]+$/u.test(e);function axe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$3(e):!0}var fb=e=>Math.round(e*1e5)/1e5;var hI=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ixe(e){return e==null}var sxe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var gI=(e,t)=>r=>!!(typeof r=="string"&&sxe.test(r)&&r.startsWith(e)||t&&!ixe(r)&&Object.prototype.hasOwnProperty.call(r,t)),q3=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(hI);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var Ndt=e=>Wl(0,255,e),V7={...Uh,transform:e=>Math.round(Ndt(e))},jh={test:gI("rgb","red"),parse:q3("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+V7.transform(e)+", "+V7.transform(t)+", "+V7.transform(r)+", "+fb(jv.transform(n))+")"};function Mdt(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var FL={test:gI("#"),parse:Mdt,transform:jh.transform};var pb={test:gI("hsl","hue"),parse:q3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+su.transform(fb(t))+", "+su.transform(fb(r))+", "+fb(jv.transform(n))+")"};var xs={test:e=>jh.test(e)||FL.test(e)||pb.test(e),parse:e=>jh.test(e)?jh.parse(e):pb.test(e)?pb.parse(e):FL.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?jh.transform(e):pb.transform(e)};var lxe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tdt(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hI))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(lxe))===null||r===void 0?void 0:r.length)||0)>0}var uxe="number",dxe="color",Adt="var",Ldt="var(",cxe="${}",Edt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dC(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(Edt,l=>(xs.test(l)?(n.color.push(a),o.push(dxe),r.push(xs.parse(l))):l.startsWith(Ldt)?(n.var.push(a),o.push(Adt),r.push(l)):(n.number.push(a),o.push(uxe),r.push(parseFloat(l))),++a,cxe)).split(cxe);return{values:r,split:s,indexes:n,types:o}}function fxe(e){return dC(e).values}function pxe(e){let{split:t,types:r}=dC(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===uxe?a+=fb(o[i]):s===dxe?a+=xs.transform(o[i]):a+=o[i]}return a}}var Ddt=e=>typeof e=="number"?0:e;function Odt(e){let t=fxe(e);return pxe(e)(t.map(Ddt))}var lu={test:Tdt,parse:fxe,createTransformer:pxe,getAnimatableNone:Odt};var _dt=new Set(["brightness","contrast","saturate","opacity"]);function Fdt(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(hI)||[];if(!n)return e;let o=r.replace(n,""),a=_dt.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var Bdt=/\b([a-z-]*)\(.*?\)/gu,BL={...lu,getAnimatableNone:e=>{let t=e.match(Bdt);return t?t.map(Fdt).join(" "):e}};var Vdt={...tI,color:xs,backgroundColor:xs,outlineColor:xs,fill:xs,stroke:xs,borderColor:xs,borderTopColor:xs,borderRightColor:xs,borderBottomColor:xs,borderLeftColor:xs,filter:BL,WebkitFilter:BL},vI=e=>Vdt[e];function W3(e,t){let r=vI(e);return r!==BL&&(r=lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Udt=new Set(["auto","none","0"]);function mxe(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!Udt.has(a)&&dC(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=W3(r,o)}var U7=e=>e===Uh||e===ar,hxe=(e,t)=>parseFloat(e.split(", ")[t]),gxe=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/u);if(o)return hxe(o[1],t);{let a=n.match(/^matrix\((.+)\)$/u);return a?hxe(a[1],e):0}},zdt=new Set(["x","y","z"]),Hdt=Vh.filter(e=>!zdt.has(e));function vxe(e){let t=[];return Hdt.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var fC={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gxe(4,13),y:gxe(5,14)};fC.translateX=fC.x;fC.translateY=fC.y;var pC=new Set,z7=!1,H7=!1;function yxe(){if(H7){let e=Array.from(pC).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=vxe(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{var s;(s=n.getValue(a))===null||s===void 0||s.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}H7=!1,z7=!1,pC.forEach(e=>e.complete()),pC.clear()}function xxe(){pC.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(H7=!0)})}function bxe(){xxe(),yxe()}var mb=class{constructor(t,r,n,o,a,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pC.add(this),z7||(z7=!0,Wr.read(xxe),Wr.resolveKeyframes(yxe))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){let i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){let l=n.readValue(r,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),pC.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,pC.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var G3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var jdt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $dt(e){let t=jdt.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var qdt=4;function j7(e,t,r=1){Fi(r<=qdt,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=$dt(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return G3(i)?parseFloat(i):i}return eI(o)?j7(o,t,r+1):o}var K3=e=>t=>t.test(e);var wxe={test:e=>e==="auto",parse:e=>e};var $7=[Uh,ar,su,zh,Aye,Tye,wxe],q7=e=>$7.find(K3(e));var yI=class extends mb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),eI(c))){let u=j7(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!L3.has(n)||t.length!==2)return;let[o,a]=t,i=q7(o),s=q7(a);if(i!==s)if(U7(i)&&U7(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)axe(t[o])&&n.push(o);n.length&&mxe(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fC[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:n,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let a=r.getValue(n);a&&a.jump(this.measuredOrigin,!1);let i=o.length-1,s=o[i];o[i]=fC[n](r.measureViewportBox(),window.getComputedStyle(r.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{r.getValue(l).set(c)}),this.resolveNoneKeyframes()}};var W7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lu.test(e)||e==="0")&&!e.startsWith("url("));function Wdt(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Cxe(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=W7(o,t),s=W7(a,t);return Vv(i===s,`You are trying to animate ${t} from "${o}" to "${a}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${a} via the \`style\` property.`),!i||!s?!1:Wdt(e)||(r==="spring"||Hh(r))&&n}var Gdt=e=>e!==null;function hb(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(Gdt),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var Kdt=40,xI=class{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Cc.now(),this.options={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Kdt?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bxe(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Cc.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:a,delay:i,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Cxe(t,n,o,a))if(_3.current||!i){l&&l(hb(t,this.options,r)),s&&s(),this.resolveFinishedPromise();return}else this.options.duration=0;let u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};var wn=(e,t,r)=>e+(t-e)*r;function G7(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Sxe({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=G7(l,s,e+1/3),a=G7(l,s,e),i=G7(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function bI(e,t){return r=>r>0?t:e}var K7=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},Xdt=[FL,jh,pb],Ydt=e=>Xdt.find(t=>t.test(e));function Pxe(e){let t=Ydt(e);if(Vv(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===pb&&(r=Sxe(r)),r}var X7=(e,t)=>{let r=Pxe(e),n=Pxe(t);if(!r||!n)return bI(e,t);let o={...r};return a=>(o.red=K7(r.red,n.red,a),o.green=K7(r.green,n.green,a),o.blue=K7(r.blue,n.blue,a),o.alpha=wn(r.alpha,n.alpha,a),jh.transform(o))};var Qdt=(e,t)=>r=>t(e(r)),$h=(...e)=>e.reduce(Qdt);var X3=new Set(["none","hidden"]);function Ixe(e,t){return X3.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Zdt(e,t){return r=>wn(e,t,r)}function Y3(e){return typeof e=="number"?Zdt:typeof e=="string"?eI(e)?bI:xs.test(e)?X7:tft:Array.isArray(e)?kxe:typeof e=="object"?xs.test(e)?X7:Jdt:bI}function kxe(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>Y3(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function Jdt(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Y3(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function eft(e,t){var r;let n=[],o={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let i=t.types[a],s=e.indexes[i][o[i]],l=(r=e.values[s])!==null&&r!==void 0?r:0;n[a]=l,o[i]++}return n}var tft=(e,t)=>{let r=lu.createTransformer(t),n=dC(e),o=dC(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?X3.has(e)&&!o.values.length||X3.has(t)&&!n.values.length?Ixe(e,t):$h(kxe(eft(n,o),o.values),r):(Vv(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),bI(e,t))};function Q3(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?wn(e,t,r):Y3(e)(e,t)}var rft=5;function Z3(e,t,r){let n=Math.max(t-rft,0);return D3(r-e(n),t-n)}var _a={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Y7=.001;function Rxe({duration:e=_a.duration,bounce:t=_a.bounce,velocity:r=_a.velocity,mass:n=_a.mass}){let o,a;Vv(e<=Ci(_a.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Wl(_a.minDamping,_a.maxDamping,i),e=Wl(_a.minDuration,_a.maxDuration,xl(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=J3(c,i),m=Math.exp(-d);return Y7-f/p*m},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),h=J3(Math.pow(c,2),i);return(-o(c)+Y7>0?-1:1)*((f-p)*m)/h}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Y7+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=oft(o,a,s);if(e=Ci(e),isNaN(l))return{stiffness:_a.stiffness,damping:_a.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var nft=12;function oft(e,t,r){let n=r;for(let o=1;o<nft;o++)n=n-e(n)/t(n);return n}function J3(e,t){return e*Math.sqrt(1-t*t)}var aft=["duration","bounce"],ift=["stiffness","damping","mass"];function Nxe(e,t){return t.some(r=>e[r]!==void 0)}function sft(e){let t={velocity:_a.velocity,stiffness:_a.stiffness,damping:_a.damping,mass:_a.mass,isResolvedFromDuration:!1,...e};if(!Nxe(e,ift)&&Nxe(e,aft))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*Wl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:_a.mass,stiffness:o,damping:a}}else{let r=Rxe(e);t={...t,...r,mass:_a.mass},t.isResolvedFromDuration=!0}return t}function wI(e=_a.visualDuration,t=_a.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=sft({...r,velocity:-xl(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=i-a,v=xl(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?_a.restSpeed.granular:_a.restSpeed.default),o||(o=y?_a.restDelta.granular:_a.restDelta.default);let x;if(h<1){let b=J3(v,h);x=C=>{let S=Math.exp(-h*v*C);return i-S*((m+h*v*g)/b*Math.sin(b*C)+g*Math.cos(b*C))}}else if(h===1)x=b=>i-Math.exp(-v*b)*(g+(m+v*g)*b);else{let b=v*Math.sqrt(h*h-1);x=C=>{let S=Math.exp(-h*v*C),k=Math.min(b*C,300);return i-S*((m+h*v*g)*Math.sinh(k)+b*g*Math.cosh(k))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=0;h<1&&(S=b===0?Ci(m):Z3(x,b,C));let k=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=k&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(lC(w),2e4),C=LL(S=>w.next(b*S).value,b,30);return b+"ms "+C}};return w}function Q7({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,m=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l,h=r*t,g=d+h,v=i===void 0?g:i(g);v!==g&&(h=v-d);let y=k=>-h*Math.exp(-k/n),x=k=>v+y(k),w=k=>{let T=y(k),O=x(k);f.done=Math.abs(T)<=c,f.value=f.done?v:O},b,C,S=k=>{p(f.value)&&(b=k,C=wI({keyframes:[f.value,m(f.value)],velocity:Z3(x,k,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:k=>{let T=!1;return!C&&b===void 0&&(T=!0,w(k),S(k)),b!==void 0&&k>=b?C.next(k-b):(!T&&w(k),f)}}}var Mxe=db(.42,0,1,1),Txe=db(0,0,.58,1),eV=db(.42,0,.58,1);var tV=e=>Array.isArray(e)&&typeof e[0]!="number";var Axe={linear:Ho,easeIn:Mxe,easeInOut:eV,easeOut:Txe,circIn:z3,circInOut:j3,circOut:H3,backIn:_L,backInOut:V3,backOut:B7,anticipate:U3},Z7=e=>{if(cI(e)){Fi(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return db(t,r,n,o)}else if(typeof e=="string")return Fi(Axe[e]!==void 0,`Invalid easing type '${e}'`),Axe[e];return e};function lft(e,t,r){let n=[],o=r||Q3,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||Ho:t;s=$h(l,s)}n.push(s)}return n}function rV(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Fi(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=lft(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=au(e[d],e[d+1],u);return s[d](f)};return r?u=>c(Wl(e[0],e[a-1],u)):c}function nV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=au(0,t,n);e.push(wn(r,1,o))}}function oV(e){let t=[0];return nV(t,e.length-1),t}function Lxe(e,t){return e.map(r=>r*t)}function cft(e,t){return e.map(()=>t||eV).splice(0,e.length-1)}function VL({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=tV(n)?n.map(Z7):Z7(n),a={done:!1,value:t[0]},i=Lxe(r&&r.length===t.length?r:oV(t),e),s=rV(i,t,{ease:Array.isArray(o)?o:cft(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Exe=e=>{let t=({timestamp:r})=>e(r);return{start:()=>Wr.update(t,!0),stop:()=>iu(t),now:()=>Si.isProcessing?Si.timestamp:Cc.now()}};var uft={decay:Q7,inertia:Q7,tween:VL,keyframes:VL,spring:wI},dft=e=>e/100,gb=class extends xI{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:l}=this.options;l&&l()};let{name:r,motionValue:n,element:o,keyframes:a}=this.options,i=o?.KeyframeResolver||mb,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(a,s,r,n,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let{type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=this.options,s=Hh(r)?r:uft[r]||VL,l,c;s!==VL&&typeof t[0]!="number"&&(l=$h(dft,Q3(t[0],t[1])),t=[0,100]);let u=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=lC(u));let{calculatedDuration:d}=u,f=d+o,p=f*(n+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){let{resolved:n}=this;if(!n){let{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}let{finalKeyframe:o,generator:a,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);let{delay:f,repeat:p,repeatType:m,repeatDelay:h,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let v=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,w=a;if(p){let k=Math.min(this.currentTime,u)/d,T=Math.floor(k),O=k%1;!O&&k>=1&&(O=1),O===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(O=1-O,h&&(O-=h/d)):m==="mirror"&&(w=i)),x=Wl(0,1,O)*d}let b=y?{done:!1,value:l[0]}:w.next(x);s&&(b.value=s(b.value));let{done:C}=b;!y&&c!==null&&(C=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&o!==void 0&&(b.value=hb(l,this.options,o)),g&&g(b.value),S&&this.finish(),b}get duration(){let{resolved:t}=this;return t?xl(t.calculatedDuration):0}get time(){return xl(this.currentTime)}set time(t){t=Ci(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=xl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=Exe,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),r&&r();let o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}};function Dxe(e){return new gb(e)}var Oxe=new Set(["opacity","clipPath","filter","transform"]);function _xe(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeInOut",times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=dI(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"})}var Fxe=aC(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var aV=10,fft=2e4;function pft(e){return Hh(e.type)||e.type==="spring"||!M3(e.ease)}function mft(e,t){let r=new gb({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},o=[],a=0;for(;!n.done&&a<fft;)n=r.sample(a),o.push(n.value),a+=aV;return{times:void 0,keyframes:o,duration:a-aV,ease:"linear"}}var Bxe={anticipate:U3,backInOut:V3,circInOut:j3};function hft(e){return e in Bxe}var UL=class extends xI{constructor(t){super(t);let{name:r,motionValue:n,element:o,keyframes:a}=this.options;this.resolver=new yI(a,(i,s)=>this.onKeyframesResolved(i,s),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:n=300,times:o,ease:a,type:i,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof a=="string"&&lb()&&hft(a)&&(a=Bxe[a]),pft(this.options)){let{onComplete:d,onUpdate:f,motionValue:p,element:m,...h}=this.options,g=mft(t,h);t=g.keyframes,t.length===1&&(t[1]=t[0]),n=g.duration,o=g.times,a=g.ease,i="keyframes"}let u=_xe(s.owner.current,l,t,{...this.options,duration:n,times:o,ease:a});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(AL(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:d}=this.options;s.set(hb(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:o,type:i,ease:a,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return xl(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return xl(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.currentTime=Ci(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:r}=t;return r.playbackRate}set speed(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:r}=t;return r.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{let{resolved:r}=this;if(!r)return Ho;let{animation:n}=r;AL(n,t)}return Ho}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:r,keyframes:n,duration:o,type:a,ease:i,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,m=new gb({...p,keyframes:n,duration:o,type:a,ease:i,times:s,isGenerator:!0}),h=Ci(this.time);c.setWithVelocity(m.sample(h-aV).value,m.sample(h).value,aV)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:r,name:n,repeatDelay:o,repeatType:a,damping:i,type:s}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=r.owner.getProps();return Fxe()&&n&&Oxe.has(n)&&!l&&!c&&!o&&a!=="mirror"&&i!==0&&s!=="inertia"}};var gft={type:"spring",stiffness:500,damping:25,restSpeed:10},vft=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yft={type:"keyframes",duration:.8},xft={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vxe=(e,{keyframes:t})=>t.length>2?yft:ed.has(e)?e.startsWith("scale")?vft(t[1]):gft:xft;function Uxe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var CI=(e,t,r,n={},o,a)=>i=>{let s=sb(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-Ci(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};Uxe(s)||(u={...u,...Vxe(e,u)}),u.duration&&(u.duration=Ci(u.duration)),u.repeatDelay&&(u.repeatDelay=Ci(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(_3.current||GP.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let f=hb(u.keyframes,s);if(f!==void 0)return Wr.update(()=>{u.onUpdate(f),u.onComplete()}),new sC([])}return!a&&UL.supports(u)?new UL(u):new gb(u)};function bft({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function SI(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var a;let{transition:i=e.getDefaultTransition(),transitionEnd:s,...l}=t;n&&(i=n);let c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||u&&bft(u,d))continue;let m={delay:r,...sb(i||{},d)},h=!1;if(window.MotionHandoffAnimation){let v=O3(e);if(v){let y=window.MotionHandoffAnimation(v,d,Wr);y!==null&&(m.startTime=y,h=!0)}}OL(e,d),f.start(CI(d,f,p,e.shouldReduceMotion&&L3.has(d)?{type:!1}:m,e,h));let g=f.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Wr.update(()=>{s&&DL(e,s)})}),c}function iV(e,t,r={}){var n;let o=ib(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(a=r.transitionOverride);let i=o?()=>Promise.all(SI(e,o,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=a;return wft(e,t,u+c,d,f,r)}:()=>Promise.resolve(),{when:l}=a;if(l){let[c,u]=l==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(r.delay)])}function wft(e,t,r=0,n=0,o=1,a){let i=[],s=(e.variantChildren.size-1)*n,l=o===1?(c=0)=>c*n:(c=0)=>s-c*n;return Array.from(e.variantChildren).sort(Cft).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(iV(c,t,{...a,delay:r+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Cft(e,t){return e.sortNodePosition(t)}function sV(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>iV(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=iV(e,t,r);else{let o=typeof t=="function"?ib(e,t,r.custom):t;n=Promise.all(SI(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var Sft=kL.length;function J7(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?J7(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<Sft;r++){let n=kL[r],o=e.props[n];(zv(o)||o===!1)&&(t[n]=o)}return t}var Pft=[...d3].reverse(),Ift=d3.length;function kft(e){return t=>Promise.all(t.map(({animation:r,options:n})=>sV(e,r,n)))}function Hxe(e){let t=kft(e),r=zxe(),n=!0,o=l=>(c,u)=>{var d;let f=ib(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:p,transitionEnd:m,...h}=f;c={...c,...h,...m}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=J7(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let g=0;g<Ift;g++){let v=Pft[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],w=zv(x),b=v===l?y.isActive:null;b===!1&&(m=g);let C=x===u[v]&&x!==c[v]&&w;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||ab(x)||typeof x=="boolean")continue;let S=Rft(y.prevProp,x),k=S||v===l&&y.isActive&&!C&&w||g>m&&w,T=!1,O=Array.isArray(x)?x:[x],M=O.reduce(o(v),{});b===!1&&(M={});let{prevResolvedValues:N={}}=y,U={...N,...M},F=R=>{k=!0,f.has(R)&&(T=!0,f.delete(R)),y.needsAnimating[R]=!0;let A=e.getValue(R);A&&(A.liveStyle=!1)};for(let R in U){let A=M[R],D=N[R];if(p.hasOwnProperty(R))continue;let B=!1;RL(A)&&RL(D)?B=!T7(A,D):B=A!==D,B?A!=null?F(R):f.add(R):A!==void 0&&f.has(R)?F(R):y.protectedKeys[R]=!0}y.prevProp=x,y.prevResolvedValues=M,y.isActive&&(p={...p,...M}),n&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&S)||T)&&d.push(...O.map(R=>({animation:R,options:{type:v}})))}if(f.size){let g={};f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let h=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function s(l,c){var u;if(r[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;let d=i(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=zxe(),n=!0}}}function Rft(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!T7(t,e):!1}function mC(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zxe(){return{animate:mC(!0),whileInView:mC(),whileHover:mC(),whileTap:mC(),whileDrag:mC(),whileFocus:mC(),exit:mC()}}var bl=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var lV=class extends bl{constructor(t){super(t),t.animationState||(t.animationState=Hxe(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ab(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}};var Nft=0,cV=class extends bl{constructor(){super(...arguments),this.id=Nft++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}};var jxe={animation:{Feature:lV},exit:{Feature:cV}};function $v(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function qv(e){return{point:{x:e.pageX,y:e.pageY}}}var $xe=e=>t=>cC(t)&&e(t,qv(t));function vb(e,t,r,n){return $v(e,t,$xe(r),n)}var qxe=(e,t)=>Math.abs(e-t);function Wxe(e,t){let r=qxe(e.x,t.x),n=qxe(e.y,t.y);return Math.sqrt(r**2+n**2)}var PI=class{constructor(t,r,{transformPagePoint:n,contextWindow:o,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;let d=tX(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=Wxe(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:m}=d,{timestamp:h}=Si;this.history.push({...m,timestamp:h});let{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=eX(f,this.transformPagePoint),Wr.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:p,onSessionEnd:m,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=tX(d.type==="pointercancel"?this.lastMoveEventInfo:eX(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),m&&m(d,g)},!cC(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;let i=qv(t),s=eX(i,this.transformPagePoint),{point:l}=s,{timestamp:c}=Si;this.history=[{...l,timestamp:c}];let{onSessionStart:u}=r;u&&u(t,tX(s,this.history)),this.removeListeners=$h(vb(this.contextWindow,"pointermove",this.handlePointerMove),vb(this.contextWindow,"pointerup",this.handlePointerUp),vb(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),iu(this.updatePoint)}};function eX(e,t){return t?{point:t(e.point)}:e}function Gxe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tX({point:e},t){return{point:e,delta:Gxe(e,Kxe(t)),offset:Gxe(e,Mft(t)),velocity:Tft(t,.1)}}function Mft(e){return e[0]}function Kxe(e){return e[e.length-1]}function Tft(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=Kxe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Ci(t)));)r--;if(!n)return{x:0,y:0};let a=xl(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Zxe=1e-4,Aft=1-Zxe,Lft=1+Zxe,Jxe=.01,Eft=0-Jxe,Dft=0+Jxe;function Gl(e){return e.max-e.min}function ebe(e,t,r){return Math.abs(e-t)<=r}function Xxe(e,t,r,n=.5){e.origin=n,e.originPoint=wn(t.min,t.max,e.origin),e.scale=Gl(r)/Gl(t),e.translate=wn(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Aft&&e.scale<=Lft||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eft&&e.translate<=Dft||isNaN(e.translate))&&(e.translate=0)}function II(e,t,r,n){Xxe(e.x,t.x,r.x,n?n.originX:void 0),Xxe(e.y,t.y,r.y,n?n.originY:void 0)}function Yxe(e,t,r){e.min=r.min+t.min,e.max=e.min+Gl(t)}function tbe(e,t,r){Yxe(e.x,t.x,r.x),Yxe(e.y,t.y,r.y)}function Qxe(e,t,r){e.min=t.min-r.min,e.max=e.min+Gl(t)}function kI(e,t,r){Qxe(e.x,t.x,r.x),Qxe(e.y,t.y,r.y)}function ibe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?wn(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?wn(r,e,n.max):Math.min(e,r)),e}function rbe(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function sbe(e,{top:t,left:r,bottom:n,right:o}){return{x:rbe(e.x,r,o),y:rbe(e.y,t,n)}}function nbe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function lbe(e,t){return{x:nbe(e.x,t.x),y:nbe(e.y,t.y)}}function cbe(e,t){let r=.5,n=Gl(e),o=Gl(t);return o>n?r=au(t.min,t.max-n,e.min):n>o&&(r=au(e.min,e.max-o,t.min)),Wl(0,1,r)}function ube(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var uV=.35;function dbe(e=uV){return e===!1?e=0:e===!0&&(e=uV),{x:obe(e,"left","right"),y:obe(e,"top","bottom")}}function obe(e,t,r){return{min:abe(e,t),max:abe(e,r)}}function abe(e,t){return typeof e=="number"?e:e[t]||0}var fbe=()=>({translate:0,scale:1,origin:0,originPoint:0}),hC=()=>({x:fbe(),y:fbe()}),pbe=()=>({min:0,max:0}),na=()=>({x:pbe(),y:pbe()});function td(e){return[e("x"),e("y")]}function dV({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function mbe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hbe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function rX(e){return e===void 0||e===1}function fV({scale:e,scaleX:t,scaleY:r}){return!rX(e)||!rX(t)||!rX(r)}function Wv(e){return fV(e)||nX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nX(e){return gbe(e.x)||gbe(e.y)}function gbe(e){return e&&e!=="0%"}function zL(e,t,r){let n=e-r,o=t*n;return r+o}function vbe(e,t,r,n,o){return o!==void 0&&(e=zL(e,o,n)),zL(e,r,n)+t}function oX(e,t=0,r=1,n,o){e.min=vbe(e.min,t,r,n,o),e.max=vbe(e.max,t,r,n,o)}function aX(e,{x:t,y:r}){oX(e.x,t.translate,t.scale,t.originPoint),oX(e.y,r.translate,r.scale,r.originPoint)}var ybe=.999999999999,xbe=1.0000000000001;function wbe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&gC(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,aX(e,i)),n&&Wv(a.latestValues)&&gC(e,a.latestValues))}t.x<xbe&&t.x>ybe&&(t.x=1),t.y<xbe&&t.y>ybe&&(t.y=1)}function yb(e,t){e.min=e.min+t,e.max=e.max+t}function bbe(e,t,r,n,o=.5){let a=wn(e.min,e.max,o);oX(e,t,r,a,n)}function gC(e,t){bbe(e.x,t.x,t.scaleX,t.scale,t.originX),bbe(e.y,t.y,t.scaleY,t.scale,t.originY)}function iX(e,t){return dV(hbe(e.getBoundingClientRect(),t))}function Cbe(e,t,r){let n=iX(e,r),{scroll:o}=t;return o&&(yb(n.x,o.offset.x),yb(n.y,o.offset.y)),n}var pV=({current:e})=>e?e.ownerDocument.defaultView:null;var Oft=new WeakMap,hV=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=na(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let o=u=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(qv(u).point)},a=(u,d)=>{let{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_7(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),td(g=>{let v=this.getAxisMotionValue(g).get()||0;if(su.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let x=y.layout.layoutBox[g];x&&(v=Gl(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&Wr.postRender(()=>m(u,d)),OL(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},i=(u,d)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=_ft(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),h&&h(u,d)},s=(u,d)=>this.stop(u,d),l=()=>td(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new PI(t,{onSessionStart:o,onStart:a,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:pV(this.visualElement)})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&Wr.postRender(()=>a(t,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!mV(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=ibe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;r&&Hv(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=sbe(o.layoutBox,r):this.constraints=!1,this.elastic=dbe(n),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&td(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=ube(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Hv(t))return!1;let n=t.current;Fi(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let a=Cbe(n,o.root,this.visualElement.getTransformPagePoint()),i=lbe(o.layout.layoutBox,a);if(r){let s=r(mbe(i));this.hasMutatedConstraints=!!s,s&&(i=dV(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=td(u=>{if(!mV(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return OL(this.visualElement,t),n.start(CI(t,n,0,r,this.visualElement,!1))}stopAnimation(){td(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){td(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){td(r=>{let{drag:n}=this.getProps();if(!mV(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-wn(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Hv(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};td(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=cbe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),td(i=>{if(!mV(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(wn(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Oft.set(this.visualElement,this);let t=this.visualElement.current,r=vb(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();Hv(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Wr.read(n);let i=$v(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(td(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=uV,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function mV(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function _ft(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var gV=class extends bl{constructor(t){super(t),this.removeGroupControls=Ho,this.removeListeners=Ho,this.controls=new hV(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ho}unmount(){this.removeGroupControls(),this.removeListeners()}};var Sbe=e=>(t,r)=>{e&&Wr.postRender(()=>e(t,r))},vV=class extends bl{constructor(){super(...arguments),this.removePointerDownListener=Ho}onPointerDown(t){this.session=new PI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pV(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Sbe(t),onStart:Sbe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&Wr.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=vb(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var kbe=E(ue(),1),HL=E(ce(),1);var RI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pbe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var NI={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ar.test(e))e=parseFloat(e);else return e;let r=Pbe(e,t.target.x),n=Pbe(e,t.target.y);return`${r}% ${n}%`}};var Ibe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=lu.parse(e);if(o.length>5)return n;let a=lu.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=wn(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var sX=class extends HL.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;Bye(Fft),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),RI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,i=n.projection;return i&&(i.isPresent=a,o||t.layoutDependency!==r||r===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Wr.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),XP.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function yV(e){let[t,r]=o3(),n=(0,HL.useContext)(qP);return(0,kbe.jsx)(sX,{...e,layoutGroup:n,switchLayoutGroup:(0,HL.useContext)(h3),isPresent:t,safeToRemove:r})}var Fft={borderRadius:{...NI,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:NI,borderTopRightRadius:NI,borderBottomLeftRadius:NI,borderBottomRightRadius:NI,boxShadow:Ibe};function xV(e,t,r){let n=qn(e)?e:Cm(e);return n.start(CI("",n,t,r)),n.animation}function bV(e){return e instanceof SVGElement&&e.tagName!=="svg"}var Rbe=(e,t)=>e.depth-t.depth;var wV=class{constructor(){this.children=[],this.isDirty=!1}add(t){pI(this.children,t),this.isDirty=!0}remove(t){cb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rbe),this.isDirty=!1,this.children.forEach(t)}};function Nbe(e,t){let r=Cc.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(iu(n),e(a-t))};return Wr.read(n,!0),()=>iu(n)}var Lbe=["TopLeft","TopRight","BottomLeft","BottomRight"],Bft=Lbe.length,Mbe=e=>typeof e=="string"?parseFloat(e):e,Tbe=e=>typeof e=="number"||ar.test(e);function Ebe(e,t,r,n,o,a){o?(e.opacity=wn(0,r.opacity!==void 0?r.opacity:1,Vft(n)),e.opacityExit=wn(t.opacity!==void 0?t.opacity:1,0,Uft(n))):a&&(e.opacity=wn(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let i=0;i<Bft;i++){let s=`border${Lbe[i]}Radius`,l=Abe(t,s),c=Abe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Tbe(l)===Tbe(c)?(e[s]=Math.max(wn(Mbe(l),Mbe(c),n),0),(su.test(c)||su.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=wn(t.rotate||0,r.rotate||0,n))}function Abe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Vft=Dbe(0,.5,H3),Uft=Dbe(.5,.95,Ho);function Dbe(e,t,r){return n=>n<e?0:n>t?1:r(au(e,t,n))}function Obe(e,t){e.min=t.min,e.max=t.max}function tf(e,t){Obe(e.x,t.x),Obe(e.y,t.y)}function lX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _be(e,t,r,n,o){return e-=t,e=zL(e,1/r,n),o!==void 0&&(e=zL(e,1/o,n)),e}function zft(e,t=0,r=1,n=.5,o,a=e,i=e){if(su.test(t)&&(t=parseFloat(t),t=wn(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=wn(a.min,a.max,n);e===a&&(s-=t),e.min=_be(e.min,t,r,s,o),e.max=_be(e.max,t,r,s,o)}function Fbe(e,t,[r,n,o],a,i){zft(e,t[r],t[n],t[o],t.scale,a,i)}var Hft=["x","scaleX","originX"],jft=["y","scaleY","originY"];function cX(e,t,r,n){Fbe(e.x,t,Hft,r?r.x:void 0,n?n.x:void 0),Fbe(e.y,t,jft,r?r.y:void 0,n?n.y:void 0)}function Bbe(e){return e.translate===0&&e.scale===1}function uX(e){return Bbe(e.x)&&Bbe(e.y)}function Vbe(e,t){return e.min===t.min&&e.max===t.max}function zbe(e,t){return Vbe(e.x,t.x)&&Vbe(e.y,t.y)}function Ube(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dX(e,t){return Ube(e.x,t.x)&&Ube(e.y,t.y)}function fX(e){return Gl(e.x)/Gl(e.y)}function pX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var CV=class{constructor(){this.members=[]}add(t){pI(this.members,t),t.scheduleRender()}remove(t){if(cb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Hbe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var vC={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},jL=typeof window<"u"&&window.MotionDebug!==void 0,mX=["","X","Y","Z"],$ft={visibility:"hidden"},jbe=1e3,qft=0;function hX(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Qbe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=O3(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Wr,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Qbe(n)}function SV({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=qft++,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,jL&&(vC.totalNodes=vC.resolvedTargetDeltas=vC.recalculatedProjection=0),this.nodes.forEach(Kft),this.nodes.forEach(Jft),this.nodes.forEach(ept),this.nodes.forEach(Xft),jL&&window.MotionDebug.record(vC)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new wV)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ub),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bV(i),this.instance=i;let{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Nbe(f,250),RI.hasAnimatedSinceResize&&(RI.hasAnimatedSinceResize=!1,this.nodes.forEach(qbe))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||apt,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!dX(this.targetLayout,m)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);let w={...sb(h,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||qbe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,iu(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(tpt),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qbe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($be);return}this.isUpdating||this.nodes.forEach(Qft),this.isUpdating=!1,this.nodes.forEach(Zft),this.nodes.forEach(Wft),this.nodes.forEach(Gft),this.clearAllSnapshots();let s=Cc.now();Si.delta=Wl(0,1e3/60,s-Si.timestamp),Si.timestamp=s,Si.isProcessing=!0,c3.update.process(Si),c3.preRender.process(Si),c3.render.process(Si),Si.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,XP.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yft),this.sharedNodes.forEach(rpt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=na(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!uX(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(s||Wv(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),ipt(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;let{visualElement:s}=this.options;if(!s)return na();let l=s.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(spt))){let{scroll:u}=this.root;u&&(yb(l.x,u.offset.x),yb(l.y,u.offset.y))}return l}removeElementScroll(i){var s;let l=na();if(tf(l,i),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){let u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&tf(l,i),yb(l.x,d.offset.x),yb(l.y,d.offset.y))}return l}applyTransform(i,s=!1){let l=na();tf(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&gC(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Wv(u.latestValues)&&gC(l,u.latestValues)}return Wv(this.latestValues)&&gC(l,this.latestValues),l}removeTransform(i){let s=na();tf(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!Wv(c.latestValues))continue;fV(c.latestValues)&&c.updateSnapshot();let u=na(),d=c.measurePageBox();tf(u,d),cX(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Wv(this.latestValues)&&cX(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==Si.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var s;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Si.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=na(),this.relativeTargetOrigin=na(),kI(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),tf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=na(),this.targetWithTransforms=na()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tbe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tf(this.target,this.layout.layoutBox),aX(this.target,this.targetDelta)):tf(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=na(),this.relativeTargetOrigin=na(),kI(this.relativeTargetOrigin,this.target,p.target),tf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}jL&&vC.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||fV(this.parent.latestValues)||nX(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 i;let s=this.getLead(),l=!!this.resumingFrom||this!==s,c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Si.timestamp&&(c=!1),c)return;let{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;tf(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;wbe(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=na());let{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(lX(this.prevProjectionDelta.x,this.projectionDelta.x),lX(this.prevProjectionDelta.y,this.projectionDelta.y)),II(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!pX(this.projectionDelta.x,this.prevProjectionDelta.x)||!pX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),jL&&vC.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),i){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hC(),this.projectionDelta=hC(),this.projectionDeltaWithTransform=hC()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=hC();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=na(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,g=this.getStack(),v=!g||g.members.length<=1,y=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(opt));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let b=w/1e3;Wbe(d.x,i.x,b),Wbe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),npt(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&zbe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=na()),tf(x,this.relativeTarget)),h&&(this.animationValues=u,Ebe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(iu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wr.update(()=>{RI.hasAnimatedSinceResize=!0,this.currentAnimation=xV(0,jbe,{...i,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onComplete:()=>{i.onComplete&&i.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);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jbe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&Zbe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||na();let d=Gl(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Gl(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}tf(s,l),gC(s,u),II(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new CV),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){var i;let{layoutId:s}=this.options;return s?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;let{layoutId:s}=this.options;return s?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let c={};l.z&&hX("z",i,c,this.animationValues);for(let u=0;u<mX.length;u++)hX(`rotate${mX[u]}`,i,c,this.animationValues),hX(`skew${mX[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return $ft;let c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=JP(i?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=JP(i?.pointerEvents)||""),this.hasProjected&&!Wv(this.latestValues)&&(h.transform=u?u({},""):"none",this.hasProjected=!1),h}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Hbe(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));let{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let h in iI){if(f[h]===void 0)continue;let{correct:g,applyTo:v}=iI[h],y=c.transform==="none"?f[h]:g(f[h],d);if(v){let x=v.length;for(let w=0;w<x;w++)c[v[w]]=y}else c[h]=y}return this.options.layoutId&&(c.pointerEvents=d===this?JP(i?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var s;return(s=i.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach($be),this.root.sharedNodes.clear()}}}function Wft(e){e.updateLayout()}function Gft(e){var t;let r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:o}=e.layout,{animationType:a}=e.options,i=r.source!==e.layout.source;a==="size"?td(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Gl(f);f.min=n[d].min,f.max=f.min+p}):Zbe(a,r.layoutBox,n)&&td(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Gl(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});let s=hC();II(s,n,r.layoutBox);let l=hC();i?II(l,e.applyTransform(o,!0),r.measuredBox):II(l,n,r.layoutBox);let c=!uX(s),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:p}=d;if(f&&p){let m=na();kI(m,r.layoutBox,f.layoutBox);let h=na();kI(h,n,p.layoutBox),dX(m,h)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Kft(e){jL&&vC.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Xft(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Yft(e){e.clearSnapshot()}function $be(e){e.clearMeasurements()}function Qft(e){e.isLayoutDirty=!1}function Zft(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qbe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jft(e){e.resolveTargetDelta()}function ept(e){e.calcProjection()}function tpt(e){e.resetSkewAndRotation()}function rpt(e){e.removeLeadSnapshot()}function Wbe(e,t,r){e.translate=wn(t.translate,0,r),e.scale=wn(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Gbe(e,t,r,n){e.min=wn(t.min,r.min,n),e.max=wn(t.max,r.max,n)}function npt(e,t,r,n){Gbe(e.x,t.x,r.x,n),Gbe(e.y,t.y,r.y,n)}function opt(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var apt={duration:.45,ease:[.4,0,.1,1]},Kbe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xbe=Kbe("applewebkit/")&&!Kbe("chrome/")?Math.round:Ho;function Ybe(e){e.min=Xbe(e.min),e.max=Xbe(e.max)}function ipt(e){Ybe(e.x),Ybe(e.y)}function Zbe(e,t,r){return e==="position"||e==="preserve-aspect"&&!ebe(fX(t),fX(r),.2)}function spt(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var Jbe=SV({attachResizeListener:(e,t)=>$v(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var gX={current:void 0},PV=SV({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!gX.current){let e=new Jbe({});e.mount(window),e.setOptions({layoutScroll:!0}),gX.current=e}return gX.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var e0e={pan:{Feature:vV},drag:{Feature:gV,ProjectionNode:PV,MeasureLayout:yV}};function t0e(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&Wr.postRender(()=>a(t,qv(t)))}var IV=class extends bl{mount(){let{current:t}=this.node;t&&(this.unmount=E7(t,r=>(t0e(this.node,r,"Start"),n=>t0e(this.node,n,"End"))))}unmount(){}};var kV=class extends bl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$h($v(this.node.current,"focus",()=>this.onFocus()),$v(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function r0e(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&Wr.postRender(()=>a(t,qv(t)))}var RV=class extends bl{mount(){let{current:t}=this.node;t&&(this.unmount=O7(t,r=>(r0e(this.node,r,"Start"),(n,{success:o})=>r0e(this.node,n,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var yX=new WeakMap,vX=new WeakMap,lpt=e=>{let t=yX.get(e.target);t&&t(e)},cpt=e=>{e.forEach(lpt)};function upt({root:e,...t}){let r=e||document;vX.has(r)||vX.set(r,{});let n=vX.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(cpt,{root:e,...t})),n[o]}function n0e(e,t,r){let n=upt(t);return yX.set(e,r),n.observe(e),()=>{yX.delete(e),n.unobserve(e)}}var dpt={some:0,all:1},NV=class extends bl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:dpt[o]},s=l=>{let{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);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return n0e(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(fpt(t,r))&&this.startObserver()}unmount(){}};function fpt({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var o0e={inView:{Feature:NV},tap:{Feature:RV},focus:{Feature:kV},hover:{Feature:IV}};var a0e={layout:{ProjectionNode:PV,MeasureLayout:yV}};var u0e=E(ce(),1);var $L={current:null},MV={current:!1};function i0e(){if(MV.current=!0,!!WP)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$L.current=e.matches;e.addListener(t),t()}else $L.current=!1}var ppt=[...$7,xs,lu],s0e=e=>ppt.find(K3(e));var Gv=new WeakMap;function l0e(e,t,r){for(let n in t){let o=t[n],a=r[n];if(qn(o))e.addValue(n,o);else if(qn(a))e.addValue(n,Cm(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,Cm(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var c0e=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],MI=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mb,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=()=>{let p=Cc.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Wr.render(this.render,!1,!0))};let{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=iC(r),this.isVariantNode=f3(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let m=f[p];l[p]!==void 0&&qn(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Gv.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),MV.current||i0e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$L.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Gv.delete(this.current),this.projection&&this.projection.unmount(),iu(this.notifyUpdate),iu(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=ed.has(t),o=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Wr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),a(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uv){let r=Uv[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let a=this.features[t];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):na()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<c0e.length;n++){let o=c0e[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=l0e(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Cm(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(G3(o)||$3(o))?o=parseFloat(o):!s0e(o)&&lu.test(r)&&(o=W3(t,r)),this.setBaseTarget(t,qn(o)?o.get():o)),qn(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o;if(typeof n=="string"||typeof n=="object"){let i=ZP(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!qn(a)?a:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ub),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var TI=class extends MI{constructor(){super(...arguments),this.KeyframeResolver=yI}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;qn(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function mpt(e){return window.getComputedStyle(e)}var AI=class extends TI{constructor(){super(...arguments),this.type="html",this.renderInstance=w3}readValueFromInstance(t,r){if(ed.has(r)){let n=vI(r);return n&&n.default||0}else{let n=mpt(t),o=(y3(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return iX(t,r)}build(t,r,n){rI(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return sI(t,r,n)}};var LI=class extends TI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=na}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ed.has(r)){let n=vI(r);return n&&n.default||0}return r=C3.has(r)?r:KP(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return I3(t,r,n)}build(t,r,n){nI(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){S3(t,r,n,o)}mount(t){this.isSVGTag=aI(t.tagName),super.mount(t)}};var d0e=(e,t)=>QP(e)?new LI(t):new AI(t,{allowProjection:e!==u0e.Fragment});var f0e=Gye({...jxe,...o0e,...e0e,...a0e},d0e);var ne=pye(f0e);var EI=E(ce(),1);function Fa(e){let t=yl(()=>Cm(e)),{isStatic:r}=(0,EI.useContext)(_h);if(r){let[,n]=(0,EI.useState)(e);(0,EI.useEffect)(()=>t.on("change",n),[])}return t}function TV(e,t){let r=Fa(t()),n=()=>r.set(t());return n(),Fh(()=>{let o=()=>Wr.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),iu(n)}}),r}var xb=E(ce(),1);function p0e(e){return typeof e=="number"?e:parseFloat(e)}function qh(e,t={}){let{isStatic:r}=(0,xb.useContext)(_h),n=(0,xb.useRef)(null),o=Fa(qn(e)?p0e(e.get()):e),a=(0,xb.useRef)(o.get()),i=(0,xb.useRef)(()=>{}),s=()=>{let c=n.current;c&&c.time===0&&c.sample(Si.delta),l(),n.current=Dxe({keyframes:[o.get(),a.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{n.current&&n.current.stop()};return(0,xb.useInsertionEffect)(()=>o.attach((c,u)=>r?u(c):(a.current=c,i.current=u,Wr.update(s),o.get()),l),[JSON.stringify(t)]),Fh(()=>{if(qn(e))return e.on("change",c=>o.set(p0e(c)))},[o]),o}var hpt=e=>e&&typeof e=="object"&&e.mix,gpt=e=>hpt(e)?e.mix:void 0;function m0e(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=rV(o,a,{mixer:gpt(a[0]),...i});return t?s(n):s}function h0e(e){mI.current=[],e();let t=TV(mI.current,e);return mI.current=void 0,t}function Sc(e,t,r,n){if(typeof e=="function")return h0e(e);let o=typeof t=="function"?t:m0e(t,r,n);return Array.isArray(e)?g0e(e,o):g0e([e],([a])=>o(a))}function g0e(e,t){let r=yl(()=>[]);return TV(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function vpt(e){e.values.forEach(t=>t.stop())}function xX(e,t){[...t].reverse().forEach(n=>{let o=e.getVariant(n);o&&DL(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{xX(a,t)})})}function ypt(e,t){if(Array.isArray(t))return xX(e,t);if(typeof t=="string")return xX(e,[t]);DL(e,t)}function v0e(){let e=!1,t=new Set,r={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,o){Fi(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let a=[];return t.forEach(i=>{a.push(sV(i,n,{transitionOverride:o}))}),Promise.all(a)},set(n){return Fi(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(o=>{ypt(o,n)})},stop(){t.forEach(n=>{vpt(n)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}var y0e=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};function AV(e,t){return tV(e)?e[y0e(0,e.length,t)]:e}function qL(e){return typeof e=="object"&&!Array.isArray(e)}function LV(e,t,r,n){return typeof e=="string"&&qL(t)?EL(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function x0e(e,t,r){return e*(t+1)}function bX(e,t,r,n){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:(o=n.get(t))!==null&&o!==void 0?o:e}function xpt(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(cb(e,o),n--)}}function b0e(e,t,r,n,o,a){xpt(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:wn(o,a,n[i]),easing:AV(r,i)})}function w0e(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function C0e(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var bpt="easeInOut",wpt=20;function I0e(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,bX(d,m.at,u,c));continue}let[h,g,v={}]=m;v.at!==void 0&&(d=bX(d,v.at,u,c));let y=0,x=(w,b,C,S=0,k=0)=>{let T=Cpt(w),{delay:O=0,times:M=oV(T),type:N="keyframes",repeat:U,repeatType:F,repeatDelay:P=0,...I}=b,{ease:R=t.ease||"easeOut",duration:A}=b,D=typeof O=="function"?O(S,k):O,B=T.length,V=Hh(N)?N:o?.[N];if(B<=2&&V){let z=100;if(B===2&&Ipt(T)){let K=T[1]-T[0];z=Math.abs(K)}let W={...I};A!==void 0&&(W.duration=Ci(A));let H=R3(W,z,V);R=H.ease,A=H.duration}A??(A=a);let L=d+D;M.length===1&&M[0]===0&&(M[1]=1);let j=M.length-T.length;if(j>0&&nV(M,j),T.length===1&&T.unshift(null),U){Fi(U<wpt,"Repeat count too high, must be less than 20"),A=x0e(A,U);let z=[...T],W=[...M];R=Array.isArray(R)?[...R]:[R];let H=[...R];for(let K=0;K<U;K++){T.push(...z);for(let G=0;G<z.length;G++)M.push(W[G]+(K+1)),R.push(G===0?"linear":AV(H,G-1))}w0e(M,U)}let $=L+A;b0e(C,T,R,M,L,$),y=Math.max(D+A,y),f=Math.max($,f)};if(qn(h)){let w=S0e(h,s);x(g,v,P0e("default",w))}else{let w=LV(h,g,n,l),b=w.length;for(let C=0;C<b;C++){g=g,v=v;let S=w[C],k=S0e(S,s);for(let T in g)x(g[T],Spt(v,T),P0e(T,k),C,b)}}u=d,d+=y}return s.forEach((p,m)=>{for(let h in p){let g=p[h];g.sort(C0e);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:C,value:S,easing:k}=g[b];v.push(S),y.push(au(0,f,C)),x.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(bpt)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[h]=v,w.transition[h]={...t,duration:f,ease:x,times:y,...r}}}),i}function S0e(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function P0e(e,t){return t[e]||(t[e]=[]),t[e]}function Cpt(e){return Array.isArray(e)?e:[e]}function Spt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ppt=e=>typeof e=="number",Ipt=e=>e.every(Ppt);function kpt(e,t){return e in t}var EV=class extends MI{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(kpt(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return na()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function k0e(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=bV(e)?new LI(t):new AI(t);r.mount(e),Gv.set(e,r)}function R0e(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new EV(t);r.mount(e),Gv.set(e,r)}function Rpt(e,t){return qn(e)||typeof e=="number"||typeof e=="string"&&!qL(t)}function DV(e,t,r,n){let o=[];if(Rpt(e,t))o.push(xV(e,qL(t)&&t.default||t,r&&(r.default||r)));else{let a=LV(e,t,n),i=a.length;Fi(!!i,"No valid elements provided.");for(let s=0;s<i;s++){let l=a[s],c=l instanceof Element?k0e:R0e;Gv.has(l)||c(l);let u=Gv.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...SI(u,{...t,transition:d},{}))}}return o}function N0e(e,t,r){let n=[];return I0e(e,t,r,{spring:wI}).forEach(({keyframes:a,transition:i},s)=>{n.push(...DV(s,a,i))}),n}function Npt(e){return Array.isArray(e)&&e.some(Array.isArray)}function M0e(e){function t(r,n,o){let a=[];Npt(r)?a=N0e(r,n,e):a=DV(r,n,o,e);let i=new sC(a);return e&&e.animations.push(i),i}return t}var oa=M0e();function T0e(){let e=yl(v0e);return Fh(e.mount,[]),e}var OV=T0e;var _V=class{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,r){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,r)})}},Mpt=()=>new _V;function wX(){return yl(Mpt)}var WL={};QF(WL,{Group:()=>E0e,Item:()=>_0e});var CX=E(ue(),1);var DI=E(ce(),1);var A0e=E(ce(),1),FV=(0,A0e.createContext)(null);function L0e(e,t,r,n){if(!n)return e;let o=e.findIndex(u=>u.value===t);if(o===-1)return e;let a=n>0?1:-1,i=e[o+a];if(!i)return e;let s=e[o],l=i.layout,c=wn(l.min,l.max,.5);return a===1&&s.layout.max+r>c||a===-1&&s.layout.min+r<c?txe(e,o,o+a):e}function Tpt({children:e,as:t="ul",axis:r="y",onReorder:n,values:o,...a},i){let s=yl(()=>ne[t]),l=[],c=(0,DI.useRef)(!1);Fi(!!o,"Reorder.Group must be provided a values prop");let u={axis:r,registerItem:(d,f)=>{let p=l.findIndex(m=>d===m.value);p!==-1?l[p].layout=f[r]:l.push({value:d,layout:f[r]}),l.sort(Lpt)},updateOrder:(d,f,p)=>{if(c.current)return;let m=L0e(l,d,f,p);l!==m&&(c.current=!0,n(m.map(Apt).filter(h=>o.indexOf(h)!==-1)))}};return(0,DI.useEffect)(()=>{c.current=!1}),(0,CX.jsx)(s,{...a,ref:i,ignoreStrict:!0,children:(0,CX.jsx)(FV.Provider,{value:u,children:e})})}var E0e=(0,DI.forwardRef)(Tpt);function Apt(e){return e.value}function Lpt(e,t){return e.layout.min-t.layout.min}var O0e=E(ue(),1);var BV=E(ce(),1);function D0e(e,t=0){return qn(e)?e:Fa(t)}function Ept({children:e,style:t={},value:r,as:n="li",onDrag:o,layout:a=!0,...i},s){let l=yl(()=>ne[n]),c=(0,BV.useContext)(FV),u={x:D0e(t.x),y:D0e(t.y)},d=Sc([u.x,u.y],([h,g])=>h||g?1:"unset");Fi(!!c,"Reorder.Item must be a child of Reorder.Group");let{axis:f,registerItem:p,updateOrder:m}=c;return(0,O0e.jsx)(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:a,onDrag:(h,g)=>{let{velocity:v}=g;v[f]&&m(r,u[f].get(),v[f]),o&&o(h,g)},onLayoutMeasure:h=>p(r,h),ref:s,ignoreStrict:!0,children:e})}var _0e=(0,BV.forwardRef)(Ept);var f3r=bt("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Sm={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},VV={lift:{y:-2,transition:Sm.smooth},scale:{scale:1.05,transition:Sm.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Sm.smooth},rotate:{rotate:2,transition:Sm.bouncy}},F0e={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},p3r={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Sm.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Sm.smooth}},m3r={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Sm.smooth}}},h3r={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Sm.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Sm.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Sm.smooth}};var g3r={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Sm.bouncy};var bb=E(ue(),1),Dpt=bt("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",{variants:{variant:{default:"border-border dark:border-border",outline:"border border-border shadow-none bg-transparent dark:border-border",filled:"border-none bg-secondary dark:bg-secondary shadow-inner",elevated:"border-none shadow-lg dark:shadow-xl dark:shadow-black/20",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-white/10 dark:bg-black/10",neon:"border-2 border-primary/50 shadow-[0_0_15px_rgba(var(--primary),0.5)] dark:shadow-[0_0_20px_rgba(var(--primary),0.7)]",glow:"border border-border shadow-[0_0_30px_rgba(var(--primary),0.15)] dark:shadow-[0_0_40px_rgba(var(--primary),0.25)]"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),qe=Wh.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",enableGlassmorphism:i,enableParallax:s=!1,enableTilt:l=!1,tiltMaxAngle:c=15,parallaxOffset:u=20,children:d,asChild:f,...p},m)=>{let[h,g]=Wh.useState({x:0,y:0}),[v,y]=Wh.useState(!1),x=F=>{if(!l&&!s)return;let P=F.currentTarget.getBoundingClientRect(),I=P.left+P.width/2,R=P.top+P.height/2,A=(F.clientX-I)/(P.width/2),D=(F.clientY-R)/(P.height/2);g({x:A,y:D})},w=()=>y(!0),b=()=>{y(!1),g({x:0,y:0})},C=i?"glass":t,S=l?h.y*-c:0,k=l?h.x*c:0,T=o&&a!=="none"?{whileHover:a==="scale"?VV.scale:a==="glow"?VV.glow:VV.lift,whileTap:F0e.scale}:{},{onDrag:O,onDragStart:M,onDragEnd:N,...U}=p;return(0,bb.jsx)(ne.div,{ref:m,className:_(Dpt({variant:C,size:r,radius:n,interactive:o,className:e})),onMouseMove:x,onMouseEnter:w,onMouseLeave:b,style:{transformStyle:l||s?"preserve-3d":void 0,perspective:l||s?"1000px":void 0},animate:{rotateX:S,rotateY:k},transition:{type:"spring",damping:20,stiffness:300},...T,...U,children:s?(0,bb.jsx)(ne.div,{style:{transform:"translateZ(50px)"},animate:{x:v?h.x*u:0,y:v?h.y*u:0},transition:{type:"spring",damping:20,stiffness:300},children:d}):d})});qe.displayName="MoonUICardPro";var vr=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("flex flex-col space-y-1.5 p-6",e),...t}));vr.displayName="MoonUICardHeaderPro";var _r=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("h3",{ref:r,className:_("text-lg font-semibold leading-none tracking-tight",e),...t}));_r.displayName="MoonUICardTitlePro";var ts=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("p",{ref:r,className:_("text-sm text-muted-foreground",e),...t}));ts.displayName="MoonUICardDescriptionPro";var We=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("p-6 pt-0",e),...t}));We.displayName="MoonUICardContentPro";var UV=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("flex items-center p-6 pt-0",e),...t}));UV.displayName="MoonUICardFooterPro";var Pm=E(ce(),1);var cu=E(ce(),1);var zV=E(ce(),1);function OI(e){let t=zV.useRef({value:e,previous:e});return zV.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var B0e=E(ce(),1);function _I(e){let[t,r]=B0e.useState(void 0);return zn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var rf=E(ue(),1),HV="Checkbox",[Opt,O3r]=Kn(HV),[_pt,SX]=Opt(HV);function Fpt(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=ea({prop:r,defaultProp:o??!1,onChange:l,caller:HV}),[m,h]=cu.useState(null),[g,v]=cu.useState(null),y=cu.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:wb(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,rf.jsx)(_pt,{scope:t,...w,children:Bpt(d)?d(w):n})}var V0e="CheckboxTrigger",U0e=cu.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=SX(V0e,e),h=Wt(o,u),g=cu.useRef(l);return cu.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,rf.jsx)(ot.button,{type:"button",role:"checkbox","aria-checked":wb(l)?"mixed":l,"aria-required":c,"data-state":$0e(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:h,onKeyDown:it(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:it(r,v=>{d(y=>wb(y)?!0:!y),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});U0e.displayName=V0e;var jV=cu.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,rf.jsx)(Fpt,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,rf.jsxs)(rf.Fragment,{children:[(0,rf.jsx)(U0e,{...d,ref:t,__scopeCheckbox:r}),f&&(0,rf.jsx)(j0e,{__scopeCheckbox:r})]})})});jV.displayName=HV;var z0e="CheckboxIndicator",PX=cu.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=SX(z0e,r);return(0,rf.jsx)(Da,{present:n||wb(a.checked)||a.checked===!0,children:(0,rf.jsx)(ot.span,{"data-state":$0e(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});PX.displayName=z0e;var H0e="CheckboxBubbleInput",j0e=cu.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=SX(H0e,e),m=Wt(r,p),h=OI(a),g=_I(n);cu.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(h!==a&&b){let S=new Event("click",{bubbles:C});y.indeterminate=wb(a),b.call(y,wb(a)?!1:a),y.dispatchEvent(S)}},[f,h,a,o]);let v=cu.useRef(wb(a)?!1:a);return(0,rf.jsx)(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});j0e.displayName=H0e;function Bpt(e){return typeof e=="function"}function wb(e){return e==="indeterminate"}function $0e(e){return wb(e)?"indeterminate":e?"checked":"unchecked"}var cp=E(ue(),1),Upt=bt("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Kl=Pm.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=Pm.useState(a);return Pm.useEffect(()=>{d(a)},[a]),(0,cp.jsx)(jV,{ref:c,checked:u?!1:s,className:_(Upt({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,cp.jsx)(PX,{className:_("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,cp.jsx)(ru,{className:"h-[65%] w-[65%]"}):i||(0,cp.jsx)(en,{className:"h-[65%] w-[65%]"})})})});Kl.displayName=jV.displayName;var zpt=Pm.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,cp.jsx)("div",{ref:a,className:_("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));zpt.displayName="CheckboxGroup";var IX=Pm.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,cp.jsx)("label",{ref:i,htmlFor:t,className:_("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));IX.displayName="CheckboxLabel";var Hpt=Pm.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=Pm.useId(),s=e||i;return(0,cp.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,cp.jsx)(IX,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,cp.jsx)(Kl,{ref:a,id:s,...o}),r==="end"&&(0,cp.jsx)(IX,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});Hpt.displayName="CheckboxWithLabel";var Bi=E(ce(),1);var Cn=E(ue(),1),$V=Bi.forwardRef(({className:e,variant:t="default",size:r="md",animationMode:n="smooth",autoCollapseAfter:o,onToggleChange:a,persistKey:i,loading:s,progress:l,badge:c,badgeVariant:u="default",shortcut:d,lazy:f,open:p,defaultOpen:m,onOpenChange:h,children:g,disabled:v},y)=>{let[x,w]=Bi.useState(()=>{if(i&&typeof window<"u"){let O=localStorage.getItem(`collapsible-${i}`);if(O!==null)return O==="true"}return m||!1}),[b,C]=Bi.useState(!f),S=p!==void 0?p:x,k=Bi.useCallback(O=>{s||(w(O),h?.(O),a?.(O),i&&typeof window<"u"&&localStorage.setItem(`collapsible-${i}`,String(O)),f&&O&&!b&&C(!0),O&&o&&setTimeout(()=>{w(!1),h?.(!1),a?.(!1)},o))},[s,h,a,i,f,b,o]);Bi.useEffect(()=>{if(d){let O=M=>{let N=d.toLowerCase().split("+"),U=N.includes("ctrl")||N.includes("cmd"),F=N.includes("shift"),P=N.includes("alt"),I=N[N.length-1];M.ctrlKey===U&&M.shiftKey===F&&M.altKey===P&&M.key.toLowerCase()===I&&(M.preventDefault(),k(!S))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)}},[d,S,k]);let T=l?188.4-188.4*l/100:188.4;return(0,Cn.jsxs)("div",{className:_("relative",t==="bordered"&&"border border-border rounded-lg",t==="elevated"&&"border border-border rounded-lg shadow-lg hover:shadow-xl transition-shadow",t==="gradient"&&"rounded-lg bg-gradient-to-r from-primary/5 via-accent/5 to-secondary/5",t==="glassmorphism"&&"rounded-lg backdrop-blur-md bg-white/10 border border-white/20",t==="card"&&"border border-border rounded-lg bg-card",s&&"opacity-60 pointer-events-none",e),children:[l!==void 0&&(0,Cn.jsxs)("div",{className:"absolute top-2 right-2 w-6 h-6 z-10",children:[(0,Cn.jsxs)("svg",{className:"w-6 h-6 -rotate-90",viewBox:"0 0 64 64",children:[(0,Cn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-muted-foreground/20"}),(0,Cn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"188.4",strokeDashoffset:T,strokeLinecap:"round",className:"text-primary transition-all duration-500"})]}),(0,Cn.jsx)("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-medium",children:Math.round(l)})]}),c&&(0,Cn.jsx)("div",{className:"absolute -top-3 right-4 z-20",children:(0,Cn.jsx)("div",{className:_("text-xs px-2.5 py-1 rounded-full font-semibold shadow-md",u==="default"&&"bg-background text-foreground border border-border",u==="primary"&&"bg-primary text-primary-foreground",u==="secondary"&&"bg-secondary text-secondary-foreground",u==="success"&&"bg-green-500 text-white",u==="warning"&&"bg-amber-500 text-white",u==="danger"&&"bg-red-500 text-white",u==="info"&&"bg-blue-500 text-white"),children:c})}),s&&(0,Cn.jsx)("div",{className:"absolute top-1/2 right-4 -translate-y-1/2 z-10",children:(0,Cn.jsx)(Rr,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),(0,Cn.jsx)(k4,{ref:y,open:S,onOpenChange:k,disabled:v||s,className:_("w-full",n==="spring"&&"[&_[data-state=open]]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",n==="bounce"&&"[&_[data-state=open]]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",n==="fade"&&"[&_[data-state=open]]:animate-[collapsible-down_0.2s_ease-in-out]",n==="slide"&&"[&_[data-state=open]]:animate-[slide-down_0.3s_ease-out]"),children:(0,Cn.jsx)(kX.Provider,{value:{variant:t,size:r,animationMode:n,lazy:f&&!b,shortcut:d},children:g})})]})});$V.displayName="MoonUICollapsiblePro";var kX=Bi.createContext({}),GL=bt("flex w-full items-center gap-3 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"text-foreground hover:text-primary",bordered:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",elevated:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",gradient:"text-foreground hover:text-primary",glassmorphism:"text-foreground hover:text-primary hover:bg-white/10",card:"text-foreground hover:text-primary hover:bg-accent/5 rounded-t-lg"},size:{xs:"text-xs py-2 px-3 min-h-[2.5rem]",sm:"text-sm py-2.5 px-3.5 min-h-[3rem]",md:"text-base py-3 px-4 min-h-[3.5rem]",lg:"text-lg py-4 px-5 min-h-[4rem]",xl:"text-xl py-5 px-6 min-h-[4.5rem]"}},defaultVariants:{variant:"default",size:"md"}}),qV=Bi.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,leftIcon:a,rightIcon:i,description:s,external:l,customChevron:c,hideChevron:u,status:d,...f},p)=>{let{variant:m,size:h,shortcut:g}=Bi.useContext(kX),v=r||m||"default",y=n||h||"md",x=d&&{success:(0,Cn.jsx)(Xs,{className:"h-4 w-4 text-green-500"}),warning:(0,Cn.jsx)(Tn,{className:"h-4 w-4 text-amber-500"}),error:(0,Cn.jsx)(co,{className:"h-4 w-4 text-red-500"}),info:(0,Cn.jsx)(tu,{className:"h-4 w-4 text-blue-500"})}[d];return o?(0,Cn.jsx)(rA,{ref:p,className:_(GL({variant:v,size:y}),e),asChild:o,...f,children:t}):(0,Cn.jsxs)(rA,{ref:p,className:_(GL({variant:v,size:y}),"[&[data-state=open]>.chevron]:rotate-180","[&[data-state=open]]:text-primary",e),...f,children:[a&&(0,Cn.jsx)("span",{className:"text-muted-foreground",children:a}),x&&!a&&x,(0,Cn.jsxs)("div",{className:"flex-1 text-left",children:[(0,Cn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Cn.jsx)("span",{className:"font-medium",children:t}),l&&(0,Cn.jsx)(eu,{className:"h-3 w-3 text-muted-foreground"})]}),s&&(0,Cn.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:s})]}),(0,Cn.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,Cn.jsx)("kbd",{className:"hidden sm:inline-flex h-6 px-2 items-center rounded border bg-muted text-xs font-medium text-muted-foreground",children:g}),i&&(0,Cn.jsx)("span",{className:"text-muted-foreground",children:i}),!u&&(0,Cn.jsx)("span",{className:"chevron transition-transform duration-200 text-muted-foreground",children:c||(0,Cn.jsx)(ta,{className:"h-4 w-4"})})]})]})});qV.displayName="MoonUICollapsibleTriggerPro";var WV=bt("overflow-hidden transition-all",{variants:{variant:{default:"text-muted-foreground",bordered:"text-muted-foreground border-x border-b border-border rounded-b-lg",elevated:"text-muted-foreground bg-muted/20",gradient:"text-muted-foreground",glassmorphism:"text-muted-foreground bg-white/5",card:"text-muted-foreground border-x border-b border-border rounded-b-lg bg-card/50"},size:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"}},defaultVariants:{variant:"default",size:"md"}}),GV=Bi.forwardRef(({className:e,children:t,variant:r,size:n,contentLoading:o,loadContent:a,noPadding:i,padding:s,...l},c)=>{let{variant:u,size:d,animationMode:f,lazy:p}=Bi.useContext(kX),m=r||u||"default",h=n||d||"md",[g,v]=Bi.useState(null),[y,x]=Bi.useState(!1);Bi.useEffect(()=>{a&&!g&&(x(!0),a().then(v).finally(()=>x(!1)))},[a,g]);let w=!i&&{xs:"p-3",sm:"p-3.5",md:"p-4",lg:"p-5",xl:"p-6"}[h];return(0,Cn.jsx)(R4,{ref:c,className:_(WV({variant:m,size:h}),f==="spring"&&"data-[state=closed]:animate-[collapsible-up_0.3s_cubic-bezier(0.34,1.56,0.64,1)] data-[state=open]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",f==="bounce"&&"data-[state=closed]:animate-[collapsible-up_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)] data-[state=open]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",f==="fade"&&"data-[state=closed]:animate-[collapsible-up_0.2s_ease-in-out] data-[state=open]:animate-[collapsible-down_0.2s_ease-in-out]",f==="slide"&&"data-[state=closed]:animate-[slide-up_0.3s_ease-out] data-[state=open]:animate-[slide-down_0.3s_ease-out]",f==="smooth"&&"data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",e),...l,children:(0,Cn.jsx)("div",{className:_(s||w),children:p?(0,Cn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,Cn.jsx)(xn,{className:"h-4 w-4 animate-pulse"}),(0,Cn.jsx)("span",{className:"text-sm",children:"Click to load content..."})]}):o||y?(0,Cn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,Cn.jsx)(Rr,{className:"h-4 w-4 animate-spin"}),(0,Cn.jsx)("span",{className:"text-sm",children:"Loading content..."})]}):g||t})})});GV.displayName="MoonUICollapsibleContentPro";var q0e=()=>{let[e,t]=Bi.useState({openCount:0,lastOpened:null,totalTimeOpen:0}),r=Bi.useCallback(()=>{t(o=>({...o,openCount:o.openCount+1,lastOpened:new Date}))},[]),n=Bi.useCallback(()=>{t(o=>{if(o.lastOpened){let a=Date.now()-o.lastOpened.getTime();return{...o,totalTimeOpen:o.totalTimeOpen+a,lastOpened:null}}return o})},[]);return{analytics:e,trackOpen:r,trackClose:n}};var G0e=E(ce(),1);var FI=E(ce(),1),KV="moonui_license_cache",jpt=24*60*60*1e3,W0e=7*24*60*60*1e3;function pt(){let[e,t]=(0,FI.useState)(!0),[r,n]=(0,FI.useState)(!1),[o,a]=(0,FI.useState)(!1);(0,FI.useEffect)(()=>{(async()=>{try{let c=localStorage.getItem(KV);if(c){let u=JSON.parse(c),d=Date.now();if(d-u.timestamp<jpt){n(u.valid&&u.hasLifetimeAccess),a(u.valid),t(!1);return}if(d-u.timestamp<W0e){s().catch(()=>{n(u.valid&&u.hasLifetimeAccess),a(u.valid)}),t(!1);return}}await s()}catch(c){console.error("License check error:",c),n(!1),a(!1)}finally{t(!1)}})()},[]);let i=async()=>{return process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN||process.env.MOONUI_LICENSE_KEY||null;if(!1&&typeof window>"u")try{}catch(u){}},s=async()=>{let l=await i();if(!l){n(!1),a(!1);return}try{let c=await fetch("https://moonui.dev/api/auth/validate",{headers:{Authorization:`Bearer ${l}`}});if(c.ok){let u=await c.json(),d={valid:u.valid,hasLifetimeAccess:u.user?.hasLifetimeAccess||!1,timestamp:Date.now(),cacheUntil:u.cacheUntil?new Date(u.cacheUntil).getTime():void 0};localStorage.setItem(KV,JSON.stringify(d)),n(u.valid&&(u.user?.hasLifetimeAccess||u.user?.features?.includes("pro_components"))),a(u.valid)}else localStorage.removeItem(KV),n(!1),a(!1)}catch{let u=localStorage.getItem(KV);if(u){let d=JSON.parse(u);if(Date.now()-d.timestamp<W0e){n(d.valid&&d.hasLifetimeAccess),a(d.valid);return}}n(!1),a(!1)}};return{isLoading:e,isAuthenticated:o,isAdmin:!1,hasProAccess:r,subscriptionPlan:r?"lifetime":"free",subscription:{status:r?"active":"inactive",plan:r?"lifetime":"free"}}}var wl=E(ue(),1);function Sn({componentName:e="Pro Component",className:t,compact:r=!1}){return r?(0,wl.jsxs)("div",{className:_("flex flex-col items-center justify-center p-4 text-center","rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700","bg-gray-50/50 dark:bg-gray-900/50",t),children:[(0,wl.jsx)(jt,{className:"h-8 w-8 text-gray-400 dark:text-gray-600 mb-2"}),(0,wl.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"API Key Required"}),(0,wl.jsx)("a",{href:"https://moonui.dev/docs/authentication",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline font-medium mt-1",children:"Setup API Keys \u2192"})]}):(0,wl.jsxs)("div",{className:_("flex flex-col items-center justify-center","rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700","bg-gradient-to-b from-gray-50 to-gray-100/50 dark:from-gray-900 dark:to-gray-950/50","p-8 text-center min-h-[200px]",t),children:[(0,wl.jsxs)("div",{className:"relative",children:[(0,wl.jsx)("div",{className:"absolute inset-0 bg-primary/20 blur-xl rounded-full"}),(0,wl.jsx)(jt,{className:"relative h-12 w-12 text-gray-400 dark:text-gray-600 mb-4"})]}),(0,wl.jsx)("h3",{className:"text-lg font-semibold mb-2",children:e}),(0,wl.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4 max-w-sm",children:"API key configuration required for Pro components"}),(0,wl.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,wl.jsxs)("a",{href:"https://moonui.dev/docs/authentication",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:[(0,wl.jsx)(jt,{className:"h-3 w-3"}),"Setup API Keys"]}),(0,wl.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,wl.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Add MOONUI_LICENSE_KEY to .env"}),(0,wl.jsx)("a",{href:"https://moonui.dev/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline",children:"View Pro Plans \u2192"})]})]})]})}var Gh=E(ue(),1),$pt=["#000000","#374151","#EF4444","#F97316","#F59E0B","#EAB308","#22C55E","#10B981","#06B6D4","#3B82F6","#6366F1","#8B5CF6","#A855F7","#D946EF","#EC4899","#F43F5E"],BI=({value:e="#000000",onChange:t,className:r,showInput:n=!1,showPresets:o=!0,size:a="default",presets:i=$pt})=>{let{hasProAccess:s,isLoading:l}=pt(),[c,u]=(0,G0e.useState)(e),d=p=>{u(p),t?.(p)},f={sm:"w-6 h-6",default:"w-8 h-8",lg:"w-10 h-10"};return!l&&!s?(0,Gh.jsx)(Sn,{componentName:"Color Picker",compact:!0}):(0,Gh.jsxs)("div",{className:_("flex flex-col gap-2",r),children:[n&&(0,Gh.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Gh.jsx)("input",{type:"color",value:c,onChange:p=>d(p.target.value),className:_("rounded border cursor-pointer",f[a]||f.default)}),(0,Gh.jsx)("input",{type:"text",value:c,onChange:p=>d(p.target.value),className:"px-2 py-1 border rounded text-sm font-mono",placeholder:"#000000"})]}),!n&&(0,Gh.jsx)("input",{type:"color",value:c,onChange:p=>d(p.target.value),className:_("rounded border cursor-pointer",f[a]||f.default)}),o&&i&&i.length>0&&(0,Gh.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(p=>(0,Gh.jsx)("button",{type:"button",onClick:()=>d(p),className:_("w-6 h-6 rounded border-2 hover:scale-110 transition-transform",c===p?"border-gray-900 dark:border-gray-100":"border-transparent"),style:{backgroundColor:p}},p))})]})};var _b=E(ce(),1),ki=E(ce(),1);var K0e=1,qpt=.9,Wpt=.8,Gpt=.17,RX=.1,NX=.999,Kpt=.9999,Xpt=.99,Ypt=/[\\\/_+.#"@\[\(\{&]/,Qpt=/[\\\/_+.#"@\[\(\{&]/g,Zpt=/[\s-]/,Y0e=/[\s-]/g;function MX(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?K0e:Xpt;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,m;c>=0;)d=MX(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=K0e:Ypt.test(e.charAt(c-1))?(d*=Wpt,p=e.slice(o,c-1).match(Qpt),p&&o>0&&(d*=Math.pow(NX,p.length))):Zpt.test(e.charAt(c-1))?(d*=qpt,m=e.slice(o,c-1).match(Y0e),m&&o>0&&(d*=Math.pow(NX,m.length))):(d*=Gpt,o>0&&(d*=Math.pow(NX,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=Kpt)),(d<RX&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=MX(e,t,r,n,c+1,a+2,i),f*RX>d&&(d=f*RX)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function X0e(e){return e.toLowerCase().replace(Y0e," ")}function Q0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,MX(e,t,X0e(e),X0e(t),0,0,{})}var ba=E(ce(),1);var nVr=!!(typeof window<"u"&&window.document&&window.document.createElement);function Kh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var Pi=E(ce(),1);var Z0e=E(ce(),1);function XV(e,t=globalThis?.document){let r=Hn(e);Z0e.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var AX=E(ue(),1),Jpt="DismissableLayer",TX="dismissableLayer.update",emt="dismissableLayer.pointerDownOutside",tmt="dismissableLayer.focusOutside",J0e,twe=Pi.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),LX=Pi.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=Pi.useContext(twe),[u,d]=Pi.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=Pi.useState({}),m=Wt(t,S=>d(S)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,b=omt(S=>{let k=S.target,T=[...c.branches].some(O=>O.contains(k));!w||T||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=amt(S=>{let k=S.target;[...c.branches].some(O=>O.contains(k))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return XV(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),Pi.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(J0e=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),ewe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=J0e)}},[u,f,r,c]),Pi.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),ewe())},[u,c]),Pi.useEffect(()=>{let S=()=>p({});return document.addEventListener(TX,S),()=>document.removeEventListener(TX,S)},[]),(0,AX.jsx)(ot.div,{...l,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Kh(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Kh(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Kh(e.onPointerDownCapture,b.onPointerDownCapture)})});LX.displayName=Jpt;var rmt="DismissableLayerBranch",nmt=Pi.forwardRef((e,t)=>{let r=Pi.useContext(twe),n=Pi.useRef(null),o=Wt(t,n);return Pi.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,AX.jsx)(ot.div,{...e,ref:o})});nmt.displayName=rmt;function omt(e,t=globalThis?.document){let r=Hn(e),n=Pi.useRef(!1),o=Pi.useRef(()=>{});return Pi.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){rwe(emt,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function amt(e,t=globalThis?.document){let r=Hn(e),n=Pi.useRef(!1);return Pi.useEffect(()=>{let o=a=>{a.target&&!n.current&&rwe(tmt,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ewe(){let e=new CustomEvent(TX);document.dispatchEvent(e)}function rwe(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Hx(o,a):o.dispatchEvent(a)}var up=E(ce(),1);var swe=E(ue(),1),EX="focusScope.autoFocusOnMount",DX="focusScope.autoFocusOnUnmount",nwe={bubbles:!1,cancelable:!0},imt="FocusScope",Kv=up.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=up.useState(null),c=Hn(o),u=Hn(a),d=up.useRef(null),f=Wt(t,h=>l(h)),p=up.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;up.useEffect(()=>{if(n){let y=function(C){if(p.paused||!s)return;let S=C.target;s.contains(S)?d.current=S:Cb(d.current,{select:!0})},x=function(C){if(p.paused||!s)return;let S=C.relatedTarget;S!==null&&(s.contains(S)||Cb(d.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(let k of C)k.removedNodes.length>0&&Cb(s)};var h=y,g=x,v=w;document.addEventListener("focusin",y),document.addEventListener("focusout",x);let b=new MutationObserver(w);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),b.disconnect()}}},[n,s,p.paused]),up.useEffect(()=>{if(s){awe.add(p);let h=document.activeElement;if(!s.contains(h)){let v=new CustomEvent(EX,nwe);s.addEventListener(EX,c),s.dispatchEvent(v),v.defaultPrevented||(smt(fmt(lwe(s)),{select:!0}),document.activeElement===h&&Cb(s))}return()=>{s.removeEventListener(EX,c),setTimeout(()=>{let v=new CustomEvent(DX,nwe);s.addEventListener(DX,u),s.dispatchEvent(v),v.defaultPrevented||Cb(h??document.body,{select:!0}),s.removeEventListener(DX,u),awe.remove(p)},0)}}},[s,c,u,p]);let m=up.useCallback(h=>{if(!r&&!n||p.paused)return;let g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(g&&v){let y=h.currentTarget,[x,w]=lmt(y);x&&w?!h.shiftKey&&v===w?(h.preventDefault(),r&&Cb(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),r&&Cb(w,{select:!0})):v===y&&h.preventDefault()}},[r,n,p.paused]);return(0,swe.jsx)(ot.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Kv.displayName=imt;function smt(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Cb(n,{select:t}),document.activeElement!==r)return}function lmt(e){let t=lwe(e),r=owe(t,e),n=owe(t.reverse(),e);return[r,n]}function lwe(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function owe(e,t){for(let r of e)if(!cmt(r,{upTo:t}))return r}function cmt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function umt(e){return e instanceof HTMLInputElement&&"select"in e}function Cb(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&umt(e)&&t&&e.select()}}var awe=dmt();function dmt(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=iwe(e,t),e.unshift(t)},remove(t){e=iwe(e,t),e[0]?.resume()}}}function iwe(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function fmt(e){return e.filter(t=>t.tagName!=="A")}var YV=E(ce(),1),cwe=E(Nh(),1);var uwe=E(ue(),1),pmt="Portal",nf=YV.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=YV.useState(!1);zn(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?cwe.default.createPortal((0,uwe.jsx)(ot.div,{...n,ref:t}),i):null});nf.displayName=pmt;var rd=E(ce(),1);var dwe=E(ce(),1);function mmt(e,t){return dwe.useReducer((r,n)=>t[r][n]??r,e)}var KL=e=>{let{present:t,children:r}=e,n=hmt(t),o=typeof r=="function"?r({present:n.isPresent}):rd.Children.only(r),a=Wt(n.ref,gmt(o));return typeof r=="function"||n.isPresent?rd.cloneElement(o,{ref:a}):null};KL.displayName="Presence";function hmt(e){let[t,r]=rd.useState(),n=rd.useRef(null),o=rd.useRef(e),a=rd.useRef("none"),i=e?"mounted":"unmounted",[s,l]=mmt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return rd.useEffect(()=>{let c=QV(n.current);a.current=s==="mounted"?c:"none"},[s]),zn(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=QV(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),zn(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=QV(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=QV(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:rd.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function QV(e){return e?.animationName||"none"}function gmt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var pwe=E(ce(),1),OX=0;function mwe(){pwe.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fwe()),document.body.insertAdjacentElement("beforeend",e[1]??fwe()),OX++,()=>{OX===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),OX--}},[])}function fwe(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nd=function(){return nd=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},nd.apply(this,arguments)};function ZV(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function hwe(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var n5=E(ce());var Pc=E(ce());var yC="right-scroll-bar-position",xC="width-before-scroll-bar",_X="with-scroll-bars-hidden",FX="--removed-body-scroll-bar-size";function JV(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var gwe=E(ce());function vwe(e,t){var r=(0,gwe.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var e5=E(ce());var vmt=typeof window<"u"?e5.useLayoutEffect:e5.useEffect,ywe=new WeakMap;function BX(e,t){var r=vwe(t||null,function(n){return e.forEach(function(o){return JV(o,n)})});return vmt(function(){var n=ywe.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||JV(s,null)}),a.forEach(function(s){o.has(s)||JV(s,i)})}ywe.set(r,e)},[e]),r}function ymt(e){return e}function xmt(e,t){t===void 0&&(t=ymt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var u=i;i=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function VX(e){e===void 0&&(e={});var t=xmt(null);return t.options=nd({async:!0,ssr:!1},e),t}var xwe=E(ce()),bwe=function(e){var t=e.sideCar,r=ZV(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return xwe.createElement(n,nd({},r))};bwe.isSideCarExport=!0;function UX(e,t){return e.useMedium(t),bwe}var t5=VX();var zX=function(){},XL=Pc.forwardRef(function(e,t){var r=Pc.useRef(null),n=Pc.useState({onScrollCapture:zX,onWheelCapture:zX,onTouchMoveCapture:zX}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,x=e.gapMode,w=ZV(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=f,C=BX([r,t]),S=nd(nd({},w),o);return Pc.createElement(Pc.Fragment,null,u&&Pc.createElement(b,{sideCar:t5,removeScrollBar:c,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?Pc.cloneElement(Pc.Children.only(s),nd(nd({},S),{ref:C})):Pc.createElement(y,nd({},S,{className:l,ref:C}),s))});XL.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};XL.classNames={fullWidth:xC,zeroRight:yC};var Ba=E(ce());var UI=E(ce());var Swe=E(ce());var wwe;var Cwe=function(){if(wwe)return wwe;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bmt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cwe();return t&&e.setAttribute("nonce",t),e}function wmt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cmt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var HX=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bmt())&&(wmt(t,r),Cmt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var jX=function(){var e=HX();return function(t,r){Swe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var YL=function(){var e=jX(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var Smt={left:0,top:0,right:0,gap:0},$X=function(e){return parseInt(e||"",10)||0},Pmt=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$X(r),$X(n),$X(o)]},qX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Smt;var t=Pmt(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var Imt=YL(),VI="data-scroll-locked",kmt=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
69
|
+
`),()=>{document.head.removeChild(u)}},[t]),(0,nye.jsx)(S7,{isPresent:t,childRef:n,sizeRef:o,children:n3.cloneElement(e,{ref:n})})}var iye=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i})=>{let s=yl(tdt),l=(0,oC.useId)(),c=(0,oC.useCallback)(d=>{s.set(d,!0);for(let f of s.values())if(!f)return;n&&n()},[s,n]),u=(0,oC.useMemo)(()=>({id:l,initial:t,isPresent:r,custom:o,onExitComplete:c,register:d=>(s.set(d,!1),()=>s.delete(d))}),a?[Math.random(),c]:[r,c]);return(0,oC.useMemo)(()=>{s.forEach((d,f)=>s.set(f,!1))},[r]),aye.useEffect(()=>{!r&&!s.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,P7.jsx)(oye,{isPresent:r,children:e})),(0,P7.jsx)(rb.Provider,{value:u,children:e})};function tdt(){return new Map}var nb=E(ce(),1);function o3(e=!0){let t=(0,nb.useContext)(rb);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,nb.useId)();(0,nb.useEffect)(()=>{e&&o(a)},[e]);let i=(0,nb.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var a3=E(ce(),1),SL=e=>e.key||"";function I7(e){let t=[];return a3.Children.forEach(e,r=>{(0,a3.isValidElement)(r)&&t.push(r)}),t}var i3=E(ce(),1);var WP=typeof window<"u";var Fh=WP?i3.useLayoutEffect:i3.useEffect;var _t=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1})=>{let[s,l]=o3(i),c=(0,Bh.useMemo)(()=>I7(e),[e]),u=i&&!s?[]:c.map(SL),d=(0,Bh.useRef)(!0),f=(0,Bh.useRef)(c),p=yl(()=>new Map),[m,h]=(0,Bh.useState)(c),[g,v]=(0,Bh.useState)(c);Fh(()=>{d.current=!1,f.current=c;for(let w=0;w<g.length;w++){let b=SL(g[w]);u.includes(b)?p.delete(b):p.get(b)!==!0&&p.set(b,!1)}},[g,u.length,u.join("-")]);let y=[];if(c!==m){let w=[...c];for(let b=0;b<g.length;b++){let C=g[b],S=SL(C);u.includes(S)||(w.splice(b,0,C),y.push(C))}a==="wait"&&y.length&&(w=y),v(I7(w)),h(c);return}let{forceRender:x}=(0,Bh.useContext)(qP);return(0,PL.jsx)(PL.Fragment,{children:g.map(w=>{let b=SL(w),C=i&&!s?!1:c===g||u.includes(b),S=()=>{if(p.has(b))p.set(b,!0);else return;let k=!0;p.forEach(T=>{T||(k=!1)}),k&&(x?.(),v(f.current),i&&l?.(),n&&n())};return(0,PL.jsx)(iye,{isPresent:C,initial:!d.current||r?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:o,mode:a,onExitComplete:C?void 0:S,children:w},b)})})};var Ho=e=>e;var Vv=Ho,Fi=Ho;function aC(e){let t;return()=>(t===void 0&&(t=e()),t)}var au=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Ci=e=>e*1e3,xl=e=>e/1e3;var GP={skipAnimations:!1,useManualTiming:!1};function sye(e){let t=new Set,r=new Set,n=!1,o=!1,a=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(i)}let l={schedule:(c,u=!1,d=!1)=>{let p=d&&n?t:r;return u&&a.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),a.delete(c)},process:c=>{if(i=c,n){o=!0;return}n=!0,[t,r]=[r,t],t.forEach(s),t.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var s3=["read","resolveKeyframes","update","preRender","render","postRender"],rdt=40;function l3(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=s3.reduce((v,y)=>(v[y]=sye(a),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{let v=GP.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(v-o.timestamp,rdt),1),o.timestamp=v,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(p))},m=()=>{r=!0,n=!0,o.isProcessing||e(p)};return{schedule:s3.reduce((v,y)=>{let x=i[y];return v[y]=(w,b=!1,C=!1)=>(r||m(),x.schedule(w,b,C)),v},{}),cancel:v=>{for(let y=0;y<s3.length;y++)i[s3[y]].cancel(v)},state:o,steps:i}}var{schedule:Wr,cancel:iu,state:Si,steps:c3}=l3(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ho,!0);var lye=E(ce(),1),u3=(0,lye.createContext)({strict:!1});var cye={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"]},Uv={};for(let e in cye)Uv[e]={isEnabled:t=>cye[e].some(r=>!!t[r])};function uye(e){for(let t in e)Uv[t]={...Uv[t],...e[t]}}var ndt=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 IL(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ndt.has(e)}var dye=e=>!IL(e);function odt(e){e&&(dye=t=>t.startsWith("on")?!IL(t):e(t))}try{odt(Cfe("@emotion/is-prop-valid").default)}catch{}function fye(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(dye(o)||r===!0&&IL(o)||!t&&!IL(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function pye(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}var g3=E(ue(),1);var YP=E(ce(),1);var mye=E(ce(),1),ob=(0,mye.createContext)({});var p3=E(ce(),1);function zv(e){return typeof e=="string"||Array.isArray(e)}function ab(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var d3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kL=["initial",...d3];function iC(e){return ab(e.animate)||kL.some(t=>zv(e[t]))}function f3(e){return!!(iC(e)||e.variants)}function hye(e,t){if(iC(e)){let{initial:r,animate:n}=e;return{initial:r===!1||zv(r)?r:void 0,animate:zv(n)?n:void 0}}return e.inherit!==!1?t:{}}function vye(e){let{initial:t,animate:r}=hye(e,(0,p3.useContext)(ob));return(0,p3.useMemo)(()=>({initial:t,animate:r}),[gye(t),gye(r)])}function gye(e){return Array.isArray(e)?e.join(" "):e}var yye=Symbol.for("motionComponentSymbol");var xye=E(ce(),1);function Hv(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bye(e,t,r){return(0,xye.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Hv(r)&&(r.current=n))},[t])}var Ju=E(ce(),1);var KP=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var adt="framerAppearId",m3="data-"+KP(adt);var{schedule:XP,cancel:yPr}=l3(queueMicrotask,!1);var wye=E(ce(),1),h3=(0,wye.createContext)({});function Cye(e,t,r,n,o){var a,i;let{visualElement:s}=(0,Ju.useContext)(ob),l=(0,Ju.useContext)(u3),c=(0,Ju.useContext)(rb),u=(0,Ju.useContext)(_h).reducedMotion,d=(0,Ju.useRef)(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:s,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,p=(0,Ju.useContext)(h3);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&idt(d.current,r,o,p);let m=(0,Ju.useRef)(!1);(0,Ju.useInsertionEffect)(()=>{f&&m.current&&f.update(r,c)});let h=r[m3],g=(0,Ju.useRef)(!!h&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,h))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,h)));return Fh(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),XP.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,Ju.useEffect)(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,h)}),g.current=!1))}),f}function idt(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:Sye(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&Hv(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}function Sye(e){if(e)return e.options.allowProjection!==!1?e.projection:Sye(e.parent)}function Pye({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){var a,i;e&&uye(e);function s(c,u){let d,f={...(0,YP.useContext)(_h),...c,layoutId:sdt(c)},{isStatic:p}=f,m=vye(c),h=n(c,p);if(!p&&WP){ldt(f,e);let g=cdt(f);d=g.MeasureLayout,m.visualElement=Cye(o,h,f,t,g.ProjectionNode)}return(0,g3.jsxs)(ob.Provider,{value:m,children:[d&&m.visualElement?(0,g3.jsx)(d,{visualElement:m.visualElement,...f}):null,r(o,c,bye(h,m.visualElement,u),h,p,m.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${(i=(a=o.displayName)!==null&&a!==void 0?a:o.name)!==null&&i!==void 0?i:""})`}`;let l=(0,YP.forwardRef)(s);return l[yye]=o,l}function sdt({layoutId:e}){let t=(0,YP.useContext)(qP).id;return t&&e!==void 0?t+"-"+e:e}function ldt(e,t){let r=(0,YP.useContext)(u3).strict}function cdt(e){let{drag:t,layout:r}=Uv;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var Iye=["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 QP(e){return typeof e!="string"||e.includes("-")?!1:!!(Iye.indexOf(e)>-1||/[A-Z]/u.test(e))}var k7=E(ce(),1);function kye(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function ZP(e,t,r,n){if(typeof t=="function"){let[o,a]=kye(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=kye(n);t=t(r!==void 0?r:e.custom,o,a)}return t}var RL=e=>Array.isArray(e);var Rye=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Nye=e=>RL(e)?e[e.length-1]||0:e;var qn=e=>!!(e&&e.getVelocity);function JP(e){let t=qn(e)?e.get():e;return Rye(t)?t.toValue():t}function udt({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,o,a){let i={latestValues:ddt(n,o,a,e),renderState:t()};return r&&(i.onMount=s=>r({props:n,current:s,...i}),i.onUpdate=s=>r(s)),i}var v3=e=>(t,r)=>{let n=(0,k7.useContext)(ob),o=(0,k7.useContext)(rb),a=()=>udt(e,t,n,o);return r?a():yl(a)};function ddt(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=JP(a[f]);let{initial:i,animate:s}=e,l=iC(e),c=f3(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!ab(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=ZP(e,f[p]);if(m){let{transitionEnd:h,transition:g,...v}=m;for(let y in v){let x=v[y];if(Array.isArray(x)){let w=u?x.length-1:0;x=x[w]}x!==null&&(o[y]=x)}for(let y in h)o[y]=h[y]}}}return o}var Vh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ed=new Set(Vh);var Mye=e=>t=>typeof t=="string"&&t.startsWith(e),y3=Mye("--"),fdt=Mye("var(--"),eI=e=>fdt(e)?pdt.test(e.split("/*")[0].trim()):!1,pdt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var x3=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var Wl=(e,t,r)=>r>t?t:r<e?e:r;var Uh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jv={...Uh,transform:e=>Wl(0,1,e)},NL={...Uh,default:1};var ML=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),zh=ML("deg"),su=ML("%"),ar=ML("px"),Tye=ML("vh"),Aye=ML("vw"),R7={...su,parse:e=>su.parse(e)/100,transform:e=>su.transform(e*100)};var Lye={borderWidth:ar,borderTopWidth:ar,borderRightWidth:ar,borderBottomWidth:ar,borderLeftWidth:ar,borderRadius:ar,radius:ar,borderTopLeftRadius:ar,borderTopRightRadius:ar,borderBottomRightRadius:ar,borderBottomLeftRadius:ar,width:ar,maxWidth:ar,height:ar,maxHeight:ar,top:ar,right:ar,bottom:ar,left:ar,padding:ar,paddingTop:ar,paddingRight:ar,paddingBottom:ar,paddingLeft:ar,margin:ar,marginTop:ar,marginRight:ar,marginBottom:ar,marginLeft:ar,backgroundPositionX:ar,backgroundPositionY:ar};var Eye={rotate:zh,rotateX:zh,rotateY:zh,rotateZ:zh,scale:NL,scaleX:NL,scaleY:NL,scaleZ:NL,skew:zh,skewX:zh,skewY:zh,distance:ar,translateX:ar,translateY:ar,translateZ:ar,x:ar,y:ar,z:ar,perspective:ar,transformPerspective:ar,opacity:jv,originX:R7,originY:R7,originZ:ar};var N7={...Uh,transform:Math.round};var tI={...Lye,...Eye,zIndex:N7,size:ar,fillOpacity:jv,strokeOpacity:jv,numOctaves:N7};var mdt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hdt=Vh.length;function Dye(e,t,r){let n="",o=!0;for(let a=0;a<hdt;a++){let i=Vh[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let c=x3(s,tI[i]);if(!l){o=!1;let u=mdt[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function rI(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(ed.has(l)){i=!0;continue}else if(y3(l)){o[l]=c;continue}else{let u=x3(c,tI[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=Dye(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var gdt={offset:"stroke-dashoffset",array:"stroke-dasharray"},vdt={offset:"strokeDashoffset",array:"strokeDasharray"};function Oye(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?gdt:vdt;e[a.offset]=ar.transform(-n);let i=ar.transform(t),s=ar.transform(r);e[a.array]=`${i} ${s}`}function _ye(e,t,r){return typeof e=="string"?e:ar.transform(t+r*e)}function Fye(e,t,r){let n=_ye(t,e.x,e.width),o=_ye(r,e.y,e.height);return`${n} ${o}`}function nI(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(rI(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(o!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Fye(m,o!==void 0?o:.5,a!==void 0?a:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),i!==void 0&&Oye(f,i,s,l,!1)}var oI=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var b3=()=>({...oI(),attrs:{}});var aI=e=>typeof e=="string"&&e.toLowerCase()==="svg";function w3(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let a in r)e.style.setProperty(a,r[a])}var C3=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 S3(e,t,r,n){w3(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(C3.has(o)?o:KP(o),t.attrs[o])}var iI={};function Bye(e){Object.assign(iI,e)}function P3(e,{layout:t,layoutId:r}){return ed.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!iI[e]||e==="opacity")}function sI(e,t,r){var n;let{style:o}=e,a={};for(let i in o)(qn(o[i])||t.style&&qn(t.style[i])||P3(i,e)||((n=r?.getValue(i))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(a[i]=o[i]);return a}function I3(e,t,r){let n=sI(e,t,r);for(let o in e)if(qn(e[o])||qn(t[o])){let a=Vh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}function ydt(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var Vye=["x","y","width","height","cx","cy","r"],Uye={useVisualState:v3({scrapeMotionValuesFromProps:I3,createRenderState:b3,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:o})=>{if(!r)return;let a=!!e.drag;if(!a){for(let s in o)if(ed.has(s)){a=!0;break}}if(!a)return;let i=!t;if(t)for(let s=0;s<Vye.length;s++){let l=Vye[s];e[l]!==t[l]&&(i=!0)}i&&Wr.read(()=>{ydt(r,n),Wr.render(()=>{nI(n,o,aI(r.tagName),e.transformTemplate),S3(r,n)})})}})};var zye={useVisualState:v3({scrapeMotionValuesFromProps:sI,createRenderState:oI})};var lI=E(ce(),1);var Hye=E(ce(),1);function M7(e,t,r){for(let n in t)!qn(t[n])&&!P3(n,r)&&(e[n]=t[n])}function xdt({transformTemplate:e},t){return(0,Hye.useMemo)(()=>{let r=oI();return rI(r,t,e),Object.assign({},r.vars,r.style)},[t])}function bdt(e,t){let r=e.style||{},n={};return M7(n,r,e),Object.assign(n,xdt(e,t)),n}function jye(e,t){let r={},n=bdt(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}var $ye=E(ce(),1);function qye(e,t,r,n){let o=(0,$ye.useMemo)(()=>{let a=b3();return nI(a,t,aI(n),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};M7(a,e.style,e),o.style={...a,...o.style}}return o}function Wye(e=!1){return(r,n,o,{latestValues:a},i)=>{let l=(QP(r)?qye:jye)(n,a,i,r),c=fye(n,typeof r=="string",e),u=r!==lI.Fragment?{...c,...l,ref:o}:{},{children:d}=n,f=(0,lI.useMemo)(()=>qn(d)?d.get():d,[d]);return(0,lI.createElement)(r,{...u,children:f})}}function Gye(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){let i={...QP(n)?Uye:zye,preloadedFeatures:e,useRender:Wye(o),createVisualElement:t,Component:n};return Pye(i)}}function T7(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function ib(e,t,r){let n=e.getProps();return ZP(n,t,r!==void 0?r:n.custom,e)}var A7=aC(()=>window.ScrollTimeline!==void 0);var TL=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){let n=this.animations.map(o=>{if(A7()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{n.forEach((o,a)=>{o&&o(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var sC=class extends TL{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function sb(e,t){return e?e[t]||e.default||e:void 0}function lC(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function R3(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(lC(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:xl(o)}}function Hh(e){return typeof e=="function"}function AL(e,t){e.timeline=t,e.onfinish=null}var cI=e=>Array.isArray(e)&&typeof e[0]=="number";var L7={linearEasing:void 0};function Kye(e,t){let r=aC(e);return()=>{var n;return(n=L7[t])!==null&&n!==void 0?n:r()}}var lb=Kye(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var LL=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=e(au(0,o-1,a))+", ";return`linear(${n.substring(0,n.length-2)})`};function M3(e){return!!(typeof e=="function"&&lb()||!e||typeof e=="string"&&(e in N3||lb())||cI(e)||Array.isArray(e)&&e.every(M3))}var uI=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,N3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uI([0,.65,.55,1]),circOut:uI([.55,0,1,.45]),backIn:uI([.31,.01,.66,-.59]),backOut:uI([.33,1.53,.69,.99])};function dI(e,t){if(e)return typeof e=="function"&&lb()?LL(e,t):cI(e)?uI(e):Array.isArray(e)?e.map(r=>dI(r,t)||N3.easeOut):N3[e]}var ef={x:!1,y:!1};function fI(){return ef.x||ef.y}function EL(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let a=(n=r?.[e])!==null&&n!==void 0?n:o.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function T3(e,t){let r=EL(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Xye(e){return t=>{t.pointerType==="touch"||fI()||e(t)}}function E7(e,t,r={}){let[n,o,a]=T3(e,r),i=Xye(s=>{let{target:l}=s,c=t(s);if(typeof c!="function"||!l)return;let u=Xye(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var A3=(e,t)=>t?e===t?!0:A3(e,t.parentElement):!1;var cC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var wdt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yye(e){return wdt.has(e.tagName)||e.tabIndex!==-1}var uC=new WeakSet;function Qye(e){return t=>{t.key==="Enter"&&e(t)}}function D7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Zye=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=Qye(()=>{if(uC.has(r))return;D7(r,"down");let o=Qye(()=>{D7(r,"up")}),a=()=>D7(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Jye(e){return cC(e)&&!fI()}function O7(e,t,r={}){let[n,o,a]=T3(e,r),i=s=>{let l=s.currentTarget;if(!Jye(s)||uC.has(l))return;uC.add(l);let c=t(s),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!Jye(p)||!uC.has(l))&&(uC.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{u(p,r.useGlobalTarget||A3(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{!Yye(s)&&s.getAttribute("tabindex")===null&&(s.tabIndex=0),(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),s.addEventListener("focus",c=>Zye(c,o),o)}),a}function _7(e){return e==="x"||e==="y"?ef[e]?null:(ef[e]=!0,()=>{ef[e]=!1}):ef.x||ef.y?null:(ef.x=ef.y=!0,()=>{ef.x=ef.y=!1})}var L3=new Set(["width","height","top","left","right","bottom",...Vh]);var E3;function Cdt(){E3=void 0}var Cc={now:()=>(E3===void 0&&Cc.set(Si.isProcessing||GP.useManualTiming?Si.timestamp:performance.now()),E3),set:e=>{E3=e,queueMicrotask(Cdt)}};function pI(e,t){e.indexOf(t)===-1&&e.push(t)}function cb(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}function txe([...e],t,r){let n=t<0?e.length+t:t;if(n>=0&&n<e.length){let o=r<0?e.length+r:r,[a]=e.splice(t,1);e.splice(o,0,a)}return e}var ub=class{constructor(){this.subscriptions=[]}add(t){return pI(this.subscriptions,t),()=>cb(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function D3(e,t){return t?e*(1e3/t):0}var rxe=30,Sdt=e=>!isNaN(parseFloat(e)),mI={current:void 0},F7=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{let a=Cc.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Cc.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Sdt(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ub);let n=this.events[t].add(r);return t==="change"?()=>{n(),Wr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return mI.current&&mI.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Cc.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rxe)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,rxe);return D3(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 Cm(e,t){return new F7(e,t)}function Pdt(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Cm(r))}function DL(e,t){let r=ib(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=Nye(a[i]);Pdt(e,i,s)}}function nxe(e){return!!(qn(e)&&e.add)}function OL(e,t){let r=e.getValue("willChange");if(nxe(r))return r.add(t)}function O3(e){return e.props[m3]}var _3={current:!1};var oxe=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Idt=1e-7,kdt=12;function Rdt(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=oxe(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>Idt&&++s<kdt);return i}function db(e,t,r,n){if(e===t&&r===n)return Ho;let o=a=>Rdt(a,0,1,e,r);return a=>a===0||a===1?a:oxe(o(a),t,n)}var F3=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var B3=e=>t=>1-e(1-t);var B7=db(.33,1.53,.69,.99),_L=B3(B7),V3=F3(_L);var U3=e=>(e*=2)<1?.5*_L(e):.5*(2-Math.pow(2,-10*(e-1)));var z3=e=>1-Math.sin(Math.acos(e)),H3=B3(z3),j3=F3(z3);var $3=e=>/^0[^.\s]+$/u.test(e);function axe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$3(e):!0}var fb=e=>Math.round(e*1e5)/1e5;var hI=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ixe(e){return e==null}var sxe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var gI=(e,t)=>r=>!!(typeof r=="string"&&sxe.test(r)&&r.startsWith(e)||t&&!ixe(r)&&Object.prototype.hasOwnProperty.call(r,t)),q3=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(hI);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var Ndt=e=>Wl(0,255,e),V7={...Uh,transform:e=>Math.round(Ndt(e))},jh={test:gI("rgb","red"),parse:q3("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+V7.transform(e)+", "+V7.transform(t)+", "+V7.transform(r)+", "+fb(jv.transform(n))+")"};function Mdt(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var FL={test:gI("#"),parse:Mdt,transform:jh.transform};var pb={test:gI("hsl","hue"),parse:q3("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+su.transform(fb(t))+", "+su.transform(fb(r))+", "+fb(jv.transform(n))+")"};var xs={test:e=>jh.test(e)||FL.test(e)||pb.test(e),parse:e=>jh.test(e)?jh.parse(e):pb.test(e)?pb.parse(e):FL.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?jh.transform(e):pb.transform(e)};var lxe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tdt(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hI))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(lxe))===null||r===void 0?void 0:r.length)||0)>0}var uxe="number",dxe="color",Adt="var",Ldt="var(",cxe="${}",Edt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function dC(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(Edt,l=>(xs.test(l)?(n.color.push(a),o.push(dxe),r.push(xs.parse(l))):l.startsWith(Ldt)?(n.var.push(a),o.push(Adt),r.push(l)):(n.number.push(a),o.push(uxe),r.push(parseFloat(l))),++a,cxe)).split(cxe);return{values:r,split:s,indexes:n,types:o}}function fxe(e){return dC(e).values}function pxe(e){let{split:t,types:r}=dC(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===uxe?a+=fb(o[i]):s===dxe?a+=xs.transform(o[i]):a+=o[i]}return a}}var Ddt=e=>typeof e=="number"?0:e;function Odt(e){let t=fxe(e);return pxe(e)(t.map(Ddt))}var lu={test:Tdt,parse:fxe,createTransformer:pxe,getAnimatableNone:Odt};var _dt=new Set(["brightness","contrast","saturate","opacity"]);function Fdt(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(hI)||[];if(!n)return e;let o=r.replace(n,""),a=_dt.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var Bdt=/\b([a-z-]*)\(.*?\)/gu,BL={...lu,getAnimatableNone:e=>{let t=e.match(Bdt);return t?t.map(Fdt).join(" "):e}};var Vdt={...tI,color:xs,backgroundColor:xs,outlineColor:xs,fill:xs,stroke:xs,borderColor:xs,borderTopColor:xs,borderRightColor:xs,borderBottomColor:xs,borderLeftColor:xs,filter:BL,WebkitFilter:BL},vI=e=>Vdt[e];function W3(e,t){let r=vI(e);return r!==BL&&(r=lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Udt=new Set(["auto","none","0"]);function mxe(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!Udt.has(a)&&dC(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=W3(r,o)}var U7=e=>e===Uh||e===ar,hxe=(e,t)=>parseFloat(e.split(", ")[t]),gxe=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/u);if(o)return hxe(o[1],t);{let a=n.match(/^matrix\((.+)\)$/u);return a?hxe(a[1],e):0}},zdt=new Set(["x","y","z"]),Hdt=Vh.filter(e=>!zdt.has(e));function vxe(e){let t=[];return Hdt.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var fC={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gxe(4,13),y:gxe(5,14)};fC.translateX=fC.x;fC.translateY=fC.y;var pC=new Set,z7=!1,H7=!1;function yxe(){if(H7){let e=Array.from(pC).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=vxe(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{var s;(s=n.getValue(a))===null||s===void 0||s.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}H7=!1,z7=!1,pC.forEach(e=>e.complete()),pC.clear()}function xxe(){pC.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(H7=!0)})}function bxe(){xxe(),yxe()}var mb=class{constructor(t,r,n,o,a,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pC.add(this),z7||(z7=!0,Wr.read(xxe),Wr.resolveKeyframes(yxe))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let a=0;a<t.length;a++)if(t[a]===null)if(a===0){let i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){let l=n.readValue(r,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}else t[a]=t[a-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),pC.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,pC.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var G3=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var jdt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $dt(e){let t=jdt.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var qdt=4;function j7(e,t,r=1){Fi(r<=qdt,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=$dt(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return G3(i)?parseFloat(i):i}return eI(o)?j7(o,t,r+1):o}var K3=e=>t=>t.test(e);var wxe={test:e=>e==="auto",parse:e=>e};var $7=[Uh,ar,su,zh,Aye,Tye,wxe],q7=e=>$7.find(K3(e));var yI=class extends mb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),eI(c))){let u=j7(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!L3.has(n)||t.length!==2)return;let[o,a]=t,i=q7(o),s=q7(a);if(i!==s)if(U7(i)&&U7(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)axe(t[o])&&n.push(o);n.length&&mxe(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fC[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:n,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let a=r.getValue(n);a&&a.jump(this.measuredOrigin,!1);let i=o.length-1,s=o[i];o[i]=fC[n](r.measureViewportBox(),window.getComputedStyle(r.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{r.getValue(l).set(c)}),this.resolveNoneKeyframes()}};var W7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lu.test(e)||e==="0")&&!e.startsWith("url("));function Wdt(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Cxe(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=W7(o,t),s=W7(a,t);return Vv(i===s,`You are trying to animate ${t} from "${o}" to "${a}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${a} via the \`style\` property.`),!i||!s?!1:Wdt(e)||(r==="spring"||Hh(r))&&n}var Gdt=e=>e!==null;function hb(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(Gdt),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var Kdt=40,xI=class{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Cc.now(),this.options={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Kdt?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&bxe(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Cc.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:a,delay:i,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Cxe(t,n,o,a))if(_3.current||!i){l&&l(hb(t,this.options,r)),s&&s(),this.resolveFinishedPromise();return}else this.options.duration=0;let u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};var wn=(e,t,r)=>e+(t-e)*r;function G7(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Sxe({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=G7(l,s,e+1/3),a=G7(l,s,e),i=G7(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function bI(e,t){return r=>r>0?t:e}var K7=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},Xdt=[FL,jh,pb],Ydt=e=>Xdt.find(t=>t.test(e));function Pxe(e){let t=Ydt(e);if(Vv(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===pb&&(r=Sxe(r)),r}var X7=(e,t)=>{let r=Pxe(e),n=Pxe(t);if(!r||!n)return bI(e,t);let o={...r};return a=>(o.red=K7(r.red,n.red,a),o.green=K7(r.green,n.green,a),o.blue=K7(r.blue,n.blue,a),o.alpha=wn(r.alpha,n.alpha,a),jh.transform(o))};var Qdt=(e,t)=>r=>t(e(r)),$h=(...e)=>e.reduce(Qdt);var X3=new Set(["none","hidden"]);function Ixe(e,t){return X3.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Zdt(e,t){return r=>wn(e,t,r)}function Y3(e){return typeof e=="number"?Zdt:typeof e=="string"?eI(e)?bI:xs.test(e)?X7:tft:Array.isArray(e)?kxe:typeof e=="object"?xs.test(e)?X7:Jdt:bI}function kxe(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>Y3(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function Jdt(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Y3(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function eft(e,t){var r;let n=[],o={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let i=t.types[a],s=e.indexes[i][o[i]],l=(r=e.values[s])!==null&&r!==void 0?r:0;n[a]=l,o[i]++}return n}var tft=(e,t)=>{let r=lu.createTransformer(t),n=dC(e),o=dC(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?X3.has(e)&&!o.values.length||X3.has(t)&&!n.values.length?Ixe(e,t):$h(kxe(eft(n,o),o.values),r):(Vv(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),bI(e,t))};function Q3(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?wn(e,t,r):Y3(e)(e,t)}var rft=5;function Z3(e,t,r){let n=Math.max(t-rft,0);return D3(r-e(n),t-n)}var _a={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Y7=.001;function Rxe({duration:e=_a.duration,bounce:t=_a.bounce,velocity:r=_a.velocity,mass:n=_a.mass}){let o,a;Vv(e<=Ci(_a.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Wl(_a.minDamping,_a.maxDamping,i),e=Wl(_a.minDuration,_a.maxDuration,xl(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=J3(c,i),m=Math.exp(-d);return Y7-f/p*m},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),h=J3(Math.pow(c,2),i);return(-o(c)+Y7>0?-1:1)*((f-p)*m)/h}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Y7+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=oft(o,a,s);if(e=Ci(e),isNaN(l))return{stiffness:_a.stiffness,damping:_a.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var nft=12;function oft(e,t,r){let n=r;for(let o=1;o<nft;o++)n=n-e(n)/t(n);return n}function J3(e,t){return e*Math.sqrt(1-t*t)}var aft=["duration","bounce"],ift=["stiffness","damping","mass"];function Nxe(e,t){return t.some(r=>e[r]!==void 0)}function sft(e){let t={velocity:_a.velocity,stiffness:_a.stiffness,damping:_a.damping,mass:_a.mass,isResolvedFromDuration:!1,...e};if(!Nxe(e,ift)&&Nxe(e,aft))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*Wl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:_a.mass,stiffness:o,damping:a}}else{let r=Rxe(e);t={...t,...r,mass:_a.mass},t.isResolvedFromDuration=!0}return t}function wI(e=_a.visualDuration,t=_a.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=sft({...r,velocity:-xl(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=i-a,v=xl(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?_a.restSpeed.granular:_a.restSpeed.default),o||(o=y?_a.restDelta.granular:_a.restDelta.default);let x;if(h<1){let b=J3(v,h);x=C=>{let S=Math.exp(-h*v*C);return i-S*((m+h*v*g)/b*Math.sin(b*C)+g*Math.cos(b*C))}}else if(h===1)x=b=>i-Math.exp(-v*b)*(g+(m+v*g)*b);else{let b=v*Math.sqrt(h*h-1);x=C=>{let S=Math.exp(-h*v*C),k=Math.min(b*C,300);return i-S*((m+h*v*g)*Math.sinh(k)+b*g*Math.cosh(k))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=0;h<1&&(S=b===0?Ci(m):Z3(x,b,C));let k=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=k&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(lC(w),2e4),C=LL(S=>w.next(b*S).value,b,30);return b+"ms "+C}};return w}function Q7({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,m=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l,h=r*t,g=d+h,v=i===void 0?g:i(g);v!==g&&(h=v-d);let y=k=>-h*Math.exp(-k/n),x=k=>v+y(k),w=k=>{let T=y(k),O=x(k);f.done=Math.abs(T)<=c,f.value=f.done?v:O},b,C,S=k=>{p(f.value)&&(b=k,C=wI({keyframes:[f.value,m(f.value)],velocity:Z3(x,k,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:k=>{let T=!1;return!C&&b===void 0&&(T=!0,w(k),S(k)),b!==void 0&&k>=b?C.next(k-b):(!T&&w(k),f)}}}var Mxe=db(.42,0,1,1),Txe=db(0,0,.58,1),eV=db(.42,0,.58,1);var tV=e=>Array.isArray(e)&&typeof e[0]!="number";var Axe={linear:Ho,easeIn:Mxe,easeInOut:eV,easeOut:Txe,circIn:z3,circInOut:j3,circOut:H3,backIn:_L,backInOut:V3,backOut:B7,anticipate:U3},Z7=e=>{if(cI(e)){Fi(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return db(t,r,n,o)}else if(typeof e=="string")return Fi(Axe[e]!==void 0,`Invalid easing type '${e}'`),Axe[e];return e};function lft(e,t,r){let n=[],o=r||Q3,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||Ho:t;s=$h(l,s)}n.push(s)}return n}function rV(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Fi(a===t.length,"Both input and output ranges must be the same length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=lft(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=au(e[d],e[d+1],u);return s[d](f)};return r?u=>c(Wl(e[0],e[a-1],u)):c}function nV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=au(0,t,n);e.push(wn(r,1,o))}}function oV(e){let t=[0];return nV(t,e.length-1),t}function Lxe(e,t){return e.map(r=>r*t)}function cft(e,t){return e.map(()=>t||eV).splice(0,e.length-1)}function VL({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=tV(n)?n.map(Z7):Z7(n),a={done:!1,value:t[0]},i=Lxe(r&&r.length===t.length?r:oV(t),e),s=rV(i,t,{ease:Array.isArray(o)?o:cft(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Exe=e=>{let t=({timestamp:r})=>e(r);return{start:()=>Wr.update(t,!0),stop:()=>iu(t),now:()=>Si.isProcessing?Si.timestamp:Cc.now()}};var uft={decay:Q7,inertia:Q7,tween:VL,keyframes:VL,spring:wI},dft=e=>e/100,gb=class extends xI{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:l}=this.options;l&&l()};let{name:r,motionValue:n,element:o,keyframes:a}=this.options,i=o?.KeyframeResolver||mb,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(a,s,r,n,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let{type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=this.options,s=Hh(r)?r:uft[r]||VL,l,c;s!==VL&&typeof t[0]!="number"&&(l=$h(dft,Q3(t[0],t[1])),t=[0,100]);let u=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=lC(u));let{calculatedDuration:d}=u,f=d+o,p=f*(n+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){let{resolved:n}=this;if(!n){let{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}let{finalKeyframe:o,generator:a,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=n;if(this.startTime===null)return a.next(0);let{delay:f,repeat:p,repeatType:m,repeatDelay:h,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let v=this.currentTime-f*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,w=a;if(p){let k=Math.min(this.currentTime,u)/d,T=Math.floor(k),O=k%1;!O&&k>=1&&(O=1),O===1&&T--,T=Math.min(T,p+1),!!(T%2)&&(m==="reverse"?(O=1-O,h&&(O-=h/d)):m==="mirror"&&(w=i)),x=Wl(0,1,O)*d}let b=y?{done:!1,value:l[0]}:w.next(x);s&&(b.value=s(b.value));let{done:C}=b;!y&&c!==null&&(C=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&o!==void 0&&(b.value=hb(l,this.options,o)),g&&g(b.value),S&&this.finish(),b}get duration(){let{resolved:t}=this;return t?xl(t.calculatedDuration):0}get time(){return xl(this.currentTime)}set time(t){t=Ci(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=xl(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=Exe,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),r&&r();let o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}};function Dxe(e){return new gb(e)}var Oxe=new Set(["opacity","clipPath","filter","transform"]);function _xe(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeInOut",times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=dI(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"})}var Fxe=aC(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var aV=10,fft=2e4;function pft(e){return Hh(e.type)||e.type==="spring"||!M3(e.ease)}function mft(e,t){let r=new gb({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},o=[],a=0;for(;!n.done&&a<fft;)n=r.sample(a),o.push(n.value),a+=aV;return{times:void 0,keyframes:o,duration:a-aV,ease:"linear"}}var Bxe={anticipate:U3,backInOut:V3,circInOut:j3};function hft(e){return e in Bxe}var UL=class extends xI{constructor(t){super(t);let{name:r,motionValue:n,element:o,keyframes:a}=this.options;this.resolver=new yI(a,(i,s)=>this.onKeyframesResolved(i,s),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:n=300,times:o,ease:a,type:i,motionValue:s,name:l,startTime:c}=this.options;if(!s.owner||!s.owner.current)return!1;if(typeof a=="string"&&lb()&&hft(a)&&(a=Bxe[a]),pft(this.options)){let{onComplete:d,onUpdate:f,motionValue:p,element:m,...h}=this.options,g=mft(t,h);t=g.keyframes,t.length===1&&(t[1]=t[0]),n=g.duration,o=g.times,a=g.ease,i="keyframes"}let u=_xe(s.owner.current,l,t,{...this.options,duration:n,times:o,ease:a});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(AL(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:d}=this.options;s.set(hb(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:o,type:i,ease:a,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return xl(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return xl(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.currentTime=Ci(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:r}=t;return r.playbackRate}set speed(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:r}=t;return r.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{let{resolved:r}=this;if(!r)return Ho;let{animation:n}=r;AL(n,t)}return Ho}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:r,keyframes:n,duration:o,type:a,ease:i,times:s}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,m=new gb({...p,keyframes:n,duration:o,type:a,ease:i,times:s,isGenerator:!0}),h=Ci(this.time);c.setWithVelocity(m.sample(h-aV).value,m.sample(h).value,aV)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:r,name:n,repeatDelay:o,repeatType:a,damping:i,type:s}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=r.owner.getProps();return Fxe()&&n&&Oxe.has(n)&&!l&&!c&&!o&&a!=="mirror"&&i!==0&&s!=="inertia"}};var gft={type:"spring",stiffness:500,damping:25,restSpeed:10},vft=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yft={type:"keyframes",duration:.8},xft={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vxe=(e,{keyframes:t})=>t.length>2?yft:ed.has(e)?e.startsWith("scale")?vft(t[1]):gft:xft;function Uxe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var CI=(e,t,r,n={},o,a)=>i=>{let s=sb(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-Ci(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};Uxe(s)||(u={...u,...Vxe(e,u)}),u.duration&&(u.duration=Ci(u.duration)),u.repeatDelay&&(u.repeatDelay=Ci(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(_3.current||GP.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let f=hb(u.keyframes,s);if(f!==void 0)return Wr.update(()=>{u.onUpdate(f),u.onComplete()}),new sC([])}return!a&&UL.supports(u)?new UL(u):new gb(u)};function bft({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function SI(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var a;let{transition:i=e.getDefaultTransition(),transitionEnd:s,...l}=t;n&&(i=n);let c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(a=e.latestValues[d])!==null&&a!==void 0?a:null),p=l[d];if(p===void 0||u&&bft(u,d))continue;let m={delay:r,...sb(i||{},d)},h=!1;if(window.MotionHandoffAnimation){let v=O3(e);if(v){let y=window.MotionHandoffAnimation(v,d,Wr);y!==null&&(m.startTime=y,h=!0)}}OL(e,d),f.start(CI(d,f,p,e.shouldReduceMotion&&L3.has(d)?{type:!1}:m,e,h));let g=f.animation;g&&c.push(g)}return s&&Promise.all(c).then(()=>{Wr.update(()=>{s&&DL(e,s)})}),c}function iV(e,t,r={}){var n;let o=ib(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(a=r.transitionOverride);let i=o?()=>Promise.all(SI(e,o,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=a;return wft(e,t,u+c,d,f,r)}:()=>Promise.resolve(),{when:l}=a;if(l){let[c,u]=l==="beforeChildren"?[i,s]:[s,i];return c().then(()=>u())}else return Promise.all([i(),s(r.delay)])}function wft(e,t,r=0,n=0,o=1,a){let i=[],s=(e.variantChildren.size-1)*n,l=o===1?(c=0)=>c*n:(c=0)=>s-c*n;return Array.from(e.variantChildren).sort(Cft).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(iV(c,t,{...a,delay:r+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Cft(e,t){return e.sortNodePosition(t)}function sV(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>iV(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=iV(e,t,r);else{let o=typeof t=="function"?ib(e,t,r.custom):t;n=Promise.all(SI(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var Sft=kL.length;function J7(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?J7(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<Sft;r++){let n=kL[r],o=e.props[n];(zv(o)||o===!1)&&(t[n]=o)}return t}var Pft=[...d3].reverse(),Ift=d3.length;function kft(e){return t=>Promise.all(t.map(({animation:r,options:n})=>sV(e,r,n)))}function Hxe(e){let t=kft(e),r=zxe(),n=!0,o=l=>(c,u)=>{var d;let f=ib(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:p,transitionEnd:m,...h}=f;c={...c,...h,...m}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=J7(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let g=0;g<Ift;g++){let v=Pft[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],w=zv(x),b=v===l?y.isActive:null;b===!1&&(m=g);let C=x===u[v]&&x!==c[v]&&w;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||ab(x)||typeof x=="boolean")continue;let S=Rft(y.prevProp,x),k=S||v===l&&y.isActive&&!C&&w||g>m&&w,T=!1,O=Array.isArray(x)?x:[x],M=O.reduce(o(v),{});b===!1&&(M={});let{prevResolvedValues:N={}}=y,U={...N,...M},F=R=>{k=!0,f.has(R)&&(T=!0,f.delete(R)),y.needsAnimating[R]=!0;let A=e.getValue(R);A&&(A.liveStyle=!1)};for(let R in U){let A=M[R],D=N[R];if(p.hasOwnProperty(R))continue;let B=!1;RL(A)&&RL(D)?B=!T7(A,D):B=A!==D,B?A!=null?F(R):f.add(R):A!==void 0&&f.has(R)?F(R):y.protectedKeys[R]=!0}y.prevProp=x,y.prevResolvedValues=M,y.isActive&&(p={...p,...M}),n&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&S)||T)&&d.push(...O.map(R=>({animation:R,options:{type:v}})))}if(f.size){let g={};f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let h=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function s(l,c){var u;if(r[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;let d=i(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=zxe(),n=!0}}}function Rft(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!T7(t,e):!1}function mC(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zxe(){return{animate:mC(!0),whileInView:mC(),whileHover:mC(),whileTap:mC(),whileDrag:mC(),whileFocus:mC(),exit:mC()}}var bl=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var lV=class extends bl{constructor(t){super(t),t.animationState||(t.animationState=Hxe(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();ab(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}};var Nft=0,cV=class extends bl{constructor(){super(...arguments),this.id=Nft++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}};var jxe={animation:{Feature:lV},exit:{Feature:cV}};function $v(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function qv(e){return{point:{x:e.pageX,y:e.pageY}}}var $xe=e=>t=>cC(t)&&e(t,qv(t));function vb(e,t,r,n){return $v(e,t,$xe(r),n)}var qxe=(e,t)=>Math.abs(e-t);function Wxe(e,t){let r=qxe(e.x,t.x),n=qxe(e.y,t.y);return Math.sqrt(r**2+n**2)}var PI=class{constructor(t,r,{transformPagePoint:n,contextWindow:o,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;let d=tX(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=Wxe(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:m}=d,{timestamp:h}=Si;this.history.push({...m,timestamp:h});let{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=eX(f,this.transformPagePoint),Wr.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:p,onSessionEnd:m,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=tX(d.type==="pointercancel"?this.lastMoveEventInfo:eX(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),m&&m(d,g)},!cC(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;let i=qv(t),s=eX(i,this.transformPagePoint),{point:l}=s,{timestamp:c}=Si;this.history=[{...l,timestamp:c}];let{onSessionStart:u}=r;u&&u(t,tX(s,this.history)),this.removeListeners=$h(vb(this.contextWindow,"pointermove",this.handlePointerMove),vb(this.contextWindow,"pointerup",this.handlePointerUp),vb(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),iu(this.updatePoint)}};function eX(e,t){return t?{point:t(e.point)}:e}function Gxe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tX({point:e},t){return{point:e,delta:Gxe(e,Kxe(t)),offset:Gxe(e,Mft(t)),velocity:Tft(t,.1)}}function Mft(e){return e[0]}function Kxe(e){return e[e.length-1]}function Tft(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=Kxe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Ci(t)));)r--;if(!n)return{x:0,y:0};let a=xl(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}var Zxe=1e-4,Aft=1-Zxe,Lft=1+Zxe,Jxe=.01,Eft=0-Jxe,Dft=0+Jxe;function Gl(e){return e.max-e.min}function ebe(e,t,r){return Math.abs(e-t)<=r}function Xxe(e,t,r,n=.5){e.origin=n,e.originPoint=wn(t.min,t.max,e.origin),e.scale=Gl(r)/Gl(t),e.translate=wn(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Aft&&e.scale<=Lft||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eft&&e.translate<=Dft||isNaN(e.translate))&&(e.translate=0)}function II(e,t,r,n){Xxe(e.x,t.x,r.x,n?n.originX:void 0),Xxe(e.y,t.y,r.y,n?n.originY:void 0)}function Yxe(e,t,r){e.min=r.min+t.min,e.max=e.min+Gl(t)}function tbe(e,t,r){Yxe(e.x,t.x,r.x),Yxe(e.y,t.y,r.y)}function Qxe(e,t,r){e.min=t.min-r.min,e.max=e.min+Gl(t)}function kI(e,t,r){Qxe(e.x,t.x,r.x),Qxe(e.y,t.y,r.y)}function ibe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?wn(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?wn(r,e,n.max):Math.min(e,r)),e}function rbe(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function sbe(e,{top:t,left:r,bottom:n,right:o}){return{x:rbe(e.x,r,o),y:rbe(e.y,t,n)}}function nbe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function lbe(e,t){return{x:nbe(e.x,t.x),y:nbe(e.y,t.y)}}function cbe(e,t){let r=.5,n=Gl(e),o=Gl(t);return o>n?r=au(t.min,t.max-n,e.min):n>o&&(r=au(e.min,e.max-o,t.min)),Wl(0,1,r)}function ube(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var uV=.35;function dbe(e=uV){return e===!1?e=0:e===!0&&(e=uV),{x:obe(e,"left","right"),y:obe(e,"top","bottom")}}function obe(e,t,r){return{min:abe(e,t),max:abe(e,r)}}function abe(e,t){return typeof e=="number"?e:e[t]||0}var fbe=()=>({translate:0,scale:1,origin:0,originPoint:0}),hC=()=>({x:fbe(),y:fbe()}),pbe=()=>({min:0,max:0}),na=()=>({x:pbe(),y:pbe()});function td(e){return[e("x"),e("y")]}function dV({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function mbe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hbe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function rX(e){return e===void 0||e===1}function fV({scale:e,scaleX:t,scaleY:r}){return!rX(e)||!rX(t)||!rX(r)}function Wv(e){return fV(e)||nX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nX(e){return gbe(e.x)||gbe(e.y)}function gbe(e){return e&&e!=="0%"}function zL(e,t,r){let n=e-r,o=t*n;return r+o}function vbe(e,t,r,n,o){return o!==void 0&&(e=zL(e,o,n)),zL(e,r,n)+t}function oX(e,t=0,r=1,n,o){e.min=vbe(e.min,t,r,n,o),e.max=vbe(e.max,t,r,n,o)}function aX(e,{x:t,y:r}){oX(e.x,t.translate,t.scale,t.originPoint),oX(e.y,r.translate,r.scale,r.originPoint)}var ybe=.999999999999,xbe=1.0000000000001;function wbe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&gC(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,aX(e,i)),n&&Wv(a.latestValues)&&gC(e,a.latestValues))}t.x<xbe&&t.x>ybe&&(t.x=1),t.y<xbe&&t.y>ybe&&(t.y=1)}function yb(e,t){e.min=e.min+t,e.max=e.max+t}function bbe(e,t,r,n,o=.5){let a=wn(e.min,e.max,o);oX(e,t,r,a,n)}function gC(e,t){bbe(e.x,t.x,t.scaleX,t.scale,t.originX),bbe(e.y,t.y,t.scaleY,t.scale,t.originY)}function iX(e,t){return dV(hbe(e.getBoundingClientRect(),t))}function Cbe(e,t,r){let n=iX(e,r),{scroll:o}=t;return o&&(yb(n.x,o.offset.x),yb(n.y,o.offset.y)),n}var pV=({current:e})=>e?e.ownerDocument.defaultView:null;var Oft=new WeakMap,hV=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=na(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let o=u=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(qv(u).point)},a=(u,d)=>{let{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_7(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),td(g=>{let v=this.getAxisMotionValue(g).get()||0;if(su.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let x=y.layout.layoutBox[g];x&&(v=Gl(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&Wr.postRender(()=>m(u,d)),OL(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},i=(u,d)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=_ft(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),h&&h(u,d)},s=(u,d)=>this.stop(u,d),l=()=>td(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new PI(t,{onSessionStart:o,onStart:a,onMove:i,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:pV(this.visualElement)})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:a}=this.getProps();a&&Wr.postRender(()=>a(t,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!mV(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=ibe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;r&&Hv(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=sbe(o.layoutBox,r):this.constraints=!1,this.elastic=dbe(n),a!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&td(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=ube(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Hv(t))return!1;let n=t.current;Fi(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let a=Cbe(n,o.root,this.visualElement.getTransformPagePoint()),i=lbe(o.layout.layoutBox,a);if(r){let s=r(mbe(i));this.hasMutatedConstraints=!!s,s&&(i=dV(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=td(u=>{if(!mV(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return OL(this.visualElement,t),n.start(CI(t,n,0,r,this.visualElement,!1))}stopAnimation(){td(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){td(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){td(r=>{let{drag:n}=this.getProps();if(!mV(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-wn(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Hv(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};td(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=cbe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),td(i=>{if(!mV(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(wn(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Oft.set(this.visualElement,this);let t=this.visualElement.current,r=vb(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();Hv(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Wr.read(n);let i=$v(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(td(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=uV,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function mV(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function _ft(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var gV=class extends bl{constructor(t){super(t),this.removeGroupControls=Ho,this.removeListeners=Ho,this.controls=new hV(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ho}unmount(){this.removeGroupControls(),this.removeListeners()}};var Sbe=e=>(t,r)=>{e&&Wr.postRender(()=>e(t,r))},vV=class extends bl{constructor(){super(...arguments),this.removePointerDownListener=Ho}onPointerDown(t){this.session=new PI(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pV(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:Sbe(t),onStart:Sbe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&Wr.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=vb(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var kbe=E(ue(),1),HL=E(ce(),1);var RI={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pbe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var NI={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ar.test(e))e=parseFloat(e);else return e;let r=Pbe(e,t.target.x),n=Pbe(e,t.target.y);return`${r}% ${n}%`}};var Ibe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=lu.parse(e);if(o.length>5)return n;let a=lu.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=wn(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var sX=class extends HL.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;Bye(Fft),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),RI.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,i=n.projection;return i&&(i.isPresent=a,o||t.layoutDependency!==r||r===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Wr.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),XP.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function yV(e){let[t,r]=o3(),n=(0,HL.useContext)(qP);return(0,kbe.jsx)(sX,{...e,layoutGroup:n,switchLayoutGroup:(0,HL.useContext)(h3),isPresent:t,safeToRemove:r})}var Fft={borderRadius:{...NI,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:NI,borderTopRightRadius:NI,borderBottomLeftRadius:NI,borderBottomRightRadius:NI,boxShadow:Ibe};function xV(e,t,r){let n=qn(e)?e:Cm(e);return n.start(CI("",n,t,r)),n.animation}function bV(e){return e instanceof SVGElement&&e.tagName!=="svg"}var Rbe=(e,t)=>e.depth-t.depth;var wV=class{constructor(){this.children=[],this.isDirty=!1}add(t){pI(this.children,t),this.isDirty=!0}remove(t){cb(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rbe),this.isDirty=!1,this.children.forEach(t)}};function Nbe(e,t){let r=Cc.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(iu(n),e(a-t))};return Wr.read(n,!0),()=>iu(n)}var Lbe=["TopLeft","TopRight","BottomLeft","BottomRight"],Bft=Lbe.length,Mbe=e=>typeof e=="string"?parseFloat(e):e,Tbe=e=>typeof e=="number"||ar.test(e);function Ebe(e,t,r,n,o,a){o?(e.opacity=wn(0,r.opacity!==void 0?r.opacity:1,Vft(n)),e.opacityExit=wn(t.opacity!==void 0?t.opacity:1,0,Uft(n))):a&&(e.opacity=wn(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let i=0;i<Bft;i++){let s=`border${Lbe[i]}Radius`,l=Abe(t,s),c=Abe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Tbe(l)===Tbe(c)?(e[s]=Math.max(wn(Mbe(l),Mbe(c),n),0),(su.test(c)||su.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=wn(t.rotate||0,r.rotate||0,n))}function Abe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Vft=Dbe(0,.5,H3),Uft=Dbe(.5,.95,Ho);function Dbe(e,t,r){return n=>n<e?0:n>t?1:r(au(e,t,n))}function Obe(e,t){e.min=t.min,e.max=t.max}function tf(e,t){Obe(e.x,t.x),Obe(e.y,t.y)}function lX(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _be(e,t,r,n,o){return e-=t,e=zL(e,1/r,n),o!==void 0&&(e=zL(e,1/o,n)),e}function zft(e,t=0,r=1,n=.5,o,a=e,i=e){if(su.test(t)&&(t=parseFloat(t),t=wn(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=wn(a.min,a.max,n);e===a&&(s-=t),e.min=_be(e.min,t,r,s,o),e.max=_be(e.max,t,r,s,o)}function Fbe(e,t,[r,n,o],a,i){zft(e,t[r],t[n],t[o],t.scale,a,i)}var Hft=["x","scaleX","originX"],jft=["y","scaleY","originY"];function cX(e,t,r,n){Fbe(e.x,t,Hft,r?r.x:void 0,n?n.x:void 0),Fbe(e.y,t,jft,r?r.y:void 0,n?n.y:void 0)}function Bbe(e){return e.translate===0&&e.scale===1}function uX(e){return Bbe(e.x)&&Bbe(e.y)}function Vbe(e,t){return e.min===t.min&&e.max===t.max}function zbe(e,t){return Vbe(e.x,t.x)&&Vbe(e.y,t.y)}function Ube(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dX(e,t){return Ube(e.x,t.x)&&Ube(e.y,t.y)}function fX(e){return Gl(e.x)/Gl(e.y)}function pX(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var CV=class{constructor(){this.members=[]}add(t){pI(this.members,t),t.scheduleRender()}remove(t){if(cb(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Hbe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var vC={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},jL=typeof window<"u"&&window.MotionDebug!==void 0,mX=["","X","Y","Z"],$ft={visibility:"hidden"},jbe=1e3,qft=0;function hX(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Qbe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=O3(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Wr,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Qbe(n)}function SV({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=qft++,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,jL&&(vC.totalNodes=vC.resolvedTargetDeltas=vC.recalculatedProjection=0),this.nodes.forEach(Kft),this.nodes.forEach(Jft),this.nodes.forEach(ept),this.nodes.forEach(Xft),jL&&window.MotionDebug.record(vC)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new wV)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new ub),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,s=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=bV(i),this.instance=i;let{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),s&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Nbe(f,250),RI.hasAnimatedSinceResize&&(RI.hasAnimatedSinceResize=!1,this.nodes.forEach(qbe))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||apt,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),y=!this.targetLayout||!dX(this.targetLayout,m)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);let w={...sb(h,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||qbe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,iu(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(tpt),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qbe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach($be);return}this.isUpdating||this.nodes.forEach(Qft),this.isUpdating=!1,this.nodes.forEach(Zft),this.nodes.forEach(Wft),this.nodes.forEach(Gft),this.clearAllSnapshots();let s=Cc.now();Si.delta=Wl(0,1e3/60,s-Si.timestamp),Si.timestamp=s,Si.isProcessing=!0,c3.update.process(Si),c3.preRender.process(Si),c3.render.process(Si),Si.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,XP.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Yft),this.sharedNodes.forEach(rpt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=na(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!uX(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(s||Wv(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),ipt(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;let{visualElement:s}=this.options;if(!s)return na();let l=s.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(spt))){let{scroll:u}=this.root;u&&(yb(l.x,u.offset.x),yb(l.y,u.offset.y))}return l}removeElementScroll(i){var s;let l=na();if(tf(l,i),!((s=this.scroll)===null||s===void 0)&&s.wasRoot)return l;for(let c=0;c<this.path.length;c++){let u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&tf(l,i),yb(l.x,d.offset.x),yb(l.y,d.offset.y))}return l}applyTransform(i,s=!1){let l=na();tf(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&gC(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Wv(u.latestValues)&&gC(l,u.latestValues)}return Wv(this.latestValues)&&gC(l,this.latestValues),l}removeTransform(i){let s=na();tf(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!Wv(c.latestValues))continue;fV(c.latestValues)&&c.updateSnapshot();let u=na(),d=c.measurePageBox();tf(u,d),cX(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Wv(this.latestValues)&&cX(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.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!==Si.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var s;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Si.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=na(),this.relativeTargetOrigin=na(),kI(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),tf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=na(),this.targetWithTransforms=na()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tbe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tf(this.target,this.layout.layoutBox),aX(this.target,this.targetDelta)):tf(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=na(),this.relativeTargetOrigin=na(),kI(this.relativeTargetOrigin,this.target,p.target),tf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}jL&&vC.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||fV(this.parent.latestValues)||nX(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 i;let s=this.getLead(),l=!!this.resumingFrom||this!==s,c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Si.timestamp&&(c=!1),c)return;let{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;tf(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;wbe(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=na());let{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(lX(this.prevProjectionDelta.x,this.projectionDelta.x),lX(this.prevProjectionDelta.y,this.projectionDelta.y)),II(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!pX(this.projectionDelta.x,this.prevProjectionDelta.x)||!pX(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),jL&&vC.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var s;if((s=this.options.visualElement)===null||s===void 0||s.scheduleRender(),i){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hC(),this.projectionDelta=hC(),this.projectionDeltaWithTransform=hC()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=hC();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=na(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,g=this.getStack(),v=!g||g.members.length<=1,y=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(opt));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let b=w/1e3;Wbe(d.x,i.x,b),Wbe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),npt(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&zbe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=na()),tf(x,this.relativeTarget)),h&&(this.animationValues=u,Ebe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(iu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wr.update(()=>{RI.hasAnimatedSinceResize=!0,this.currentAnimation=xV(0,jbe,{...i,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onComplete:()=>{i.onComplete&&i.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);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jbe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&Zbe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||na();let d=Gl(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Gl(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}tf(s,l),gC(s,u),II(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new CV),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){var i;let{layoutId:s}=this.options;return s?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;let{layoutId:s}=this.options;return s?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let c={};l.z&&hX("z",i,c,this.animationValues);for(let u=0;u<mX.length;u++)hX(`rotate${mX[u]}`,i,c,this.animationValues),hX(`skew${mX[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var s,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return $ft;let c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=JP(i?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=JP(i?.pointerEvents)||""),this.hasProjected&&!Wv(this.latestValues)&&(h.transform=u?u({},""):"none",this.hasProjected=!1),h}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Hbe(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));let{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(s=f.opacity)!==null&&s!==void 0?s:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let h in iI){if(f[h]===void 0)continue;let{correct:g,applyTo:v}=iI[h],y=c.transform==="none"?f[h]:g(f[h],d);if(v){let x=v.length;for(let w=0;w<x;w++)c[v[w]]=y}else c[h]=y}return this.options.layoutId&&(c.pointerEvents=d===this?JP(i?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var s;return(s=i.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach($be),this.root.sharedNodes.clear()}}}function Wft(e){e.updateLayout()}function Gft(e){var t;let r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:o}=e.layout,{animationType:a}=e.options,i=r.source!==e.layout.source;a==="size"?td(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Gl(f);f.min=n[d].min,f.max=f.min+p}):Zbe(a,r.layoutBox,n)&&td(d=>{let f=i?r.measuredBox[d]:r.layoutBox[d],p=Gl(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});let s=hC();II(s,n,r.layoutBox);let l=hC();i?II(l,e.applyTransform(o,!0),r.measuredBox):II(l,n,r.layoutBox);let c=!uX(s),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:p}=d;if(f&&p){let m=na();kI(m,r.layoutBox,f.layoutBox);let h=na();kI(h,n,p.layoutBox),dX(m,h)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Kft(e){jL&&vC.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Xft(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Yft(e){e.clearSnapshot()}function $be(e){e.clearMeasurements()}function Qft(e){e.isLayoutDirty=!1}function Zft(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qbe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jft(e){e.resolveTargetDelta()}function ept(e){e.calcProjection()}function tpt(e){e.resetSkewAndRotation()}function rpt(e){e.removeLeadSnapshot()}function Wbe(e,t,r){e.translate=wn(t.translate,0,r),e.scale=wn(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function Gbe(e,t,r,n){e.min=wn(t.min,r.min,n),e.max=wn(t.max,r.max,n)}function npt(e,t,r,n){Gbe(e.x,t.x,r.x,n),Gbe(e.y,t.y,r.y,n)}function opt(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var apt={duration:.45,ease:[.4,0,.1,1]},Kbe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xbe=Kbe("applewebkit/")&&!Kbe("chrome/")?Math.round:Ho;function Ybe(e){e.min=Xbe(e.min),e.max=Xbe(e.max)}function ipt(e){Ybe(e.x),Ybe(e.y)}function Zbe(e,t,r){return e==="position"||e==="preserve-aspect"&&!ebe(fX(t),fX(r),.2)}function spt(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var Jbe=SV({attachResizeListener:(e,t)=>$v(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var gX={current:void 0},PV=SV({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!gX.current){let e=new Jbe({});e.mount(window),e.setOptions({layoutScroll:!0}),gX.current=e}return gX.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var e0e={pan:{Feature:vV},drag:{Feature:gV,ProjectionNode:PV,MeasureLayout:yV}};function t0e(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&Wr.postRender(()=>a(t,qv(t)))}var IV=class extends bl{mount(){let{current:t}=this.node;t&&(this.unmount=E7(t,r=>(t0e(this.node,r,"Start"),n=>t0e(this.node,n,"End"))))}unmount(){}};var kV=class extends bl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$h($v(this.node.current,"focus",()=>this.onFocus()),$v(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function r0e(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&Wr.postRender(()=>a(t,qv(t)))}var RV=class extends bl{mount(){let{current:t}=this.node;t&&(this.unmount=O7(t,r=>(r0e(this.node,r,"Start"),(n,{success:o})=>r0e(this.node,n,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var yX=new WeakMap,vX=new WeakMap,lpt=e=>{let t=yX.get(e.target);t&&t(e)},cpt=e=>{e.forEach(lpt)};function upt({root:e,...t}){let r=e||document;vX.has(r)||vX.set(r,{});let n=vX.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(cpt,{root:e,...t})),n[o]}function n0e(e,t,r){let n=upt(t);return yX.set(e,r),n.observe(e),()=>{yX.delete(e),n.unobserve(e)}}var dpt={some:0,all:1},NV=class extends bl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:dpt[o]},s=l=>{let{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);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return n0e(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(fpt(t,r))&&this.startObserver()}unmount(){}};function fpt({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var o0e={inView:{Feature:NV},tap:{Feature:RV},focus:{Feature:kV},hover:{Feature:IV}};var a0e={layout:{ProjectionNode:PV,MeasureLayout:yV}};var u0e=E(ce(),1);var $L={current:null},MV={current:!1};function i0e(){if(MV.current=!0,!!WP)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$L.current=e.matches;e.addListener(t),t()}else $L.current=!1}var ppt=[...$7,xs,lu],s0e=e=>ppt.find(K3(e));var Gv=new WeakMap;function l0e(e,t,r){for(let n in t){let o=t[n],a=r[n];if(qn(o))e.addValue(n,o);else if(qn(a))e.addValue(n,Cm(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,Cm(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var c0e=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],MI=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mb,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=()=>{let p=Cc.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Wr.render(this.render,!1,!0))};let{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=iC(r),this.isVariantNode=f3(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let m=f[p];l[p]!==void 0&&qn(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Gv.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),MV.current||i0e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$L.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Gv.delete(this.current),this.projection&&this.projection.unmount(),iu(this.notifyUpdate),iu(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=ed.has(t),o=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Wr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=r.on("renderRequest",this.scheduleRender),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),a(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Uv){let r=Uv[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let a=this.features[t];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):na()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<c0e.length;n++){let o=c0e[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=l0e(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Cm(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(G3(o)||$3(o))?o=parseFloat(o):!s0e(o)&&lu.test(r)&&(o=W3(t,r)),this.setBaseTarget(t,qn(o)?o.get():o)),qn(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o;if(typeof n=="string"||typeof n=="object"){let i=ZP(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!qn(a)?a:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ub),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var TI=class extends MI{constructor(){super(...arguments),this.KeyframeResolver=yI}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;qn(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function mpt(e){return window.getComputedStyle(e)}var AI=class extends TI{constructor(){super(...arguments),this.type="html",this.renderInstance=w3}readValueFromInstance(t,r){if(ed.has(r)){let n=vI(r);return n&&n.default||0}else{let n=mpt(t),o=(y3(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return iX(t,r)}build(t,r,n){rI(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return sI(t,r,n)}};var LI=class extends TI{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=na}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(ed.has(r)){let n=vI(r);return n&&n.default||0}return r=C3.has(r)?r:KP(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return I3(t,r,n)}build(t,r,n){nI(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){S3(t,r,n,o)}mount(t){this.isSVGTag=aI(t.tagName),super.mount(t)}};var d0e=(e,t)=>QP(e)?new LI(t):new AI(t,{allowProjection:e!==u0e.Fragment});var f0e=Gye({...jxe,...o0e,...e0e,...a0e},d0e);var ne=pye(f0e);var EI=E(ce(),1);function Fa(e){let t=yl(()=>Cm(e)),{isStatic:r}=(0,EI.useContext)(_h);if(r){let[,n]=(0,EI.useState)(e);(0,EI.useEffect)(()=>t.on("change",n),[])}return t}function TV(e,t){let r=Fa(t()),n=()=>r.set(t());return n(),Fh(()=>{let o=()=>Wr.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),iu(n)}}),r}var xb=E(ce(),1);function p0e(e){return typeof e=="number"?e:parseFloat(e)}function qh(e,t={}){let{isStatic:r}=(0,xb.useContext)(_h),n=(0,xb.useRef)(null),o=Fa(qn(e)?p0e(e.get()):e),a=(0,xb.useRef)(o.get()),i=(0,xb.useRef)(()=>{}),s=()=>{let c=n.current;c&&c.time===0&&c.sample(Si.delta),l(),n.current=Dxe({keyframes:[o.get(),a.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{n.current&&n.current.stop()};return(0,xb.useInsertionEffect)(()=>o.attach((c,u)=>r?u(c):(a.current=c,i.current=u,Wr.update(s),o.get()),l),[JSON.stringify(t)]),Fh(()=>{if(qn(e))return e.on("change",c=>o.set(p0e(c)))},[o]),o}var hpt=e=>e&&typeof e=="object"&&e.mix,gpt=e=>hpt(e)?e.mix:void 0;function m0e(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=rV(o,a,{mixer:gpt(a[0]),...i});return t?s(n):s}function h0e(e){mI.current=[],e();let t=TV(mI.current,e);return mI.current=void 0,t}function Sc(e,t,r,n){if(typeof e=="function")return h0e(e);let o=typeof t=="function"?t:m0e(t,r,n);return Array.isArray(e)?g0e(e,o):g0e([e],([a])=>o(a))}function g0e(e,t){let r=yl(()=>[]);return TV(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function vpt(e){e.values.forEach(t=>t.stop())}function xX(e,t){[...t].reverse().forEach(n=>{let o=e.getVariant(n);o&&DL(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{xX(a,t)})})}function ypt(e,t){if(Array.isArray(t))return xX(e,t);if(typeof t=="string")return xX(e,[t]);DL(e,t)}function v0e(){let e=!1,t=new Set,r={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,o){Fi(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let a=[];return t.forEach(i=>{a.push(sV(i,n,{transitionOverride:o}))}),Promise.all(a)},set(n){return Fi(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(o=>{ypt(o,n)})},stop(){t.forEach(n=>{vpt(n)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}var y0e=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};function AV(e,t){return tV(e)?e[y0e(0,e.length,t)]:e}function qL(e){return typeof e=="object"&&!Array.isArray(e)}function LV(e,t,r,n){return typeof e=="string"&&qL(t)?EL(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function x0e(e,t,r){return e*(t+1)}function bX(e,t,r,n){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:(o=n.get(t))!==null&&o!==void 0?o:e}function xpt(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(cb(e,o),n--)}}function b0e(e,t,r,n,o,a){xpt(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:wn(o,a,n[i]),easing:AV(r,i)})}function w0e(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function C0e(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var bpt="easeInOut",wpt=20;function I0e(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,bX(d,m.at,u,c));continue}let[h,g,v={}]=m;v.at!==void 0&&(d=bX(d,v.at,u,c));let y=0,x=(w,b,C,S=0,k=0)=>{let T=Cpt(w),{delay:O=0,times:M=oV(T),type:N="keyframes",repeat:U,repeatType:F,repeatDelay:P=0,...I}=b,{ease:R=t.ease||"easeOut",duration:A}=b,D=typeof O=="function"?O(S,k):O,B=T.length,V=Hh(N)?N:o?.[N];if(B<=2&&V){let z=100;if(B===2&&Ipt(T)){let K=T[1]-T[0];z=Math.abs(K)}let W={...I};A!==void 0&&(W.duration=Ci(A));let H=R3(W,z,V);R=H.ease,A=H.duration}A??(A=a);let L=d+D;M.length===1&&M[0]===0&&(M[1]=1);let j=M.length-T.length;if(j>0&&nV(M,j),T.length===1&&T.unshift(null),U){Fi(U<wpt,"Repeat count too high, must be less than 20"),A=x0e(A,U);let z=[...T],W=[...M];R=Array.isArray(R)?[...R]:[R];let H=[...R];for(let K=0;K<U;K++){T.push(...z);for(let G=0;G<z.length;G++)M.push(W[G]+(K+1)),R.push(G===0?"linear":AV(H,G-1))}w0e(M,U)}let $=L+A;b0e(C,T,R,M,L,$),y=Math.max(D+A,y),f=Math.max($,f)};if(qn(h)){let w=S0e(h,s);x(g,v,P0e("default",w))}else{let w=LV(h,g,n,l),b=w.length;for(let C=0;C<b;C++){g=g,v=v;let S=w[C],k=S0e(S,s);for(let T in g)x(g[T],Spt(v,T),P0e(T,k),C,b)}}u=d,d+=y}return s.forEach((p,m)=>{for(let h in p){let g=p[h];g.sort(C0e);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:C,value:S,easing:k}=g[b];v.push(S),y.push(au(0,f,C)),x.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(bpt)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[h]=v,w.transition[h]={...t,duration:f,ease:x,times:y,...r}}}),i}function S0e(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function P0e(e,t){return t[e]||(t[e]=[]),t[e]}function Cpt(e){return Array.isArray(e)?e:[e]}function Spt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ppt=e=>typeof e=="number",Ipt=e=>e.every(Ppt);function kpt(e,t){return e in t}var EV=class extends MI{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(kpt(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return na()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function k0e(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=bV(e)?new LI(t):new AI(t);r.mount(e),Gv.set(e,r)}function R0e(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new EV(t);r.mount(e),Gv.set(e,r)}function Rpt(e,t){return qn(e)||typeof e=="number"||typeof e=="string"&&!qL(t)}function DV(e,t,r,n){let o=[];if(Rpt(e,t))o.push(xV(e,qL(t)&&t.default||t,r&&(r.default||r)));else{let a=LV(e,t,n),i=a.length;Fi(!!i,"No valid elements provided.");for(let s=0;s<i;s++){let l=a[s],c=l instanceof Element?k0e:R0e;Gv.has(l)||c(l);let u=Gv.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...SI(u,{...t,transition:d},{}))}}return o}function N0e(e,t,r){let n=[];return I0e(e,t,r,{spring:wI}).forEach(({keyframes:a,transition:i},s)=>{n.push(...DV(s,a,i))}),n}function Npt(e){return Array.isArray(e)&&e.some(Array.isArray)}function M0e(e){function t(r,n,o){let a=[];Npt(r)?a=N0e(r,n,e):a=DV(r,n,o,e);let i=new sC(a);return e&&e.animations.push(i),i}return t}var oa=M0e();function T0e(){let e=yl(v0e);return Fh(e.mount,[]),e}var OV=T0e;var _V=class{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,r){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,r)})}},Mpt=()=>new _V;function wX(){return yl(Mpt)}var WL={};QF(WL,{Group:()=>E0e,Item:()=>_0e});var CX=E(ue(),1);var DI=E(ce(),1);var A0e=E(ce(),1),FV=(0,A0e.createContext)(null);function L0e(e,t,r,n){if(!n)return e;let o=e.findIndex(u=>u.value===t);if(o===-1)return e;let a=n>0?1:-1,i=e[o+a];if(!i)return e;let s=e[o],l=i.layout,c=wn(l.min,l.max,.5);return a===1&&s.layout.max+r>c||a===-1&&s.layout.min+r<c?txe(e,o,o+a):e}function Tpt({children:e,as:t="ul",axis:r="y",onReorder:n,values:o,...a},i){let s=yl(()=>ne[t]),l=[],c=(0,DI.useRef)(!1);Fi(!!o,"Reorder.Group must be provided a values prop");let u={axis:r,registerItem:(d,f)=>{let p=l.findIndex(m=>d===m.value);p!==-1?l[p].layout=f[r]:l.push({value:d,layout:f[r]}),l.sort(Lpt)},updateOrder:(d,f,p)=>{if(c.current)return;let m=L0e(l,d,f,p);l!==m&&(c.current=!0,n(m.map(Apt).filter(h=>o.indexOf(h)!==-1)))}};return(0,DI.useEffect)(()=>{c.current=!1}),(0,CX.jsx)(s,{...a,ref:i,ignoreStrict:!0,children:(0,CX.jsx)(FV.Provider,{value:u,children:e})})}var E0e=(0,DI.forwardRef)(Tpt);function Apt(e){return e.value}function Lpt(e,t){return e.layout.min-t.layout.min}var O0e=E(ue(),1);var BV=E(ce(),1);function D0e(e,t=0){return qn(e)?e:Fa(t)}function Ept({children:e,style:t={},value:r,as:n="li",onDrag:o,layout:a=!0,...i},s){let l=yl(()=>ne[n]),c=(0,BV.useContext)(FV),u={x:D0e(t.x),y:D0e(t.y)},d=Sc([u.x,u.y],([h,g])=>h||g?1:"unset");Fi(!!c,"Reorder.Item must be a child of Reorder.Group");let{axis:f,registerItem:p,updateOrder:m}=c;return(0,O0e.jsx)(l,{drag:f,...i,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:a,onDrag:(h,g)=>{let{velocity:v}=g;v[f]&&m(r,u[f].get(),v[f]),o&&o(h,g)},onLayoutMeasure:h=>p(r,h),ref:s,ignoreStrict:!0,children:e})}var _0e=(0,BV.forwardRef)(Ept);var f3r=bt("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Sm={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},VV={lift:{y:-2,transition:Sm.smooth},scale:{scale:1.05,transition:Sm.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Sm.smooth},rotate:{rotate:2,transition:Sm.bouncy}},F0e={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},p3r={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Sm.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Sm.smooth}},m3r={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Sm.smooth}}},h3r={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Sm.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Sm.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Sm.smooth}};var g3r={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Sm.bouncy};var bb=E(ue(),1),Dpt=bt("rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",{variants:{variant:{default:"border-border dark:border-border",outline:"border border-border shadow-none bg-transparent dark:border-border",filled:"border-none bg-secondary dark:bg-secondary shadow-inner",elevated:"border-none shadow-lg dark:shadow-xl dark:shadow-black/20",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-white/10 dark:bg-black/10",neon:"border-2 border-primary/50 shadow-[0_0_15px_rgba(var(--primary),0.5)] dark:shadow-[0_0_20px_rgba(var(--primary),0.7)]",glow:"border border-border shadow-[0_0_30px_rgba(var(--primary),0.15)] dark:shadow-[0_0_40px_rgba(var(--primary),0.25)]"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),qe=Wh.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",enableGlassmorphism:i,enableParallax:s=!1,enableTilt:l=!1,tiltMaxAngle:c=15,parallaxOffset:u=20,children:d,asChild:f,...p},m)=>{let[h,g]=Wh.useState({x:0,y:0}),[v,y]=Wh.useState(!1),x=F=>{if(!l&&!s)return;let P=F.currentTarget.getBoundingClientRect(),I=P.left+P.width/2,R=P.top+P.height/2,A=(F.clientX-I)/(P.width/2),D=(F.clientY-R)/(P.height/2);g({x:A,y:D})},w=()=>y(!0),b=()=>{y(!1),g({x:0,y:0})},C=i?"glass":t,S=l?h.y*-c:0,k=l?h.x*c:0,T=o&&a!=="none"?{whileHover:a==="scale"?VV.scale:a==="glow"?VV.glow:VV.lift,whileTap:F0e.scale}:{},{onDrag:O,onDragStart:M,onDragEnd:N,...U}=p;return(0,bb.jsx)(ne.div,{ref:m,className:_(Dpt({variant:C,size:r,radius:n,interactive:o,className:e})),onMouseMove:x,onMouseEnter:w,onMouseLeave:b,style:{transformStyle:l||s?"preserve-3d":void 0,perspective:l||s?"1000px":void 0},animate:{rotateX:S,rotateY:k},transition:{type:"spring",damping:20,stiffness:300},...T,...U,children:s?(0,bb.jsx)(ne.div,{style:{transform:"translateZ(50px)"},animate:{x:v?h.x*u:0,y:v?h.y*u:0},transition:{type:"spring",damping:20,stiffness:300},children:d}):d})});qe.displayName="MoonUICardPro";var vr=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("flex flex-col space-y-1.5 p-6",e),...t}));vr.displayName="MoonUICardHeaderPro";var _r=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("h3",{ref:r,className:_("text-lg font-semibold leading-none tracking-tight",e),...t}));_r.displayName="MoonUICardTitlePro";var ts=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("p",{ref:r,className:_("text-sm text-muted-foreground",e),...t}));ts.displayName="MoonUICardDescriptionPro";var We=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("p-6 pt-0",e),...t}));We.displayName="MoonUICardContentPro";var UV=Wh.forwardRef(({className:e,...t},r)=>(0,bb.jsx)("div",{ref:r,className:_("flex items-center p-6 pt-0",e),...t}));UV.displayName="MoonUICardFooterPro";var Pm=E(ce(),1);var cu=E(ce(),1);var zV=E(ce(),1);function OI(e){let t=zV.useRef({value:e,previous:e});return zV.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var B0e=E(ce(),1);function _I(e){let[t,r]=B0e.useState(void 0);return zn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var rf=E(ue(),1),HV="Checkbox",[Opt,O3r]=Kn(HV),[_pt,SX]=Opt(HV);function Fpt(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=ea({prop:r,defaultProp:o??!1,onChange:l,caller:HV}),[m,h]=cu.useState(null),[g,v]=cu.useState(null),y=cu.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:wb(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,rf.jsx)(_pt,{scope:t,...w,children:Bpt(d)?d(w):n})}var V0e="CheckboxTrigger",U0e=cu.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=SX(V0e,e),h=Wt(o,u),g=cu.useRef(l);return cu.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,rf.jsx)(ot.button,{type:"button",role:"checkbox","aria-checked":wb(l)?"mixed":l,"aria-required":c,"data-state":$0e(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:h,onKeyDown:it(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:it(r,v=>{d(y=>wb(y)?!0:!y),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});U0e.displayName=V0e;var jV=cu.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,rf.jsx)(Fpt,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,rf.jsxs)(rf.Fragment,{children:[(0,rf.jsx)(U0e,{...d,ref:t,__scopeCheckbox:r}),f&&(0,rf.jsx)(j0e,{__scopeCheckbox:r})]})})});jV.displayName=HV;var z0e="CheckboxIndicator",PX=cu.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=SX(z0e,r);return(0,rf.jsx)(Da,{present:n||wb(a.checked)||a.checked===!0,children:(0,rf.jsx)(ot.span,{"data-state":$0e(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});PX.displayName=z0e;var H0e="CheckboxBubbleInput",j0e=cu.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=SX(H0e,e),m=Wt(r,p),h=OI(a),g=_I(n);cu.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(h!==a&&b){let S=new Event("click",{bubbles:C});y.indeterminate=wb(a),b.call(y,wb(a)?!1:a),y.dispatchEvent(S)}},[f,h,a,o]);let v=cu.useRef(wb(a)?!1:a);return(0,rf.jsx)(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});j0e.displayName=H0e;function Bpt(e){return typeof e=="function"}function wb(e){return e==="indeterminate"}function $0e(e){return wb(e)?"indeterminate":e?"checked":"unchecked"}var cp=E(ue(),1),Upt=bt("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Kl=Pm.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=Pm.useState(a);return Pm.useEffect(()=>{d(a)},[a]),(0,cp.jsx)(jV,{ref:c,checked:u?!1:s,className:_(Upt({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,cp.jsx)(PX,{className:_("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,cp.jsx)(ru,{className:"h-[65%] w-[65%]"}):i||(0,cp.jsx)(en,{className:"h-[65%] w-[65%]"})})})});Kl.displayName=jV.displayName;var zpt=Pm.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,cp.jsx)("div",{ref:a,className:_("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));zpt.displayName="CheckboxGroup";var IX=Pm.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,cp.jsx)("label",{ref:i,htmlFor:t,className:_("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));IX.displayName="CheckboxLabel";var Hpt=Pm.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=Pm.useId(),s=e||i;return(0,cp.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,cp.jsx)(IX,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,cp.jsx)(Kl,{ref:a,id:s,...o}),r==="end"&&(0,cp.jsx)(IX,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});Hpt.displayName="CheckboxWithLabel";var Bi=E(ce(),1);var Cn=E(ue(),1),$V=Bi.forwardRef(({className:e,variant:t="default",size:r="md",animationMode:n="smooth",autoCollapseAfter:o,onToggleChange:a,persistKey:i,loading:s,progress:l,badge:c,badgeVariant:u="default",shortcut:d,lazy:f,open:p,defaultOpen:m,onOpenChange:h,children:g,disabled:v},y)=>{let[x,w]=Bi.useState(()=>{if(i&&typeof window<"u"){let O=localStorage.getItem(`collapsible-${i}`);if(O!==null)return O==="true"}return m||!1}),[b,C]=Bi.useState(!f),S=p!==void 0?p:x,k=Bi.useCallback(O=>{s||(w(O),h?.(O),a?.(O),i&&typeof window<"u"&&localStorage.setItem(`collapsible-${i}`,String(O)),f&&O&&!b&&C(!0),O&&o&&setTimeout(()=>{w(!1),h?.(!1),a?.(!1)},o))},[s,h,a,i,f,b,o]);Bi.useEffect(()=>{if(d){let O=M=>{let N=d.toLowerCase().split("+"),U=N.includes("ctrl")||N.includes("cmd"),F=N.includes("shift"),P=N.includes("alt"),I=N[N.length-1];M.ctrlKey===U&&M.shiftKey===F&&M.altKey===P&&M.key.toLowerCase()===I&&(M.preventDefault(),k(!S))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)}},[d,S,k]);let T=l?188.4-188.4*l/100:188.4;return(0,Cn.jsxs)("div",{className:_("relative",t==="bordered"&&"border border-border rounded-lg",t==="elevated"&&"border border-border rounded-lg shadow-lg hover:shadow-xl transition-shadow",t==="gradient"&&"rounded-lg bg-gradient-to-r from-primary/5 via-accent/5 to-secondary/5",t==="glassmorphism"&&"rounded-lg backdrop-blur-md bg-white/10 border border-white/20",t==="card"&&"border border-border rounded-lg bg-card",s&&"opacity-60 pointer-events-none",e),children:[l!==void 0&&(0,Cn.jsxs)("div",{className:"absolute top-2 right-2 w-6 h-6 z-10",children:[(0,Cn.jsxs)("svg",{className:"w-6 h-6 -rotate-90",viewBox:"0 0 64 64",children:[(0,Cn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"text-muted-foreground/20"}),(0,Cn.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"188.4",strokeDashoffset:T,strokeLinecap:"round",className:"text-primary transition-all duration-500"})]}),(0,Cn.jsx)("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-medium",children:Math.round(l)})]}),c&&(0,Cn.jsx)("div",{className:"absolute -top-3 right-4 z-20",children:(0,Cn.jsx)("div",{className:_("text-xs px-2.5 py-1 rounded-full font-semibold shadow-md",u==="default"&&"bg-background text-foreground border border-border",u==="primary"&&"bg-primary text-primary-foreground",u==="secondary"&&"bg-secondary text-secondary-foreground",u==="success"&&"bg-green-500 text-white",u==="warning"&&"bg-amber-500 text-white",u==="danger"&&"bg-red-500 text-white",u==="info"&&"bg-blue-500 text-white"),children:c})}),s&&(0,Cn.jsx)("div",{className:"absolute top-1/2 right-4 -translate-y-1/2 z-10",children:(0,Cn.jsx)(Rr,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),(0,Cn.jsx)(k4,{ref:y,open:S,onOpenChange:k,disabled:v||s,className:_("w-full",n==="spring"&&"[&_[data-state=open]]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",n==="bounce"&&"[&_[data-state=open]]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",n==="fade"&&"[&_[data-state=open]]:animate-[collapsible-down_0.2s_ease-in-out]",n==="slide"&&"[&_[data-state=open]]:animate-[slide-down_0.3s_ease-out]"),children:(0,Cn.jsx)(kX.Provider,{value:{variant:t,size:r,animationMode:n,lazy:f&&!b,shortcut:d},children:g})})]})});$V.displayName="MoonUICollapsiblePro";var kX=Bi.createContext({}),GL=bt("flex w-full items-center gap-3 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"text-foreground hover:text-primary",bordered:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",elevated:"text-foreground hover:text-primary hover:bg-primary/5 rounded-t-lg",gradient:"text-foreground hover:text-primary",glassmorphism:"text-foreground hover:text-primary hover:bg-white/10",card:"text-foreground hover:text-primary hover:bg-accent/5 rounded-t-lg"},size:{xs:"text-xs py-2 px-3 min-h-[2.5rem]",sm:"text-sm py-2.5 px-3.5 min-h-[3rem]",md:"text-base py-3 px-4 min-h-[3.5rem]",lg:"text-lg py-4 px-5 min-h-[4rem]",xl:"text-xl py-5 px-6 min-h-[4.5rem]"}},defaultVariants:{variant:"default",size:"md"}}),qV=Bi.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,leftIcon:a,rightIcon:i,description:s,external:l,customChevron:c,hideChevron:u,status:d,...f},p)=>{let{variant:m,size:h,shortcut:g}=Bi.useContext(kX),v=r||m||"default",y=n||h||"md",x=d&&{success:(0,Cn.jsx)(Xs,{className:"h-4 w-4 text-green-500"}),warning:(0,Cn.jsx)(Tn,{className:"h-4 w-4 text-amber-500"}),error:(0,Cn.jsx)(co,{className:"h-4 w-4 text-red-500"}),info:(0,Cn.jsx)(tu,{className:"h-4 w-4 text-blue-500"})}[d];return o?(0,Cn.jsx)(rA,{ref:p,className:_(GL({variant:v,size:y}),e),asChild:o,...f,children:t}):(0,Cn.jsxs)(rA,{ref:p,className:_(GL({variant:v,size:y}),"[&[data-state=open]>.chevron]:rotate-180","[&[data-state=open]]:text-primary",e),...f,children:[a&&(0,Cn.jsx)("span",{className:"text-muted-foreground",children:a}),x&&!a&&x,(0,Cn.jsxs)("div",{className:"flex-1 text-left",children:[(0,Cn.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Cn.jsx)("span",{className:"font-medium",children:t}),l&&(0,Cn.jsx)(eu,{className:"h-3 w-3 text-muted-foreground"})]}),s&&(0,Cn.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:s})]}),(0,Cn.jsxs)("div",{className:"flex items-center gap-2",children:[g&&(0,Cn.jsx)("kbd",{className:"hidden sm:inline-flex h-6 px-2 items-center rounded border bg-muted text-xs font-medium text-muted-foreground",children:g}),i&&(0,Cn.jsx)("span",{className:"text-muted-foreground",children:i}),!u&&(0,Cn.jsx)("span",{className:"chevron transition-transform duration-200 text-muted-foreground",children:c||(0,Cn.jsx)(ta,{className:"h-4 w-4"})})]})]})});qV.displayName="MoonUICollapsibleTriggerPro";var WV=bt("overflow-hidden transition-all",{variants:{variant:{default:"text-muted-foreground",bordered:"text-muted-foreground border-x border-b border-border rounded-b-lg",elevated:"text-muted-foreground bg-muted/20",gradient:"text-muted-foreground",glassmorphism:"text-muted-foreground bg-white/5",card:"text-muted-foreground border-x border-b border-border rounded-b-lg bg-card/50"},size:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"}},defaultVariants:{variant:"default",size:"md"}}),GV=Bi.forwardRef(({className:e,children:t,variant:r,size:n,contentLoading:o,loadContent:a,noPadding:i,padding:s,...l},c)=>{let{variant:u,size:d,animationMode:f,lazy:p}=Bi.useContext(kX),m=r||u||"default",h=n||d||"md",[g,v]=Bi.useState(null),[y,x]=Bi.useState(!1);Bi.useEffect(()=>{a&&!g&&(x(!0),a().then(v).finally(()=>x(!1)))},[a,g]);let w=!i&&{xs:"p-3",sm:"p-3.5",md:"p-4",lg:"p-5",xl:"p-6"}[h];return(0,Cn.jsx)(R4,{ref:c,className:_(WV({variant:m,size:h}),f==="spring"&&"data-[state=closed]:animate-[collapsible-up_0.3s_cubic-bezier(0.34,1.56,0.64,1)] data-[state=open]:animate-[collapsible-down_0.3s_cubic-bezier(0.34,1.56,0.64,1)]",f==="bounce"&&"data-[state=closed]:animate-[collapsible-up_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)] data-[state=open]:animate-[collapsible-down_0.4s_cubic-bezier(0.68,-0.55,0.265,1.55)]",f==="fade"&&"data-[state=closed]:animate-[collapsible-up_0.2s_ease-in-out] data-[state=open]:animate-[collapsible-down_0.2s_ease-in-out]",f==="slide"&&"data-[state=closed]:animate-[slide-up_0.3s_ease-out] data-[state=open]:animate-[slide-down_0.3s_ease-out]",f==="smooth"&&"data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",e),...l,children:(0,Cn.jsx)("div",{className:_(s||w),children:p?(0,Cn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,Cn.jsx)(xn,{className:"h-4 w-4 animate-pulse"}),(0,Cn.jsx)("span",{className:"text-sm",children:"Click to load content..."})]}):o||y?(0,Cn.jsxs)("div",{className:"flex items-center gap-2 py-4",children:[(0,Cn.jsx)(Rr,{className:"h-4 w-4 animate-spin"}),(0,Cn.jsx)("span",{className:"text-sm",children:"Loading content..."})]}):g||t})})});GV.displayName="MoonUICollapsibleContentPro";var q0e=()=>{let[e,t]=Bi.useState({openCount:0,lastOpened:null,totalTimeOpen:0}),r=Bi.useCallback(()=>{t(o=>({...o,openCount:o.openCount+1,lastOpened:new Date}))},[]),n=Bi.useCallback(()=>{t(o=>{if(o.lastOpened){let a=Date.now()-o.lastOpened.getTime();return{...o,totalTimeOpen:o.totalTimeOpen+a,lastOpened:null}}return o})},[]);return{analytics:e,trackOpen:r,trackClose:n}};var G0e=E(ce(),1);var FI=E(ce(),1),KV="moonui_license_cache",jpt=24*60*60*1e3,W0e=7*24*60*60*1e3;function pt(){let[e,t]=(0,FI.useState)(!0),[r,n]=(0,FI.useState)(!1),[o,a]=(0,FI.useState)(!1);(0,FI.useEffect)(()=>{(async()=>{try{console.log("[MoonUI Pro] Starting license check..."),console.log("[MoonUI Pro] Environment:","production");let c=localStorage.getItem(KV);if(c){let u=JSON.parse(c),d=Date.now();if(console.log("[MoonUI Pro] Cache found:",u),d-u.timestamp<jpt){console.log("[MoonUI Pro] Using valid cache"),n(u.valid&&u.hasLifetimeAccess),a(u.valid),t(!1);return}if(d-u.timestamp<W0e){console.log("[MoonUI Pro] Cache expired but within grace period"),s().catch(()=>{n(u.valid&&u.hasLifetimeAccess),a(u.valid)}),t(!1);return}}console.log("[MoonUI Pro] No valid cache, validating license..."),await s()}catch(c){console.error("[MoonUI Pro] License check error:",c),n(!1),a(!1)}finally{t(!1)}})()},[]);let i=async()=>{console.log("[MoonUI Pro] Getting auth token, isDevelopment:",!1,"isProduction:",!0);{let d=process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN||process.env.MOONUI_LICENSE_KEY||null;return console.log("[MoonUI Pro] Production token:",d?"found":"not found"),d}if(!1){if(typeof window<"u")try{}catch(f){}if(typeof window>"u")try{}catch(d){}}let u=process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN||process.env.MOONUI_LICENSE_KEY||null;return console.log("[MoonUI Pro] Fallback env token:",u?"found":"not found"),u},s=async()=>{let l=await i();if(console.log("[MoonUI Pro] Validating license with token:",l?l.substring(0,20)+"...":"null"),!l){console.log("[MoonUI Pro] No token found, denying access"),n(!1),a(!1);return}try{let c=await fetch("https://moonui.dev/api/auth/validate",{headers:{Authorization:`Bearer ${l}`}});if(c.ok){let u=await c.json(),d={valid:u.valid,hasLifetimeAccess:u.user?.hasLifetimeAccess||!1,timestamp:Date.now(),cacheUntil:u.cacheUntil?new Date(u.cacheUntil).getTime():void 0};localStorage.setItem(KV,JSON.stringify(d)),n(u.valid&&(u.user?.hasLifetimeAccess||u.user?.features?.includes("pro_components"))),a(u.valid)}else localStorage.removeItem(KV),n(!1),a(!1)}catch{let u=localStorage.getItem(KV);if(u){let d=JSON.parse(u);if(Date.now()-d.timestamp<W0e){n(d.valid&&d.hasLifetimeAccess),a(d.valid);return}}n(!1),a(!1)}};return{isLoading:e,isAuthenticated:o,isAdmin:!1,hasProAccess:r,subscriptionPlan:r?"lifetime":"free",subscription:{status:r?"active":"inactive",plan:r?"lifetime":"free"}}}var wl=E(ue(),1);function Sn({componentName:e="Pro Component",className:t,compact:r=!1}){return r?(0,wl.jsxs)("div",{className:_("flex flex-col items-center justify-center p-4 text-center","rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700","bg-gray-50/50 dark:bg-gray-900/50",t),children:[(0,wl.jsx)(jt,{className:"h-8 w-8 text-gray-400 dark:text-gray-600 mb-2"}),(0,wl.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"API Key Required"}),(0,wl.jsx)("a",{href:"https://moonui.dev/docs/authentication",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline font-medium mt-1",children:"Setup API Keys \u2192"})]}):(0,wl.jsxs)("div",{className:_("flex flex-col items-center justify-center","rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700","bg-gradient-to-b from-gray-50 to-gray-100/50 dark:from-gray-900 dark:to-gray-950/50","p-8 text-center min-h-[200px]",t),children:[(0,wl.jsxs)("div",{className:"relative",children:[(0,wl.jsx)("div",{className:"absolute inset-0 bg-primary/20 blur-xl rounded-full"}),(0,wl.jsx)(jt,{className:"relative h-12 w-12 text-gray-400 dark:text-gray-600 mb-4"})]}),(0,wl.jsx)("h3",{className:"text-lg font-semibold mb-2",children:e}),(0,wl.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4 max-w-sm",children:"API key configuration required for Pro components"}),(0,wl.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,wl.jsxs)("a",{href:"https://moonui.dev/docs/authentication",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",children:[(0,wl.jsx)(jt,{className:"h-3 w-3"}),"Setup API Keys"]}),(0,wl.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,wl.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Add MOONUI_LICENSE_KEY to .env"}),(0,wl.jsx)("a",{href:"https://moonui.dev/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline",children:"View Pro Plans \u2192"})]})]})]})}var Gh=E(ue(),1),$pt=["#000000","#374151","#EF4444","#F97316","#F59E0B","#EAB308","#22C55E","#10B981","#06B6D4","#3B82F6","#6366F1","#8B5CF6","#A855F7","#D946EF","#EC4899","#F43F5E"],BI=({value:e="#000000",onChange:t,className:r,showInput:n=!1,showPresets:o=!0,size:a="default",presets:i=$pt})=>{let{hasProAccess:s,isLoading:l}=pt(),[c,u]=(0,G0e.useState)(e),d=p=>{u(p),t?.(p)},f={sm:"w-6 h-6",default:"w-8 h-8",lg:"w-10 h-10"};return!l&&!s?(0,Gh.jsx)(Sn,{componentName:"Color Picker",compact:!0}):(0,Gh.jsxs)("div",{className:_("flex flex-col gap-2",r),children:[n&&(0,Gh.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Gh.jsx)("input",{type:"color",value:c,onChange:p=>d(p.target.value),className:_("rounded border cursor-pointer",f[a]||f.default)}),(0,Gh.jsx)("input",{type:"text",value:c,onChange:p=>d(p.target.value),className:"px-2 py-1 border rounded text-sm font-mono",placeholder:"#000000"})]}),!n&&(0,Gh.jsx)("input",{type:"color",value:c,onChange:p=>d(p.target.value),className:_("rounded border cursor-pointer",f[a]||f.default)}),o&&i&&i.length>0&&(0,Gh.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(p=>(0,Gh.jsx)("button",{type:"button",onClick:()=>d(p),className:_("w-6 h-6 rounded border-2 hover:scale-110 transition-transform",c===p?"border-gray-900 dark:border-gray-100":"border-transparent"),style:{backgroundColor:p}},p))})]})};var _b=E(ce(),1),ki=E(ce(),1);var K0e=1,qpt=.9,Wpt=.8,Gpt=.17,RX=.1,NX=.999,Kpt=.9999,Xpt=.99,Ypt=/[\\\/_+.#"@\[\(\{&]/,Qpt=/[\\\/_+.#"@\[\(\{&]/g,Zpt=/[\s-]/,Y0e=/[\s-]/g;function MX(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?K0e:Xpt;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,m;c>=0;)d=MX(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=K0e:Ypt.test(e.charAt(c-1))?(d*=Wpt,p=e.slice(o,c-1).match(Qpt),p&&o>0&&(d*=Math.pow(NX,p.length))):Zpt.test(e.charAt(c-1))?(d*=qpt,m=e.slice(o,c-1).match(Y0e),m&&o>0&&(d*=Math.pow(NX,m.length))):(d*=Gpt,o>0&&(d*=Math.pow(NX,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=Kpt)),(d<RX&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=MX(e,t,r,n,c+1,a+2,i),f*RX>d&&(d=f*RX)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function X0e(e){return e.toLowerCase().replace(Y0e," ")}function Q0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,MX(e,t,X0e(e),X0e(t),0,0,{})}var ba=E(ce(),1);var nVr=!!(typeof window<"u"&&window.document&&window.document.createElement);function Kh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var Pi=E(ce(),1);var Z0e=E(ce(),1);function XV(e,t=globalThis?.document){let r=Hn(e);Z0e.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var AX=E(ue(),1),Jpt="DismissableLayer",TX="dismissableLayer.update",emt="dismissableLayer.pointerDownOutside",tmt="dismissableLayer.focusOutside",J0e,twe=Pi.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),LX=Pi.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=Pi.useContext(twe),[u,d]=Pi.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=Pi.useState({}),m=Wt(t,S=>d(S)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,b=omt(S=>{let k=S.target,T=[...c.branches].some(O=>O.contains(k));!w||T||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=amt(S=>{let k=S.target;[...c.branches].some(O=>O.contains(k))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return XV(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),Pi.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(J0e=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),ewe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=J0e)}},[u,f,r,c]),Pi.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),ewe())},[u,c]),Pi.useEffect(()=>{let S=()=>p({});return document.addEventListener(TX,S),()=>document.removeEventListener(TX,S)},[]),(0,AX.jsx)(ot.div,{...l,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Kh(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Kh(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Kh(e.onPointerDownCapture,b.onPointerDownCapture)})});LX.displayName=Jpt;var rmt="DismissableLayerBranch",nmt=Pi.forwardRef((e,t)=>{let r=Pi.useContext(twe),n=Pi.useRef(null),o=Wt(t,n);return Pi.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,AX.jsx)(ot.div,{...e,ref:o})});nmt.displayName=rmt;function omt(e,t=globalThis?.document){let r=Hn(e),n=Pi.useRef(!1),o=Pi.useRef(()=>{});return Pi.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){rwe(emt,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function amt(e,t=globalThis?.document){let r=Hn(e),n=Pi.useRef(!1);return Pi.useEffect(()=>{let o=a=>{a.target&&!n.current&&rwe(tmt,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ewe(){let e=new CustomEvent(TX);document.dispatchEvent(e)}function rwe(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Hx(o,a):o.dispatchEvent(a)}var up=E(ce(),1);var swe=E(ue(),1),EX="focusScope.autoFocusOnMount",DX="focusScope.autoFocusOnUnmount",nwe={bubbles:!1,cancelable:!0},imt="FocusScope",Kv=up.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=up.useState(null),c=Hn(o),u=Hn(a),d=up.useRef(null),f=Wt(t,h=>l(h)),p=up.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;up.useEffect(()=>{if(n){let y=function(C){if(p.paused||!s)return;let S=C.target;s.contains(S)?d.current=S:Cb(d.current,{select:!0})},x=function(C){if(p.paused||!s)return;let S=C.relatedTarget;S!==null&&(s.contains(S)||Cb(d.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(let k of C)k.removedNodes.length>0&&Cb(s)};var h=y,g=x,v=w;document.addEventListener("focusin",y),document.addEventListener("focusout",x);let b=new MutationObserver(w);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),b.disconnect()}}},[n,s,p.paused]),up.useEffect(()=>{if(s){awe.add(p);let h=document.activeElement;if(!s.contains(h)){let v=new CustomEvent(EX,nwe);s.addEventListener(EX,c),s.dispatchEvent(v),v.defaultPrevented||(smt(fmt(lwe(s)),{select:!0}),document.activeElement===h&&Cb(s))}return()=>{s.removeEventListener(EX,c),setTimeout(()=>{let v=new CustomEvent(DX,nwe);s.addEventListener(DX,u),s.dispatchEvent(v),v.defaultPrevented||Cb(h??document.body,{select:!0}),s.removeEventListener(DX,u),awe.remove(p)},0)}}},[s,c,u,p]);let m=up.useCallback(h=>{if(!r&&!n||p.paused)return;let g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(g&&v){let y=h.currentTarget,[x,w]=lmt(y);x&&w?!h.shiftKey&&v===w?(h.preventDefault(),r&&Cb(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),r&&Cb(w,{select:!0})):v===y&&h.preventDefault()}},[r,n,p.paused]);return(0,swe.jsx)(ot.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});Kv.displayName=imt;function smt(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Cb(n,{select:t}),document.activeElement!==r)return}function lmt(e){let t=lwe(e),r=owe(t,e),n=owe(t.reverse(),e);return[r,n]}function lwe(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function owe(e,t){for(let r of e)if(!cmt(r,{upTo:t}))return r}function cmt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function umt(e){return e instanceof HTMLInputElement&&"select"in e}function Cb(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&umt(e)&&t&&e.select()}}var awe=dmt();function dmt(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=iwe(e,t),e.unshift(t)},remove(t){e=iwe(e,t),e[0]?.resume()}}}function iwe(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function fmt(e){return e.filter(t=>t.tagName!=="A")}var YV=E(ce(),1),cwe=E(Nh(),1);var uwe=E(ue(),1),pmt="Portal",nf=YV.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=YV.useState(!1);zn(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?cwe.default.createPortal((0,uwe.jsx)(ot.div,{...n,ref:t}),i):null});nf.displayName=pmt;var rd=E(ce(),1);var dwe=E(ce(),1);function mmt(e,t){return dwe.useReducer((r,n)=>t[r][n]??r,e)}var KL=e=>{let{present:t,children:r}=e,n=hmt(t),o=typeof r=="function"?r({present:n.isPresent}):rd.Children.only(r),a=Wt(n.ref,gmt(o));return typeof r=="function"||n.isPresent?rd.cloneElement(o,{ref:a}):null};KL.displayName="Presence";function hmt(e){let[t,r]=rd.useState(),n=rd.useRef(null),o=rd.useRef(e),a=rd.useRef("none"),i=e?"mounted":"unmounted",[s,l]=mmt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return rd.useEffect(()=>{let c=QV(n.current);a.current=s==="mounted"?c:"none"},[s]),zn(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=QV(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),zn(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=QV(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=QV(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:rd.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function QV(e){return e?.animationName||"none"}function gmt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var pwe=E(ce(),1),OX=0;function mwe(){pwe.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fwe()),document.body.insertAdjacentElement("beforeend",e[1]??fwe()),OX++,()=>{OX===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),OX--}},[])}function fwe(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nd=function(){return nd=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},nd.apply(this,arguments)};function ZV(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function hwe(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var n5=E(ce());var Pc=E(ce());var yC="right-scroll-bar-position",xC="width-before-scroll-bar",_X="with-scroll-bars-hidden",FX="--removed-body-scroll-bar-size";function JV(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var gwe=E(ce());function vwe(e,t){var r=(0,gwe.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var e5=E(ce());var vmt=typeof window<"u"?e5.useLayoutEffect:e5.useEffect,ywe=new WeakMap;function BX(e,t){var r=vwe(t||null,function(n){return e.forEach(function(o){return JV(o,n)})});return vmt(function(){var n=ywe.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(s){a.has(s)||JV(s,null)}),a.forEach(function(s){o.has(s)||JV(s,i)})}ywe.set(r,e)},[e]),r}function ymt(e){return e}function xmt(e,t){t===void 0&&(t=ymt);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var u=i;i=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function VX(e){e===void 0&&(e={});var t=xmt(null);return t.options=nd({async:!0,ssr:!1},e),t}var xwe=E(ce()),bwe=function(e){var t=e.sideCar,r=ZV(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return xwe.createElement(n,nd({},r))};bwe.isSideCarExport=!0;function UX(e,t){return e.useMedium(t),bwe}var t5=VX();var zX=function(){},XL=Pc.forwardRef(function(e,t){var r=Pc.useRef(null),n=Pc.useState({onScrollCapture:zX,onWheelCapture:zX,onTouchMoveCapture:zX}),o=n[0],a=n[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,v=e.as,y=v===void 0?"div":v,x=e.gapMode,w=ZV(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=f,C=BX([r,t]),S=nd(nd({},w),o);return Pc.createElement(Pc.Fragment,null,u&&Pc.createElement(b,{sideCar:t5,removeScrollBar:c,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:x}),i?Pc.cloneElement(Pc.Children.only(s),nd(nd({},S),{ref:C})):Pc.createElement(y,nd({},S,{className:l,ref:C}),s))});XL.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};XL.classNames={fullWidth:xC,zeroRight:yC};var Ba=E(ce());var UI=E(ce());var Swe=E(ce());var wwe;var Cwe=function(){if(wwe)return wwe;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bmt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cwe();return t&&e.setAttribute("nonce",t),e}function wmt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cmt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var HX=function(){var e=0,t=null;return{add:function(r){e==0&&(t=bmt())&&(wmt(t,r),Cmt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var jX=function(){var e=HX();return function(t,r){Swe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var YL=function(){var e=jX(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var Smt={left:0,top:0,right:0,gap:0},$X=function(e){return parseInt(e||"",10)||0},Pmt=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$X(r),$X(n),$X(o)]},qX=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Smt;var t=Pmt(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var Imt=YL(),VI="data-scroll-locked",kmt=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
70
70
|
.`.concat(_X,` {
|
|
71
71
|
overflow: hidden `).concat(n,`;
|
|
72
72
|
padding-right: `).concat(s,"px ").concat(n,`;
|