renderloom 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/renderloom.umd.cjs
CHANGED
|
@@ -147,7 +147,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
147
147
|
${b}px !important;
|
|
148
148
|
${j}px !important;
|
|
149
149
|
}
|
|
150
|
-
`),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Pd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Ed=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Md),f=x.useId();let h=!0,m=x.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{d.set(g,!0);for(const p of d.values())if(!p)return;s&&s()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,s]);return o&&h&&(m={...m}),x.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),bt.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=l.jsx(Nd,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Md(){return new Map}function go(e=!0){const t=x.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=x.useId();x.useEffect(()=>{if(e)return r(o)},[e]);const i=x.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Gt=e=>e.key||"";function yo(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const de=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=go(i),h=x.useMemo(()=>yo(e),[e]),m=i&&!d?[]:h.map(Gt),g=x.useRef(!0),p=x.useRef(h),y=an(()=>new Map),T=x.useRef(new Set),[w,b]=x.useState(h),[j,S]=x.useState(h);zs(()=>{g.current=!1,p.current=h;for(let k=0;k<j.length;k++){const M=Gt(j[k]);m.includes(M)?(y.delete(M),T.current.delete(M)):y.get(M)!==!0&&y.set(M,!1)}},[j,m.length,m.join("-")]);const E=[];if(h!==w){let k=[...h];for(let M=0;M<j.length;M++){const V=j[M],F=Gt(V);m.includes(F)||(k.splice(M,0,V),E.push(V))}return o==="wait"&&E.length&&(k=E),S(yo(k)),b(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&j.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:O}=x.useContext(on);return l.jsx(l.Fragment,{children:j.map(k=>{const M=Gt(k),V=i&&!d?!1:h===j||m.includes(M),F=()=>{if(T.current.has(M))return;if(y.has(M))T.current.add(M),y.set(M,!0);else return;let B=!0;y.forEach(ce=>{ce||(B=!1)}),B&&(O==null||O(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Ed,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:F,anchorX:a,anchorY:c,children:k},M)})})},xo=x.createContext({strict:!1}),bo={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"]};let vo=!1;function Vd(){if(vo)return;const e={};for(const t in bo)e[t]={isEnabled:n=>bo[t].some(s=>!!n[s])};hi(e),vo=!0}function wo(){return Vd(),gu()}function Dd(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Ld=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","propagate","ignoreStrict","viewport"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ld.has(e)}let ko=e=>!Kt(e);function Rd(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Rd(require("@emotion/is-prop-valid").default)}catch{}function Id(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||ie(e[r])||(ko(r)||n===!0&&Kt(r)||!t&&!Kt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Yt=x.createContext({});function Od(e,t){if(zt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||dt(n)?n:void 0,animate:dt(s)?s:void 0}}return e.inherit!==!1?t:{}}function zd(e){const{initial:t,animate:n}=Od(e,x.useContext(Yt));return x.useMemo(()=>({initial:t,animate:n}),[To(t),To(n)])}function To(e){return Array.isArray(e)?e.join(" "):e}const hs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jo(e,t,n){for(const s in t)!ie(t[s])&&!Ai(s,n)&&(e[s]=t[s])}function Fd({transformTemplate:e},t){return x.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _d(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Fd(e,t)),s}function Bd(e,t){const n={},s=_d(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const So=()=>({...hs(),attrs:{}});function $d(e,t,n,s){const r=x.useMemo(()=>{const o=So();return Pi(o,t,Ei(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};jo(o,e.style,e),r.style={...o,...r.style}}return r}const Wd=["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 ms(e){return typeof e!="string"||e.includes("-")?!1:!!(Wd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ud(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?$d:Bd)(t,s,r,e),u=Id(t,typeof e=="string",o),d=e!==x.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=x.useMemo(()=>ie(f)?f.get():f,[f]);return x.createElement(e,{...d,children:h})}function Gd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Kd(n,s,r,e),renderState:t()}}function Kd(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Wt(o[h]);let{initial:i,animate:a}=e;const c=zt(e),u=ui(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?a:i;if(f&&typeof f!="boolean"&&!Ot(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=Bn(e,h[m]);if(g){const{transitionEnd:p,transition:y,...T}=g;for(const w in T){let b=T[w];if(Array.isArray(b)){const j=d?b.length-1:0;b=b[j]}b!==null&&(r[w]=b)}for(const w in p)r[w]=p[w]}}}return r}const Co=e=>(t,n)=>{const s=x.useContext(Yt),r=x.useContext(Tt),o=()=>Gd(e,t,s,r);return n?o():an(o)},Yd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Hd=Co({scrapeMotionValuesFromProps:Mi,createRenderState:So}),Xd=Symbol.for("motionComponentSymbol");function qd(e,t,n){const s=x.useRef(n);x.useInsertionEffect(()=>{s.current=n});const r=x.useRef(null);return x.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const c=i(o);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Ao=x.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zd(e,t,n,s,r,o){var b,j;const{visualElement:i}=x.useContext(Yt),a=x.useContext(xo),c=x.useContext(Tt),u=x.useContext(fs),d=u.reducedMotion,f=u.skipAnimations,h=x.useRef(null),m=x.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=x.useContext(Ao);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Jd(h.current,n,r,p);const y=x.useRef(!1);x.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const T=n[Wr],w=x.useRef(!!T&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,T))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,T)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),w.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!w.current&&g.animationState&&g.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,T)}),w.current=!1),g.enteringChildren=void 0)}),g}function Jd(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Po(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Po(e){if(e)return e.options.allowProjection!==!1?e.projection:Po(e.parent)}function ps(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Dd(s);const o=n?n==="svg":ms(e),i=o?Hd:Yd;function a(u,d){let f;const h={...x.useContext(fs),...u,layoutId:Qd(u)},{isStatic:m}=h,g=zd(u),p=i(u,m);if(!m&&typeof window<"u"){ef(h,s);const y=tf(h);f=y.MeasureLayout,g.visualElement=Zd(e,p,h,r,y.ProjectionNode,o)}return l.jsxs(Yt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Ud(e,u,qd(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[Xd]=e,c}function Qd({layoutId:e}){const t=x.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function ef(e,t){const n=x.useContext(xo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ge(!1,s,"lazy-strict-mode"):je(!1,s,"lazy-strict-mode")}}function tf(e){const t=wo(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function nf(e,t){if(typeof Proxy>"u")return ps;const n=new Map,s=(o,i)=>ps(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&dn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,ps(i,void 0,e,t)),n.get(i))})}const sf=(e,t)=>t.isSVG??ms(e)?new Du(t):new Au(t,{allowProjection:e!==x.Fragment});class rf extends De{constructor(t){super(t),t.animationState||(t.animationState=zu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ot(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.call(this)}}let of=0;class af extends De{constructor(){super(...arguments),this.id=of++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const c=Fe(this.node,i,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lf={animation:{Feature:rf},exit:{Feature:af}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const cf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,cf(n),s)}const No=({current:e})=>e?e.ownerDocument.defaultView:null,Eo=(e,t)=>Math.abs(e-t);function uf(e,t){const n=Eo(e.x,t.x),s=Eo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Mo=new Set(["auto","scroll"]);class Vo{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ht(this.lastRawMoveEventInfo,this.transformPagePoint));const m=gs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=uf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:T}=re;this.history.push({...y,timestamp:T});const{onStart:w,onMove:b}=this.handlers;g||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,w),y&&y(m,w)},!qn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=pt(t),u=Ht(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=re;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,gs(u,this.history)),this.removeListeners=rt(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Mo.has(s.overflowX)||Mo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,r=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),_.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function Ht(e,t){return t?{point:t(e.point)}:e}function Do(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,df(t)),velocity:ff(t,.1)}}function df(e){return e[0]}function Lo(e){return e[e.length-1]}function ff(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Lo(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>ue(t)*2&&(s=e[1]);const o=he(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function hf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?$(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?$(n,e,s.max):Math.min(e,n)),e}function Ro(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 mf(e,{top:t,left:n,bottom:s,right:r}){return{x:Ro(e.x,n,r),y:Ro(e.y,t,s)}}function Io(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function pf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function gf(e,t){let n=.5;const s=le(e),r=le(t);return r>s?n=it(t.min,t.max-s,e.min):s>r&&(n=it(e.min,e.max-r,t.min)),be(0,1,n)}function yf(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 ys=.35;function xf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:Oo(e,"left","right"),y:Oo(e,"top","bottom")}}function Oo(e,t,n){return{min:zo(e,t),max:zo(e,n)}}function zo(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class vf{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=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(pt(f).point),this.stopAnimation()},i=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ke(T=>{let w=this.getAxisMotionValue(T).get()||0;if(ve.test(w)){const{projection:b}=this.visualElement;if(b&&b.layout){const j=b.layout.layoutBox[T];j&&(w=le(j)*(parseFloat(w)/100))}}this.originPoint[T]=w}),p&&_.update(()=>p(f,h),!1,!0),Wn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=h;if(g&&this.currentDirection===null){this.currentDirection=kf(T),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,T),this.updateAxis("y",h.point,T),this.visualElement.render(),y&&_.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:No(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Xt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=hf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&tt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=mf(s.layoutBox,t):this.constraints=!1,this.elastic=xf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=yf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;je(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=wu(s,r.root,this.visualElement.getTransformPagePoint());let i=pf(r.layout.layoutBox,o);if(n){const a=n(xu(i));this.hasMutatedConstraints=!!a,a&&(i=pi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ke(d=>{if(!Xt(d,n,this.currentDirection))return;let f=c&&c[d]||{};(i===!0||i===d)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Wn(this.visualElement,t),s.start(_n(t,s,0,n,this.visualElement,!1))}stopAnimation(){ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ke(n=>{const{drag:s}=this.getProps();if(!Xt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-$(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!tt(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ke(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=gf({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),ke(i=>{if(!Xt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];a.set($(c,u,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=gt(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Jc(h);d&&f&&!m&&this.start(u)});let s;const r=()=>{const{dragConstraints:u}=this.getProps();tt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=wf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_.read(r);const a=mt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ys,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Fo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wf(e,t,n){const s=ai(e,Fo(n)),r=ai(t,Fo(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Tf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new vf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xs=e=>(t,n)=>{e&&_.update(()=>e(t,n),!1,!0)};class jf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:No(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:xs(t),onStart:xs(n),onMove:xs(s),onEnd:(o,i)=>{delete this.session,r&&_.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let bs=!1;class Sf extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),bs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ut.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),bs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||_.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Xn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;bs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _o(e){const[t,n]=go(),s=x.useContext(on);return l.jsx(Sf,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(Ao),isPresent:t,safeToRemove:n})}const Cf={pan:{Feature:jf},drag:{Feature:Tf,ProjectionNode:mo,MeasureLayout:_o}};function Bo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Af extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Hc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Pf extends De{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=rt(mt(this.node.current,"focus",()=>this.onFocus()),mt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $o(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Nf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=eu(t,(r,o)=>($o(this.node,o,"Start"),(i,{success:a})=>$o(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const vs=new WeakMap,ws=new WeakMap,Ef=e=>{const t=vs.get(e.target);t&&t(e)},Mf=e=>{e.forEach(Ef)};function Vf({root:e,...t}){const n=e||document;ws.has(n)||ws.set(n,{});const s=ws.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Mf,{root:e,...t})),s[r]}function Df(e,t,n){const s=Vf(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const Lf={some:0,all:1};class Rf extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Lf[r]},a=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:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=Df(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(If(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function If({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Of={...lf,...{inView:{Feature:Rf},tap:{Feature:Nf},focus:{Feature:Pf},hover:{Feature:Af}},...Cf,...{layout:{ProjectionNode:mo,MeasureLayout:_o}}},z=nf(Of,sf);function Wo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function zf(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wo(e))&&(s&&(s+=" "),s+=t);return s}const Ff=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},_f=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Bf="arbitrary..",$f=e=>{const t=Uf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wf(i);const a=i.split(qt),c=a[0]===""&&a.length>1?1:0;return Ko(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],u=n[i];return c?u?Ff(u,c):c:u||Go}return n[i]||Go}}},Ko=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const u=Ko(e,t+1,o);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(qt):e.slice(t).join(qt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Wf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Bf+s:void 0})(),Uf=e=>{const{theme:t,classGroups:n}=e;return Gf(n,t)},Gf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];ks(r,n,s,t)}return n},ks=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Kf(i,t,n,s)}},Kf=(e,t,n,s)=>{if(typeof e=="string"){Yf(e,t,n);return}if(typeof e=="function"){Hf(e,t,n,s);return}Xf(e,t,n,s)},Yf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Hf=(e,t,n,s)=>{if(qf(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(_f(n,e))},Xf=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];ks(c,Yo(t,a),n,s)}},Yo=(e,t)=>{let n=e;const s=t.split(qt),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=Uo(),n.nextPart.set(i,a)),n=a}return n},qf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},Ts="!",Ho=":",Jf=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),Qf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,u;const d=r.length;for(let p=0;p<d;p++){const y=r[p];if(i===0&&a===0){if(y===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=o.length===0?r:r.slice(c);let h=f,m=!1;f.endsWith(Ts)?(h=f.slice(0,-1),m=!0):f.startsWith(Ts)&&(h=f.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Xo(o,m,h,g)};if(t){const r=t+Ho,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Xo(Jf,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},eh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",c=t.has(i);a||c?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},th=e=>({cache:Zf(e.cacheSize),parseClassName:Qf(e),sortModifiers:eh(e),postfixLookupClassGroupIds:nh(e),...$f(e)}),nh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)t[n[s]]=!0;return t},sh=/\s+/,rh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(sh);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(h){u=f+(u.length>0?" "+u:u);continue}let T=!!y,w;if(T){const O=p.substring(0,y);w=s(O);const k=w&&i[w]?s(p):void 0;k&&k!==w&&(w=k,T=!1)}else w=s(p);if(!w){if(!T){u=f+(u.length>0?" "+u:u);continue}if(w=s(p),!w){u=f+(u.length>0?" "+u:u);continue}T=!1}const b=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?b+Ts:b,S=j+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(w,T);for(let O=0;O<E.length;++O){const k=E[O];a.push(j+k)}u=f+(u.length>0?" "+u:u)}return u},ih=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=qo(n))&&(r&&(r+=" "),r+=s);return r},qo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=qo(e[s]))&&(n&&(n+=" "),n+=t);return n},oh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=th(u),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const u=s(c);if(u)return u;const d=rh(c,n);return r(c,d),d};return o=i,(...c)=>o(ih(...c))},ah=[],te=e=>{const t=n=>n[e]||ah;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ch=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>lh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),js=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ch.test(e),Qo=()=>!0,mh=e=>uh.test(e)&&!dh.test(e),Ss=()=>!1,ph=e=>fh.test(e),gh=e=>hh.test(e),yh=e=>!C(e)&&!A(e),xh=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,mh),ea=e=>Re(e,Ah,I),vh=e=>Re(e,la,Qo),wh=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),kh=e=>Re(e,ra,gh),Zt=e=>Re(e,ca,ph),A=e=>Jo.test(e),yt=e=>We(e,oa),Th=e=>We(e,aa),na=e=>We(e,sa),jh=e=>We(e,ia),Sh=e=>We(e,ra),Jt=e=>We(e,ca,!0),Ch=e=>We(e,la,!0),Re=(e,t,n)=>{const s=Zo.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},We=(e,t,n=!1)=>{const s=Jo.exec(e);return s?s[1]?t(s[1]):n:!1},sa=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",ia=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",Ah=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Ph=oh(()=>{const e=te("color"),t=te("font"),n=te("text"),s=te("font-weight"),r=te("tracking"),o=te("leading"),i=te("breakpoint"),a=te("container"),c=te("spacing"),u=te("radius"),d=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),y=te("aspect"),T=te("ease"),w=te("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),A,C],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],k=()=>[A,C,c],M=()=>[Le,"full","auto",...k()],V=()=>[Te,"none","subgrid",A,C],F=()=>["auto",{span:["full",Te,A,C]},Te,A,C],B=()=>[Te,"auto",A,C],ce=()=>["auto","min","max","fr",A,C],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...k()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],G=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],N=()=>[e,A,C],v=()=>[...j(),na,ta,{position:[A,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",jh,bh,{size:[A,C]}],H=()=>[js,yt,$e],Q=()=>["","none","full",u,A,C],se=()=>["",I,yt,$e],K=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[I,js,na,ta],Qt=()=>["","none",g,A,C],en=()=>["none",I,A,C],tn=()=>["none",I,A,C],As=()=>[I,A,C],nn=()=>[Le,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[Qo],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[yh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",I],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,C,A,y]}],container:["container"],"container-type":[{"@container":["","normal","size",A,C]}],"container-named":[xh],columns:[{columns:[I,C,A,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",A,C]}],basis:[{basis:[Le,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Le,"auto","initial","none",C]}],grow:[{grow:["",I,A,C]}],shrink:[{shrink:["",I,A,C]}],order:[{order:[Te,"first","last","none",A,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...xe()]}],"min-w":[{"min-w":[a,"screen","none",...xe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...xe()]}],h:[{h:["screen","lh",...xe()]}],"min-h":[{"min-h":["screen","lh","none",...xe()]}],"max-h":[{"max-h":["screen","lh",...xe()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ch,vh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Th,wh,t]}],"font-features":[{"font-features":[C]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,A,C]}],"line-clamp":[{"line-clamp":[I,"none",A,ea]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",A,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",A,$e]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[I,"auto",A,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Te,A,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",A,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:v()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,A,C],radial:["",A,C],conic:[Te,A,C]},Sh,kh]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,A,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[I,A,C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[A,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:v()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,C]}],filter:[{filter:["","none",A,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,A,C]}],contrast:[{contrast:[I,A,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",I,A,C]}],"hue-rotate":[{"hue-rotate":[I,A,C]}],invert:[{invert:["",I,A,C]}],saturate:[{saturate:[I,A,C]}],sepia:[{sepia:["",I,A,C]}],"backdrop-filter":[{"backdrop-filter":["","none",A,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,A,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,A,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,A,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,A,C]}],"backdrop-invert":[{"backdrop-invert":["",I,A,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,A,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,A,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,A,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",A,C]}],ease:[{ease:["linear","initial",T,A,C]}],delay:[{delay:[I,A,C]}],animate:[{animate:["none",w,A,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,A,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:en()}],"rotate-x":[{"rotate-x":en()}],"rotate-y":[{"rotate-y":en()}],"rotate-z":[{"rotate-z":en()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:As()}],"skew-x":[{"skew-x":As()}],"skew-y":[{"skew-y":As()}],transform:[{transform:[A,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nn()}],"translate-x":[{"translate-x":nn()}],"translate-y":[{"translate-y":nn()}],"translate-z":[{"translate-z":nn()}],"translate-none":["translate-none"],zoom:[{zoom:[Te,A,C]}],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A,C]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Ph(zf(e))}const Nh=({title:e,children:t,className:n})=>{const[s,r]=x.useState(!1);return l.jsxs("div",{className:D("glass-card overflow-hidden p-0 border border-border/50",n),children:[l.jsxs("button",{type:"button",onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between font-bold text-foreground text-left cursor-pointer hover:bg-secondary/20 transition-colors",children:[l.jsx("span",{children:e}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(de,{initial:!1,children:s&&l.jsx(z.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},ua={success:"border-green-500/20 bg-green-500/5",error:"border-red-500/20 bg-red-500/5",warning:"border-amber-500/20 bg-amber-500/5",info:"border-blue-500/20 bg-blue-500/5"},da={success:{title:"var(--alert-success-title, #14532d)",desc:"var(--alert-success-desc, #15803d)"},error:{title:"var(--alert-error-title, #7f1d1d)",desc:"var(--alert-error-desc, #b91c1c)"},warning:{title:"var(--alert-warning-title, #78350f)",desc:"var(--alert-warning-desc, #b45309)"},info:{title:"var(--alert-info-title, #1e3a8a)",desc:"var(--alert-info-desc, #1d4ed8)"}},Eh=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=x.useState(!0),a=da[n]||da.info,c={success:l.jsx(wt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(rn,{size:18,style:{color:a.title}}),info:l.jsx(kt,{size:18,style:{color:a.title}})};return l.jsx(de,{children:o&&l.jsxs(z.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:D("flex items-start gap-4 p-4 rounded-2xl border text-left",ua[n]||ua.info,r),children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:c[n]||c.info}),l.jsxs("div",{className:"flex-1 space-y-1",children:[e&&l.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&l.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&l.jsx("button",{type:"button",onClick:()=>i(!1),style:{color:a.title},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors cursor-pointer shrink-0",children:l.jsx(Ae,{size:14})})]})})},fa={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},ha={online:"bg-emerald-500 ring-emerald-500/20",offline:"bg-zinc-400 ring-zinc-400/20",busy:"bg-destructive ring-destructive/20",syncing:"bg-primary ring-primary/20 animate-pulse"},Mh=({src:e,alt:t="User Profile",name:n="",size:s="md",status:r,className:o})=>{const i=n?n.split(" ").map(a=>a[0]).slice(0,2).join("").toUpperCase():"";return l.jsxs("div",{className:"relative inline-block shrink-0",children:[l.jsx("div",{className:D("relative rounded-full overflow-hidden flex items-center justify-center border border-border/80 shadow-md bg-secondary/50 font-bold text-foreground font-sans",fa[s]||fa.md,o),children:e?l.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):l.jsx("span",{children:i||"?"})}),r&&ha[r]&&l.jsx("span",{className:D("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},xt=({children:e,className:t})=>l.jsx("div",{className:D("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Ue=({label:e,error:t,icon:n,className:s,id:r,...o})=>l.jsxs("div",{className:D("space-y-1.5 w-full text-left",s),children:[e&&l.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsxs("div",{className:"relative group",children:[n&&l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:l.jsx(n,{size:18})}),l.jsx("input",{id:r,className:D("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(z.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),ye=({children:e,className:t,variant:n="primary",loading:s=!1,...r})=>{const o={primary:"btn-primary",secondary:"btn-secondary",outline:"btn-outline",ghost:"btn-ghost",glass:"btn-glass",destructive:"btn-destructive"};return l.jsxs(z.button,{whileHover:{y:-2},whileTap:{scale:.98},className:D("relative overflow-hidden",o[n],s&&"opacity-70 cursor-not-allowed",t),disabled:s||r.disabled,...r,children:[s&&l.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e,l.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:animate-[shine_1.5s_infinite]"})]})},Cs=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-lg border flex items-center justify-center transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(Oa,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Vh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Ba,title:o="Ether UI Console",className:i})=>{const[a,c]=x.useState(e),[u,d]=x.useState(""),[f,h]=x.useState(""),[m,g]=x.useState(""),[p,y]=x.useState(!1),[T,w]=x.useState(!1),[b,j]=x.useState(!1),S=async E=>{E.preventDefault(),j(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:u,email:f,password:m,acceptTerms:T}):a==="forgot"&&s&&await s({email:f})}finally{j(!1)}};return l.jsxs("div",{className:D("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/5 rounded-full blur-[120px] pointer-events-none animate-pulse"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px] pointer-events-none animate-pulse duration-4000"}),l.jsx("div",{className:"w-full max-w-md z-10",children:l.jsxs(de,{mode:"wait",children:[a==="login"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Cs,{label:"Remember me",checked:p,onChange:y}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:u,onChange:E=>d(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Cs,{label:"I agree to the Terms & Conditions",checked:T,onChange:w})}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsxs("button",{type:"button",onClick:()=>c("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[l.jsx(Ra,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},ma=({children:e,variant:t="default",className:n})=>{const s={default:"bg-secondary text-secondary-foreground border-border",primary:"bg-primary text-primary-foreground border-primary",success:"bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/20",warning:"bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20",danger:"bg-destructive text-destructive-foreground border-destructive"};return l.jsx("span",{className:D("px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider border inline-flex items-center justify-center",s[t],n),children:e})},pa=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>l.jsx(de,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:D("relative w-full max-w-lg glass-card overflow-hidden p-0 flex flex-col max-h-[90vh] text-left",o,r),children:[l.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[l.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),l.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:l.jsx(Ae,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Dh=({isOpen:e,onClose:t,onConfirm:n,title:s="Are you sure?",message:r="This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",confirmVariant:a="destructive",loading:c=!1})=>l.jsx(pa,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsx(ye,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(ye,{variant:a,onClick:n,loading:c,children:o})]})]})}),Lh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=x.useState(!1),c=x.useRef(null),u=t.find(d=>d.value===n);return x.useEffect(()=>{const d=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),l.jsxs("div",{ref:c,className:D("space-y-1.5 w-full text-left relative",o),children:[e&&l.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsx("div",{children:l.jsxs("button",{type:"button",onClick:()=>a(!i),className:"glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",children:[l.jsx("span",{className:D(!u&&"text-muted-foreground/60"),children:u?u.label:r}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(de,{children:i&&l.jsx(z.div,{initial:{opacity:0,y:5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.98},transition:{duration:.15},className:"absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",children:t.map((d,f)=>{const h=d.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(d.value),a(!1)},className:D("w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",h?"bg-primary text-primary-foreground font-semibold":"hover:bg-secondary text-foreground"),children:d.label},d.value||f)})})})]})},Rh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=x.useState(!1),[a,c]=x.useState([]),u=x.useRef(null),d=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const y=Array.from(p).map(w=>{const j=w.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:w.name,size:(w.size/1024).toFixed(1)+" KB",rawFile:w,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),T=[...a,...y].slice(0,n);c(T),e&&e(T.map(w=>w.rawFile)),y.forEach(w=>{if(w.status==="failed")return;let b=0;const j=setInterval(()=>{b+=Math.floor(Math.random()*15)+5,b>=100?(b=100,clearInterval(j),c(S=>S.map(E=>E.id===w.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===w.id?{...E,progress:b}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(y=>y.id!==p))};return l.jsxs("div",{className:D("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:d,onDragOver:d,onDragLeave:d,onDrop:h,onClick:()=>u.current&&u.current.click(),className:D("relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",o?"border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"),children:[l.jsx("input",{ref:u,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(z.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:D("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Fa,{size:24})}),l.jsxs("div",{className:"text-center space-y-1",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),l.jsx(de,{children:a.length>0&&l.jsxs(z.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},className:"space-y-2 border border-border/40 bg-card/60 rounded-2xl p-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[l.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),l.jsx("button",{onClick:()=>c([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),l.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx(_a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(z.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&l.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&l.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[l.jsx(wt,{size:10})," Upload complete!"]})]})]}),l.jsx("button",{onClick:()=>g(p.id),className:"p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:14})})]},p.id))})]})})]})},Ih=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(de,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm cursor-pointer"}),l.jsxs(z.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:D("fixed top-4 right-4 z-50 h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-sm bg-card/95 backdrop-blur-xl border border-border/50 shadow-2xl rounded-3xl flex flex-col text-left overflow-hidden",o),children:[l.jsxs("div",{className:"p-4 border-b border-border/40 flex items-center justify-between min-h-[72px] shrink-0 bg-card/65 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:l.jsx(Ds,{size:18,className:"animate-bounce"})}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&l.jsx("button",{onClick:s,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-destructive cursor-pointer transition-colors",title:"Clear All",children:l.jsx(Wa,{size:16})}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:16})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:l.jsx(de,{initial:!1,children:n.length===0?l.jsxs(z.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[l.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:l.jsx(Ds,{size:32,className:"opacity-50"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",c=i.type==="warning";return l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-3.5 rounded-2xl bg-secondary/20 border border-border/10 flex items-start gap-3 relative overflow-hidden group hover:border-border/30 transition-all text-xs",children:[i.unread&&l.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),l.jsxs("div",{className:D("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",c&&"bg-amber-500/10 text-amber-500",!a&&!c&&"bg-sky-500/10 text-sky-500"),children:[a&&l.jsx(wt,{size:16}),c&&l.jsx(rn,{size:16}),!a&&!c&&l.jsx(kt,{size:16})]}),l.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("p",{className:"font-bold text-foreground",children:i.title}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),l.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),l.jsx("button",{onClick:()=>r&&r(i.id),className:"absolute bottom-3 right-3 p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors opacity-0 group-hover:opacity-100",title:"Dismiss notification",children:l.jsx(Ae,{size:12})})]},i.id)})})})]})]})}),Oh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>t<=1?null:l.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[l.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[l.jsx(ye,{variant:"outline",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(ye,{variant:"outline",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),l.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",l.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",l.jsx("span",{className:"font-bold text-foreground",children:t})]})}),l.jsx("div",{children:l.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(Rs,{size:16})]}),[...Array(t)].map((r,o)=>{const i=o+1,a=e===i;return l.jsx(ye,{variant:a?"primary":"outline",className:"w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs",onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(sn,{size:16})]})]})})]})]}),zh=({children:e,content:t})=>{const[n,s]=x.useState(!1),[r,o]=x.useState({x:0,y:0}),i=x.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};x.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const c=()=>{t&&s(!0)},u=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:u,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&ja.createPortal(l.jsx(de,{children:l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:4},style:{position:"absolute",left:r.x,top:r.y,transform:"translateX(-50%) translateY(-100%)",zIndex:99999,pointerEvents:"none"},className:"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-lg shadow-xl whitespace-nowrap",children:[t,l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-zinc-900 dark:border-t-zinc-100"})]})}),document.body)]})},Fh=({value:e=0,size:t=80,strokeWidth:n=6,showPercent:s=!0,className:r})=>{const o=(t-n)/2,i=o*2*Math.PI,a=Math.min(Math.max(e,0),100),c=i-a/100*i;return l.jsxs("div",{className:D("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[l.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[l.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),l.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:c,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&l.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},_h=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-full border flex items-center justify-center transition-colors duration-200",e?"border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},className:"w-2.5 h-2.5 rounded-full bg-primary"})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Bh=({collapsed:e=!1,onToggle:t,logo:n,title:s="Ether UI",children:r,footer:o,className:i})=>l.jsxs("aside",{className:D("h-screen bg-card border-r border-border/80 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left",e?"w-20":"w-64",i),children:[l.jsxs("div",{className:D("flex border-b border-border/40 shrink-0 transition-all duration-300",e?"flex-col items-center justify-center gap-2.5 py-4 px-1 min-h-[88px]":"flex-row items-center justify-between p-4 min-h-[72px]"),children:[l.jsxs("div",{className:D("flex items-center gap-3 overflow-hidden",e&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!e&&l.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),l.jsx("button",{type:"button",onClick:()=>t&&t(!e),className:"p-1.5 hover:bg-secondary/60 rounded-xl border border-border/20 text-muted-foreground hover:text-foreground cursor-pointer shrink-0 transition-colors",children:e?l.jsx(sn,{size:14}):l.jsx(Rs,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",children:r}),o&&l.jsx("div",{className:"p-3 border-t border-border/40 min-h-[72px] flex items-center overflow-hidden shrink-0",children:o})]}),$h=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o})=>l.jsxs("button",{type:"button",onClick:s,className:D("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-200 cursor-pointer text-left select-none shrink-0",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary text-primary-foreground shadow-md shadow-primary/10":"text-muted-foreground hover:text-foreground hover:bg-secondary/40"),children:[e&&l.jsx(e,{size:18,className:"shrink-0"}),!r&&l.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!r&&o&&!n&&l.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-bold border shrink-0 bg-primary/10 text-primary border-primary/20",children:o}),!r&&n&&l.jsx(z.div,{layoutId:"active-sidebar-indicator",className:"w-1.5 h-1.5 rounded-full bg-primary-foreground shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),Wh=({min:e=0,max:t=100,step:n=1,value:s=50,onChange:r,label:o,className:i})=>{const a=(s-e)/(t-e)*100;return l.jsxs("div",{className:D("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&l.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&l.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),l.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),l.jsxs("div",{className:"relative flex items-center group",children:[l.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:c=>r&&r(Number(c.target.value)),className:"w-full h-1.5 bg-secondary/50 dark:bg-zinc-800 rounded-full appearance-none outline-none cursor-pointer",style:{background:`linear-gradient(to right, var(--primary) 0%, var(--primary) ${a}%, var(--secondary) ${a}%, var(--secondary) 100%)`}}),l.jsx("style",{children:`
|
|
150
|
+
`),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),l.jsx(Pd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Ed=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Md),f=x.useId();let h=!0,m=x.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:r,onExitComplete:g=>{d.set(g,!0);for(const p of d.values())if(!p)return;s&&s()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,s]);return o&&h&&(m={...m}),x.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),bt.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=l.jsx(Nd,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Md(){return new Map}function go(e=!0){const t=x.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=x.useId();x.useEffect(()=>{if(e)return r(o)},[e]);const i=x.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Gt=e=>e.key||"";function yo(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const de=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=go(i),h=x.useMemo(()=>yo(e),[e]),m=i&&!d?[]:h.map(Gt),g=x.useRef(!0),p=x.useRef(h),y=an(()=>new Map),T=x.useRef(new Set),[w,b]=x.useState(h),[j,S]=x.useState(h);zs(()=>{g.current=!1,p.current=h;for(let k=0;k<j.length;k++){const M=Gt(j[k]);m.includes(M)?(y.delete(M),T.current.delete(M)):y.get(M)!==!0&&y.set(M,!1)}},[j,m.length,m.join("-")]);const E=[];if(h!==w){let k=[...h];for(let M=0;M<j.length;M++){const V=j[M],F=Gt(V);m.includes(F)||(k.splice(M,0,V),E.push(V))}return o==="wait"&&E.length&&(k=E),S(yo(k)),b(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&j.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:O}=x.useContext(on);return l.jsx(l.Fragment,{children:j.map(k=>{const M=Gt(k),V=i&&!d?!1:h===j||m.includes(M),F=()=>{if(T.current.has(M))return;if(y.has(M))T.current.add(M),y.set(M,!0);else return;let B=!0;y.forEach(ce=>{ce||(B=!1)}),B&&(O==null||O(),S(p.current),i&&(f==null||f()),s&&s())};return l.jsx(Ed,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:F,anchorX:a,anchorY:c,children:k},M)})})},xo=x.createContext({strict:!1}),bo={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"]};let vo=!1;function Vd(){if(vo)return;const e={};for(const t in bo)e[t]={isEnabled:n=>bo[t].some(s=>!!n[s])};hi(e),vo=!0}function wo(){return Vd(),gu()}function Dd(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const Ld=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","propagate","ignoreStrict","viewport"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ld.has(e)}let ko=e=>!Kt(e);function Rd(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Rd(require("@emotion/is-prop-valid").default)}catch{}function Id(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||ie(e[r])||(ko(r)||n===!0&&Kt(r)||!t&&!Kt(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Yt=x.createContext({});function Od(e,t){if(zt(e)){const{initial:n,animate:s}=e;return{initial:n===!1||dt(n)?n:void 0,animate:dt(s)?s:void 0}}return e.inherit!==!1?t:{}}function zd(e){const{initial:t,animate:n}=Od(e,x.useContext(Yt));return x.useMemo(()=>({initial:t,animate:n}),[To(t),To(n)])}function To(e){return Array.isArray(e)?e.join(" "):e}const hs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jo(e,t,n){for(const s in t)!ie(t[s])&&!Ai(s,n)&&(e[s]=t[s])}function Fd({transformTemplate:e},t){return x.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _d(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Fd(e,t)),s}function Bd(e,t){const n={},s=_d(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const So=()=>({...hs(),attrs:{}});function $d(e,t,n,s){const r=x.useMemo(()=>{const o=So();return Pi(o,t,Ei(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};jo(o,e.style,e),r.style={...o,...r.style}}return r}const Wd=["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 ms(e){return typeof e!="string"||e.includes("-")?!1:!!(Wd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ud(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?$d:Bd)(t,s,r,e),u=Id(t,typeof e=="string",o),d=e!==x.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=x.useMemo(()=>ie(f)?f.get():f,[f]);return x.createElement(e,{...d,children:h})}function Gd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Kd(n,s,r,e),renderState:t()}}function Kd(e,t,n,s){const r={},o=s(e,{});for(const h in o)r[h]=Wt(o[h]);let{initial:i,animate:a}=e;const c=zt(e),u=ui(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?a:i;if(f&&typeof f!="boolean"&&!Ot(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=Bn(e,h[m]);if(g){const{transitionEnd:p,transition:y,...T}=g;for(const w in T){let b=T[w];if(Array.isArray(b)){const j=d?b.length-1:0;b=b[j]}b!==null&&(r[w]=b)}for(const w in p)r[w]=p[w]}}}return r}const Co=e=>(t,n)=>{const s=x.useContext(Yt),r=x.useContext(Tt),o=()=>Gd(e,t,s,r);return n?o():an(o)},Yd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Hd=Co({scrapeMotionValuesFromProps:Mi,createRenderState:So}),Xd=Symbol.for("motionComponentSymbol");function qd(e,t,n){const s=x.useRef(n);x.useInsertionEffect(()=>{s.current=n});const r=x.useRef(null);return x.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=s.current;if(typeof i=="function")if(o){const c=i(o);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const Ao=x.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zd(e,t,n,s,r,o){var b,j;const{visualElement:i}=x.useContext(Yt),a=x.useContext(xo),c=x.useContext(Tt),u=x.useContext(fs),d=u.reducedMotion,f=u.skipAnimations,h=x.useRef(null),m=x.useRef(!1);s=s||a.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,p=x.useContext(Ao);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Jd(h.current,n,r,p);const y=x.useRef(!1);x.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const T=n[Wr],w=x.useRef(!!T&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,T))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,T)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),w.current&&g.animationState&&g.animationState.animateChanges())}),x.useEffect(()=>{g&&(!w.current&&g.animationState&&g.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,T)}),w.current=!1),g.enteringChildren=void 0)}),g}function Jd(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Po(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||a&&tt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Po(e){if(e)return e.options.allowProjection!==!1?e.projection:Po(e.parent)}function ps(e,{forwardMotionProps:t=!1,type:n}={},s,r){s&&Dd(s);const o=n?n==="svg":ms(e),i=o?Hd:Yd;function a(u,d){let f;const h={...x.useContext(fs),...u,layoutId:Qd(u)},{isStatic:m}=h,g=zd(u),p=i(u,m);if(!m&&typeof window<"u"){ef(h,s);const y=tf(h);f=y.MeasureLayout,g.visualElement=Zd(e,p,h,r,y.ProjectionNode,o)}return l.jsxs(Yt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Ud(e,u,qd(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=x.forwardRef(a);return c[Xd]=e,c}function Qd({layoutId:e}){const t=x.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function ef(e,t){const n=x.useContext(xo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ge(!1,s,"lazy-strict-mode"):je(!1,s,"lazy-strict-mode")}}function tf(e){const t=wo(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function nf(e,t){if(typeof Proxy>"u")return ps;const n=new Map,s=(o,i)=>ps(o,i,e,t),r=(o,i)=>(process.env.NODE_ENV!=="production"&&dn(!1,"motion() is deprecated. Use motion.create() instead."),s(o,i));return new Proxy(r,{get:(o,i)=>i==="create"?s:(n.has(i)||n.set(i,ps(i,void 0,e,t)),n.get(i))})}const sf=(e,t)=>t.isSVG??ms(e)?new Du(t):new Au(t,{allowProjection:e!==x.Fragment});class rf extends De{constructor(t){super(t),t.animationState||(t.animationState=zu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ot(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.call(this)}}let of=0;class af extends De{constructor(){super(...arguments),this.id=of++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&s===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const c=Fe(this.node,i,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lf={animation:{Feature:rf},exit:{Feature:af}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const cf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,cf(n),s)}const No=({current:e})=>e?e.ownerDocument.defaultView:null,Eo=(e,t)=>Math.abs(e-t);function uf(e,t){const n=Eo(e.x,t.x),s=Eo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Mo=new Set(["auto","scroll"]);class Vo{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ht(this.lastRawMoveEventInfo,this.transformPagePoint));const m=gs(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,p=uf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:T}=re;this.history.push({...y,timestamp:T});const{onStart:w,onMove:b}=this.handlers;g||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,w),y&&y(m,w)},!qn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=i,this.contextWindow=r||window;const c=pt(t),u=Ht(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=re;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,gs(u,this.history)),this.removeListeners=rt(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Mo.has(s.overflowX)||Mo.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,r=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:r.x-n.x,y:r.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,r),_.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ne(this.updatePoint)}}function Ht(e,t){return t?{point:t(e.point)}:e}function Do(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gs({point:e},t){return{point:e,delta:Do(e,Lo(t)),offset:Do(e,df(t)),velocity:ff(t,.1)}}function df(e){return e[0]}function Lo(e){return e[e.length-1]}function ff(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Lo(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>ue(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&r.timestamp-s.timestamp>ue(t)*2&&(s=e[1]);const o=he(r.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const i={x:(r.x-s.x)/o,y:(r.y-s.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function hf(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?$(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?$(n,e,s.max):Math.min(e,n)),e}function Ro(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 mf(e,{top:t,left:n,bottom:s,right:r}){return{x:Ro(e.x,n,r),y:Ro(e.y,t,s)}}function Io(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function pf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function gf(e,t){let n=.5;const s=le(e),r=le(t);return r>s?n=it(t.min,t.max-s,e.min):s>r&&(n=it(e.min,e.max-r,t.min)),be(0,1,n)}function yf(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 ys=.35;function xf(e=ys){return e===!1?e=0:e===!0&&(e=ys),{x:Oo(e,"left","right"),y:Oo(e,"top","bottom")}}function Oo(e,t,n){return{min:zo(e,t),max:zo(e,n)}}function zo(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class vf{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=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(pt(f).point),this.stopAnimation()},i=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ke(T=>{let w=this.getAxisMotionValue(T).get()||0;if(ve.test(w)){const{projection:b}=this.visualElement;if(b&&b.layout){const j=b.layout.layoutBox[T];j&&(w=le(j)*(parseFloat(w)/100))}}this.originPoint[T]=w}),p&&_.update(()=>p(f,h),!1,!0),Wn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:T}=h;if(g&&this.currentDirection===null){this.currentDirection=kf(T),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,T),this.updateAxis("y",h.point,T),this.visualElement.render(),y&&_.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Vo(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:No(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!s)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Xt(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(i=hf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,r=this.constraints;t&&tt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=mf(s.layoutBox,t):this.constraints=!1,this.elastic=xf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=yf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tt(t))return!1;const s=t.current;je(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=wu(s,r.root,this.visualElement.getTransformPagePoint());let i=pf(r.layout.layoutBox,o);if(n){const a=n(xu(i));this.hasMutatedConstraints=!!a,a&&(i=pi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=ke(d=>{if(!Xt(d,n,this.currentDirection))return;let f=c&&c[d]||{};(i===!0||i===d)&&(f={min:0,max:0});const h=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Wn(this.visualElement,t),s.start(_n(t,s,0,n,this.visualElement,!1))}stopAnimation(){ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ke(n=>{const{drag:s}=this.getProps();if(!Xt(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:i,max:a}=r.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-$(i,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!tt(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ke(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const c=a.get();r[i]=gf({min:c,max:c},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),ke(i=>{if(!Xt(i,t,null))return;const a=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];a.set($(c,u,r[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=gt(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Jc(h);d&&f&&!m&&this.start(u)});let s;const r=()=>{const{dragConstraints:u}=this.getProps();tt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=wf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),_.read(r);const a=mt(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(ke(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ys,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Fo(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wf(e,t,n){const s=ai(e,Fo(n)),r=ai(t,Fo(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Tf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new vf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xs=e=>(t,n)=>{e&&_.update(()=>e(t,n),!1,!0)};class jf extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:No(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:xs(t),onStart:xs(n),onMove:xs(s),onEnd:(o,i)=>{delete this.session,r&&_.postRender(()=>r(o,i))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let bs=!1;class Sf extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),s&&s.register&&r&&s.register(o),bs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ut.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:o}=this.props,{projection:i}=s;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),bs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||_.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:s}=t;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Xn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;bs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _o(e){const[t,n]=go(),s=x.useContext(on);return l.jsx(Sf,{...e,layoutGroup:s,switchLayoutGroup:x.useContext(Ao),isPresent:t,safeToRemove:n})}const Cf={pan:{Feature:jf},drag:{Feature:Tf,ProjectionNode:mo,MeasureLayout:_o}};function Bo(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Af extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Hc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Pf extends De{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=rt(mt(this.node.current,"focus",()=>this.onFocus()),mt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $o(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&_.postRender(()=>o(t,pt(t)))}class Nf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=eu(t,(r,o)=>($o(this.node,o,"Start"),(i,{success:a})=>$o(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const vs=new WeakMap,ws=new WeakMap,Ef=e=>{const t=vs.get(e.target);t&&t(e)},Mf=e=>{e.forEach(Ef)};function Vf({root:e,...t}){const n=e||document;ws.has(n)||ws.set(n,{});const s=ws.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Mf,{root:e,...t})),s[r]}function Df(e,t,n){const s=Vf(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const Lf={some:0,all:1};class Rf extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Lf[r]},a=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:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=Df(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(If(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function If({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Of={...lf,...{inView:{Feature:Rf},tap:{Feature:Nf},focus:{Feature:Pf},hover:{Feature:Af}},...Cf,...{layout:{ProjectionNode:mo,MeasureLayout:_o}}},z=nf(Of,sf);function Wo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Wo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function zf(){for(var e,t,n=0,s="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Wo(e))&&(s&&(s+=" "),s+=t);return s}const Ff=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},_f=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Bf="arbitrary..",$f=e=>{const t=Uf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wf(i);const a=i.split(qt),c=a[0]===""&&a.length>1?1:0;return Ko(a,c,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const c=s[i],u=n[i];return c?u?Ff(u,c):c:u||Go}return n[i]||Go}}},Ko=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const u=Ko(e,t+1,o);if(u)return u}const i=n.validators;if(i===null)return;const a=t===0?e.join(qt):e.slice(t).join(qt),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(a))return d.classGroupId}},Wf=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Bf+s:void 0})(),Uf=e=>{const{theme:t,classGroups:n}=e;return Gf(n,t)},Gf=(e,t)=>{const n=Uo();for(const s in e){const r=e[s];ks(r,n,s,t)}return n},ks=(e,t,n,s)=>{const r=e.length;for(let o=0;o<r;o++){const i=e[o];Kf(i,t,n,s)}},Kf=(e,t,n,s)=>{if(typeof e=="string"){Yf(e,t,n);return}if(typeof e=="function"){Hf(e,t,n,s);return}Xf(e,t,n,s)},Yf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Hf=(e,t,n,s)=>{if(qf(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(_f(n,e))},Xf=(e,t,n,s)=>{const r=Object.entries(e),o=r.length;for(let i=0;i<o;i++){const[a,c]=r[i];ks(c,Yo(t,a),n,s)}},Yo=(e,t)=>{let n=e;const s=t.split(qt),r=s.length;for(let o=0;o<r;o++){const i=s[o];let a=n.nextPart.get(i);a||(a=Uo(),n.nextPart.set(i,a)),n=a}return n},qf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Zf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const r=(o,i)=>{n[o]=i,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return r(o,i),i},set(o,i){o in n?n[o]=i:r(o,i)}}},Ts="!",Ho=":",Jf=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),Qf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const o=[];let i=0,a=0,c=0,u;const d=r.length;for(let p=0;p<d;p++){const y=r[p];if(i===0&&a===0){if(y===Ho){o.push(r.slice(c,p)),c=p+1;continue}if(y==="/"){u=p;continue}}y==="["?i++:y==="]"?i--:y==="("?a++:y===")"&&a--}const f=o.length===0?r:r.slice(c);let h=f,m=!1;f.endsWith(Ts)?(h=f.slice(0,-1),m=!0):f.startsWith(Ts)&&(h=f.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Xo(o,m,h,g)};if(t){const r=t+Ho,o=s;s=i=>i.startsWith(r)?o(i.slice(r.length)):Xo(Jf,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},eh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let r=[];for(let o=0;o<n.length;o++){const i=n[o],a=i[0]==="[",c=t.has(i);a||c?(r.length>0&&(r.sort(),s.push(...r),r=[]),s.push(i)):r.push(i)}return r.length>0&&(r.sort(),s.push(...r)),s}},th=e=>({cache:Zf(e.cacheSize),parseClassName:Qf(e),sortModifiers:eh(e),postfixLookupClassGroupIds:nh(e),...$f(e)}),nh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let s=0;s<n.length;s++)t[n[s]]=!0;return t},sh=/\s+/,rh=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(sh);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(h){u=f+(u.length>0?" "+u:u);continue}let T=!!y,w;if(T){const O=p.substring(0,y);w=s(O);const k=w&&i[w]?s(p):void 0;k&&k!==w&&(w=k,T=!1)}else w=s(p);if(!w){if(!T){u=f+(u.length>0?" "+u:u);continue}if(w=s(p),!w){u=f+(u.length>0?" "+u:u);continue}T=!1}const b=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?b+Ts:b,S=j+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=r(w,T);for(let O=0;O<E.length;++O){const k=E[O];a.push(j+k)}u=f+(u.length>0?" "+u:u)}return u},ih=(...e)=>{let t=0,n,s,r="";for(;t<e.length;)(n=e[t++])&&(s=qo(n))&&(r&&(r+=" "),r+=s);return r},qo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=qo(e[s]))&&(n&&(n+=" "),n+=t);return n},oh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=th(u),s=n.cache.get,r=n.cache.set,o=a,a(c)},a=c=>{const u=s(c);if(u)return u;const d=rh(c,n);return r(c,d),d};return o=i,(...c)=>o(ih(...c))},ah=[],te=e=>{const t=n=>n[e]||ah;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ch=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>lh.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),js=e=>e.endsWith("%")&&I(e.slice(0,-1)),Se=e=>ch.test(e),Qo=()=>!0,mh=e=>uh.test(e)&&!dh.test(e),Ss=()=>!1,ph=e=>fh.test(e),gh=e=>hh.test(e),yh=e=>!C(e)&&!A(e),xh=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,mh),ea=e=>Re(e,Ah,I),vh=e=>Re(e,la,Qo),wh=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),kh=e=>Re(e,ra,gh),Zt=e=>Re(e,ca,ph),A=e=>Jo.test(e),yt=e=>We(e,oa),Th=e=>We(e,aa),na=e=>We(e,sa),jh=e=>We(e,ia),Sh=e=>We(e,ra),Jt=e=>We(e,ca,!0),Ch=e=>We(e,la,!0),Re=(e,t,n)=>{const s=Zo.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},We=(e,t,n=!1)=>{const s=Jo.exec(e);return s?s[1]?t(s[1]):n:!1},sa=e=>e==="position"||e==="percentage",ra=e=>e==="image"||e==="url",ia=e=>e==="length"||e==="size"||e==="bg-size",oa=e=>e==="length",Ah=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Ph=oh(()=>{const e=te("color"),t=te("font"),n=te("text"),s=te("font-weight"),r=te("tracking"),o=te("leading"),i=te("breakpoint"),a=te("container"),c=te("spacing"),u=te("radius"),d=te("shadow"),f=te("inset-shadow"),h=te("text-shadow"),m=te("drop-shadow"),g=te("blur"),p=te("perspective"),y=te("aspect"),T=te("ease"),w=te("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...j(),A,C],E=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],k=()=>[A,C,c],M=()=>[Le,"full","auto",...k()],V=()=>[Te,"none","subgrid",A,C],F=()=>["auto",{span:["full",Te,A,C]},Te,A,C],B=()=>[Te,"auto",A,C],ce=()=>["auto","min","max","fr",A,C],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...k()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],G=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...k()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],N=()=>[e,A,C],v=()=>[...j(),na,ta,{position:[A,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",jh,bh,{size:[A,C]}],H=()=>[js,yt,$e],Q=()=>["","none","full",u,A,C],se=()=>["",I,yt,$e],K=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[I,js,na,ta],Qt=()=>["","none",g,A,C],en=()=>["none",I,A,C],tn=()=>["none",I,A,C],As=()=>[I,A,C],nn=()=>[Le,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[Qo],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[yh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",I],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,C,A,y]}],container:["container"],"container-type":[{"@container":["","normal","size",A,C]}],"container-named":[xh],columns:[{columns:[I,C,A,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",A,C]}],basis:[{basis:[Le,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Le,"auto","initial","none",C]}],grow:[{grow:["",I,A,C]}],shrink:[{shrink:["",I,A,C]}],order:[{order:[Te,"first","last","none",A,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[a,"screen",...xe()]}],"min-w":[{"min-w":[a,"screen","none",...xe()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...xe()]}],h:[{h:["screen","lh",...xe()]}],"min-h":[{"min-h":["screen","lh","none",...xe()]}],"max-h":[{"max-h":["screen","lh",...xe()]}],"font-size":[{text:["base",n,yt,$e]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ch,vh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Th,wh,t]}],"font-features":[{"font-features":[C]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,A,C]}],"line-clamp":[{"line-clamp":[I,"none",A,ea]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",A,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",A,$e]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[I,"auto",A,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"tab-size":[{tab:[Te,A,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,C]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",A,C]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:v()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,A,C],radial:["",A,C],conic:[Te,A,C]},Sh,kh]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,A,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[I,A,C]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[A,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:v()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,C]}],filter:[{filter:["","none",A,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,A,C]}],contrast:[{contrast:[I,A,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",I,A,C]}],"hue-rotate":[{"hue-rotate":[I,A,C]}],invert:[{invert:["",I,A,C]}],saturate:[{saturate:[I,A,C]}],sepia:[{sepia:["",I,A,C]}],"backdrop-filter":[{"backdrop-filter":["","none",A,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,A,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,A,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,A,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,A,C]}],"backdrop-invert":[{"backdrop-invert":["",I,A,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,A,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,A,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,A,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",A,C]}],ease:[{ease:["linear","initial",T,A,C]}],delay:[{delay:[I,A,C]}],animate:[{animate:["none",w,A,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,A,C]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:en()}],"rotate-x":[{"rotate-x":en()}],"rotate-y":[{"rotate-y":en()}],"rotate-z":[{"rotate-z":en()}],scale:[{scale:tn()}],"scale-x":[{"scale-x":tn()}],"scale-y":[{"scale-y":tn()}],"scale-z":[{"scale-z":tn()}],"scale-3d":["scale-3d"],skew:[{skew:As()}],"skew-x":[{"skew-x":As()}],"skew-y":[{"skew-y":As()}],transform:[{transform:[A,C,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:nn()}],"translate-x":[{"translate-x":nn()}],"translate-y":[{"translate-y":nn()}],"translate-z":[{"translate-z":nn()}],"translate-none":["translate-none"],zoom:[{zoom:[Te,A,C]}],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A,C]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A,C]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function D(...e){return Ph(zf(e))}const Nh=({title:e,children:t,className:n})=>{const[s,r]=x.useState(!1);return l.jsxs("div",{className:D("glass-card overflow-hidden p-0 border border-border/50",n),children:[l.jsxs("button",{type:"button",onClick:()=>r(!s),className:"w-full px-6 py-4 flex items-center justify-between font-bold text-foreground text-left cursor-pointer hover:bg-secondary/20 transition-colors",children:[l.jsx("span",{children:e}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",s&&"rotate-180")})]}),l.jsx(de,{initial:!1,children:s&&l.jsx(z.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.2},className:"overflow-hidden",children:l.jsx("div",{className:"px-6 pb-5 pt-2 border-t border-border/40 text-sm text-muted-foreground leading-relaxed",children:t})})})]})},ua={success:"border-green-500/20 bg-green-500/5",error:"border-red-500/20 bg-red-500/5",warning:"border-amber-500/20 bg-amber-500/5",info:"border-blue-500/20 bg-blue-500/5"},da={success:{title:"var(--alert-success-title, #14532d)",desc:"var(--alert-success-desc, #15803d)"},error:{title:"var(--alert-error-title, #7f1d1d)",desc:"var(--alert-error-desc, #b91c1c)"},warning:{title:"var(--alert-warning-title, #78350f)",desc:"var(--alert-warning-desc, #b45309)"},info:{title:"var(--alert-info-title, #1e3a8a)",desc:"var(--alert-info-desc, #1d4ed8)"}},Eh=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=x.useState(!0),a=da[n]||da.info,c={success:l.jsx(wt,{size:18,style:{color:a.title}}),error:l.jsx(Is,{size:18,style:{color:a.title}}),warning:l.jsx(rn,{size:18,style:{color:a.title}}),info:l.jsx(kt,{size:18,style:{color:a.title}})};return l.jsx(de,{children:o&&l.jsxs(z.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},className:D("flex items-start gap-4 p-4 rounded-2xl border text-left",ua[n]||ua.info,r),children:[l.jsx("div",{className:"mt-0.5 shrink-0",children:c[n]||c.info}),l.jsxs("div",{className:"flex-1 space-y-1",children:[e&&l.jsx("h4",{style:{color:a.title},className:"font-bold text-sm leading-none",children:e}),t&&l.jsx("p",{style:{color:a.desc},className:"text-xs leading-relaxed font-medium",children:t})]}),s&&l.jsx("button",{type:"button",onClick:()=>i(!1),style:{color:a.title},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors cursor-pointer shrink-0",children:l.jsx(Ae,{size:14})})]})})},fa={sm:"h-8 w-8 text-xs",md:"h-11 w-11 text-sm",lg:"h-14 w-14 text-base"},ha={online:"bg-emerald-500 ring-emerald-500/20",offline:"bg-zinc-400 ring-zinc-400/20",busy:"bg-destructive ring-destructive/20",syncing:"bg-primary ring-primary/20 animate-pulse"},Mh=({src:e,alt:t="User Profile",name:n="",size:s="md",status:r,className:o})=>{const i=n?n.split(" ").map(a=>a[0]).slice(0,2).join("").toUpperCase():"";return l.jsxs("div",{className:"relative inline-block shrink-0",children:[l.jsx("div",{className:D("relative rounded-full overflow-hidden flex items-center justify-center border border-border/80 shadow-md bg-secondary/50 font-bold text-foreground font-sans",fa[s]||fa.md,o),children:e?l.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):l.jsx("span",{children:i||"?"})}),r&&ha[r]&&l.jsx("span",{className:D("absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-background",ha[r])})]})},xt=({children:e,className:t})=>l.jsx("div",{className:D("bg-card border border-border rounded-3xl p-6 transition-all duration-300",t),children:e}),Ue=({label:e,error:t,icon:n,className:s,id:r,...o})=>l.jsxs("div",{className:D("space-y-1.5 w-full text-left",s),children:[e&&l.jsx("label",{htmlFor:r,className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsxs("div",{className:"relative group",children:[n&&l.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors",children:l.jsx(n,{size:18})}),l.jsx("input",{id:r,className:D("glass-input w-full",n&&"pl-11",t&&"ring-2 ring-destructive/50 border-destructive/50"),...o})]}),t&&l.jsx(z.p,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-xs text-destructive ml-1 font-medium",children:t})]}),ye=({children:e,className:t,variant:n="primary",loading:s=!1,...r})=>{const o={primary:"btn-primary",secondary:"btn-secondary",outline:"btn-outline",ghost:"btn-ghost",glass:"btn-glass",destructive:"btn-destructive"};return l.jsxs(z.button,{whileHover:{y:-2},whileTap:{scale:.98},className:D("relative overflow-hidden",o[n],s&&"opacity-70 cursor-not-allowed",t),disabled:s||r.disabled,...r,children:[s&&l.jsxs("svg",{className:"animate-spin h-5 w-5 text-current shrink-0",viewBox:"0 0 24 24",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e,l.jsx("div",{className:"absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-white/10 to-transparent -translate-x-full hover:animate-[shine_1.5s_infinite]"})]})},Cs=({checked:e=!1,onChange:t,label:n,className:s})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",s),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"checkbox",checked:e,onChange:r=>t&&t(r.target.checked),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-lg border flex items-center justify-center transition-colors duration-200",e?"bg-primary border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},children:l.jsx(Oa,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Vh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=Ba,title:o="Ether UI Console",className:i})=>{const[a,c]=x.useState(e),[u,d]=x.useState(""),[f,h]=x.useState(""),[m,g]=x.useState(""),[p,y]=x.useState(!1),[T,w]=x.useState(!1),[b,j]=x.useState(!1),S=async E=>{E.preventDefault(),j(!0);try{a==="login"&&t?await t({email:f,password:m,rememberMe:p}):a==="register"&&n?await n({name:u,email:f,password:m,acceptTerms:T}):a==="forgot"&&s&&await s({email:f})}finally{j(!1)}};return l.jsxs("div",{className:D("min-h-screen w-full flex items-center justify-center p-6 relative bg-background overflow-hidden",i),children:[l.jsx("div",{className:"absolute top-1/4 left-1/4 w-[400px] h-[400px] bg-primary/5 rounded-full blur-[120px] pointer-events-none animate-pulse"}),l.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px] pointer-events-none animate-pulse duration-4000"}),l.jsx("div",{className:"w-full max-w-md z-10",children:l.jsxs(de,{mode:"wait",children:[a==="login"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28,className:"animate-pulse"})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:o}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Welcome back! Sign in to manage your ledgers."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Email Address",type:"email",placeholder:"name@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsxs("div",{className:"flex items-center justify-between text-xs pt-1",children:[l.jsx(Cs,{label:"Remember me",checked:p,onChange:y}),l.jsx("button",{type:"button",onClick:()=>c("forgot"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Sign In to Console"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Don't have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("register"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Create one now"})]})]})},"login"),a==="register"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx("div",{className:"inline-flex items-center justify-center p-3 rounded-2xl bg-primary/10 text-primary mb-2",children:l.jsx(r,{size:28})}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground",children:"Create Account"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Sign up to unlock real-time financial synchrony."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Full Name",type:"text",placeholder:"Alex Carter",value:u,onChange:E=>d(E.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:E=>g(E.target.value),required:!0}),l.jsx("div",{className:"flex items-start pt-1",children:l.jsx(Cs,{label:"I agree to the Terms & Conditions",checked:T,onChange:w})}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 mt-2",children:"Register Workspace"})]}),l.jsxs("div",{className:"text-center text-xs text-muted-foreground border-t border-border/40 pt-4",children:["Already have an account?"," ",l.jsx("button",{type:"button",onClick:()=>c("login"),className:"font-bold text-primary hover:underline cursor-pointer",children:"Sign in instead"})]})]})},"register"),a==="forgot"&&l.jsx(z.div,{initial:{opacity:0,y:15},animate:{opacity:1,y:0},exit:{opacity:0,y:-15},transition:{duration:.25},children:l.jsxs(xt,{className:"p-8 space-y-6",children:[l.jsxs("div",{className:"space-y-2 text-left",children:[l.jsxs("button",{type:"button",onClick:()=>c("login"),className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground font-bold cursor-pointer transition-colors",children:[l.jsx(Ra,{size:12})," Back to Sign In"]}),l.jsx("h3",{className:"text-2xl font-extrabold tracking-tight text-foreground pt-2",children:"Recover Access"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your verified work email, and we will send a password restoration link."})]}),l.jsxs("form",{onSubmit:S,className:"space-y-4",children:[l.jsx(Ue,{label:"Registered Email Address",type:"email",placeholder:"alex@company.com",value:f,onChange:E=>h(E.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:b,className:"w-full justify-center py-3 pt-2",children:"Send Recovery Link"})]})]})},"forgot")]})})]})},ma=({children:e,variant:t="default",className:n})=>{const s={default:"bg-secondary text-secondary-foreground border-border",primary:"bg-primary text-primary-foreground border-primary",success:"bg-emerald-50 text-emerald-700 border-emerald-100 dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/20",warning:"bg-amber-50 text-amber-700 border-amber-100 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20",danger:"bg-destructive text-destructive-foreground border-destructive"};return l.jsx("span",{className:D("px-2 py-0.5 rounded-md text-[10px] font-bold uppercase tracking-wider border inline-flex items-center justify-center",s[t],n),children:e})},pa=({isOpen:e,onClose:t,title:n,children:s,className:r,width:o})=>l.jsx(de,{children:e&&l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"absolute inset-0 bg-black/20 backdrop-blur-sm"}),l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},className:D("relative w-full max-w-lg glass-card overflow-hidden p-0 flex flex-col max-h-[90vh] text-left",o,r),children:[l.jsxs("div",{className:"flex items-center justify-between px-7 py-5 border-b border-border shrink-0",children:[l.jsx("h3",{className:"text-xl font-bold text-foreground",children:n}),l.jsx("button",{onClick:t,className:"p-2 rounded-xl hover:bg-secondary text-muted-foreground hover:text-foreground transition-all cursor-pointer",children:l.jsx(Ae,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),Dh=({isOpen:e,onClose:t,onConfirm:n,title:s="Are you sure?",message:r="This action cannot be undone.",confirmText:o="Confirm",cancelText:i="Cancel",confirmVariant:a="destructive",loading:c=!1})=>l.jsx(pa,{isOpen:e,onClose:t,title:s,className:"max-w-md",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r}),l.jsxs("div",{className:"flex items-center justify-end gap-3",children:[l.jsx(ye,{variant:"ghost",onClick:t,disabled:c,children:i}),l.jsx(ye,{variant:a,onClick:n,loading:c,children:o})]})]})}),Lh=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=x.useState(!1),c=x.useRef(null),u=t.find(d=>d.value===n);return x.useEffect(()=>{const d=f=>{c.current&&!c.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[]),l.jsxs("div",{ref:c,className:D("space-y-1.5 w-full text-left relative",o),children:[e&&l.jsx("label",{className:"text-sm font-semibold text-foreground ml-1",children:e}),l.jsx("div",{children:l.jsxs("button",{type:"button",onClick:()=>a(!i),className:"glass-input w-full flex items-center justify-between cursor-pointer focus:ring-2 focus:ring-ring/10 text-left",children:[l.jsx("span",{className:D(!u&&"text-muted-foreground/60"),children:u?u.label:r}),l.jsx(Ls,{size:18,className:D("text-muted-foreground transition-transform duration-200",i&&"rotate-180")})]})}),l.jsx(de,{children:i&&l.jsx(z.div,{initial:{opacity:0,y:5,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.98},transition:{duration:.15},className:"absolute z-50 w-full mt-2 glass-panel rounded-2xl overflow-hidden shadow-2xl p-1 max-h-60 overflow-y-auto custom-scrollbar",children:t.map((d,f)=>{const h=d.value===n;return l.jsx("button",{type:"button",onClick:()=>{s&&s(d.value),a(!1)},className:D("w-full text-left px-4 py-2.5 rounded-xl text-sm transition-colors cursor-pointer",h?"bg-primary text-primary-foreground font-semibold":"hover:bg-secondary text-foreground"),children:d.label},d.value||f)})})})]})},Rh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=x.useState(!1),[a,c]=x.useState([]),u=x.useRef(null),d=p=>{p.preventDefault(),p.stopPropagation(),p.type==="dragenter"||p.type==="dragover"?i(!0):p.type==="dragleave"&&i(!1)},f=p=>{const y=Array.from(p).map(w=>{const j=w.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:w.name,size:(w.size/1024).toFixed(1)+" KB",rawFile:w,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),T=[...a,...y].slice(0,n);c(T),e&&e(T.map(w=>w.rawFile)),y.forEach(w=>{if(w.status==="failed")return;let b=0;const j=setInterval(()=>{b+=Math.floor(Math.random()*15)+5,b>=100?(b=100,clearInterval(j),c(S=>S.map(E=>E.id===w.id?{...E,progress:100,status:"success"}:E))):c(S=>S.map(E=>E.id===w.id?{...E,progress:b}:E))},150)})},h=p=>{p.preventDefault(),p.stopPropagation(),i(!1),p.dataTransfer.files&&p.dataTransfer.files[0]&&f(p.dataTransfer.files)},m=p=>{p.target.files&&p.target.files[0]&&f(p.target.files)},g=p=>{c(a.filter(y=>y.id!==p))};return l.jsxs("div",{className:D("space-y-4 w-full text-left",r),children:[l.jsxs("div",{onDragEnter:d,onDragOver:d,onDragLeave:d,onDrop:h,onClick:()=>u.current&&u.current.click(),className:D("relative border-2 border-dashed rounded-2xl p-8 flex flex-col items-center justify-center gap-3 cursor-pointer select-none transition-all duration-300 min-h-[160px]",o?"border-primary bg-primary/5 scale-[0.99] shadow-md shadow-primary/5":"bg-white/40 border-border dark:bg-black/20 hover:border-primary/50 hover:bg-secondary/20"),children:[l.jsx("input",{ref:u,type:"file",multiple:!0,accept:t,onChange:m,className:"hidden"}),l.jsx(z.div,{animate:o?{scale:1.1,y:-2}:{scale:1,y:0},className:D("p-3 rounded-2xl transition-colors",o?"bg-primary text-primary-foreground":"bg-primary/10 text-primary"),children:l.jsx(Fa,{size:24})}),l.jsxs("div",{className:"text-center space-y-1",children:[l.jsx("p",{className:"text-sm font-bold text-foreground",children:o?"Drop files to stage them!":"Drag & Drop files here"}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Or click to browse storage (Max ",n," files, limit ",s,"MB)"]})]})]}),l.jsx(de,{children:a.length>0&&l.jsxs(z.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},className:"space-y-2 border border-border/40 bg-card/60 rounded-2xl p-4",children:[l.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/20",children:[l.jsxs("span",{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground",children:["Upload Queue (",a.length,")"]}),l.jsx("button",{onClick:()=>c([]),className:"text-[10px] font-bold text-destructive hover:underline",children:"Clear All"})]}),l.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto custom-scrollbar pr-1",children:a.map(p=>l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10},className:"flex items-center justify-between gap-4 p-2.5 rounded-xl bg-secondary/30 border border-border/10 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx("div",{className:"p-2 rounded-lg bg-card border border-border/20 text-muted-foreground shrink-0",children:l.jsx(_a,{size:16})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("p",{className:"font-semibold text-foreground truncate",children:p.name}),l.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:p.size})]}),p.status==="uploading"&&l.jsx("div",{className:"w-full bg-secondary/50 rounded-full h-1 overflow-hidden",children:l.jsx(z.div,{className:"bg-primary h-full rounded-full",animate:{width:`${p.progress}%`},transition:{duration:.1}})}),p.status==="failed"&&l.jsx("p",{className:"text-[10px] font-bold text-destructive truncate",children:p.error}),p.status==="success"&&l.jsxs("p",{className:"text-[10px] font-bold text-primary flex items-center gap-1",children:[l.jsx(wt,{size:10})," Upload complete!"]})]})]}),l.jsx("button",{onClick:()=>g(p.id),className:"p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:14})})]},p.id))})]})})]})},Ih=({isOpen:e=!1,onClose:t,notifications:n=[],onClearAll:s,onDismiss:r,className:o})=>l.jsx(de,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-sm cursor-pointer"}),l.jsxs(z.aside,{initial:{x:"110%",opacity:0},animate:{x:0,opacity:1},exit:{x:"110%",opacity:0},transition:{type:"spring",stiffness:380,damping:32},className:D("fixed top-4 right-4 z-50 h-[calc(100vh-2rem)] w-[calc(100%-2rem)] max-w-sm bg-card/95 backdrop-blur-xl border border-border/50 shadow-2xl rounded-3xl flex flex-col text-left overflow-hidden",o),children:[l.jsxs("div",{className:"p-4 border-b border-border/40 flex items-center justify-between min-h-[72px] shrink-0 bg-card/65 backdrop-blur-md",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-2 rounded-xl bg-primary/10 text-primary",children:l.jsx(Ds,{size:18,className:"animate-bounce"})}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-sm font-extrabold text-foreground",children:"Notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Alert console logs"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.length>0&&l.jsx("button",{onClick:s,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-destructive cursor-pointer transition-colors",title:"Clear All",children:l.jsx(Wa,{size:16})}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-secondary rounded-xl text-muted-foreground hover:text-foreground cursor-pointer transition-colors",children:l.jsx(Ae,{size:16})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-4 space-y-3",children:l.jsx(de,{initial:!1,children:n.length===0?l.jsxs(z.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center text-center gap-3 py-12",children:[l.jsx("div",{className:"p-4 rounded-full bg-secondary/40 text-muted-foreground",children:l.jsx(Ds,{size:32,className:"opacity-50"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-bold text-foreground",children:"Zero unread notifications"}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"All operational tasks succeeded!"})]})]}):n.map(i=>{const a=i.type==="success",c=i.type==="warning";return l.jsxs(z.div,{layout:!0,initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-3.5 rounded-2xl bg-secondary/20 border border-border/10 flex items-start gap-3 relative overflow-hidden group hover:border-border/30 transition-all text-xs",children:[i.unread&&l.jsxs("span",{className:"absolute top-3.5 right-3.5 flex h-2 w-2",children:[l.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),l.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-primary"})]}),l.jsxs("div",{className:D("p-2 rounded-xl shrink-0 border border-border/10",a&&"bg-emerald-500/10 text-emerald-500",c&&"bg-amber-500/10 text-amber-500",!a&&!c&&"bg-sky-500/10 text-sky-500"),children:[a&&l.jsx(wt,{size:16}),c&&l.jsx(rn,{size:16}),!a&&!c&&l.jsx(kt,{size:16})]}),l.jsxs("div",{className:"flex-1 space-y-1.5 pr-4 text-left",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("p",{className:"font-bold text-foreground",children:i.title}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-medium",children:i.timestamp})]}),l.jsx("p",{className:"text-muted-foreground text-[11px] leading-relaxed",children:i.description})]}),l.jsx("button",{onClick:()=>r&&r(i.id),className:"absolute bottom-3 right-3 p-1 hover:bg-secondary rounded-lg text-muted-foreground hover:text-foreground cursor-pointer transition-colors opacity-0 group-hover:opacity-100",title:"Dismiss notification",children:l.jsx(Ae,{size:12})})]},i.id)})})})]})]})}),Oh=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>t<=1?null:l.jsxs("div",{className:"flex items-center justify-between py-2 mt-6 w-full",children:[l.jsxs("div",{className:"flex-1 flex justify-between sm:hidden",children:[l.jsx(ye,{variant:"outline",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(ye,{variant:"outline",onClick:()=>n(e+1),disabled:e===t||s,children:"Next"})]}),l.jsxs("div",{className:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between",children:[l.jsx("div",{children:l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Page ",l.jsx("span",{className:"font-bold text-foreground",children:e})," of"," ",l.jsx("span",{className:"font-bold text-foreground",children:t})]})}),l.jsx("div",{children:l.jsxs("nav",{className:"relative z-0 inline-flex gap-1.5 rounded-md shadow-sm","aria-label":"Pagination",children:[l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(Rs,{size:16})]}),[...Array(t)].map((r,o)=>{const i=o+1,a=e===i;return l.jsx(ye,{variant:a?"primary":"outline",className:"w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs",onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(sn,{size:16})]})]})})]})]}),zh=({children:e,content:t})=>{const[n,s]=x.useState(!1),[r,o]=x.useState({x:0,y:0}),i=x.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};x.useEffect(()=>(n&&(a(),window.addEventListener("scroll",a),window.addEventListener("resize",a)),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[n]);const c=()=>{t&&s(!0)},u=()=>{s(!1)};return l.jsxs("div",{ref:i,onMouseEnter:c,onMouseLeave:u,className:"inline-block w-full",children:[e,n&&t&&typeof window<"u"&&ja.createPortal(l.jsx(de,{children:l.jsxs(z.div,{initial:{opacity:0,scale:.95,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:4},style:{position:"absolute",left:r.x,top:r.y,transform:"translateX(-50%) translateY(-100%)",zIndex:99999,pointerEvents:"none"},className:"bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-lg shadow-xl whitespace-nowrap",children:[t,l.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-zinc-900 dark:border-t-zinc-100"})]})}),document.body)]})},Fh=({value:e=0,size:t=80,strokeWidth:n=6,showPercent:s=!0,className:r})=>{const o=(t-n)/2,i=o*2*Math.PI,a=Math.min(Math.max(e,0),100),c=i-a/100*i;return l.jsxs("div",{className:D("relative inline-flex items-center justify-center",r),style:{width:t,height:t},children:[l.jsxs("svg",{className:"transform -rotate-90",width:t,height:t,children:[l.jsx("circle",{className:"text-secondary/50",stroke:"currentColor",strokeWidth:n,fill:"transparent",r:o,cx:t/2,cy:t/2}),l.jsx("circle",{className:"text-primary transition-all duration-500 ease-out",stroke:"currentColor",strokeWidth:n,strokeDasharray:i,strokeDashoffset:c,strokeLinecap:"round",fill:"transparent",r:o,cx:t/2,cy:t/2})]}),s&&l.jsxs("span",{className:"absolute text-[10px] font-mono font-bold text-foreground",children:[Math.round(a),"%"]})]})},_h=({checked:e=!1,onChange:t,label:n,name:s,value:r,className:o})=>l.jsxs("label",{className:D("inline-flex items-center gap-3 cursor-pointer select-none text-left",o),children:[l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{type:"radio",name:s,value:r,checked:e,onChange:()=>t&&t(r),className:"sr-only"}),l.jsx(z.div,{className:D("w-5 h-5 rounded-full border flex items-center justify-center transition-colors duration-200",e?"border-primary":"bg-white/40 border-input dark:bg-black/20"),children:l.jsx(de,{children:e&&l.jsx(z.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:30},className:"w-2.5 h-2.5 rounded-full bg-primary"})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Bh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i})=>l.jsxs("aside",{className:D("h-screen bg-card/45 backdrop-blur-xl border-r border-border/40 flex flex-col transition-all duration-300 ease-in-out shrink-0 text-left relative z-30",e?"w-0 -translate-x-full md:w-20 md:translate-x-0 overflow-hidden border-r-0 md:border-r border-border/20":"w-64 translate-x-0 border-r border-border/40",i),children:[l.jsxs("div",{className:D("flex border-b border-border/20 shrink-0 transition-all duration-300",e?"flex-col items-center justify-center gap-2.5 py-4 px-1 min-h-[88px]":"flex-row items-center justify-between p-4 min-h-[72px]"),children:[l.jsxs("div",{className:D("flex items-center gap-3 overflow-hidden",e&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!e&&l.jsx("span",{className:"font-extrabold text-base text-foreground tracking-tight whitespace-nowrap animate-[fadeIn_0.2s_ease-out]",children:s})]}),l.jsx("button",{type:"button",onClick:()=>t&&t(!e),className:"hidden md:flex p-1.5 hover:bg-secondary/60 rounded-xl border border-border/20 text-muted-foreground hover:text-foreground cursor-pointer shrink-0 transition-colors",children:e?l.jsx(sn,{size:14}):l.jsx(Rs,{size:14})})]}),l.jsx("div",{className:"flex-1 py-4 px-3 space-y-1.5 overflow-y-auto custom-scrollbar",children:r}),o&&l.jsx("div",{className:"p-3 border-t border-border/20 min-h-[72px] flex items-center overflow-hidden shrink-0",children:o})]}),$h=({icon:e,label:t,active:n=!1,onClick:s,collapsed:r=!1,badge:o})=>l.jsxs("button",{type:"button",onClick:s,className:D("relative w-full flex items-center rounded-xl font-bold text-sm transition-all duration-250 cursor-pointer text-left select-none shrink-0 border border-transparent",r?"justify-center p-3":"px-4 py-3 gap-3",n?"bg-primary/8 text-primary border-primary/15 shadow-[0_0_20px_rgba(var(--primary),0.02)]":"text-muted-foreground hover:text-foreground hover:bg-secondary/35"),children:[e&&l.jsx(e,{size:18,className:"shrink-0"}),!r&&l.jsx("span",{className:"truncate flex-1 font-semibold text-sm whitespace-nowrap overflow-hidden animate-[fadeIn_0.2s_ease-out]",children:t}),!r&&o&&!n&&l.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full font-bold border shrink-0 bg-primary/10 text-primary border-primary/20",children:o}),!r&&n&&l.jsx(z.div,{layoutId:"active-sidebar-indicator",className:"w-1.5 h-1.5 rounded-full bg-primary shrink-0 ml-auto",transition:{type:"spring",stiffness:380,damping:30}})]}),Wh=({min:e=0,max:t=100,step:n=1,value:s=50,onChange:r,label:o,className:i})=>{const a=(s-e)/(t-e)*100;return l.jsxs("div",{className:D("space-y-2 w-full text-left",i),children:[(o||s!==void 0)&&l.jsxs("div",{className:"flex justify-between items-center px-1",children:[o&&l.jsx("label",{className:"text-sm font-semibold text-foreground",children:o}),l.jsx("span",{className:"text-xs font-mono font-bold text-primary",children:s})]}),l.jsxs("div",{className:"relative flex items-center group",children:[l.jsx("input",{type:"range",min:e,max:t,step:n,value:s,onChange:c=>r&&r(Number(c.target.value)),className:"w-full h-1.5 bg-secondary/50 dark:bg-zinc-800 rounded-full appearance-none outline-none cursor-pointer",style:{background:`linear-gradient(to right, var(--primary) 0%, var(--primary) ${a}%, var(--secondary) ${a}%, var(--secondary) 100%)`}}),l.jsx("style",{children:`
|
|
151
151
|
input[type="range"]::-webkit-slider-thumb {
|
|
152
152
|
-webkit-appearance: none;
|
|
153
153
|
appearance: none;
|