lawgic-dev-kit 0.22.16 → 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.
@@ -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.
@@ -667,7 +667,7 @@ function print() { __p += __j.call(arguments, '') }
667
667
  */const zD={prefix:"fas",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]},GD={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},YD={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},HD={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},qD={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},wb={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]};function Xa(){return typeof window<"u"}function ui(e){return Sb(e)?(e.nodeName||"").toLowerCase():"#document"}function zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kn(e){var t;return(t=(Sb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sb(e){return Xa()?e instanceof Node||e instanceof zt(e).Node:!1}function it(e){return Xa()?e instanceof Element||e instanceof zt(e).Element:!1}function Gt(e){return Xa()?e instanceof HTMLElement||e instanceof zt(e).HTMLElement:!1}function Ad(e){return!Xa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof zt(e).ShadowRoot}function _o(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=on(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function KD(e){return["table","td","th"].includes(ui(e))}function Za(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Md(e){const t=Ja(),n=it(e)?on(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function XD(e){let t=Jn(e);for(;Gt(t)&&!Zn(t);){if(Md(t))return t;if(Za(t))return null;t=Jn(t)}return null}function Ja(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Zn(e){return["html","body","#document"].includes(ui(e))}function on(e){return zt(e).getComputedStyle(e)}function Qa(e){return it(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jn(e){if(ui(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ad(e)&&e.host||kn(e);return Ad(t)?t.host:t}function Tb(e){const t=Jn(e);return Zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&_o(t)?t:Tb(t)}function kr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Tb(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=zt(s);if(o){const c=Od(a);return t.concat(a,a.visualViewport||[],_o(s)?s:[],c&&n?kr(c):[])}return t.concat(s,kr(s,[],n))}function Od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ad(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Eb(e,t){return["mouse","pen"].includes(e)}function ZD(e){return"nativeEvent"in e}function JD(e){return e.matches("html,body")}function Pb(e){return(e==null?void 0:e.ownerDocument)||document}function $d(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Io(e){return"composedPath"in e?e.composedPath()[0]:e.target}const QD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function e6(e){return Gt(e)&&e.matches(QD)}const jr=Math.min,Yt=Math.max,el=Math.round,tl=Math.floor,jn=e=>({x:e,y:e}),t6={left:"right",right:"left",bottom:"top",top:"bottom"},n6={start:"end",end:"start"};function _d(e,t,n){return Yt(e,jr(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function Lr(e){return e.split("-")[0]}function di(e){return e.split("-")[1]}function Ab(e){return e==="x"?"y":"x"}function Id(e){return e==="y"?"height":"width"}function hs(e){return["top","bottom"].includes(Lr(e))?"y":"x"}function Dd(e){return Ab(hs(e))}function r6(e,t,n){n===void 0&&(n=!1);const r=di(e),s=Dd(e),o=Id(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=nl(a)),[a,nl(a)]}function s6(e){const t=nl(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.replace(/start|end/g,t=>n6[t])}function i6(e,t,n){const r=["left","right"],s=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?o:a;default:return[]}}function o6(e,t,n,r){const s=di(e);let o=i6(Lr(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map(Nd)))),o}function nl(e){return e.replace(/left|right|bottom|top/g,t=>t6[t])}function a6(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mb(e){return typeof e!="number"?a6(e):{top:e,right:e,bottom:e,left:e}}function rl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Ob(e,t,n){let{reference:r,floating:s}=e;const o=hs(t),a=Dd(t),c=Id(a),u=Lr(t),d=o==="y",h=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,m=r[c]/2-s[c]/2;let x;switch(u){case"top":x={x:h,y:r.y-s.height};break;case"bottom":x={x:h,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:p};break;case"left":x={x:r.x-s.width,y:p};break;default:x={x:r.x,y:r.y}}switch(di(t)){case"start":x[a]-=m*(n&&d?-1:1);break;case"end":x[a]+=m*(n&&d?-1:1);break}return x}const l6=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,c=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:p}=Ob(d,r,u),m=r,x={},S=0;for(let b=0;b<c.length;b++){const{name:T,fn:v}=c[b],{x:A,y:C,data:I,reset:P}=await v({x:h,y:p,initialPlacement:r,placement:m,strategy:s,middlewareData:x,rects:d,platform:a,elements:{reference:e,floating:t}});h=A??h,p=C??p,x={...x,[T]:{...x[T],...I}},P&&S<=50&&(S++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(d=P.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):P.rects),{x:h,y:p}=Ob(d,m,u)),b=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:x}};async function kd(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:x=0}=fi(t,e),S=Mb(x),T=c[m?p==="floating"?"reference":"floating":p],v=rl(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(T)))==null||n?T:T.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:u})),A=p==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),I=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},P=rl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:A,offsetParent:C,strategy:u}):A);return{top:(v.top-P.top+S.top)/I.y,bottom:(P.bottom-v.bottom+S.bottom)/I.y,left:(v.left-P.left+S.left)/I.x,right:(P.right-v.right+S.right)/I.x}}const c6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:c,middlewareData:u}=t,{element:d,padding:h=0}=fi(e,t)||{};if(d==null)return{};const p=Mb(h),m={x:n,y:r},x=Dd(s),S=Id(x),b=await a.getDimensions(d),T=x==="y",v=T?"top":"left",A=T?"bottom":"right",C=T?"clientHeight":"clientWidth",I=o.reference[S]+o.reference[x]-m[x]-o.floating[S],P=m[x]-o.reference[x],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let R=D?D[C]:0;(!R||!await(a.isElement==null?void 0:a.isElement(D)))&&(R=c.floating[C]||o.floating[S]);const F=I/2-P/2,W=R/2-b[S]/2-1,Q=jr(p[v],W),ee=jr(p[A],W),ae=Q,ge=R-b[S]-ee,de=R/2-b[S]/2+F,le=_d(ae,de,ge),ue=!u.arrow&&di(s)!=null&&de!==le&&o.reference[S]/2-(de<ae?Q:ee)-b[S]/2<0,Y=ue?de<ae?de-ae:de-ge:0;return{[x]:m[x]+Y,data:{[x]:le,centerOffset:de-le-Y,...ue&&{alignmentOffset:Y}},reset:ue}}}),u6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:b=!0,...T}=fi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=Lr(s),A=hs(c),C=Lr(c)===c,I=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=m||(C||!b?[nl(c)]:s6(c)),D=S!=="none";!m&&D&&P.push(...o6(c,b,S,I));const R=[c,...P],F=await kd(t,T),W=[];let Q=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&W.push(F[v]),p){const de=r6(s,a,I);W.push(F[de[0]],F[de[1]])}if(Q=[...Q,{placement:s,overflows:W}],!W.every(de=>de<=0)){var ee,ae;const de=(((ee=o.flip)==null?void 0:ee.index)||0)+1,le=R[de];if(le)return{data:{index:de,overflows:Q},reset:{placement:le}};let ue=(ae=Q.filter(Y=>Y.overflows[0]<=0).sort((Y,z)=>Y.overflows[1]-z.overflows[1])[0])==null?void 0:ae.placement;if(!ue)switch(x){case"bestFit":{var ge;const Y=(ge=Q.filter(z=>{if(D){const K=hs(z.placement);return K===A||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,$)=>K+$,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:ge[0];Y&&(ue=Y);break}case"initialPlacement":ue=c;break}if(s!==ue)return{reset:{placement:ue}}}return{}}}};async function f6(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Lr(n),c=di(n),u=hs(n)==="y",d=["left","top"].includes(a)?-1:1,h=o&&u?-1:1,p=fi(t,e);let{mainAxis:m,crossAxis:x,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof S=="number"&&(x=c==="end"?S*-1:S),u?{x:x*h,y:m*d}:{x:m*d,y:x*h}}const d6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:c}=t,u=await f6(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+u.x,y:o+u.y,data:{...u,placement:a}}}}},h6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:T=>{let{x:v,y:A}=T;return{x:v,y:A}}},...u}=fi(e,t),d={x:n,y:r},h=await kd(t,u),p=hs(Lr(s)),m=Ab(p);let x=d[m],S=d[p];if(o){const T=m==="y"?"top":"left",v=m==="y"?"bottom":"right",A=x+h[T],C=x-h[v];x=_d(A,x,C)}if(a){const T=p==="y"?"top":"left",v=p==="y"?"bottom":"right",A=S+h[T],C=S-h[v];S=_d(A,S,C)}const b=c.fn({...t,[m]:x,[p]:S});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:o,[p]:a}}}}}},p6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:c}=t,{apply:u=()=>{},...d}=fi(e,t),h=await kd(t,d),p=Lr(s),m=di(s),x=hs(s)==="y",{width:S,height:b}=o.floating;let T,v;p==="top"||p==="bottom"?(T=p,v=m===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(v=p,T=m==="end"?"top":"bottom");const A=b-h.top-h.bottom,C=S-h.left-h.right,I=jr(b-h[T],A),P=jr(S-h[v],C),D=!t.middlewareData.shift;let R=I,F=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(F=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=A),D&&!m){const Q=Yt(h.left,0),ee=Yt(h.right,0),ae=Yt(h.top,0),ge=Yt(h.bottom,0);x?F=S-2*(Q!==0||ee!==0?Q+ee:Yt(h.left,h.right)):R=b-2*(ae!==0||ge!==0?ae+ge:Yt(h.top,h.bottom))}await u({...t,availableWidth:F,availableHeight:R});const W=await a.getDimensions(c.floating);return S!==W.width||b!==W.height?{reset:{rects:!0}}:{}}}};function $b(e){const t=on(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Gt(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,c=el(n)!==o||el(r)!==a;return c&&(n=o,r=a),{width:n,height:r,$:c}}function jd(e){return it(e)?e:e.contextElement}function hi(e){const t=jd(e);if(!Gt(t))return jn(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=$b(t);let a=(o?el(n.width):n.width)/r,c=(o?el(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const m6=jn(0);function _b(e){const t=zt(e);return!Ja()||!t.visualViewport?m6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function g6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==zt(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=jd(e);let a=jn(1);t&&(r?it(r)&&(a=hi(r)):a=hi(e));const c=g6(o,n,r)?_b(o):jn(0);let u=(s.left+c.x)/a.x,d=(s.top+c.y)/a.y,h=s.width/a.x,p=s.height/a.y;if(o){const m=zt(o),x=r&&it(r)?zt(r):r;let S=m,b=Od(S);for(;b&&r&&x!==S;){const T=hi(b),v=b.getBoundingClientRect(),A=on(b),C=v.left+(b.clientLeft+parseFloat(A.paddingLeft))*T.x,I=v.top+(b.clientTop+parseFloat(A.paddingTop))*T.y;u*=T.x,d*=T.y,h*=T.x,p*=T.y,u+=C,d+=I,S=zt(b),b=Od(S)}}return rl({width:h,height:p,x:u,y:d})}function Ld(e,t){const n=Qa(e).scrollLeft;return t?t.left+n:ps(kn(e)).left+n}function Ib(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Ld(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function y6(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=kn(r),c=t?Za(t.floating):!1;if(r===a||c&&o)return n;let u={scrollLeft:0,scrollTop:0},d=jn(1);const h=jn(0),p=Gt(r);if((p||!p&&!o)&&((ui(r)!=="body"||_o(a))&&(u=Qa(r)),Gt(r))){const x=ps(r);d=hi(r),h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}const m=a&&!p&&!o?Ib(a,u,!0):jn(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+h.x+m.x,y:n.y*d.y-u.scrollTop*d.y+h.y+m.y}}function x6(e){return Array.from(e.getClientRects())}function v6(e){const t=kn(e),n=Qa(e),r=e.ownerDocument.body,s=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ld(e);const c=-n.scrollTop;return on(r).direction==="rtl"&&(a+=Yt(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:c}}function b6(e,t){const n=zt(e),r=kn(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,c=0,u=0;if(s){o=s.width,a=s.height;const d=Ja();(!d||d&&t==="fixed")&&(c=s.offsetLeft,u=s.offsetTop)}return{width:o,height:a,x:c,y:u}}function w6(e,t){const n=ps(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=Gt(e)?hi(e):jn(1),a=e.clientWidth*o.x,c=e.clientHeight*o.y,u=s*o.x,d=r*o.y;return{width:a,height:c,x:u,y:d}}function Db(e,t,n){let r;if(t==="viewport")r=b6(e,n);else if(t==="document")r=v6(kn(e));else if(it(t))r=w6(t,n);else{const s=_b(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return rl(r)}function Nb(e,t){const n=Jn(e);return n===t||!it(n)||Zn(n)?!1:on(n).position==="fixed"||Nb(n,t)}function S6(e,t){const n=t.get(e);if(n)return n;let r=kr(e,[],!1).filter(c=>it(c)&&ui(c)!=="body"),s=null;const o=on(e).position==="fixed";let a=o?Jn(e):e;for(;it(a)&&!Zn(a);){const c=on(a),u=Md(a);!u&&c.position==="fixed"&&(s=null),(o?!u&&!s:!u&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||_o(a)&&!u&&Nb(e,a))?r=r.filter(h=>h!==a):s=c,a=Jn(a)}return t.set(e,r),r}function T6(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Za(t)?[]:S6(t,this._c):[].concat(n),r],c=a[0],u=a.reduce((d,h)=>{const p=Db(t,h,s);return d.top=Yt(p.top,d.top),d.right=jr(p.right,d.right),d.bottom=jr(p.bottom,d.bottom),d.left=Yt(p.left,d.left),d},Db(t,c,s));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function C6(e){const{width:t,height:n}=$b(e);return{width:t,height:n}}function E6(e,t,n){const r=Gt(t),s=kn(t),o=n==="fixed",a=ps(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const u=jn(0);if(r||!r&&!o)if((ui(t)!=="body"||_o(s))&&(c=Qa(t)),r){const m=ps(t,!0,o,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else s&&(u.x=Ld(s));const d=s&&!r&&!o?Ib(s,c):jn(0),h=a.left+c.scrollLeft-u.x-d.x,p=a.top+c.scrollTop-u.y-d.y;return{x:h,y:p,width:a.width,height:a.height}}function Rd(e){return on(e).position==="static"}function kb(e,t){if(!Gt(e)||on(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kn(e)===n&&(n=n.ownerDocument.body),n}function jb(e,t){const n=zt(e);if(Za(e))return n;if(!Gt(e)){let s=Jn(e);for(;s&&!Zn(s);){if(it(s)&&!Rd(s))return s;s=Jn(s)}return n}let r=kb(e,t);for(;r&&KD(r)&&Rd(r);)r=kb(r,t);return r&&Zn(r)&&Rd(r)&&!Md(r)?n:r||XD(e)||n}const P6=async function(e){const t=this.getOffsetParent||jb,n=this.getDimensions,r=await n(e.floating);return{reference:E6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function A6(e){return on(e).direction==="rtl"}const M6={convertOffsetParentRelativeRectToViewportRelativeRect:y6,getDocumentElement:kn,getClippingRect:T6,getOffsetParent:jb,getElementRects:P6,getClientRects:x6,getDimensions:C6,getScale:hi,isElement:it,isRTL:A6};function Lb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function O6(e,t){let n=null,r;const s=kn(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),o();const d=e.getBoundingClientRect(),{left:h,top:p,width:m,height:x}=d;if(c||t(),!m||!x)return;const S=tl(p),b=tl(s.clientWidth-(h+m)),T=tl(s.clientHeight-(p+x)),v=tl(h),C={rootMargin:-S+"px "+-b+"px "+-T+"px "+-v+"px",threshold:Yt(0,jr(1,u))||1};let I=!0;function P(D){const R=D[0].intersectionRatio;if(R!==u){if(!I)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Lb(d,e.getBoundingClientRect())&&a(),I=!1}try{n=new IntersectionObserver(P,{...C,root:s.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return a(!0),o}function Qn(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=jd(e),h=s||o?[...d?kr(d):[],...kr(t)]:[];h.forEach(v=>{s&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const p=d&&c?O6(d,n):null;let m=-1,x=null;a&&(x=new ResizeObserver(v=>{let[A]=v;A&&A.target===d&&x&&(x.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=x)==null||C.observe(t)})),n()}),d&&!u&&x.observe(d),x.observe(t));let S,b=u?ps(e):null;u&&T();function T(){const v=ps(e);b&&!Lb(b,v)&&n(),b=v,S=requestAnimationFrame(T)}return n(),()=>{var v;h.forEach(A=>{s&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),p==null||p(),(v=x)==null||v.disconnect(),x=null,u&&cancelAnimationFrame(S)}}const $6=d6,_6=h6,I6=u6,D6=p6,Rb=c6,N6=(e,t,n)=>{const r=new Map,s={platform:M6,...n},o={...s.platform,_c:r};return l6(e,t,{...s,platform:o})};var sl=typeof document<"u"?O.useLayoutEffect:O.useEffect;function il(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!il(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!il(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Fb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vb(e,t){const n=Fb(e);return Math.round(t*n)/n}function Fd(e){const t=he.useRef(e);return sl(()=>{t.current=e}),t}function k6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,p]=he.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,x]=he.useState(r);il(m,r)||x(r);const[S,b]=he.useState(null),[T,v]=he.useState(null),A=he.useCallback(z=>{z!==D.current&&(D.current=z,b(z))},[]),C=he.useCallback(z=>{z!==R.current&&(R.current=z,v(z))},[]),I=o||S,P=a||T,D=he.useRef(null),R=he.useRef(null),F=he.useRef(h),W=u!=null,Q=Fd(u),ee=Fd(s),ae=Fd(d),ge=he.useCallback(()=>{if(!D.current||!R.current)return;const z={placement:t,strategy:n,middleware:m};ee.current&&(z.platform=ee.current),N6(D.current,R.current,z).then(K=>{const $={...K,isPositioned:ae.current!==!1};de.current&&!il(F.current,$)&&(F.current=$,uT.flushSync(()=>{p($)}))})},[m,t,n,ee,ae]);sl(()=>{d===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p(z=>({...z,isPositioned:!1})))},[d]);const de=he.useRef(!1);sl(()=>(de.current=!0,()=>{de.current=!1}),[]),sl(()=>{if(I&&(D.current=I),P&&(R.current=P),I&&P){if(Q.current)return Q.current(I,P,ge);ge()}},[I,P,ge,Q,W]);const le=he.useMemo(()=>({reference:D,floating:R,setReference:A,setFloating:C}),[A,C]),ue=he.useMemo(()=>({reference:I,floating:P}),[I,P]),Y=he.useMemo(()=>{const z={position:n,left:0,top:0};if(!ue.floating)return z;const K=Vb(ue.floating,h.x),$=Vb(ue.floating,h.y);return c?{...z,transform:"translate("+K+"px, "+$+"px)",...Fb(ue.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:$}},[n,c,ue.floating,h.x,h.y]);return he.useMemo(()=>({...h,update:ge,refs:le,elements:ue,floatingStyles:Y}),[h,ge,le,ue,Y])}const j6=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Rb({element:r.current,padding:s}).fn(n):{}:r?Rb({element:r,padding:s}).fn(n):{}}}},er=(e,t)=>({...$6(e),options:[e,t]}),tr=(e,t)=>({..._6(e),options:[e,t]}),nr=(e,t)=>({...I6(e),options:[e,t]}),Rr=(e,t)=>({...D6(e),options:[e,t]}),ms=(e,t)=>({...j6(e),options:[e,t]}),Bb={...he},L6=Bb.useInsertionEffect||(e=>e());function pi(e){const t=he.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return L6(()=>{t.current=e}),he.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}var mi=typeof document<"u"?O.useLayoutEffect:O.useEffect;let Wb=!1,R6=0;const Ub=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+R6++;function F6(){const[e,t]=he.useState(()=>Wb?Ub():void 0);return mi(()=>{e==null&&t(Ub())},[]),he.useEffect(()=>{Wb=!0},[]),e}const V6=Bb.useId||F6;let Vd;process.env.NODE_ENV!=="production"&&(Vd=new Set);function B6(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((e=Vd)!=null&&e.has(s))){var o;(o=Vd)==null||o.add(s),console.error(s)}}function W6(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(s=>s!==n))||[])}}}const U6=he.createContext(null),z6=he.createContext(null),G6=()=>{var e;return((e=he.useContext(U6))==null?void 0:e.id)||null},zb=()=>he.useContext(z6);function Y6(e){return"data-floating-ui-"+e}function ol(e){const t=O.useRef(e);return mi(()=>{t.current=e}),t}function Bd(e,t){let n=e.filter(s=>{var o;return s.parentId===t&&((o=s.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(s=>{var o;return(o=r)==null?void 0:o.some(a=>{var c;return s.parentId===a.id&&((c=s.context)==null?void 0:c.open)})}),n=n.concat(r);return n}const H6="data-floating-ui-focusable";function Gb(e){return Gt(e.target)&&e.target.tagName==="BUTTON"}function Yb(e){return e6(e)}function rr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:o}}=e,{enabled:a=!0,event:c="click",toggle:u=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0,stickIfOpen:p=!0}=t,m=he.useRef(),x=he.useRef(!1),S=he.useMemo(()=>({onPointerDown(b){m.current=b.pointerType},onMouseDown(b){const T=m.current;b.button===0&&c!=="click"&&(Eb(T)&&d||(n&&u&&(!(s.current.openEvent&&p)||s.current.openEvent.type==="mousedown")?r(!1,b.nativeEvent,"click"):(b.preventDefault(),r(!0,b.nativeEvent,"click"))))},onClick(b){const T=m.current;if(c==="mousedown"&&m.current){m.current=void 0;return}Eb(T)&&d||(n&&u&&(!(s.current.openEvent&&p)||s.current.openEvent.type==="click")?r(!1,b.nativeEvent,"click"):r(!0,b.nativeEvent,"click"))},onKeyDown(b){m.current=void 0,!(b.defaultPrevented||!h||Gb(b))&&(b.key===" "&&!Yb(o)&&(b.preventDefault(),x.current=!0),b.key==="Enter"&&r(!(n&&u),b.nativeEvent,"click"))},onKeyUp(b){b.defaultPrevented||!h||Gb(b)||Yb(o)||b.key===" "&&x.current&&(x.current=!1,r(!(n&&u),b.nativeEvent,"click"))}}),[s,o,c,d,h,r,n,p,u]);return he.useMemo(()=>a?{reference:S}:{},[a,S])}const q6={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},K6={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hb=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function sr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:o}=e,{enabled:a=!0,escapeKey:c=!0,outsidePress:u=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:p="pointerdown",ancestorScroll:m=!1,bubbles:x,capture:S}=t,b=zb(),T=pi(typeof u=="function"?u:()=>!1),v=typeof u=="function"?T:u,A=he.useRef(!1),C=he.useRef(!1),{escapeKey:I,outsidePress:P}=Hb(x),{escapeKey:D,outsidePress:R}=Hb(S),F=he.useRef(!1),W=pi(le=>{var ue;if(!n||!a||!c||le.key!=="Escape"||F.current)return;const Y=(ue=o.current.floatingContext)==null?void 0:ue.nodeId,z=b?Bd(b.nodesRef.current,Y):[];if(!I&&(le.stopPropagation(),z.length>0)){let K=!0;if(z.forEach($=>{var k;if((k=$.context)!=null&&k.open&&!$.context.dataRef.current.__escapeKeyBubbles){K=!1;return}}),!K)return}r(!1,ZD(le)?le.nativeEvent:le,"escape-key")}),Q=pi(le=>{var ue;const Y=()=>{var z;W(le),(z=Io(le))==null||z.removeEventListener("keydown",Y)};(ue=Io(le))==null||ue.addEventListener("keydown",Y)}),ee=pi(le=>{var ue;const Y=A.current;A.current=!1;const z=C.current;if(C.current=!1,d==="click"&&z||Y||typeof v=="function"&&!v(le))return;const K=Io(le),$="["+Y6("inert")+"]",k=Pb(s.floating).querySelectorAll($);let X=it(K)?K:null;for(;X&&!Zn(X);){const J=Jn(X);if(Zn(J)||!it(J))break;X=J}if(k.length&&it(K)&&!JD(K)&&!Cb(K,s.floating)&&Array.from(k).every(J=>!Cb(X,J)))return;if(Gt(K)&&de){const J=Zn(K),oe=on(K),se=/auto|scroll/,fe=J||se.test(oe.overflowX),Ee=J||se.test(oe.overflowY),Ve=fe&&K.clientWidth>0&&K.scrollWidth>K.clientWidth,ie=Ee&&K.clientHeight>0&&K.scrollHeight>K.clientHeight,me=oe.direction==="rtl",De=ie&&(me?le.offsetX<=K.offsetWidth-K.clientWidth:le.offsetX>K.clientWidth),ft=Ve&&le.offsetY>K.clientHeight;if(De||ft)return}const U=(ue=o.current.floatingContext)==null?void 0:ue.nodeId,re=b&&Bd(b.nodesRef.current,U).some(J=>{var oe;return $d(le,(oe=J.context)==null?void 0:oe.elements.floating)});if($d(le,s.floating)||$d(le,s.domReference)||re)return;const B=b?Bd(b.nodesRef.current,U):[];if(B.length>0){let J=!0;if(B.forEach(oe=>{var se;if((se=oe.context)!=null&&se.open&&!oe.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,le,"outside-press")}),ae=pi(le=>{var ue;const Y=()=>{var z;ee(le),(z=Io(le))==null||z.removeEventListener(d,Y)};(ue=Io(le))==null||ue.addEventListener(d,Y)});he.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=I,o.current.__outsidePressBubbles=P;let le=-1;function ue(k){r(!1,k,"ancestor-scroll")}function Y(){window.clearTimeout(le),F.current=!0}function z(){le=window.setTimeout(()=>{F.current=!1},Ja()?5:0)}const K=Pb(s.floating);c&&(K.addEventListener("keydown",D?Q:W,D),K.addEventListener("compositionstart",Y),K.addEventListener("compositionend",z)),v&&K.addEventListener(d,R?ae:ee,R);let $=[];return m&&(it(s.domReference)&&($=kr(s.domReference)),it(s.floating)&&($=$.concat(kr(s.floating))),!it(s.reference)&&s.reference&&s.reference.contextElement&&($=$.concat(kr(s.reference.contextElement)))),$=$.filter(k=>{var X;return k!==((X=K.defaultView)==null?void 0:X.visualViewport)}),$.forEach(k=>{k.addEventListener("scroll",ue,{passive:!0})}),()=>{c&&(K.removeEventListener("keydown",D?Q:W,D),K.removeEventListener("compositionstart",Y),K.removeEventListener("compositionend",z)),v&&K.removeEventListener(d,R?ae:ee,R),$.forEach(k=>{k.removeEventListener("scroll",ue)}),window.clearTimeout(le)}},[o,s,c,v,d,n,r,m,a,I,P,W,D,Q,ee,R,ae]),he.useEffect(()=>{A.current=!1},[v,d]);const ge=he.useMemo(()=>({onKeyDown:W,...h&&{[q6[p]]:le=>{r(!1,le.nativeEvent,"reference-press")},...p!=="click"&&{onClick(le){r(!1,le.nativeEvent,"reference-press")}}}}),[W,r,h,p]),de=he.useMemo(()=>({onKeyDown:W,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[K6[d]]:()=>{A.current=!0}}),[W,d]);return he.useMemo(()=>a?{reference:ge,floating:de}:{},[a,ge,de])}function X6(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=V6(),o=he.useRef({}),[a]=he.useState(()=>W6()),c=G6()!=null;if(process.env.NODE_ENV!=="production"){const x=r.reference;x&&!it(x)&&B6("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[u,d]=he.useState(r.reference),h=pi((x,S,b)=>{o.current.openEvent=x?S:void 0,a.emit("openchange",{open:x,event:S,reason:b,nested:c}),n==null||n(x,S,b)}),p=he.useMemo(()=>({setPositionReference:d}),[]),m=he.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return he.useMemo(()=>({dataRef:o,open:t,onOpenChange:h,elements:m,events:a,floatingId:s,refs:p}),[t,h,m,a,s,p])}function ir(e){e===void 0&&(e={});const{nodeId:t}=e,n=X6({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[o,a]=he.useState(null),[c,u]=he.useState(null),h=(s==null?void 0:s.domReference)||o,p=he.useRef(null),m=zb();mi(()=>{h&&(p.current=h)},[h]);const x=k6({...e,elements:{...s,...c&&{reference:c}}}),S=he.useCallback(C=>{const I=it(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;u(I),x.refs.setReference(I)},[x.refs]),b=he.useCallback(C=>{(it(C)||C===null)&&(p.current=C,a(C)),(it(x.refs.reference.current)||x.refs.reference.current===null||C!==null&&!it(C))&&x.refs.setReference(C)},[x.refs]),T=he.useMemo(()=>({...x.refs,setReference:b,setPositionReference:S,domReference:p}),[x.refs,b,S]),v=he.useMemo(()=>({...x.elements,domReference:h}),[x.elements,h]),A=he.useMemo(()=>({...x,...r,refs:T,elements:v,nodeId:t}),[x,T,v,t,r]);return mi(()=>{r.dataRef.current.floatingContext=A;const C=m==null?void 0:m.nodesRef.current.find(I=>I.id===t);C&&(C.context=A)}),he.useMemo(()=>({...x,context:A,refs:T,elements:v}),[x,T,v,A])}const qb="active",Kb="selected";function Wd(e,t,n){const r=new Map,s=n==="item";let o=e;if(s&&e){const{[qb]:a,[Kb]:c,...u}=e;o=u}return{...n==="floating"&&{tabIndex:-1,[H6]:""},...o,...t.map(a=>{const c=a?a[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((a,c)=>(c&&Object.entries(c).forEach(u=>{let[d,h]=u;if(!(s&&[qb,Kb].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var p;(p=r.get(d))==null||p.push(h),a[d]=function(){for(var m,x=arguments.length,S=new Array(x),b=0;b<x;b++)S[b]=arguments[b];return(m=r.get(d))==null?void 0:m.map(T=>T(...S)).find(T=>T!==void 0)}}}else a[d]=h}),a),{})}}function or(e){e===void 0&&(e=[]);const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),r=e.map(c=>c==null?void 0:c.item),s=he.useCallback(c=>Wd(c,e,"reference"),t),o=he.useCallback(c=>Wd(c,e,"floating"),n),a=he.useCallback(c=>Wd(c,e,"item"),r);return he.useMemo(()=>({getReferenceProps:s,getFloatingProps:o,getItemProps:a}),[s,o,a])}const Xb=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function gi(e,t){return typeof e=="function"?e(t):e}function Z6(e,t){const[n,r]=he.useState(e);return e&&!n&&r(!0),he.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function J6(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,a=(typeof s=="number"?s:s.close)||0,[c,u]=he.useState("unmounted"),d=Z6(n,a);return!d&&c==="close"&&u("unmounted"),mi(()=>{if(r){if(n){u("initial");const h=requestAnimationFrame(()=>{u("open")});return()=>{cancelAnimationFrame(h)}}u("close")}},[n,r]),{isMounted:d,status:c}}function ar(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:o,duration:a=250}=t,c=e.placement,u=c.split("-")[0],d=he.useMemo(()=>({side:u,placement:c}),[u,c]),h=typeof a=="number",p=(h?a:a.open)||0,m=(h?a:a.close)||0,[x,S]=he.useState(()=>({...gi(o,d),...gi(n,d)})),{isMounted:b,status:T}=J6(e,{duration:a}),v=ol(n),A=ol(r),C=ol(s),I=ol(o);return mi(()=>{const P=gi(v.current,d),D=gi(C.current,d),R=gi(I.current,d),F=gi(A.current,d)||Object.keys(P).reduce((W,Q)=>(W[Q]="",W),{});if(T==="initial"&&S(W=>({transitionProperty:W.transitionProperty,...R,...P})),T==="open"&&S({transitionProperty:Object.keys(F).map(Xb).join(","),transitionDuration:p+"ms",...R,...F}),T==="close"){const W=D||P;S({transitionProperty:Object.keys(W).map(Xb).join(","),transitionDuration:m+"ms",...R,...W})}},[m,C,v,A,I,p,T,d]),{isMounted:b,styles:x}}const gs=({open:e,onClose:t,component:n,children:r,placement:s="bottom",className:o="",strategy:a="absolute",styles:c={},offset:u=8,padding:d=8,handleClickAway:h=!0})=>{const[p,m]=O.useState(e);O.useEffect(()=>{m(e)},[e]);const x=()=>{m(!1),t==null||t()},{x:S,y:b,strategy:T,refs:v,context:A}=ir({strategy:a,open:p,onOpenChange:W=>{!W&&!e&&x()},middleware:[er(u),nr(),tr({padding:d})],whileElementsMounted:Qn,placement:s}),C=rr(A,{enabled:!1}),I=sr(A,{enabled:!1}),{getReferenceProps:P,getFloatingProps:D}=or([C,I]),{isMounted:R,styles:F}=ar(A,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px) scale(0.95)"}});return g.jsx(D2,{enabled:h,onClickAway:()=>{p&&x()},children:g.jsxs("div",{className:"relative",children:[g.jsx("div",{ref:v.setReference,...P(),className:"reference-element",children:r}),R&&g.jsx("div",{ref:v.setFloating,style:{position:T,top:b??0,left:S??0,...F,zIndex:999,...c},...D(),className:"floating-element w-max",children:g.jsx(yi,{className:`p-16! rounded-[16px]! shadow-floating ${o}`,children:typeof n=="function"?O.createElement(n):n})})]})})},Q6=({selectedPeriod:e,handlePeriodChange:t,colorVariants:n})=>{const r={initial:{backgroundColor:"#ffffff",color:"#57595f"},active:{backgroundColor:(n==null?void 0:n.hoverLight)||"#dee7fc",color:(n==null?void 0:n.text)||"#111827"},exit:{backgroundColor:"#ffffff",color:"#57595f"}};return g.jsxs("div",{className:"flex rounded-xl p-6 gap-2 border",style:{borderColor:(n==null?void 0:n.hoverLight)||"#dbeafe"},children:[g.jsx(st.button,{variants:r,initial:"initial",animate:e==="AM"?"active":"initial",exit:"exit",transition:{duration:.2},onClick:()=>t("AM"),disabled:e==="AM",className:"flex items-center justify-center font-500 px-10 py-2 rounded-lg",children:"AM"}),g.jsx(st.button,{variants:r,initial:"initial",animate:e==="PM"?"active":"initial",exit:"exit",transition:{duration:.2},onClick:()=>t("PM"),disabled:e==="PM",className:"flex items-center justify-center font-500 px-10 py-2 rounded-lg",children:"PM"})]})},eN=({setHourMenuOpen:e,hourMenuOpen:t,selectedHour:n})=>g.jsx("button",{onClick:()=>e(!t),className:"flex justify-center items-center w-72 h-full border py-8 px-14 rounded-xl border-blue-100 text-gray-600 font-500",children:`${String(n).padStart(2,"0")}:00`}),tN={primary:"#375ABC",primaryLight:"#8FA9F3",primaryDark:"#29438D",hover:"#4570EB",hoverLight:"#ECF1FD",text:"#375ABC",textLight:"#FFFFFF"},nN={primary:"#06B6D4",primaryLight:"#67E8F9",primaryDark:"#0891B2",hover:"#0891B2",hoverLight:"#CFFAFE",text:"#06B6D4",textLight:"#FFFFFF"},rN=e=>({blue:tN,aqua:nN})[e],Ud=({date:e,onDateChange:t,showTimeSelector:n=!0,minDate:r,maxDate:s,futureDates:o=!1,pastDates:a=!0,color:c="blue"})=>{const[u,d]=O.useState(e),[h,p]=O.useState(e),[m,x]=O.useState(e.getHours()%12||12),[S,b]=O.useState(e.getHours()>=12?"PM":"AM"),[T,v]=O.useState(0),{t:A}=Ue(),C=rN(c),[I,P]=O.useState(!1),[D,R]=O.useState(!1);O.useEffect(()=>{d(e),p(e),x(e.getHours()%12||12),b(e.getHours()>=12?"PM":"AM")},[e]);const F=()=>{v(-1),setTimeout(()=>{const z=A$(u);(!r||z>=r)&&d(z)},10)},W=()=>{v(1),setTimeout(()=>{d(ix(u,1))},10)},Q=z=>{if(s&&z>s||r&&z<r)return;const K=yx(xx(vx(z,0),0),S==="AM"?m%12:m%12+12);p(K),t(K)},ee=z=>{x(z);const K=yx(xx(vx(h,0),0),S==="AM"?z%12:z%12+12);p(K),t(K),P(!1)},ae=z=>{b(z)},ge=()=>{const z=new Date,K=20,$=5,[k,X]=O.useState(()=>Array.from({length:K+1},(J,oe)=>{const se=new Date(z.getFullYear(),z.getMonth()-oe,1);return{name:_n(se,"MMMM",{locale:Js}).replace(/^./,fe=>fe.toUpperCase()),index:se.getMonth(),year:se.getFullYear(),displayName:`${_n(se,"MMMM",{locale:Js}).replace(/^./,fe=>fe.toUpperCase())} ${se.getFullYear()}`}})),U=O.useRef(null),re=O.useRef(null);O.useEffect(()=>{U.current&&U.current.disconnect(),U.current=new IntersectionObserver(J=>{J[0].isIntersecting&&X(oe=>{const se=oe[oe.length-1],fe=new Date(se.year,se.index-1,1),Ee=Array.from({length:$},(Ve,ie)=>{const me=new Date(fe.getFullYear(),fe.getMonth()-ie,1);return{name:_n(me,"MMMM",{locale:Js}).replace(/^./,De=>De.toUpperCase()),index:me.getMonth(),year:me.getFullYear(),displayName:`${_n(me,"MMMM",{locale:Js}).replace(/^./,De=>De.toUpperCase())} ${me.getFullYear()}`}});return[...oe,...Ee]})}),re.current&&U.current.observe(re.current)},[k]);const B=(J,oe)=>{const se=new Date(u);se.setMonth(J),se.setFullYear(oe),(!r||se>=r)&&d(se),R(!1)};return g.jsx("div",{className:"flex flex-col p-8 max-h-200 overflow-y-auto bg-light gap-4",children:k.map((J,oe)=>{const se=oe===k.length-1;return g.jsx("button",{ref:se?re:null,onClick:()=>B(J.index,J.year),className:"text-start p-6 font-600 transition-all duration-100 rounded-lg",style:{backgroundColor:u.getMonth()===J.index&&u.getFullYear()===J.year?C.hoverLight:"transparent",color:u.getMonth()===J.index&&u.getFullYear()===J.year?C.text:"inherit"},onMouseEnter:fe=>{u.getMonth()===J.index&&u.getFullYear()===J.year||(fe.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:fe=>{u.getMonth()===J.index&&u.getFullYear()===J.year||(fe.currentTarget.style.backgroundColor="transparent")},children:J.displayName},`${J.name}-${J.year}-${oe}`)})})},de=()=>g.jsxs("div",{className:"flex justify-between items-center mb-8",children:[g.jsx(gs,{open:D,onClose:()=>R(!1),component:ge,placement:"bottom",className:"!p-0 overflow-hidden bg-light",strategy:"fixed",children:g.jsxs("button",{onClick:()=>R(!D),className:"transition-colors duration-150 flex gap-6 items-center !text-black",children:[g.jsx("h4",{className:"text-header-4",children:_n(u,"MMMM yyyy",{locale:Js}).replace(/^./,z=>z.toUpperCase())}),g.jsx(Pe,{icon:r0,className:"w-12 h-12"})]})}),g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx(sh,{variant:"transparent",color:c,icon:qD,onClick:F}),g.jsx(sh,{variant:"transparent",color:c,icon:g4,onClick:W})]})]}),le=()=>{const z=Ks(M4(u)),K=$4(E4(u)),$=A4({start:z,end:K}),k=new Date;return k.setHours(0,0,0,0),g.jsx("div",{className:"grid grid-cols-7 gap-2",children:$.map((X,U)=>{const re=lx(X,h),B=E$(X,u),J=P$(X),oe=X<k,se=X>k,fe=!B||oe&&!a||se&&!o||r&&X<r||s&&X>s;return g.jsx(st.div,{className:`
668
668
  p-2 text-center w-[40px] h-[40px] rounded-full flex items-center justify-center font-600 select-none
669
669
  ${fe?"text-gray-400 pointer-events-none":"cursor-pointer"}
670
- `,onClick:()=>!fe&&Q(X),initial:!1,animate:{backgroundColor:re?C.primaryLight:"transparent",color:re?C.textLight:J?C.text:fe?"#9CA3AF":"#000000"},transition:{duration:.2,ease:"easeInOut",backgroundColor:{duration:.2,ease:"easeOut"}},whileHover:!fe&&!re?{backgroundColor:C.hoverLight}:{},whileTap:fe?{}:{backgroundColor:re?C.primaryDark:C.hoverLight},children:_n(X,"d")},U)})})},ue=()=>{const z=Array.from({length:12},($,k)=>k+1),K=()=>g.jsx("div",{className:"bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4",children:z.map($=>g.jsxs("button",{onClick:()=>ee($),className:"w-full text-center py-2 transition-all duration-100 rounded-lg",style:{backgroundColor:$===m?C.hoverLight:"transparent",color:$===m?C.text:"inherit",fontWeight:$===m?"500":"normal"},onMouseEnter:k=>{$!==m&&(k.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:k=>{$!==m&&(k.currentTarget.style.backgroundColor="transparent")},children:[String($).padStart(2,"0"),":00"]},$))});return g.jsxs("div",{className:"flex justify-between items-center mt-4 mb-4",children:[g.jsx("h4",{className:"text-body-m font-medium",children:A("time")}),g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsx(gs,{open:I,onClose:()=>P(!1),component:K,placement:"bottom",className:"!p-0 overflow-hidden",strategy:"fixed",children:g.jsx(eN,{setHourMenuOpen:P,hourMenuOpen:I,selectedHour:m})}),g.jsx(Q6,{selectedPeriod:S,handlePeriodChange:ae,colorVariants:C})]})]})},Y={slideNextEnter:{x:300,opacity:0},slidePrevEnter:{x:-300,opacity:0},center:{x:0,opacity:1,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slideNextExit:{x:-300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slidePrevExit:{x:300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}}};return g.jsxs("div",{className:"rounded-3xl max-w-[300px] mx-auto bg-white p-24 relative overflow-hidden",children:[de(),g.jsx(qn,{initial:!1,mode:"popLayout",children:g.jsx(st.div,{variants:Y,initial:T===1?"slideNextEnter":T===-1?"slidePrevEnter":!1,animate:"center",exit:T===1?"slideNextExit":"slidePrevExit",className:"w-full",children:le()},_n(u,"yyyy-MM"))}),n&&ue()]})},al=({label:e,onChange:t,value:n,name:r,error:s,placeholder:o,className:a="",disabled:c=!1,disabledInput:u=!1,size:d="md",leftSide:h,rightSide:p,...m})=>{const{t:x}=Ue(),b={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-14",gap:"gap-8"}}[d];return g.jsxs("label",{className:`flex flex-col group select-none ${b.gap} ${c&&"cursor-not-allowed"} ${a}`,htmlFor:r,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s&&"!text-red-500"} ${b.label} ${c&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:r,className:`
670
+ `,onClick:()=>!fe&&Q(X),initial:!1,animate:{backgroundColor:re?C.primaryLight:"transparent",color:re?C.textLight:J?C.text:fe?"#9CA3AF":"#000000"},transition:{duration:.2,ease:"easeInOut",backgroundColor:{duration:.2,ease:"easeOut"}},whileHover:!fe&&!re?{backgroundColor:C.hoverLight}:{},whileTap:fe?{}:{backgroundColor:re?C.primaryDark:C.hoverLight},children:_n(X,"d")},U)})})},ue=()=>{const z=Array.from({length:12},($,k)=>k+1),K=()=>g.jsx("div",{className:"bg-white rounded-lg shadow-lg w-80 max-h-[150px] overflow-y-auto p-4 flex flex-col gap-4",children:z.map($=>g.jsxs("button",{onClick:()=>ee($),className:"w-full text-center py-2 transition-all duration-100 rounded-lg",style:{backgroundColor:$===m?C.hoverLight:"transparent",color:$===m?C.text:"inherit",fontWeight:$===m?"500":"normal"},onMouseEnter:k=>{$!==m&&(k.currentTarget.style.backgroundColor="#F3F4F6")},onMouseLeave:k=>{$!==m&&(k.currentTarget.style.backgroundColor="transparent")},children:[String($).padStart(2,"0"),":00"]},$))});return g.jsxs("div",{className:"flex justify-between items-center mt-4 mb-4",children:[g.jsx("h4",{className:"text-body-m font-medium",children:A("time")}),g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsx(gs,{open:I,onClose:()=>P(!1),component:K,placement:"bottom",className:"!p-0 overflow-hidden",strategy:"fixed",children:g.jsx(eN,{setHourMenuOpen:P,hourMenuOpen:I,selectedHour:m})}),g.jsx(Q6,{selectedPeriod:S,handlePeriodChange:ae,colorVariants:C})]})]})},Y={slideNextEnter:{x:300,opacity:0},slidePrevEnter:{x:-300,opacity:0},center:{x:0,opacity:1,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slideNextExit:{x:-300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}},slidePrevExit:{x:300,opacity:0,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}}}};return g.jsxs("div",{className:"rounded-3xl max-w-[300px] mx-auto bg-white p-24 relative overflow-hidden",children:[de(),g.jsx(qn,{initial:!1,mode:"popLayout",children:g.jsx(st.div,{variants:Y,initial:T===1?"slideNextEnter":T===-1?"slidePrevEnter":!1,animate:"center",exit:T===1?"slideNextExit":"slidePrevExit",className:"w-full",children:le()},_n(u,"yyyy-MM"))}),n&&ue()]})},al=({label:e,onChange:t,value:n,name:r,error:s,placeholder:o,className:a="",disabled:c=!1,disabledInput:u=!1,size:d="md",leftSide:h,rightSide:p,...m})=>{const{t:x}=Ue(),b={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-14",gap:"gap-8"}}[d];return g.jsxs("label",{className:`flex flex-col group select-none ${b.gap} ${c&&"cursor-not-allowed"} ${a}`,htmlFor:r,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s&&"!text-red-500"} ${b.label} ${c&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:r,className:`
671
671
  flex items-center justify-between gap-8 bg-light
672
672
  ${b.container} ${s&&"!border-red-500"} rounded-full border
673
673
  ${n&&!c?"border-blue-200":"border-blue-100"}
@@ -711,17 +711,17 @@ function print() { __p += __j.call(arguments, '') }
711
711
  `,...re,children:[A&&A,g.jsx("input",{ref:R,id:e,name:e,disabled:p,placeholder:d,value:n,onClick:()=>{S&&!P&&!p&&D(!0)},onChange:B=>k(B.target.value),onKeyDown:B=>{o&&o(B),B.key==="Enter"&&(B.preventDefault(),K.length>0&&$(K[0])),B.key==="Escape"&&D(!1)},className:`group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${p&&"pointer-events-none !select-none !caret-transparent"}`}),C&&!b?C:b&&g.jsx(Pe,{icon:NE,className:`text-xl text-gray-500 cursor-pointer ${P&&"rotate-180"} transition-transform duration-150 ease-in-out`,onClick:X})]}),T&&g.jsx(ys,{variant:"filled",size:"lg",onClick:c,className:"h-[55px]!",children:x})]}),t&&g.jsx("h4",{className:"font-500 text-label text-red-500 leading-none",children:I(t,{x:I(e)})}),Y&&g.jsx("div",{ref:ee.setFloating,style:{position:Q,top:W??0,left:F??0,...z,width:ee.reference.current instanceof Element?ee.reference.current.clientWidth:void 0,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...ue(),children:g.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:K.length>0?g.jsx("ul",{className:"py-4",children:K.map((B,J)=>g.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer ${n===B.label?"bg-blue-100/30 text-blue-500 font-medium":""}`,onClick:oe=>{oe.stopPropagation(),$(B)},children:g.jsx("span",{children:I(B.label)})},`${B.label}-${J}`))}):n&&(n==null?void 0:n.length)>0?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 "',n,'"']})]}):null})})]})},Yd=({label:e,onClick:t,onRemove:n,readOnly:r})=>g.jsxs("div",{className:"flex justify-between items-center gap-10 bg-[#DEE6F7] rounded-[4px] p-8 text-14",onClick:t,children:[g.jsx("span",{className:"text-blue-500 font-semibold text-nowrap text-ellipsis overflow-hidden",children:e}),!r&&n&&g.jsx("button",{onClick:s=>{n(),s.stopPropagation()},className:"flex items-center text-blue-300 hover:text-red-500",children:g.jsx(Pe,{icon:i0})})]}),MN=({values:e,onPillRemove:t})=>{const[n,r]=O.useState(!1),s=e.slice(0,3),o=e.slice(3);return g.jsxs("div",{className:"flex justify-between items-start gap-20",children:[g.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.map(a=>g.jsx(Yd,{label:a.label,onRemove:()=>t(a.value)},a.value)),g.jsx(qn,{children:n&&o.map(a=>g.jsx(st.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},children:g.jsx(Yd,{label:a.label,onRemove:()=>t(a.value)})},a.value))})]}),o.length>0&&g.jsx("button",{type:"button",onClick:()=>r(!n),className:"flex items-center gap-8 w-fit text-blue-500 font-semibold text-14 transition hover:text-blue-700 text-nowrap shrink-0",children:n?g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Ocultar"})," ",g.jsx(Pe,{icon:l5})]}):g.jsxs(g.Fragment,{children:[g.jsxs("p",{children:["Ver ",o.length," más"]})," ",g.jsx(Pe,{icon:h5})]})})]})},ON=({open:e,onClose:t,children:n,side:r="right",className:s="",backdropClassName:o="",width:a="650px",zIndex:c=9999,usePortal:u=!0})=>{O.useEffect(()=>{const m=x=>{x.key==="Escape"&&e&&t()};return e&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[e,t]);const d={initial:{x:r==="right"?"100%":"-100%"},animate:{x:0,transition:{type:"spring",stiffness:300,damping:30,opacity:{duration:.2}}},exit:{x:r==="right"?"100%":"-100%",transition:{type:"spring",stiffness:300,damping:30,opacity:{duration:.15}}}},h={initial:{opacity:0},animate:{opacity:1,transition:{duration:.2}},exit:{opacity:0,transition:{duration:.15}}},p=g.jsx(qn,{children:e&&g.jsxs("div",{className:"fixed inset-0 flex",style:{zIndex:c},children:[g.jsx(st.div,{variants:h,initial:"initial",animate:"animate",exit:"exit",className:`absolute inset-0 bg-black/50 backdrop-blur-[0.60px] ${o}`,onClick:m=>{m.preventDefault(),m.stopPropagation(),t()}}),g.jsx("div",{className:`relative flex w-full pointer-events-none ${r==="left"?"justify-start":"justify-end"}`,children:g.jsx(st.div,{variants:d,initial:"initial",animate:"animate",exit:"exit",className:`
712
712
  relative bg-white shadow-2xl h-full overflow-hidden flex flex-col pointer-events-auto
713
713
  ${s}
714
- `,style:{width:typeof a=="number"?`${a}px`:a},onClick:m=>{m.preventDefault(),m.stopPropagation()},children:n})})]})});return u&&typeof document<"u"&&document.body?Ep.createPortal(p,document.body):p},$N=({filters:e})=>{const[t,n]=O.useState(!1),r=()=>n(!1),s=()=>n(!0);return g.jsx(gs,{open:t,onClose:r,placement:"bottom-start",className:"w-[326px] shadow-md! px-0! text-base! py-12!",component:g.jsxs("div",{className:"relative flex flex-col gap-[10px]",children:[g.jsx("h4",{className:"px-24 text-lg font-semibold text-blue-900",children:"Filtros"}),g.jsx("div",{className:"flex flex-col",children:e.map((o,a)=>g.jsxs("div",{className:"group flex gap-[8px] items-center px-[24px] py-[8px] hover:bg-blue-100 cursor-pointer transition ease-in-out",onClick:o.onClick,children:[g.jsx(Pe,{icon:o.icon,className:"text-[14px] text-gray-600 group-hover:text-blue-500"}),g.jsx("p",{className:"text-[12px] text-gray-500 font-semibold group-hover:text-gray-800",children:o.label})]},a))})]}),children:g.jsx(Pe,{icon:LE,onClick:s,className:"transition text-[16px] ease-in-out duration-150 hover:text-gray-600 cursor-pointer"})})},_N=({label:e,options:t,selectedValues:n,onUpdate:r,placeholder:s="Seleccionar opciones",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md"})=>{var ue;const[d,h]=O.useState(!1),[p,m]=O.useState(""),x=O.useRef(null),S=O.useRef(null),T={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-14",searchIcon:"size-12"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-body-m",searchIcon:"size-16"}}[u],{x:v,y:A,strategy:C,refs:I,context:P}=ir({open:d&&!c,onOpenChange:Y=>!c&&h(Y),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:Y,elements:z}){Object.assign(z.floating.style,{maxHeight:`${Math.min(Y-10,500)}px`})},padding:8}),ms({element:S})],placement:"bottom-start",whileElementsMounted:Qn}),D=rr(P,{enabled:!c}),R=sr(P),{getReferenceProps:F,getFloatingProps:W}=or([D,R]),{isMounted:Q,styles:ee}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ae=O.useCallback((Y,z)=>{if(c)return;let K;z?K=n.includes(Y)?n:[...n,Y]:K=n.filter($=>$!==Y),r(K)},[n,r,c]),ge=t.filter(Y=>Y.label.toLowerCase().includes(p.toLowerCase())),de=()=>{if(n.length===0)return s;const Y=t.filter(z=>n.includes(z.value)).map(z=>z.label);return Y.length===1?Y[0]:`${Y.length} seleccionados`},le=F({onClick:()=>!c&&h(!d)});return g.jsxs("div",{className:`flex flex-col select-none ${T.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${T.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:I.setReference,className:`
714
+ `,style:{width:typeof a=="number"?`${a}px`:a},onClick:m=>{m.preventDefault(),m.stopPropagation()},children:n})})]})});return u&&typeof document<"u"&&document.body?Ep.createPortal(p,document.body):p},$N=({filters:e})=>{const[t,n]=O.useState(!1),r=()=>n(!1),s=()=>n(!0);return g.jsx(gs,{open:t,onClose:r,placement:"bottom-start",className:"w-[326px] shadow-md! px-0! text-base! py-12!",component:g.jsxs("div",{className:"relative flex flex-col gap-[10px]",children:[g.jsx("h4",{className:"px-24 text-lg font-semibold text-blue-900",children:"Filtros"}),g.jsx("div",{className:"flex flex-col",children:e.map((o,a)=>g.jsxs("div",{className:"group flex gap-[8px] items-center px-[24px] py-[8px] hover:bg-blue-100 cursor-pointer transition ease-in-out",onClick:o.onClick,children:[g.jsx(Pe,{icon:o.icon,className:"text-[14px] text-gray-600 group-hover:text-blue-500"}),g.jsx("p",{className:"text-[12px] text-gray-500 font-semibold group-hover:text-gray-800",children:o.label})]},a))})]}),children:g.jsx(Pe,{icon:LE,onClick:s,className:"transition text-[16px] ease-in-out duration-150 hover:text-gray-600 cursor-pointer"})})},_N=({label:e,options:t,selectedValues:n,onUpdate:r,placeholder:s="Seleccionar opciones",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md"})=>{var ue;const[d,h]=O.useState(!1),[p,m]=O.useState(""),x=O.useRef(null),S=O.useRef(null),T={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-sm",searchIcon:"size-12"},md:{container:"p-16",text:"text-14",label:"text-14",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-14",searchIcon:"size-16"}}[u],{x:v,y:A,strategy:C,refs:I,context:P}=ir({open:d&&!c,onOpenChange:Y=>!c&&h(Y),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:Y,elements:z}){Object.assign(z.floating.style,{maxHeight:`${Math.min(Y-10,500)}px`})},padding:8}),ms({element:S})],placement:"bottom-start",whileElementsMounted:Qn}),D=rr(P,{enabled:!c}),R=sr(P),{getReferenceProps:F,getFloatingProps:W}=or([D,R]),{isMounted:Q,styles:ee}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ae=O.useCallback((Y,z)=>{if(c)return;let K;z?K=n.includes(Y)?n:[...n,Y]:K=n.filter($=>$!==Y),r(K)},[n,r,c]),ge=t.filter(Y=>Y.label.toLowerCase().includes(p.toLowerCase())),de=()=>{if(n.length===0)return s;const Y=t.filter(z=>n.includes(z.value)).map(z=>z.label);return Y.length===1?Y[0]:`${Y.length} seleccionados`},le=F({onClick:()=>!c&&h(!d)});return g.jsxs("div",{className:`flex flex-col select-none ${T.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${T.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:I.setReference,className:`
715
715
  flex items-center justify-between rounded-full border transition-all duration-200
716
716
  ${T.container}
717
717
  ${c?"bg-gray-50 border-gray-200 cursor-not-allowed":"bg-blue-50 cursor-pointer"}
718
718
  ${!c&&(d?"border-blue-500":"border-blue-100 hover:border-blue-300")}
719
- `,...le,children:[g.jsx("span",{className:`flex-grow text-left truncate font-600 ${T.text} ${c?"text-gray-300":"text-gray-500"}`,children:de()}),g.jsx("svg",{className:`${T.icon} transition-transform ${d?"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"})})]}),Q&&!c&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ee,width:(ue=I.reference.current)==null?void 0:ue.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...W(),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:`${T.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:x,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${T.searchText}`,placeholder:"Buscar...",value:p,onChange:Y=>m(Y.target.value),onClick:Y=>Y.stopPropagation(),autoFocus:!0}),p&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:Y=>{Y.stopPropagation(),m("")},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:ge.length>0?g.jsx("div",{className:"py-4",children:ge.map(Y=>{var K,$,k;const z=n.includes(Y.value);return g.jsxs(O.Fragment,{children:[Y.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:()=>ae(Y.value,!z),children:[g.jsx(Kd,{active:z,size:T.checkboxSize,variant:"square",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((K=Y.colors)==null?void 0:K.bgColor)||""} ${(($=Y.colors)==null?void 0:$.textColor)||""}`,children:[((k=Y.colors)==null?void 0:k.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:Y.colors.dotColor}}),g.jsx("span",{className:`${T.text} font-semibold truncate`,children:Y.label})]})]})]},Y.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 “",p,"”"]})]})})]})]})},IN=({label:e,options:t,selectedValue:n=null,onUpdate:r,placeholder:s="Seleccionar opción",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md",showRadio:d=!1})=>{var Y,z,K,$;const[h,p]=O.useState(!1),[m,x]=O.useState(""),S=O.useRef(null),b=O.useRef(null),v={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-14",searchIcon:"size-12"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-body-m",searchIcon:"size-16"}}[u],{x:A,y:C,strategy:I,refs:P,context:D}=ir({open:h&&!c,onOpenChange:k=>!c&&p(k),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:k,elements:X}){Object.assign(X.floating.style,{maxHeight:`${Math.min(k-10,500)}px`})},padding:8}),ms({element:b})],placement:"bottom-start",whileElementsMounted:Qn}),R=rr(D,{enabled:!c}),F=sr(D),{getReferenceProps:W,getFloatingProps:Q}=or([R,F]),{isMounted:ee,styles:ae}=ar(D,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ge=t.find(k=>k.value===n),de=k=>{c||(r(n===k?null:k),p(!1),x(""))},le=t.filter(k=>k.label.toLowerCase().includes(m.toLowerCase())),ue=W({onClick:()=>!c&&p(!h)});return g.jsxs("div",{className:`flex flex-col select-none ${v.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${v.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:P.setReference,className:`
719
+ `,...le,children:[g.jsx("span",{className:`flex-grow text-left truncate font-600 ${T.text} ${c?"text-gray-300":"text-gray-500"}`,children:de()}),g.jsx("svg",{className:`${T.icon} transition-transform ${d?"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"})})]}),Q&&!c&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ee,width:(ue=I.reference.current)==null?void 0:ue.clientWidth,zIndex:50},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...W(),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:`${T.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:x,type:"text",className:`w-full py-6 pl-36 pr-12 rounded-full focus:outline-none bg-gray-50 ${T.searchText}`,placeholder:"Buscar...",value:p,onChange:Y=>m(Y.target.value),onClick:Y=>Y.stopPropagation(),autoFocus:!0}),p&&g.jsx("button",{className:"absolute inset-y-0 right-0 pr-12 flex items-center",onClick:Y=>{Y.stopPropagation(),m("")},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:ge.length>0?g.jsx("div",{className:"py-4",children:ge.map(Y=>{var K,$,k;const z=n.includes(Y.value);return g.jsxs(O.Fragment,{children:[Y.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:()=>ae(Y.value,!z),children:[g.jsx(Kd,{active:z,size:T.checkboxSize,variant:"square",className:"flex-shrink-0"}),g.jsxs("div",{className:`flex items-center rounded-[8px] py-4 px-8 gap-[6px] overflow-hidden ${((K=Y.colors)==null?void 0:K.bgColor)||""} ${(($=Y.colors)==null?void 0:$.textColor)||""}`,children:[((k=Y.colors)==null?void 0:k.dotColor)&&g.jsx("span",{className:"size-6 rounded-full flex-shrink-0",style:{background:Y.colors.dotColor}}),g.jsx("span",{className:`${T.text} font-semibold truncate`,children:Y.label})]})]})]},Y.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 “",p,"”"]})]})})]})]})},IN=({label:e,options:t,selectedValue:n=null,onUpdate:r,placeholder:s="Seleccionar opción",allowSearch:o=!0,className:a="",disabled:c=!1,size:u="md",showRadio:d=!1})=>{var Y,z,K,$;const[h,p]=O.useState(!1),[m,x]=O.useState(""),S=O.useRef(null),b=O.useRef(null),v={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",icon:"w-12 h-12",checkboxSize:16,gap:"gap-8",searchText:"text-sm",searchIcon:"size-12"},md:{container:"p-16",text:"text-14",label:"text-14",icon:"w-16 h-16",checkboxSize:20,gap:"gap-8",searchText:"text-14",searchIcon:"size-16"}}[u],{x:A,y:C,strategy:I,refs:P,context:D}=ir({open:h&&!c,onOpenChange:k=>!c&&p(k),middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:k,elements:X}){Object.assign(X.floating.style,{maxHeight:`${Math.min(k-10,500)}px`})},padding:8}),ms({element:b})],placement:"bottom-start",whileElementsMounted:Qn}),R=rr(D,{enabled:!c}),F=sr(D),{getReferenceProps:W,getFloatingProps:Q}=or([R,F]),{isMounted:ee,styles:ae}=ar(D,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),ge=t.find(k=>k.value===n),de=k=>{c||(r(n===k?null:k),p(!1),x(""))},le=t.filter(k=>k.label.toLowerCase().includes(m.toLowerCase())),ue=W({onClick:()=>!c&&p(!h)});return g.jsxs("div",{className:`flex flex-col select-none ${v.gap} ${c?"cursor-not-allowed":""} ${a}`,children:[e&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${v.label} ${c?"text-gray-300":""}`,children:e}),g.jsxs("div",{ref:P.setReference,className:`
720
720
  flex items-center justify-between rounded-full border transition-all duration-200
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}
@@ -736,7 +736,7 @@ function print() { __p += __j.call(arguments, '') }
736
736
  `,style:{width:`${r}px`,height:`${r}px`,minWidth:`${r}px`,minHeight:`${r}px`},onClick:d,...c,children:u&&g.jsx(Pe,{icon:wb,className:"text-white",style:{fontSize:`${r*.6}px`}})})},BN=({bgColor:e="bg-green-100",textColor:t="text-green-700",label:n="Completed",labelClassName:r="",className:s="",size:o="sm",showDot:a=!1,style:c={}})=>g.jsxs("div",{className:`flex items-center justify-center rounded-[6px] ${o==="md"?"py-8 px-12":"py-4 px-8"} text-center text-nowrap h-fit w-fit ${a?"gap-[6px]":""} ${e} ${t} ${s}`,style:c,children:[a&&g.jsx(Pe,{icon:zD,className:"text-[6px]"}),g.jsx("div",{className:`font-semibold ${o==="md"?"text-[16px] leading-[22px]":"text-[12px] leading-[16px]"} ${r}`,children:n})]});var Xd,h2;function WN(){if(h2)return Xd;h2=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,A){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=A};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,c=new e(a),u=new e(a),d=new e(a);Xd={Cache:e,split:p,normalizePath:h,setter:function(v){var A=h(v);return u.get(v)||u.set(v,function(I,P){for(var D=0,R=A.length,F=I;D<R-1;){var W=A[D];if(W==="__proto__"||W==="constructor"||W==="prototype")return I;F=F[A[D++]]}F[A[D]]=P})},getter:function(v,A){var C=h(v);return d.get(v)||d.set(v,function(P){for(var D=0,R=C.length;D<R;)if(P!=null||!A)P=P[C[D++]];else return;return P})},join:function(v){return v.reduce(function(A,C){return A+(x(C)||n.test(C)?"["+C+"]":(A?".":"")+C)},"")},forEach:function(v,A,C){m(Array.isArray(v)?v:p(v),A,C)}};function h(v){return c.get(v)||c.set(v,p(v).map(function(A){return A.replace(o,"$2")}))}function p(v){return v.match(t)||[""]}function m(v,A,C){var I=v.length,P,D,R,F;for(D=0;D<I;D++)P=v[D],P&&(T(P)&&(P='"'+P+'"'),F=x(P),R=!F&&/^\d+$/.test(P),A.call(C,P,F,R,D,v))}function x(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function S(v){return v.match(r)&&!v.match(n)}function b(v){return s.test(v)}function T(v){return!x(v)&&(S(v)||b(v))}return Xd}var xs=WN(),Zd,p2;function UN(){if(p2)return Zd;p2=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],n=h=>h[0].toUpperCase()+h.slice(1),r=(h,p)=>t(h).join(p).toLowerCase(),s=h=>t(h).reduce((p,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Zd={words:t,upperFirst:n,camelCase:s,pascalCase:h=>n(s(h)),snakeCase:h=>r(h,"_"),kebabCase:h=>r(h,"-"),sentenceCase:h=>n(r(h," ")),titleCase:h=>t(h).map(n).join(" ")},Zd}var Jd=UN(),ul={exports:{}},m2;function zN(){if(m2)return ul.exports;m2=1,ul.exports=function(s){return e(t(s),s)},ul.exports.array=e;function e(s,o){var a=s.length,c=new Array(a),u={},d=a,h=n(o),p=r(s);for(o.forEach(function(x){if(!p.has(x[0])||!p.has(x[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)u[d]||m(s[d],d,new Set);return c;function m(x,S,b){if(b.has(x)){var T;try{T=", node was:"+JSON.stringify(x)}catch{T=""}throw new Error("Cyclic dependency"+T)}if(!p.has(x))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(x));if(!u[S]){u[S]=!0;var v=h.get(x)||new Set;if(v=Array.from(v),S=v.length){b.add(x);do{var A=v[--S];m(A,p.get(A),b)}while(S);b.delete(x)}c[--a]=x}}}function t(s){for(var o=new Set,a=0,c=s.length;a<c;a++){var u=s[a];o.add(u[0]),o.add(u[1])}return Array.from(o)}function n(s){for(var o=new Map,a=0,c=s.length;a<c;a++){var u=s[a];o.has(u[0])||o.set(u[0],new Set),o.has(u[1])||o.set(u[1],new Set),o.get(u[0]).add(u[1])}return o}function r(s){for(var o=new Map,a=0,c=s.length;a<c;a++)o.set(s[a],a);return o}return ul.exports}var GN=zN();const YN=Ap(GN),HN=Object.prototype.toString,qN=Error.prototype.toString,KN=RegExp.prototype.toString,XN=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",ZN=/^Symbol\((.*)\)(.*)$/;function JN(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function g2(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return JN(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return XN.call(e).replace(ZN,"Symbol($1)");const r=HN.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+qN.call(e)+"]":r==="RegExp"?KN.call(e):null}function Fr(e,t){let n=g2(e,t);return n!==null?n:JSON.stringify(e,function(r,s){let o=g2(this[r],t);return o!==null?o:s},2)}function y2(e){return e==null?[]:[].concat(e)}let x2,v2,b2,QN=/\$\{\s*(\w+)\s*\}/g;x2=Symbol.toStringTag;class w2{constructor(t,n,r,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[x2]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=s,this.errors=[],this.inner=[],y2(t).forEach(o=>{if(jt.isError(o)){this.errors.push(...o.errors);const a=o.inner.length?o.inner:[o];this.inner.push(...a)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}v2=Symbol.hasInstance,b2=Symbol.toStringTag;class jt extends Error{static formatError(t,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof t=="string"?t.replace(QN,(s,o)=>Fr(n[o])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,s,o){const a=new w2(t,n,r,s);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[b2]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,jt)}static[v2](t){return w2[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Rn={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const s=r!=null&&r!==n?` (cast from the value \`${Fr(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Fr(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${Fr(n,!0)}\``+s}},Lt={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ek={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Qd={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},tk={isValue:"${path} field must be ${value}"},fl={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Rn,string:Lt,number:ek,date:Qd,object:fl,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:tk,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,s=r.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${Fr(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${Fr(n,!0)}\``}return jt.formatError(Rn.notType,e)}}});const eh=e=>e&&e.__isYupSchema__;class dl{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:s,otherwise:o}=n,a=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new dl(t,(c,u)=>{var d;let h=a(...c)?s:o;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(r,t,n);if(s===void 0||s===t)return t;if(!eh(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const hl={context:"$",value:"."};class vs{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===hl.context,this.isValue=this.key[0]===hl.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?hl.context:this.isValue?hl.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&xs.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let s=this.isContext?r:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}vs.prototype.__isYupRef=!0;const bs=e=>e==null;function xi(e){function t({value:n,path:r="",options:s,originalValue:o,schema:a},c,u){const{name:d,test:h,params:p,message:m,skipAbsent:x}=e;let{parent:S,context:b,abortEarly:T=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=s;function A(ee){return vs.isRef(ee)?ee.getValue(n,S,b):ee}function C(ee={}){const ae=Object.assign({value:n,originalValue:o,label:a.spec.label,path:ee.path||r,spec:a.spec,disableStackTrace:ee.disableStackTrace||v},p,ee.params);for(const de of Object.keys(ae))ae[de]=A(ae[de]);const ge=new jt(jt.formatError(ee.message||m,ae),n,ae.path,ee.type||d,ae.disableStackTrace);return ge.params=ae,ge}const I=T?c:u;let P={path:r,parent:S,type:d,from:s.from,createError:C,resolve:A,options:s,originalValue:o,schema:a};const D=ee=>{jt.isError(ee)?I(ee):ee?u(null):I(C())},R=ee=>{jt.isError(ee)?I(ee):c(ee)};if(x&&bs(n))return D(!0);let W;try{var Q;if(W=h.call(P,n,P),typeof((Q=W)==null?void 0:Q.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(D,R)}}catch(ee){R(ee);return}D(W)}return t.OPTIONS=e,t}function nk(e,t,n,r=n){let s,o,a;return t?(xs.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:s,value:n});let p=e.type==="tuple",m=d?parseInt(h,10):0;if(e.innerType||p){if(p&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[m],e=p?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);s=n,n=n&&n[h],e=e.fields[h]}o=h,a=u?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:o}):{parent:s,parentPath:t,schema:e}}class pl extends Set{describe(){const t=[];for(const n of this.values())t.push(vs.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new pl(this.values())}merge(t,n){const r=this.clone();return t.forEach(s=>r.add(s)),n.forEach(s=>r.delete(s)),r}}function vi(e,t=new Map){if(eh(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=vi(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,s]of e.entries())n.set(r,vi(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(vi(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,s]of Object.entries(e))n[r]=vi(s,t)}else throw Error(`Unable to clone ${e}`);return n}class Fn{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new pl,this._blacklist=new pl,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Rn.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=vi(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const s=Object.assign({},n.spec,r.spec);return r.spec=s,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{t.tests.forEach(a=>{o.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((s,o)=>o.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,s,o;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",o=r._cast(t,n);if(n.assert!==!1&&!r.isType(o)){if(s&&bs(o))return o;let a=Fr(t),c=Fr(o);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
737
737
 
738
738
  attempted value: ${a}
739
- `+(c!==a?`result of cast: ${c}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,o)=>o.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:o,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:o,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return s(h,u);this.runTests({path:o,value:u,originalValue:a,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:o,value:a,originalValue:c,path:u,options:d}=t,h=b=>{s||(s=!0,n(b,a))},p=b=>{s||(s=!0,r(b,a))},m=o.length,x=[];if(!m)return p([]);let S={value:a,originalValue:c,path:u,options:d,schema:this};for(let b=0;b<o.length;b++){const T=o[b];T(S,h,function(A){A&&(Array.isArray(A)?x.push(...A):x.push(A)),--m<=0&&p(x)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:o,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:o[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${s||""}[${u?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(p,m,x)=>this.resolve(h)._validate(d,h,m,x)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((a,c)=>s._validate(t,n,(u,d)=>{jt.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new jt(u,d,void 0,void 0,o)):a(d)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw jt.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new jt(c,t,void 0,void 0,a);o=u}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(jt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(jt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):vi(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=xi({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=xi({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Rn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rn.notNull){return this.nullability(!1,t)}required(t=Rn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Rn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=xi(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(o||a.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=y2(t).map(o=>new vs(o));return s.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new dl(s,n):dl.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=xi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Rn.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=xi({message:n,name:"oneOf",skipAbsent:!0,test(s){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(s)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),r}notOneOf(t,n=Rn.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=xi({message:n,name:"notOneOf",test(s){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(s)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:o,nullable:a}=n.spec;return{meta:s,label:r,optional:o,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(p=>p.name===u.name)===d)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:o,schema:a}=nk(this,t,n,r.context);return a[e](s&&s[o],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const rk=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sk(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=rk.exec(e);return r?{year:lr(r[1]),month:lr(r[2],1)-1,day:lr(r[3],1),hour:lr(r[4]),minute:lr(r[5]),second:lr(r[6]),millisecond:r[7]?lr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:lr(r[10]),minuteOffset:lr(r[11])}:null}function lr(e,t=0){return Number(e)||t}let ik=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ok=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ak=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lk="^\\d{4}-\\d{2}-\\d{2}",ck="\\d{2}:\\d{2}:\\d{2}",uk="(([+-]\\d{2}(:?\\d{2})?)|Z)",fk=new RegExp(`${lk}T${ck}(\\.\\d+)?${uk}$`),dk=e=>bs(e)||e===e.trim(),hk={}.toString();function Vr(){return new S2}class S2 extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===hk?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Rn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Lt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Lt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Lt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,s,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:o}=n:s=n),this.test({name:o||"matches",message:s||Lt.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=Lt.email){return this.matches(ik,{name:"email",message:t,excludeEmptyString:!0})}url(t=Lt.url){return this.matches(ok,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Lt.uuid){return this.matches(ak,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,s;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:s=void 0}=t:n=t),this.matches(fk,{name:"datetime",message:n||Lt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Lt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const a=th(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||Lt.datetime_precision,params:{precision:s},skipAbsent:!0,test:o=>{if(!o||s==null)return!0;const a=th(o);return a?a.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Lt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:dk})}lowercase(t=Lt.lowercase){return this.transform(n=>bs(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toLowerCase()})}uppercase(t=Lt.uppercase){return this.transform(n=>bs(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toUpperCase()})}}Vr.prototype=S2.prototype;let pk=new Date(""),mk=e=>Object.prototype.toString.call(e)==="[object Date]";class nh extends Fn{constructor(){super({type:"date",check(t){return mk(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sk(t),isNaN(t)?nh.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Qd.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Qd.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}nh.INVALID_DATE=pk;function gk(e,t=[]){let n=[],r=new Set,s=new Set(t.map(([a,c])=>`${a}-${c}`));function o(a,c){let u=xs.split(a)[0];r.add(u),s.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),vs.isRef(c)&&c.isSibling?o(c.path,a):eh(c)&&"deps"in c&&c.deps.forEach(u=>o(u,a))}return YN.array(Array.from(r),n).reverse()}function T2(e,t){let n=1/0;return e.some((r,s)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=s,!0}),n}function C2(e){return(t,n)=>T2(e,t)-T2(e,n)}const yk=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function ml(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ml(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ml(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ml)}):"optional"in e?e.optional():e}const xk=(e,t)=>{const n=[...xs.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),s=xs.getter(xs.join(n),!0)(e);return!!(s&&r in s)};let E2=e=>Object.prototype.toString.call(e)==="[object Object]";function P2(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const vk=C2([]);function rh(e){return new A2(e)}class A2 extends Fn{constructor(t){super({type:"object",check(n){return E2(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=vk,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let o=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const p of c){let m=o[p],x=p in s;if(m){let S,b=s[p];d.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:b,context:n.context,parent:u});let T=m instanceof Fn?m.spec:void 0,v=T==null?void 0:T.strict;if(T!=null&&T.strip){h=h||p in s;continue}S=!n.__validating||!v?m.cast(s[p],d):s[p],S!==void 0&&(u[p]=S)}else x&&!a&&(u[p]=s[p]);(x!==p in u||u[p]!==s[p])&&(h=!0)}return h?u:s}_validate(t,n={},r,s){let{from:o=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...o],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!E2(d)){s(u,d);return}a=a||d;let h=[];for(let p of this._nodes){let m=this.fields[p];!m||vs.isRef(m)||h.push(m.asNestedTest({options:n,key:p,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,p=>{s(p.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[s,o]of Object.entries(this.fields)){const a=r[s];r[s]=a===void 0?o:a}return n.withMutation(s=>s.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var s;const o=this.fields[r];let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=gk(t,n),r._sortErrors=C2(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let s=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),s)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return ml(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,s])=>t.includes(r)&&t.includes(s)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let s=xs.getter(t,!0);return this.transform(o=>{if(!o)return o;let a=o;return xk(o,t)&&(a=Object.assign({},o),r||delete a[t],a[n]=s(o)),a})}json(){return this.transform(yk)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||fl.exact,test(n){if(n==null)return!0;const r=P2(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=fl.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const o=P2(this.schema,s);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=fl.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const s of Object.keys(n))r[t(s)]=n[s];return r})}camelCase(){return this.transformKeys(Jd.camelCase)}snakeCase(){return this.transformKeys(Jd.snakeCase)}constantCase(){return this.transformKeys(t=>Jd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,a]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[o]})),r.fields[o]=a.describe(c)}return r}}rh.prototype=A2.prototype,rh().shape({labelES:Vr().required(),label:Vr().required(),code:Vr().required(),codeISO2:Vr().required(),phone:Vr().required()});const M2=[{labelES:"Afganistán",label:"Afghanistan",codeISO2:"AF",code:"AFG",phone:"93"},{labelES:"Albania",label:"Albania",codeISO2:"AL",code:"ALB",phone:"355"},{labelES:"Alemania",label:"Germany",codeISO2:"DE",code:"DEU",phone:"49"},{labelES:"Andorra",label:"Andorra",codeISO2:"AD",code:"AND",phone:"376"},{labelES:"Angola",label:"Angola",codeISO2:"AO",code:"AGO",phone:"244"},{labelES:"Anguila",label:"Anguilla",codeISO2:"AI",code:"AIA",phone:"1 264"},{labelES:"Antártida",label:"Antarctica",codeISO2:"AQ",code:"ATA",phone:"672"},{labelES:"Antigua y Barbuda",label:"Antigua and Barbuda",codeISO2:"AG",code:"ATG",phone:"1 268"},{labelES:"Arabia Saudita",label:"Saudi Arabia",codeISO2:"SA",code:"SAU",phone:"966"},{labelES:"Argelia",label:"Algeria",codeISO2:"DZ",code:"DZA",phone:"213"},{labelES:"Argentina",label:"Argentina",codeISO2:"AR",code:"ARG",phone:"54"},{labelES:"Armenia",label:"Armenia",codeISO2:"AM",code:"ARM",phone:"374"},{labelES:"Aruba",label:"Aruba",codeISO2:"AW",code:"ABW",phone:"297"},{labelES:"Australia",label:"Australia",codeISO2:"AU",code:"AUS",phone:"61"},{labelES:"Austria",label:"Austria",codeISO2:"AT",code:"AUT",phone:"43"},{labelES:"Azerbaiyán",label:"Azerbaijan",codeISO2:"AZ",code:"AZE",phone:"994"},{labelES:"Bélgica",label:"Belgium",codeISO2:"BE",code:"BEL",phone:"32"},{labelES:"Bahamas",label:"Bahamas",codeISO2:"BS",code:"BHS",phone:"1 242"},{labelES:"Bahrein",label:"Bahrain",codeISO2:"BH",code:"BHR",phone:"973"},{labelES:"Bangladesh",label:"Bangladesh",codeISO2:"BD",code:"BGD",phone:"880"},{labelES:"Barbados",label:"Barbados",codeISO2:"BB",code:"BRB",phone:"1 246"},{labelES:"Belice",label:"Belize",codeISO2:"BZ",code:"BLZ",phone:"501"},{labelES:"Benín",label:"Benin",codeISO2:"BJ",code:"BEN",phone:"229"},{labelES:"Bhután",label:"Bhutan",codeISO2:"BT",code:"BTN",phone:"975"},{labelES:"Bielorrusia",label:"Belarus",codeISO2:"BY",code:"BLR",phone:"375"},{labelES:"Birmania",label:"Myanmar",codeISO2:"MM",code:"MMR",phone:"95"},{labelES:"Bolivia",label:"Bolivia",codeISO2:"BO",code:"BOL",phone:"591"},{labelES:"Bosnia y Herzegovina",label:"Bosnia and Herzegovina",codeISO2:"BA",code:"BIH",phone:"387"},{labelES:"Botsuana",label:"Botswana",codeISO2:"BW",code:"BWA",phone:"267"},{labelES:"Brasil",label:"Brazil",codeISO2:"BR",code:"BRA",phone:"55"},{labelES:"Brunéi",label:"Brunei",codeISO2:"BN",code:"BRN",phone:"673"},{labelES:"Bulgaria",label:"Bulgaria",codeISO2:"BG",code:"BGR",phone:"359"},{labelES:"Burkina Faso",label:"Burkina Faso",codeISO2:"BF",code:"BFA",phone:"226"},{labelES:"Burundi",label:"Burundi",codeISO2:"BI",code:"BDI",phone:"257"},{labelES:"Cabo Verde",label:"Cape Verde",codeISO2:"CV",code:"CPV",phone:"238"},{labelES:"Camboya",label:"Cambodia",codeISO2:"KH",code:"KHM",phone:"855"},{labelES:"Camerún",label:"Cameroon",codeISO2:"CM",code:"CMR",phone:"237"},{labelES:"Canadá",label:"Canada",codeISO2:"CA",code:"CAN",phone:"1"},{labelES:"Chad",label:"Chad",codeISO2:"TD",code:"TCD",phone:"235"},{labelES:"Chile",label:"Chile",codeISO2:"CL",code:"CHL",phone:"56"},{labelES:"China",label:"China",codeISO2:"CN",code:"CHN",phone:"86"},{labelES:"Chipre",label:"Cyprus",codeISO2:"CY",code:"CYP",phone:"357"},{labelES:"Ciudad del Vaticano",label:"Vatican City State",codeISO2:"VA",code:"VAT",phone:"39"},{labelES:"Colombia",label:"Colombia",codeISO2:"CO",code:"COL",phone:"57"},{labelES:"Comoras",label:"Comoros",codeISO2:"KM",code:"COM",phone:"269"},{labelES:"República del Congo",label:"Republic of the Congo",codeISO2:"CG",code:"COG",phone:"242"},{labelES:"República Democrática del Congo",label:"Democratic Republic of the Congo",codeISO2:"CD",code:"COD",phone:"243"},{labelES:"Corea del Norte",label:"North Korea",codeISO2:"KP",code:"PRK",phone:"850"},{labelES:"Corea del Sur",label:"South Korea",codeISO2:"KR",code:"KOR",phone:"82"},{labelES:"Costa de Marfil",label:"Ivory Coast",codeISO2:"CI",code:"CIV",phone:"225"},{labelES:"Costa Rica",label:"Costa Rica",codeISO2:"CR",code:"CRI",phone:"506"},{labelES:"Croacia",label:"Croatia",codeISO2:"HR",code:"HRV",phone:"385"},{labelES:"Cuba",label:"Cuba",codeISO2:"CU",code:"CUB",phone:"53"},{labelES:"Curazao",label:"Curaçao",codeISO2:"CW",code:"CWU",phone:"5999"},{labelES:"Dinamarca",label:"Denmark",codeISO2:"DK",code:"DNK",phone:"45"},{labelES:"Dominica",label:"Dominica",codeISO2:"DM",code:"DMA",phone:"1 767"},{labelES:"Ecuador",label:"Ecuador",codeISO2:"EC",code:"ECU",phone:"593"},{labelES:"Egipto",label:"Egypt",codeISO2:"EG",code:"EGY",phone:"20"},{labelES:"El Salvador",label:"El Salvador",codeISO2:"SV",code:"SLV",phone:"503"},{labelES:"Emiratos Árabes Unidos",label:"United Arab Emirates",codeISO2:"AE",code:"ARE",phone:"971"},{labelES:"Eritrea",label:"Eritrea",codeISO2:"ER",code:"ERI",phone:"291"},{labelES:"Eslovaquia",label:"Slovakia",codeISO2:"SK",code:"SVK",phone:"421"},{labelES:"Eslovenia",label:"Slovenia",codeISO2:"SI",code:"SVN",phone:"386"},{labelES:"España",label:"Spain",codeISO2:"ES",code:"ESP",phone:"34"},{labelES:"Estados Unidos de América",label:"United States of America",codeISO2:"US",code:"USA",phone:"1"},{labelES:"Estonia",label:"Estonia",codeISO2:"EE",code:"EST",phone:"372"},{labelES:"Etiopía",label:"Ethiopia",codeISO2:"ET",code:"ETH",phone:"251"},{labelES:"Filipinas",label:"Philippines",codeISO2:"PH",code:"PHL",phone:"63"},{labelES:"Finlandia",label:"Finland",codeISO2:"FI",code:"FIN",phone:"358"},{labelES:"Fiyi",label:"Fiji",codeISO2:"FJ",code:"FJI",phone:"679"},{labelES:"Francia",label:"France",codeISO2:"FR",code:"FRA",phone:"33"},{labelES:"Gabón",label:"Gabon",codeISO2:"GA",code:"GAB",phone:"241"},{labelES:"Gambia",label:"Gambia",codeISO2:"GM",code:"GMB",phone:"220"},{labelES:"Georgia",label:"Georgia",codeISO2:"GE",code:"GEO",phone:"995"},{labelES:"Ghana",label:"Ghana",codeISO2:"GH",code:"GHA",phone:"233"},{labelES:"Gibraltar",label:"Gibraltar",codeISO2:"GI",code:"GIB",phone:"350"},{labelES:"Granada",label:"Grenada",codeISO2:"GD",code:"GRD",phone:"1 473"},{labelES:"Grecia",label:"Greece",codeISO2:"GR",code:"GRC",phone:"30"},{labelES:"Groenlandia",label:"Greenland",codeISO2:"GL",code:"GRL",phone:"299"},{labelES:"Guadalupe",label:"Guadeloupe",codeISO2:"GP",code:"GLP",phone:"590"},{labelES:"Guam",label:"Guam",codeISO2:"GU",code:"GUM",phone:"1 671"},{labelES:"Guatemala",label:"Guatemala",codeISO2:"GT",code:"GTM",phone:"502"},{labelES:"Guayana Francesa",label:"French Guiana",codeISO2:"GF",code:"GUF",phone:"594"},{labelES:"Guernsey",label:"Guernsey",codeISO2:"GG",code:"GGY",phone:"44"},{labelES:"Guinea",label:"Guinea",codeISO2:"GN",code:"GIN",phone:"224"},{labelES:"Guinea Ecuatorial",label:"Equatorial Guinea",codeISO2:"GQ",code:"GNQ",phone:"240"},{labelES:"Guinea-Bissau",label:"Guinea-Bissau",codeISO2:"GW",code:"GNB",phone:"245"},{labelES:"Guyana",label:"Guyana",codeISO2:"GY",code:"GUY",phone:"592"},{labelES:"Haití",label:"Haiti",codeISO2:"HT",code:"HTI",phone:"509"},{labelES:"Honduras",label:"Honduras",codeISO2:"HN",code:"HND",phone:"504"},{labelES:"Hong kong",label:"Hong Kong",codeISO2:"HK",code:"HKG",phone:"852"},{labelES:"Hungría",label:"Hungary",codeISO2:"HU",code:"HUN",phone:"36"},{labelES:"India",label:"India",codeISO2:"IN",code:"IND",phone:"91"},{labelES:"Indonesia",label:"Indonesia",codeISO2:"ID",code:"IDN",phone:"62"},{labelES:"Irán",label:"Iran",codeISO2:"IR",code:"IRN",phone:"98"},{labelES:"Irak",label:"Iraq",codeISO2:"IQ",code:"IRQ",phone:"964"},{labelES:"Irlanda",label:"Ireland",codeISO2:"IE",code:"IRL",phone:"353"},{labelES:"Isla Bouvet",label:"Bouvet Island",codeISO2:"BV",code:"BVT",phone:""},{labelES:"Isla de Man",label:"Isle of Man",codeISO2:"IM",code:"IMN",phone:"44"},{labelES:"Isla de Navidad",label:"Christmas Island",codeISO2:"CX",code:"CXR",phone:"61"},{labelES:"Isla Norfolk",label:"Norfolk Island",codeISO2:"NF",code:"NFK",phone:"672"},{labelES:"Islandia",label:"Iceland",codeISO2:"IS",code:"ISL",phone:"354"},{labelES:"Islas Bermudas",label:"Bermuda Islands",codeISO2:"BM",code:"BMU",phone:"1 441"},{labelES:"Islas Caimán",label:"Cayman Islands",codeISO2:"KY",code:"CYM",phone:"1 345"},{labelES:"Islas Cocos (Keeling)",label:"Cocos (Keeling) Islands",codeISO2:"CC",code:"CCK",phone:"61"},{labelES:"Islas Cook",label:"Cook Islands",codeISO2:"CK",code:"COK",phone:"682"},{labelES:"Islas de Åland",label:"Åland Islands",codeISO2:"AX",code:"ALA",phone:"358"},{labelES:"Islas Feroe",label:"Faroe Islands",codeISO2:"FO",code:"FRO",phone:"298"},{labelES:"Islas Georgias del Sur y Sandwich del Sur",label:"South Georgia and the South Sandwich Islands",codeISO2:"GS",code:"SGS",phone:"500"},{labelES:"Islas Heard y McDonald",label:"Heard Island and McDonald Islands",codeISO2:"HM",code:"HMD",phone:""},{labelES:"Islas Maldivas",label:"Maldives",codeISO2:"MV",code:"MDV",phone:"960"},{labelES:"Islas Malvinas",label:"Falkland Islands (Malvinas)",codeISO2:"FK",code:"FLK",phone:"500"},{labelES:"Islas Marianas del Norte",label:"Northern Mariana Islands",codeISO2:"MP",code:"MNP",phone:"1 670"},{labelES:"Islas Marshall",label:"Marshall Islands",codeISO2:"MH",code:"MHL",phone:"692"},{labelES:"Islas Pitcairn",label:"Pitcairn Islands",codeISO2:"PN",code:"PCN",phone:"870"},{labelES:"Islas Salomón",label:"Solomon Islands",codeISO2:"SB",code:"SLB",phone:"677"},{labelES:"Islas Turcas y Caicos",label:"Turks and Caicos Islands",codeISO2:"TC",code:"TCA",phone:"1 649"},{labelES:"Islas Ultramarinas Menores de Estados Unidos",label:"United States Minor Outlying Islands",codeISO2:"UM",code:"UMI",phone:"246"},{labelES:"Islas Vírgenes Británicas",label:"Virgin Islands",codeISO2:"VG",code:"VGB",phone:"1 284"},{labelES:"Islas Vírgenes de los Estados Unidos",label:"United States Virgin Islands",codeISO2:"VI",code:"VIR",phone:"1 340"},{labelES:"Israel",label:"Israel",codeISO2:"IL",code:"ISR",phone:"972"},{labelES:"Italia",label:"Italy",codeISO2:"IT",code:"ITA",phone:"39"},{labelES:"Jamaica",label:"Jamaica",codeISO2:"JM",code:"JAM",phone:"1 876"},{labelES:"Japón",label:"Japan",codeISO2:"JP",code:"JPN",phone:"81"},{labelES:"Jersey",label:"Jersey",codeISO2:"JE",code:"JEY",phone:"44"},{labelES:"Jordania",label:"Jordan",codeISO2:"JO",code:"JOR",phone:"962"},{labelES:"Kazajistán",label:"Kazakhstan",codeISO2:"KZ",code:"KAZ",phone:"7"},{labelES:"Kenia",label:"Kenya",codeISO2:"KE",code:"KEN",phone:"254"},{labelES:"Kirguistán",label:"Kyrgyzstan",codeISO2:"KG",code:"KGZ",phone:"996"},{labelES:"Kiribati",label:"Kiribati",codeISO2:"KI",code:"KIR",phone:"686"},{labelES:"Kuwait",label:"Kuwait",codeISO2:"KW",code:"KWT",phone:"965"},{labelES:"Líbano",label:"Lebanon",codeISO2:"LB",code:"LBN",phone:"961"},{labelES:"Laos",label:"Laos",codeISO2:"LA",code:"LAO",phone:"856"},{labelES:"Lesoto",label:"Lesotho",codeISO2:"LS",code:"LSO",phone:"266"},{labelES:"Letonia",label:"Latvia",codeISO2:"LV",code:"LVA",phone:"371"},{labelES:"Liberia",label:"Liberia",codeISO2:"LR",code:"LBR",phone:"231"},{labelES:"Libia",label:"Libya",codeISO2:"LY",code:"LBY",phone:"218"},{labelES:"Liechtenstein",label:"Liechtenstein",codeISO2:"LI",code:"LIE",phone:"423"},{labelES:"Lituania",label:"Lithuania",codeISO2:"LT",code:"LTU",phone:"370"},{labelES:"Luxemburgo",label:"Luxembourg",codeISO2:"LU",code:"LUX",phone:"352"},{labelES:"México",label:"Mexico",codeISO2:"MX",code:"MEX",phone:"52"},{labelES:"Mónaco",label:"Monaco",codeISO2:"MC",code:"MCO",phone:"377"},{labelES:"Macao",label:"Macao",codeISO2:"MO",code:"MAC",phone:"853"},{labelES:"Macedônia",label:"Macedonia",codeISO2:"MK",code:"MKD",phone:"389"},{labelES:"Madagascar",label:"Madagascar",codeISO2:"MG",code:"MDG",phone:"261"},{labelES:"Malasia",label:"Malaysia",codeISO2:"MY",code:"MYS",phone:"60"},{labelES:"Malawi",label:"Malawi",codeISO2:"MW",code:"MWI",phone:"265"},{labelES:"Mali",label:"Mali",codeISO2:"ML",code:"MLI",phone:"223"},{labelES:"Malta",label:"Malta",codeISO2:"MT",code:"MLT",phone:"356"},{labelES:"Marruecos",label:"Morocco",codeISO2:"MA",code:"MAR",phone:"212"},{labelES:"Martinica",label:"Martinique",codeISO2:"MQ",code:"MTQ",phone:"596"},{labelES:"Mauricio",label:"Mauritius",codeISO2:"MU",code:"MUS",phone:"230"},{labelES:"Mauritania",label:"Mauritania",codeISO2:"MR",code:"MRT",phone:"222"},{labelES:"Mayotte",label:"Mayotte",codeISO2:"YT",code:"MYT",phone:"262"},{labelES:"Micronesia",label:"Estados Federados de",codeISO2:"FM",code:"FSM",phone:"691"},{labelES:"Moldavia",label:"Moldova",codeISO2:"MD",code:"MDA",phone:"373"},{labelES:"Mongolia",label:"Mongolia",codeISO2:"MN",code:"MNG",phone:"976"},{labelES:"Montenegro",label:"Montenegro",codeISO2:"ME",code:"MNE",phone:"382"},{labelES:"Montserrat",label:"Montserrat",codeISO2:"MS",code:"MSR",phone:"1 664"},{labelES:"Mozambique",label:"Mozambique",codeISO2:"MZ",code:"MOZ",phone:"258"},{labelES:"Namibia",label:"Namibia",codeISO2:"NA",code:"NAM",phone:"264"},{labelES:"Nauru",label:"Nauru",codeISO2:"NR",code:"NRU",phone:"674"},{labelES:"Nepal",label:"Nepal",codeISO2:"NP",code:"NPL",phone:"977"},{labelES:"Nicaragua",label:"Nicaragua",codeISO2:"NI",code:"NIC",phone:"505"},{labelES:"Niger",label:"Niger",codeISO2:"NE",code:"NER",phone:"227"},{labelES:"Nigeria",label:"Nigeria",codeISO2:"NG",code:"NGA",phone:"234"},{labelES:"Niue",label:"Niue",codeISO2:"NU",code:"NIU",phone:"683"},{labelES:"Noruega",label:"Norway",codeISO2:"NO",code:"NOR",phone:"47"},{labelES:"Nueva Caledonia",label:"New Caledonia",codeISO2:"NC",code:"NCL",phone:"687"},{labelES:"Nueva Zelanda",label:"New Zealand",codeISO2:"NZ",code:"NZL",phone:"64"},{labelES:"Omán",label:"Oman",codeISO2:"OM",code:"OMN",phone:"968"},{labelES:"Países Bajos",label:"Netherlands",codeISO2:"NL",code:"NLD",phone:"31"},{labelES:"Pakistán",label:"Pakistan",codeISO2:"PK",code:"PAK",phone:"92"},{labelES:"Palau",label:"Palau",codeISO2:"PW",code:"PLW",phone:"680"},{labelES:"Palestina",label:"Palestine",codeISO2:"PS",code:"PSE",phone:"970"},{labelES:"Panamá",label:"Panama",codeISO2:"PA",code:"PAN",phone:"507"},{labelES:"Papúa Nueva Guinea",label:"Papua New Guinea",codeISO2:"PG",code:"PNG",phone:"675"},{labelES:"Paraguay",label:"Paraguay",codeISO2:"PY",code:"PRY",phone:"595"},{labelES:"Perú",label:"Peru",codeISO2:"PE",code:"PER",phone:"51"},{labelES:"Polinesia Francesa",label:"French Polynesia",codeISO2:"PF",code:"PYF",phone:"689"},{labelES:"Polonia",label:"Poland",codeISO2:"PL",code:"POL",phone:"48"},{labelES:"Portugal",label:"Portugal",codeISO2:"PT",code:"PRT",phone:"351"},{labelES:"Puerto Rico",label:"Puerto Rico",codeISO2:"PR",code:"PRI",phone:"1"},{labelES:"Qatar",label:"Qatar",codeISO2:"QA",code:"QAT",phone:"974"},{labelES:"Reino Unido",label:"United Kingdom",codeISO2:"GB",code:"GBR",phone:"44"},{labelES:"República Centroafricana",label:"Central African Republic",codeISO2:"CF",code:"CAF",phone:"236"},{labelES:"República Checa",label:"Czech Republic",codeISO2:"CZ",code:"CZE",phone:"420"},{labelES:"República Dominicana",label:"Dominican Republic",codeISO2:"DO",code:"DOM",phone:"1 809"},{labelES:"República de Sudán del Sur",label:"South Sudan",codeISO2:"SS",code:"SSD",phone:"211"},{labelES:"Reunión",label:"Réunion",codeISO2:"RE",code:"REU",phone:"262"},{labelES:"Ruanda",label:"Rwanda",codeISO2:"RW",code:"RWA",phone:"250"},{labelES:"Rumanía",label:"Romania",codeISO2:"RO",code:"ROU",phone:"40"},{labelES:"Rusia",label:"Russia",codeISO2:"RU",code:"RUS",phone:"7"},{labelES:"Sahara Occidental",label:"Western Sahara",codeISO2:"EH",code:"ESH",phone:"212"},{labelES:"Samoa",label:"Samoa",codeISO2:"WS",code:"WSM",phone:"685"},{labelES:"Samoa Americana",label:"American Samoa",codeISO2:"AS",code:"ASM",phone:"1 684"},{labelES:"San Bartolomé",label:"Saint Barthélemy",codeISO2:"BL",code:"BLM",phone:"590"},{labelES:"San Cristóbal y Nieves",label:"Saint Kitts and Nevis",codeISO2:"KN",code:"KNA",phone:"1 869"},{labelES:"San Marino",label:"San Marino",codeISO2:"SM",code:"SMR",phone:"378"},{labelES:"San Martín (Francia)",label:"Saint Martin (French part)",codeISO2:"MF",code:"MAF",phone:"1 599"},{labelES:"San Pedro y Miquelón",label:"Saint Pierre and Miquelon",codeISO2:"PM",code:"SPM",phone:"508"},{labelES:"San Vicente y las Granadinas",label:"Saint Vincent and the Grenadines",codeISO2:"VC",code:"VCT",phone:"1 784"},{labelES:"Santa Elena",label:"Ascensión y Tristán de Acuña",codeISO2:"SH",code:"SHN",phone:"290"},{labelES:"Santa Lucía",label:"Saint Lucia",codeISO2:"LC",code:"LCA",phone:"1 758"},{labelES:"Santo Tomé y Príncipe",label:"Sao Tome and Principe",codeISO2:"ST",code:"STP",phone:"239"},{labelES:"Senegal",label:"Senegal",codeISO2:"SN",code:"SEN",phone:"221"},{labelES:"Serbia",label:"Serbia",codeISO2:"RS",code:"SRB",phone:"381"},{labelES:"Seychelles",label:"Seychelles",codeISO2:"SC",code:"SYC",phone:"248"},{labelES:"Sierra Leona",label:"Sierra Leone",codeISO2:"SL",code:"SLE",phone:"232"},{labelES:"Singapur",label:"Singapore",codeISO2:"SG",code:"SGP",phone:"65"},{labelES:"Sint Maarten",label:"Sint Maarten",codeISO2:"SX",code:"SMX",phone:"1 721"},{labelES:"Siria",label:"Syria",codeISO2:"SY",code:"SYR",phone:"963"},{labelES:"Somalia",label:"Somalia",codeISO2:"SO",code:"SOM",phone:"252"},{labelES:"Sri lanka",label:"Sri Lanka",codeISO2:"LK",code:"LKA",phone:"94"},{labelES:"Sudáfrica",label:"South Africa",codeISO2:"ZA",code:"ZAF",phone:"27"},{labelES:"Sudán",label:"Sudan",codeISO2:"SD",code:"SDN",phone:"249"},{labelES:"Suecia",label:"Sweden",codeISO2:"SE",code:"SWE",phone:"46"},{labelES:"Suiza",label:"Switzerland",codeISO2:"CH",code:"CHE",phone:"41"},{labelES:"Surinám",label:"Suriname",codeISO2:"SR",code:"SUR",phone:"597"},{labelES:"Svalbard y Jan Mayen",label:"Svalbard and Jan Mayen",codeISO2:"SJ",code:"SJM",phone:"47"},{labelES:"Swazilandia",label:"Swaziland",codeISO2:"SZ",code:"SWZ",phone:"268"},{labelES:"Tayikistán",label:"Tajikistan",codeISO2:"TJ",code:"TJK",phone:"992"},{labelES:"Tailandia",label:"Thailand",codeISO2:"TH",code:"THA",phone:"66"},{labelES:"Taiwán",label:"Taiwan",codeISO2:"TW",code:"TWN",phone:"886"},{labelES:"Tanzania",label:"Tanzania",codeISO2:"TZ",code:"TZA",phone:"255"},{labelES:"Territorio Británico del Océano Índico",label:"British Indian Ocean Territory",codeISO2:"IO",code:"IOT",phone:"246"},{labelES:"Territorios Australes y Antárticas Franceses",label:"French Southern Territories",codeISO2:"TF",code:"ATF",phone:""},{labelES:"Timor Oriental",label:"East Timor",codeISO2:"TL",code:"TLS",phone:"670"},{labelES:"Togo",label:"Togo",codeISO2:"TG",code:"TGO",phone:"228"},{labelES:"Tokelau",label:"Tokelau",codeISO2:"TK",code:"TKL",phone:"690"},{labelES:"Tonga",label:"Tonga",codeISO2:"TO",code:"TON",phone:"676"},{labelES:"Trinidad y Tobago",label:"Trinidad and Tobago",codeISO2:"TT",code:"TTO",phone:"1 868"},{labelES:"Tunez",label:"Tunisia",codeISO2:"TN",code:"TUN",phone:"216"},{labelES:"Turkmenistán",label:"Turkmenistan",codeISO2:"TM",code:"TKM",phone:"993"},{labelES:"Turquía",label:"Turkey",codeISO2:"TR",code:"TUR",phone:"90"},{labelES:"Tuvalu",label:"Tuvalu",codeISO2:"TV",code:"TUV",phone:"688"},{labelES:"Ucrania",label:"Ukraine",codeISO2:"UA",code:"UKR",phone:"380"},{labelES:"Uganda",label:"Uganda",codeISO2:"UG",code:"UGA",phone:"256"},{labelES:"Uruguay",label:"Uruguay",codeISO2:"UY",code:"URY",phone:"598"},{labelES:"Uzbekistán",label:"Uzbekistan",codeISO2:"UZ",code:"UZB",phone:"998"},{labelES:"Vanuatu",label:"Vanuatu",codeISO2:"VU",code:"VUT",phone:"678"},{labelES:"Venezuela",label:"Venezuela",codeISO2:"VE",code:"VEN",phone:"58"},{labelES:"Vietnam",label:"Vietnam",codeISO2:"VN",code:"VNM",phone:"84"},{labelES:"Wallis y Futuna",label:"Wallis and Futuna",codeISO2:"WF",code:"WLF",phone:"681"},{labelES:"Yemen",label:"Yemen",codeISO2:"YE",code:"YEM",phone:"967"},{labelES:"Yibuti",label:"Djibouti",codeISO2:"DJ",code:"DJI",phone:"253"},{labelES:"Zambia",label:"Zambia",codeISO2:"ZM",code:"ZMB",phone:"260"},{labelES:"Zimbabue",label:"Zimbabwe",codeISO2:"ZW",code:"ZWE",phone:"263"}],bk=({countries:e=M2,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a="",translateKey:c})=>{var Ee,Ve,ie;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:t,control:n,rules:{validate:{}},defaultValue:null}),[p,m]=O.useState(!1),[x,S]=O.useState(""),[b,T]=O.useState(d.value||null),v=O.useRef(null),A=O.useRef(null),C=O.useRef(null),{x:I,y:P,strategy:D,refs:R,context:F,placement:W,middlewareData:Q}=ir({open:p,onOpenChange:m,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:me,elements:De}){Object.assign(De.floating.style,{maxHeight:`${Math.min(me-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ee=rr(F),ae=sr(F),{getReferenceProps:ge,getFloatingProps:de}=or([ee,ae]),{isMounted:le,styles:ue}=ar(F,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(Array.isArray(e)?e:[]).filter(me=>{if(!x.trim())return!0;const De=o==="es"&&me.labelES?me.labelES.toLowerCase():me.label.toLowerCase(),ft=me.code?me.code.toLowerCase():"";return De.includes(x.toLowerCase())||ft.includes(x.toLowerCase())}),K=me=>{T(me),m(!1),S(""),d.onChange(me)},$=()=>{m(!p),!p&&v.current&&setTimeout(()=>{var me;(me=v.current)==null||me.focus()},100)},k=()=>{setTimeout(()=>{p||d.onBlur()},200)};O.useEffect(()=>{T(d.value)},[d.value]),O.useEffect(()=>{const me=De=>{C.current&&!C.current.contains(De.target)&&d.onBlur()};return document.addEventListener("mousedown",me),()=>{document.removeEventListener("mousedown",me)}},[d]);const X=me=>{var De;return me?me.codeISO2?me.codeISO2.toLowerCase():((De=me.code)==null?void 0:De.toLowerCase())||"":""},U=(Ee=Q.arrow)==null?void 0:Ee.x,re=(Ve=Q.arrow)==null?void 0:Ve.y,B={top:"bottom",right:"left",bottom:"top",left:"right"}[W.split("-")[0]],J=ge({onClick:$,onBlur:k}),oe=u(r),se=u(s),fe=(ie=h.error)==null?void 0:ie.message;return g.jsxs("div",{ref:C,className:`w-full relative flex flex-col gap-8 ${a}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${fe&&"!text-red-500"} text-label`,children:oe}),g.jsxs("div",{ref:R.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${fe&&"border-red-500 hover:border-red-600"} ${le?"border-blue-400":"border-blue-100"}`,...J,tabIndex:0,children:[b!=null&&b.code?g.jsxs("div",{className:"flex items-center w-full gap-10",children:[X(b)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${X(b)}.png`,srcSet:`https://flagcdn.com/w40/${X(b)}.png 2x`,alt:b.label,onError:me=>{me.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow font-600 text-body-m",children:[o==="es"&&b.labelES?b.labelES:b.label,b.code?` (${b.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:se}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${p?"transform rotate-180":""}`,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"})})]}),fe&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(fe,{x:u(c||"")||u(t)})}),le&&g.jsxs("div",{ref:R.setFloating,style:{position:D,top:P??0,left:I??0,...ue},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...de(),children:[g.jsx("div",{ref:A,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:U!=null?`${U}px`:"",top:re!=null?`${re}px`:"",right:"",bottom:"",[B]:"-2px",borderRight:B==="left"?"1px solid":"none",borderBottom:B==="top"?"1px solid":"none",borderLeft:B==="right"?"1px solid":"none",borderTop:B==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:v,type:"text",className:"w-full p-16 text-body-s",placeholder:u("search")+"...",value:x,onChange:me=>S(me.target.value),onClick:me=>me.stopPropagation(),onBlur:me=>{me.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:z.length>0?g.jsx("ul",{className:"flex flex-col",children:z.map((me,De)=>{var ws;const ft=me.codeISO2?me.codeISO2.toLowerCase():((ws=me.code)==null?void 0:ws.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:dt=>{dt.stopPropagation(),K(me)},children:[ft&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${ft}.png`,srcSet:`https://flagcdn.com/w40/${ft}.png 2x`,alt:me.label,onError:dt=>{dt.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&me.labelES?me.labelES:me.label,me.code?` (${me.code})`:"Country not found"]})]},`${me.code}-${De}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},wk=({country:e})=>{const t=n=>{var r;return n?n.codeISO2?n.codeISO2.toLowerCase():((r=n.code)==null?void 0:r.toLowerCase())||"":""};return g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${t(e)}.png`,srcSet:`https://flagcdn.com/w40/${t(e)}.png 2x`,alt:e.label,onError:n=>{n.currentTarget.style.display="none"}}),g.jsx("p",{className:"text-body-s text-gray-600",children:e.label})]})},Sk=({countries:e,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a=""})=>{const{t:c}=Ue();return g.jsx(vr.Controller,{name:t,control:n,render:({field:{onChange:u,value:d},fieldState:{error:h}})=>g.jsx(Tk,{countries:e,value:d,onChange:u,label:c(r),placeholder:c(s),language:o,error:h==null?void 0:h.message,className:a})})},Tk=({countries:e,value:t,onChange:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",error:a,className:c=""})=>{var U,re;const{t:u}=Ue(),[d,h]=O.useState(!1),[p,m]=O.useState(""),[x,S]=O.useState(t||null),b=O.useRef(null),T=O.useRef(null),{x:v,y:A,strategy:C,refs:I,context:P,placement:D,middlewareData:R}=ir({open:d,onOpenChange:h,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:B,elements:J}){Object.assign(J.floating.style,{maxHeight:`${Math.min(B-10,300)}px`})},padding:8}),ms({element:T})],placement:"bottom-start",whileElementsMounted:Qn}),F=rr(P),W=sr(P),{getReferenceProps:Q,getFloatingProps:ee}=or([F,W]),{isMounted:ae,styles:ge}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),le=(Array.isArray(e)?e:[]).filter(B=>{if(!p.trim())return!0;const J=o==="es"&&B.labelES?B.labelES.toLowerCase():B.label.toLowerCase(),oe=B.code?B.code.toLowerCase():"";return J.includes(p.toLowerCase())||oe.includes(p.toLowerCase())}),ue=B=>{S(B),h(!1),m(""),n(B)},Y=()=>{h(!d),!d&&b.current&&setTimeout(()=>{var B;(B=b.current)==null||B.focus()},100)};O.useEffect(()=>{S(t)},[t]);const z=B=>{var J;return B?B.codeISO2?B.codeISO2.toLowerCase():((J=B.code)==null?void 0:J.toLowerCase())||"":""},K=(U=R.arrow)==null?void 0:U.x,$=(re=R.arrow)==null?void 0:re.y,k={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]],X=Q({onClick:Y});return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${a&&"!text-red-500"} text-label`,children:r}),g.jsxs("div",{ref:I.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${a&&"border-red-500 hover:border-red-600"} ${ae?"border-blue-400":"border-blue-100"}`,...X,children:[x!=null&&x.code?g.jsxs("div",{className:"flex items-center w-full",children:[z(x)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${z(x)}.png`,srcSet:`https://flagcdn.com/w40/${z(x)}.png 2x`,alt:x.label,onError:B=>{B.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow",children:[o==="es"&&x.labelES?x.labelES:x.label,x.code?` (${x.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-500",children:s}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,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"})})]}),a&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:a}),ae&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ge},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...ee(),children:[g.jsx("div",{ref:T,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:K!=null?`${K}px`:"",top:$!=null?`${$}px`:"",right:"",bottom:"",[k]:"-2px",borderRight:k==="left"?"1px solid":"none",borderBottom:k==="top"?"1px solid":"none",borderLeft:k==="right"?"1px solid":"none",borderTop:k==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:b,type:"text",className:"w-full p-16",placeholder:u("search")+"...",value:p,onChange:B=>m(B.target.value),onClick:B=>B.stopPropagation(),autoFocus:!0})}),g.jsx("div",{children:le.length>0?g.jsx("ul",{className:"flex flex-col",children:le.map((B,J)=>{var se;const oe=B.codeISO2?B.codeISO2.toLowerCase():((se=B.code)==null?void 0:se.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:fe=>{fe.stopPropagation(),ue(B)},children:[oe&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${oe}.png`,srcSet:`https://flagcdn.com/w40/${oe}.png 2x`,alt:B.label,onError:fe=>{fe.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&B.labelES?B.labelES:B.label,B.code?` (${B.code})`:"Country not found"]})]},`${B.code}-${J}`)})}):g.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},sh=({variant:e="filled",color:t,size:n="base",shadow:r="none",icon:s,iconProps:o={},children:a,className:c,...u})=>{const{defaultColorScheme:d}=Ue(),h=t||d;return g.jsx("button",{...u,className:`${EN(e,h,n,r)} ${c}`,children:s?g.jsx(Pe,{...o,className:Do(n),icon:s}):a})};function Ck(e){return e!==null&&typeof e=="object"&&"name"in e&&"size"in e&&"type"in e&&typeof e.name=="string"&&typeof e.size=="number"&&typeof e.type=="string"}const Ek=({src:e,alt:t,isEditable:n=!1,onChange:r,className:s="",name:o,control:a,user:c})=>{const[u,d]=O.useState(e||null),[h,p]=O.useState(!!e),m=O.useRef(null),x=vr.useController({name:o,control:a}),S=!!a;O.useEffect(()=>{if(S){const A=x==null?void 0:x.field.value;if(Ck(A)){const C=URL.createObjectURL(A);return d(C),p(!0),()=>URL.revokeObjectURL(C)}else typeof A=="string"&&A&&A!==e?(d(A),p(!0)):e?(d(e),p(!0)):(d(null),p(!1))}},[x==null?void 0:x.field.value,e]);const b=()=>{var A;n&&((A=m.current)==null||A.click())},T=A=>{var I;const C=(I=A.target.files)==null?void 0:I[0];if(C){const P=URL.createObjectURL(C);d(P),p(!0),S&&(x==null||x.field.onChange(C)),r&&r(C)}},v=A=>{A.stopPropagation(),d(null),p(!1),m.current&&(m.current.value=""),S&&(x==null||x.field.onChange(null)),r&&r(null)};return g.jsxs("div",{className:"relative flex items-center gap-10",children:[n&&h&&g.jsx("button",{type:"button",onClick:v,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),g.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${n?"cursor-pointer hover:opacity-80":""} ${s}`,onClick:b,children:[u?g.jsx("img",{src:u,alt:t,className:"w-full h-full object-cover rounded-full"}):g.jsx(u2,{size:60,user:c}),n&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"file",ref:A=>{m.current=A,x&&x.field.ref(A)},onChange:T,onBlur:x==null?void 0:x.field.onBlur,accept:"image/*",className:"hidden"}),!h&&g.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:g.jsx(Pe,{icon:HD,className:"text-blue-500"})})]})]})]})},Pk=rh({name:Vr(),base64:Vr()}),Ak=({imageUrl:e,title:t,subtitle:n})=>g.jsxs("section",{className:"gap-10 flex flex-col items-center justify-center",children:[g.jsx("img",{src:e,alt:t,width:100,height:100}),g.jsx("h1",{className:"font-bold text-2xl align-middle",children:t}),g.jsx("p",{className:"text-lg align-middle font-semibold text-gray-500",children:n})]}),Mk=e=>{switch(e){case"small":return{containerStyles:"p-12",titleStyles:"text-sm",descriptionStyles:"text-xs",iconStyles:"p-4 text-xs"};case"normal":return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"};default:return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"}}},Ok=e=>{switch(e){case"success":return"bg-green-100 text-green-500";case"warning":return"bg-yellow-100 text-yellow-500";case"error":return"bg-red-100 text-red-500";case"informative":return"bg-blue-100 text-blue-500";default:return"bg-blue-100 text-blue-500"}},$k=e=>{switch(e){case"success":return t0;case"warning":return Ui;case"error":return s0;case"informative":return n0;default:return"info"}},_k=({description:e,title:t,showIcon:n=!0,type:r="informative",size:s="normal"})=>{const o=Mk(s),a=$k(r),c=Ok(r);return g.jsx("div",{className:`w-full rounded-xl bg-white border border-blue-100 ${o.containerStyles}`,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:"flex items-center gap-12",children:[n&&g.jsx(Pe,{icon:a,className:`rounded-full ${o.iconStyles} ${c}`}),g.jsx("h5",{className:`font-semibold text-blue-900 self-center ${o.titleStyles}`,children:t})]}),e&&g.jsx("p",{className:`text-gray-500 leading-[16px] ${o.descriptionStyles}`,children:e})]})})},Ik=[{rotate:"0deg",delay:"0s"},{rotate:"90deg",delay:"0.3s"},{rotate:"270deg",delay:"0.9s"},{rotate:"180deg",delay:"0.6s"}],Dk=({variant:e="circle",size:t=16,color:n="#1DA696",...r})=>{const{className:s="",...o}=r;if(e==="cube"){const d=t/Math.SQRT2;return g.jsx("div",{...o,className:`relative flex items-center justify-center overflow-hidden ${s}`,style:{width:t,height:t},children:g.jsx("div",{className:"relative rotate-45",style:{width:d,height:d},children:Ik.map((h,p)=>g.jsx("div",{className:"float-left w-1/2 h-1/2 relative",style:{transform:`scale(1.1) rotate(${h.rotate})`},children:g.jsx("span",{className:"absolute inset-0 origin-bottom-right animate-sk-fold-cube",style:{backgroundColor:n,animationDelay:h.delay}})},p))})})}const a=Math.max(1,Math.round(t*.125)),c=(t-a)/2,u=2*Math.PI*c;return g.jsx("div",{...o,className:`relative flex items-center justify-center ${s}`,children:g.jsx("svg",{height:t,width:t,className:"animate-spin",children:g.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:a,strokeDasharray:`${u} ${u}`,strokeDashoffset:u/4,r:c,cx:t/2,cy:t/2})})})},Nk=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,size:a="md",leftSide:c})=>{const{field:{value:u="",onChange:d,ref:h,onBlur:p},fieldState:{error:m}}=vr.useController({name:n,control:t}),[x,S]=O.useState(!1),{t:b}=Ue(),v={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8"}}[a];return g.jsxs("label",{className:`flex flex-col group select-none ${v.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${m&&"!text-red-500"} ${v.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
739
+ `+(c!==a?`result of cast: ${c}`:""))}return o}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((s,o)=>o.call(this,s,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,s){let{path:o,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:o,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return s(h,u);this.runTests({path:o,value:u,originalValue:a,options:n,tests:this.tests},r,s)})}runTests(t,n,r){let s=!1,{tests:o,value:a,originalValue:c,path:u,options:d}=t,h=b=>{s||(s=!0,n(b,a))},p=b=>{s||(s=!0,r(b,a))},m=o.length,x=[];if(!m)return p([]);let S={value:a,originalValue:c,path:u,options:d,schema:this};for(let b=0;b<o.length;b++){const T=o[b];T(S,h,function(A){A&&(Array.isArray(A)?x.push(...A):x.push(A)),--m<=0&&p(x)})}}asNestedTest({key:t,index:n,parent:r,parentPath:s,originalParent:o,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:o[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${s||""}[${u?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(p,m,x)=>this.resolve(h)._validate(d,h,m,x)}validate(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((a,c)=>s._validate(t,n,(u,d)=>{jt.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new jt(u,d,void 0,void 0,o)):a(d)}))}validateSync(t,n){var r;let s=this.resolve(Object.assign({},n,{value:t})),o,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw jt.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new jt(c,t,void 0,void 0,a);o=u}),o}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(jt.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(jt.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):vi(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=xi({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=xi({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Rn.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rn.notNull){return this.nullability(!1,t)}required(t=Rn.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Rn.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=xi(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(o||a.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),s=y2(t).map(o=>new vs(o));return s.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(typeof n=="function"?new dl(s,n):dl.fromOptions(s,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=xi({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Rn.oneOf){let r=this.clone();return t.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=xi({message:n,name:"oneOf",skipAbsent:!0,test(s){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(s)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),r}notOneOf(t,n=Rn.notOneOf){let r=this.clone();return t.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=xi({message:n,name:"notOneOf",test(s){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(s)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:s,optional:o,nullable:a}=n.spec;return{meta:s,label:r,optional:o,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(p=>p.name===u.name)===d)}}}Fn.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Fn.prototype[`${e}At`]=function(t,n,r={}){const{parent:s,parentPath:o,schema:a}=nk(this,t,n,r.context);return a[e](s&&s[o],Object.assign({},r,{parent:s,path:t}))};for(const e of["equals","is"])Fn.prototype[e]=Fn.prototype.oneOf;for(const e of["not","nope"])Fn.prototype[e]=Fn.prototype.notOneOf;const rk=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function sk(e){const t=th(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function th(e){var t,n;const r=rk.exec(e);return r?{year:lr(r[1]),month:lr(r[2],1)-1,day:lr(r[3],1),hour:lr(r[4]),minute:lr(r[5]),second:lr(r[6]),millisecond:r[7]?lr(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:lr(r[10]),minuteOffset:lr(r[11])}:null}function lr(e,t=0){return Number(e)||t}let ik=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ok=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ak=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lk="^\\d{4}-\\d{2}-\\d{2}",ck="\\d{2}:\\d{2}:\\d{2}",uk="(([+-]\\d{2}(:?\\d{2})?)|Z)",fk=new RegExp(`${lk}T${ck}(\\.\\d+)?${uk}$`),dk=e=>bs(e)||e===e.trim(),hk={}.toString();function Vr(){return new S2}class S2 extends Fn{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===hk?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Rn.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Lt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=Lt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=Lt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,s,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:o}=n:s=n),this.test({name:o||"matches",message:s||Lt.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=Lt.email){return this.matches(ik,{name:"email",message:t,excludeEmptyString:!0})}url(t=Lt.url){return this.matches(ok,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Lt.uuid){return this.matches(ak,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,s;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:s=void 0}=t:n=t),this.matches(fk,{name:"datetime",message:n||Lt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Lt.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:o=>{if(!o||r)return!0;const a=th(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||Lt.datetime_precision,params:{precision:s},skipAbsent:!0,test:o=>{if(!o||s==null)return!0;const a=th(o);return a?a.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Lt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:dk})}lowercase(t=Lt.lowercase){return this.transform(n=>bs(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toLowerCase()})}uppercase(t=Lt.uppercase){return this.transform(n=>bs(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>bs(n)||n===n.toUpperCase()})}}Vr.prototype=S2.prototype;let pk=new Date(""),mk=e=>Object.prototype.toString.call(e)==="[object Date]";class nh extends Fn{constructor(){super({type:"date",check(t){return mk(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=sk(t),isNaN(t)?nh.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(vs.isRef(t))r=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(t,n=Qd.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(t,n=Qd.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}nh.INVALID_DATE=pk;function gk(e,t=[]){let n=[],r=new Set,s=new Set(t.map(([a,c])=>`${a}-${c}`));function o(a,c){let u=xs.split(a)[0];r.add(u),s.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),vs.isRef(c)&&c.isSibling?o(c.path,a):eh(c)&&"deps"in c&&c.deps.forEach(u=>o(u,a))}return YN.array(Array.from(r),n).reverse()}function T2(e,t){let n=1/0;return e.some((r,s)=>{var o;if((o=t.path)!=null&&o.includes(r))return n=s,!0}),n}function C2(e){return(t,n)=>T2(e,t)-T2(e,n)}const yk=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function ml(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=ml(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=ml(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(ml)}):"optional"in e?e.optional():e}const xk=(e,t)=>{const n=[...xs.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),s=xs.getter(xs.join(n),!0)(e);return!!(s&&r in s)};let E2=e=>Object.prototype.toString.call(e)==="[object Object]";function P2(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const vk=C2([]);function rh(e){return new A2(e)}class A2 extends Fn{constructor(t){super({type:"object",check(n){return E2(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=vk,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let o=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const p of c){let m=o[p],x=p in s;if(m){let S,b=s[p];d.path=(n.path?`${n.path}.`:"")+p,m=m.resolve({value:b,context:n.context,parent:u});let T=m instanceof Fn?m.spec:void 0,v=T==null?void 0:T.strict;if(T!=null&&T.strip){h=h||p in s;continue}S=!n.__validating||!v?m.cast(s[p],d):s[p],S!==void 0&&(u[p]=S)}else x&&!a&&(u[p]=s[p]);(x!==p in u||u[p]!==s[p])&&(h=!0)}return h?u:s}_validate(t,n={},r,s){let{from:o=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...o],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!E2(d)){s(u,d);return}a=a||d;let h=[];for(let p of this._nodes){let m=this.fields[p];!m||vs.isRef(m)||h.push(m.asNestedTest({options:n,key:p,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,p=>{s(p.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[s,o]of Object.entries(this.fields)){const a=r[s];r[s]=a===void 0?o:a}return n.withMutation(s=>s.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var s;const o=this.fields[r];let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=o&&"getDefault"in o?o.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=gk(t,n),r._sortErrors=C2(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let s=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),s)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return ml(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,s])=>t.includes(r)&&t.includes(s)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let s=xs.getter(t,!0);return this.transform(o=>{if(!o)return o;let a=o;return xk(o,t)&&(a=Object.assign({},o),r||delete a[t],a[n]=s(o)),a})}json(){return this.transform(yk)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||fl.exact,test(n){if(n==null)return!0;const r=P2(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=fl.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const o=P2(this.schema,s);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=fl.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const s of Object.keys(n))r[t(s)]=n[s];return r})}camelCase(){return this.transformKeys(Jd.camelCase)}snakeCase(){return this.transformKeys(Jd.snakeCase)}constantCase(){return this.transformKeys(t=>Jd.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[o,a]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[o]})),r.fields[o]=a.describe(c)}return r}}rh.prototype=A2.prototype,rh().shape({labelES:Vr().required(),label:Vr().required(),code:Vr().required(),codeISO2:Vr().required(),phone:Vr().required()});const M2=[{labelES:"Afganistán",label:"Afghanistan",codeISO2:"AF",code:"AFG",phone:"93"},{labelES:"Albania",label:"Albania",codeISO2:"AL",code:"ALB",phone:"355"},{labelES:"Alemania",label:"Germany",codeISO2:"DE",code:"DEU",phone:"49"},{labelES:"Andorra",label:"Andorra",codeISO2:"AD",code:"AND",phone:"376"},{labelES:"Angola",label:"Angola",codeISO2:"AO",code:"AGO",phone:"244"},{labelES:"Anguila",label:"Anguilla",codeISO2:"AI",code:"AIA",phone:"1 264"},{labelES:"Antártida",label:"Antarctica",codeISO2:"AQ",code:"ATA",phone:"672"},{labelES:"Antigua y Barbuda",label:"Antigua and Barbuda",codeISO2:"AG",code:"ATG",phone:"1 268"},{labelES:"Arabia Saudita",label:"Saudi Arabia",codeISO2:"SA",code:"SAU",phone:"966"},{labelES:"Argelia",label:"Algeria",codeISO2:"DZ",code:"DZA",phone:"213"},{labelES:"Argentina",label:"Argentina",codeISO2:"AR",code:"ARG",phone:"54"},{labelES:"Armenia",label:"Armenia",codeISO2:"AM",code:"ARM",phone:"374"},{labelES:"Aruba",label:"Aruba",codeISO2:"AW",code:"ABW",phone:"297"},{labelES:"Australia",label:"Australia",codeISO2:"AU",code:"AUS",phone:"61"},{labelES:"Austria",label:"Austria",codeISO2:"AT",code:"AUT",phone:"43"},{labelES:"Azerbaiyán",label:"Azerbaijan",codeISO2:"AZ",code:"AZE",phone:"994"},{labelES:"Bélgica",label:"Belgium",codeISO2:"BE",code:"BEL",phone:"32"},{labelES:"Bahamas",label:"Bahamas",codeISO2:"BS",code:"BHS",phone:"1 242"},{labelES:"Bahrein",label:"Bahrain",codeISO2:"BH",code:"BHR",phone:"973"},{labelES:"Bangladesh",label:"Bangladesh",codeISO2:"BD",code:"BGD",phone:"880"},{labelES:"Barbados",label:"Barbados",codeISO2:"BB",code:"BRB",phone:"1 246"},{labelES:"Belice",label:"Belize",codeISO2:"BZ",code:"BLZ",phone:"501"},{labelES:"Benín",label:"Benin",codeISO2:"BJ",code:"BEN",phone:"229"},{labelES:"Bhután",label:"Bhutan",codeISO2:"BT",code:"BTN",phone:"975"},{labelES:"Bielorrusia",label:"Belarus",codeISO2:"BY",code:"BLR",phone:"375"},{labelES:"Birmania",label:"Myanmar",codeISO2:"MM",code:"MMR",phone:"95"},{labelES:"Bolivia",label:"Bolivia",codeISO2:"BO",code:"BOL",phone:"591"},{labelES:"Bosnia y Herzegovina",label:"Bosnia and Herzegovina",codeISO2:"BA",code:"BIH",phone:"387"},{labelES:"Botsuana",label:"Botswana",codeISO2:"BW",code:"BWA",phone:"267"},{labelES:"Brasil",label:"Brazil",codeISO2:"BR",code:"BRA",phone:"55"},{labelES:"Brunéi",label:"Brunei",codeISO2:"BN",code:"BRN",phone:"673"},{labelES:"Bulgaria",label:"Bulgaria",codeISO2:"BG",code:"BGR",phone:"359"},{labelES:"Burkina Faso",label:"Burkina Faso",codeISO2:"BF",code:"BFA",phone:"226"},{labelES:"Burundi",label:"Burundi",codeISO2:"BI",code:"BDI",phone:"257"},{labelES:"Cabo Verde",label:"Cape Verde",codeISO2:"CV",code:"CPV",phone:"238"},{labelES:"Camboya",label:"Cambodia",codeISO2:"KH",code:"KHM",phone:"855"},{labelES:"Camerún",label:"Cameroon",codeISO2:"CM",code:"CMR",phone:"237"},{labelES:"Canadá",label:"Canada",codeISO2:"CA",code:"CAN",phone:"1"},{labelES:"Chad",label:"Chad",codeISO2:"TD",code:"TCD",phone:"235"},{labelES:"Chile",label:"Chile",codeISO2:"CL",code:"CHL",phone:"56"},{labelES:"China",label:"China",codeISO2:"CN",code:"CHN",phone:"86"},{labelES:"Chipre",label:"Cyprus",codeISO2:"CY",code:"CYP",phone:"357"},{labelES:"Ciudad del Vaticano",label:"Vatican City State",codeISO2:"VA",code:"VAT",phone:"39"},{labelES:"Colombia",label:"Colombia",codeISO2:"CO",code:"COL",phone:"57"},{labelES:"Comoras",label:"Comoros",codeISO2:"KM",code:"COM",phone:"269"},{labelES:"República del Congo",label:"Republic of the Congo",codeISO2:"CG",code:"COG",phone:"242"},{labelES:"República Democrática del Congo",label:"Democratic Republic of the Congo",codeISO2:"CD",code:"COD",phone:"243"},{labelES:"Corea del Norte",label:"North Korea",codeISO2:"KP",code:"PRK",phone:"850"},{labelES:"Corea del Sur",label:"South Korea",codeISO2:"KR",code:"KOR",phone:"82"},{labelES:"Costa de Marfil",label:"Ivory Coast",codeISO2:"CI",code:"CIV",phone:"225"},{labelES:"Costa Rica",label:"Costa Rica",codeISO2:"CR",code:"CRI",phone:"506"},{labelES:"Croacia",label:"Croatia",codeISO2:"HR",code:"HRV",phone:"385"},{labelES:"Cuba",label:"Cuba",codeISO2:"CU",code:"CUB",phone:"53"},{labelES:"Curazao",label:"Curaçao",codeISO2:"CW",code:"CWU",phone:"5999"},{labelES:"Dinamarca",label:"Denmark",codeISO2:"DK",code:"DNK",phone:"45"},{labelES:"Dominica",label:"Dominica",codeISO2:"DM",code:"DMA",phone:"1 767"},{labelES:"Ecuador",label:"Ecuador",codeISO2:"EC",code:"ECU",phone:"593"},{labelES:"Egipto",label:"Egypt",codeISO2:"EG",code:"EGY",phone:"20"},{labelES:"El Salvador",label:"El Salvador",codeISO2:"SV",code:"SLV",phone:"503"},{labelES:"Emiratos Árabes Unidos",label:"United Arab Emirates",codeISO2:"AE",code:"ARE",phone:"971"},{labelES:"Eritrea",label:"Eritrea",codeISO2:"ER",code:"ERI",phone:"291"},{labelES:"Eslovaquia",label:"Slovakia",codeISO2:"SK",code:"SVK",phone:"421"},{labelES:"Eslovenia",label:"Slovenia",codeISO2:"SI",code:"SVN",phone:"386"},{labelES:"España",label:"Spain",codeISO2:"ES",code:"ESP",phone:"34"},{labelES:"Estados Unidos de América",label:"United States of America",codeISO2:"US",code:"USA",phone:"1"},{labelES:"Estonia",label:"Estonia",codeISO2:"EE",code:"EST",phone:"372"},{labelES:"Etiopía",label:"Ethiopia",codeISO2:"ET",code:"ETH",phone:"251"},{labelES:"Filipinas",label:"Philippines",codeISO2:"PH",code:"PHL",phone:"63"},{labelES:"Finlandia",label:"Finland",codeISO2:"FI",code:"FIN",phone:"358"},{labelES:"Fiyi",label:"Fiji",codeISO2:"FJ",code:"FJI",phone:"679"},{labelES:"Francia",label:"France",codeISO2:"FR",code:"FRA",phone:"33"},{labelES:"Gabón",label:"Gabon",codeISO2:"GA",code:"GAB",phone:"241"},{labelES:"Gambia",label:"Gambia",codeISO2:"GM",code:"GMB",phone:"220"},{labelES:"Georgia",label:"Georgia",codeISO2:"GE",code:"GEO",phone:"995"},{labelES:"Ghana",label:"Ghana",codeISO2:"GH",code:"GHA",phone:"233"},{labelES:"Gibraltar",label:"Gibraltar",codeISO2:"GI",code:"GIB",phone:"350"},{labelES:"Granada",label:"Grenada",codeISO2:"GD",code:"GRD",phone:"1 473"},{labelES:"Grecia",label:"Greece",codeISO2:"GR",code:"GRC",phone:"30"},{labelES:"Groenlandia",label:"Greenland",codeISO2:"GL",code:"GRL",phone:"299"},{labelES:"Guadalupe",label:"Guadeloupe",codeISO2:"GP",code:"GLP",phone:"590"},{labelES:"Guam",label:"Guam",codeISO2:"GU",code:"GUM",phone:"1 671"},{labelES:"Guatemala",label:"Guatemala",codeISO2:"GT",code:"GTM",phone:"502"},{labelES:"Guayana Francesa",label:"French Guiana",codeISO2:"GF",code:"GUF",phone:"594"},{labelES:"Guernsey",label:"Guernsey",codeISO2:"GG",code:"GGY",phone:"44"},{labelES:"Guinea",label:"Guinea",codeISO2:"GN",code:"GIN",phone:"224"},{labelES:"Guinea Ecuatorial",label:"Equatorial Guinea",codeISO2:"GQ",code:"GNQ",phone:"240"},{labelES:"Guinea-Bissau",label:"Guinea-Bissau",codeISO2:"GW",code:"GNB",phone:"245"},{labelES:"Guyana",label:"Guyana",codeISO2:"GY",code:"GUY",phone:"592"},{labelES:"Haití",label:"Haiti",codeISO2:"HT",code:"HTI",phone:"509"},{labelES:"Honduras",label:"Honduras",codeISO2:"HN",code:"HND",phone:"504"},{labelES:"Hong kong",label:"Hong Kong",codeISO2:"HK",code:"HKG",phone:"852"},{labelES:"Hungría",label:"Hungary",codeISO2:"HU",code:"HUN",phone:"36"},{labelES:"India",label:"India",codeISO2:"IN",code:"IND",phone:"91"},{labelES:"Indonesia",label:"Indonesia",codeISO2:"ID",code:"IDN",phone:"62"},{labelES:"Irán",label:"Iran",codeISO2:"IR",code:"IRN",phone:"98"},{labelES:"Irak",label:"Iraq",codeISO2:"IQ",code:"IRQ",phone:"964"},{labelES:"Irlanda",label:"Ireland",codeISO2:"IE",code:"IRL",phone:"353"},{labelES:"Isla Bouvet",label:"Bouvet Island",codeISO2:"BV",code:"BVT",phone:""},{labelES:"Isla de Man",label:"Isle of Man",codeISO2:"IM",code:"IMN",phone:"44"},{labelES:"Isla de Navidad",label:"Christmas Island",codeISO2:"CX",code:"CXR",phone:"61"},{labelES:"Isla Norfolk",label:"Norfolk Island",codeISO2:"NF",code:"NFK",phone:"672"},{labelES:"Islandia",label:"Iceland",codeISO2:"IS",code:"ISL",phone:"354"},{labelES:"Islas Bermudas",label:"Bermuda Islands",codeISO2:"BM",code:"BMU",phone:"1 441"},{labelES:"Islas Caimán",label:"Cayman Islands",codeISO2:"KY",code:"CYM",phone:"1 345"},{labelES:"Islas Cocos (Keeling)",label:"Cocos (Keeling) Islands",codeISO2:"CC",code:"CCK",phone:"61"},{labelES:"Islas Cook",label:"Cook Islands",codeISO2:"CK",code:"COK",phone:"682"},{labelES:"Islas de Åland",label:"Åland Islands",codeISO2:"AX",code:"ALA",phone:"358"},{labelES:"Islas Feroe",label:"Faroe Islands",codeISO2:"FO",code:"FRO",phone:"298"},{labelES:"Islas Georgias del Sur y Sandwich del Sur",label:"South Georgia and the South Sandwich Islands",codeISO2:"GS",code:"SGS",phone:"500"},{labelES:"Islas Heard y McDonald",label:"Heard Island and McDonald Islands",codeISO2:"HM",code:"HMD",phone:""},{labelES:"Islas Maldivas",label:"Maldives",codeISO2:"MV",code:"MDV",phone:"960"},{labelES:"Islas Malvinas",label:"Falkland Islands (Malvinas)",codeISO2:"FK",code:"FLK",phone:"500"},{labelES:"Islas Marianas del Norte",label:"Northern Mariana Islands",codeISO2:"MP",code:"MNP",phone:"1 670"},{labelES:"Islas Marshall",label:"Marshall Islands",codeISO2:"MH",code:"MHL",phone:"692"},{labelES:"Islas Pitcairn",label:"Pitcairn Islands",codeISO2:"PN",code:"PCN",phone:"870"},{labelES:"Islas Salomón",label:"Solomon Islands",codeISO2:"SB",code:"SLB",phone:"677"},{labelES:"Islas Turcas y Caicos",label:"Turks and Caicos Islands",codeISO2:"TC",code:"TCA",phone:"1 649"},{labelES:"Islas Ultramarinas Menores de Estados Unidos",label:"United States Minor Outlying Islands",codeISO2:"UM",code:"UMI",phone:"246"},{labelES:"Islas Vírgenes Británicas",label:"Virgin Islands",codeISO2:"VG",code:"VGB",phone:"1 284"},{labelES:"Islas Vírgenes de los Estados Unidos",label:"United States Virgin Islands",codeISO2:"VI",code:"VIR",phone:"1 340"},{labelES:"Israel",label:"Israel",codeISO2:"IL",code:"ISR",phone:"972"},{labelES:"Italia",label:"Italy",codeISO2:"IT",code:"ITA",phone:"39"},{labelES:"Jamaica",label:"Jamaica",codeISO2:"JM",code:"JAM",phone:"1 876"},{labelES:"Japón",label:"Japan",codeISO2:"JP",code:"JPN",phone:"81"},{labelES:"Jersey",label:"Jersey",codeISO2:"JE",code:"JEY",phone:"44"},{labelES:"Jordania",label:"Jordan",codeISO2:"JO",code:"JOR",phone:"962"},{labelES:"Kazajistán",label:"Kazakhstan",codeISO2:"KZ",code:"KAZ",phone:"7"},{labelES:"Kenia",label:"Kenya",codeISO2:"KE",code:"KEN",phone:"254"},{labelES:"Kirguistán",label:"Kyrgyzstan",codeISO2:"KG",code:"KGZ",phone:"996"},{labelES:"Kiribati",label:"Kiribati",codeISO2:"KI",code:"KIR",phone:"686"},{labelES:"Kuwait",label:"Kuwait",codeISO2:"KW",code:"KWT",phone:"965"},{labelES:"Líbano",label:"Lebanon",codeISO2:"LB",code:"LBN",phone:"961"},{labelES:"Laos",label:"Laos",codeISO2:"LA",code:"LAO",phone:"856"},{labelES:"Lesoto",label:"Lesotho",codeISO2:"LS",code:"LSO",phone:"266"},{labelES:"Letonia",label:"Latvia",codeISO2:"LV",code:"LVA",phone:"371"},{labelES:"Liberia",label:"Liberia",codeISO2:"LR",code:"LBR",phone:"231"},{labelES:"Libia",label:"Libya",codeISO2:"LY",code:"LBY",phone:"218"},{labelES:"Liechtenstein",label:"Liechtenstein",codeISO2:"LI",code:"LIE",phone:"423"},{labelES:"Lituania",label:"Lithuania",codeISO2:"LT",code:"LTU",phone:"370"},{labelES:"Luxemburgo",label:"Luxembourg",codeISO2:"LU",code:"LUX",phone:"352"},{labelES:"México",label:"Mexico",codeISO2:"MX",code:"MEX",phone:"52"},{labelES:"Mónaco",label:"Monaco",codeISO2:"MC",code:"MCO",phone:"377"},{labelES:"Macao",label:"Macao",codeISO2:"MO",code:"MAC",phone:"853"},{labelES:"Macedônia",label:"Macedonia",codeISO2:"MK",code:"MKD",phone:"389"},{labelES:"Madagascar",label:"Madagascar",codeISO2:"MG",code:"MDG",phone:"261"},{labelES:"Malasia",label:"Malaysia",codeISO2:"MY",code:"MYS",phone:"60"},{labelES:"Malawi",label:"Malawi",codeISO2:"MW",code:"MWI",phone:"265"},{labelES:"Mali",label:"Mali",codeISO2:"ML",code:"MLI",phone:"223"},{labelES:"Malta",label:"Malta",codeISO2:"MT",code:"MLT",phone:"356"},{labelES:"Marruecos",label:"Morocco",codeISO2:"MA",code:"MAR",phone:"212"},{labelES:"Martinica",label:"Martinique",codeISO2:"MQ",code:"MTQ",phone:"596"},{labelES:"Mauricio",label:"Mauritius",codeISO2:"MU",code:"MUS",phone:"230"},{labelES:"Mauritania",label:"Mauritania",codeISO2:"MR",code:"MRT",phone:"222"},{labelES:"Mayotte",label:"Mayotte",codeISO2:"YT",code:"MYT",phone:"262"},{labelES:"Micronesia",label:"Estados Federados de",codeISO2:"FM",code:"FSM",phone:"691"},{labelES:"Moldavia",label:"Moldova",codeISO2:"MD",code:"MDA",phone:"373"},{labelES:"Mongolia",label:"Mongolia",codeISO2:"MN",code:"MNG",phone:"976"},{labelES:"Montenegro",label:"Montenegro",codeISO2:"ME",code:"MNE",phone:"382"},{labelES:"Montserrat",label:"Montserrat",codeISO2:"MS",code:"MSR",phone:"1 664"},{labelES:"Mozambique",label:"Mozambique",codeISO2:"MZ",code:"MOZ",phone:"258"},{labelES:"Namibia",label:"Namibia",codeISO2:"NA",code:"NAM",phone:"264"},{labelES:"Nauru",label:"Nauru",codeISO2:"NR",code:"NRU",phone:"674"},{labelES:"Nepal",label:"Nepal",codeISO2:"NP",code:"NPL",phone:"977"},{labelES:"Nicaragua",label:"Nicaragua",codeISO2:"NI",code:"NIC",phone:"505"},{labelES:"Niger",label:"Niger",codeISO2:"NE",code:"NER",phone:"227"},{labelES:"Nigeria",label:"Nigeria",codeISO2:"NG",code:"NGA",phone:"234"},{labelES:"Niue",label:"Niue",codeISO2:"NU",code:"NIU",phone:"683"},{labelES:"Noruega",label:"Norway",codeISO2:"NO",code:"NOR",phone:"47"},{labelES:"Nueva Caledonia",label:"New Caledonia",codeISO2:"NC",code:"NCL",phone:"687"},{labelES:"Nueva Zelanda",label:"New Zealand",codeISO2:"NZ",code:"NZL",phone:"64"},{labelES:"Omán",label:"Oman",codeISO2:"OM",code:"OMN",phone:"968"},{labelES:"Países Bajos",label:"Netherlands",codeISO2:"NL",code:"NLD",phone:"31"},{labelES:"Pakistán",label:"Pakistan",codeISO2:"PK",code:"PAK",phone:"92"},{labelES:"Palau",label:"Palau",codeISO2:"PW",code:"PLW",phone:"680"},{labelES:"Palestina",label:"Palestine",codeISO2:"PS",code:"PSE",phone:"970"},{labelES:"Panamá",label:"Panama",codeISO2:"PA",code:"PAN",phone:"507"},{labelES:"Papúa Nueva Guinea",label:"Papua New Guinea",codeISO2:"PG",code:"PNG",phone:"675"},{labelES:"Paraguay",label:"Paraguay",codeISO2:"PY",code:"PRY",phone:"595"},{labelES:"Perú",label:"Peru",codeISO2:"PE",code:"PER",phone:"51"},{labelES:"Polinesia Francesa",label:"French Polynesia",codeISO2:"PF",code:"PYF",phone:"689"},{labelES:"Polonia",label:"Poland",codeISO2:"PL",code:"POL",phone:"48"},{labelES:"Portugal",label:"Portugal",codeISO2:"PT",code:"PRT",phone:"351"},{labelES:"Puerto Rico",label:"Puerto Rico",codeISO2:"PR",code:"PRI",phone:"1"},{labelES:"Qatar",label:"Qatar",codeISO2:"QA",code:"QAT",phone:"974"},{labelES:"Reino Unido",label:"United Kingdom",codeISO2:"GB",code:"GBR",phone:"44"},{labelES:"República Centroafricana",label:"Central African Republic",codeISO2:"CF",code:"CAF",phone:"236"},{labelES:"República Checa",label:"Czech Republic",codeISO2:"CZ",code:"CZE",phone:"420"},{labelES:"República Dominicana",label:"Dominican Republic",codeISO2:"DO",code:"DOM",phone:"1 809"},{labelES:"República de Sudán del Sur",label:"South Sudan",codeISO2:"SS",code:"SSD",phone:"211"},{labelES:"Reunión",label:"Réunion",codeISO2:"RE",code:"REU",phone:"262"},{labelES:"Ruanda",label:"Rwanda",codeISO2:"RW",code:"RWA",phone:"250"},{labelES:"Rumanía",label:"Romania",codeISO2:"RO",code:"ROU",phone:"40"},{labelES:"Rusia",label:"Russia",codeISO2:"RU",code:"RUS",phone:"7"},{labelES:"Sahara Occidental",label:"Western Sahara",codeISO2:"EH",code:"ESH",phone:"212"},{labelES:"Samoa",label:"Samoa",codeISO2:"WS",code:"WSM",phone:"685"},{labelES:"Samoa Americana",label:"American Samoa",codeISO2:"AS",code:"ASM",phone:"1 684"},{labelES:"San Bartolomé",label:"Saint Barthélemy",codeISO2:"BL",code:"BLM",phone:"590"},{labelES:"San Cristóbal y Nieves",label:"Saint Kitts and Nevis",codeISO2:"KN",code:"KNA",phone:"1 869"},{labelES:"San Marino",label:"San Marino",codeISO2:"SM",code:"SMR",phone:"378"},{labelES:"San Martín (Francia)",label:"Saint Martin (French part)",codeISO2:"MF",code:"MAF",phone:"1 599"},{labelES:"San Pedro y Miquelón",label:"Saint Pierre and Miquelon",codeISO2:"PM",code:"SPM",phone:"508"},{labelES:"San Vicente y las Granadinas",label:"Saint Vincent and the Grenadines",codeISO2:"VC",code:"VCT",phone:"1 784"},{labelES:"Santa Elena",label:"Ascensión y Tristán de Acuña",codeISO2:"SH",code:"SHN",phone:"290"},{labelES:"Santa Lucía",label:"Saint Lucia",codeISO2:"LC",code:"LCA",phone:"1 758"},{labelES:"Santo Tomé y Príncipe",label:"Sao Tome and Principe",codeISO2:"ST",code:"STP",phone:"239"},{labelES:"Senegal",label:"Senegal",codeISO2:"SN",code:"SEN",phone:"221"},{labelES:"Serbia",label:"Serbia",codeISO2:"RS",code:"SRB",phone:"381"},{labelES:"Seychelles",label:"Seychelles",codeISO2:"SC",code:"SYC",phone:"248"},{labelES:"Sierra Leona",label:"Sierra Leone",codeISO2:"SL",code:"SLE",phone:"232"},{labelES:"Singapur",label:"Singapore",codeISO2:"SG",code:"SGP",phone:"65"},{labelES:"Sint Maarten",label:"Sint Maarten",codeISO2:"SX",code:"SMX",phone:"1 721"},{labelES:"Siria",label:"Syria",codeISO2:"SY",code:"SYR",phone:"963"},{labelES:"Somalia",label:"Somalia",codeISO2:"SO",code:"SOM",phone:"252"},{labelES:"Sri lanka",label:"Sri Lanka",codeISO2:"LK",code:"LKA",phone:"94"},{labelES:"Sudáfrica",label:"South Africa",codeISO2:"ZA",code:"ZAF",phone:"27"},{labelES:"Sudán",label:"Sudan",codeISO2:"SD",code:"SDN",phone:"249"},{labelES:"Suecia",label:"Sweden",codeISO2:"SE",code:"SWE",phone:"46"},{labelES:"Suiza",label:"Switzerland",codeISO2:"CH",code:"CHE",phone:"41"},{labelES:"Surinám",label:"Suriname",codeISO2:"SR",code:"SUR",phone:"597"},{labelES:"Svalbard y Jan Mayen",label:"Svalbard and Jan Mayen",codeISO2:"SJ",code:"SJM",phone:"47"},{labelES:"Swazilandia",label:"Swaziland",codeISO2:"SZ",code:"SWZ",phone:"268"},{labelES:"Tayikistán",label:"Tajikistan",codeISO2:"TJ",code:"TJK",phone:"992"},{labelES:"Tailandia",label:"Thailand",codeISO2:"TH",code:"THA",phone:"66"},{labelES:"Taiwán",label:"Taiwan",codeISO2:"TW",code:"TWN",phone:"886"},{labelES:"Tanzania",label:"Tanzania",codeISO2:"TZ",code:"TZA",phone:"255"},{labelES:"Territorio Británico del Océano Índico",label:"British Indian Ocean Territory",codeISO2:"IO",code:"IOT",phone:"246"},{labelES:"Territorios Australes y Antárticas Franceses",label:"French Southern Territories",codeISO2:"TF",code:"ATF",phone:""},{labelES:"Timor Oriental",label:"East Timor",codeISO2:"TL",code:"TLS",phone:"670"},{labelES:"Togo",label:"Togo",codeISO2:"TG",code:"TGO",phone:"228"},{labelES:"Tokelau",label:"Tokelau",codeISO2:"TK",code:"TKL",phone:"690"},{labelES:"Tonga",label:"Tonga",codeISO2:"TO",code:"TON",phone:"676"},{labelES:"Trinidad y Tobago",label:"Trinidad and Tobago",codeISO2:"TT",code:"TTO",phone:"1 868"},{labelES:"Tunez",label:"Tunisia",codeISO2:"TN",code:"TUN",phone:"216"},{labelES:"Turkmenistán",label:"Turkmenistan",codeISO2:"TM",code:"TKM",phone:"993"},{labelES:"Turquía",label:"Turkey",codeISO2:"TR",code:"TUR",phone:"90"},{labelES:"Tuvalu",label:"Tuvalu",codeISO2:"TV",code:"TUV",phone:"688"},{labelES:"Ucrania",label:"Ukraine",codeISO2:"UA",code:"UKR",phone:"380"},{labelES:"Uganda",label:"Uganda",codeISO2:"UG",code:"UGA",phone:"256"},{labelES:"Uruguay",label:"Uruguay",codeISO2:"UY",code:"URY",phone:"598"},{labelES:"Uzbekistán",label:"Uzbekistan",codeISO2:"UZ",code:"UZB",phone:"998"},{labelES:"Vanuatu",label:"Vanuatu",codeISO2:"VU",code:"VUT",phone:"678"},{labelES:"Venezuela",label:"Venezuela",codeISO2:"VE",code:"VEN",phone:"58"},{labelES:"Vietnam",label:"Vietnam",codeISO2:"VN",code:"VNM",phone:"84"},{labelES:"Wallis y Futuna",label:"Wallis and Futuna",codeISO2:"WF",code:"WLF",phone:"681"},{labelES:"Yemen",label:"Yemen",codeISO2:"YE",code:"YEM",phone:"967"},{labelES:"Yibuti",label:"Djibouti",codeISO2:"DJ",code:"DJI",phone:"253"},{labelES:"Zambia",label:"Zambia",codeISO2:"ZM",code:"ZMB",phone:"260"},{labelES:"Zimbabue",label:"Zimbabwe",codeISO2:"ZW",code:"ZWE",phone:"263"}],bk=({countries:e=M2,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a="",translateKey:c})=>{var Ee,Ve,ie;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:t,control:n,rules:{validate:{}},defaultValue:null}),[p,m]=O.useState(!1),[x,S]=O.useState(""),[b,T]=O.useState(d.value||null),v=O.useRef(null),A=O.useRef(null),C=O.useRef(null),{x:I,y:P,strategy:D,refs:R,context:F,placement:W,middlewareData:Q}=ir({open:p,onOpenChange:m,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:me,elements:De}){Object.assign(De.floating.style,{maxHeight:`${Math.min(me-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ee=rr(F),ae=sr(F),{getReferenceProps:ge,getFloatingProps:de}=or([ee,ae]),{isMounted:le,styles:ue}=ar(F,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(Array.isArray(e)?e:[]).filter(me=>{if(!x.trim())return!0;const De=o==="es"&&me.labelES?me.labelES.toLowerCase():me.label.toLowerCase(),ft=me.code?me.code.toLowerCase():"";return De.includes(x.toLowerCase())||ft.includes(x.toLowerCase())}),K=me=>{T(me),m(!1),S(""),d.onChange(me)},$=()=>{m(!p),!p&&v.current&&setTimeout(()=>{var me;(me=v.current)==null||me.focus()},100)},k=()=>{setTimeout(()=>{p||d.onBlur()},200)};O.useEffect(()=>{T(d.value)},[d.value]),O.useEffect(()=>{const me=De=>{C.current&&!C.current.contains(De.target)&&d.onBlur()};return document.addEventListener("mousedown",me),()=>{document.removeEventListener("mousedown",me)}},[d]);const X=me=>{var De;return me?me.codeISO2?me.codeISO2.toLowerCase():((De=me.code)==null?void 0:De.toLowerCase())||"":""},U=(Ee=Q.arrow)==null?void 0:Ee.x,re=(Ve=Q.arrow)==null?void 0:Ve.y,B={top:"bottom",right:"left",bottom:"top",left:"right"}[W.split("-")[0]],J=ge({onClick:$,onBlur:k}),oe=u(r),se=u(s),fe=(ie=h.error)==null?void 0:ie.message;return g.jsxs("div",{ref:C,className:`w-full relative flex flex-col gap-8 ${a}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${fe&&"!text-red-500"} text-label`,children:oe}),g.jsxs("div",{ref:R.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${fe&&"border-red-500 hover:border-red-600"} ${le?"border-blue-400":"border-blue-100"}`,...J,tabIndex:0,children:[b!=null&&b.code?g.jsxs("div",{className:"flex items-center w-full gap-10",children:[X(b)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${X(b)}.png`,srcSet:`https://flagcdn.com/w40/${X(b)}.png 2x`,alt:b.label,onError:me=>{me.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow font-600 text-body-m",children:[o==="es"&&b.labelES?b.labelES:b.label,b.code?` (${b.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m",children:se}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${p?"transform rotate-180":""}`,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"})})]}),fe&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(fe,{x:u(c||"")||u(t)})}),le&&g.jsxs("div",{ref:R.setFloating,style:{position:D,top:P??0,left:I??0,...ue},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...de(),children:[g.jsx("div",{ref:A,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:U!=null?`${U}px`:"",top:re!=null?`${re}px`:"",right:"",bottom:"",[B]:"-2px",borderRight:B==="left"?"1px solid":"none",borderBottom:B==="top"?"1px solid":"none",borderLeft:B==="right"?"1px solid":"none",borderTop:B==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:v,type:"text",className:"w-full p-16 text-body-s",placeholder:u("search")+"...",value:x,onChange:me=>S(me.target.value),onClick:me=>me.stopPropagation(),onBlur:me=>{me.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:z.length>0?g.jsx("ul",{className:"flex flex-col",children:z.map((me,De)=>{var ws;const ft=me.codeISO2?me.codeISO2.toLowerCase():((ws=me.code)==null?void 0:ws.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:dt=>{dt.stopPropagation(),K(me)},children:[ft&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${ft}.png`,srcSet:`https://flagcdn.com/w40/${ft}.png 2x`,alt:me.label,onError:dt=>{dt.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&me.labelES?me.labelES:me.label,me.code?` (${me.code})`:"Country not found"]})]},`${me.code}-${De}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},wk=({country:e})=>{const t=n=>{var r;return n?n.codeISO2?n.codeISO2.toLowerCase():((r=n.code)==null?void 0:r.toLowerCase())||"":""};return g.jsxs("div",{className:"flex items-center gap-8",children:[g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${t(e)}.png`,srcSet:`https://flagcdn.com/w40/${t(e)}.png 2x`,alt:e.label,onError:n=>{n.currentTarget.style.display="none"}}),g.jsx("p",{className:"text-body-s text-gray-600",children:e.label})]})},Sk=({countries:e,name:t,control:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",className:a=""})=>{const{t:c}=Ue();return g.jsx(vr.Controller,{name:t,control:n,render:({field:{onChange:u,value:d},fieldState:{error:h}})=>g.jsx(Tk,{countries:e,value:d,onChange:u,label:c(r),placeholder:c(s),language:o,error:h==null?void 0:h.message,className:a})})},Tk=({countries:e,value:t,onChange:n,label:r="select_a_country",placeholder:s="type_to_search",language:o="en",error:a,className:c=""})=>{var U,re;const{t:u}=Ue(),[d,h]=O.useState(!1),[p,m]=O.useState(""),[x,S]=O.useState(t||null),b=O.useRef(null),T=O.useRef(null),{x:v,y:A,strategy:C,refs:I,context:P,placement:D,middlewareData:R}=ir({open:d,onOpenChange:h,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:B,elements:J}){Object.assign(J.floating.style,{maxHeight:`${Math.min(B-10,300)}px`})},padding:8}),ms({element:T})],placement:"bottom-start",whileElementsMounted:Qn}),F=rr(P),W=sr(P),{getReferenceProps:Q,getFloatingProps:ee}=or([F,W]),{isMounted:ae,styles:ge}=ar(P,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),le=(Array.isArray(e)?e:[]).filter(B=>{if(!p.trim())return!0;const J=o==="es"&&B.labelES?B.labelES.toLowerCase():B.label.toLowerCase(),oe=B.code?B.code.toLowerCase():"";return J.includes(p.toLowerCase())||oe.includes(p.toLowerCase())}),ue=B=>{S(B),h(!1),m(""),n(B)},Y=()=>{h(!d),!d&&b.current&&setTimeout(()=>{var B;(B=b.current)==null||B.focus()},100)};O.useEffect(()=>{S(t)},[t]);const z=B=>{var J;return B?B.codeISO2?B.codeISO2.toLowerCase():((J=B.code)==null?void 0:J.toLowerCase())||"":""},K=(U=R.arrow)==null?void 0:U.x,$=(re=R.arrow)==null?void 0:re.y,k={top:"bottom",right:"left",bottom:"top",left:"right"}[D.split("-")[0]],X=Q({onClick:Y});return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${c}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${a&&"!text-red-500"} text-label`,children:r}),g.jsxs("div",{ref:I.setReference,className:`flex items-center justify-between bg-light rounded-full p-16 cursor-pointer border transition-all duration-200 hover:border-blue-400 ${a&&"border-red-500 hover:border-red-600"} ${ae?"border-blue-400":"border-blue-100"}`,...X,children:[x!=null&&x.code?g.jsxs("div",{className:"flex items-center w-full",children:[z(x)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${z(x)}.png`,srcSet:`https://flagcdn.com/w40/${z(x)}.png 2x`,alt:x.label,onError:B=>{B.currentTarget.style.display="none"}}),g.jsxs("span",{className:"flex-grow",children:[o==="es"&&x.labelES?x.labelES:x.label,x.code?` (${x.code})`:u("select_country")]})]}):g.jsx("span",{className:"text-gray-500",children:s}),g.jsx("svg",{className:`w-16 h-16 transition-transform ${d?"transform rotate-180":""}`,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"})})]}),a&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:a}),ae&&g.jsxs("div",{ref:I.setFloating,style:{position:C,top:A??0,left:v??0,...ge},className:"z-10 w-full bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto",...ee(),children:[g.jsx("div",{ref:T,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:K!=null?`${K}px`:"",top:$!=null?`${$}px`:"",right:"",bottom:"",[k]:"-2px",borderRight:k==="left"?"1px solid":"none",borderBottom:k==="top"?"1px solid":"none",borderLeft:k==="right"?"1px solid":"none",borderTop:k==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20",children:g.jsx("input",{ref:b,type:"text",className:"w-full p-16",placeholder:u("search")+"...",value:p,onChange:B=>m(B.target.value),onClick:B=>B.stopPropagation(),autoFocus:!0})}),g.jsx("div",{children:le.length>0?g.jsx("ul",{className:"flex flex-col",children:le.map((B,J)=>{var se;const oe=B.codeISO2?B.codeISO2.toLowerCase():((se=B.code)==null?void 0:se.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:fe=>{fe.stopPropagation(),ue(B)},children:[oe&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${oe}.png`,srcSet:`https://flagcdn.com/w40/${oe}.png 2x`,alt:B.label,onError:fe=>{fe.currentTarget.style.display="none"}}),g.jsxs("span",{children:[o==="es"&&B.labelES?B.labelES:B.label,B.code?` (${B.code})`:"Country not found"]})]},`${B.code}-${J}`)})}):g.jsx("div",{className:"px-3 py-2 text-gray-500",children:"No countries found"})})]})]})},sh=({variant:e="filled",color:t,size:n="base",shadow:r="none",icon:s,iconProps:o={},children:a,className:c,...u})=>{const{defaultColorScheme:d}=Ue(),h=t||d;return g.jsx("button",{...u,className:`${EN(e,h,n,r)} ${c}`,children:s?g.jsx(Pe,{...o,className:Do(n),icon:s}):a})};function Ck(e){return e!==null&&typeof e=="object"&&"name"in e&&"size"in e&&"type"in e&&typeof e.name=="string"&&typeof e.size=="number"&&typeof e.type=="string"}const Ek=({src:e,alt:t,isEditable:n=!1,onChange:r,className:s="",name:o,control:a,user:c})=>{const[u,d]=O.useState(e||null),[h,p]=O.useState(!!e),m=O.useRef(null),x=vr.useController({name:o,control:a}),S=!!a;O.useEffect(()=>{if(S){const A=x==null?void 0:x.field.value;if(Ck(A)){const C=URL.createObjectURL(A);return d(C),p(!0),()=>URL.revokeObjectURL(C)}else typeof A=="string"&&A&&A!==e?(d(A),p(!0)):e?(d(e),p(!0)):(d(null),p(!1))}},[x==null?void 0:x.field.value,e]);const b=()=>{var A;n&&((A=m.current)==null||A.click())},T=A=>{var I;const C=(I=A.target.files)==null?void 0:I[0];if(C){const P=URL.createObjectURL(C);d(P),p(!0),S&&(x==null||x.field.onChange(C)),r&&r(C)}},v=A=>{A.stopPropagation(),d(null),p(!1),m.current&&(m.current.value=""),S&&(x==null||x.field.onChange(null)),r&&r(null)};return g.jsxs("div",{className:"relative flex items-center gap-10",children:[n&&h&&g.jsx("button",{type:"button",onClick:v,className:"bg-red-500 text-white rounded-full w-20 h-20 flex items-center justify-center hover:bg-red-600 focus:outline-none","aria-label":"Eliminar imagen",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),g.jsxs("div",{className:`relative flex items-center justify-center h-40 w-40 ${n?"cursor-pointer hover:opacity-80":""} ${s}`,onClick:b,children:[u?g.jsx("img",{src:u,alt:t,className:"w-full h-full object-cover rounded-full"}):g.jsx(u2,{size:60,user:c}),n&&g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"file",ref:A=>{m.current=A,x&&x.field.ref(A)},onChange:T,onBlur:x==null?void 0:x.field.onBlur,accept:"image/*",className:"hidden"}),!h&&g.jsx("div",{className:"absolute bottom-0 right-0 bg-blue-100 rounded-full h-20 w-20 flex items-center justify-center",children:g.jsx(Pe,{icon:HD,className:"text-blue-500"})})]})]})]})},Pk=rh({name:Vr(),base64:Vr()}),Ak=({imageUrl:e,title:t,subtitle:n})=>g.jsxs("section",{className:"gap-10 flex flex-col items-center justify-center",children:[g.jsx("img",{src:e,alt:t,width:100,height:100}),g.jsx("h1",{className:"font-bold text-2xl align-middle",children:t}),g.jsx("p",{className:"text-lg align-middle font-semibold text-gray-500",children:n})]}),Mk=e=>{switch(e){case"small":return{containerStyles:"p-12",titleStyles:"text-sm",descriptionStyles:"text-xs",iconStyles:"p-4 text-xs"};case"normal":return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"};default:return{containerStyles:"p-16",titleStyles:"text-14",descriptionStyles:"text-sm",iconStyles:"p-6 text-md"}}},Ok=e=>{switch(e){case"success":return"bg-green-100 text-green-500";case"warning":return"bg-yellow-100 text-yellow-500";case"error":return"bg-red-100 text-red-500";case"informative":return"bg-blue-100 text-blue-500";default:return"bg-blue-100 text-blue-500"}},$k=e=>{switch(e){case"success":return t0;case"warning":return Ui;case"error":return s0;case"informative":return n0;default:return"info"}},_k=({description:e,title:t,showIcon:n=!0,type:r="informative",size:s="normal"})=>{const o=Mk(s),a=$k(r),c=Ok(r);return g.jsx("div",{className:`w-full rounded-xl bg-white border border-blue-100 ${o.containerStyles}`,children:g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{className:"flex items-center gap-12",children:[n&&g.jsx(Pe,{icon:a,className:`rounded-full ${o.iconStyles} ${c}`}),g.jsx("h5",{className:`font-semibold text-blue-900 self-center ${o.titleStyles}`,children:t})]}),e&&g.jsx("p",{className:`text-gray-500 leading-[16px] ${o.descriptionStyles}`,children:e})]})})},Ik=[{rotate:"0deg",delay:"0s"},{rotate:"90deg",delay:"0.3s"},{rotate:"270deg",delay:"0.9s"},{rotate:"180deg",delay:"0.6s"}],Dk=({variant:e="circle",size:t=16,color:n="#1DA696",...r})=>{const{className:s="",...o}=r;if(e==="cube"){const d=t/Math.SQRT2;return g.jsx("div",{...o,className:`relative flex items-center justify-center overflow-hidden ${s}`,style:{width:t,height:t},children:g.jsx("div",{className:"relative rotate-45",style:{width:d,height:d},children:Ik.map((h,p)=>g.jsx("div",{className:"float-left w-1/2 h-1/2 relative",style:{transform:`scale(1.1) rotate(${h.rotate})`},children:g.jsx("span",{className:"absolute inset-0 origin-bottom-right animate-sk-fold-cube",style:{backgroundColor:n,animationDelay:h.delay}})},p))})})}const a=Math.max(1,Math.round(t*.125)),c=(t-a)/2,u=2*Math.PI*c;return g.jsx("div",{...o,className:`relative flex items-center justify-center ${s}`,children:g.jsx("svg",{height:t,width:t,className:"animate-spin",children:g.jsx("circle",{stroke:n,fill:"transparent",strokeWidth:a,strokeDasharray:`${u} ${u}`,strokeDashoffset:u/4,r:c,cx:t/2,cy:t/2})})})},Nk=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,size:a="md",leftSide:c})=>{const{field:{value:u="",onChange:d,ref:h,onBlur:p},fieldState:{error:m}}=vr.useController({name:n,control:t}),[x,S]=O.useState(!1),{t:b}=Ue(),v={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"}}[a];return g.jsxs("label",{className:`flex flex-col group select-none ${v.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${m&&"!text-red-500"} ${v.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
740
740
  flex items-center justify-between gap-8 ${v.container}
741
741
 
742
742
  ${m&&"!border-red-500"}
@@ -752,7 +752,7 @@ attempted value: ${a}
752
752
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
753
753
 
754
754
  group-disabled:bg-gray-500
755
- `,children:[c&&c,g.jsx("input",{id:n,type:x?"text":"password",autoComplete:"off","aria-autocomplete":"none",name:n,disabled:o,placeholder:r,value:u,onChange:A=>d(A.target.value),onBlur:p,ref:h,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${v.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`}),g.jsx(Pe,{icon:x?u5:a5,className:"min-h-16 max-h-16 text-gray-400 hover:text-gray-500 transition-colors duration-150 cursor-pointer ease-in-out",onClick:()=>S(!x)})]}),(m==null?void 0:m.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${v.error}`,children:b(m.message,{x:b(n)})})]})},kk=({name:e,control:t,label:n="phone_number",placeholder:r="enter_phone_number",language:s="en",className:o="",translateKey:a,countries:c=M2})=>{var Ts,vl,Br,bl;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:e,control:t,rules:{validate:{}}}),p=((Ts=d.value)==null?void 0:Ts.split(" "))||[],m=p[0]||null,x=p[1]||"",S=c.find(ve=>m===ve.phone),[b,T]=O.useState(!1),[v,A]=O.useState(""),[C,I]=O.useState(S||null),[P,D]=O.useState(x),[R,F]=O.useState(!1),W=O.useRef(null),Q=O.useRef(null),ee=O.useRef(null),ae=O.useRef(null),{x:ge,y:de,strategy:le,refs:ue,context:Y,placement:z,middlewareData:K}=ir({open:b,onOpenChange:T,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:ve,elements:Ze}){Object.assign(Ze.floating.style,{maxHeight:`${Math.min(ve-10,300)}px`})},padding:8}),ms({element:Q})],placement:"bottom-start",whileElementsMounted:Qn}),$=rr(Y),k=sr(Y),{getReferenceProps:X,getFloatingProps:U}=or([$,k]),{isMounted:re,styles:B}=ar(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),oe=(Array.isArray(c)?c:[]).filter(ve=>{if(!v.trim())return!0;const Ze=s==="es"&&ve.labelES?ve.labelES.toLowerCase():ve.label.toLowerCase(),Pt=ve.code?ve.code.toLowerCase():"",xn=ve.phone?ve.phone.toLowerCase():"";return Ze.includes(v.toLowerCase())||Pt.includes(v.toLowerCase())||xn.includes(v.toLowerCase())}),se=ve=>{I(ve),T(!1),A("");const Ze=`${ve.phone} ${P}`;d.onChange(Ze),setTimeout(()=>{var Pt;(Pt=ee.current)==null||Pt.focus()},100)},fe=ve=>{const Ze=ve.target.value;if(D(Ze),C){const Pt=`${C.phone} ${Ze}`;d.onChange(Pt)}},Ee=()=>{T(!b),!b&&W.current&&setTimeout(()=>{var ve;(ve=W.current)==null||ve.focus()},100)},Ve=()=>{setTimeout(()=>{b||d.onBlur()},200)},ie=()=>{F(!0)},me=()=>{F(!1)};O.useEffect(()=>{if(d.value){const ve=d.value.split(" "),Ze=ve[0]||"",Pt=ve[1]||"",xn=c.find(cr=>cr.phone===Ze);xn&&I(xn),D(Pt)}},[d.value,c]),O.useEffect(()=>{const ve=Ze=>{ae.current&&!ae.current.contains(Ze.target)&&d.onBlur()};return document.addEventListener("mousedown",ve),()=>{document.removeEventListener("mousedown",ve)}},[d]);const De=ve=>{var Ze;return ve?ve.codeISO2?ve.codeISO2.toLowerCase():((Ze=ve.code)==null?void 0:Ze.toLowerCase())||"":""},ft=(vl=K.arrow)==null?void 0:vl.x,ws=(Br=K.arrow)==null?void 0:Br.y,dt={top:"bottom",right:"left",bottom:"top",left:"right"}[z.split("-")[0]],yl=X({onClick:Ee,onBlur:Ve}),xl=()=>h.error?"border-red-500":R||b?"border-blue-400":"border-blue-100",Ss=u(n),qt=u(r),yn=(bl=h.error)==null?void 0:bl.message;return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${o}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${yn&&"!text-red-500"} text-label`,children:Ss}),g.jsxs("div",{ref:ae,className:"flex items-center w-full",onMouseEnter:ie,onMouseLeave:me,children:[g.jsxs("div",{ref:ue.setReference,className:`flex items-center justify-between text-lg max-w-120 font-600 bg-light rounded-l-full p-16 cursor-pointer border border-r-0 transition-all duration-200 ${yn?"border-red-500":xl()}`,style:{minWidth:"140px"},...yl,tabIndex:0,children:[C!=null&&C.code?g.jsxs("div",{className:"flex items-center truncate",children:[De(C)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${De(C)}.png`,srcSet:`https://flagcdn.com/w40/${De(C)}.png 2x`,alt:C.label,onError:ve=>{ve.currentTarget.style.display="none"}}),g.jsxs("span",{children:["+",C.phone]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m truncate",children:u("select_country")}),g.jsx(Pe,{icon:r0,className:"w-14 h-14 min-w-14 min-h-14"})]}),g.jsx("input",{ref:ee,type:"tel",className:`placeholder:text-gray-400 flex-grow bg-light rounded-r-full font-600 text-body-m p-16 border transition-all duration-200 ${yn?"border-red-500":xl()}`,placeholder:qt,value:P,onChange:fe,onBlur:Ve})]}),yn&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(yn,{x:u(a||"")||e})}),re&&g.jsxs("div",{ref:ue.setFloating,style:{position:le,top:de??0,left:ge??0,...B},className:"z-10 w-fit bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto max-w-120",...U(),children:[g.jsx("div",{ref:Q,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:ft!=null?`${ft}px`:"",top:ws!=null?`${ws}px`:"",right:"",bottom:"",[dt]:"-2px",borderRight:dt==="left"?"1px solid":"none",borderBottom:dt==="top"?"1px solid":"none",borderLeft:dt==="right"?"1px solid":"none",borderTop:dt==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20 w-fit",children:g.jsx("input",{ref:W,type:"text",className:"w-fit p-16",placeholder:u("search")+"...",value:v,onChange:ve=>A(ve.target.value),onClick:ve=>ve.stopPropagation(),onBlur:ve=>{ve.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:oe.length>0?g.jsx("ul",{className:"flex flex-col",children:oe.map((ve,Ze)=>{var xn;const Pt=ve.codeISO2?ve.codeISO2.toLowerCase():((xn=ve.code)==null?void 0:xn.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center justify-between gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:cr=>{cr.stopPropagation(),se(ve)},children:[Pt&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${Pt}.png`,srcSet:`https://flagcdn.com/w40/${Pt}.png 2x`,alt:ve.label,onError:cr=>{cr.currentTarget.style.display="none"}}),g.jsxs("span",{className:"text-gray-500",children:["+",ve.phone]})]},`${ve.code}-${Ze}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},jk={bgColor:"bg-blue-100",fillColor:"bg-blue-500"},Lk={bgColor:"bg-aqua-100",fillColor:"bg-aqua-500"},Rk=e=>{switch(e){case"aqua":return Lk;case"blue":default:return jk}},Fk=({progress:e,showPercentage:t=!1,color:n,className:r="",...s})=>{const{defaultColorScheme:o}=Ue(),a=n||o,{bgColor:c,fillColor:u}=Rk(a),d=Math.min(Math.max(e,0),100);return g.jsxs("div",{className:`flex items-center gap-12 ${r}`,...s,children:[g.jsx("div",{className:`w-full h-8 ${c} rounded-full`,children:g.jsx("div",{className:`h-full ${u} rounded-full transition-all duration-300 ease-in-out`,style:{width:`${d}%`}})}),t&&g.jsxs("span",{className:"text-sm text-gray-400 font-500",children:[d,"%"]})]})},Vk=()=>{const[e,t]=O.useState(!1),n=O.useRef(null),r=()=>{t(!0),setTimeout(()=>{var o;return(o=n.current)==null?void 0:o.focus()},100)},s=()=>{t(!1)};return g.jsx("div",{className:"relative flex items-center",children:g.jsxs("div",{className:`flex items-center justify-center bg-white shadow-md rounded-full transition-all duration-300 ease-in-out ${e?"w-[200px] h-[40px]":"size-[40px]"}`,children:[g.jsx("button",{onClick:r,className:"size-[40px] flex items-center justify-center rounded-full hover:bg-gray-100 transition-all",children:g.jsx(Pe,{icon:GD})}),g.jsx("input",{ref:n,type:"text",className:`w-full outline-none bg-transparent transition-all ${e?"w-full pr-[10px]":"w-0"}`,placeholder:"Buscar...",onBlur:s,style:{border:"none",outline:"none"}})]})})},Bk="w-fit transition-colors ease-in-out duration-200 flex items-center justify-center gap-12 px-24 py-7 text-base rounded-full font-600 bg-transparent",Wk={true:"bg-blue-100 text-blue-500 hover:bg-blue-100/80 active:bg-blue-100/50 !bg-blue-100",false:"text-gray-800 hover:bg-blue-100/40 hover:text-blue-500 active:bg-blue-100/20 active:text-blue-500"},Uk={true:"bg-aqua-100 text-aqua-500 hover:bg-aqua-100/80 active:bg-aqua-100/50 !bg-aqua-100",false:"text-gray-800 hover:bg-aqua-100/40 hover:text-aqua-500 active:bg-aqua-100/20 active:text-aqua-500"},zk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=Uk[n];break;case"blue":default:r=Wk[n];break}return Ln(Bk,r)},Gk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${zk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]})},Yk="w-fit transition-colors group ease-in-out duration-200 flex flex-col items-center justify-center gap-12 text-base font-600",Hk={true:"text-blue-500 hover:text-blue-500",false:"text-gray-800 hover:text-blue-500"},qk={true:"text-aqua-500 hover:text-aqua-500",false:"text-gray-800 hover:text-aqua-500"},Kk="flex h-32 w-32 items-center justify-center transition-colors ease-in-out duration-200 rounded-full",Xk={true:"text-blue-500 bg-blue-100 rounded-full",false:"text-gray-800 hover:text-blue-500 active:text-blue-500 group-hover:bg-blue-100 group-hover:text-blue-500"},Zk={true:"text-aqua-500 bg-aqua-100 rounded-full",false:"text-gray-800 hover:text-aqua-500 active:text-aqua-500 group-hover:bg-aqua-100 group-hover:text-aqua-500"},O2=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"blue":r=Xk[n];break;case"aqua":default:r=Zk[n];break}return Ln(Kk,r)},Jk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=qk[n];break;case"blue":default:r=Hk[n];break}return Ln(Yk,r)},Qk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${Jk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]})},ej=e=>{const{display:t,...n}=e;return t==="desktop"?g.jsx(Gk,{...n}):t==="mobile"?g.jsx(Qk,{...n}):null},tj=({options:e,name:t,control:n,label:r="",placeholder:s="Type to search...",className:o="",input:a=!0,dropdownStyle:c={},innerClassName:u="",showChevron:d=!0,size:h="md"})=>{const{field:{value:p,onChange:m},fieldState:{error:x}}=vr.useController({name:t,control:n});return g.jsx(nj,{options:e,value:p,onChange:m,label:r,placeholder:s,error:x==null?void 0:x.message,className:o,input:a,dropdownStyle:c,innerClassName:u,showChevron:d,size:h})},nj=({options:e,value:t,onChange:n,label:r="Select an option",placeholder:s="Type to search...",error:o,input:a=!0,className:c="",dropdownStyle:u={},innerClassName:d="",showChevron:h=!0,size:p="md"})=>{var X;const{t:m}=Ue(),[x,S]=O.useState(!1),[b,T]=O.useState(""),[v,A]=O.useState(t||null),C=O.useRef(null),I=O.useRef(null),D={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-12 h-12"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8",icon:"w-16 h-16"}}[p],{x:R,y:F,strategy:W,refs:Q,context:ee}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:I})],placement:"bottom-start",whileElementsMounted:Qn}),ae=rr(ee),ge=sr(ee),{getReferenceProps:de,getFloatingProps:le}=or([ae,ge]),{isMounted:ue,styles:Y}=ar(ee,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(()=>{const U=Array.isArray(e)?e:[];if(!b.trim())return U;const re=b.toLowerCase();return U.filter(B=>B.label.toLowerCase().includes(re)||B.key.toLowerCase().includes(re))})(),K=U=>{A(U),S(!1),T(""),n(U)},$=()=>{S(!x),!x&&C.current&&setTimeout(()=>{var U;return(U=C.current)==null?void 0:U.focus()},100)};O.useEffect(()=>{A(t)},[t]);const k=de({onClick:$});return g.jsxs("div",{className:`relative flex flex-col ${D.gap} ${c}`,children:[r&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${o?"!text-red-500":""} ${D.label}`,children:r}),g.jsxs("div",{ref:Q.setReference,className:`${d} flex items-center justify-between bg-light rounded-full border transition-all duration-200
755
+ `,children:[c&&c,g.jsx("input",{id:n,type:x?"text":"password",autoComplete:"off","aria-autocomplete":"none",name:n,disabled:o,placeholder:r,value:u,onChange:A=>d(A.target.value),onBlur:p,ref:h,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${v.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none`}),g.jsx(Pe,{icon:x?u5:a5,className:"min-h-16 max-h-16 text-gray-400 hover:text-gray-500 transition-colors duration-150 cursor-pointer ease-in-out",onClick:()=>S(!x)})]}),(m==null?void 0:m.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${v.error}`,children:b(m.message,{x:b(n)})})]})},kk=({name:e,control:t,label:n="phone_number",placeholder:r="enter_phone_number",language:s="en",className:o="",translateKey:a,countries:c=M2})=>{var Ts,vl,Br,bl;const{t:u}=Ue(),{field:d,fieldState:h}=vr.useController({name:e,control:t,rules:{validate:{}}}),p=((Ts=d.value)==null?void 0:Ts.split(" "))||[],m=p[0]||null,x=p[1]||"",S=c.find(ve=>m===ve.phone),[b,T]=O.useState(!1),[v,A]=O.useState(""),[C,I]=O.useState(S||null),[P,D]=O.useState(x),[R,F]=O.useState(!1),W=O.useRef(null),Q=O.useRef(null),ee=O.useRef(null),ae=O.useRef(null),{x:ge,y:de,strategy:le,refs:ue,context:Y,placement:z,middlewareData:K}=ir({open:b,onOpenChange:T,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:ve,elements:Ze}){Object.assign(Ze.floating.style,{maxHeight:`${Math.min(ve-10,300)}px`})},padding:8}),ms({element:Q})],placement:"bottom-start",whileElementsMounted:Qn}),$=rr(Y),k=sr(Y),{getReferenceProps:X,getFloatingProps:U}=or([$,k]),{isMounted:re,styles:B}=ar(Y,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),oe=(Array.isArray(c)?c:[]).filter(ve=>{if(!v.trim())return!0;const Ze=s==="es"&&ve.labelES?ve.labelES.toLowerCase():ve.label.toLowerCase(),Pt=ve.code?ve.code.toLowerCase():"",xn=ve.phone?ve.phone.toLowerCase():"";return Ze.includes(v.toLowerCase())||Pt.includes(v.toLowerCase())||xn.includes(v.toLowerCase())}),se=ve=>{I(ve),T(!1),A("");const Ze=`${ve.phone} ${P}`;d.onChange(Ze),setTimeout(()=>{var Pt;(Pt=ee.current)==null||Pt.focus()},100)},fe=ve=>{const Ze=ve.target.value;if(D(Ze),C){const Pt=`${C.phone} ${Ze}`;d.onChange(Pt)}},Ee=()=>{T(!b),!b&&W.current&&setTimeout(()=>{var ve;(ve=W.current)==null||ve.focus()},100)},Ve=()=>{setTimeout(()=>{b||d.onBlur()},200)},ie=()=>{F(!0)},me=()=>{F(!1)};O.useEffect(()=>{if(d.value){const ve=d.value.split(" "),Ze=ve[0]||"",Pt=ve[1]||"",xn=c.find(cr=>cr.phone===Ze);xn&&I(xn),D(Pt)}},[d.value,c]),O.useEffect(()=>{const ve=Ze=>{ae.current&&!ae.current.contains(Ze.target)&&d.onBlur()};return document.addEventListener("mousedown",ve),()=>{document.removeEventListener("mousedown",ve)}},[d]);const De=ve=>{var Ze;return ve?ve.codeISO2?ve.codeISO2.toLowerCase():((Ze=ve.code)==null?void 0:Ze.toLowerCase())||"":""},ft=(vl=K.arrow)==null?void 0:vl.x,ws=(Br=K.arrow)==null?void 0:Br.y,dt={top:"bottom",right:"left",bottom:"top",left:"right"}[z.split("-")[0]],yl=X({onClick:Ee,onBlur:Ve}),xl=()=>h.error?"border-red-500":R||b?"border-blue-400":"border-blue-100",Ss=u(n),qt=u(r),yn=(bl=h.error)==null?void 0:bl.message;return g.jsxs("div",{className:`w-full relative flex flex-col gap-8 ${o}`,children:[g.jsx("label",{className:`text-gray-600 font-600 group ${yn&&"!text-red-500"} text-label`,children:Ss}),g.jsxs("div",{ref:ae,className:"flex items-center w-full",onMouseEnter:ie,onMouseLeave:me,children:[g.jsxs("div",{ref:ue.setReference,className:`flex items-center justify-between text-lg max-w-120 font-600 bg-light rounded-l-full p-16 cursor-pointer border border-r-0 transition-all duration-200 ${yn?"border-red-500":xl()}`,style:{minWidth:"140px"},...yl,tabIndex:0,children:[C!=null&&C.code?g.jsxs("div",{className:"flex items-center truncate",children:[De(C)&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${De(C)}.png`,srcSet:`https://flagcdn.com/w40/${De(C)}.png 2x`,alt:C.label,onError:ve=>{ve.currentTarget.style.display="none"}}),g.jsxs("span",{children:["+",C.phone]})]}):g.jsx("span",{className:"text-gray-400 font-600 text-body-m truncate",children:u("select_country")}),g.jsx(Pe,{icon:r0,className:"w-14 h-14 min-w-14 min-h-14"})]}),g.jsx("input",{ref:ee,type:"tel",className:`placeholder:text-gray-400 flex-grow bg-light rounded-r-full font-600 text-body-m p-16 border transition-all duration-200 ${yn?"border-red-500":xl()}`,placeholder:qt,value:P,onChange:fe,onBlur:Ve})]}),yn&&g.jsx("p",{className:"mt-1 text-sm text-red-600",children:u(yn,{x:u(a||"")||e})}),re&&g.jsxs("div",{ref:ue.setFloating,style:{position:le,top:de??0,left:ge??0,...B},className:"z-10 w-fit bg-white border border-blue-400 rounded-3xl shadow-lg overflow-auto max-w-120",...U(),children:[g.jsx("div",{ref:Q,className:"absolute w-4 h-4 bg-white rotate-45 border-blue-400",style:{left:ft!=null?`${ft}px`:"",top:ws!=null?`${ws}px`:"",right:"",bottom:"",[dt]:"-2px",borderRight:dt==="left"?"1px solid":"none",borderBottom:dt==="top"?"1px solid":"none",borderLeft:dt==="right"?"1px solid":"none",borderTop:dt==="bottom"?"1px solid":"none"}}),g.jsx("div",{className:"sticky top-0 bg-white p-2 z-20 w-fit",children:g.jsx("input",{ref:W,type:"text",className:"w-fit p-16",placeholder:u("search")+"...",value:v,onChange:ve=>A(ve.target.value),onClick:ve=>ve.stopPropagation(),onBlur:ve=>{ve.stopPropagation()},autoFocus:!0})}),g.jsx("div",{children:oe.length>0?g.jsx("ul",{className:"flex flex-col",children:oe.map((ve,Ze)=>{var xn;const Pt=ve.codeISO2?ve.codeISO2.toLowerCase():((xn=ve.code)==null?void 0:xn.toLowerCase())||"";return g.jsxs("li",{className:"flex items-center justify-between gap-10 px-16 py-8 transition-all duration-200 hover:bg-blue-100/50 cursor-pointer",onClick:cr=>{cr.stopPropagation(),se(ve)},children:[Pt&&g.jsx("img",{loading:"lazy",width:"24",height:"16",className:"mr-2",src:`https://flagcdn.com/w20/${Pt}.png`,srcSet:`https://flagcdn.com/w40/${Pt}.png 2x`,alt:ve.label,onError:cr=>{cr.currentTarget.style.display="none"}}),g.jsxs("span",{className:"text-gray-500",children:["+",ve.phone]})]},`${ve.code}-${Ze}`)})}):g.jsx("div",{className:"px-16 py-8 text-gray-500 text-body-s",children:u("no_countries_found")})})]})]})},jk={bgColor:"bg-blue-100",fillColor:"bg-blue-500"},Lk={bgColor:"bg-aqua-100",fillColor:"bg-aqua-500"},Rk=e=>{switch(e){case"aqua":return Lk;case"blue":default:return jk}},Fk=({progress:e,showPercentage:t=!1,color:n,className:r="",...s})=>{const{defaultColorScheme:o}=Ue(),a=n||o,{bgColor:c,fillColor:u}=Rk(a),d=Math.min(Math.max(e,0),100);return g.jsxs("div",{className:`flex items-center gap-12 ${r}`,...s,children:[g.jsx("div",{className:`w-full h-8 ${c} rounded-full`,children:g.jsx("div",{className:`h-full ${u} rounded-full transition-all duration-300 ease-in-out`,style:{width:`${d}%`}})}),t&&g.jsxs("span",{className:"text-sm text-gray-400 font-500",children:[d,"%"]})]})},Vk=()=>{const[e,t]=O.useState(!1),n=O.useRef(null),r=()=>{t(!0),setTimeout(()=>{var o;return(o=n.current)==null?void 0:o.focus()},100)},s=()=>{t(!1)};return g.jsx("div",{className:"relative flex items-center",children:g.jsxs("div",{className:`flex items-center justify-center bg-white shadow-md rounded-full transition-all duration-300 ease-in-out ${e?"w-[200px] h-[40px]":"size-[40px]"}`,children:[g.jsx("button",{onClick:r,className:"size-[40px] flex items-center justify-center rounded-full hover:bg-gray-100 transition-all",children:g.jsx(Pe,{icon:GD})}),g.jsx("input",{ref:n,type:"text",className:`w-full outline-none bg-transparent transition-all ${e?"w-full pr-[10px]":"w-0"}`,placeholder:"Buscar...",onBlur:s,style:{border:"none",outline:"none"}})]})})},Bk="w-fit transition-colors ease-in-out duration-200 flex items-center justify-center gap-12 px-24 py-7 text-base rounded-full font-600 bg-transparent",Wk={true:"bg-blue-100 text-blue-500 hover:bg-blue-100/80 active:bg-blue-100/50 !bg-blue-100",false:"text-gray-800 hover:bg-blue-100/40 hover:text-blue-500 active:bg-blue-100/20 active:text-blue-500"},Uk={true:"bg-aqua-100 text-aqua-500 hover:bg-aqua-100/80 active:bg-aqua-100/50 !bg-aqua-100",false:"text-gray-800 hover:bg-aqua-100/40 hover:text-aqua-500 active:bg-aqua-100/20 active:text-aqua-500"},zk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=Uk[n];break;case"blue":default:r=Wk[n];break}return Ln(Bk,r)},Gk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${zk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx(Pe,{icon:a,className:Do()}),e]})},Yk="w-fit transition-colors group ease-in-out duration-200 flex flex-col items-center justify-center gap-12 text-base font-600",Hk={true:"text-blue-500 hover:text-blue-500",false:"text-gray-800 hover:text-blue-500"},qk={true:"text-aqua-500 hover:text-aqua-500",false:"text-gray-800 hover:text-aqua-500"},Kk="flex h-32 w-32 items-center justify-center transition-colors ease-in-out duration-200 rounded-full",Xk={true:"text-blue-500 bg-blue-100 rounded-full",false:"text-gray-800 hover:text-blue-500 active:text-blue-500 group-hover:bg-blue-100 group-hover:text-blue-500"},Zk={true:"text-aqua-500 bg-aqua-100 rounded-full",false:"text-gray-800 hover:text-aqua-500 active:text-aqua-500 group-hover:bg-aqua-100 group-hover:text-aqua-500"},O2=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"blue":r=Xk[n];break;case"aqua":default:r=Zk[n];break}return Ln(Kk,r)},Jk=(e=!1,t="blue")=>{const n=String(e);let r;switch(t){case"aqua":r=qk[n];break;case"blue":default:r=Hk[n];break}return Ln(Yk,r)},Qk=({label:e,href:t,onClick:n,active:r=!1,disabled:s=!1,className:o,icon:a,color:c})=>{const{defaultColorScheme:u}=Ue(),d=c||u,h=m=>{if(s){m.preventDefault();return}n==null||n(m)},p=`${Jk(r,d)} ${s?"!text-gray-300 cursor-not-allowed !bg-transparent":""}`;return t?g.jsxs("a",{href:t,className:`${p} ${o||""}`,onClick:h,"aria-disabled":s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]}):g.jsxs("button",{className:`${p} ${o||""}`,onClick:h,disabled:s,children:[a&&g.jsx("div",{className:O2(r,d),children:g.jsx(Pe,{icon:a,className:"size-16 max-h-16 max-w-16"})}),e]})},ej=e=>{const{display:t,...n}=e;return t==="desktop"?g.jsx(Gk,{...n}):t==="mobile"?g.jsx(Qk,{...n}):null},tj=({options:e,name:t,control:n,label:r="",placeholder:s="Type to search...",className:o="",input:a=!0,dropdownStyle:c={},innerClassName:u="",showChevron:d=!0,size:h="md"})=>{const{field:{value:p,onChange:m},fieldState:{error:x}}=vr.useController({name:t,control:n});return g.jsx(nj,{options:e,value:p,onChange:m,label:r,placeholder:s,error:x==null?void 0:x.message,className:o,input:a,dropdownStyle:c,innerClassName:u,showChevron:d,size:h})},nj=({options:e,value:t,onChange:n,label:r="Select an option",placeholder:s="Type to search...",error:o,input:a=!0,className:c="",dropdownStyle:u={},innerClassName:d="",showChevron:h=!0,size:p="md"})=>{var X;const{t:m}=Ue(),[x,S]=O.useState(!1),[b,T]=O.useState(""),[v,A]=O.useState(t||null),C=O.useRef(null),I=O.useRef(null),D={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8",icon:"w-12 h-12"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-16 h-16"}}[p],{x:R,y:F,strategy:W,refs:Q,context:ee}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:I})],placement:"bottom-start",whileElementsMounted:Qn}),ae=rr(ee),ge=sr(ee),{getReferenceProps:de,getFloatingProps:le}=or([ae,ge]),{isMounted:ue,styles:Y}=ar(ee,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),z=(()=>{const U=Array.isArray(e)?e:[];if(!b.trim())return U;const re=b.toLowerCase();return U.filter(B=>B.label.toLowerCase().includes(re)||B.key.toLowerCase().includes(re))})(),K=U=>{A(U),S(!1),T(""),n(U)},$=()=>{S(!x),!x&&C.current&&setTimeout(()=>{var U;return(U=C.current)==null?void 0:U.focus()},100)};O.useEffect(()=>{A(t)},[t]);const k=de({onClick:$});return g.jsxs("div",{className:`relative flex flex-col ${D.gap} ${c}`,children:[r&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none ${o?"!text-red-500":""} ${D.label}`,children:r}),g.jsxs("div",{ref:Q.setReference,className:`${d} flex items-center justify-between bg-light rounded-full border transition-all duration-200
756
756
  ${D.container} cursor-pointer hover:border-blue-400
757
757
  ${o?"border-red-500 hover:border-red-600":""}
758
758
  ${x?"border-blue-400":"border-blue-100"}`,...k,children:[g.jsx("div",{className:"flex items-center w-full overflow-hidden",children:g.jsx("span",{className:`flex-grow font-600 truncate ${D.text} ${v?"":"text-gray-400"}`,children:m(v?v.label:s)})}),h&&g.jsx("svg",{className:`${D.icon} transition-transform ${x?"rotate-180":""}`,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"})})]}),o&&g.jsx("p",{className:`font-500 text-red-500 leading-none ${D.error}`,children:o}),ue&&g.jsxs("div",{ref:Q.setFloating,style:{position:W,top:F??0,left:R??0,...Y,width:(X=Q.reference.current)==null?void 0:X.clientWidth,zIndex:50,...u},className:"bg-white border border-blue-400 rounded-3xl shadow-lg overflow-hidden",...le(),children:[a&&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:"h-16 w-16 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:C,type:"text",className:"w-full py-8 pl-40 pr-12 rounded-full focus:outline-none text-body-s",placeholder:m("search_options"),value:b,onChange:U=>T(U.target.value),onClick:U=>U.stopPropagation(),autoFocus:!0})]})}),g.jsx("div",{className:"max-h-[250px] overflow-y-auto",children:z.length>0?g.jsx("ul",{className:"py-4",children:z.map((U,re)=>g.jsx("li",{className:`flex items-center px-16 py-10 transition-all duration-200 hover:bg-blue-50 cursor-pointer
@@ -770,7 +770,7 @@ attempted value: ${a}
770
770
  ${!e&&"text-gray-500"}
771
771
  opacity-0 capitalize
772
772
  ${s&&"translate-x-0 opacity-100 !w-full !h-auto ml-8"}
773
- ${e&&d}`,children:n})]})},aj="flex w-full h-full gap-12 px-10 py-6 items-center justify-center",lj={default:"flex-row rounded-full text-blue-500",underline:"flex-col border-b-[1.3px] px-24 pb-16 text-gray-700"},cj={true:"text-blue-500 border-b-blue-500",false:"text-gray-700 border-b-gray-700"},uj=(e="underline",t=!1)=>Ln(aj,lj[e],cj[String(t)]),$2=({label:e,icon:t,isSelected:n,onClick:r,variant:s="default",direction:o="row",labelClassName:a=""})=>g.jsxs("button",{className:`${uj(s,n)} w-full cursor-pointer transition-all duration-200 ${o==="row"&&"flex-row!"}`,onClick:r,children:[t&&g.jsx(Pe,{icon:t,className:`${n?"text-blue-500":"text-gray-500"} w-20 h-20`}),g.jsx("span",{className:Ln("text-lg font-500",a),children:e})]}),fj="transition-colors ease-in-out duration-200 flex items-center justify-center text-body-m rounded-full w-fit font-600 leading-normal disabled:cursor-not-allowed disabled:text-gray-300",dj={blue:"text-blue-500 hover:text-blue-600 active:text-blue-700",aqua:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700",red:"text-red-500 hover:text-red-600 active:text-red-700",gray:"text-gray-500 hover:text-gray-600 active:text-gray-700"},hj=(e="blue")=>Ln(fj,dj[e]),_2=({color:e,children:t,className:n,...r})=>{const{defaultColorScheme:s}=Ue(),o=e||s;return g.jsx("button",{type:"button",className:hj(o)+" "+n,...r,children:t})},pj=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,leftSide:a,rightSide:c,translateKey:u="",size:d="md",...h})=>{const{field:{value:p="",onChange:m,ref:x,onBlur:S},fieldState:{error:b}}=vr.useController({name:n,control:t}),{t:T}=Ue(),A={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8"}}[d],C=T(n),I=T(u);return g.jsxs("label",{className:`flex flex-col group select-none ${A.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${b&&"text-red-500!"} ${A.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
773
+ ${e&&d}`,children:n})]})},aj="flex w-full h-full gap-12 px-10 py-6 items-center justify-center",lj={default:"flex-row rounded-full text-blue-500",underline:"flex-col border-b-[1.3px] px-24 pb-16 text-gray-700"},cj={true:"text-blue-500 border-b-blue-500",false:"text-gray-700 border-b-gray-700"},uj=(e="underline",t=!1)=>Ln(aj,lj[e],cj[String(t)]),$2=({label:e,icon:t,isSelected:n,onClick:r,variant:s="default",direction:o="row",labelClassName:a=""})=>g.jsxs("button",{className:`${uj(s,n)} w-full cursor-pointer transition-all duration-200 ${o==="row"&&"flex-row!"}`,onClick:r,children:[t&&g.jsx(Pe,{icon:t,className:`${n?"text-blue-500":"text-gray-500"} w-20 h-20`}),g.jsx("span",{className:Ln("text-lg font-500",a),children:e})]}),fj="transition-colors ease-in-out duration-200 flex items-center justify-center text-body-m rounded-full w-fit font-600 leading-normal disabled:cursor-not-allowed disabled:text-gray-300",dj={blue:"text-blue-500 hover:text-blue-600 active:text-blue-700",aqua:"text-aqua-500 hover:text-aqua-600 active:text-aqua-700",red:"text-red-500 hover:text-red-600 active:text-red-700",gray:"text-gray-500 hover:text-gray-600 active:text-gray-700"},hj=(e="blue")=>Ln(fj,dj[e]),_2=({color:e,children:t,className:n,...r})=>{const{defaultColorScheme:s}=Ue(),o=e||s;return g.jsx("button",{type:"button",className:hj(o)+" "+n,...r,children:t})},pj=({label:e,control:t,name:n,placeholder:r,className:s="",disabled:o=!1,leftSide:a,rightSide:c,translateKey:u="",size:d="md",...h})=>{const{field:{value:p="",onChange:m,ref:x,onBlur:S},fieldState:{error:b}}=vr.useController({name:n,control:t}),{t:T}=Ue(),A={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8"}}[d],C=T(n),I=T(u);return g.jsxs("label",{className:`flex flex-col group select-none ${A.gap} ${o&&"cursor-not-allowed"} ${s}`,htmlFor:n,children:[g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${b&&"text-red-500!"} ${A.label} ${o&&"text-gray-300"}`,children:e}),g.jsxs("label",{htmlFor:n,className:`
774
774
  flex items-center justify-between gap-8 ${A.container}
775
775
 
776
776
  ${b&&"border-red-500!"}
@@ -786,7 +786,7 @@ attempted value: ${a}
786
786
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
787
787
 
788
788
  group-disabled:bg-gray-500
789
- `,children:[a&&a,g.jsx("input",{id:n,name:n,disabled:o,placeholder:r,value:p,onChange:P=>m(P.target.value),onBlur:S,ref:x,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${A.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,...h}),c&&c]}),(b==null?void 0:b.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${A.error}`,children:T(b.message,{x:I||C})})]})},mj=({label:e,value:t,className:n})=>g.jsxs("div",{className:`flex flex-col gap-4 ${n||""}`,children:[g.jsx("p",{className:"text-lg font-600 text-gray-800",children:e}),g.jsx("p",{className:"text-base font-400 text-gray-600",children:t})]}),I2=({options:e,onChange:t,value:n,disabled:r,error:s,label:o="",placeholder:a="",allowSearch:c=!1,className:u="",innerClassName:d="",dropdownStyle:h={},showChevron:p=!0,size:m="md"})=>{const[x,S]=O.useState(!1),[b,T]=O.useState(""),v=O.useRef(null),A=O.useRef(null),C=e.find(U=>U.value===n),P={sm:{container:"px-16 py-8",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-12 h-12",option:"text-14"},md:{container:"p-16",text:"text-body-m",label:"text-body-m",error:"text-sm",gap:"gap-8",icon:"w-16 h-16",option:"text-body-m"}}[m],D=O.useMemo(()=>e.map(U=>({...U,searchableLabel:typeof U.label=="string"?U.label:O.isValidElement(U.label)?gl(U.label):String(U.label),searchableValue:String(U.value)})),[e]),R=O.useMemo(()=>{const U={keys:[{name:"searchableLabel",weight:2},{name:"searchableValue",weight:1}],threshold:.2,distance:150,includeScore:!0,includeMatches:!0,ignoreLocation:!0,minMatchCharLength:1,shouldSort:!0,findAllMatches:!0};return new cT(D,U)},[D]),{x:F,y:W,strategy:Q,refs:ee,context:ae}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ge=rr(ae),de=sr(ae),{getReferenceProps:le,getFloatingProps:ue}=or([ge,de]),{isMounted:Y,styles:z}=ar(ae,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),K=O.useMemo(()=>b.trim()?R.search(b).map(re=>({...re.item,score:re.score,matches:re.matches})):e,[b,R,e]),$=U=>{t(U.value),S(!1),T("")},X=le({onClick:()=>{r||(S(!x),!x&&v.current&&c&&setTimeout(()=>{var U;return(U=v.current)==null?void 0:U.focus()},100))}});return g.jsxs("div",{className:`relative flex flex-col ${P.gap} ${u}`,children:[o&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s?"!text-red-500":""} ${P.label} ${r?"text-gray-300":""}`,children:o}),g.jsxs("div",{ref:ee.setReference,className:`${d} flex items-center justify-between bg-light rounded-full
789
+ `,children:[a&&a,g.jsx("input",{id:n,name:n,disabled:o,placeholder:r,value:p,onChange:P=>m(P.target.value),onBlur:S,ref:x,className:`group bg-transparent w-full h-full font-600 placeholder:font-600 select-text ${A.text} disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-hidden`,...h}),c&&c]}),(b==null?void 0:b.message)&&g.jsx("h4",{className:`font-500 text-red-500 leading-none ${A.error}`,children:T(b.message,{x:I||C})})]})},mj=({label:e,value:t,className:n})=>g.jsxs("div",{className:`flex flex-col gap-4 ${n||""}`,children:[g.jsx("p",{className:"text-lg font-600 text-gray-800",children:e}),g.jsx("p",{className:"text-base font-400 text-gray-600",children:t})]}),I2=({options:e,onChange:t,value:n,disabled:r,error:s,label:o="",placeholder:a="",allowSearch:c=!1,className:u="",innerClassName:d="",dropdownStyle:h={},showChevron:p=!0,size:m="md"})=>{const[x,S]=O.useState(!1),[b,T]=O.useState(""),v=O.useRef(null),A=O.useRef(null),C=e.find(U=>U.value===n),P={sm:{container:"px-16 py-8",text:"text-sm",label:"text-sm",error:"text-sm",gap:"gap-8",icon:"w-12 h-12",option:"text-sm"},md:{container:"p-16",text:"text-14",label:"text-14",error:"text-sm",gap:"gap-8",icon:"w-16 h-16",option:"text-14"}}[m],D=O.useMemo(()=>e.map(U=>({...U,searchableLabel:typeof U.label=="string"?U.label:O.isValidElement(U.label)?gl(U.label):String(U.label),searchableValue:String(U.value)})),[e]),R=O.useMemo(()=>{const U={keys:[{name:"searchableLabel",weight:2},{name:"searchableValue",weight:1}],threshold:.2,distance:150,includeScore:!0,includeMatches:!0,ignoreLocation:!0,minMatchCharLength:1,shouldSort:!0,findAllMatches:!0};return new cT(D,U)},[D]),{x:F,y:W,strategy:Q,refs:ee,context:ae}=ir({open:x,onOpenChange:S,middleware:[er(8),nr(),tr({padding:8}),Rr({apply({availableHeight:U,elements:re}){Object.assign(re.floating.style,{maxHeight:`${Math.min(U-10,300)}px`})},padding:8}),ms({element:A})],placement:"bottom-start",whileElementsMounted:Qn}),ge=rr(ae),de=sr(ae),{getReferenceProps:le,getFloatingProps:ue}=or([ge,de]),{isMounted:Y,styles:z}=ar(ae,{duration:{open:200,close:150},initial:{opacity:0,transform:"translateY(-4px)"}}),K=O.useMemo(()=>b.trim()?R.search(b).map(re=>({...re.item,score:re.score,matches:re.matches})):e,[b,R,e]),$=U=>{t(U.value),S(!1),T("")},X=le({onClick:()=>{r||(S(!x),!x&&v.current&&c&&setTimeout(()=>{var U;return(U=v.current)==null?void 0:U.focus()},100))}});return g.jsxs("div",{className:`relative flex flex-col ${P.gap} ${u}`,children:[o&&g.jsx("h6",{className:`text-gray-600 font-600 leading-none group ${s?"!text-red-500":""} ${P.label} ${r?"text-gray-300":""}`,children:o}),g.jsxs("div",{ref:ee.setReference,className:`${d} flex items-center justify-between bg-light rounded-full
790
790
  ${P.container} cursor-pointer border transition-all duration-200
791
791
  ${r?"opacity-60 cursor-not-allowed":"hover:border-blue-400"}
792
792
  ${s?"border-red-500 hover:border-red-600":""}