renderloom 1.0.6 → 1.0.7

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.
@@ -167,7 +167,7 @@ React keys must be passed directly to JSX without using spread:
167
167
  ${x}px !important;
168
168
  ${j}px !important;
169
169
  }
170
- `),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),M.contains(S)&&M.removeChild(S)}},[t]),l.jsx(Dd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Rd=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Id),f=b.useId();let h=!0,m=b.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}),b.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),bt.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=l.jsx(Ld,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Id(){return new Map}function go(e=!0){const t=b.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=b.useId();b.useEffect(()=>{if(e)return r(o)},[e]);const i=b.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 b.Children.forEach(e,n=>{b.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=b.useMemo(()=>yo(e),[e]),m=i&&!d?[]:h.map(Gt),g=b.useRef(!0),p=b.useRef(h),y=an(()=>new Map),k=b.useRef(new Set),[v,x]=b.useState(h),[j,S]=b.useState(h);zs(()=>{g.current=!1,p.current=h;for(let T=0;T<j.length;T++){const E=Gt(j[T]);m.includes(E)?(y.delete(E),k.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,m.length,m.join("-")]);const M=[];if(h!==v){let T=[...h];for(let E=0;E<j.length;E++){const V=j[E],_=Gt(V);m.includes(_)||(T.splice(E,0,V),M.push(V))}return o==="wait"&&M.length&&(T=M),S(yo(T)),x(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}=b.useContext(on);return l.jsx(l.Fragment,{children:j.map(T=>{const E=Gt(T),V=i&&!d?!1:h===j||m.includes(E),_=()=>{if(k.current.has(E))return;if(y.has(E))k.current.add(E),y.set(E,!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(Rd,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:_,anchorX:a,anchorY:c,children:T},E)})})},xo=b.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 Od(){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 Od(),wu()}function zd(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const _d=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")||_d.has(e)}let ko=e=>!Kt(e);function Fd(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Fd(require("@emotion/is-prop-valid").default)}catch{}function Bd(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=b.createContext({});function $d(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 Wd(e){const{initial:t,animate:n}=$d(e,b.useContext(Yt));return b.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])&&!Ni(s,n)&&(e[s]=t[s])}function Ud({transformTemplate:e},t){return b.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Gd(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Ud(e,t)),s}function Kd(e,t){const n={},s=Gd(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 Yd(e,t,n,s){const r=b.useMemo(()=>{const o=So();return Pi(o,t,Mi(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 Hd=["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:!!(Hd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Xd(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?Yd:Kd)(t,s,r,e),u=Bd(t,typeof e=="string",o),d=e!==b.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ie(f)?f.get():f,[f]);return b.createElement(e,{...d,children:h})}function qd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Zd(n,s,r,e),renderState:t()}}function Zd(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,...k}=g;for(const v in k){let x=k[v];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(r[v]=x)}for(const v in p)r[v]=p[v]}}}return r}const Co=e=>(t,n)=>{const s=b.useContext(Yt),r=b.useContext(Tt),o=()=>qd(e,t,s,r);return n?o():an(o)},Jd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Qd=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),ef=Symbol.for("motionComponentSymbol");function tf(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const r=b.useRef(null);return b.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 No=b.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nf(e,t,n,s,r,o){var x,j;const{visualElement:i}=b.useContext(Yt),a=b.useContext(xo),c=b.useContext(Tt),u=b.useContext(fs),d=u.reducedMotion,f=u.skipAnimations,h=b.useRef(null),m=b.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=b.useContext(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&sf(h.current,n,r,p);const y=b.useRef(!1);b.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const k=n[Wr],v=b.useRef(!!k&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,k))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,k)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,k)}),v.current=!1),g.enteringChildren=void 0)}),g}function sf(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&&zd(s);const o=n?n==="svg":ms(e),i=o?Qd:Jd;function a(u,d){let f;const h={...b.useContext(fs),...u,layoutId:rf(u)},{isStatic:m}=h,g=Wd(u),p=i(u,m);if(!m&&typeof window<"u"){of(h,s);const y=af(h);f=y.MeasureLayout,g.visualElement=nf(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,Xd(e,u,tf(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(a);return c[ef]=e,c}function rf({layoutId:e}){const t=b.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function of(e,t){const n=b.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 af(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 lf(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 cf=(e,t)=>t.isSVG??ms(e)?new zu(t):new Vu(t,{allowProjection:e!==b.Fragment});class uf extends De{constructor(t){super(t),t.animationState||(t.animationState=Wu(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 df=0;class ff extends De{constructor(){super(...arguments),this.id=df++,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=_e(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 hf={animation:{Feature:uf},exit:{Feature:ff}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const mf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,mf(n),s)}const Ao=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function pf(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=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=pf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:k}=re;this.history.push({...y,timestamp:k});const{onStart:v,onMove:x}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,v),y&&y(m,v)},!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);(Eo.has(s.overflowX)||Eo.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),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ae(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,gf(t)),velocity:yf(t,.1)}}function gf(e){return e[0]}function Lo(e){return e[e.length-1]}function yf(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 xf(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 bf(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 vf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function wf(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 kf(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 Tf(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 jf=new WeakMap;class Sf{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=Zc(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(k=>{let v=this.getAxisMotionValue(k).get()||0;if(ve.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[k];j&&(v=le(j)*(parseFloat(v)/100))}}this.originPoint[k]=v}),p&&F.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:k}=h;if(g&&this.currentDirection===null){this.currentDirection=Nf(k),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),y&&F.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:Ao(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&&F.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=xf(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=bf(s.layoutBox,t):this.constraints=!1,this.elastic=Tf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=kf(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=Cu(s,r.root,this.visualElement.getTransformPagePoint());let i=vf(r.layout.layoutBox,o);if(n){const a=n(Tu(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(Fn(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]=wf({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;jf.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&&su(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=Cf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.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 _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Cf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Nf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Sf(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&&F.update(()=>e(t,n),!1,!0)};class Af extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ao(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&&F.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 Mf extends b.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()||F.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 Fo(e){const[t,n]=go(),s=b.useContext(on);return l.jsx(Mf,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(No),isPresent:t,safeToRemove:n})}const Ef={pan:{Feature:Af},drag:{Feature:Pf,ProjectionNode:mo,MeasureLayout:Fo}};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&&F.postRender(()=>o(t,pt(t)))}class Vf extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Qc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Df 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&&F.postRender(()=>o(t,pt(t)))}class Lf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=iu(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,Rf=e=>{const t=vs.get(e.target);t&&t(e)},If=e=>{e.forEach(Rf)};function Of({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(If,{root:e,...t})),s[r]}function zf(e,t,n){const s=Of(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const _f={some:0,all:1};class Ff 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:_f[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=zf(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(Bf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Bf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $f={...hf,...{inView:{Feature:Ff},tap:{Feature:Lf},focus:{Feature:Df},hover:{Feature:Vf}},...Ef,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},z=lf($f,cf);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 Wf(){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 Uf=(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},Gf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Kf="arbitrary..",Yf=e=>{const t=Xf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Hf(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?Uf(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}},Hf=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?Kf+s:void 0})(),Xf=e=>{const{theme:t,classGroups:n}=e;return qf(n,t)},qf=(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];Zf(i,t,n,s)}},Zf=(e,t,n,s)=>{if(typeof e=="string"){Jf(e,t,n);return}if(typeof e=="function"){Qf(e,t,n,s);return}eh(e,t,n,s)},Jf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Qf=(e,t,n,s)=>{if(th(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Gf(n,e))},eh=(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},th=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nh=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=":",sh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),rh=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(sh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},ih=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}},oh=e=>({cache:nh(e.cacheSize),parseClassName:rh(e),sortModifiers:ih(e),postfixLookupClassGroupIds:ah(e),...Yf(e)}),ah=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},lh=/\s+/,ch=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(lh);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 k=!!y,v;if(k){const O=p.substring(0,y);v=s(O);const T=v&&i[v]?s(p):void 0;T&&T!==v&&(v=T,k=!1)}else v=s(p);if(!v){if(!k){u=f+(u.length>0?" "+u:u);continue}if(v=s(p),!v){u=f+(u.length>0?" "+u:u);continue}k=!1}const x=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?x+Ts:x,S=j+v;if(a.indexOf(S)>-1)continue;a.push(S);const M=r(v,k);for(let O=0;O<M.length;++O){const T=M[O];a.push(j+T)}u=f+(u.length>0?" "+u:u)}return u},uh=(...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},dh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=oh(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=ch(c,n);return r(c,d),d};return o=i,(...c)=>o(uh(...c))},fh=[],te=e=>{const t=n=>n[e]||fh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ph=/\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$/,gh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>hh.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=>mh.test(e),Qo=()=>!0,bh=e=>ph.test(e)&&!gh.test(e),Ss=()=>!1,vh=e=>yh.test(e),wh=e=>xh.test(e),kh=e=>!C(e)&&!N(e),Th=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)),jh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,bh),ea=e=>Re(e,Vh,I),Sh=e=>Re(e,la,Qo),Ch=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),Nh=e=>Re(e,ra,wh),Zt=e=>Re(e,ca,vh),N=e=>Jo.test(e),yt=e=>We(e,oa),Ph=e=>We(e,aa),na=e=>We(e,sa),Ah=e=>We(e,ia),Mh=e=>We(e,ra),Jt=e=>We(e,ca,!0),Eh=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",Vh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Dh=dh(()=>{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"),k=te("ease"),v=te("animate"),x=()=>["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(),N,C],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],T=()=>[N,C,c],E=()=>[Le,"full","auto",...T()],V=()=>[Te,"none","subgrid",N,C],_=()=>["auto",{span:["full",Te,N,C]},Te,N,C],B=()=>[Te,"auto",N,C],ce=()=>["auto","min","max","fr",N,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",...T()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],K=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...T()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],A=()=>[e,N,C],w=()=>[...j(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Ah,jh,{size:[N,C]}],X=()=>[js,yt,$e],Q=()=>["","none","full",u,N,C],se=()=>["",I,yt,$e],Y=()=>["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"],q=()=>[I,js,na,ta],Qt=()=>["","none",g,N,C],en=()=>["none",I,N,C],tn=()=>["none",I,N,C],Ns=()=>[I,N,C],nn=()=>[Le,"full",...T()];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:[kh],"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,N,y]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[Th],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...T()]}],"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,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[Te,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:_()}],"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:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"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:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],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":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"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,Eh,Sh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Ph,Ch,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,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[I,"auto",N,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[Te,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,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",N,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:w()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,N,C],radial:["",N,C],conic:[Te,N,C]},Mh,Nh]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[I,N,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":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[N,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",k,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",v,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,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:Ns()}],"skew-x":[{"skew-x":Ns()}],"skew-y":[{"skew-y":Ns()}],transform:[{transform:[N,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,N,C]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",N,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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",N,C]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...A()]}],"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 Dh(Wf(e))}const Lh=({title:e,children:t,className:n})=>{const[s,r]=b.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)"}},Rh=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=b.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(Ne,{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"},Ih=({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(za,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Oh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=$a,title:o="Ether UI Console",className:i})=>{const[a,c]=b.useState(e),[u,d]=b.useState(""),[f,h]=b.useState(""),[m,g]=b.useState(""),[p,y]=b.useState(!1),[k,v]=b.useState(!1),[x,j]=b.useState(!1),S=async M=>{M.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:k}):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:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:x,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:M=>d(M.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:k,onChange:v})}),l.jsx(ye,{type:"submit",variant:"primary",loading:x,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(Ia,{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:M=>h(M.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:x,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(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),zh=({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})]})]})}),_h=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=b.useState(!1),c=b.useRef(null),u=t.find(d=>d.value===n);return b.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)})})})]})},Fh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=b.useState(!1),[a,c]=b.useState([]),u=b.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(v=>{const j=v.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:v.name,size:(v.size/1024).toFixed(1)+" KB",rawFile:v,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),k=[...a,...y].slice(0,n);c(k),e&&e(k.map(v=>v.rawFile)),y.forEach(v=>{if(v.status==="failed")return;let x=0;const j=setInterval(()=>{x+=Math.floor(Math.random()*15)+5,x>=100?(x=100,clearInterval(j),c(S=>S.map(M=>M.id===v.id?{...M,progress:100,status:"success"}:M))):c(S=>S.map(M=>M.id===v.id?{...M,progress:x}:M))},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(Ba,{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(Ne,{size:14})})]},p.id))})]})})]})},Bh=({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(Ha,{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(Ne,{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(Ne,{size:12})})]},i.id)})})})]})]})}),$h=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(c,u)=>u+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return 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})]}),o.map((i,a)=>{if(i==="...")return l.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:l.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const c=e===i;return l.jsx(ye,{variant:c?"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})]})]})})]})]})},Wh=({children:e,content:t})=>{const[n,s]=b.useState(!1),[r,o]=b.useState({x:0,y:0}),i=b.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};b.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"&&Sa.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)]})},Uh=({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),"%"]})]})},Gh=({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})]}),ga=b.createContext(),Kh=({children:e,defaultTheme:t="light"})=>{const[n,s]=b.useState(()=>{if(typeof window>"u")return!1;const i=new URLSearchParams(window.location.search).get("theme");if(i)return i==="dark";const a=localStorage.getItem("theme");return a?a==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});b.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]);const r=()=>s(o=>!o);return l.jsx(ga.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},ya=()=>{const e=b.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Yh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:c})=>{const[u,d]=b.useState(!1),[f,h]=b.useState(!e);b.useEffect(()=>{h(!e)},[e]),b.useEffect(()=>{const x=()=>{const j=window.innerWidth<768;d(j),j||h(!1)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const m=()=>{if(u){const x=!f;h(x),t&&t(!x)}else t&&t(!e)},g=()=>{u&&(h(!1),t&&t(!0))};let p=!1,y=()=>{},k=!1;try{const x=ya();x&&(p=x.isDark,y=x.toggleTheme,k=!0)}catch{}const v=u?!f:e;return l.jsxs(l.Fragment,{children:[u&&a&&l.jsxs("div",{className:"flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),l.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[k&&l.jsx("button",{type:"button",onClick:y,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:p?l.jsx(Ya,{size:16,className:"text-amber-500"}):l.jsx(Ka,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:m,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:l.jsx(Ua,{size:16,className:"text-foreground"})})]})]}),u&&!v&&l.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),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",u?"fixed top-0 bottom-0 left-0 z-50":"z-30",v?"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",v?"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",v&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!v&&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:m,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:v?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",onClickCapture:g,children:r}),o&&l.jsxs("div",{className:D("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",v?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[l.jsx("div",{className:D("flex-1 min-w-0 flex overflow-hidden",v?"flex-col items-center justify-center":"flex-row items-center"),children:o}),c&&l.jsx("button",{type:"button",onClick:c,title:"Logout",className:D("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",v?"mt-2":""),children:l.jsx(Wa,{size:16})})]})]})]})},Hh=({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}})]}),Xh=({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:`
170
+ `),()=>{var O;(O=a.current)==null||O.removeAttribute("data-motion-pop-id"),M.contains(S)&&M.removeChild(S)}},[t]),l.jsx(Dd,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:bt.cloneElement(e,{ref:f})})}const Rd=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:c,root:u})=>{const d=an(Id),f=b.useId();let h=!0,m=b.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}),b.useMemo(()=>{d.forEach((g,p)=>d.set(p,!1))},[n]),bt.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=l.jsx(Ld,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(Tt.Provider,{value:m,children:e})};function Id(){return new Map}function go(e=!0){const t=b.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=b.useId();b.useEffect(()=>{if(e)return r(o)},[e]);const i=b.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 b.Children.forEach(e,n=>{b.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=b.useMemo(()=>yo(e),[e]),m=i&&!d?[]:h.map(Gt),g=b.useRef(!0),p=b.useRef(h),y=an(()=>new Map),k=b.useRef(new Set),[v,x]=b.useState(h),[j,S]=b.useState(h);zs(()=>{g.current=!1,p.current=h;for(let T=0;T<j.length;T++){const E=Gt(j[T]);m.includes(E)?(y.delete(E),k.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,m.length,m.join("-")]);const M=[];if(h!==v){let T=[...h];for(let E=0;E<j.length;E++){const V=j[E],_=Gt(V);m.includes(_)||(T.splice(E,0,V),M.push(V))}return o==="wait"&&M.length&&(T=M),S(yo(T)),x(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}=b.useContext(on);return l.jsx(l.Fragment,{children:j.map(T=>{const E=Gt(T),V=i&&!d?!1:h===j||m.includes(E),_=()=>{if(k.current.has(E))return;if(y.has(E))k.current.add(E),y.set(E,!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(Rd,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:u,onExitComplete:V?void 0:_,anchorX:a,anchorY:c,children:T},E)})})},xo=b.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 Od(){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 Od(),wu()}function zd(e){const t=wo();for(const n in e)t[n]={...t[n],...e[n]};hi(t)}const _d=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")||_d.has(e)}let ko=e=>!Kt(e);function Fd(e){typeof e=="function"&&(ko=t=>t.startsWith("on")?!Kt(t):e(t))}try{Fd(require("@emotion/is-prop-valid").default)}catch{}function Bd(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=b.createContext({});function $d(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 Wd(e){const{initial:t,animate:n}=$d(e,b.useContext(Yt));return b.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])&&!Ni(s,n)&&(e[s]=t[s])}function Ud({transformTemplate:e},t){return b.useMemo(()=>{const n=hs();return is(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Gd(e,t){const n=e.style||{},s={};return jo(s,n,e),Object.assign(s,Ud(e,t)),s}function Kd(e,t){const n={},s=Gd(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 Yd(e,t,n,s){const r=b.useMemo(()=>{const o=So();return Pi(o,t,Mi(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 Hd=["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:!!(Hd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Xd(e,t,n,{latestValues:s},r,o=!1,i){const c=(i??ms(e)?Yd:Kd)(t,s,r,e),u=Bd(t,typeof e=="string",o),d=e!==b.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ie(f)?f.get():f,[f]);return b.createElement(e,{...d,children:h})}function qd({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Zd(n,s,r,e),renderState:t()}}function Zd(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,...k}=g;for(const v in k){let x=k[v];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(r[v]=x)}for(const v in p)r[v]=p[v]}}}return r}const Co=e=>(t,n)=>{const s=b.useContext(Yt),r=b.useContext(Tt),o=()=>qd(e,t,s,r);return n?o():an(o)},Jd=Co({scrapeMotionValuesFromProps:as,createRenderState:hs}),Qd=Co({scrapeMotionValuesFromProps:Ei,createRenderState:So}),ef=Symbol.for("motionComponentSymbol");function tf(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const r=b.useRef(null);return b.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 No=b.createContext({});function tt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nf(e,t,n,s,r,o){var x,j;const{visualElement:i}=b.useContext(Yt),a=b.useContext(xo),c=b.useContext(Tt),u=b.useContext(fs),d=u.reducedMotion,f=u.skipAnimations,h=b.useRef(null),m=b.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=b.useContext(No);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&sf(h.current,n,r,p);const y=b.useRef(!1);b.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const k=n[Wr],v=b.useRef(!!k&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,k))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,k)));return zs(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,k)}),v.current=!1),g.enteringChildren=void 0)}),g}function sf(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&&zd(s);const o=n?n==="svg":ms(e),i=o?Qd:Jd;function a(u,d){let f;const h={...b.useContext(fs),...u,layoutId:rf(u)},{isStatic:m}=h,g=Wd(u),p=i(u,m);if(!m&&typeof window<"u"){of(h,s);const y=af(h);f=y.MeasureLayout,g.visualElement=nf(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,Xd(e,u,tf(p,g.visualElement,d),p,m,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(a);return c[ef]=e,c}function rf({layoutId:e}){const t=b.useContext(on).id;return t&&e!==void 0?t+"-"+e:e}function of(e,t){const n=b.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 af(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 lf(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 cf=(e,t)=>t.isSVG??ms(e)?new zu(t):new Vu(t,{allowProjection:e!==b.Fragment});class uf extends De{constructor(t){super(t),t.animationState||(t.animationState=Wu(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 df=0;class ff extends De{constructor(){super(...arguments),this.id=df++,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=_e(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 hf={animation:{Feature:uf},exit:{Feature:ff}};function pt(e){return{point:{x:e.pageX,y:e.pageY}}}const mf=e=>t=>qn(t)&&e(t,pt(t));function gt(e,t,n,s){return mt(e,t,mf(n),s)}const Ao=({current:e})=>e?e.ownerDocument.defaultView:null,Mo=(e,t)=>Math.abs(e-t);function pf(e,t){const n=Mo(e.x,t.x),s=Mo(e.y,t.y);return Math.sqrt(n**2+s**2)}const Eo=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=pf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!p)return;const{point:y}=m,{timestamp:k}=re;this.history.push({...y,timestamp:k});const{onStart:v,onMove:x}=this.handlers;g||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Ht(g,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=gs(m.type==="pointercancel"?this.lastMoveEventInfo:Ht(g,this.transformPagePoint),this.history);this.startEvent&&p&&p(m,v),y&&y(m,v)},!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);(Eo.has(s.overflowX)||Eo.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),F.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ae(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,gf(t)),velocity:yf(t,.1)}}function gf(e){return e[0]}function Lo(e){return e[e.length-1]}function yf(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 xf(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 bf(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 vf(e,t){return{x:Io(e.x,t.x),y:Io(e.y,t.y)}}function wf(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 kf(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 Tf(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 jf=new WeakMap;class Sf{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=Zc(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(k=>{let v=this.getAxisMotionValue(k).get()||0;if(ve.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[k];j&&(v=le(j)*(parseFloat(v)/100))}}this.originPoint[k]=v}),p&&F.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:k}=h;if(g&&this.currentDirection===null){this.currentDirection=Nf(k),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,k),this.updateAxis("y",h.point,k),this.visualElement.render(),y&&F.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:Ao(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&&F.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=xf(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=bf(s.layoutBox,t):this.constraints=!1,this.elastic=Tf(n),r!==this.constraints&&!tt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&ke(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=kf(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=Cu(s,r.root,this.visualElement.getTransformPagePoint());let i=vf(r.layout.layoutBox,o);if(n){const a=n(Tu(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(Fn(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]=wf({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;jf.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&&su(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=Cf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.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 _o(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Cf(e,t,n){const s=ai(e,_o(n)),r=ai(t,_o(n));return()=>{s(),r()}}function Xt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Nf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pf extends De{constructor(t){super(t),this.removeGroupControls=fe,this.removeListeners=fe,this.controls=new Sf(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&&F.update(()=>e(t,n),!1,!0)};class Af extends De{constructor(){super(...arguments),this.removePointerDownListener=fe}onPointerDown(t){this.session=new Vo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ao(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&&F.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 Mf extends b.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()||F.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 Fo(e){const[t,n]=go(),s=b.useContext(on);return l.jsx(Mf,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(No),isPresent:t,safeToRemove:n})}const Ef={pan:{Feature:Af},drag:{Feature:Pf,ProjectionNode:mo,MeasureLayout:Fo}};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&&F.postRender(()=>o(t,pt(t)))}class Vf extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Qc(t,(n,s)=>(Bo(this.node,s,"Start"),r=>Bo(this.node,r,"End"))))}unmount(){}}class Df 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&&F.postRender(()=>o(t,pt(t)))}class Lf extends De{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=iu(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,Rf=e=>{const t=vs.get(e.target);t&&t(e)},If=e=>{e.forEach(Rf)};function Of({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(If,{root:e,...t})),s[r]}function zf(e,t,n){const s=Of(t);return vs.set(e,n),s.observe(e),()=>{vs.delete(e),s.unobserve(e)}}const _f={some:0,all:1};class Ff 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:_f[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=zf(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(Bf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Bf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $f={...hf,...{inView:{Feature:Ff},tap:{Feature:Lf},focus:{Feature:Df},hover:{Feature:Vf}},...Ef,...{layout:{ProjectionNode:mo,MeasureLayout:Fo}}},z=lf($f,cf);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 Wf(){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 Uf=(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},Gf=(e,t)=>({classGroupId:e,validator:t}),Uo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qt="-",Go=[],Kf="arbitrary..",Yf=e=>{const t=Xf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Hf(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?Uf(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}},Hf=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?Kf+s:void 0})(),Xf=e=>{const{theme:t,classGroups:n}=e;return qf(n,t)},qf=(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];Zf(i,t,n,s)}},Zf=(e,t,n,s)=>{if(typeof e=="string"){Jf(e,t,n);return}if(typeof e=="function"){Qf(e,t,n,s);return}eh(e,t,n,s)},Jf=(e,t,n)=>{const s=e===""?t:Yo(t,e);s.classGroupId=n},Qf=(e,t,n,s)=>{if(th(e)){ks(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Gf(n,e))},eh=(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},th=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nh=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=":",sh=[],Xo=(e,t,n,s,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:r}),rh=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(sh,!1,i,void 0,!0)}if(n){const r=s;s=o=>n({className:o,parseClassName:r})}return s},ih=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}},oh=e=>({cache:nh(e.cacheSize),parseClassName:rh(e),sortModifiers:ih(e),postfixLookupClassGroupIds:ah(e),...Yf(e)}),ah=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},lh=/\s+/,ch=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o,postfixLookupClassGroupIds:i}=t,a=[],c=e.trim().split(lh);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 k=!!y,v;if(k){const O=p.substring(0,y);v=s(O);const T=v&&i[v]?s(p):void 0;T&&T!==v&&(v=T,k=!1)}else v=s(p);if(!v){if(!k){u=f+(u.length>0?" "+u:u);continue}if(v=s(p),!v){u=f+(u.length>0?" "+u:u);continue}k=!1}const x=m.length===0?"":m.length===1?m[0]:o(m).join(":"),j=g?x+Ts:x,S=j+v;if(a.indexOf(S)>-1)continue;a.push(S);const M=r(v,k);for(let O=0;O<M.length;++O){const T=M[O];a.push(j+T)}u=f+(u.length>0?" "+u:u)}return u},uh=(...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},dh=(e,...t)=>{let n,s,r,o;const i=c=>{const u=t.reduce((d,f)=>f(d),e());return n=oh(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=ch(c,n);return r(c,d),d};return o=i,(...c)=>o(uh(...c))},fh=[],te=e=>{const t=n=>n[e]||fh;return t.isThemeGetter=!0,t},Zo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ph=/\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$/,gh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>hh.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=>mh.test(e),Qo=()=>!0,bh=e=>ph.test(e)&&!gh.test(e),Ss=()=>!1,vh=e=>yh.test(e),wh=e=>xh.test(e),kh=e=>!C(e)&&!N(e),Th=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)),jh=e=>Re(e,ia,Ss),C=e=>Zo.test(e),$e=e=>Re(e,oa,bh),ea=e=>Re(e,Vh,I),Sh=e=>Re(e,la,Qo),Ch=e=>Re(e,aa,Ss),ta=e=>Re(e,sa,Ss),Nh=e=>Re(e,ra,wh),Zt=e=>Re(e,ca,vh),N=e=>Jo.test(e),yt=e=>We(e,oa),Ph=e=>We(e,aa),na=e=>We(e,sa),Ah=e=>We(e,ia),Mh=e=>We(e,ra),Jt=e=>We(e,ca,!0),Eh=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",Vh=e=>e==="number",aa=e=>e==="family-name",la=e=>e==="number"||e==="weight",ca=e=>e==="shadow",Dh=dh(()=>{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"),k=te("ease"),v=te("animate"),x=()=>["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(),N,C],M=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],T=()=>[N,C,c],E=()=>[Le,"full","auto",...T()],V=()=>[Te,"none","subgrid",N,C],_=()=>["auto",{span:["full",Te,N,C]},Te,N,C],B=()=>[Te,"auto",N,C],ce=()=>["auto","min","max","fr",N,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",...T()],xe=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],K=()=>[Le,"screen","full","dvw","lvw","svw","min","max","fit",...T()],ne=()=>[Le,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],A=()=>[e,N,C],w=()=>[...j(),na,ta,{position:[N,C]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",Ah,jh,{size:[N,C]}],X=()=>[js,yt,$e],Q=()=>["","none","full",u,N,C],se=()=>["",I,yt,$e],Y=()=>["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"],q=()=>[I,js,na,ta],Qt=()=>["","none",g,N,C],en=()=>["none",I,N,C],tn=()=>["none",I,N,C],Ns=()=>[I,N,C],nn=()=>[Le,"full",...T()];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:[kh],"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,N,y]}],container:["container"],"container-type":[{"@container":["","normal","size",N,C]}],"container-named":[Th],columns:[{columns:[I,C,N,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",N,C]}],basis:[{basis:[Le,"full","auto",a,...T()]}],"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,N,C]}],shrink:[{shrink:["",I,N,C]}],order:[{order:[Te,"first","last","none",N,C]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:_()}],"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:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"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:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],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":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:xe()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"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,Eh,Sh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",js,C]}],"font-family":[{font:[Ph,Ch,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,N,C]}],"line-clamp":[{"line-clamp":[I,"none",N,ea]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",N,C]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",N,$e]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[I,"auto",N,C]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[Te,N,C]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,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",N,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:w()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,N,C],radial:["",N,C],conic:[Te,N,C]},Mh,Nh]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],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:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,N,C]}],"outline-w":[{outline:["",I,yt,$e]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,Jt,Zt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,Jt,Zt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[I,$e]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Jt,Zt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[I,N,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":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[N,C]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,C]}],filter:[{filter:["","none",N,C]}],blur:[{blur:Qt()}],brightness:[{brightness:[I,N,C]}],contrast:[{contrast:[I,N,C]}],"drop-shadow":[{"drop-shadow":["","none",m,Jt,Zt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",I,N,C]}],"hue-rotate":[{"hue-rotate":[I,N,C]}],invert:[{invert:["",I,N,C]}],saturate:[{saturate:[I,N,C]}],sepia:[{sepia:["",I,N,C]}],"backdrop-filter":[{"backdrop-filter":["","none",N,C]}],"backdrop-blur":[{"backdrop-blur":Qt()}],"backdrop-brightness":[{"backdrop-brightness":[I,N,C]}],"backdrop-contrast":[{"backdrop-contrast":[I,N,C]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,N,C]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,N,C]}],"backdrop-invert":[{"backdrop-invert":["",I,N,C]}],"backdrop-opacity":[{"backdrop-opacity":[I,N,C]}],"backdrop-saturate":[{"backdrop-saturate":[I,N,C]}],"backdrop-sepia":[{"backdrop-sepia":["",I,N,C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,C]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",N,C]}],ease:[{ease:["linear","initial",k,N,C]}],delay:[{delay:[I,N,C]}],animate:[{animate:["none",v,N,C]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,N,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:Ns()}],"skew-x":[{"skew-x":Ns()}],"skew-y":[{"skew-y":Ns()}],transform:[{transform:[N,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,N,C]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",N,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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",N,C]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[I,yt,$e,ea]}],stroke:[{stroke:["none",...A()]}],"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 Dh(Wf(e))}const Lh=({title:e,children:t,className:n})=>{const[s,r]=b.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)"}},Rh=({title:e,description:t,variant:n="info",dismissible:s=!1,className:r})=>{const[o,i]=b.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(Ne,{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"},Ih=({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(za,{size:12,className:"text-primary-foreground stroke-[4px]"})})})})]}),n&&l.jsx("span",{className:"text-sm font-semibold text-foreground leading-none",children:n})]}),Oh=({initialMode:e="login",onLogin:t,onRegister:n,onForgotPassword:s,logo:r=$a,title:o="Ether UI Console",className:i})=>{const[a,c]=b.useState(e),[u,d]=b.useState(""),[f,h]=b.useState(""),[m,g]=b.useState(""),[p,y]=b.useState(!1),[k,v]=b.useState(!1),[x,j]=b.useState(!1),S=async M=>{M.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:k}):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:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:x,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:M=>d(M.target.value),required:!0}),l.jsx(Ue,{label:"Work Email",type:"email",placeholder:"alex@company.com",value:f,onChange:M=>h(M.target.value),required:!0}),l.jsx(Ue,{label:"Choose Password",type:"password",placeholder:"••••••••",value:m,onChange:M=>g(M.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:k,onChange:v})}),l.jsx(ye,{type:"submit",variant:"primary",loading:x,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(Ia,{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:M=>h(M.target.value),required:!0}),l.jsx(ye,{type:"submit",variant:"primary",loading:x,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(Ne,{size:20})})]}),l.jsx("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:s})]})]})}),zh=({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})]})]})}),_h=({label:e,options:t=[],value:n,onChange:s,placeholder:r="Select option",className:o})=>{const[i,a]=b.useState(!1),c=b.useRef(null),u=t.find(d=>d.value===n);return b.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)})})})]})},Fh=({onFilesAdded:e,accept:t="*",maxFiles:n=5,maxSizeMB:s=10,className:r})=>{const[o,i]=b.useState(!1),[a,c]=b.useState([]),u=b.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(v=>{const j=v.size/1048576>s;return{id:Math.random().toString(36).substring(7),name:v.name,size:(v.size/1024).toFixed(1)+" KB",rawFile:v,progress:0,status:j?"failed":"uploading",error:j?`File exceeds limit of ${s}MB`:null}}),k=[...a,...y].slice(0,n);c(k),e&&e(k.map(v=>v.rawFile)),y.forEach(v=>{if(v.status==="failed")return;let x=0;const j=setInterval(()=>{x+=Math.floor(Math.random()*15)+5,x>=100?(x=100,clearInterval(j),c(S=>S.map(M=>M.id===v.id?{...M,progress:100,status:"success"}:M))):c(S=>S.map(M=>M.id===v.id?{...M,progress:x}:M))},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(Ba,{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(Ne,{size:14})})]},p.id))})]})})]})},Bh=({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(Ha,{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(Ne,{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(Ne,{size:12})})]},i.id)})})})]})]})}),$h=({currentPage:e=1,totalPages:t=1,onPageChange:n,loading:s=!1})=>{if(t<=1)return null;const o=((i,a)=>a<=5?Array.from({length:a},(c,u)=>u+1):i<=3?[1,2,3,4,"...",a]:i>=a-2?[1,"...",a-3,a-2,a-1,a]:[1,"...",i-1,i,i+1,"...",a])(e,t);return 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",className:"text-foreground font-semibold",onClick:()=>n(e-1),disabled:e===1||s,children:"Previous"}),l.jsx(ye,{variant:"outline",className:"text-foreground font-semibold",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 text-foreground",onClick:()=>n(e-1),disabled:e===1||s,children:[l.jsx("span",{className:"sr-only",children:"Previous"}),l.jsx(Rs,{size:16})]}),o.map((i,a)=>{if(i==="...")return l.jsx("div",{className:"flex items-end justify-center px-1 pb-1",children:l.jsx("span",{className:"text-muted-foreground tracking-widest leading-none font-bold",children:"..."})},`dots-${a}`);const c=e===i;return l.jsx(ye,{variant:c?"primary":"outline",className:`w-10 h-10 p-0 rounded-xl shrink-0 font-mono text-xs font-semibold ${c?"":"text-muted-foreground hover:text-foreground"}`,onClick:()=>n(i),disabled:s,children:i},i)}),l.jsxs(ye,{variant:"outline",className:"p-2.5 rounded-xl shrink-0 text-foreground",onClick:()=>n(e+1),disabled:e===t||s,children:[l.jsx("span",{className:"sr-only",children:"Next"}),l.jsx(sn,{size:16})]})]})})]})]})},Wh=({children:e,content:t})=>{const[n,s]=b.useState(!1),[r,o]=b.useState({x:0,y:0}),i=b.useRef(null),a=()=>{if(i.current){const d=i.current.getBoundingClientRect();o({x:d.left+d.width/2,y:d.top+window.scrollY-8})}};b.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"&&Sa.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)]})},Uh=({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),"%"]})]})},Gh=({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})]}),ga=b.createContext(),Kh=({children:e,defaultTheme:t="light"})=>{const[n,s]=b.useState(()=>{if(typeof window>"u")return!1;const i=new URLSearchParams(window.location.search).get("theme");if(i)return i==="dark";const a=localStorage.getItem("theme");return a?a==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches});b.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]);const r=()=>s(o=>!o);return l.jsx(ga.Provider,{value:{isDark:n,toggleTheme:r,setIsDark:s},children:e})},ya=()=>{const e=b.useContext(ga);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Yh=({collapsed:e=!1,onToggle:t,logo:n,title:s="RenderLoom",children:r,footer:o,className:i,showMobileToggle:a=!0,onLogout:c})=>{const[u,d]=b.useState(!1),[f,h]=b.useState(!e);b.useEffect(()=>{h(!e)},[e]),b.useEffect(()=>{const x=()=>{const j=window.innerWidth<768;d(j),j||h(!1)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const m=()=>{if(u){const x=!f;h(x),t&&t(!x)}else t&&t(!e)},g=()=>{u&&(h(!1),t&&t(!0))};let p=!1,y=()=>{},k=!1;try{const x=ya();x&&(p=x.isDark,y=x.toggleTheme,k=!0)}catch{}const v=u?!f:e;return l.jsxs(l.Fragment,{children:[u&&a&&l.jsxs("div",{className:"flex md:hidden items-center justify-between px-6 py-4 border-b border-border/20 bg-card/45 backdrop-blur-xl w-full shrink-0 min-h-[64px]",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),l.jsx("span",{className:"font-extrabold text-sm text-foreground tracking-tight",children:s})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[k&&l.jsx("button",{type:"button",onClick:y,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:p?l.jsx(Ya,{size:16,className:"text-amber-500"}):l.jsx(Ka,{size:16,className:"text-primary"})}),l.jsx("button",{type:"button",onClick:m,className:"p-2.5 rounded-xl bg-secondary/20 hover:bg-secondary/35 text-foreground cursor-pointer border border-transparent transition-colors flex items-center justify-center shrink-0",children:l.jsx(Ua,{size:16,className:"text-foreground"})})]})]}),u&&!v&&l.jsx("div",{onClick:m,className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-40 md:hidden transition-opacity duration-300"}),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",u?"fixed top-0 bottom-0 left-0 z-50":"z-30",v?"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",v?"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",v&&"justify-center"),children:[n&&l.jsx("div",{className:"text-primary shrink-0 transition-transform duration-300",children:n}),!v&&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:m,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:v?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",onClickCapture:g,children:r}),o&&l.jsxs("div",{className:D("p-3 border-t border-border/20 min-h-[72px] flex overflow-hidden shrink-0 w-full gap-2",v?"flex-col items-center justify-center py-4":"flex-row items-center justify-between"),children:[l.jsx("div",{className:D("flex-1 min-w-0 flex overflow-hidden",v?"flex-col items-center justify-center":"flex-row items-center"),children:o}),c&&l.jsx("button",{type:"button",onClick:c,title:"Logout",className:D("p-2 rounded-xl text-muted-foreground hover:text-rose-400 hover:bg-rose-500/10 cursor-pointer transition-colors flex items-center justify-center shrink-0 border border-transparent hover:border-rose-500/20",v?"mt-2":""),children:l.jsx(Wa,{size:16})})]})]})]})},Hh=({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}})]}),Xh=({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:`
171
171
  input[type="range"]::-webkit-slider-thumb {
172
172
  -webkit-appearance: none;
173
173
  appearance: none;