lawgic-dev-kit 0.22.18 → 0.23.2
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/_virtual/index2.js +3 -2
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +5 -3
- package/dist/_virtual/index5.js +2 -5
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/atoms/Toast/Toast.js +14 -14
- package/dist/components/molecules/Tooltip/Tooltip.d.ts +11 -5
- package/dist/components/molecules/Tooltip/Tooltip.js +39 -28
- package/dist/lawgic-dev-kit.css +1 -1
- package/dist/lawgic-dev-kit.umd.js +2 -2
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/src/components/molecules/Tooltip/Tooltip.d.ts +11 -5
- package/package.json +1 -1
|
@@ -618,7 +618,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
618
618
|
${m}px !important;
|
|
619
619
|
top: ${d}px !important;
|
|
620
620
|
}
|
|
621
|
-
`),()=>{document.head.removeChild(x)}},[t]),g.jsx(VE,{isPresent:t,childRef:s,sizeRef:o,children:he.cloneElement(e,{ref:s})})}const WE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:a,anchorX:c})=>{const u=Qc(UE),d=O.useId(),h=O.useCallback(m=>{u.set(m,!0);for(const x of u.values())if(!x)return;r&&r()},[u,r]),p=O.useMemo(()=>({id:d,initial:t,isPresent:n,custom:s,onExitComplete:h,register:m=>(u.set(m,!1),()=>u.delete(m))}),o?[Math.random(),h]:[n,h]);return O.useMemo(()=>{u.forEach((m,x)=>u.set(x,!1))},[n]),he.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(BE,{isPresent:n,anchorX:c,children:e})),g.jsx(fa.Provider,{value:p,children:e})};function UE(){return new Map}function a0(e=!0){const t=O.useContext(fa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=O.useId();O.useEffect(()=>{if(e)return s(o)},[e]);const a=O.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const da=e=>e.key||"";function l0(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const zE=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:a=!1,anchorX:c="left"})=>{const[u,d]=a0(a),h=O.useMemo(()=>l0(e),[e]),p=a&&!u?[]:h.map(da),m=O.useRef(!0),x=O.useRef(h),S=Qc(()=>new Map),[b,T]=O.useState(h),[v,A]=O.useState(h);o0(()=>{m.current=!1,x.current=h;for(let P=0;P<v.length;P++){const D=da(v[P]);p.includes(D)?S.delete(D):S.get(D)!==!0&&S.set(D,!1)}},[v,p.length,p.join("-")]);const C=[];if(h!==b){let P=[...h];for(let D=0;D<v.length;D++){const R=v[D],F=da(R);p.includes(F)||(P.splice(D,0,R),C.push(R))}return o==="wait"&&C.length&&(P=C),A(l0(P)),T(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:I}=O.useContext(Jc);return g.jsx(g.Fragment,{children:v.map(P=>{const D=da(P),R=a&&!u?!1:h===v||p.includes(D),F=()=>{if(S.has(D))S.set(D,!0);else return;let W=!0;S.forEach(Q=>{Q||(W=!1)}),W&&(I==null||I(),A(x.current),a&&(d==null||d()),r&&r())};return g.jsx(WE,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,onExitComplete:R?void 0:F,anchorX:c,children:P},D)})})};function nu(e,t){e.indexOf(t)===-1&&e.push(t)}function ru(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Nt=e=>e;let Rs=Nt,Cr=Nt;process.env.NODE_ENV!=="production"&&(Rs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Cr=(e,t)=>{if(!e)throw new Error(t)});const GE={useManualTiming:!1};function su(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};let iu=class{constructor(){this.subscriptions=[]}add(t){return nu(this.subscriptions,t),()=>ru(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const Pn=e=>e*1e3,Yn=e=>e/1e3;function c0(e,t){return t?e*(1e3/t):0}const u0=new Set;function ha(e,t,n){e||u0.has(t)||(console.warn(t),u0.add(t))}const YE=su(()=>window.ScrollTimeline!==void 0);let HE=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,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(YE()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].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 n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},qE=class extends HE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}};function ou(e,t){return e?e[t]||e.default||e:void 0}const au=2e4;function f0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<au;)t+=n,r=e.next(t);return t>=au?1/0:t}function lu(e){return typeof e=="function"}function d0(e,t){e.timeline=t,e.onfinish=null}const cu=e=>Array.isArray(e)&&typeof e[0]=="number",KE={linearEasing:void 0};function XE(e,t){const n=su(e);return()=>{var r;return(r=KE[t])!==null&&r!==void 0?r:n()}}const pa=XE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),h0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(Fs(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function p0(e){return!!(typeof e=="function"&&pa()||!e||typeof e=="string"&&(e in uu||pa())||cu(e)||Array.isArray(e)&&e.every(p0))}const zi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zi([0,.65,.55,1]),circOut:zi([.55,0,1,.45]),backIn:zi([.31,.01,.66,-.59]),backOut:zi([.33,1.53,.69,.99])};function m0(e,t){if(e)return typeof e=="function"&&pa()?h0(e,t):cu(e)?zi(e):Array.isArray(e)?e.map(n=>m0(n,t)||uu.easeOut):uu[e]}const ma=["read","resolveKeyframes","update","preRender","render","postRender"],g0={value:null};function ZE(e,t){let n=new Set,r=new Set,s=!1,o=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},u=0;function d(p){a.has(p)&&(h.schedule(p),e()),u++,p(c)}const h={schedule:(p,m=!1,x=!1)=>{const b=x&&s?n:r;return m&&a.add(p),b.has(p)||b.add(p),p},cancel:p=>{r.delete(p),a.delete(p)},process:p=>{if(c=p,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(d),t&&g0.value&&g0.value.frameloop[t].push(u),u=0,n.clear(),s=!1,o&&(o=!1,h.process(p))}};return h}const JE=40;function y0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=ma.reduce((v,A)=>(v[A]=ZE(o,t?A:void 0),v),{}),{read:c,resolveKeyframes:u,update:d,preRender:h,render:p,postRender:m}=a,x=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,JE),1),s.timestamp=v,s.isProcessing=!0,c.process(s),u.process(s),d.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(x))},S=()=>{n=!0,r=!0,s.isProcessing||e(x)};return{schedule:ma.reduce((v,A)=>{const C=a[A];return v[A]=(I,P=!1,D=!1)=>(n||S(),C.schedule(I,P,D)),v},{}),cancel:v=>{for(let A=0;A<ma.length;A++)a[ma[A]].cancel(v)},state:s,steps:a}}const{schedule:Ye,cancel:Er,state:yt,steps:fu}=y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nt,!0),{schedule:du}=y0(queueMicrotask,!1);let ga;function QE(){ga=void 0}const An={now:()=>(ga===void 0&&An.set(yt.isProcessing||GE.useManualTiming?yt.timestamp:performance.now()),ga),set:e=>{ga=e,queueMicrotask(QE)}},mn={x:!1,y:!1};function x0(){return mn.x||mn.y}function eP(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function tP(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function v0(e,t){const n=tP(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function b0(e){return!(e.pointerType==="touch"||x0())}function nP(e,t,n={}){const[r,s,o]=v0(e,n),a=c=>{if(!b0(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{b0(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,s)};return r.forEach(c=>{c.addEventListener("pointerenter",a,s)}),o}const w0=(e,t)=>t?e===t?!0:w0(e,t.parentElement):!1,hu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sP(e){return rP.has(e.tagName)||e.tabIndex!==-1}const Gi=new WeakSet;function S0(e){return t=>{t.key==="Enter"&&e(t)}}function pu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=S0(()=>{if(Gi.has(n))return;pu(n,"down");const s=S0(()=>{pu(n,"up")}),o=()=>pu(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function T0(e){return hu(e)&&!x0()}function oP(e,t,n={}){const[r,s,o]=v0(e,n),a=c=>{const u=c.currentTarget;if(!T0(c)||Gi.has(u))return;Gi.add(u);const d=t(u,c),h=(x,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",m),!(!T0(x)||!Gi.has(u))&&(Gi.delete(u),typeof d=="function"&&d(x,{success:S}))},p=x=>{h(x,u===window||u===document||n.useGlobalTarget||w0(u,x.target))},m=x=>{h(x,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",m,s)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),c instanceof HTMLElement&&(c.addEventListener("focus",d=>iP(d,s)),!sP(c)&&c.tabIndex===null&&(c.tabIndex=0))}),o}const C0=30,aP=e=>!isNaN(parseFloat(e));let lP=class{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=An.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ha(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new iu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>C0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,C0);return c0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Yi(e,t){return new lP(e,t)}const E0=O.createContext({strict:!1}),P0={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"]},Vs={};for(const e in P0)Vs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function cP(e){for(const t in e)Vs[t]={...Vs[t],...e[t]}}const uP=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 ya(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let A0=e=>!ya(e);function fP(e){e&&(A0=t=>t.startsWith("on")?!ya(t):e(t))}try{fP(require("@emotion/is-prop-valid").default)}catch{}function dP(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(A0(s)||n===!0&&ya(s)||!t&&!ya(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function hP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ha(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const xa=O.createContext({});function va(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Hi(e){return typeof e=="string"||Array.isArray(e)}const mu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gu=["initial",...mu];function ba(e){return va(e.animate)||gu.some(t=>Hi(e[t]))}function M0(e){return!!(ba(e)||e.variants)}function pP(e,t){if(ba(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hi(n)?n:void 0,animate:Hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function mP(e){const{initial:t,animate:n}=pP(e,O.useContext(xa));return O.useMemo(()=>({initial:t,animate:n}),[O0(t),O0(n)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const gP=Symbol.for("motionComponentSymbol");function Bs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yP(e,t,n){return O.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bs(n)&&(n.current=r))},[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$0="data-"+yu("framerAppearId"),_0=O.createContext({});function xP(e,t,n,r,s){var o,a;const{visualElement:c}=O.useContext(xa),u=O.useContext(E0),d=O.useContext(fa),h=O.useContext(tu).reducedMotion,p=O.useRef(null);r=r||u.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:c,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const m=p.current,x=O.useContext(_0);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&vP(p.current,n,s,x);const S=O.useRef(!1);O.useInsertionEffect(()=>{m&&S.current&&m.update(n,d)});const b=n[$0],T=O.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return o0(()=>{m&&(S.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),du.render(m.render),T.current&&m.animationState&&m.animationState.animateChanges())}),O.useEffect(()=>{m&&(!T.current&&m.animationState&&m.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,b)}),T.current=!1))}),m}function vP(e,t,n,r){const{layoutId:s,layout:o,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:I0(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||c&&Bs(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:d})}function I0(e){if(e)return e.options.allowProjection!==!1?e.projection:I0(e.parent)}function bP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,a;e&&cP(e);function c(d,h){let p;const m={...O.useContext(tu),...d,layoutId:wP(d)},{isStatic:x}=m,S=mP(d),b=r(d,x);if(!x&&eu){SP(m,e);const T=TP(m);p=T.MeasureLayout,S.visualElement=xP(s,b,m,t,T.ProjectionNode)}return g.jsxs(xa.Provider,{value:S,children:[p&&S.visualElement?g.jsx(p,{visualElement:S.visualElement,...m}):null,n(s,d,yP(b,S.visualElement,h),b,x,S.visualElement)]})}c.displayName=`motion.${typeof s=="string"?s:`create(${(a=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&a!==void 0?a:""})`}`;const u=O.forwardRef(c);return u[gP]=s,u}function wP({layoutId:e}){const t=O.useContext(Jc).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){const n=O.useContext(E0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Rs(!1,r):Cr(!1,r)}}function TP(e){const{drag:t,layout:n}=Vs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const D0=e=>t=>typeof t=="string"&&t.startsWith(e),xu=D0("--"),CP=D0("var(--"),vu=e=>CP(e)?EP.test(e.split("/*")[0].trim()):!1,EP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qi={};function PP(e){for(const t in e)qi[t]=e[t],xu(t)&&(qi[t].isCSSVariable=!0)}const Ws=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],es=new Set(Ws);function N0(e,{layout:t,layoutId:n}){return es.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qi[e]||e==="opacity")}const St=e=>!!(e&&e.getVelocity),k0=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hn=(e,t,n)=>n>t?t:n<e?e:n,Us={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ki={...Us,transform:e=>Hn(0,1,e)},wa={...Us,default:1},Xi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=Xi("deg"),Mn=Xi("%"),we=Xi("px"),AP=Xi("vh"),MP=Xi("vw"),j0={...Mn,parse:e=>Mn.parse(e)/100,transform:e=>Mn.transform(e*100)},OP={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},$P={rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:wa,scaleX:wa,scaleY:wa,scaleZ:wa,skew:Pr,skewX:Pr,skewY:Pr,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Ki,originX:j0,originY:j0,originZ:we},L0={...Us,transform:Math.round},bu={...OP,...$P,zIndex:L0,size:we,fillOpacity:Ki,strokeOpacity:Ki,numOctaves:L0},_P={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},IP=Ws.length;function DP(e,t,n){let r="",s=!0;for(let o=0;o<IP;o++){const a=Ws[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=k0(c,bu[a]);if(!u){s=!1;const h=_P[a]||a;r+=`${h}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function wu(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let a=!1,c=!1;for(const u in t){const d=t[u];if(es.has(u)){a=!0;continue}else if(xu(u)){s[u]=d;continue}else{const h=k0(d,bu[u]);u.startsWith("origin")?(c=!0,o[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=DP(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;r.transformOrigin=`${u} ${d} ${h}`}}const Su=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function R0(e,t,n){for(const r in t)!St(t[r])&&!N0(r,n)&&(e[r]=t[r])}function NP({transformTemplate:e},t){return O.useMemo(()=>{const n=Su();return wu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function kP(e,t){const n=e.style||{},r={};return R0(r,n,e),Object.assign(r,NP(e,t)),r}function jP(e,t){const n={},r=kP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["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 Tu(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const RP={offset:"stroke-dashoffset",array:"stroke-dasharray"},FP={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?RP:FP;e[o.offset]=we.transform(-r);const a=we.transform(t),c=we.transform(n);e[o.array]=`${a} ${c}`}function F0(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function BP(e,t,n){const r=F0(t,e.x,e.width),s=F0(n,e.y,e.height);return`${r} ${s}`}function Cu(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:a,pathSpacing:c=1,pathOffset:u=0,...d},h,p){if(wu(e,d,p),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:x,dimensions:S}=e;m.transform&&(S&&(x.transform=m.transform),delete m.transform),S&&(s!==void 0||o!==void 0||x.transform)&&(x.transformOrigin=BP(S,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),a!==void 0&&VP(m,a,c,u,!1)}const V0=()=>({...Su(),attrs:{}}),Eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WP(e,t,n,r){const s=O.useMemo(()=>{const o=V0();return Cu(o,t,Eu(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};R0(o,e.style,e),s.style={...o,...s.style}}return s}function UP(e=!1){return(n,r,s,{latestValues:o},a)=>{const u=(Tu(n)?WP:jP)(r,o,a,n),d=dP(r,typeof n=="string",e),h=n!==O.Fragment?{...d,...u,ref:s}:{},{children:p}=r,m=O.useMemo(()=>St(p)?p.get():p,[p]);return O.createElement(n,{...h,children:m})}}function B0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Pu(e,t,n,r){if(typeof t=="function"){const[s,o]=B0(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=B0(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const Au=e=>Array.isArray(e),zP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),GP=e=>Au(e)?e[e.length-1]||0:e;function Sa(e){const t=St(e)?e.get():e;return zP(t)?t.toValue():t}function YP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const a={latestValues:HP(r,s,o,e),renderState:t()};return n&&(a.onMount=c=>n({props:r,current:c,...a}),a.onUpdate=c=>n(c)),a}const W0=e=>(t,n)=>{const r=O.useContext(xa),s=O.useContext(fa),o=()=>YP(e,t,r,s);return n?o():Qc(o)};function HP(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=Sa(o[m]);let{initial:a,animate:c}=e;const u=ba(e),d=M0(e);t&&d&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?c:a;if(p&&typeof p!="boolean"&&!va(p)){const m=Array.isArray(p)?p:[p];for(let x=0;x<m.length;x++){const S=Pu(e,m[x]);if(S){const{transitionEnd:b,transition:T,...v}=S;for(const A in v){let C=v[A];if(Array.isArray(C)){const I=h?C.length-1:0;C=C[I]}C!==null&&(s[A]=C)}for(const A in b)s[A]=b[A]}}}return s}function Mu(e,t,n){var r;const{style:s}=e,o={};for(const a in s)(St(s[a])||t.style&&St(t.style[a])||N0(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=s[a]);return o}const qP={useVisualState:W0({scrapeMotionValuesFromProps:Mu,createRenderState:Su})};function U0(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function z0(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const G0=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 Y0(e,t,n,r){z0(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(G0.has(s)?s:yu(s),t.attrs[s])}function H0(e,t,n){const r=Mu(e,t,n);for(const s in e)if(St(e[s])||St(t[s])){const o=Ws.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const q0=["x","y","width","height","cx","cy","r"],KP={useVisualState:W0({scrapeMotionValuesFromProps:H0,createRenderState:V0,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const c in s)if(es.has(c)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let c=0;c<q0.length;c++){const u=q0[c];e[u]!==t[u]&&(a=!0)}a&&Ye.read(()=>{U0(n,r),Ye.render(()=>{Cu(r,s,Eu(n.tagName),e.transformTemplate),Y0(n,r)})})}})};function XP(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const a={...Tu(r)?KP:qP,preloadedFeatures:e,useRender:UP(s),createVisualElement:t,Component:r};return bP(a)}}function Zi(e,t,n){const r=e.getProps();return Pu(r,t,n!==void 0?n:r.custom,e)}const K0=new Set(["width","height","top","left","right","bottom",...Ws]);function ZP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yi(n))}function JP(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const a in o){const c=GP(o[a]);ZP(e,a,c)}}function QP(e){return!!(St(e)&&e.add)}function Ou(e,t){const n=e.getValue("willChange");if(QP(n))return n.add(t)}function X0(e){return e.props[$0]}const Z0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,s){let o,a,c=0;do a=t+(n-t)/2,o=Z0(a,r,s)-e,o>0?n=a:t=a;while(Math.abs(o)>eA&&++c<tA);return a}function Ji(e,t,n,r){if(e===t&&n===r)return Nt;const s=o=>nA(o,0,1,e,n);return o=>o===0||o===1?o:Z0(s(o),t,r)}const J0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q0=e=>t=>1-e(1-t),eg=Ji(.33,1.53,.69,.99),$u=Q0(eg),tg=J0($u),ng=e=>(e*=2)<1?.5*$u(e):.5*(2-Math.pow(2,-10*(e-1))),_u=e=>1-Math.sin(Math.acos(e)),rg=Q0(_u),sg=J0(_u),ig=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ig(e):!0}const Qi=e=>Math.round(e*1e5)/1e5,Iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(e){return e==null}const iA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Du=(e,t)=>n=>!!(typeof n=="string"&&iA.test(n)&&n.startsWith(e)||t&&!sA(n)&&Object.prototype.hasOwnProperty.call(n,t)),og=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,a,c]=r.match(Iu);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},oA=e=>Hn(0,255,e),Nu={...Us,transform:e=>Math.round(oA(e))},ts={test:Du("rgb","red"),parse:og("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nu.transform(e)+", "+Nu.transform(t)+", "+Nu.transform(n)+", "+Qi(Ki.transform(r))+")"};function aA(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ku={test:Du("#"),parse:aA,transform:ts.transform},zs={test:Du("hsl","hue"),parse:og("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mn.transform(Qi(t))+", "+Mn.transform(Qi(n))+", "+Qi(Ki.transform(r))+")"},Tt={test:e=>ts.test(e)||ku.test(e)||zs.test(e),parse:e=>ts.test(e)?ts.parse(e):zs.test(e)?zs.parse(e):ku.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ts.transform(e):zs.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(lA))===null||n===void 0?void 0:n.length)||0)>0}const ag="number",lg="color",uA="var",fA="var(",cg="${}",dA=/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 eo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(dA,u=>(Tt.test(u)?(r.color.push(o),s.push(lg),n.push(Tt.parse(u))):u.startsWith(fA)?(r.var.push(o),s.push(uA),n.push(u)):(r.number.push(o),s.push(ag),n.push(parseFloat(u))),++o,cg)).split(cg);return{values:n,split:c,indexes:r,types:s}}function ug(e){return eo(e).values}function fg(e){const{split:t,types:n}=eo(e),r=t.length;return s=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],s[a]!==void 0){const c=n[a];c===ag?o+=Qi(s[a]):c===lg?o+=Tt.transform(s[a]):o+=s[a]}return o}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=ug(e);return fg(e)(t.map(hA))}const Ar={test:cA,parse:ug,createTransformer:fg,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Iu)||[];if(!r)return e;const s=n.replace(r,"");let o=mA.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,ju={...Ar,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},xA={...bu,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:ju,WebkitFilter:ju},dg=e=>xA[e];function hg(e,t){let n=dg(e);return n!==ju&&(n=Ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vA=new Set(["auto","none","0"]);function bA(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!vA.has(o)&&eo(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=hg(n,s)}const ns=e=>e*180/Math.PI,Lu=e=>{const t=ns(Math.atan2(e[1],e[0]));return Ru(t)},wA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lu,rotateZ:Lu,skewX:e=>ns(Math.atan(e[1])),skewY:e=>ns(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ru=e=>(e=e%360,e<0&&(e+=360),e),pg=Lu,mg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mg,scaleY:gg,scale:e=>(mg(e)+gg(e))/2,rotateX:e=>Ru(ns(Math.atan2(e[6],e[5]))),rotateY:e=>Ru(ns(Math.atan2(-e[2],e[0]))),rotateZ:pg,rotate:pg,skewX:e=>ns(Math.atan(e[4])),skewY:e=>ns(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yg(e){return e.includes("scale")?1:0}function Fu(e,t){if(!e||e==="none")return yg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=SA,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wA,s=c}if(!s)return yg(t);const o=r[t],a=s[1].split(",").map(CA);return typeof o=="function"?o(a):a[o]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Fu(n,t)};function CA(e){return parseFloat(e.trim())}const xg=e=>e===Us||e===we,EA=new Set(["x","y","z"]),PA=Ws.filter(e=>!EA.has(e));function AA(e){const t=[];return PA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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:(e,{transform:t})=>Fu(t,"x"),y:(e,{transform:t})=>Fu(t,"y")};Gs.translateX=Gs.x,Gs.translateY=Gs.y;const rs=new Set;let Vu=!1,Bu=!1;function vg(){if(Bu){const e=Array.from(rs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=AA(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,a])=>{var c;(c=r.getValue(o))===null||c===void 0||c.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Bu=!1,Vu=!1,rs.forEach(e=>e.complete()),rs.clear()}function bg(){rs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bu=!0)})}function MA(){bg(),vg()}let Wu=class{constructor(t,n,r,s,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rs.add(this),Vu||(Vu=!0,Ye.read(bg),Ye.resolveKeyframes(vg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=s==null?void 0:s.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),s&&a===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};const wg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $A(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const _A=4;function Sg(e,t,n=1){Cr(n<=_A,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=$A(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return wg(a)?parseFloat(a):a}return vu(s)?Sg(s,t,n+1):s}const Tg=e=>t=>t.test(e),Cg=[Us,we,Mn,Pr,MP,AP,{test:e=>e==="auto",parse:e=>e}],Eg=e=>Cg.find(Tg(e));let Pg=class extends Wu{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),vu(d))){const h=Sg(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!K0.has(r)||t.length!==2)return;const[s,o]=t,a=Eg(s),c=Eg(o);if(a!==c)if(xg(a)&&xg(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)rA(t[s])&&r.push(s);r.length&&bA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=s.length-1,c=s[a];s[a]=Gs[r](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,d])=>{n.getValue(u).set(d)}),this.resolveNoneKeyframes()}};const Ag=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ar.test(e)||e==="0")&&!e.startsWith("url("));function IA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DA(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Ag(s,t),c=Ag(o,t);return Rs(a===c,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!a||!c?!1:IA(e)||(n==="spring"||lu(n))&&r}const NA=e=>e!==null;function Ta(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(NA),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const kA=40;let Mg=class{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=An.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>kA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&MA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:a,onComplete:c,onUpdate:u,isGenerator:d}=this.options;if(!d&&!DA(t,r,s,o))if(a)this.options.duration=0;else{u&&u(Ta(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};const Qe=(e,t,n)=>e+(t-e)*n;function Uu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,a=0;if(!t)s=o=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;s=Uu(u,c,e+1/3),o=Uu(u,c,e),a=Uu(u,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Ca(e,t){return n=>n>0?t:e}const zu=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},LA=[ku,ts,zs],RA=e=>LA.find(t=>t.test(e));function Og(e){const t=RA(e);if(Rs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===zs&&(n=jA(n)),n}const $g=(e,t)=>{const n=Og(e),r=Og(t);if(!n||!r)return Ca(e,t);const s={...n};return o=>(s.red=zu(n.red,r.red,o),s.green=zu(n.green,r.green,o),s.blue=zu(n.blue,r.blue,o),s.alpha=Qe(n.alpha,r.alpha,o),ts.transform(s))},FA=(e,t)=>n=>t(e(n)),to=(...e)=>e.reduce(FA),Gu=new Set(["none","hidden"]);function VA(e,t){return Gu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>Qe(e,t,n)}function Yu(e){return typeof e=="number"?BA:typeof e=="string"?vu(e)?Ca:Tt.test(e)?$g:zA:Array.isArray(e)?_g:typeof e=="object"?Tt.test(e)?$g:WA:Ca}function _g(e,t){const n=[...e],r=n.length,s=e.map((o,a)=>Yu(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=s[a](o);return n}}function WA(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Yu(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function UA(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],c=e.indexes[a][s[a]],u=(n=e.values[c])!==null&&n!==void 0?n:0;r[o]=u,s[a]++}return r}const zA=(e,t)=>{const n=Ar.createTransformer(t),r=eo(e),s=eo(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Gu.has(e)&&!s.values.length||Gu.has(t)&&!r.values.length?VA(e,t):to(_g(UA(r,s),s.values),n):(Rs(!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.`),Ca(e,t))};function Ig(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Yu(e)(e,t)}const GA=5;function Dg(e,t,n){const r=Math.max(t-GA,0);return c0(n-e(r),t-r)}const et={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},Ng=.001;function YA({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let s,o;Rs(e<=Pn(et.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Hn(et.minDamping,et.maxDamping,a),e=Hn(et.minDuration,et.maxDuration,Yn(e)),a<1?(s=d=>{const h=d*a,p=h*e,m=h-n,x=Hu(d,a),S=Math.exp(-p);return Ng-m/x*S},o=d=>{const p=d*a*e,m=p*n+n,x=Math.pow(a,2)*Math.pow(d,2)*e,S=Math.exp(-p),b=Hu(Math.pow(d,2),a);return(-s(d)+Ng>0?-1:1)*((m-x)*S)/b}):(s=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-.001+h*p},o=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=qA(s,o,c);if(e=Pn(e),isNaN(u))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const HA=12;function qA(e,t,n){let r=n;for(let s=1;s<HA;s++)r=r-e(r)/t(r);return r}function Hu(e,t){return e*Math.sqrt(1-t*t)}const KA=["duration","bounce"],XA=["stiffness","damping","mass"];function kg(e,t){return t.some(n=>e[n]!==void 0)}function ZA(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!kg(e,XA)&&kg(e,KA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Hn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:et.mass,stiffness:s,damping:o}}else{const n=YA(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function jg(e=et.visualDuration,t=et.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:p,velocity:m,isResolvedFromDuration:x}=ZA({...n,velocity:-Yn(n.velocity||0)}),S=m||0,b=d/(2*Math.sqrt(u*h)),T=a-o,v=Yn(Math.sqrt(u/h)),A=Math.abs(T)<5;r||(r=A?et.restSpeed.granular:et.restSpeed.default),s||(s=A?et.restDelta.granular:et.restDelta.default);let C;if(b<1){const P=Hu(v,b);C=D=>{const R=Math.exp(-b*v*D);return a-R*((S+b*v*T)/P*Math.sin(P*D)+T*Math.cos(P*D))}}else if(b===1)C=P=>a-Math.exp(-v*P)*(T+(S+v*T)*P);else{const P=v*Math.sqrt(b*b-1);C=D=>{const R=Math.exp(-b*v*D),F=Math.min(P*D,300);return a-R*((S+b*v*T)*Math.sinh(F)+P*T*Math.cosh(F))/P}}const I={calculatedDuration:x&&p||null,next:P=>{const D=C(P);if(x)c.done=P>=p;else{let R=0;b<1&&(R=P===0?Pn(S):Dg(C,P,D));const F=Math.abs(R)<=r,W=Math.abs(a-D)<=s;c.done=F&&W}return c.value=c.done?a:D,c},toString:()=>{const P=Math.min(f0(I),au),D=h0(R=>I.next(P*R).value,P,30);return P+"ms "+D}};return I}function Lg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],m={done:!1,value:p},x=F=>c!==void 0&&F<c||u!==void 0&&F>u,S=F=>c===void 0?u:u===void 0||Math.abs(c-F)<Math.abs(u-F)?c:u;let b=n*t;const T=p+b,v=a===void 0?T:a(T);v!==T&&(b=v-p);const A=F=>-b*Math.exp(-F/r),C=F=>v+A(F),I=F=>{const W=A(F),Q=C(F);m.done=Math.abs(W)<=d,m.value=m.done?v:Q};let P,D;const R=F=>{x(m.value)&&(P=F,D=jg({keyframes:[m.value,S(m.value)],velocity:Dg(C,F,m.value),damping:s,stiffness:o,restDelta:d,restSpeed:h}))};return R(0),{calculatedDuration:null,next:F=>{let W=!1;return!D&&P===void 0&&(W=!0,I(F),R(F)),P!==void 0&&F>=P?D.next(F-P):(!W&&I(F),m)}}}const JA=Ji(.42,0,1,1),QA=Ji(0,0,.58,1),Rg=Ji(.42,0,.58,1),eM=e=>Array.isArray(e)&&typeof e[0]!="number",Fg={linear:Nt,easeIn:JA,easeInOut:Rg,easeOut:QA,circIn:_u,circInOut:sg,circOut:rg,backIn:$u,backInOut:tg,backOut:eg,anticipate:ng},Vg=e=>{if(cu(e)){Cr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return Ji(t,n,r,s)}else if(typeof e=="string")return Cr(Fg[e]!==void 0,`Invalid easing type '${e}'`),Fg[e];return e};function tM(e,t,n){const r=[],s=n||Ig,o=e.length-1;for(let a=0;a<o;a++){let c=s(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Nt:t;c=to(u,c)}r.push(c)}return r}function nM(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Cr(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=tM(t,r,s),u=c.length,d=h=>{if(a&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const m=Fs(e[p],e[p+1],h);return c[p](m)};return n?h=>d(Hn(e[0],e[o-1],h)):d}function rM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Fs(0,t,r);e.push(Qe(n,1,s))}}function sM(e){const t=[0];return rM(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function oM(e,t){return e.map(()=>t||Rg).splice(0,e.length-1)}function no({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=eM(r)?r.map(Vg):Vg(r),o={done:!1,value:t[0]},a=iM(n&&n.length===t.length?n:sM(t),e),c=nM(a,t,{ease:Array.isArray(s)?s:oM(t,s)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const aM=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ye.update(t,!0),stop:()=>Er(t),now:()=>yt.isProcessing?yt.timestamp:An.now()}},lM={decay:Lg,inertia:Lg,tween:no,keyframes:no,spring:jg},cM=e=>e/100;let qu=class extends Mg{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();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,a=(s==null?void 0:s.KeyframeResolver)||Wu,c=(u,d)=>this.onKeyframesResolved(u,d);this.resolver=new a(o,c,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=this.options,c=lu(n)?n:lM[n]||no;let u,d;process.env.NODE_ENV!=="production"&&c!==no&&Cr(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==no&&typeof t[0]!="number"&&(u=to(cM,Ig(t[0],t[1])),t=[0,100]);const h=c({...this.options,keyframes:t});o==="mirror"&&(d=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=f0(h));const{calculatedDuration:p}=h,m=p+s,x=m*(r+1)-s;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:u,calculatedDuration:p,resolvedDuration:m,totalDuration:x}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:u,calculatedDuration:d,totalDuration:h,resolvedDuration:p}=r;if(this.startTime===null)return o.next(0);const{delay:m,repeat:x,repeatType:S,repeatDelay:b,onUpdate:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-m*(this.speed>=0?1:-1),A=this.speed>=0?v<0:v>h;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let C=this.currentTime,I=o;if(x){const F=Math.min(this.currentTime,h)/p;let W=Math.floor(F),Q=F%1;!Q&&F>=1&&(Q=1),Q===1&&W--,W=Math.min(W,x+1),!!(W%2)&&(S==="reverse"?(Q=1-Q,b&&(Q-=b/p)):S==="mirror"&&(I=a)),C=Hn(0,1,Q)*p}const P=A?{done:!1,value:u[0]}:I.next(C);c&&(P.value=c(P.value));let{done:D}=P;!A&&d!==null&&(D=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return R&&s!==void 0&&(P.value=Ta(u,this.options,s)),T&&T(P.value),R&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Yn(t.calculatedDuration):0}get time(){return Yn(this.currentTime)}set time(t){t=Pn(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){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Yn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aM,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??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";const{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)}};const uM=new Set(["opacity","clipPath","filter","transform"]);function fM(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:c="easeInOut",times:u}={}){const d={[t]:n};u&&(d.offset=u);const h=m0(c,s);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const dM=su(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ea=10,hM=2e4;function pM(e){return lu(e.type)||e.type==="spring"||!p0(e.ease)}function mM(e,t){const n=new qu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<hM;)r=n.sample(o),s.push(r.value),o+=Ea;return{times:void 0,keyframes:s,duration:o-Ea,ease:"linear"}}const Bg={anticipate:ng,backInOut:tg,circInOut:sg};function gM(e){return e in Bg}let Wg=class extends Mg{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Pg(o,(a,c)=>this.onKeyframesResolved(a,c),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:a,motionValue:c,name:u,startTime:d}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof o=="string"&&pa()&&gM(o)&&(o=Bg[o]),pM(this.options)){const{onComplete:p,onUpdate:m,motionValue:x,element:S,...b}=this.options,T=mM(t,b);t=T.keyframes,t.length===1&&(t[1]=t[0]),r=T.duration,s=T.times,o=T.ease,a="keyframes"}const h=fM(c.owner.current,u,t,{...this.options,duration:r,times:s,ease:o});return h.startTime=d??this.calcStartTime(),this.pendingTimeline?(d0(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:p}=this.options;c.set(Ta(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Yn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Yn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Pn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Nt;const{animation:r}=n;d0(r,t)}return Nt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:p,element:m,...x}=this.options,S=new qu({...x,keyframes:r,duration:s,type:o,ease:a,times:c,isGenerator:!0}),b=Pn(this.time);d.setWithVelocity(S.sample(b-Ea).value,S.sample(b).value,Ea)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=n.owner.getProps();return dM()&&r&&uM.has(r)&&(r!=="transform"||!d)&&!u&&!s&&o!=="mirror"&&a!==0&&c!=="inertia"}};const yM={type:"spring",stiffness:500,damping:25,restSpeed:10},xM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vM={type:"keyframes",duration:.8},bM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wM=(e,{keyframes:t})=>t.length>2?vM:es.has(e)?e.startsWith("scale")?xM(t[1]):yM:bM;function SM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const Ku=(e,t,n,r={},s,o)=>a=>{const c=ou(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Pn(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:m=>{t.set(m),c.onUpdate&&c.onUpdate(m)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};SM(c)||(h={...h,...wM(e,h)}),h.duration&&(h.duration=Pn(h.duration)),h.repeatDelay&&(h.repeatDelay=Pn(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(p=!0)),h.allowFlatten=!c.type&&!c.ease,p&&!o&&t.get()!==void 0){const m=Ta(h.keyframes,c);if(m!==void 0)return Ye.update(()=>{h.onUpdate(m),h.onComplete()}),new qE([])}return!o&&Wg.supports(h)?new Wg(h):new qu(h)};function TM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ug(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(a=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const p in u){const m=e.getValue(p,(o=e.latestValues[p])!==null&&o!==void 0?o:null),x=u[p];if(x===void 0||h&&TM(h,p))continue;const S={delay:n,...ou(a||{},p)};let b=!1;if(window.MotionHandoffAnimation){const v=X0(e);if(v){const A=window.MotionHandoffAnimation(v,p,Ye);A!==null&&(S.startTime=A,b=!0)}}Ou(e,p),m.start(Ku(p,m,x,e.shouldReduceMotion&&K0.has(p)?{type:!1}:S,e,b));const T=m.animation;T&&d.push(T)}return c&&Promise.all(d).then(()=>{Ye.update(()=>{c&&JP(e,c)})}),d}function Xu(e,t,n={}){var r;const s=Zi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const a=s?()=>Promise.all(Ug(e,s,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return CM(e,t,h+d,p,m,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[d,h]=u==="beforeChildren"?[a,c]:[c,a];return d().then(()=>h())}else return Promise.all([a(),c(n.delay)])}function CM(e,t,n=0,r=0,s=1,o){const a=[],c=(e.variantChildren.size-1)*r,u=s===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(EM).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(Xu(d,t,{...o,delay:n+u(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function EM(e,t){return e.sortNodePosition(t)}function PM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Xu(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Xu(e,t,n);else{const s=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(Ug(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AM=gu.length;function Gg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Gg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AM;n++){const r=gu[n],s=e.props[r];(Hi(s)||s===!1)&&(t[r]=s)}return t}const MM=[...mu].reverse(),OM=mu.length;function $M(e){return t=>Promise.all(t.map(({animation:n,options:r})=>PM(e,n,r)))}function _M(e){let t=$M(e),n=Yg(),r=!0;const s=u=>(d,h)=>{var p;const m=Zi(e,h,u==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(m){const{transition:x,transitionEnd:S,...b}=m;d={...d,...b,...S}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,h=Gg(e.parent)||{},p=[],m=new Set;let x={},S=1/0;for(let T=0;T<OM;T++){const v=MM[T],A=n[v],C=d[v]!==void 0?d[v]:h[v],I=Hi(C),P=v===u?A.isActive:null;P===!1&&(S=T);let D=C===h[v]&&C!==d[v]&&I;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),A.protectedKeys={...x},!A.isActive&&P===null||!C&&!A.prevProp||va(C)||typeof C=="boolean")continue;const R=IM(A.prevProp,C);let F=R||v===u&&A.isActive&&!D&&I||T>S&&I,W=!1;const Q=Array.isArray(C)?C:[C];let ee=Q.reduce(s(v),{});P===!1&&(ee={});const{prevResolvedValues:ae={}}=A,ge={...ae,...ee},de=Y=>{F=!0,m.has(Y)&&(W=!0,m.delete(Y)),A.needsAnimating[Y]=!0;const z=e.getValue(Y);z&&(z.liveStyle=!1)};for(const Y in ge){const z=ee[Y],K=ae[Y];if(x.hasOwnProperty(Y))continue;let $=!1;Au(z)&&Au(K)?$=!zg(z,K):$=z!==K,$?z!=null?de(Y):m.add(Y):z!==void 0&&m.has(Y)?de(Y):A.protectedKeys[Y]=!0}A.prevProp=C,A.prevResolvedValues=ee,A.isActive&&(x={...x,...ee}),r&&e.blockInitialAnimation&&(F=!1),F&&(!(D&&R)||W)&&p.push(...Q.map(Y=>({animation:Y,options:{type:v}})))}if(m.size){const T={};if(typeof d.initial!="boolean"){const v=Zi(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(T.transition=v.transition)}m.forEach(v=>{const A=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),T[v]=A??null}),p.push({animation:T})}let b=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(p):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(m=>{var x;return(x=m.animationState)===null||x===void 0?void 0:x.setActive(u,d)}),n[u].isActive=d;const p=a(u);for(const m in n)n[m].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Yg(),r=!0}}}function IM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zg(t,e):!1}function ss(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yg(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}let Mr=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},DM=class extends Mr{constructor(t){super(t),t.animationState||(t.animationState=_M(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();va(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}},NM=0;const kM={animation:{Feature:DM},exit:{Feature:class extends Mr{constructor(){super(...arguments),this.id=NM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ro(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function so(e){return{point:{x:e.pageX,y:e.pageY}}}const jM=e=>t=>hu(t)&&e(t,so(t));function io(e,t,n,r){return ro(e,t,jM(n),r)}function Hg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const qg=1e-4,FM=1-qg,VM=1+qg,Kg=.01,BM=0-Kg,WM=0+Kg;function Ot(e){return e.max-e.min}function UM(e,t,n){return Math.abs(e-t)<=n}function Xg(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Ot(n)/Ot(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=FM&&e.scale<=VM||isNaN(e.scale))&&(e.scale=1),(e.translate>=BM&&e.translate<=WM||isNaN(e.translate))&&(e.translate=0)}function oo(e,t,n,r){Xg(e.x,t.x,n.x,r?r.originX:void 0),Xg(e.y,t.y,n.y,r?r.originY:void 0)}function Zg(e,t,n){e.min=n.min+t.min,e.max=e.min+Ot(t)}function zM(e,t,n){Zg(e.x,t.x,n.x),Zg(e.y,t.y,n.y)}function Jg(e,t,n){e.min=t.min-n.min,e.max=e.min+Ot(t)}function ao(e,t,n){Jg(e.x,t.x,n.x),Jg(e.y,t.y,n.y)}const Qg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ys=()=>({x:Qg(),y:Qg()}),ey=()=>({min:0,max:0}),at=()=>({x:ey(),y:ey()});function tn(e){return[e("x"),e("y")]}function Zu(e){return e===void 0||e===1}function Ju({scale:e,scaleX:t,scaleY:n}){return!Zu(e)||!Zu(t)||!Zu(n)}function is(e){return Ju(e)||ty(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ty(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function Pa(e,t,n){const r=e-n,s=t*r;return n+s}function ry(e,t,n,r,s){return s!==void 0&&(e=Pa(e,s,r)),Pa(e,n,r)+t}function Qu(e,t=0,n=1,r,s){e.min=ry(e.min,t,n,r,s),e.max=ry(e.max,t,n,r,s)}function sy(e,{x:t,y:n}){Qu(e.x,t.translate,t.scale,t.originPoint),Qu(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,oy=1.0000000000001;function GM(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let c=0;c<s;c++){o=n[c],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&qs(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,sy(e,a)),r&&is(o.latestValues)&&qs(e,o.latestValues))}t.x<oy&&t.x>iy&&(t.x=1),t.y<oy&&t.y>iy&&(t.y=1)}function Hs(e,t){e.min=e.min+t,e.max=e.max+t}function ay(e,t,n,r,s=.5){const o=Qe(e.min,e.max,s);Qu(e,t,n,o,r)}function qs(e,t){ay(e.x,t.x,t.scaleX,t.scale,t.originX),ay(e.y,t.y,t.scaleY,t.scale,t.originY)}function ly(e,t){return Hg(RM(e.getBoundingClientRect(),t))}function YM(e,t,n){const r=ly(e,n),{scroll:s}=t;return s&&(Hs(r.x,s.offset.x),Hs(r.y,s.offset.y)),r}const cy=({current:e})=>e?e.ownerDocument.defaultView:null,uy=(e,t)=>Math.abs(e-t);function HM(e,t){const n=uy(e.x,t.x),r=uy(e.y,t.y);return Math.sqrt(n**2+r**2)}let fy=class{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=tf(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=HM(p.offset,{x:0,y:0})>=3;if(!m&&!x)return;const{point:S}=p,{timestamp:b}=yt;this.history.push({...S,timestamp:b});const{onStart:T,onMove:v}=this.handlers;m||(T&&T(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=ef(m,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:x,onSessionEnd:S,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=tf(p.type==="pointercancel"?this.lastMoveEventInfo:ef(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,T),S&&S(p,T)},!hu(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const a=so(t),c=ef(a,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,tf(c,this.history)),this.removeListeners=to(io(this.contextWindow,"pointermove",this.handlePointerMove),io(this.contextWindow,"pointerup",this.handlePointerUp),io(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Er(this.updatePoint)}};function ef(e,t){return t?{point:t(e.point)}:e}function dy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tf({point:e},t){return{point:e,delta:dy(e,hy(t)),offset:dy(e,qM(t)),velocity:KM(t,.1)}}function qM(e){return e[0]}function hy(e){return e[e.length-1]}function KM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=hy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Pn(t)));)n--;if(!r)return{x:0,y:0};const o=Yn(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function XM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function py(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZM(e,{top:t,left:n,bottom:r,right:s}){return{x:py(e.x,n,s),y:py(e.y,t,r)}}function my(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function JM(e,t){return{x:my(e.x,t.x),y:my(e.y,t.y)}}function QM(e,t){let n=.5;const r=Ot(e),s=Ot(t);return s>r?n=Fs(t.min,t.max-r,e.min):r>s&&(n=Fs(e.min,e.max-s,t.min)),Hn(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nf=.35;function tO(e=nf){return e===!1?e=0:e===!0&&(e=nf),{x:gy(e,"left","right"),y:gy(e,"top","bottom")}}function gy(e,t,n){return{min:yy(e,t),max:yy(e,n)}}function yy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;let rO=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=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(so(h).point)},o=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:S}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eP(m),!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),tn(T=>{let v=this.getAxisMotionValue(T).get()||0;if(Mn.test(v)){const{projection:A}=this.visualElement;if(A&&A.layout){const C=A.layout.layoutBox[T];C&&(v=Ot(C)*(parseFloat(v)/100))}}this.originPoint[T]=v}),S&&Ye.postRender(()=>S(h,p)),Ou(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,p)=>{const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:S,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=p;if(x&&this.currentDirection===null){this.currentDirection=sO(T),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",p.point,T),this.updateAxis("y",p.point,T),this.visualElement.render(),b&&b(h,p)},c=(h,p)=>this.stop(h,p),u=()=>tn(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new fy(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:cy(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Ye.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Aa(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=XM(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Bs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=ZM(s.layoutBox,n):this.constraints=!1,this.elastic=tO(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=eO(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bs(t))return!1;const r=t.current;Cr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=YM(r,s.root,this.visualElement.getTransformPagePoint());let a=JM(s.layout.layoutBox,o);if(n){const c=n(LM(a));this.hasMutatedConstraints=!!c,c&&(a=Hg(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=tn(h=>{if(!Aa(h,n,this.currentDirection))return;let p=u&&u[h]||{};a&&(p={min:0,max:0});const m=s?200:1e6,x=s?40:1e7,S={type:"inertia",velocity:r?t[h]:0,bounceStiffness:m,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(h,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ou(this.visualElement,t),r.start(Ku(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tn(n=>{const{drag:r}=this.getProps();if(!Aa(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n];o.set(t[n]-Qe(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};tn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();s[a]=QM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),tn(a=>{if(!Aa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];c.set(Qe(u,d,s[a]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=io(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Bs(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ye.read(r);const a=ro(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(tn(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=nf,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:c}}};function Aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}let iO=class extends Mr{constructor(t){super(t),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}unmount(){this.removeGroupControls(),this.removeListeners()}};const xy=e=>(t,n)=>{e&&Ye.postRender(()=>e(t,n))};let oO=class extends Mr{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(t){this.session=new fy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:xy(t),onStart:xy(n),onMove:r,onEnd:(o,a)=>{delete this.session,s&&Ye.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=io(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const Ma={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=vy(e,t.target.x),r=vy(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ar.parse(e);if(s.length>5)return r;const o=Ar.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=u;const d=Qe(c,u,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),o(s)}};let lO=class extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;PP(cO),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ma.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ye.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),du.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function by(e){const[t,n]=a0(),r=O.useContext(Jc);return g.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(_0),isPresent:t,safeToRemove:n})}const cO={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:aO};function uO(e,t,n){const r=St(e)?e:Yi(e);return r.start(Ku("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;let hO=class{constructor(){this.children=[],this.isDirty=!1}add(t){nu(this.children,t),this.isDirty=!0}remove(t){ru(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}};function pO(e,t){const n=An.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Er(r),e(o-t))};return Ye.read(r,!0),()=>Er(r)}const wy=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=wy.length,Sy=e=>typeof e=="string"?parseFloat(e):e,Ty=e=>typeof e=="number"||we.test(e);function gO(e,t,n,r,s,o){s?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,yO(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,xO(r))):o&&(e.opacity=Qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<mO;a++){const c=`border${wy[a]}Radius`;let u=Cy(t,c),d=Cy(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Ty(u)===Ty(d)?(e[c]=Math.max(Qe(Sy(u),Sy(d),r),0),(Mn.test(d)||Mn.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function Cy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=Ey(0,.5,rg),xO=Ey(.5,.95,Nt);function Ey(e,t,n){return r=>r<e?0:r>t?1:n(Fs(e,t,r))}function Py(e,t){e.min=t.min,e.max=t.max}function nn(e,t){Py(e.x,t.x),Py(e.y,t.y)}function Ay(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function My(e,t,n,r,s){return e-=t,e=Pa(e,1/n,r),s!==void 0&&(e=Pa(e,1/s,r)),e}function vO(e,t=0,n=1,r=.5,s,o=e,a=e){if(Mn.test(t)&&(t=parseFloat(t),t=Qe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Qe(o.min,o.max,r);e===o&&(c-=t),e.min=My(e.min,t,n,c,s),e.max=My(e.max,t,n,c,s)}function Oy(e,t,[n,r,s],o,a){vO(e,t[n],t[r],t[s],t.scale,o,a)}const bO=["x","scaleX","originX"],wO=["y","scaleY","originY"];function $y(e,t,n,r){Oy(e.x,t,bO,n?n.x:void 0,r?r.x:void 0),Oy(e.y,t,wO,n?n.y:void 0,r?r.y:void 0)}function _y(e){return e.translate===0&&e.scale===1}function Iy(e){return _y(e.x)&&_y(e.y)}function Dy(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Dy(e.x,t.x)&&Dy(e.y,t.y)}function Ny(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ky(e,t){return Ny(e.x,t.x)&&Ny(e.y,t.y)}function jy(e){return Ot(e.x)/Ot(e.y)}function Ly(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let TO=class{constructor(){this.members=[]}add(t){nu(this.members,t),t.scheduleRender()}remove(t){if(ru(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function CO(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||o||a)&&(r=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:m,skewX:x,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),m&&(r+=`rotateY(${m}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const rf=["","X","Y","Z"],EO={visibility:"hidden"},Ry=1e3;let PO=0;function sf(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=X0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fy(r)}function Vy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},c=t==null?void 0:t()){this.id=PO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(OO),this.nodes.forEach(NO),this.nodes.forEach(kO),this.nodes.forEach($O)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new iu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(a),this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||u)&&(this.isLayoutDirty=!0),e){let p;const m=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=pO(m,250),Ma.hasAnimatedSinceResize&&(Ma.hasAnimatedSinceResize=!1,this.nodes.forEach(Wy))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeLayoutChanged:x,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||VO,{onLayoutAnimationStart:T,onLayoutAnimationComplete:v}=h.getProps(),A=!this.targetLayout||!ky(this.targetLayout,S),C=!m&&x;if(this.options.layoutRoot||this.resumeFrom||C||m&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...ou(b,"layout"),onPlay:T,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else m||Wy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Er(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(jO),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(By);return}this.isUpdating||this.nodes.forEach(IO),this.isUpdating=!1,this.nodes.forEach(DO),this.nodes.forEach(AO),this.nodes.forEach(MO),this.clearAllSnapshots();const c=An.now();yt.delta=Hn(0,1e3/60,c-yt.timestamp),yt.timestamp=c,yt.isProcessing=!0,fu.update.process(yt),fu.preRender.process(yt),fu.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,du.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_O),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ot(this.snapshot.measuredBox.x)&&!Ot(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!Iy(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(c||is(this.latestValues)||h)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),BO(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return at();const u=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(WO))){const{scroll:h}=this.root;h&&(Hs(u.x,h.offset.x),Hs(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=at();if(nn(u,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:m}=h;h!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&nn(u,a),Hs(u.x,p.offset.x),Hs(u.y,p.offset.y))}return u}applyTransform(a,c=!1){const u=at();nn(u,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&qs(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),is(h.latestValues)&&qs(u,h.latestValues)}return is(this.latestValues)&&qs(u,this.latestValues),u}removeTransform(a){const c=at();nn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!is(d.latestValues))continue;Ju(d.latestValues)&&d.updateSnapshot();const h=at(),p=d.measurePageBox();nn(h,p),$y(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return is(this.latestValues)&&$y(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!(!this.layout||!(p||m))){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){const x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),ao(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nn(this.target,this.layout.layoutBox),sy(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),ao(this.relativeTargetOrigin,this.target,x.target),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ju(this.parent.latestValues)||ty(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 a;const c=this.getLead(),u=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;nn(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,x=this.treeScale.y;GM(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=at());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ay(this.prevProjectionDelta.x,this.projectionDelta.x),Ay(this.prevProjectionDelta.y,this.projectionDelta.y)),oo(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==x||!Ly(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ly(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ys(),this.projectionDelta=Ys(),this.projectionDeltaWithTransform=Ys()}setAnimationOrigin(a,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=Ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const m=at(),x=u?u.source:void 0,S=this.layout?this.layout.source:void 0,b=x!==S,T=this.getStack(),v=!T||T.members.length<=1,A=!!(b&&!v&&this.options.crossfade===!0&&!this.path.some(FO));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const P=I/1e3;Uy(p.x,a.x,P),Uy(p.y,a.y,P),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ao(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RO(this.relativeTarget,this.relativeTargetOrigin,m,P),C&&SO(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=at()),nn(C,this.relativeTarget)),b&&(this.animationValues=h,gO(h,d,this.latestValues,P,A,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Er(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{Ma.hasAnimatedSinceResize=!0,this.currentAnimation=uO(0,Ry,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ry),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=a;if(!(!c||!u||!d)){if(this!==a&&this.layout&&d&&qy(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||at();const p=Ot(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const m=Ot(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+m}nn(c,u),qs(c,h),oo(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new TO),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&sf("z",a,d,this.animationValues);for(let h=0;h<rf.length;h++)sf(`rotate${rf[h]}`,a,d,this.animationValues),sf(`skew${rf[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var c,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return EO;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Sa(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Sa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(b.transform=h?h({},""):"none",this.hasProjected=!1),b}const m=p.animationValues||p.latestValues;this.applyTransformsToTarget(),d.transform=CO(this.projectionDeltaWithTransform,this.treeScale,m),h&&(d.transform=h(m,d.transform));const{x,y:S}=this.projectionDelta;d.transformOrigin=`${x.origin*100}% ${S.origin*100}% 0`,p.animationValues?d.opacity=p===this?(u=(c=m.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=p===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in qi){if(m[b]===void 0)continue;const{correct:T,applyTo:v,isCSSVariable:A}=qi[b],C=d.transform==="none"?m[b]:T(m[b],p);if(v){const I=v.length;for(let P=0;P<I;P++)d[v[P]]=C}else A?this.options.visualElement.renderState.vars[b]=C:d[b]=C}return this.options.layoutId&&(d.pointerEvents=p===this?Sa(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(By),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function MO(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?tn(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],x=Ot(m);m.min=r[p].min,m.max=m.min+x}):qy(o,n.layoutBox,r)&&tn(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],x=Ot(r[p]);m.max=m.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const c=Ys();oo(c,r,n.layoutBox);const u=Ys();a?oo(u,e.applyTransform(s,!0),n.measuredBox):oo(u,r,n.layoutBox);const d=!Iy(c);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:x}=p;if(m&&x){const S=at();ao(S,n.layoutBox,m.layoutBox);const b=at();ao(b,r,x.layoutBox),ky(S,b)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OO(e){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 $O(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _O(e){e.clearSnapshot()}function By(e){e.clearMeasurements()}function IO(e){e.isLayoutDirty=!1}function DO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function kO(e){e.calcProjection()}function jO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Uy(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zy(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function RO(e,t,n,r){zy(e.x,t.x,n.x,r),zy(e.y,t.y,n.y,r)}function FO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},Gy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yy=Gy("applewebkit/")&&!Gy("chrome/")?Math.round:Nt;function Hy(e){e.min=Yy(e.min),e.max=Yy(e.max)}function BO(e){Hy(e.x),Hy(e.y)}function qy(e,t,n){return e==="position"||e==="preserve-aspect"&&!UM(jy(t),jy(n),.2)}function WO(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const UO=Vy({attachResizeListener:(e,t)=>ro(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),of={current:void 0},Ky=Vy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!of.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),of.current=e}return of.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zO={pan:{Feature:oO},drag:{Feature:iO,ProjectionNode:Ky,MeasureLayout:by}};function Xy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ye.postRender(()=>o(t,so(t)))}let GO=class extends Mr{mount(){const{current:t}=this.node;t&&(this.unmount=nP(t,(n,r)=>(Xy(this.node,r,"Start"),s=>Xy(this.node,s,"End"))))}unmount(){}},YO=class extends Mr{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=to(ro(this.node.current,"focus",()=>this.onFocus()),ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Zy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ye.postRender(()=>o(t,so(t)))}let HO=class extends Mr{mount(){const{current:t}=this.node;t&&(this.unmount=oP(t,(n,r)=>(Zy(this.node,r,"Start"),(s,{success:o})=>Zy(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const af=new WeakMap,lf=new WeakMap,qO=e=>{const t=af.get(e.target);t&&t(e)},KO=e=>{e.forEach(qO)};function XO({root:e,...t}){const n=e||document;lf.has(n)||lf.set(n,{});const r=lf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(KO,{root:e,...t})),r[s]}function ZO(e,t,n){const r=XO(t);return af.set(e,n),r.observe(e),()=>{af.delete(e),r.unobserve(e)}}const JO={some:0,all:1};let QO=class extends Mr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:JO[s]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(u)};return ZO(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e4(t,n))&&this.startObserver()}unmount(){}};function e4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const t4={inView:{Feature:QO},tap:{Feature:HO},focus:{Feature:YO},hover:{Feature:GO}},n4={layout:{ProjectionNode:Ky,MeasureLayout:by}},cf={current:null},Jy={current:!1};function r4(){if(Jy.current=!0,!!eu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cf.current=e.matches;e.addListener(t),t()}else cf.current=!1}const s4=[...Cg,Tt,Ar],i4=e=>s4.find(Tg(e)),o4=new WeakMap;function a4(e,t,n){for(const r in t){const s=t[r],o=n[r];if(St(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&ha(s.version==="12.6.2",`Attempting to mix Motion versions ${s.version} with 12.6.2 may not work as expected.`);else if(St(o))e.addValue(r,Yi(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Yi(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let l4=class{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=An.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ye.render(this.render,!1,!0))};const{latestValues:u,renderState:d,onUpdate:h}=a;this.onUpdate=h,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=ba(n),this.isVariantNode=M0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in m){const S=m[x];u[x]!==void 0&&St(S)&&S.set(u[x],!1)}}mount(t){this.current=t,o4.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((n,r)=>this.bindToMotionValue(r,n)),Jy.current||r4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cf.current,process.env.NODE_ENV!=="production"&&ha(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Er(this.notifyUpdate),Er(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=es.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),a&&a(),n.owner&&n.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 Vs){const n=Vs[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qy.length;r++){const s=Qy[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=a4(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(wg(s)||ig(s))?s=parseFloat(s):!i4(s)&&Ar.test(n)&&(s=hg(t,n)),this.setBaseTarget(t,St(s)?s.get():s)),St(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const a=Pu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(s=a[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!St(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new iu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}},ex=class extends l4{constructor(){super(...arguments),this.KeyframeResolver=Pg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;St(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}};function c4(e){return window.getComputedStyle(e)}let u4=class extends ex{constructor(){super(...arguments),this.type="html",this.renderInstance=z0}readValueFromInstance(t,n){if(es.has(n))return TA(t,n);{const r=c4(t),s=(xu(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ly(t,n)}build(t,n,r){wu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mu(t,n,r)}},f4=class extends ex{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&U0(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(es.has(n)){const r=dg(n);return r&&r.default||0}return n=G0.has(n)?n:yu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return H0(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ye.postRender(this.updateDimensions)}build(t,n,r){Cu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){Y0(t,n,r,s)}mount(t){this.isSVGTag=Eu(t.tagName),super.mount(t)}};const d4=(e,t)=>Tu(e)?new f4(t):new u4(t,{allowProjection:e!==O.Fragment}),h4=XP({...kM,...t4,...zO,...n4},d4),uf=hP(h4),p4=500,ff=({id:e,content:t,type:n="notification",duration:r=0,onClose:s})=>{const[o,a]=O.useState(!0);let c,u=Ui,d;switch(n){case"success":d="text-green-500",c="bg-green-100",u=t0;break;case"error":d="text-red-500",c="bg-red-100",u=s0;break;case"warning":d="text-yellow-500",c="bg-yellow-100",u=Ui;break;case"loading":d="text-gray-500",c="bg-gray-100",u=Ui;break;case"notification":d="text-blue-500",c="bg-blue-100",u=n0;break;default:d="text-blue-500",c="bg-blue-100",u=Ui}O.useEffect(()=>{if(r===0)return;const p=setTimeout(()=>{a(!1)},r);return()=>clearTimeout(p)},[r]),O.useEffect(()=>{if(!o){const p=setTimeout(s,p4);return()=>clearTimeout(p)}},[o,s]);const h={initial:{opacity:0,y:50,scale:.9},animate:{opacity:1,y:0,scale:1,transition:{duration:.3,type:"spring",stiffness:300,damping:20}},exit:{opacity:0,y:20,scale:.95,transition:{duration:.2,ease:"easeOut"}}};return g.jsx(zE,{onExitComplete:s,children:o&&g.jsxs(uf.div,{id:e,className:"toast w-[320px] rounded-xl border-[1.5px] p-[18px] shadow-md bg-white font-jakarta-sans",initial:"initial",animate:"animate",exit:"exit",variants:h,layout:!0,children:[g.jsx(Pe,{icon:RE,onClick:()=>a(!1),className:"float-right text-lg text-[#9CA1B6] cursor-pointer"}),g.jsxs("div",{className:"space-y-16",children:[g.jsxs("div",{className:"flex gap-12",children:[g.jsx(Pe,{icon:u,className:`text-[20px] p-6 rounded-full self-start ${d} ${c}`}),g.jsx("h5",{className:"text-lg font-bold text-blue-900 self-center",children:t.title})]}),t.description&&g.jsx("span",{className:"text-sm text-gray-500 leading-[16px]",children:t.description})]})]})})},tx=({promise:e,messages:t,options:n,onClose:r})=>{const[s,o]=O.useState("loading"),[a,c]=O.useState(t.loading);return O.useEffect(()=>{e.then(()=>{console.log("promise resolved"),o("success"),c(t.success)}).catch(()=>{console.log("promise rejected"),o("error"),c(t.error)}).finally(()=>{console.log("promise finally"),setTimeout(()=>{r()},(n==null?void 0:n.duration)||3e3)})},[e]),g.jsx(ff,{content:a,type:s,duration:n.duration,onClose:r})};/*!
|
|
621
|
+
`),()=>{document.head.removeChild(x)}},[t]),g.jsx(VE,{isPresent:t,childRef:s,sizeRef:o,children:he.cloneElement(e,{ref:s})})}const WE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:a,anchorX:c})=>{const u=Qc(UE),d=O.useId(),h=O.useCallback(m=>{u.set(m,!0);for(const x of u.values())if(!x)return;r&&r()},[u,r]),p=O.useMemo(()=>({id:d,initial:t,isPresent:n,custom:s,onExitComplete:h,register:m=>(u.set(m,!1),()=>u.delete(m))}),o?[Math.random(),h]:[n,h]);return O.useMemo(()=>{u.forEach((m,x)=>u.set(x,!1))},[n]),he.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(BE,{isPresent:n,anchorX:c,children:e})),g.jsx(fa.Provider,{value:p,children:e})};function UE(){return new Map}function a0(e=!0){const t=O.useContext(fa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=O.useId();O.useEffect(()=>{if(e)return s(o)},[e]);const a=O.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const da=e=>e.key||"";function l0(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const zE=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:a=!1,anchorX:c="left"})=>{const[u,d]=a0(a),h=O.useMemo(()=>l0(e),[e]),p=a&&!u?[]:h.map(da),m=O.useRef(!0),x=O.useRef(h),S=Qc(()=>new Map),[b,T]=O.useState(h),[v,A]=O.useState(h);o0(()=>{m.current=!1,x.current=h;for(let P=0;P<v.length;P++){const D=da(v[P]);p.includes(D)?S.delete(D):S.get(D)!==!0&&S.set(D,!1)}},[v,p.length,p.join("-")]);const C=[];if(h!==b){let P=[...h];for(let D=0;D<v.length;D++){const R=v[D],F=da(R);p.includes(F)||(P.splice(D,0,R),C.push(R))}return o==="wait"&&C.length&&(P=C),A(l0(P)),T(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:I}=O.useContext(Jc);return g.jsx(g.Fragment,{children:v.map(P=>{const D=da(P),R=a&&!u?!1:h===v||p.includes(D),F=()=>{if(S.has(D))S.set(D,!0);else return;let W=!0;S.forEach(Q=>{Q||(W=!1)}),W&&(I==null||I(),A(x.current),a&&(d==null||d()),r&&r())};return g.jsx(WE,{isPresent:R,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,onExitComplete:R?void 0:F,anchorX:c,children:P},D)})})};function nu(e,t){e.indexOf(t)===-1&&e.push(t)}function ru(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Nt=e=>e;let Rs=Nt,Cr=Nt;process.env.NODE_ENV!=="production"&&(Rs=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Cr=(e,t)=>{if(!e)throw new Error(t)});const GE={useManualTiming:!1};function su(e){let t;return()=>(t===void 0&&(t=e()),t)}const Fs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};let iu=class{constructor(){this.subscriptions=[]}add(t){return nu(this.subscriptions,t),()=>ru(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const Pn=e=>e*1e3,Yn=e=>e/1e3;function c0(e,t){return t?e*(1e3/t):0}const u0=new Set;function ha(e,t,n){e||u0.has(t)||(console.warn(t),u0.add(t))}const YE=su(()=>window.ScrollTimeline!==void 0);let HE=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,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(YE()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].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 n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}},qE=class extends HE{then(t,n){return Promise.all(this.animations).then(t).catch(n)}};function ou(e,t){return e?e[t]||e.default||e:void 0}const au=2e4;function f0(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<au;)t+=n,r=e.next(t);return t>=au?1/0:t}function lu(e){return typeof e=="function"}function d0(e,t){e.timeline=t,e.onfinish=null}const cu=e=>Array.isArray(e)&&typeof e[0]=="number",KE={linearEasing:void 0};function XE(e,t){const n=su(e);return()=>{var r;return(r=KE[t])!==null&&r!==void 0?r:n()}}const pa=XE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),h0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(Fs(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function p0(e){return!!(typeof e=="function"&&pa()||!e||typeof e=="string"&&(e in uu||pa())||cu(e)||Array.isArray(e)&&e.every(p0))}const zi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zi([0,.65,.55,1]),circOut:zi([.55,0,1,.45]),backIn:zi([.31,.01,.66,-.59]),backOut:zi([.33,1.53,.69,.99])};function m0(e,t){if(e)return typeof e=="function"&&pa()?h0(e,t):cu(e)?zi(e):Array.isArray(e)?e.map(n=>m0(n,t)||uu.easeOut):uu[e]}const ma=["read","resolveKeyframes","update","preRender","render","postRender"],g0={value:null};function ZE(e,t){let n=new Set,r=new Set,s=!1,o=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},u=0;function d(p){a.has(p)&&(h.schedule(p),e()),u++,p(c)}const h={schedule:(p,m=!1,x=!1)=>{const b=x&&s?n:r;return m&&a.add(p),b.has(p)||b.add(p),p},cancel:p=>{r.delete(p),a.delete(p)},process:p=>{if(c=p,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(d),t&&g0.value&&g0.value.frameloop[t].push(u),u=0,n.clear(),s=!1,o&&(o=!1,h.process(p))}};return h}const JE=40;function y0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=ma.reduce((v,A)=>(v[A]=ZE(o,t?A:void 0),v),{}),{read:c,resolveKeyframes:u,update:d,preRender:h,render:p,postRender:m}=a,x=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,JE),1),s.timestamp=v,s.isProcessing=!0,c.process(s),u.process(s),d.process(s),h.process(s),p.process(s),m.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(x))},S=()=>{n=!0,r=!0,s.isProcessing||e(x)};return{schedule:ma.reduce((v,A)=>{const C=a[A];return v[A]=(I,P=!1,D=!1)=>(n||S(),C.schedule(I,P,D)),v},{}),cancel:v=>{for(let A=0;A<ma.length;A++)a[ma[A]].cancel(v)},state:s,steps:a}}const{schedule:Ye,cancel:Er,state:yt,steps:fu}=y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nt,!0),{schedule:du}=y0(queueMicrotask,!1);let ga;function QE(){ga=void 0}const An={now:()=>(ga===void 0&&An.set(yt.isProcessing||GE.useManualTiming?yt.timestamp:performance.now()),ga),set:e=>{ga=e,queueMicrotask(QE)}},mn={x:!1,y:!1};function x0(){return mn.x||mn.y}function eP(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}function tP(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function v0(e,t){const n=tP(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function b0(e){return!(e.pointerType==="touch"||x0())}function nP(e,t,n={}){const[r,s,o]=v0(e,n),a=c=>{if(!b0(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=p=>{b0(p)&&(d(p),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,s)};return r.forEach(c=>{c.addEventListener("pointerenter",a,s)}),o}const w0=(e,t)=>t?e===t?!0:w0(e,t.parentElement):!1,hu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,rP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sP(e){return rP.has(e.tagName)||e.tabIndex!==-1}const Gi=new WeakSet;function S0(e){return t=>{t.key==="Enter"&&e(t)}}function pu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const iP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=S0(()=>{if(Gi.has(n))return;pu(n,"down");const s=S0(()=>{pu(n,"up")}),o=()=>pu(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function T0(e){return hu(e)&&!x0()}function oP(e,t,n={}){const[r,s,o]=v0(e,n),a=c=>{const u=c.currentTarget;if(!T0(c)||Gi.has(u))return;Gi.add(u);const d=t(u,c),h=(x,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",m),!(!T0(x)||!Gi.has(u))&&(Gi.delete(u),typeof d=="function"&&d(x,{success:S}))},p=x=>{h(x,u===window||u===document||n.useGlobalTarget||w0(u,x.target))},m=x=>{h(x,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",m,s)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),c instanceof HTMLElement&&(c.addEventListener("focus",d=>iP(d,s)),!sP(c)&&c.tabIndex===null&&(c.tabIndex=0))}),o}const C0=30,aP=e=>!isNaN(parseFloat(e));let lP=class{constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=An.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=An.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=aP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ha(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new iu);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=An.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>C0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,C0);return c0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Yi(e,t){return new lP(e,t)}const E0=O.createContext({strict:!1}),P0={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"]},Vs={};for(const e in P0)Vs[e]={isEnabled:t=>P0[e].some(n=>!!t[n])};function cP(e){for(const t in e)Vs[t]={...Vs[t],...e[t]}}const uP=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 ya(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uP.has(e)}let A0=e=>!ya(e);function fP(e){e&&(A0=t=>t.startsWith("on")?!ya(t):e(t))}try{fP(require("@emotion/is-prop-valid").default)}catch{}function dP(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(A0(s)||n===!0&&ya(s)||!t&&!ya(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function hP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ha(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const xa=O.createContext({});function va(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Hi(e){return typeof e=="string"||Array.isArray(e)}const mu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gu=["initial",...mu];function ba(e){return va(e.animate)||gu.some(t=>Hi(e[t]))}function M0(e){return!!(ba(e)||e.variants)}function pP(e,t){if(ba(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hi(n)?n:void 0,animate:Hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function mP(e){const{initial:t,animate:n}=pP(e,O.useContext(xa));return O.useMemo(()=>({initial:t,animate:n}),[O0(t),O0(n)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const gP=Symbol.for("motionComponentSymbol");function Bs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yP(e,t,n){return O.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Bs(n)&&(n.current=r))},[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$0="data-"+yu("framerAppearId"),_0=O.createContext({});function xP(e,t,n,r,s){var o,a;const{visualElement:c}=O.useContext(xa),u=O.useContext(E0),d=O.useContext(fa),h=O.useContext(tu).reducedMotion,p=O.useRef(null);r=r||u.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:c,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const m=p.current,x=O.useContext(_0);m&&!m.projection&&s&&(m.type==="html"||m.type==="svg")&&vP(p.current,n,s,x);const S=O.useRef(!1);O.useInsertionEffect(()=>{m&&S.current&&m.update(n,d)});const b=n[$0],T=O.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return o0(()=>{m&&(S.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),du.render(m.render),T.current&&m.animationState&&m.animationState.animateChanges())}),O.useEffect(()=>{m&&(!T.current&&m.animationState&&m.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,b)}),T.current=!1))}),m}function vP(e,t,n,r){const{layoutId:s,layout:o,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:I0(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!a||c&&Bs(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:d})}function I0(e){if(e)return e.options.allowProjection!==!1?e.projection:I0(e.parent)}function bP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,a;e&&cP(e);function c(d,h){let p;const m={...O.useContext(tu),...d,layoutId:wP(d)},{isStatic:x}=m,S=mP(d),b=r(d,x);if(!x&&eu){SP(m,e);const T=TP(m);p=T.MeasureLayout,S.visualElement=xP(s,b,m,t,T.ProjectionNode)}return g.jsxs(xa.Provider,{value:S,children:[p&&S.visualElement?g.jsx(p,{visualElement:S.visualElement,...m}):null,n(s,d,yP(b,S.visualElement,h),b,x,S.visualElement)]})}c.displayName=`motion.${typeof s=="string"?s:`create(${(a=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&a!==void 0?a:""})`}`;const u=O.forwardRef(c);return u[gP]=s,u}function wP({layoutId:e}){const t=O.useContext(Jc).id;return t&&e!==void 0?t+"-"+e:e}function SP(e,t){const n=O.useContext(E0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Rs(!1,r):Cr(!1,r)}}function TP(e){const{drag:t,layout:n}=Vs;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const D0=e=>t=>typeof t=="string"&&t.startsWith(e),xu=D0("--"),CP=D0("var(--"),vu=e=>CP(e)?EP.test(e.split("/*")[0].trim()):!1,EP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qi={};function PP(e){for(const t in e)qi[t]=e[t],xu(t)&&(qi[t].isCSSVariable=!0)}const Ws=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],es=new Set(Ws);function N0(e,{layout:t,layoutId:n}){return es.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qi[e]||e==="opacity")}const St=e=>!!(e&&e.getVelocity),k0=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Hn=(e,t,n)=>n>t?t:n<e?e:n,Us={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ki={...Us,transform:e=>Hn(0,1,e)},wa={...Us,default:1},Xi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=Xi("deg"),Mn=Xi("%"),we=Xi("px"),AP=Xi("vh"),MP=Xi("vw"),j0={...Mn,parse:e=>Mn.parse(e)/100,transform:e=>Mn.transform(e*100)},OP={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,backgroundPositionX:we,backgroundPositionY:we},$P={rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:wa,scaleX:wa,scaleY:wa,scaleZ:wa,skew:Pr,skewX:Pr,skewY:Pr,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Ki,originX:j0,originY:j0,originZ:we},L0={...Us,transform:Math.round},bu={...OP,...$P,zIndex:L0,size:we,fillOpacity:Ki,strokeOpacity:Ki,numOctaves:L0},_P={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},IP=Ws.length;function DP(e,t,n){let r="",s=!0;for(let o=0;o<IP;o++){const a=Ws[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=k0(c,bu[a]);if(!u){s=!1;const h=_P[a]||a;r+=`${h}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function wu(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let a=!1,c=!1;for(const u in t){const d=t[u];if(es.has(u)){a=!0;continue}else if(xu(u)){s[u]=d;continue}else{const h=k0(d,bu[u]);u.startsWith("origin")?(c=!0,o[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=DP(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;r.transformOrigin=`${u} ${d} ${h}`}}const Su=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function R0(e,t,n){for(const r in t)!St(t[r])&&!N0(r,n)&&(e[r]=t[r])}function NP({transformTemplate:e},t){return O.useMemo(()=>{const n=Su();return wu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function kP(e,t){const n=e.style||{},r={};return R0(r,n,e),Object.assign(r,NP(e,t)),r}function jP(e,t){const n={},r=kP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const LP=["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 Tu(e){return typeof e!="string"||e.includes("-")?!1:!!(LP.indexOf(e)>-1||/[A-Z]/u.test(e))}const RP={offset:"stroke-dashoffset",array:"stroke-dasharray"},FP={offset:"strokeDashoffset",array:"strokeDasharray"};function VP(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?RP:FP;e[o.offset]=we.transform(-r);const a=we.transform(t),c=we.transform(n);e[o.array]=`${a} ${c}`}function F0(e,t,n){return typeof e=="string"?e:we.transform(t+n*e)}function BP(e,t,n){const r=F0(t,e.x,e.width),s=F0(n,e.y,e.height);return`${r} ${s}`}function Cu(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:a,pathSpacing:c=1,pathOffset:u=0,...d},h,p){if(wu(e,d,p),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:m,style:x,dimensions:S}=e;m.transform&&(S&&(x.transform=m.transform),delete m.transform),S&&(s!==void 0||o!==void 0||x.transform)&&(x.transformOrigin=BP(S,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(m.x=t),n!==void 0&&(m.y=n),r!==void 0&&(m.scale=r),a!==void 0&&VP(m,a,c,u,!1)}const V0=()=>({...Su(),attrs:{}}),Eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function WP(e,t,n,r){const s=O.useMemo(()=>{const o=V0();return Cu(o,t,Eu(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};R0(o,e.style,e),s.style={...o,...s.style}}return s}function UP(e=!1){return(n,r,s,{latestValues:o},a)=>{const u=(Tu(n)?WP:jP)(r,o,a,n),d=dP(r,typeof n=="string",e),h=n!==O.Fragment?{...d,...u,ref:s}:{},{children:p}=r,m=O.useMemo(()=>St(p)?p.get():p,[p]);return O.createElement(n,{...h,children:m})}}function B0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Pu(e,t,n,r){if(typeof t=="function"){const[s,o]=B0(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=B0(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const Au=e=>Array.isArray(e),zP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),GP=e=>Au(e)?e[e.length-1]||0:e;function Sa(e){const t=St(e)?e.get():e;return zP(t)?t.toValue():t}function YP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const a={latestValues:HP(r,s,o,e),renderState:t()};return n&&(a.onMount=c=>n({props:r,current:c,...a}),a.onUpdate=c=>n(c)),a}const W0=e=>(t,n)=>{const r=O.useContext(xa),s=O.useContext(fa),o=()=>YP(e,t,r,s);return n?o():Qc(o)};function HP(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=Sa(o[m]);let{initial:a,animate:c}=e;const u=ba(e),d=M0(e);t&&d&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?c:a;if(p&&typeof p!="boolean"&&!va(p)){const m=Array.isArray(p)?p:[p];for(let x=0;x<m.length;x++){const S=Pu(e,m[x]);if(S){const{transitionEnd:b,transition:T,...v}=S;for(const A in v){let C=v[A];if(Array.isArray(C)){const I=h?C.length-1:0;C=C[I]}C!==null&&(s[A]=C)}for(const A in b)s[A]=b[A]}}}return s}function Mu(e,t,n){var r;const{style:s}=e,o={};for(const a in s)(St(s[a])||t.style&&St(t.style[a])||N0(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=s[a]);return o}const qP={useVisualState:W0({scrapeMotionValuesFromProps:Mu,createRenderState:Su})};function U0(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function z0(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const G0=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 Y0(e,t,n,r){z0(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(G0.has(s)?s:yu(s),t.attrs[s])}function H0(e,t,n){const r=Mu(e,t,n);for(const s in e)if(St(e[s])||St(t[s])){const o=Ws.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const q0=["x","y","width","height","cx","cy","r"],KP={useVisualState:W0({scrapeMotionValuesFromProps:H0,createRenderState:V0,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const c in s)if(es.has(c)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let c=0;c<q0.length;c++){const u=q0[c];e[u]!==t[u]&&(a=!0)}a&&Ye.read(()=>{U0(n,r),Ye.render(()=>{Cu(r,s,Eu(n.tagName),e.transformTemplate),Y0(n,r)})})}})};function XP(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const a={...Tu(r)?KP:qP,preloadedFeatures:e,useRender:UP(s),createVisualElement:t,Component:r};return bP(a)}}function Zi(e,t,n){const r=e.getProps();return Pu(r,t,n!==void 0?n:r.custom,e)}const K0=new Set(["width","height","top","left","right","bottom",...Ws]);function ZP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yi(n))}function JP(e,t){const n=Zi(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const a in o){const c=GP(o[a]);ZP(e,a,c)}}function QP(e){return!!(St(e)&&e.add)}function Ou(e,t){const n=e.getValue("willChange");if(QP(n))return n.add(t)}function X0(e){return e.props[$0]}const Z0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,eA=1e-7,tA=12;function nA(e,t,n,r,s){let o,a,c=0;do a=t+(n-t)/2,o=Z0(a,r,s)-e,o>0?n=a:t=a;while(Math.abs(o)>eA&&++c<tA);return a}function Ji(e,t,n,r){if(e===t&&n===r)return Nt;const s=o=>nA(o,0,1,e,n);return o=>o===0||o===1?o:Z0(s(o),t,r)}const J0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Q0=e=>t=>1-e(1-t),eg=Ji(.33,1.53,.69,.99),$u=Q0(eg),tg=J0($u),ng=e=>(e*=2)<1?.5*$u(e):.5*(2-Math.pow(2,-10*(e-1))),_u=e=>1-Math.sin(Math.acos(e)),rg=Q0(_u),sg=J0(_u),ig=e=>/^0[^.\s]+$/u.test(e);function rA(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ig(e):!0}const Qi=e=>Math.round(e*1e5)/1e5,Iu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(e){return e==null}const iA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Du=(e,t)=>n=>!!(typeof n=="string"&&iA.test(n)&&n.startsWith(e)||t&&!sA(n)&&Object.prototype.hasOwnProperty.call(n,t)),og=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,a,c]=r.match(Iu);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},oA=e=>Hn(0,255,e),Nu={...Us,transform:e=>Math.round(oA(e))},ts={test:Du("rgb","red"),parse:og("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nu.transform(e)+", "+Nu.transform(t)+", "+Nu.transform(n)+", "+Qi(Ki.transform(r))+")"};function aA(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ku={test:Du("#"),parse:aA,transform:ts.transform},zs={test:Du("hsl","hue"),parse:og("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mn.transform(Qi(t))+", "+Mn.transform(Qi(n))+", "+Qi(Ki.transform(r))+")"},Tt={test:e=>ts.test(e)||ku.test(e)||zs.test(e),parse:e=>ts.test(e)?ts.parse(e):zs.test(e)?zs.parse(e):ku.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ts.transform(e):zs.transform(e)},lA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cA(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Iu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(lA))===null||n===void 0?void 0:n.length)||0)>0}const ag="number",lg="color",uA="var",fA="var(",cg="${}",dA=/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 eo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const c=t.replace(dA,u=>(Tt.test(u)?(r.color.push(o),s.push(lg),n.push(Tt.parse(u))):u.startsWith(fA)?(r.var.push(o),s.push(uA),n.push(u)):(r.number.push(o),s.push(ag),n.push(parseFloat(u))),++o,cg)).split(cg);return{values:n,split:c,indexes:r,types:s}}function ug(e){return eo(e).values}function fg(e){const{split:t,types:n}=eo(e),r=t.length;return s=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],s[a]!==void 0){const c=n[a];c===ag?o+=Qi(s[a]):c===lg?o+=Tt.transform(s[a]):o+=s[a]}return o}}const hA=e=>typeof e=="number"?0:e;function pA(e){const t=ug(e);return fg(e)(t.map(hA))}const Ar={test:cA,parse:ug,createTransformer:fg,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Iu)||[];if(!r)return e;const s=n.replace(r,"");let o=mA.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,ju={...Ar,getAnimatableNone:e=>{const t=e.match(yA);return t?t.map(gA).join(" "):e}},xA={...bu,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:ju,WebkitFilter:ju},dg=e=>xA[e];function hg(e,t){let n=dg(e);return n!==ju&&(n=Ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vA=new Set(["auto","none","0"]);function bA(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!vA.has(o)&&eo(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=hg(n,s)}const ns=e=>e*180/Math.PI,Lu=e=>{const t=ns(Math.atan2(e[1],e[0]));return Ru(t)},wA={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lu,rotateZ:Lu,skewX:e=>ns(Math.atan(e[1])),skewY:e=>ns(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ru=e=>(e=e%360,e<0&&(e+=360),e),pg=Lu,mg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SA={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mg,scaleY:gg,scale:e=>(mg(e)+gg(e))/2,rotateX:e=>Ru(ns(Math.atan2(e[6],e[5]))),rotateY:e=>Ru(ns(Math.atan2(-e[2],e[0]))),rotateZ:pg,rotate:pg,skewX:e=>ns(Math.atan(e[4])),skewY:e=>ns(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yg(e){return e.includes("scale")?1:0}function Fu(e,t){if(!e||e==="none")return yg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=SA,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wA,s=c}if(!s)return yg(t);const o=r[t],a=s[1].split(",").map(CA);return typeof o=="function"?o(a):a[o]}const TA=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Fu(n,t)};function CA(e){return parseFloat(e.trim())}const xg=e=>e===Us||e===we,EA=new Set(["x","y","z"]),PA=Ws.filter(e=>!EA.has(e));function AA(e){const t=[];return PA.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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:(e,{transform:t})=>Fu(t,"x"),y:(e,{transform:t})=>Fu(t,"y")};Gs.translateX=Gs.x,Gs.translateY=Gs.y;const rs=new Set;let Vu=!1,Bu=!1;function vg(){if(Bu){const e=Array.from(rs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=AA(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,a])=>{var c;(c=r.getValue(o))===null||c===void 0||c.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Bu=!1,Vu=!1,rs.forEach(e=>e.complete()),rs.clear()}function bg(){rs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bu=!0)})}function MA(){bg(),vg()}let Wu=class{constructor(t,n,r,s,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rs.add(this),Vu||(Vu=!0,Ye.read(bg),Ye.resolveKeyframes(vg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=s==null?void 0:s.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),s&&a===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};const wg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $A(e){const t=OA.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const _A=4;function Sg(e,t,n=1){Cr(n<=_A,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=$A(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return wg(a)?parseFloat(a):a}return vu(s)?Sg(s,t,n+1):s}const Tg=e=>t=>t.test(e),Cg=[Us,we,Mn,Pr,MP,AP,{test:e=>e==="auto",parse:e=>e}],Eg=e=>Cg.find(Tg(e));let Pg=class extends Wu{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),vu(d))){const h=Sg(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!K0.has(r)||t.length!==2)return;const[s,o]=t,a=Eg(s),c=Eg(o);if(a!==c)if(xg(a)&&xg(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)rA(t[s])&&r.push(s);r.length&&bA(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=s.length-1,c=s[a];s[a]=Gs[r](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([u,d])=>{n.getValue(u).set(d)}),this.resolveNoneKeyframes()}};const Ag=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ar.test(e)||e==="0")&&!e.startsWith("url("));function IA(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DA(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Ag(s,t),c=Ag(o,t);return Rs(a===c,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!a||!c?!1:IA(e)||(n==="spring"||lu(n))&&r}const NA=e=>e!==null;function Ta(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(NA),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const kA=40;let Mg=class{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=An.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>kA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&MA(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=An.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:a,onComplete:c,onUpdate:u,isGenerator:d}=this.options;if(!d&&!DA(t,r,s,o))if(a)this.options.duration=0;else{u&&u(Ta(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};const Qe=(e,t,n)=>e+(t-e)*n;function Uu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,a=0;if(!t)s=o=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;s=Uu(u,c,e+1/3),o=Uu(u,c,e),a=Uu(u,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Ca(e,t){return n=>n>0?t:e}const zu=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},LA=[ku,ts,zs],RA=e=>LA.find(t=>t.test(e));function Og(e){const t=RA(e);if(Rs(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===zs&&(n=jA(n)),n}const $g=(e,t)=>{const n=Og(e),r=Og(t);if(!n||!r)return Ca(e,t);const s={...n};return o=>(s.red=zu(n.red,r.red,o),s.green=zu(n.green,r.green,o),s.blue=zu(n.blue,r.blue,o),s.alpha=Qe(n.alpha,r.alpha,o),ts.transform(s))},FA=(e,t)=>n=>t(e(n)),to=(...e)=>e.reduce(FA),Gu=new Set(["none","hidden"]);function VA(e,t){return Gu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function BA(e,t){return n=>Qe(e,t,n)}function Yu(e){return typeof e=="number"?BA:typeof e=="string"?vu(e)?Ca:Tt.test(e)?$g:zA:Array.isArray(e)?_g:typeof e=="object"?Tt.test(e)?$g:WA:Ca}function _g(e,t){const n=[...e],r=n.length,s=e.map((o,a)=>Yu(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=s[a](o);return n}}function WA(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Yu(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function UA(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],c=e.indexes[a][s[a]],u=(n=e.values[c])!==null&&n!==void 0?n:0;r[o]=u,s[a]++}return r}const zA=(e,t)=>{const n=Ar.createTransformer(t),r=eo(e),s=eo(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Gu.has(e)&&!s.values.length||Gu.has(t)&&!r.values.length?VA(e,t):to(_g(UA(r,s),s.values),n):(Rs(!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.`),Ca(e,t))};function Ig(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qe(e,t,n):Yu(e)(e,t)}const GA=5;function Dg(e,t,n){const r=Math.max(t-GA,0);return c0(n-e(r),t-r)}const et={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},Ng=.001;function YA({duration:e=et.duration,bounce:t=et.bounce,velocity:n=et.velocity,mass:r=et.mass}){let s,o;Rs(e<=Pn(et.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Hn(et.minDamping,et.maxDamping,a),e=Hn(et.minDuration,et.maxDuration,Yn(e)),a<1?(s=d=>{const h=d*a,p=h*e,m=h-n,x=Hu(d,a),S=Math.exp(-p);return Ng-m/x*S},o=d=>{const p=d*a*e,m=p*n+n,x=Math.pow(a,2)*Math.pow(d,2)*e,S=Math.exp(-p),b=Hu(Math.pow(d,2),a);return(-s(d)+Ng>0?-1:1)*((m-x)*S)/b}):(s=d=>{const h=Math.exp(-d*e),p=(d-n)*e+1;return-.001+h*p},o=d=>{const h=Math.exp(-d*e),p=(n-d)*(e*e);return h*p});const c=5/e,u=qA(s,o,c);if(e=Pn(e),isNaN(u))return{stiffness:et.stiffness,damping:et.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const HA=12;function qA(e,t,n){let r=n;for(let s=1;s<HA;s++)r=r-e(r)/t(r);return r}function Hu(e,t){return e*Math.sqrt(1-t*t)}const KA=["duration","bounce"],XA=["stiffness","damping","mass"];function kg(e,t){return t.some(n=>e[n]!==void 0)}function ZA(e){let t={velocity:et.velocity,stiffness:et.stiffness,damping:et.damping,mass:et.mass,isResolvedFromDuration:!1,...e};if(!kg(e,XA)&&kg(e,KA))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Hn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:et.mass,stiffness:s,damping:o}}else{const n=YA(e);t={...t,...n,mass:et.mass},t.isResolvedFromDuration=!0}return t}function jg(e=et.visualDuration,t=et.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:p,velocity:m,isResolvedFromDuration:x}=ZA({...n,velocity:-Yn(n.velocity||0)}),S=m||0,b=d/(2*Math.sqrt(u*h)),T=a-o,v=Yn(Math.sqrt(u/h)),A=Math.abs(T)<5;r||(r=A?et.restSpeed.granular:et.restSpeed.default),s||(s=A?et.restDelta.granular:et.restDelta.default);let C;if(b<1){const P=Hu(v,b);C=D=>{const R=Math.exp(-b*v*D);return a-R*((S+b*v*T)/P*Math.sin(P*D)+T*Math.cos(P*D))}}else if(b===1)C=P=>a-Math.exp(-v*P)*(T+(S+v*T)*P);else{const P=v*Math.sqrt(b*b-1);C=D=>{const R=Math.exp(-b*v*D),F=Math.min(P*D,300);return a-R*((S+b*v*T)*Math.sinh(F)+P*T*Math.cosh(F))/P}}const I={calculatedDuration:x&&p||null,next:P=>{const D=C(P);if(x)c.done=P>=p;else{let R=0;b<1&&(R=P===0?Pn(S):Dg(C,P,D));const F=Math.abs(R)<=r,W=Math.abs(a-D)<=s;c.done=F&&W}return c.value=c.done?a:D,c},toString:()=>{const P=Math.min(f0(I),au),D=h0(R=>I.next(P*R).value,P,30);return P+"ms "+D}};return I}function Lg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:c,max:u,restDelta:d=.5,restSpeed:h}){const p=e[0],m={done:!1,value:p},x=F=>c!==void 0&&F<c||u!==void 0&&F>u,S=F=>c===void 0?u:u===void 0||Math.abs(c-F)<Math.abs(u-F)?c:u;let b=n*t;const T=p+b,v=a===void 0?T:a(T);v!==T&&(b=v-p);const A=F=>-b*Math.exp(-F/r),C=F=>v+A(F),I=F=>{const W=A(F),Q=C(F);m.done=Math.abs(W)<=d,m.value=m.done?v:Q};let P,D;const R=F=>{x(m.value)&&(P=F,D=jg({keyframes:[m.value,S(m.value)],velocity:Dg(C,F,m.value),damping:s,stiffness:o,restDelta:d,restSpeed:h}))};return R(0),{calculatedDuration:null,next:F=>{let W=!1;return!D&&P===void 0&&(W=!0,I(F),R(F)),P!==void 0&&F>=P?D.next(F-P):(!W&&I(F),m)}}}const JA=Ji(.42,0,1,1),QA=Ji(0,0,.58,1),Rg=Ji(.42,0,.58,1),eM=e=>Array.isArray(e)&&typeof e[0]!="number",Fg={linear:Nt,easeIn:JA,easeInOut:Rg,easeOut:QA,circIn:_u,circInOut:sg,circOut:rg,backIn:$u,backInOut:tg,backOut:eg,anticipate:ng},Vg=e=>{if(cu(e)){Cr(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return Ji(t,n,r,s)}else if(typeof e=="string")return Cr(Fg[e]!==void 0,`Invalid easing type '${e}'`),Fg[e];return e};function tM(e,t,n){const r=[],s=n||Ig,o=e.length-1;for(let a=0;a<o;a++){let c=s(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Nt:t;c=to(u,c)}r.push(c)}return r}function nM(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Cr(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=tM(t,r,s),u=c.length,d=h=>{if(a&&h<e[0])return t[0];let p=0;if(u>1)for(;p<e.length-2&&!(h<e[p+1]);p++);const m=Fs(e[p],e[p+1],h);return c[p](m)};return n?h=>d(Hn(e[0],e[o-1],h)):d}function rM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Fs(0,t,r);e.push(Qe(n,1,s))}}function sM(e){const t=[0];return rM(t,e.length-1),t}function iM(e,t){return e.map(n=>n*t)}function oM(e,t){return e.map(()=>t||Rg).splice(0,e.length-1)}function no({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=eM(r)?r.map(Vg):Vg(r),o={done:!1,value:t[0]},a=iM(n&&n.length===t.length?n:sM(t),e),c=nM(a,t,{ease:Array.isArray(s)?s:oM(t,s)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const aM=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ye.update(t,!0),stop:()=>Er(t),now:()=>yt.isProcessing?yt.timestamp:An.now()}},lM={decay:Lg,inertia:Lg,tween:no,keyframes:no,spring:jg},cM=e=>e/100;let qu=class extends Mg{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();const{onStop:u}=this.options;u&&u()};const{name:n,motionValue:r,element:s,keyframes:o}=this.options,a=(s==null?void 0:s.KeyframeResolver)||Wu,c=(u,d)=>this.onKeyframesResolved(u,d);this.resolver=new a(o,c,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:a=0}=this.options,c=lu(n)?n:lM[n]||no;let u,d;process.env.NODE_ENV!=="production"&&c!==no&&Cr(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==no&&typeof t[0]!="number"&&(u=to(cM,Ig(t[0],t[1])),t=[0,100]);const h=c({...this.options,keyframes:t});o==="mirror"&&(d=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=f0(h));const{calculatedDuration:p}=h,m=p+s,x=m*(r+1)-s;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:u,calculatedDuration:p,resolvedDuration:m,totalDuration:x}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:u,calculatedDuration:d,totalDuration:h,resolvedDuration:p}=r;if(this.startTime===null)return o.next(0);const{delay:m,repeat:x,repeatType:S,repeatDelay:b,onUpdate:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-m*(this.speed>=0?1:-1),A=this.speed>=0?v<0:v>h;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let C=this.currentTime,I=o;if(x){const F=Math.min(this.currentTime,h)/p;let W=Math.floor(F),Q=F%1;!Q&&F>=1&&(Q=1),Q===1&&W--,W=Math.min(W,x+1),!!(W%2)&&(S==="reverse"?(Q=1-Q,b&&(Q-=b/p)):S==="mirror"&&(I=a)),C=Hn(0,1,Q)*p}const P=A?{done:!1,value:u[0]}:I.next(C);c&&(P.value=c(P.value));let{done:D}=P;!A&&d!==null&&(D=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return R&&s!==void 0&&(P.value=Ta(u,this.options,s)),T&&T(P.value),R&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Yn(t.calculatedDuration):0}get time(){return Yn(this.currentTime)}set time(t){t=Pn(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){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Yn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=aM,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??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";const{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)}};const uM=new Set(["opacity","clipPath","filter","transform"]);function fM(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:c="easeInOut",times:u}={}){const d={[t]:n};u&&(d.offset=u);const h=m0(c,s);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const dM=su(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ea=10,hM=2e4;function pM(e){return lu(e.type)||e.type==="spring"||!p0(e.ease)}function mM(e,t){const n=new qu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<hM;)r=n.sample(o),s.push(r.value),o+=Ea;return{times:void 0,keyframes:s,duration:o-Ea,ease:"linear"}}const Bg={anticipate:ng,backInOut:tg,circInOut:sg};function gM(e){return e in Bg}let Wg=class extends Mg{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Pg(o,(a,c)=>this.onKeyframesResolved(a,c),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:a,motionValue:c,name:u,startTime:d}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof o=="string"&&pa()&&gM(o)&&(o=Bg[o]),pM(this.options)){const{onComplete:p,onUpdate:m,motionValue:x,element:S,...b}=this.options,T=mM(t,b);t=T.keyframes,t.length===1&&(t[1]=t[0]),r=T.duration,s=T.times,o=T.ease,a="keyframes"}const h=fM(c.owner.current,u,t,{...this.options,duration:r,times:s,ease:o});return h.startTime=d??this.calcStartTime(),this.pendingTimeline?(d0(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:p}=this.options;c.set(Ta(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Yn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Yn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Pn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Nt;const{animation:r}=n;d0(r,t)}return Nt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:o,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:p,element:m,...x}=this.options,S=new qu({...x,keyframes:r,duration:s,type:o,ease:a,times:c,isGenerator:!0}),b=Pn(this.time);d.setWithVelocity(S.sample(b-Ea).value,S.sample(b).value,Ea)}const{onStop:u}=this.options;u&&u(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:o,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=n.owner.getProps();return dM()&&r&&uM.has(r)&&(r!=="transform"||!d)&&!u&&!s&&o!=="mirror"&&a!==0&&c!=="inertia"}};const yM={type:"spring",stiffness:500,damping:25,restSpeed:10},xM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),vM={type:"keyframes",duration:.8},bM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wM=(e,{keyframes:t})=>t.length>2?vM:es.has(e)?e.startsWith("scale")?xM(t[1]):yM:bM;function SM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const Ku=(e,t,n,r={},s,o)=>a=>{const c=ou(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Pn(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:m=>{t.set(m),c.onUpdate&&c.onUpdate(m)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:s};SM(c)||(h={...h,...wM(e,h)}),h.duration&&(h.duration=Pn(h.duration)),h.repeatDelay&&(h.repeatDelay=Pn(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(p=!0)),h.allowFlatten=!c.type&&!c.ease,p&&!o&&t.get()!==void 0){const m=Ta(h.keyframes,c);if(m!==void 0)return Ye.update(()=>{h.onUpdate(m),h.onComplete()}),new qE([])}return!o&&Wg.supports(h)?new Wg(h):new qu(h)};function TM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ug(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(a=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const p in u){const m=e.getValue(p,(o=e.latestValues[p])!==null&&o!==void 0?o:null),x=u[p];if(x===void 0||h&&TM(h,p))continue;const S={delay:n,...ou(a||{},p)};let b=!1;if(window.MotionHandoffAnimation){const v=X0(e);if(v){const A=window.MotionHandoffAnimation(v,p,Ye);A!==null&&(S.startTime=A,b=!0)}}Ou(e,p),m.start(Ku(p,m,x,e.shouldReduceMotion&&K0.has(p)?{type:!1}:S,e,b));const T=m.animation;T&&d.push(T)}return c&&Promise.all(d).then(()=>{Ye.update(()=>{c&&JP(e,c)})}),d}function Xu(e,t,n={}){var r;const s=Zi(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const a=s?()=>Promise.all(Ug(e,s,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return CM(e,t,h+d,p,m,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[d,h]=u==="beforeChildren"?[a,c]:[c,a];return d().then(()=>h())}else return Promise.all([a(),c(n.delay)])}function CM(e,t,n=0,r=0,s=1,o){const a=[],c=(e.variantChildren.size-1)*r,u=s===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(EM).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(Xu(d,t,{...o,delay:n+u(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function EM(e,t){return e.sortNodePosition(t)}function PM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Xu(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Xu(e,t,n);else{const s=typeof t=="function"?Zi(e,t,n.custom):t;r=Promise.all(Ug(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function zg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AM=gu.length;function Gg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Gg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AM;n++){const r=gu[n],s=e.props[r];(Hi(s)||s===!1)&&(t[r]=s)}return t}const MM=[...mu].reverse(),OM=mu.length;function $M(e){return t=>Promise.all(t.map(({animation:n,options:r})=>PM(e,n,r)))}function _M(e){let t=$M(e),n=Yg(),r=!0;const s=u=>(d,h)=>{var p;const m=Zi(e,h,u==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(m){const{transition:x,transitionEnd:S,...b}=m;d={...d,...b,...S}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,h=Gg(e.parent)||{},p=[],m=new Set;let x={},S=1/0;for(let T=0;T<OM;T++){const v=MM[T],A=n[v],C=d[v]!==void 0?d[v]:h[v],I=Hi(C),P=v===u?A.isActive:null;P===!1&&(S=T);let D=C===h[v]&&C!==d[v]&&I;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),A.protectedKeys={...x},!A.isActive&&P===null||!C&&!A.prevProp||va(C)||typeof C=="boolean")continue;const R=IM(A.prevProp,C);let F=R||v===u&&A.isActive&&!D&&I||T>S&&I,W=!1;const Q=Array.isArray(C)?C:[C];let ee=Q.reduce(s(v),{});P===!1&&(ee={});const{prevResolvedValues:ae={}}=A,ge={...ae,...ee},de=Y=>{F=!0,m.has(Y)&&(W=!0,m.delete(Y)),A.needsAnimating[Y]=!0;const z=e.getValue(Y);z&&(z.liveStyle=!1)};for(const Y in ge){const z=ee[Y],K=ae[Y];if(x.hasOwnProperty(Y))continue;let $=!1;Au(z)&&Au(K)?$=!zg(z,K):$=z!==K,$?z!=null?de(Y):m.add(Y):z!==void 0&&m.has(Y)?de(Y):A.protectedKeys[Y]=!0}A.prevProp=C,A.prevResolvedValues=ee,A.isActive&&(x={...x,...ee}),r&&e.blockInitialAnimation&&(F=!1),F&&(!(D&&R)||W)&&p.push(...Q.map(Y=>({animation:Y,options:{type:v}})))}if(m.size){const T={};if(typeof d.initial!="boolean"){const v=Zi(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(T.transition=v.transition)}m.forEach(v=>{const A=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),T[v]=A??null}),p.push({animation:T})}let b=!!p.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(p):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(m=>{var x;return(x=m.animationState)===null||x===void 0?void 0:x.setActive(u,d)}),n[u].isActive=d;const p=a(u);for(const m in n)n[m].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Yg(),r=!0}}}function IM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!zg(t,e):!1}function ss(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yg(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}let Mr=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},DM=class extends Mr{constructor(t){super(t),t.animationState||(t.animationState=_M(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();va(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}},NM=0;const kM={animation:{Feature:DM},exit:{Feature:class extends Mr{constructor(){super(...arguments),this.id=NM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function ro(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function so(e){return{point:{x:e.pageX,y:e.pageY}}}const jM=e=>t=>hu(t)&&e(t,so(t));function io(e,t,n,r){return ro(e,t,jM(n),r)}function Hg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function RM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const qg=1e-4,FM=1-qg,VM=1+qg,Kg=.01,BM=0-Kg,WM=0+Kg;function Ot(e){return e.max-e.min}function UM(e,t,n){return Math.abs(e-t)<=n}function Xg(e,t,n,r=.5){e.origin=r,e.originPoint=Qe(t.min,t.max,e.origin),e.scale=Ot(n)/Ot(t),e.translate=Qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=FM&&e.scale<=VM||isNaN(e.scale))&&(e.scale=1),(e.translate>=BM&&e.translate<=WM||isNaN(e.translate))&&(e.translate=0)}function oo(e,t,n,r){Xg(e.x,t.x,n.x,r?r.originX:void 0),Xg(e.y,t.y,n.y,r?r.originY:void 0)}function Zg(e,t,n){e.min=n.min+t.min,e.max=e.min+Ot(t)}function zM(e,t,n){Zg(e.x,t.x,n.x),Zg(e.y,t.y,n.y)}function Jg(e,t,n){e.min=t.min-n.min,e.max=e.min+Ot(t)}function ao(e,t,n){Jg(e.x,t.x,n.x),Jg(e.y,t.y,n.y)}const Qg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ys=()=>({x:Qg(),y:Qg()}),ey=()=>({min:0,max:0}),at=()=>({x:ey(),y:ey()});function tn(e){return[e("x"),e("y")]}function Zu(e){return e===void 0||e===1}function Ju({scale:e,scaleX:t,scaleY:n}){return!Zu(e)||!Zu(t)||!Zu(n)}function is(e){return Ju(e)||ty(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ty(e){return ny(e.x)||ny(e.y)}function ny(e){return e&&e!=="0%"}function Pa(e,t,n){const r=e-n,s=t*r;return n+s}function ry(e,t,n,r,s){return s!==void 0&&(e=Pa(e,s,r)),Pa(e,n,r)+t}function Qu(e,t=0,n=1,r,s){e.min=ry(e.min,t,n,r,s),e.max=ry(e.max,t,n,r,s)}function sy(e,{x:t,y:n}){Qu(e.x,t.translate,t.scale,t.originPoint),Qu(e.y,n.translate,n.scale,n.originPoint)}const iy=.999999999999,oy=1.0000000000001;function GM(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,a;for(let c=0;c<s;c++){o=n[c],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&qs(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,sy(e,a)),r&&is(o.latestValues)&&qs(e,o.latestValues))}t.x<oy&&t.x>iy&&(t.x=1),t.y<oy&&t.y>iy&&(t.y=1)}function Hs(e,t){e.min=e.min+t,e.max=e.max+t}function ay(e,t,n,r,s=.5){const o=Qe(e.min,e.max,s);Qu(e,t,n,o,r)}function qs(e,t){ay(e.x,t.x,t.scaleX,t.scale,t.originX),ay(e.y,t.y,t.scaleY,t.scale,t.originY)}function ly(e,t){return Hg(RM(e.getBoundingClientRect(),t))}function YM(e,t,n){const r=ly(e,n),{scroll:s}=t;return s&&(Hs(r.x,s.offset.x),Hs(r.y,s.offset.y)),r}const cy=({current:e})=>e?e.ownerDocument.defaultView:null,uy=(e,t)=>Math.abs(e-t);function HM(e,t){const n=uy(e.x,t.x),r=uy(e.y,t.y);return Math.sqrt(n**2+r**2)}let fy=class{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=tf(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,x=HM(p.offset,{x:0,y:0})>=3;if(!m&&!x)return;const{point:S}=p,{timestamp:b}=yt;this.history.push({...S,timestamp:b});const{onStart:T,onMove:v}=this.handlers;m||(T&&T(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=ef(m,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:x,onSessionEnd:S,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=tf(p.type==="pointercancel"?this.lastMoveEventInfo:ef(m,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,T),S&&S(p,T)},!hu(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const a=so(t),c=ef(a,this.transformPagePoint),{point:u}=c,{timestamp:d}=yt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,tf(c,this.history)),this.removeListeners=to(io(this.contextWindow,"pointermove",this.handlePointerMove),io(this.contextWindow,"pointerup",this.handlePointerUp),io(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Er(this.updatePoint)}};function ef(e,t){return t?{point:t(e.point)}:e}function dy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function tf({point:e},t){return{point:e,delta:dy(e,hy(t)),offset:dy(e,qM(t)),velocity:KM(t,.1)}}function qM(e){return e[0]}function hy(e){return e[e.length-1]}function KM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=hy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Pn(t)));)n--;if(!r)return{x:0,y:0};const o=Yn(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function XM(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qe(n,e,r.max):Math.min(e,n)),e}function py(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ZM(e,{top:t,left:n,bottom:r,right:s}){return{x:py(e.x,n,s),y:py(e.y,t,r)}}function my(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function JM(e,t){return{x:my(e.x,t.x),y:my(e.y,t.y)}}function QM(e,t){let n=.5;const r=Ot(e),s=Ot(t);return s>r?n=Fs(t.min,t.max-r,e.min):r>s&&(n=Fs(e.min,e.max-s,t.min)),Hn(0,1,n)}function eO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const nf=.35;function tO(e=nf){return e===!1?e=0:e===!0&&(e=nf),{x:gy(e,"left","right"),y:gy(e,"top","bottom")}}function gy(e,t,n){return{min:yy(e,t),max:yy(e,n)}}function yy(e,t){return typeof e=="number"?e:e[t]||0}const nO=new WeakMap;let rO=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=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(so(h).point)},o=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:S}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eP(m),!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),tn(T=>{let v=this.getAxisMotionValue(T).get()||0;if(Mn.test(v)){const{projection:A}=this.visualElement;if(A&&A.layout){const C=A.layout.layoutBox[T];C&&(v=Ot(C)*(parseFloat(v)/100))}}this.originPoint[T]=v}),S&&Ye.postRender(()=>S(h,p)),Ou(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,p)=>{const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:S,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=p;if(x&&this.currentDirection===null){this.currentDirection=sO(T),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",p.point,T),this.updateAxis("y",p.point,T),this.visualElement.render(),b&&b(h,p)},c=(h,p)=>this.stop(h,p),u=()=>tn(h=>{var p;return this.getAnimationState(h)==="paused"&&((p=this.getAxisMotionValue(h).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new fy(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:cy(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Ye.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Aa(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=XM(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&Bs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=ZM(s.layoutBox,n):this.constraints=!1,this.elastic=tO(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&tn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=eO(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bs(t))return!1;const r=t.current;Cr(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=YM(r,s.root,this.visualElement.getTransformPagePoint());let a=JM(s.layout.layoutBox,o);if(n){const c=n(LM(a));this.hasMutatedConstraints=!!c,c&&(a=Hg(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=tn(h=>{if(!Aa(h,n,this.currentDirection))return;let p=u&&u[h]||{};a&&(p={min:0,max:0});const m=s?200:1e6,x=s?40:1e7,S={type:"inertia",velocity:r?t[h]:0,bounceStiffness:m,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(h,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ou(this.visualElement,t),r.start(Ku(t,r,0,n,this.visualElement,!1))}stopAnimation(){tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){tn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tn(n=>{const{drag:r}=this.getProps();if(!Aa(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n];o.set(t[n]-Qe(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};tn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();s[a]=QM({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),tn(a=>{if(!Aa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];c.set(Qe(u,d,s[a]))})}addListeners(){if(!this.visualElement.current)return;nO.set(this.visualElement,this);const t=this.visualElement.current,n=io(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Bs(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ye.read(r);const a=ro(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(tn(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:a=nf,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:a,dragMomentum:c}}};function Aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}let iO=class extends Mr{constructor(t){super(t),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new rO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}unmount(){this.removeGroupControls(),this.removeListeners()}};const xy=e=>(t,n)=>{e&&Ye.postRender(()=>e(t,n))};let oO=class extends Mr{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(t){this.session=new fy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:xy(t),onStart:xy(n),onMove:r,onEnd:(o,a)=>{delete this.session,s&&Ye.postRender(()=>s(o,a))}}}mount(){this.removePointerDownListener=io(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const Ma={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const lo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(we.test(e))e=parseFloat(e);else return e;const n=vy(e,t.target.x),r=vy(e,t.target.y);return`${n}% ${r}%`}},aO={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ar.parse(e);if(s.length>5)return r;const o=Ar.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=u;const d=Qe(c,u,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),o(s)}};let lO=class extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;PP(cO),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ma.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Ye.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),du.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}};function by(e){const[t,n]=a0(),r=O.useContext(Jc);return g.jsx(lO,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(_0),isPresent:t,safeToRemove:n})}const cO={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:aO};function uO(e,t,n){const r=St(e)?e:Yi(e);return r.start(Ku("",r,t,n)),r.animation}function fO(e){return e instanceof SVGElement&&e.tagName!=="svg"}const dO=(e,t)=>e.depth-t.depth;let hO=class{constructor(){this.children=[],this.isDirty=!1}add(t){nu(this.children,t),this.isDirty=!0}remove(t){ru(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(dO),this.isDirty=!1,this.children.forEach(t)}};function pO(e,t){const n=An.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Er(r),e(o-t))};return Ye.read(r,!0),()=>Er(r)}const wy=["TopLeft","TopRight","BottomLeft","BottomRight"],mO=wy.length,Sy=e=>typeof e=="string"?parseFloat(e):e,Ty=e=>typeof e=="number"||we.test(e);function gO(e,t,n,r,s,o){s?(e.opacity=Qe(0,n.opacity!==void 0?n.opacity:1,yO(r)),e.opacityExit=Qe(t.opacity!==void 0?t.opacity:1,0,xO(r))):o&&(e.opacity=Qe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<mO;a++){const c=`border${wy[a]}Radius`;let u=Cy(t,c),d=Cy(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||Ty(u)===Ty(d)?(e[c]=Math.max(Qe(Sy(u),Sy(d),r),0),(Mn.test(d)||Mn.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=Qe(t.rotate||0,n.rotate||0,r))}function Cy(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yO=Ey(0,.5,rg),xO=Ey(.5,.95,Nt);function Ey(e,t,n){return r=>r<e?0:r>t?1:n(Fs(e,t,r))}function Py(e,t){e.min=t.min,e.max=t.max}function nn(e,t){Py(e.x,t.x),Py(e.y,t.y)}function Ay(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function My(e,t,n,r,s){return e-=t,e=Pa(e,1/n,r),s!==void 0&&(e=Pa(e,1/s,r)),e}function vO(e,t=0,n=1,r=.5,s,o=e,a=e){if(Mn.test(t)&&(t=parseFloat(t),t=Qe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Qe(o.min,o.max,r);e===o&&(c-=t),e.min=My(e.min,t,n,c,s),e.max=My(e.max,t,n,c,s)}function Oy(e,t,[n,r,s],o,a){vO(e,t[n],t[r],t[s],t.scale,o,a)}const bO=["x","scaleX","originX"],wO=["y","scaleY","originY"];function $y(e,t,n,r){Oy(e.x,t,bO,n?n.x:void 0,r?r.x:void 0),Oy(e.y,t,wO,n?n.y:void 0,r?r.y:void 0)}function _y(e){return e.translate===0&&e.scale===1}function Iy(e){return _y(e.x)&&_y(e.y)}function Dy(e,t){return e.min===t.min&&e.max===t.max}function SO(e,t){return Dy(e.x,t.x)&&Dy(e.y,t.y)}function Ny(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ky(e,t){return Ny(e.x,t.x)&&Ny(e.y,t.y)}function jy(e){return Ot(e.x)/Ot(e.y)}function Ly(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}let TO=class{constructor(){this.members=[]}add(t){nu(this.members,t),t.scheduleRender()}remove(t){if(ru(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function CO(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||o||a)&&(r=`translate3d(${s}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:p,rotateY:m,skewX:x,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),m&&(r+=`rotateY(${m}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const rf=["","X","Y","Z"],EO={visibility:"hidden"},Ry=1e3;let PO=0;function sf(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Fy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=X0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Fy(r)}function Vy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},c=t==null?void 0:t()){this.id=PO++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(OO),this.nodes.forEach(NO),this.nodes.forEach(kO),this.nodes.forEach($O)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new hO)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new iu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fO(a),this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||u)&&(this.isLayoutDirty=!0),e){let p;const m=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=pO(m,250),Ma.hasAnimatedSinceResize&&(Ma.hasAnimatedSinceResize=!1,this.nodes.forEach(Wy))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeLayoutChanged:x,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||VO,{onLayoutAnimationStart:T,onLayoutAnimationComplete:v}=h.getProps(),A=!this.targetLayout||!ky(this.targetLayout,S),C=!m&&x;if(this.options.layoutRoot||this.resumeFrom||C||m&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...ou(b,"layout"),onPlay:T,onComplete:v};(h.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else m||Wy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Er(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(jO),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(By);return}this.isUpdating||this.nodes.forEach(IO),this.isUpdating=!1,this.nodes.forEach(DO),this.nodes.forEach(AO),this.nodes.forEach(MO),this.clearAllSnapshots();const c=An.now();yt.delta=Hn(0,1e3/60,c-yt.timestamp),yt.timestamp=c,yt.isProcessing=!0,fu.update.process(yt),fu.preRender.process(yt),fu.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,du.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_O),this.sharedNodes.forEach(LO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ot(this.snapshot.measuredBox.x)&&!Ot(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!Iy(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(c||is(this.latestValues)||h)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),BO(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return at();const u=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(WO))){const{scroll:h}=this.root;h&&(Hs(u.x,h.offset.x),Hs(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=at();if(nn(u,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:m}=h;h!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&nn(u,a),Hs(u.x,p.offset.x),Hs(u.y,p.offset.y))}return u}applyTransform(a,c=!1){const u=at();nn(u,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&qs(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),is(h.latestValues)&&qs(u,h.latestValues)}return is(this.latestValues)&&qs(u,this.latestValues),u}removeTransform(a){const c=at();nn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!is(d.latestValues))continue;Ju(d.latestValues)&&d.updateSnapshot();const h=at(),p=d.measurePageBox();nn(h,p),$y(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return is(this.latestValues)&&$y(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!(!this.layout||!(p||m))){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){const x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),ao(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nn(this.target,this.layout.layoutBox),sy(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),ao(this.relativeTargetOrigin,this.target,x.target),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ju(this.parent.latestValues)||ty(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 a;const c=this.getLead(),u=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||p))return;nn(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,x=this.treeScale.y;GM(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=at());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ay(this.prevProjectionDelta.x,this.projectionDelta.x),Ay(this.prevProjectionDelta.y,this.projectionDelta.y)),oo(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==x||!Ly(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ly(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ys(),this.projectionDelta=Ys(),this.projectionDeltaWithTransform=Ys()}setAnimationOrigin(a,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},p=Ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const m=at(),x=u?u.source:void 0,S=this.layout?this.layout.source:void 0,b=x!==S,T=this.getStack(),v=!T||T.members.length<=1,A=!!(b&&!v&&this.options.crossfade===!0&&!this.path.some(FO));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const P=I/1e3;Uy(p.x,a.x,P),Uy(p.y,a.y,P),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ao(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RO(this.relativeTarget,this.relativeTargetOrigin,m,P),C&&SO(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=at()),nn(C,this.relativeTarget)),b&&(this.animationValues=h,gO(h,d,this.latestValues,P,A,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Er(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{Ma.hasAnimatedSinceResize=!0,this.currentAnimation=uO(0,Ry,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ry),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=a;if(!(!c||!u||!d)){if(this!==a&&this.layout&&d&&qy(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||at();const p=Ot(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+p;const m=Ot(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+m}nn(c,u),qs(c,h),oo(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new TO),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const d=this.getStack();d&&d.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&sf("z",a,d,this.animationValues);for(let h=0;h<rf.length;h++)sf(`rotate${rf[h]}`,a,d,this.animationValues),sf(`skew${rf[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var c,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return EO;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Sa(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Sa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(b.transform=h?h({},""):"none",this.hasProjected=!1),b}const m=p.animationValues||p.latestValues;this.applyTransformsToTarget(),d.transform=CO(this.projectionDeltaWithTransform,this.treeScale,m),h&&(d.transform=h(m,d.transform));const{x,y:S}=this.projectionDelta;d.transformOrigin=`${x.origin*100}% ${S.origin*100}% 0`,p.animationValues?d.opacity=p===this?(u=(c=m.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:d.opacity=p===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in qi){if(m[b]===void 0)continue;const{correct:T,applyTo:v,isCSSVariable:A}=qi[b],C=d.transform==="none"?m[b]:T(m[b],p);if(v){const I=v.length;for(let P=0;P<I;P++)d[v[P]]=C}else A?this.options.visualElement.renderState.vars[b]=C:d[b]=C}return this.options.layoutId&&(d.pointerEvents=p===this?Sa(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(By),this.root.sharedNodes.clear()}}}function AO(e){e.updateLayout()}function MO(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?tn(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],x=Ot(m);m.min=r[p].min,m.max=m.min+x}):qy(o,n.layoutBox,r)&&tn(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],x=Ot(r[p]);m.max=m.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const c=Ys();oo(c,r,n.layoutBox);const u=Ys();a?oo(u,e.applyTransform(s,!0),n.measuredBox):oo(u,r,n.layoutBox);const d=!Iy(c);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:x}=p;if(m&&x){const S=at();ao(S,n.layoutBox,m.layoutBox);const b=at();ao(b,r,x.layoutBox),ky(S,b)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function OO(e){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 $O(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _O(e){e.clearSnapshot()}function By(e){e.clearMeasurements()}function IO(e){e.isLayoutDirty=!1}function DO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function NO(e){e.resolveTargetDelta()}function kO(e){e.calcProjection()}function jO(e){e.resetSkewAndRotation()}function LO(e){e.removeLeadSnapshot()}function Uy(e,t,n){e.translate=Qe(t.translate,0,n),e.scale=Qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zy(e,t,n,r){e.min=Qe(t.min,n.min,r),e.max=Qe(t.max,n.max,r)}function RO(e,t,n,r){zy(e.x,t.x,n.x,r),zy(e.y,t.y,n.y,r)}function FO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VO={duration:.45,ease:[.4,0,.1,1]},Gy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yy=Gy("applewebkit/")&&!Gy("chrome/")?Math.round:Nt;function Hy(e){e.min=Yy(e.min),e.max=Yy(e.max)}function BO(e){Hy(e.x),Hy(e.y)}function qy(e,t,n){return e==="position"||e==="preserve-aspect"&&!UM(jy(t),jy(n),.2)}function WO(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const UO=Vy({attachResizeListener:(e,t)=>ro(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),of={current:void 0},Ky=Vy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!of.current){const e=new UO({});e.mount(window),e.setOptions({layoutScroll:!0}),of.current=e}return of.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),zO={pan:{Feature:oO},drag:{Feature:iO,ProjectionNode:Ky,MeasureLayout:by}};function Xy(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ye.postRender(()=>o(t,so(t)))}let GO=class extends Mr{mount(){const{current:t}=this.node;t&&(this.unmount=nP(t,(n,r)=>(Xy(this.node,r,"Start"),s=>Xy(this.node,s,"End"))))}unmount(){}},YO=class extends Mr{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=to(ro(this.node.current,"focus",()=>this.onFocus()),ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Zy(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ye.postRender(()=>o(t,so(t)))}let HO=class extends Mr{mount(){const{current:t}=this.node;t&&(this.unmount=oP(t,(n,r)=>(Zy(this.node,r,"Start"),(s,{success:o})=>Zy(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const af=new WeakMap,lf=new WeakMap,qO=e=>{const t=af.get(e.target);t&&t(e)},KO=e=>{e.forEach(qO)};function XO({root:e,...t}){const n=e||document;lf.has(n)||lf.set(n,{});const r=lf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(KO,{root:e,...t})),r[s]}function ZO(e,t,n){const r=XO(t);return af.set(e,n),r.observe(e),()=>{af.delete(e),r.unobserve(e)}}const JO={some:0,all:1};let QO=class extends Mr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:JO[s]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(u)};return ZO(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(e4(t,n))&&this.startObserver()}unmount(){}};function e4({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const t4={inView:{Feature:QO},tap:{Feature:HO},focus:{Feature:YO},hover:{Feature:GO}},n4={layout:{ProjectionNode:Ky,MeasureLayout:by}},cf={current:null},Jy={current:!1};function r4(){if(Jy.current=!0,!!eu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cf.current=e.matches;e.addListener(t),t()}else cf.current=!1}const s4=[...Cg,Tt,Ar],i4=e=>s4.find(Tg(e)),o4=new WeakMap;function a4(e,t,n){for(const r in t){const s=t[r],o=n[r];if(St(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&ha(s.version==="12.6.2",`Attempting to mix Motion versions ${s.version} with 12.6.2 may not work as expected.`);else if(St(o))e.addValue(r,Yi(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,Yi(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Qy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let l4=class{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=An.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Ye.render(this.render,!1,!0))};const{latestValues:u,renderState:d,onUpdate:h}=a;this.onUpdate=h,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=ba(n),this.isVariantNode=M0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in m){const S=m[x];u[x]!==void 0&&St(S)&&S.set(u[x],!1)}}mount(t){this.current=t,o4.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((n,r)=>this.bindToMotionValue(r,n)),Jy.current||r4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cf.current,process.env.NODE_ENV!=="production"&&ha(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Er(this.notifyUpdate),Er(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=es.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),a&&a(),n.owner&&n.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 Vs){const n=Vs[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):at()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Qy.length;r++){const s=Qy[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,a=t[o];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=a4(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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Yi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(wg(s)||ig(s))?s=parseFloat(s):!i4(s)&&Ar.test(n)&&(s=hg(t,n)),this.setBaseTarget(t,St(s)?s.get():s)),St(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const a=Pu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(s=a[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!St(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new iu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}},ex=class extends l4{constructor(){super(...arguments),this.KeyframeResolver=Pg}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;St(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}};function c4(e){return window.getComputedStyle(e)}let u4=class extends ex{constructor(){super(...arguments),this.type="html",this.renderInstance=z0}readValueFromInstance(t,n){if(es.has(n))return TA(t,n);{const r=c4(t),s=(xu(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ly(t,n)}build(t,n,r){wu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mu(t,n,r)}},f4=class extends ex{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&U0(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(es.has(n)){const r=dg(n);return r&&r.default||0}return n=G0.has(n)?n:yu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return H0(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ye.postRender(this.updateDimensions)}build(t,n,r){Cu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){Y0(t,n,r,s)}mount(t){this.isSVGTag=Eu(t.tagName),super.mount(t)}};const d4=(e,t)=>Tu(e)?new f4(t):new u4(t,{allowProjection:e!==O.Fragment}),h4=XP({...kM,...t4,...zO,...n4},d4),uf=hP(h4),p4=500,ff=({id:e,content:t,type:n="notification",duration:r=0,onClose:s})=>{const[o,a]=O.useState(!0);let c,u=Ui,d;switch(n){case"success":d="text-green-500",c="bg-green-100",u=t0;break;case"error":d="text-red-500",c="bg-red-100",u=s0;break;case"warning":d="text-yellow-500",c="bg-yellow-100",u=Ui;break;case"loading":d="text-gray-500",c="bg-gray-100",u=Ui;break;case"notification":d="text-blue-500",c="bg-blue-100",u=n0;break;default:d="text-blue-500",c="bg-blue-100",u=Ui}O.useEffect(()=>{if(r===0)return;const p=setTimeout(()=>{a(!1)},r);return()=>clearTimeout(p)},[r]),O.useEffect(()=>{if(!o){const p=setTimeout(s,p4);return()=>clearTimeout(p)}},[o,s]);const h={initial:{opacity:0,y:50,scale:.9},animate:{opacity:1,y:0,scale:1,transition:{duration:.3,type:"spring",stiffness:300,damping:20}},exit:{opacity:0,y:20,scale:.95,transition:{duration:.2,ease:"easeOut"}}};return g.jsx(zE,{onExitComplete:s,children:o&&g.jsxs(uf.div,{id:e,className:"toast w-[400px] rounded-2xl border-1 border-blue-200 p-[18px] shadow-blue-sh bg-white font-jakarta-sans",initial:"initial",animate:"animate",exit:"exit",variants:h,layout:!0,children:[g.jsx(Pe,{icon:RE,onClick:()=>a(!1),className:"float-right text-lg text-[#9CA1B6] cursor-pointer"}),g.jsxs("div",{className:"space-y-12",children:[g.jsxs("div",{className:"flex gap-12",children:[g.jsx(Pe,{icon:u,className:`text-[20px] p-6 rounded-full self-start ${d} ${c}`}),g.jsx("h5",{className:"text-lg font-bold text-blue-900 self-center",children:t.title})]}),t.description&&g.jsx("span",{className:"text-md text-gray-500 leading-[16px]",children:t.description})]})]})})},tx=({promise:e,messages:t,options:n,onClose:r})=>{const[s,o]=O.useState("loading"),[a,c]=O.useState(t.loading);return O.useEffect(()=>{e.then(()=>{console.log("promise resolved"),o("success"),c(t.success)}).catch(()=>{console.log("promise rejected"),o("error"),c(t.error)}).finally(()=>{console.log("promise finally"),setTimeout(()=>{r()},(n==null?void 0:n.duration)||3e3)})},[e]),g.jsx(ff,{content:a,type:s,duration:n.duration,onClose:r})};/*!
|
|
622
622
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
623
623
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
624
624
|
* Copyright 2024 Fonticons, Inc.
|
|
@@ -721,7 +721,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
721
721
|
${v.container}
|
|
722
722
|
${c?"bg-gray-50 border-gray-200 cursor-not-allowed":"bg-blue-50 cursor-pointer"}
|
|
723
723
|
${!c&&(h?"border-blue-500":"border-blue-100 hover:border-blue-300")}
|
|
724
|
-
`,...ue,children:[ge?g.jsxs("div",{className:`flex items-center gap-[6px] overflow-hidden ${((Y=ge.colors)==null?void 0:Y.bgColor)||""} ${((z=ge.colors)==null?void 0:z.textColor)||""} ${ge.colors?"rounded-[8px] py-4 px-8":""}`,children:[((K=ge.colors)==null?void 0:K.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:ge.colors.dotColor}}),g.jsx("span",{className:`${v.text} font-semibold truncate`,children:ge.label})]}):g.jsx("span",{className:`flex-grow text-left truncate font-600 ${v.text} ${c?"text-gray-300":"text-gray-500"}`,children:s}),g.jsx("svg",{className:`${v.icon} transition-transform ${h?"rotate-180":""} ${c?"text-gray-300":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),ee&&!c&&g.jsxs("div",{ref:P.setFloating,style:{position:I,top:C??0,left:A??0,...ae,width:($=P.reference.current)==null?void 0:$.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...Q(),children:[o&&g.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:g.jsx("svg",{className:`${v.searchIcon} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{ref:S,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${v.searchText}`,placeholder:"Buscar...",value:m,onChange:k=>x(k.target.value),onClick:k=>k.stopPropagation(),autoFocus:!0}),m&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:k=>{k.stopPropagation(),x("")},children:g.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsx("div",{className:"max-h-[450px] overflow-y-auto",children:le.length>0?g.jsx("div",{className:"py-4",children:le.map(k=>{var U,re,B;const X=n===k.value;return g.jsxs(O.Fragment,{children:[k.dividerBefore&&g.jsx("div",{className:"px-16 py-8",children:g.jsx("hr",{className:"border-t border-gray-200"})}),g.jsxs("div",{className:"flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer gap-12",onClick:()=>de(k.value),children:[d&&g.jsx(Kd,{active:X,size:v.checkboxSize,variant:"rounded",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((U=k.colors)==null?void 0:U.bgColor)||""} ${((re=k.colors)==null?void 0:re.textColor)||""}`,children:[((B=k.colors)==null?void 0:B.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:k.colors.dotColor}}),g.jsx("span",{className:`${v.text} font-semibold truncate`,children:k.label})]})]})]},k.value)})}):g.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[g.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"mt-8 text-body-s",children:["No se encontraron resultados para “",m,"”"]})]})})]})]})},DN=({image:e,title:t,subtitle:n,className:r=""})=>g.jsxs("div",{className:`flex flex-col items-center justify-center gap-24 p-8 text-center w-full h-full min-h-[300px] ${r}`,children:[e&&g.jsx("img",{src:e,alt:t,draggable:!1,className:"select-none"}),g.jsxs("div",{className:"space-y-16 max-w-[300px] select-none",children:[g.jsx("h3",{className:"text-[20px] font-bold text-blue-900 tracking-wide leading-[100%]",children:t}),g.jsx("p",{className:"text-base text-gray-500 max-w-sm leading-[150%]",children:n})]})]}),NN=({text:e,children:t,icon:n,location:r="top",childClassName:s="",forceShow:o})=>{const[a,c]=O.useState(!1),u=O.useRef(null),d={top:"bottom-full left-1/2 -translate-x-1/2 mb-2 flex-col",bottom:"top-full left-1/2 -translate-x-1/2 mt-2 flex-col-reverse",left:"right-full top-1/2 -translate-y-1/2 mr-2 flex-row",right:"left-full top-1/2 -translate-y-1/2 ml-2 flex-row-reverse"},h={top:"border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-t-[8px] border-t-gray-700",bottom:"border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-b-[8px] border-b-gray-700",left:"border-t-[8px] border-t-transparent border-b-[8px] border-b-transparent border-l-[8px] border-l-gray-700",right:"border-t-[8px] border-t-transparent border-b-[8px] border-b-transparent border-r-[8px] border-r-gray-700"},p=()=>{const m=u.current;if(m){const x=m.scrollWidth>m.offsetWidth;c(x)}};return O.useLayoutEffect(()=>(p(),window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)),[e,t]),g.jsxs("div",{className:"group relative grid min-w-0 w-full",children:[g.jsx("div",{ref:u,className:`truncate ${s}`,children:t}),a||o&&g.jsxs("div",{className:`pointer-events-none absolute flex items-center opacity-0 transition-opacity group-hover:opacity-100 z-50 ${d[r]}`,children:[g.jsx("div",{className:"bg-gray-700 p-12 rounded-[8px] shadow-xl max-w-[320px] w-max border border-gray-700/50",children:g.jsxs("div",{className:`flex items-start ${n?"gap-8":"justify-center"}`,children:[n&&g.jsx("div",{className:"flex items-center h-[16px] flex-shrink-0",children:g.jsx(Pe,{icon:n,className:"text-[16px] text-gray-100"})}),g.jsx("p",{className:"text-[12px] text-blue-50 leading-[16px] font-normal text-left",children:e})]})}),g.jsx("div",{className:`w-0 h-0 ${h[r]}`})]})]})},kN=()=>{const[e,t]=O.useState([]),n=O.useRef([]),r=O.useCallback(a=>{const c={...a,id:(a==null?void 0:a.id)||hf.uniqueId(),open:!0,type:(a==null?void 0:a.type)||"center",props:{...a.props,open:!0,onClose:()=>o(a.id||hf.uniqueId())}};n.current=[...n.current,c],t(n.current)},[]),s=O.useCallback(a=>{const c=hf.uniqueId(),u={id:c,open:!0,onClose:()=>{o(c)},type:"custom",component:a};n.current=[...n.current,u],t(n.current)},[]),o=O.useCallback(a=>{n.current=n.current.map(c=>c.id===a?{...c,open:!1}:c),t(n.current),setTimeout(()=>{n.current=n.current.filter(c=>c.id!==a),t(n.current)},150)},[]);return O.useEffect(()=>{window.openModal=r,window.closeModal=o,window.openCustomModal=s},[r,o,s]),g.jsx(g.Fragment,{children:e.map(a=>{if(a.type==="custom"&&(a!=null&&a.component)){const{open:u,onClose:d,component:h}=a;return h(u,d)}if(a.type==="dialog"){const{props:u}=a;return g.jsx(Qb,{...u,open:a.open,onClose:()=>o(a.id)},a.id)}if(a.type==="alert"){const{props:u}=a;return g.jsx(bb,{...u,open:a.open,onClose:()=>o(a.id)},a.id)}const{props:c}=a;return g.jsx(d2,{...c,open:a.open,onClose:()=>o(a.id),children:typeof c.children=="function"?c.children(()=>o(a.id)):c.children},a.id)})})};function jN(e){var t;(t=window==null?void 0:window.openModal)==null||t.call(window,e)}function LN(e){var t;(t=window==null?void 0:window.openCustomModal)==null||t.call(window,e)}function RN(e){var t;(t=window==null?void 0:window.closeModal)==null||t.call(window,e)}function FN(e,t,n){const r=t[e];if(O.isValidElement(r)&&typeof r.type!="string")return O.cloneElement(r,n);if(typeof r=="function"){const s=r;return g.jsx(s,{...n})}return r??g.jsx("div",{children:"no content"})}const Hd=[];function l2(e="bottom-center"){var t;if(!Hd.find(n=>n.id===e)){const n=document.createElement("div");switch(n.classList.add("fixed","z-[99999]","flex","flex-col","items-center","w-fit","min-w-[18rem]"),n.style.setProperty("z-index","99999"),e){case"top-left":n.classList.add("top-8","left-8");break;case"top-right":n.classList.add("top-8","right-8");break;case"bottom-left":n.classList.add("bottom-8","left-8");break;case"bottom-right":n.classList.add("bottom-8","right-8");break;case"top-center":n.classList.add("top-8","left-1/2","-translate-x-1/2");break;case"bottom-center":default:n.classList.add("bottom-8","left-1/2","-translate-x-1/2")}Hd.push({id:e,element:n}),document.body.appendChild(n)}return(t=Hd.find(n=>n.id===e))==null?void 0:t.element}function cl(e,t="success",{position:n="top-right",duration:r=3e3}={}){import("react-dom/client").then(({createRoot:s})=>{const o=l2(n);if(!o)return;const a=document.createElement("div"),c=s(a),u=()=>{c.unmount(),o.removeChild(a)};c.render(g.jsx(ff,{content:e,type:t,duration:r,onClose:u})),o.prepend(a),setTimeout(()=>{a.classList.add("mt-[0.5rem]")},10)})}const qd=(e,t,n={})=>{import("react-dom/client").then(({createRoot:r})=>{const s=l2(n.position);if(!s)return;const o=document.createElement("div"),a=r(o),c=()=>{a.unmount(),s.removeChild(o)};a.render(g.jsx(tx,{promise:e,messages:t,options:n,onClose:c})),s.prepend(o),setTimeout(()=>{o.classList.add("mt-[0.5rem]")},10)})},c2=(e,t={})=>{let n=()=>{},r=()=>{};const s=new Promise((o,a)=>{n=o,r=a});return qd(s,e,t),{resolve:o=>{typeof o=="string"&&(e.success={title:"Success",description:o}),n(o)},reject:o=>{typeof o=="string"&&(e.error={title:"Error",description:o}),r(o)}}},VN={success:(e,t={})=>cl(e,"success",t),error:(e,t={})=>cl(e,"error",t),warning:(e,t={})=>cl(e,"warning",t),notification:(e,t={})=>cl(e,"notification",t),async:(e,t,n={})=>qd(e,t,n),loading:(e,t={})=>c2(e,t)},u2=({containerProps:e={},imageProps:t={},src:n="",alt:r="",size:s=30,user:o=null})=>{const{className:a=" ",...c}=e,{className:u=" ",...d}=t,h=s+"px",p=s*.5+"px",m=s*.4+"px",[x,S]=O.useState(!1),b=()=>r?df(r):o?df(o!=null&&o.first_name||o!=null&&o.last_name?((o==null?void 0:o.first_name)||"")+" "+((o==null?void 0:o.last_name)||""):o==null?void 0:o.email):"#9CA1B6",T=P=>{try{return P?(new URL(P),!0):!1}catch(D){return console.log(D),!1}},v=()=>T(n)?n:o!=null&&o.image&&T(o.image)?o.image:o!=null&&o.image?Sx(o.image):"",A=()=>r?g.jsx("h4",{className:"text-white uppercase font-600 text-nowrap",style:{fontSize:m},children:r}):o?g.jsx("h4",{className:"text-white uppercase font-600 text-nowrap",style:{fontSize:m},children:o!=null&&o.first_name||o!=null&&o.last_name?((o==null?void 0:o.first_name)||" ")[0]+((o==null?void 0:o.last_name)||" ")[0]:((o==null?void 0:o.email)||" ")[0]}):g.jsx(Pe,{style:{maxWidth:p,maxHeight:p,minWidth:p,minHeight:p},icon:m4,className:"w-full text-white"}),C=()=>{S(!0)},I=v();return g.jsxs("div",{className:"flex items-center justify-center rounded-full overflow-hidden h-full relative "+a,style:{maxWidth:h,maxHeight:h,minWidth:h,minHeight:h,backgroundColor:b()},...c,children:[I&&!x&&g.jsx("img",{src:I,alt:r,className:`
|
|
724
|
+
`,...ue,children:[ge?g.jsxs("div",{className:`flex items-center gap-[6px] overflow-hidden ${((Y=ge.colors)==null?void 0:Y.bgColor)||""} ${((z=ge.colors)==null?void 0:z.textColor)||""} ${ge.colors?"rounded-[8px] py-4 px-8":""}`,children:[((K=ge.colors)==null?void 0:K.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:ge.colors.dotColor}}),g.jsx("span",{className:`${v.text} font-semibold truncate`,children:ge.label})]}):g.jsx("span",{className:`flex-grow text-left truncate font-600 ${v.text} ${c?"text-gray-300":"text-gray-500"}`,children:s}),g.jsx("svg",{className:`${v.icon} transition-transform ${h?"rotate-180":""} ${c?"text-gray-300":"text-gray-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 9l-7 7-7-7"})})]}),ee&&!c&&g.jsxs("div",{ref:P.setFloating,style:{position:I,top:C??0,left:A??0,...ae,width:($=P.reference.current)==null?void 0:$.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...Q(),children:[o&&g.jsx("div",{className:"sticky top-0 bg-white p-8 border-b border-gray-100 z-20",children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute inset-y-0 left-0 pl-12 flex items-center pointer-events-none",children:g.jsx("svg",{className:`${v.searchIcon} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),g.jsx("input",{ref:S,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${v.searchText}`,placeholder:"Buscar...",value:m,onChange:k=>x(k.target.value),onClick:k=>k.stopPropagation(),autoFocus:!0}),m&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:k=>{k.stopPropagation(),x("")},children:g.jsx("svg",{className:"h-16 w-16 text-gray-400 hover:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})}),g.jsx("div",{className:"max-h-[450px] overflow-y-auto",children:le.length>0?g.jsx("div",{className:"py-4",children:le.map(k=>{var U,re,B;const X=n===k.value;return g.jsxs(O.Fragment,{children:[k.dividerBefore&&g.jsx("div",{className:"px-16 py-8",children:g.jsx("hr",{className:"border-t border-gray-200"})}),g.jsxs("div",{className:"flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer gap-12",onClick:()=>de(k.value),children:[d&&g.jsx(Kd,{active:X,size:v.checkboxSize,variant:"rounded",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((U=k.colors)==null?void 0:U.bgColor)||""} ${((re=k.colors)==null?void 0:re.textColor)||""}`,children:[((B=k.colors)==null?void 0:B.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:k.colors.dotColor}}),g.jsx("span",{className:`${v.text} font-semibold truncate`,children:k.label})]})]})]},k.value)})}):g.jsxs("div",{className:"px-16 py-16 text-center text-gray-500",children:[g.jsx("svg",{className:"mx-auto h-24 w-24 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),g.jsxs("p",{className:"mt-8 text-body-s",children:["No se encontraron resultados para “",m,"”"]})]})})]})]})},DN=({image:e,title:t,subtitle:n,className:r=""})=>g.jsxs("div",{className:`flex flex-col items-center justify-center gap-24 p-8 text-center w-full h-full min-h-[300px] ${r}`,children:[e&&g.jsx("img",{src:e,alt:t,draggable:!1,className:"select-none"}),g.jsxs("div",{className:"space-y-16 max-w-[300px] select-none",children:[g.jsx("h3",{className:"text-[20px] font-bold text-blue-900 tracking-wide leading-[100%]",children:t}),g.jsx("p",{className:"text-base text-gray-500 max-w-sm leading-[150%]",children:n})]})]}),NN=({text:e,children:t,icon:n,location:r="top",childClassName:s="",forceShow:o,behavior:a="hover"})=>{const[c,u]=O.useState(!1),[d,h]=O.useState(!1),p=O.useRef(null),m=o||a==="hover"||a==="both"||a==="truncated"&&c,x={top:"bottom-full left-1/2 -translate-x-1/2 mb-2 flex-col",bottom:"top-full left-1/2 -translate-x-1/2 mt-2 flex-col-reverse",left:"right-full top-1/2 -translate-y-1/2 mr-2 flex-row",right:"left-full top-1/2 -translate-y-1/2 ml-2 flex-row-reverse"},S={top:"border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-t-[8px] border-t-gray-700",bottom:"border-l-[8px] border-l-transparent border-r-[8px] border-r-transparent border-b-[8px] border-b-gray-700",left:"border-t-[8px] border-t-transparent border-b-[8px] border-b-transparent border-l-[8px] border-l-gray-700",right:"border-t-[8px] border-t-transparent border-b-[8px] border-b-transparent border-r-[8px] border-r-gray-700"},b=()=>{const T=p.current;if(T){const v=T.scrollWidth>T.offsetWidth,A=Array.from(T.querySelectorAll("*")).some(C=>C.scrollWidth>C.offsetWidth);u(v||A)}};return O.useLayoutEffect(()=>(b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)),[e,t]),g.jsxs("div",{ref:p,className:`relative ${s}`,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[t,m&&g.jsxs("div",{className:`pointer-events-none absolute flex items-center z-50 transition-all duration-150 ${d?"opacity-100 scale-100":"opacity-0 scale-95"} ${x[r]}`,children:[g.jsx("div",{className:"bg-gray-700 p-12 rounded-[8px] shadow-xl max-w-[320px] w-max border border-gray-700/50",children:g.jsxs("div",{className:`flex items-start ${n?"gap-8":"justify-center"}`,children:[n&&g.jsx("div",{className:"flex items-center h-[16px] flex-shrink-0",children:g.jsx(Pe,{icon:n,className:"text-[16px] text-gray-100"})}),g.jsx("p",{className:"text-[12px] text-blue-50 leading-[16px] font-normal text-left",children:e})]})}),g.jsx("div",{className:`w-0 h-0 ${S[r]}`})]})]})},kN=()=>{const[e,t]=O.useState([]),n=O.useRef([]),r=O.useCallback(a=>{const c={...a,id:(a==null?void 0:a.id)||hf.uniqueId(),open:!0,type:(a==null?void 0:a.type)||"center",props:{...a.props,open:!0,onClose:()=>o(a.id||hf.uniqueId())}};n.current=[...n.current,c],t(n.current)},[]),s=O.useCallback(a=>{const c=hf.uniqueId(),u={id:c,open:!0,onClose:()=>{o(c)},type:"custom",component:a};n.current=[...n.current,u],t(n.current)},[]),o=O.useCallback(a=>{n.current=n.current.map(c=>c.id===a?{...c,open:!1}:c),t(n.current),setTimeout(()=>{n.current=n.current.filter(c=>c.id!==a),t(n.current)},150)},[]);return O.useEffect(()=>{window.openModal=r,window.closeModal=o,window.openCustomModal=s},[r,o,s]),g.jsx(g.Fragment,{children:e.map(a=>{if(a.type==="custom"&&(a!=null&&a.component)){const{open:u,onClose:d,component:h}=a;return h(u,d)}if(a.type==="dialog"){const{props:u}=a;return g.jsx(Qb,{...u,open:a.open,onClose:()=>o(a.id)},a.id)}if(a.type==="alert"){const{props:u}=a;return g.jsx(bb,{...u,open:a.open,onClose:()=>o(a.id)},a.id)}const{props:c}=a;return g.jsx(d2,{...c,open:a.open,onClose:()=>o(a.id),children:typeof c.children=="function"?c.children(()=>o(a.id)):c.children},a.id)})})};function jN(e){var t;(t=window==null?void 0:window.openModal)==null||t.call(window,e)}function LN(e){var t;(t=window==null?void 0:window.openCustomModal)==null||t.call(window,e)}function RN(e){var t;(t=window==null?void 0:window.closeModal)==null||t.call(window,e)}function FN(e,t,n){const r=t[e];if(O.isValidElement(r)&&typeof r.type!="string")return O.cloneElement(r,n);if(typeof r=="function"){const s=r;return g.jsx(s,{...n})}return r??g.jsx("div",{children:"no content"})}const Hd=[];function l2(e="bottom-center"){var t;if(!Hd.find(n=>n.id===e)){const n=document.createElement("div");switch(n.classList.add("fixed","z-[99999]","flex","flex-col","items-center","w-fit","min-w-[18rem]"),n.style.setProperty("z-index","99999"),e){case"top-left":n.classList.add("top-8","left-8");break;case"top-right":n.classList.add("top-8","right-8");break;case"bottom-left":n.classList.add("bottom-8","left-8");break;case"bottom-right":n.classList.add("bottom-8","right-8");break;case"top-center":n.classList.add("top-8","left-1/2","-translate-x-1/2");break;case"bottom-center":default:n.classList.add("bottom-8","left-1/2","-translate-x-1/2")}Hd.push({id:e,element:n}),document.body.appendChild(n)}return(t=Hd.find(n=>n.id===e))==null?void 0:t.element}function cl(e,t="success",{position:n="top-right",duration:r=3e3}={}){import("react-dom/client").then(({createRoot:s})=>{const o=l2(n);if(!o)return;const a=document.createElement("div"),c=s(a),u=()=>{c.unmount(),o.removeChild(a)};c.render(g.jsx(ff,{content:e,type:t,duration:r,onClose:u})),o.prepend(a),setTimeout(()=>{a.classList.add("mt-[0.5rem]")},10)})}const qd=(e,t,n={})=>{import("react-dom/client").then(({createRoot:r})=>{const s=l2(n.position);if(!s)return;const o=document.createElement("div"),a=r(o),c=()=>{a.unmount(),s.removeChild(o)};a.render(g.jsx(tx,{promise:e,messages:t,options:n,onClose:c})),s.prepend(o),setTimeout(()=>{o.classList.add("mt-[0.5rem]")},10)})},c2=(e,t={})=>{let n=()=>{},r=()=>{};const s=new Promise((o,a)=>{n=o,r=a});return qd(s,e,t),{resolve:o=>{typeof o=="string"&&(e.success={title:"Success",description:o}),n(o)},reject:o=>{typeof o=="string"&&(e.error={title:"Error",description:o}),r(o)}}},VN={success:(e,t={})=>cl(e,"success",t),error:(e,t={})=>cl(e,"error",t),warning:(e,t={})=>cl(e,"warning",t),notification:(e,t={})=>cl(e,"notification",t),async:(e,t,n={})=>qd(e,t,n),loading:(e,t={})=>c2(e,t)},u2=({containerProps:e={},imageProps:t={},src:n="",alt:r="",size:s=30,user:o=null})=>{const{className:a=" ",...c}=e,{className:u=" ",...d}=t,h=s+"px",p=s*.5+"px",m=s*.4+"px",[x,S]=O.useState(!1),b=()=>r?df(r):o?df(o!=null&&o.first_name||o!=null&&o.last_name?((o==null?void 0:o.first_name)||"")+" "+((o==null?void 0:o.last_name)||""):o==null?void 0:o.email):"#9CA1B6",T=P=>{try{return P?(new URL(P),!0):!1}catch(D){return console.log(D),!1}},v=()=>T(n)?n:o!=null&&o.image&&T(o.image)?o.image:o!=null&&o.image?Sx(o.image):"",A=()=>r?g.jsx("h4",{className:"text-white uppercase font-600 text-nowrap",style:{fontSize:m},children:r}):o?g.jsx("h4",{className:"text-white uppercase font-600 text-nowrap",style:{fontSize:m},children:o!=null&&o.first_name||o!=null&&o.last_name?((o==null?void 0:o.first_name)||" ")[0]+((o==null?void 0:o.last_name)||" ")[0]:((o==null?void 0:o.email)||" ")[0]}):g.jsx(Pe,{style:{maxWidth:p,maxHeight:p,minWidth:p,minHeight:p},icon:m4,className:"w-full text-white"}),C=()=>{S(!0)},I=v();return g.jsxs("div",{className:"flex items-center justify-center rounded-full overflow-hidden h-full relative "+a,style:{maxWidth:h,maxHeight:h,minWidth:h,minHeight:h,backgroundColor:b()},...c,children:[I&&!x&&g.jsx("img",{src:I,alt:r,className:`
|
|
725
725
|
object-cover w-full h-full text-center indent-[10000px] absolute
|
|
726
726
|
z-10
|
|
727
727
|
${u}
|