@reeverdev/ui 0.2.96 → 0.2.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -40,7 +40,7 @@
40
40
  scrollbar-width: none;
41
41
  }
42
42
  `:""}
43
- `;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsxRuntime.jsx("div",{ref:s,id:d,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),style:n,className:i("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...o,children:a})]})});je.displayName="ScrollArea";var dd=classVarianceAuthority.cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ud=$__namespace.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:a,onValueChange:n,placeholder:o="Select...",searchable:s=false,searchPlaceholder:l="Search...",emptyText:c="No results found.",disabled:d=false,clearable:m=false,maxDisplayItems:u=3,maxDropdownHeight:f=240,radius:p,className:b,...x},g)=>{let[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState(""),[C,R]=$__namespace.useState(a||""),[M,T]=$__namespace.useState(a||[]),[L,N]=$__namespace.useState({top:0,left:0,width:0}),P=$__namespace.useRef(null),k=$__namespace.useRef(null),E=$__namespace.useRef(null),H=$__namespace.useRef(null),S=r!==void 0?r:C,D=r!==void 0?r:M,I=r!==void 0,z=A=>{m&&S===A?(I||R(""),n?.("")):(I||R(A),n?.(A)),y(false),h("");},G=A=>{let U=D.includes(A)?D.filter(W=>W!==A):[...D,A];I||T(U),n?.(U);},V=(A,U)=>{U.stopPropagation();let W=D.filter(he=>he!==A);I||T(W),n?.(W);},F=A=>{A.stopPropagation(),t?(I||T([]),n?.([])):(I||R(""),n?.(""));},O=e.find(A=>A.value===S),Q=e.filter(A=>D.includes(A.value)),re=Q.slice(0,u),K=Q.length-u,B=s?e.filter(A=>A.label.toLowerCase().includes(w.toLowerCase())):e;$__namespace.useEffect(()=>{if(v&&k.current){let A=k.current.getBoundingClientRect();N({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||h("");},[v,s]),$__namespace.useEffect(()=>{let A=U=>{let W=U.target,he=P.current&&!P.current.contains(W),me=E.current&&!E.current.contains(W);he&&me&&(y(false),h(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),$__namespace.useEffect(()=>{if(!v)return;let A=U=>{E.current?.contains(U.target)||(y(false),h(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let j=t?D.length>0:!!S;return jsxRuntime.jsxs("div",{ref:P,className:i("relative",b),...x,children:[jsxRuntime.jsxs("div",{ref:A=>{k.current=A,typeof g=="function"?g(A):g&&(g.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":d,onClick:()=>!d&&y(!v),className:i(dd({radius:p}),t&&"flex-wrap gap-1",d&&"cursor-not-allowed opacity-50"),children:[!t&&jsxRuntime.jsx("span",{className:i(!O&&"text-muted-foreground"),children:O?O.label:o}),t&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:Q.length===0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:o}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[re.map(A=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:U=>V(A.value,U),onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&V(A.value,U);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},A.value)),K>0&&jsxRuntime.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",K," more"]})]})}),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[m&&j&&jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&F(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4 opacity-50"})}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!d&&typeof document<"u"&&Wo__namespace.createPortal(jsxRuntime.jsxs("div",{ref:E,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:L.top,left:L.left,minWidth:L.width},children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsxRuntime.jsx("input",{ref:H,type:"text",value:w,onChange:A=>h(A.target.value),placeholder:l,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsxRuntime.jsx(je,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsxRuntime.jsx("div",{className:"p-1",children:B.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):B.map(A=>{let U=t?D.includes(A.value):S===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":U,onClick:()=>{A.disabled||(t?G(A.value):z(A.value));},className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:U&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});ud.displayName="Select";var md=$__namespace.createContext(null),Pa=()=>{let e=$__namespace.useContext(md);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},ki=$__namespace.createContext(null),pd=$__namespace.createContext(null),Yr=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),[s,l]=$__namespace.useState(-1),c=t!==void 0,d=c?t:n,m=$__namespace.useRef(null),u=$__namespace.useRef(null),f=$__namespace.useId(),p=$__namespace.useRef(new Map),b=$__namespace.useCallback(v=>{c||o(v),a?.(v),v||l(-1);},[c,a]),x=$__namespace.useCallback((v,y)=>{p.current.set(v,y);},[]),g=$__namespace.useCallback(v=>{p.current.delete(v);},[]);return jsxRuntime.jsx(md.Provider,{value:{open:d,onOpenChange:b,triggerRef:m,contentRef:u,contentId:f,activeIndex:s,setActiveIndex:l,items:p,registerItem:x,unregisterItem:g},children:e})};Yr.displayName="Dropdown";var Xr=$__namespace.forwardRef(({asChild:e,children:t,onClick:r,onKeyDown:a,...n},o)=>{let{open:s,onOpenChange:l,triggerRef:c,contentId:d}=Pa(),m=f=>{r?.(f),l(!s);},u=f=>{a?.(f),(f.key==="ArrowDown"||f.key==="ArrowUp")&&(f.preventDefault(),l(true));};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:f=>{c.current=f,typeof o=="function"?o(f):o&&(o.current=f);},onClick:f=>{t.props.onClick?.(f),l(!s);},onKeyDown:f=>{t.props.onKeyDown?.(f),(f.key==="ArrowDown"||f.key==="ArrowUp")&&(f.preventDefault(),l(true));},"aria-expanded":s,"aria-haspopup":"menu","aria-controls":s?d:void 0,...n}):jsxRuntime.jsx("button",{ref:f=>{c.current=f,typeof o=="function"?o(f):o&&(o.current=f);},type:"button","aria-expanded":s,"aria-haspopup":"menu","aria-controls":s?d:void 0,onClick:m,onKeyDown:u,...n,children:t})});Xr.displayName="DropdownTrigger";var qr=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="start",alignOffset:n=0,collisionPadding:o=8,onInteractOutside:s,onEscapeKeyDown:l,loop:c=true,children:d,...m},u)=>{let{open:f,onOpenChange:p,triggerRef:b,contentRef:x,contentId:g,activeIndex:v,setActiveIndex:y,items:w}=Pa(),[h,C]=$__namespace.useState({top:0,left:0}),[R,M]=$__namespace.useState(t),[T,L]=$__namespace.useState(false),N=$__namespace.useRef(0);if($__namespace.useEffect(()=>{L(true);},[]),$__namespace.useEffect(()=>{f&&(N.current=w.current.size);},[f,w]),$__namespace.useEffect(()=>{if(!f||!b.current||!x.current)return;let k=()=>{if(!b.current||!x.current)return;let E=b.current.getBoundingClientRect(),H=x.current.getBoundingClientRect(),S=window.innerWidth,D=window.innerHeight,I=0,z=0,G=t;switch(t){case "top":I=E.top-H.height-r,I<o&&(I=E.bottom+r,G="bottom");break;case "bottom":I=E.bottom+r,I+H.height>D-o&&(I=E.top-H.height-r,G="top");break;case "left":z=E.left-H.width-r,z<o&&(z=E.right+r,G="right");break;case "right":z=E.right+r,z+H.width>S-o&&(z=E.left-H.width-r,G="left");break}if(G==="top"||G==="bottom"){switch(a){case "start":z=E.left+n;break;case "center":z=E.left+E.width/2-H.width/2;break;case "end":z=E.right-H.width-n;break}z<o?z=o:z+H.width>S-o&&(z=S-H.width-o);}else {switch(a){case "start":I=E.top+n;break;case "center":I=E.top+E.height/2-H.height/2;break;case "end":I=E.bottom-H.height-n;break}I<o?I=o:I+H.height>D-o&&(I=D-H.height-o);}C({top:I,left:z}),M(G);};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[f,t,r,a,n,o,b]),$__namespace.useEffect(()=>{if(!f)return;let k=E=>{let H=E.target;x.current&&!x.current.contains(H)&&b.current&&!b.current.contains(H)&&(s?.(),p(false));};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[f,p,s,b,x]),$__namespace.useEffect(()=>{if(!f)return;let k=E=>{let H=Array.from(w.current.entries()).sort(([D],[I])=>D-I).map(([,D])=>D),S=H.length;if(S!==0)switch(E.key){case "Escape":E.preventDefault(),l?.(),p(false),b.current?.focus();break;case "ArrowDown":E.preventDefault(),v===-1||v>=S-1?y(c?0:Math.min(v+1,S-1)):y(v+1);break;case "ArrowUp":E.preventDefault(),v<=0?y(c?S-1:0):y(v-1);break;case "Home":E.preventDefault(),y(0);break;case "End":E.preventDefault(),y(S-1);break;case "Enter":case " ":E.preventDefault(),v>=0&&v<S&&H[v]?.click();break;case "Tab":p(false);break}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[f,p,l,v,y,w,c,b]),$__namespace.useEffect(()=>{f&&v>=0&&Array.from(w.current.entries()).sort(([E],[H])=>E-H).map(([,E])=>E)[v]?.focus();},[f,v,w]),!T||!f)return null;let P={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[R];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:k=>{x.current=k,typeof u=="function"?u(k):u&&(u.current=k);},id:g,role:"menu","aria-orientation":"vertical","data-state":f?"open":"closed","data-side":R,className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",P,e),style:{top:h.top,left:h.left},...m,children:d}),document.body)});qr.displayName="DropdownContent";var Bo=0,Jt=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,onMouseEnter:o,...s},l)=>{let{onOpenChange:c,activeIndex:d,setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),[p]=$__namespace.useState(()=>Bo++),b=$__namespace.useRef(null);$__namespace.useEffect(()=>(!r&&b.current&&u(p,b.current),()=>{f(p);}),[r,p,u,f]);let x=y=>{if(r){y.preventDefault();return}n?.(y),a?.(),c(false);},g=y=>{o?.(y),r||m(p);};return jsxRuntime.jsx("div",{ref:y=>{b.current=y,typeof l=="function"?l(y):l&&(l.current=y);},role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-highlighted":d===p?"":void 0,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!r&&"cursor-pointer",e),onClick:x,onMouseEnter:g,...s})});Jt.displayName="DropdownItem";var fd=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,onMouseEnter:s,...l},c)=>{let{onOpenChange:d,activeIndex:m,setActiveIndex:u,registerItem:f,unregisterItem:p}=Pa(),[b]=$__namespace.useState(()=>Bo++),x=$__namespace.useRef(null);$__namespace.useEffect(()=>(!n&&x.current&&f(b,x.current),()=>{p(b);}),[n,b,f,p]);let g=w=>{if(n){w.preventDefault();return}o?.(w),a?.(!r),d(false);},v=w=>{s?.(w),n||u(b);};return jsxRuntime.jsxs("div",{ref:w=>{x.current=w,typeof c=="function"?c(w):c&&(c.current=w);},role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":m===b?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!n&&"cursor-pointer",e),onClick:g,onMouseEnter:v,...l,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});fd.displayName="DropdownCheckboxItem";var gd=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(pd.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));gd.displayName="DropdownRadioGroup";var bd=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,onMouseEnter:o,...s},l)=>{let{onOpenChange:c,activeIndex:d,setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),p=$__namespace.useContext(pd),b=p?.value===r,[x]=$__namespace.useState(()=>Bo++),g=$__namespace.useRef(null);$__namespace.useEffect(()=>(!a&&g.current&&u(x,g.current),()=>{f(x);}),[a,x,u,f]);let v=h=>{if(a){h.preventDefault();return}n?.(h),p?.onValueChange(r),c(false);},y=h=>{o?.(h),a||m(x);};return jsxRuntime.jsxs("div",{ref:h=>{g.current=h,typeof l=="function"?l(h):l&&(l.current=h);},role:"menuitemradio","aria-checked":b,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-highlighted":d===x?"":void 0,"data-state":b?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!a&&"cursor-pointer",e),onClick:v,onMouseEnter:y,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});bd.displayName="DropdownRadioItem";var vd=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));vd.displayName="DropdownLabel";var Oo=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-muted",e),...t}));Oo.displayName="DropdownSeparator";var hd=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...t});hd.displayName="DropdownShortcut";var xd=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));xd.displayName="DropdownGroup";var yd=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),{contentRef:s}=Pa(),l=t!==void 0,c=l?t:n,d=$__namespace.useRef(null),m=$__namespace.useCallback(u=>{l||o(u),a?.(u);},[l,a]);return jsxRuntime.jsx(ki.Provider,{value:{open:c,onOpenChange:m,triggerRef:d,parentMenuRef:s},children:e})};yd.displayName="DropdownSub";var Rd=$__namespace.forwardRef(({className:e,inset:t,disabled:r,children:a,onMouseEnter:n,onMouseLeave:o,onKeyDown:s,...l},c)=>{let d=$__namespace.useContext(ki),{setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),[p]=$__namespace.useState(()=>Bo++),b=$__namespace.useRef(null);if(!d)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:x,onOpenChange:g,triggerRef:v}=d;$__namespace.useEffect(()=>(!r&&b.current&&u(p,b.current),()=>{f(p);}),[r,p,u,f]);let y=C=>{n?.(C),r||(m(p),g(true));},w=C=>{o?.(C);},h=C=>{s?.(C),(C.key==="ArrowRight"||C.key==="Enter"||C.key===" ")&&(C.preventDefault(),g(true));};return jsxRuntime.jsxs("div",{ref:C=>{b.current=C,v.current=C,typeof c=="function"?c(C):c&&(c.current=C);},role:"menuitem","aria-haspopup":"menu","aria-expanded":x,tabIndex:r?-1:0,"aria-disabled":r,"data-state":x?"open":"closed","data-disabled":r?"":void 0,className:i("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",!r&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:w,onKeyDown:h,...l,children:[a,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto"})]})});Rd.displayName="DropdownSubTrigger";var wd=$__namespace.forwardRef(({className:e,sideOffset:t=2,alignOffset:r=-4,collisionPadding:a=8,onMouseEnter:n,onMouseLeave:o,...s},l)=>{let c=$__namespace.useContext(ki);if(!c)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:d,onOpenChange:m,triggerRef:u,parentMenuRef:f}=c,[p,b]=$__namespace.useState({top:0,left:0}),[x,g]=$__namespace.useState(false),v=$__namespace.useRef(null),y=$__namespace.useRef(null);$__namespace.useEffect(()=>{g(true);},[]),$__namespace.useEffect(()=>{if(!d||!u.current||!v.current)return;(()=>{if(!u.current||!v.current)return;let R=u.current.getBoundingClientRect(),M=v.current.getBoundingClientRect(),T=window.innerWidth,L=window.innerHeight,N=R.top+r,P=R.right+t;P+M.width>T-a&&(P=R.left-M.width-t),N+M.height>L-a&&(N=L-M.height-a),N<a&&(N=a),b({top:N,left:P});})();},[d,t,r,a,u]);let w=C=>{n?.(C),y.current&&(clearTimeout(y.current),y.current=null),m(true);},h=C=>{o?.(C);let R=C.relatedTarget;u.current?.contains(R)||f?.current?.contains(R)||(y.current=setTimeout(()=>{m(false);},100));};return $__namespace.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!x||!d?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{v.current=C,typeof l=="function"?l(C):l&&(l.current=C);},role:"menu","data-state":d?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:w,onMouseLeave:h,...s}),document.body)});wd.displayName="DropdownSubContent";var Nd=$__namespace.createContext(null),Ei=()=>{let e=$__namespace.useContext(Nd);if(!e)throw new Error("Popover components must be used within a Popover");return e},at=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useId(),m=$__namespace.useCallback(u=>{s||o(u),a?.(u);},[s,a]);return jsxRuntime.jsx(Nd.Provider,{value:{open:l,onOpenChange:m,triggerRef:c,contentId:d},children:e})};at.displayName="Popover";var ht=$__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{open:o,onOpenChange:s,triggerRef:l,contentId:c}=Ei(),d=m=>{r?.(m),s(!o);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:m=>{l.current=m,typeof n=="function"?n(m):n&&(n.current=m);},onClick:m=>{t.props.onClick?.(m),s(!o);},"aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?c:void 0,...a}):jsxRuntime.jsx("button",{ref:m=>{l.current=m,typeof n=="function"?n(m):n&&(n.current=m);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?c:void 0,onClick:d,...a,children:t})});ht.displayName="PopoverTrigger";var Fo=$__namespace.forwardRef(({asChild:e,children:t,...r},a)=>{let{triggerRef:n}=Ei();return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:o=>{n.current=o,typeof a=="function"?a(o):a&&(a.current=o);},...r}):jsxRuntime.jsx("div",{ref:o=>{n.current=o,typeof a=="function"?a(o):a&&(a.current=o);},...r,children:t})});Fo.displayName="PopoverAnchor";var nt=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="center",alignOffset:n=0,onInteractOutside:o,onEscapeKeyDown:s,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},u)=>{let{open:f,onOpenChange:p,triggerRef:b,contentId:x}=Ei(),[g,v]=$__namespace.useState({top:0,left:0}),[y,w]=$__namespace.useState(false),h=$__namespace.useRef(null);if($__namespace.useEffect(()=>{w(true);},[]),$__namespace.useEffect(()=>{if(!f||!b.current||!h.current)return;let R=()=>{if(!b.current||!h.current)return;let M=b.current.getBoundingClientRect(),T=h.current.getBoundingClientRect(),L=0,N=0;switch(t){case "top":L=M.top-T.height-r;break;case "bottom":L=M.bottom+r;break;case "left":N=M.left-T.width-r;break;case "right":N=M.right+r;break}if(t==="top"||t==="bottom")switch(a){case "start":N=M.left+n;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-n;break}else switch(a){case "start":L=M.top+n;break;case "center":L=M.top+M.height/2-T.height/2;break;case "end":L=M.bottom-T.height-n;break}v({top:L,left:N});};return R(),window.addEventListener("resize",R),window.addEventListener("scroll",R,true),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R,true);}},[f,t,r,a,n,b]),$__namespace.useEffect(()=>{if(!f)return;let R=M=>{let T=M.target;h.current&&!h.current.contains(T)&&b.current&&!b.current.contains(T)&&(o?.(),p(false));};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[f,p,o,b]),$__namespace.useEffect(()=>{if(!f)return;let R=M=>{M.key==="Escape"&&(s?.(),p(false));};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[f,p,s]),!y||!f)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:R=>{h.current=R,typeof u=="function"?u(R):u&&(u.current=R);},id:x,role:"dialog","data-state":f?"open":"closed","data-side":t,className:i("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},...m,children:d}),document.body)});nt.displayName="PopoverContent";var Md=$__namespace.createContext(null),Si=()=>{let e=$__namespace.useContext(Md);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Td=$__namespace.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:a,variant:n="solid",radius:o="md",orientation:s="horizontal",children:l,...c},d)=>{let[m,u]=$__namespace.useState(r),f=t!==void 0,p=f?t:m,b=x=>{f||u(x),a?.(x);};return jsxRuntime.jsx(Md.Provider,{value:{value:p,onValueChange:b,variant:n,radius:o,orientation:s},children:jsxRuntime.jsx("div",{ref:d,"data-orientation":s,className:i(s==="vertical"&&"flex gap-4",e),...c,children:l})})});Td.displayName="Tabs";var Di={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Pd=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let{variant:n,radius:o,orientation:s,value:l}=Si(),c=$__namespace.useRef(null),[d,m]=$__namespace.useState({opacity:0});$__namespace.useEffect(()=>{let b=c.current;if(!b)return;let x=()=>{let v=b.querySelector('[data-state="active"]');if(v){let y=b.getBoundingClientRect(),w=v.getBoundingClientRect(),h=s==="vertical";n==="underline"?m(h?{width:2,height:w.height,transform:`translateY(${w.top-y.top}px)`,opacity:1}:{width:w.width,height:2,transform:`translateX(${w.left-y.left}px)`,opacity:1}):n==="solid"&&m(h?{width:w.width,height:w.height,transform:`translateY(${w.top-y.top}px)`,opacity:1}:{width:w.width,height:w.height,transform:`translateX(${w.left-y.left}px)`,opacity:1});}};x();let g=new ResizeObserver(x);return g.observe(b),()=>{g.disconnect();}},[n,s,l]);let u={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>n==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":n==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxRuntime.jsxs("div",{ref:b=>{c.current=b,typeof a=="function"?a(b):a&&(a.current=b);},role:"tablist","aria-orientation":s,className:i("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Di[o].list,u[n],e),...r,children:[(n==="solid"||n==="underline")&&jsxRuntime.jsx("span",{className:i("absolute transition-all duration-200 ease-out",Di[o].indicator,p()),style:d,"aria-hidden":"true"}),t]})});Pd.displayName="TabsList";var kd=$__namespace.forwardRef(({className:e,value:t,disabled:r,onClick:a,...n},o)=>{let{value:s,onValueChange:l,variant:c,radius:d}=Si(),m=s===t,u={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsxRuntime.jsx("button",{type:"button",role:"tab",ref:o,"aria-selected":m,"data-state":m?"active":"inactive",disabled:r,className:i("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Di[d].trigger,u[c],e),onClick:f=>{a?.(f),l(t);},...n})});kd.displayName="TabsTrigger";var Ld=$__namespace.forwardRef(({className:e,value:t,children:r,...a},n)=>{let{value:o}=Si(),s=o===t;return s?jsxRuntime.jsx("div",{ref:n,role:"tabpanel","data-state":s?"active":"inactive",className:i("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a,children:r}):null});Ld.displayName="TabsContent";var Dd=$__namespace.createContext(null),Go=()=>{let e=$__namespace.useContext(Dd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},$o=({open:e,defaultOpen:t=false,onOpenChange:r,children:a})=>{let[n,o]=$__namespace.useState(t),s=e!==void 0,l=s?e:n,c=$__namespace.useCallback(d=>{s||o(d),r?.(d);},[s,r]);return jsxRuntime.jsx(Dd.Provider,{value:{open:l,onOpenChange:c},children:a})};$o.displayName="Sheet";var Sd=$__namespace.forwardRef(({asChild:e,onClick:t,children:r,...a},n)=>{let{onOpenChange:o}=Go(),s=l=>{t?.(l),o(true);};return e&&$__namespace.isValidElement(r)?$__namespace.cloneElement(r,{onClick:l=>{r.props.onClick?.(l),o(true);}}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:r})});Sd.displayName="SheetTrigger";var Hd=$__namespace.forwardRef(({asChild:e,onClick:t,children:r,...a},n)=>{let{onOpenChange:o}=Go(),s=l=>{t?.(l),o(false);};return e&&$__namespace.isValidElement(r)?$__namespace.cloneElement(r,{onClick:l=>{r.props.onClick?.(l),o(false);}}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:r})});Hd.displayName="SheetClose";var Ii=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Ii.displayName="SheetPortal";var Id=$__namespace.forwardRef(({className:e,...t},r)=>{let{open:a,onOpenChange:n}=Go();return a?jsxRuntime.jsx("div",{ref:r,className:i("fixed inset-0 z-50 bg-black/80",a?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>n(false),"aria-hidden":"true",...t}):null});Id.displayName="SheetOverlay";var Vd=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),qR=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],_o=$__namespace.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:a,onEscapeKeyDown:n,onInteractOutside:o,...s},l)=>{let{open:c,onOpenChange:d}=Go(),[m,u]=$__namespace.useState(false),[,f]=$__namespace.useState(false);return $__namespace.useEffect(()=>{if(c)u(true),f(true),document.body.style.overflow="hidden";else {f(true);let p=setTimeout(()=>{u(false),f(false),document.body.style.overflow="";},300);return ()=>clearTimeout(p)}return ()=>{document.body.style.overflow="";}},[c]),$__namespace.useEffect(()=>{let p=b=>{b.key==="Escape"&&c&&(n?.(),d(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[c,d,n]),!m&&!c?null:jsxRuntime.jsxs(Ii,{children:[jsxRuntime.jsx("div",{className:i("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",c?"opacity-100":"opacity-0"),onClick:()=>{o?.(),d(false);},"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:l,role:"dialog","aria-modal":"true",className:i(Vd({side:e}),qR(e,c),t),...s,children:[!a&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>d(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]})});_o.displayName="SheetContent";var Ad=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ad.displayName="SheetHeader";var zd=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zd.displayName="SheetFooter";var Bd=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h2",{ref:r,className:i("text-lg font-semibold text-foreground",e),...t}));Bd.displayName="SheetTitle";var Od=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:i("text-sm text-muted-foreground",e),...t}));Od.displayName="SheetDescription";var QR=({theme:e="system",...t})=>jsxRuntime.jsx(sonner.Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var Fd=$__namespace.createContext(null),Fn=()=>{let e=$__namespace.useContext(Fd);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Vi=$__namespace.createContext(null),Kd=$__namespace.createContext(null),Gd=({children:e,onOpenChange:t})=>{let[r,a]=$__namespace.useState(false),[n,o]=$__namespace.useState({x:0,y:0}),s=$__namespace.useId(),l=$__namespace.useCallback(c=>{a(c),t?.(c);},[t]);return jsxRuntime.jsx(Fd.Provider,{value:{open:r,onOpenChange:l,position:n,setPosition:o,contentId:s},children:e})};Gd.displayName="ContextMenu";var $d=$__namespace.forwardRef(({asChild:e,children:t,onContextMenu:r,...a},n)=>{let{onOpenChange:o,setPosition:s}=Fn(),l=c=>{c.preventDefault(),s({x:c.clientX,y:c.clientY}),o(true);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:n,onContextMenu:c=>{c.preventDefault(),t.props.onContextMenu?.(c),s({x:c.clientX,y:c.clientY}),o(true);},...a}):jsxRuntime.jsx("div",{ref:n,onContextMenu:c=>{r?.(c),l(c);},...a,children:t})});$d.displayName="ContextMenuTrigger";var _d=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));_d.displayName="ContextMenuGroup";var Wd=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Wd.displayName="ContextMenuPortal";var jd=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx(Vi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};jd.displayName="ContextMenuSub";var Ud=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(Kd.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Ud.displayName="ContextMenuRadioGroup";var Yd=$__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:r,children:a,...n},o)=>{let{open:s,onOpenChange:l,position:c,contentId:d}=Fn(),[m,u]=$__namespace.useState(false),[f,p]=$__namespace.useState(c),b=$__namespace.useRef(null);return $__namespace.useEffect(()=>{u(true);},[]),$__namespace.useEffect(()=>{if(!s||!b.current){p(c);return}let g=b.current.getBoundingClientRect(),{x:v,y}=c;v+g.width>window.innerWidth&&(v=window.innerWidth-g.width-8),y+g.height>window.innerHeight&&(y=window.innerHeight-g.height-8),p({x:v,y});},[s,c]),$__namespace.useEffect(()=>{if(!s)return;let x=g=>{let v=g.target;b.current&&!b.current.contains(v)&&(t?.(),l(false));};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s,l,t]),$__namespace.useEffect(()=>{if(!s)return;let x=g=>{g.key==="Escape"&&(r?.(),l(false));};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s,l,r]),!m||!s?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{b.current=x,typeof o=="function"?o(x):o&&(o.current=x);},id:d,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:i("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...n,children:a}),document.body)});Yd.displayName="ContextMenuContent";var Xd=$__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let l=$__namespace.useContext(Vi);if(!l)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:c,onOpenChange:d,triggerRef:m}=l,u=p=>{a?.(p),d(true);},f=p=>{n?.(p),d(false);};return jsxRuntime.jsxs("div",{ref:p=>{m.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:i("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:u,onMouseLeave:f,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Xd.displayName="ContextMenuSubTrigger";var qd=$__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let s=$__namespace.useContext(Vi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=s,[m,u]=$__namespace.useState({top:0,left:0}),[f,p]=$__namespace.useState(false),b=$__namespace.useRef(null);$__namespace.useEffect(()=>{p(true);},[]),$__namespace.useEffect(()=>{if(!l||!d.current||!b.current)return;(()=>{if(!d.current||!b.current)return;let y=d.current.getBoundingClientRect(),w=b.current.getBoundingClientRect(),h=y.top,C=y.right+t;C+w.width>window.innerWidth&&(C=y.left-w.width-t),u({top:h,left:C});})();},[l,t,d]);let x=v=>{r?.(v),c(true);},g=v=>{a?.(v),c(false);};return !f||!l?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{b.current=v,typeof o=="function"?o(v):o&&(o.current=v);},role:"menu","data-state":l?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:m.top,left:m.left},onMouseEnter:x,onMouseLeave:g,...n}),document.body)});qd.displayName="ContextMenuSubContent";var Zd=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{onOpenChange:l}=Fn(),c=d=>{if(r){d.preventDefault();return}n?.(d),a?.(),l(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:i("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:c,...o})});Zd.displayName="ContextMenuItem";var Jd=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{onOpenChange:c}=Fn(),d=m=>{if(n){m.preventDefault();return}o?.(m),a?.(!r),c(false);};return jsxRuntime.jsxs("div",{ref:l,role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});Jd.displayName="ContextMenuCheckboxItem";var Qd=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{onOpenChange:l}=Fn(),c=$__namespace.useContext(Kd),d=c?.value===r,m=u=>{if(a){u.preventDefault();return}n?.(u),c?.onValueChange(r),l(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-state":d?"checked":"unchecked",className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:m,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-4 w-4 fill-current"})}),t]})});Qd.displayName="ContextMenuRadioItem";var eu=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...r}));eu.displayName="ContextMenuLabel";var tu=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-border",e),...t}));tu.displayName="ContextMenuSeparator";var ru=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ru.displayName="ContextMenuShortcut";var au=$__namespace.createContext(null),o0=()=>{let e=$__namespace.useContext(au);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},nu=$__namespace.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:a,name:n,disabled:o,required:s,orientation:l="vertical",children:c,...d},m)=>{let[u,f]=$__namespace.useState(r),p=t!==void 0,b=p?t:u,x=$__namespace.useId(),g=v=>{p||f(v),a?.(v);};return jsxRuntime.jsx("div",{ref:m,role:"radiogroup","aria-required":s,"aria-orientation":l,className:i(l==="vertical"?"grid gap-2":"flex gap-4",e),...d,children:jsxRuntime.jsx(au.Provider,{value:{name:n||x,value:b,onValueChange:g,disabled:o,required:s},children:c})})});nu.displayName="RadioGroup";var ou=$__namespace.forwardRef(({className:e,value:t,disabled:r,...a},n)=>{let o=o0(),s=o.value===t,l=r||o.disabled;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:l,ref:n,className:i("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>o.onValueChange(t),...a,children:s&&jsxRuntime.jsx("span",{className:"flex items-center justify-center",children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsxRuntime.jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:o.name,value:t,checked:s,required:o.required,disabled:l,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});ou.displayName="RadioGroupItem";var Uo=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),su=$__namespace.forwardRef(({className:e,variant:t,size:r,pressed:a,defaultPressed:n=false,onPressedChange:o,disabled:s,onKeyDown:l,...c},d)=>{let[m,u]=$__namespace.useState(n),f=a!==void 0,p=f?a:m,b=()=>{if(s)return;let g=!p;f||u(g),o?.(g);},x=g=>{g.key==="Enter"&&g.preventDefault(),l?.(g);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:d,className:i(Uo({variant:t,size:r,className:e})),onClick:b,onKeyDown:x,...c})});su.displayName="Toggle";var iu=$__namespace.createContext(null),d0=()=>{let e=$__namespace.useContext(iu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},lu=$__namespace.forwardRef(({className:e,variant:t,size:r,type:a,value:n,defaultValue:o,onValueChange:s,disabled:l,children:c,...d},m)=>{let[u,f]=$__namespace.useState(()=>a==="single"?o?[o]:[]:o||[]),p=n!==void 0,b=p?a==="single"?n?[n]:[]:n:u,x=g=>{if(a==="single"){let v=b.includes(g)?[]:[g];p||f(v),s?.(v[0]||"");}else {let v=b.includes(g)?b.filter(y=>y!==g):[...b,g];p||f(v),s?.(v);}};return jsxRuntime.jsx("div",{ref:m,role:"group",className:i("flex items-center justify-center gap-1",e),...d,children:jsxRuntime.jsx(iu.Provider,{value:{type:a,variant:t,size:r,value:b,onValueChange:x,disabled:l},children:c})})});lu.displayName="ToggleGroup";var cu=$__namespace.forwardRef(({className:e,children:t,variant:r,size:a,value:n,disabled:o,...s},l)=>{let c=d0(),d=c.value.includes(n),m=o||c.disabled;return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":d,"aria-pressed":d,"data-state":d?"on":"off",disabled:m,ref:l,className:i(Uo({variant:c.variant||r,size:c.size||a}),e),onClick:()=>c.onValueChange(n),...s,children:t})});cu.displayName="ToggleGroupItem";var Xo=$__namespace.forwardRef(({className:e,value:t,defaultValue:r=[0],onValueChange:a,onValueCommit:n,min:o=0,max:s=100,step:l=1,disabled:c=false,orientation:d="horizontal",name:m,...u},f)=>{let[p,b]=$__namespace.useState(r),x=t!==void 0,g=x?t:p,v=$__namespace.useRef(null),[y,w]=$__namespace.useState(false),[h,C]=$__namespace.useState(null),R=(H,S)=>{if(!v.current)return g[0];let D=v.current.getBoundingClientRect(),I;d==="horizontal"?I=(H-D.left)/D.width:I=1-(S-D.top)/D.height,I=Math.max(0,Math.min(1,I));let z=o+I*(s-o),G=Math.round(z/l)*l;return Math.max(o,Math.min(s,G))},M=(H,S)=>{let D=[...g];D[S]=H,S>0&&H<g[S-1]&&(D[S]=g[S-1]),S<g.length-1&&H>g[S+1]&&(D[S]=g[S+1]),x||b(D),a?.(D);},T=(H,S)=>{c||(H.preventDefault(),w(true),C(S),H.target.setPointerCapture(H.pointerId));},L=H=>{if(!y||h===null||c)return;let S=R(H.clientX,H.clientY);M(S,h);},N=()=>{y&&(w(false),C(null),n?.(g));},P=H=>{if(c)return;let S=R(H.clientX,H.clientY),D=0,I=Math.abs(g[0]-S);for(let z=1;z<g.length;z++){let G=Math.abs(g[z]-S);G<I&&(I=G,D=z);}M(S,D),n?.([...g.slice(0,D),S,...g.slice(D+1)]);},k=(H,S)=>{if(c)return;let D=g[S];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),D=Math.min(s,g[S]+l);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),D=Math.max(o,g[S]-l);break;case "Home":H.preventDefault(),D=o;break;case "End":H.preventDefault(),D=s;break;default:return}M(D,S),n?.([...g.slice(0,S),D,...g.slice(S+1)]);},E=H=>(H-o)/(s-o)*100;return jsxRuntime.jsxs("div",{ref:f,className:i("relative flex touch-none select-none items-center",d==="vertical"&&"flex-col h-full w-5",c&&"opacity-50 pointer-events-none",e),...u,children:[jsxRuntime.jsx("div",{ref:v,className:i("relative grow overflow-hidden rounded-full bg-secondary",d==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsxRuntime.jsx("div",{className:"absolute bg-primary",style:d==="horizontal"?{left:g.length>1?`${E(g[0])}%`:0,right:`${100-E(g[g.length-1])}%`,top:0,bottom:0}:{bottom:g.length>1?`${E(g[0])}%`:0,top:`${100-E(g[g.length-1])}%`,left:0,right:0}})}),g.map((H,S)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:c?-1:0,"aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":d,"aria-disabled":c,className:i("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",y&&h===S&&"cursor-grabbing"),style:d==="horizontal"?{left:`calc(${E(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:D=>T(D,S),onPointerMove:L,onPointerUp:N,onPointerCancel:N,onKeyDown:D=>k(D,S)},S)),m&&g.map((H,S)=>jsxRuntime.jsx("input",{type:"hidden",name:g.length>1?`${m}[${S}]`:m,value:H},S))]})});Xo.displayName="Slider";var du=$__namespace.createContext(null),uu=()=>{let e=$__namespace.useContext(du);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Bi=$__namespace.createContext(null),mu=()=>{let e=$__namespace.useContext(Bi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},pu=$__namespace.forwardRef(({className:e,type:t="multiple",value:r,defaultValue:a,onValueChange:n,collapsible:o=true,disabled:s,children:l,...c},d)=>{let[m,u]=$__namespace.useState(()=>t==="single"?a?[a]:[]:a||[]),f=$__namespace.useRef(new Map),p=$__namespace.useRef([]),b=r!==void 0,x=b?t==="single"?r?[r]:[]:r:m,g=h=>{if(t==="single"){let R=x.includes(h)&&o?[]:[h];b||u(R),n?.(R[0]||"");}else {let C=x.includes(h)?x.filter(R=>R!==h):[...x,h];b||u(C),n?.(C);}},v=$__namespace.useCallback((h,C)=>{f.current.set(h,C),p.current.includes(h)||p.current.push(h);},[]),y=$__namespace.useCallback(h=>{f.current.delete(h),p.current=p.current.filter(C=>C!==h);},[]),w=$__namespace.useCallback(h=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,M;f.current.forEach((k,E)=>{k===R&&(M=E);});let T=M?C.indexOf(M):-1,L;switch(h){case "first":L=0;break;case "last":L=C.length-1;break;case "next":L=T===-1?0:(T+1)%C.length;break;case "prev":L=T===-1?C.length-1:(T-1+C.length)%C.length;break}let N=C[L];f.current.get(N)?.focus();},[]);return jsxRuntime.jsx(du.Provider,{value:{type:t,value:x,onValueChange:g,collapsible:o,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:w},children:jsxRuntime.jsx("div",{ref:d,"data-orientation":"vertical",className:i("w-full",e),...c,children:l})})});pu.displayName="Accordion";var fu=$__namespace.forwardRef(({className:e,value:t,disabled:r,title:a,subtitle:n,startContent:o,children:s,...l},c)=>{let d=uu(),m=d.value.includes(t),u=r||d.disabled||false,f=$__namespace.useId(),p=$__namespace.useId();return a!==void 0?jsxRuntime.jsx(Bi.Provider,{value:{value:t,isOpen:m,isDisabled:u,contentId:f,triggerId:p},children:jsxRuntime.jsxs("div",{ref:c,"data-state":m?"open":"closed","data-disabled":u?"":void 0,className:i("border-b",u&&"opacity-50",e),...l,children:[jsxRuntime.jsx(gu,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[o,jsxRuntime.jsxs("div",{className:"flex flex-col items-start",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:a}),n&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:n})]})]})}),jsxRuntime.jsx(bu,{children:s})]})}):jsxRuntime.jsx(Bi.Provider,{value:{value:t,isOpen:m,isDisabled:u,contentId:f,triggerId:p},children:jsxRuntime.jsx("div",{ref:c,"data-state":m?"open":"closed","data-disabled":u?"":void 0,className:i("border-b",u&&"opacity-50",e),...l,children:s})})});fu.displayName="AccordionItem";var gu=$__namespace.forwardRef(({className:e,children:t,onClick:r,onKeyDown:a,...n},o)=>{let s=uu(),{value:l,isOpen:c,isDisabled:d,contentId:m,triggerId:u}=mu(),f=$__namespace.useRef(null);$__namespace.useEffect(()=>{let b=f.current;return b&&!d&&s.registerTrigger(l,b),()=>{s.unregisterTrigger(l);}},[l,d,s]);let p=b=>{switch(a?.(b),b.key){case "ArrowDown":b.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":b.preventDefault(),s.focusTrigger("prev");break;case "Home":b.preventDefault(),s.focusTrigger("first");break;case "End":b.preventDefault(),s.focusTrigger("last");break}};return jsxRuntime.jsx("h3",{className:"flex",children:jsxRuntime.jsxs("button",{type:"button",ref:b=>{f.current=b,typeof o=="function"?o(b):o&&(o.current=b);},id:u,"aria-controls":m,"aria-expanded":c,disabled:d,"data-state":c?"open":"closed",className:i("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:b=>{r?.(b),s.onValueChange(l);},onKeyDown:p,...n,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});gu.displayName="AccordionTrigger";var bu=$__namespace.forwardRef(({className:e,children:t,style:r,...a},n)=>{let{isOpen:o,contentId:s,triggerId:l,isDisabled:c}=mu();return jsxRuntime.jsx("div",{ref:n,id:s,role:"region","aria-labelledby":l,"data-state":o?"open":"closed","data-disabled":c?"":void 0,className:i("grid transition-[grid-template-rows] duration-200 ease-out",o?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:r,...a,children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});bu.displayName="AccordionContent";var hu=$__namespace.createContext(null),xu=()=>{let e=$__namespace.useContext(hu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},yu=$__namespace.forwardRef(({className:e,open:t,defaultOpen:r=false,onOpenChange:a,disabled:n,title:o,children:s,...l},c)=>{let[d,m]=$__namespace.useState(r),u=t!==void 0,f=u?t:d,p=$__namespace.useId(),b=$__namespace.useId(),x=g=>{n||(u||m(g),a?.(g));};return jsxRuntime.jsx(hu.Provider,{value:{open:f,onOpenChange:x,disabled:n,contentId:p,triggerId:b},children:jsxRuntime.jsxs("div",{ref:c,"data-state":f?"open":"closed","data-disabled":n?"":void 0,className:i("space-y-2",e),...l,children:[o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold",children:o}),jsxRuntime.jsx(Oi,{})]}),s]})})});yu.displayName="Collapsible";var Oi=$__namespace.forwardRef(({className:e,children:t,onClick:r,...a},n)=>{let{open:o,onOpenChange:s,disabled:l,contentId:c,triggerId:d}=xu();return jsxRuntime.jsx("button",{ref:n,type:"button",id:d,"aria-controls":c,"aria-expanded":o,disabled:l,"data-state":o?"open":"closed","data-disabled":l?"":void 0,className:i("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:m=>{r?.(m),s(!o);},...a,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})});Oi.displayName="CollapsibleTrigger";var Ru=$__namespace.forwardRef(({className:e,children:t,style:r,...a},n)=>{let{open:o,contentId:s,triggerId:l,disabled:c}=xu(),d=$__namespace.useRef(null),[m,u]=$__namespace.useState(void 0),[f,p]=$__namespace.useState(false),[b,x]=$__namespace.useState(o);$__namespace.useEffect(()=>{o?(x(true),p(true),requestAnimationFrame(()=>{d.current&&u(d.current.scrollHeight);})):(p(true),u(0));},[o]);let g=()=>{p(false),o||x(false),u(void 0);};return b?jsxRuntime.jsx("div",{ref:n,id:s,role:"region","aria-labelledby":l,"data-state":o?"open":"closed","data-disabled":c?"":void 0,className:i("overflow-hidden",e),style:{...r,height:f?m!==void 0?m:"auto":o?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:o?1:0},onTransitionEnd:g,...a,children:jsxRuntime.jsx("div",{ref:d,children:t})}):null});Ru.displayName="CollapsibleContent";var Jo=$__namespace.forwardRef(({className:e,value:t=0,max:r=100,label:a,showPercentage:n=false,formatPercentage:o=c=>`${Math.round(c)}%`,...s},l)=>{let c=Math.min(Math.max(t/r*100,0),100);return jsxRuntime.jsxs("div",{ref:l,className:"w-full",children:[(a||n)&&jsxRuntime.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[a&&jsxRuntime.jsx("span",{className:"text-muted-foreground",children:a}),n&&jsxRuntime.jsx("span",{className:i("text-muted-foreground",!a&&"ml-auto"),children:o(c)})]}),jsxRuntime.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":typeof a=="string"?a:void 0,className:i("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsxRuntime.jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-c}%)`}})})]})});Jo.displayName="Progress";var Mu=$__namespace.createContext(null),Tu=()=>{let e=$__namespace.useContext(Mu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Pu=({children:e,open:t,defaultOpen:r=false,onOpenChange:a,openDelay:n=700,closeDelay:o=300,closeOnScroll:s=true})=>{let[l,c]=$__namespace.useState(r),d=t!==void 0,m=d?t:l,u=$__namespace.useRef(null),f=$__namespace.useId(),p=$__namespace.useRef(null),b=$__namespace.useRef(null),x=$__namespace.useCallback(g=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current),g?p.current=setTimeout(()=>{d||c(true),a?.(true);},n):b.current=setTimeout(()=>{d||c(false),a?.(false);},o);},[d,a,n,o]);return $__namespace.useEffect(()=>{if(!s||!m)return;let g=()=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current),d||c(false),a?.(false);};return window.addEventListener("scroll",g,true),()=>window.removeEventListener("scroll",g,true)},[s,m,d,a]),$__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current);},[]),jsxRuntime.jsx(Mu.Provider,{value:{open:m,onOpenChange:x,triggerRef:u,contentId:f},children:e})};Pu.displayName="HoverCard";var ku=$__namespace.forwardRef(({asChild:e,children:t,onMouseEnter:r,onMouseLeave:a,onFocus:n,onBlur:o,...s},l)=>{let{onOpenChange:c,triggerRef:d}=Tu(),m=b=>{r?.(b),c(true);},u=b=>{a?.(b),c(false);},f=b=>{n?.(b),c(true);},p=b=>{o?.(b),c(false);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:b=>{d.current=b,typeof l=="function"?l(b):l&&(l.current=b);},onMouseEnter:m,onMouseLeave:u,onFocus:f,onBlur:p,...s}):jsxRuntime.jsx("a",{ref:b=>{d.current=b,typeof l=="function"?l(b):l&&(l.current=b);},onMouseEnter:m,onMouseLeave:u,onFocus:f,onBlur:p,...s,children:t})});ku.displayName="HoverCardTrigger";var Lu=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="center",alignOffset:n=0,onMouseEnter:o,onMouseLeave:s,children:l,...c},d)=>{let{open:m,onOpenChange:u,triggerRef:f,contentId:p}=Tu(),[b,x]=$__namespace.useState({top:0,left:0}),[g,v]=$__namespace.useState(false),y=$__namespace.useRef(null);$__namespace.useEffect(()=>{v(true);},[]),$__namespace.useEffect(()=>{if(!m||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let M=f.current.getBoundingClientRect(),T=y.current.getBoundingClientRect(),L=0,N=0;switch(t){case "top":L=M.top-T.height-r;break;case "bottom":L=M.bottom+r;break;case "left":N=M.left-T.width-r;break;case "right":N=M.right+r;break}if(t==="top"||t==="bottom")switch(a){case "start":N=M.left+n;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-n;break}else switch(a){case "start":L=M.top+n;break;case "center":L=M.top+M.height/2-T.height/2;break;case "end":L=M.bottom-T.height-n;break}x({top:L,left:N});})();},[m,t,r,a,n,f]);let w=R=>{o?.(R),u(true);},h=R=>{s?.(R),u(false);};if(!g||!m)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:R=>{y.current=R,typeof d=="function"?d(R):d&&(d.current=R);},id:p,"data-state":m?"open":"closed","data-side":t,className:i("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:b.top,left:b.left},onMouseEnter:w,onMouseLeave:h,...c,children:l}),document.body)});Lu.displayName="HoverCardContent";var Eu=$__namespace.createContext({size:"md",variant:"default",radius:"md"}),es=()=>$__namespace.useContext(Eu);classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var b0=classVarianceAuthority.cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),v0=classVarianceAuthority.cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),h0=classVarianceAuthority.cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Du=$__namespace.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:a,...n},o)=>jsxRuntime.jsx(Eu.Provider,{value:{size:e,variant:t,radius:r},children:jsxRuntime.jsx("nav",{ref:o,"aria-label":"breadcrumb",...n,children:a})}));Du.displayName="Breadcrumb";var Su=$__namespace.forwardRef(({className:e,...t},r)=>{let{size:a,variant:n,radius:o}=es();return jsxRuntime.jsx("ol",{ref:r,className:i(b0({size:a,variant:n,radius:n==="default"?void 0:o}),e),...t})});Su.displayName="BreadcrumbList";var Hu=$__namespace.forwardRef(({className:e,...t},r)=>{let{size:a}=es();return jsxRuntime.jsx("li",{ref:r,className:i("inline-flex items-center",a==="sm"&&"gap-1",a==="md"&&"gap-1.5",a==="lg"&&"gap-2",e),...t})});Hu.displayName="BreadcrumbItem";var Iu=$__namespace.forwardRef(({asChild:e,className:t,...r},a)=>jsxRuntime.jsx(e?To:"a",{ref:a,className:i("transition-colors hover:text-foreground cursor-pointer",t),...r}));Iu.displayName="BreadcrumbLink";var Vu=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:i("font-medium text-foreground",e),...t}));Vu.displayName="BreadcrumbPage";var Au=({children:e,className:t,...r})=>{let{size:a}=es();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:i(v0({size:a}),"text-muted-foreground/60",t),...r,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Au.displayName="BreadcrumbSeparator";var zu=({className:e,...t})=>{let{size:r}=es();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:i(h0({size:r}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};zu.displayName="BreadcrumbEllipsis";var Fu=$__namespace.forwardRef(({ratio:e=1,className:t,style:r,children:a,...n},o)=>jsxRuntime.jsx("div",{ref:o,className:i("relative w-full",t),style:{...r,paddingBottom:`${100/e}%`},...n,children:jsxRuntime.jsx("div",{className:"absolute inset-0",children:a})}));Fu.displayName="AspectRatio";var $u=$__namespace.createContext(null),Ki=()=>{let e=$__namespace.useContext($u);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},_u=$__namespace.createContext(null),Wu=()=>{let e=$__namespace.useContext(_u);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},ju=$__namespace.forwardRef(({className:e,orientation:t="horizontal",children:r,...a},n)=>{let[o,s]=$__namespace.useState(null);return jsxRuntime.jsx($u.Provider,{value:{activeItem:o,setActiveItem:s,orientation:t},children:jsxRuntime.jsxs("nav",{ref:n,className:i("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[r,jsxRuntime.jsx(Gi,{})]})})});ju.displayName="NavigationMenu";var Uu=$__namespace.forwardRef(({className:e,...t},r)=>{let{orientation:a}=Ki();return jsxRuntime.jsx("ul",{ref:r,className:i("group flex flex-1 list-none items-center justify-center gap-1",a==="vertical"&&"flex-col items-start",e),...t})});Uu.displayName="NavigationMenuList";var Yu=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let{activeItem:n,setActiveItem:o}=Ki(),s=$__namespace.useId(),l=$__namespace.useRef(null),c=n===s,d=$__namespace.useCallback(m=>{o(m?s:null);},[s,o]);return jsxRuntime.jsx(_u.Provider,{value:{itemId:s,triggerRef:l,open:c,onOpenChange:d},children:jsxRuntime.jsx("li",{ref:a,className:i("relative",e),...r,children:t})})});Yu.displayName="NavigationMenuItem";var Xu=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),qu=$__namespace.forwardRef(({className:e,children:t,onMouseEnter:r,onClick:a,...n},o)=>{let{triggerRef:s,open:l,onOpenChange:c}=Wu(),d=u=>{r?.(u),c(true);},m=u=>{a?.(u),c(!l);};return jsxRuntime.jsxs("button",{ref:u=>{s.current=u,typeof o=="function"?o(u):o&&(o.current=u);},type:"button","data-state":l?"open":"closed",className:i(Xu(),"group",e),onMouseEnter:d,onClick:m,"aria-expanded":l,...n,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});qu.displayName="NavigationMenuTrigger";var Zu=$__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:r,...a},n)=>{let{open:o,onOpenChange:s,triggerRef:l}=Wu(),c=$__namespace.useRef(null),[d,m]=$__namespace.useState({top:0,left:0});$__namespace.useEffect(()=>{if(!o||!l.current)return;let p=()=>{if(!l.current)return;let b=l.current.getBoundingClientRect();m({top:b.bottom+4,left:b.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[o,l]);let u=p=>{t?.(p),s(true);},f=p=>{r?.(p),s(false);};return o?Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:p=>{c.current=p,typeof n=="function"?n(p):n&&(n.current=p);},"data-state":o?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:d.top,left:d.left},onMouseEnter:u,onMouseLeave:f,...a}),document.body):null});Zu.displayName="NavigationMenuContent";var Ju=classVarianceAuthority.cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),Qu=$__namespace.forwardRef(({className:e,active:t,...r},a)=>jsxRuntime.jsx("a",{ref:a,className:i(Ju(),t&&"bg-accent text-accent-foreground",e),...r}));Qu.displayName="NavigationMenuLink";var Gi=$__namespace.forwardRef((e,t)=>null);Gi.displayName="NavigationMenuViewport";var em=$__namespace.forwardRef(({className:e,...t},r)=>{let{activeItem:a}=Ki();return a?jsxRuntime.jsx("div",{ref:r,className:i("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsxRuntime.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});em.displayName="NavigationMenuIndicator";var nm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),vr=$__namespace.forwardRef(({className:e,variant:t,size:r,iconSize:a,...n},o)=>{let l=a??{sm:14,md:16,lg:20}[r??"md"];return jsxRuntime.jsx("button",{ref:o,type:"button",className:i(nm({variant:t,size:r}),e),"aria-label":"Close",...n,children:jsxRuntime.jsx(lucideReact.X,{style:{width:l,height:l}})})});vr.displayName="CloseButton";var ts=$__namespace.createContext(null);function L0(){let e=$__namespace.useContext(ts);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Jr(){return $__namespace.useContext(ts)}var E0="16rem",D0="18rem",S0="3rem",H0="b",I0={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},V0={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},$i=$__namespace.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:r,placement:a="left",size:n="md",backdrop:o="opaque",isDismissable:s=true,hideCloseButton:l=false,collapsible:c="offcanvas",mode:d,className:m,style:u,children:f,...p},b)=>{let x=d??"overlay",g=x==="overlay",[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState(false),[C,R]=$__namespace.useState(e),M=t??C,T=$__namespace.useCallback(k=>{let E=typeof k=="function"?k(M):k;r?r(E):R(E);},[r,M]);$__namespace.useEffect(()=>{let k=()=>{y(window.innerWidth<768);};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);let L=$__namespace.useCallback(()=>g?T(k=>!k):v?h(k=>!k):T(k=>!k),[v,T,h,g]);$__namespace.useEffect(()=>{if(g)return;let k=E=>{E.key===H0&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),L());};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[L,g]);let N=M?"expanded":"collapsed",P=$__namespace.useMemo(()=>({placement:a,state:N,open:M,setOpen:T,isMobile:v,openMobile:w,setOpenMobile:h,toggleDrawer:L,collapsible:c,mode:x,size:n,backdrop:o,isDismissable:s,hideCloseButton:l}),[a,N,M,T,v,w,h,L,c,x,n,o,s,l]);return g?jsxRuntime.jsx(ts.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:M,onOpenChange:T,direction:a,dismissible:s,children:f})}):jsxRuntime.jsx(ts.Provider,{value:P,children:jsxRuntime.jsx(_r,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:b,style:{"--drawer-width":E0,"--drawer-width-icon":S0,...u},className:i("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",m),...p,children:f})})})});$i.displayName="Drawer";var sm=$__namespace.forwardRef(({variant:e="default",embedded:t=false,className:r,children:a,...n},o)=>{let s=Jr();if(!s)return jsxRuntime.jsx("div",{ref:o,className:i("flex h-full flex-col bg-background text-foreground",r),...n,children:a});let{placement:l,collapsible:c,isMobile:d,state:m,openMobile:u,setOpenMobile:f}=s;if(l==="bottom"||l==="top")return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a});if(c==="none")return jsxRuntime.jsx("div",{ref:o,className:i("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",l==="right"&&"border-l border-r-0",r),...n,children:a});if(d&&!t)return jsxRuntime.jsx(A0,{open:u,onOpenChange:f,placement:l,children:a});if(t){let b=m==="collapsed",x=c==="offcanvas",g=c==="icon";return jsxRuntime.jsx("div",{ref:o,className:i("group peer text-foreground relative"),"data-state":m,"data-collapsible":b?c:"","data-variant":e,"data-placement":l,"data-embedded":"true",children:jsxRuntime.jsx("div",{className:i("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",x?b?"w-0 opacity-0":"w-[--drawer-width] opacity-100":g&&b?"w-[--drawer-width-icon]":"w-[--drawer-width]",r),...n,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:i("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&l==="left"&&"border-r",e==="default"&&l==="right"&&"border-l"),children:a})})})}return jsxRuntime.jsxs("div",{ref:o,className:"group peer hidden md:block text-foreground","data-state":m,"data-collapsible":m==="collapsed"?c:"","data-variant":e,"data-placement":l,children:[jsxRuntime.jsx("div",{className:i("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",l==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsxRuntime.jsx("div",{className:i("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",l==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",r),...n,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:i("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:a})})]})});sm.displayName="DrawerSidebar";var A0=({children:e,open:t,onOpenChange:r,placement:a})=>{let[n,o]=$__namespace.useState(false);return $__namespace.useEffect(()=>{o(true);},[]),$__namespace.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[t]),!n||!t?null:Wo__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>r(false)}),jsxRuntime.jsx("div",{className:i("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",a==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",a==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":D0},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},im=$__namespace.forwardRef(({className:e,onClick:t,...r},a)=>{let n=Jr();if(n?.mode==="overlay")return jsxRuntime.jsx(vaul.Drawer.Trigger,{ref:a,className:e,onClick:t,...r});let o=n?.toggleDrawer;return jsxRuntime.jsxs("button",{ref:a,type:"button","data-drawer":"trigger",className:i("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),o?.();},...r,children:[jsxRuntime.jsx(lucideReact.PanelLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});im.displayName="DrawerTrigger";var lm=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let n=Jr(),o=n?.mode==="overlay",s=n?.placement||"left",l=n?.size||"md",c=n?.backdrop||"opaque",d=n?.hideCloseButton||false;if(o){let m=s==="top"||s==="bottom",u=s==="left"||s==="right",f=u?I0[l]:V0[l],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},b={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:i("fixed inset-0 z-50",p[c])}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:a,className:i("fixed z-50 flex flex-col border bg-background",b[s],e),style:{...u?{width:f,height:"100%"}:{},...m?{maxHeight:f}:{},...r.style},...r,children:[u&&!d&&jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx(vr,{variant:"light",className:"absolute right-4 top-4 z-10"})}),m&&jsxRuntime.jsx("div",{className:i("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsxRuntime.jsx("div",{ref:a,className:i("flex flex-col h-full",e),...r,children:t})});lm.displayName="DrawerContent";var cm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"header",className:i("flex flex-col gap-2 p-4",e),...t}));cm.displayName="DrawerHeader";var dm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"body",className:i("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));dm.displayName="DrawerBody";var um=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 mt-auto",e),...t}));um.displayName="DrawerFooter";var mm=$__namespace.forwardRef(({className:e,...t},r)=>Jr()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Title,{ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}):jsxRuntime.jsx("h2",{ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));mm.displayName="DrawerTitle";var pm=$__namespace.forwardRef(({className:e,...t},r)=>Jr()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Description,{ref:r,className:i("text-sm text-muted-foreground",e),...t}):jsxRuntime.jsx("p",{ref:r,className:i("text-sm text-muted-foreground",e),...t}));pm.displayName="DrawerDescription";var fm=$__namespace.forwardRef(({className:e,onClick:t,...r},a)=>{let n=Jr();return n?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:a,className:e,onClick:t,...r}):jsxRuntime.jsx(vr,{ref:a,variant:"light",className:e,onClick:s=>{t?.(s),n?.setOpen(false);},...r})});fm.displayName="DrawerClose";var gm=$__namespace.forwardRef(({className:e,onClick:t,showLabel:r=true,...a},n)=>{let o=Jr();if(!o)return null;let{toggleDrawer:s,state:l,placement:c}=o,d=l==="collapsed",m=c==="left",u=m?lucideReact.PanelLeftOpen:lucideReact.PanelRightOpen,f=m?lucideReact.PanelLeftClose:lucideReact.PanelRightClose;return jsxRuntime.jsxs("button",{ref:n,type:"button","data-drawer":"toggle","data-state":l,className:i("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...a,children:[d?jsxRuntime.jsx(u,{className:"h-4 w-4 shrink-0"}):jsxRuntime.jsx(f,{className:"h-4 w-4 shrink-0"}),r&&jsxRuntime.jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:d?"Expand":"Collapse"})]})});gm.displayName="DrawerToggle";var bm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"separator",className:i("mx-4 h-px bg-border",e),...t}));bm.displayName="DrawerSeparator";var vm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,"data-drawer":"menu",className:i("flex w-full min-w-0 flex-col gap-1",e),...t}));vm.displayName="DrawerMenu";var hm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,"data-drawer":"menu-item",className:i("group/menu-item relative",e),...t}));hm.displayName="DrawerMenuItem";var xm=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--border))] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),ym=$__namespace.forwardRef(({asChild:e=false,isActive:t=false,variant:r="default",size:a="md",tooltip:n,className:o,children:s,...l},c)=>{let d=Jr(),m=d?.isMobile??false,u=d?.state??"expanded",f=jsxRuntime.jsx("button",{ref:c,type:"button","data-drawer":"menu-button","data-size":a,"data-active":t,className:i(xm({variant:r,size:a}),o),...l,children:s});return n?jsxRuntime.jsxs(Wr,{children:[jsxRuntime.jsx(jr,{asChild:true,children:f}),jsxRuntime.jsx(Ur,{side:"right",align:"center",hidden:u!=="collapsed"||m,...typeof n=="string"?{children:n}:n})]}):f});ym.displayName="DrawerMenuButton";var Rm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"group",className:i("relative flex w-full min-w-0 flex-col p-2",e),...t}));Rm.displayName="DrawerGroup";var wm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"group-label",className:i("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));wm.displayName="DrawerGroupLabel";var Cm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("main",{ref:r,className:i("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Cm.displayName="DrawerInset";var z0=$i;var Mm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:r,className:i("w-full caption-bottom text-sm",e),...t})}));Mm.displayName="Table";var Tm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:i("[&_tr]:border-b",e),...t}));Tm.displayName="TableHeader";var Pm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:i("[&_tr:last-child]:border-0",e),...t}));Pm.displayName="TableBody";var km=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tfoot",{ref:r,className:i("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));km.displayName="TableFooter";var Lm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tr",{ref:r,className:i("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Lm.displayName="TableRow";var Em=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Em.displayName="TableHead";var Dm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:i("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Dm.displayName="TableCell";var Sm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("caption",{ref:r,className:i("mt-4 text-sm text-muted-foreground",e),...t}));Sm.displayName="TableCaption";function $0({className:e,data:t,columns:r,selectable:a=false,selectedKeys:n,onSelectionChange:o,getRowKey:s=(h,C)=>String(C),sortable:l=false,sortState:c,onSortChange:d,paginated:m=false,pageSizeOptions:u=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:b="No data",loading:x=false,striped:g=false,hoverable:v=true,...y},w){let[h,C]=$__namespace.useState(new Set),[R,M]=$__namespace.useState({columnId:null,direction:null}),[T,L]=$__namespace.useState({pageIndex:0,pageSize:u[0]||10}),N=n??h,P=c??R,k=f??T,E=K=>{o?o(K):C(K);},H=K=>{d?d(K):M(K);},S=K=>{p?p(K):L(K);},D=$__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let K=r.find(B=>B.id===P.columnId);return K?[...t].sort((B,j)=>{let A=K.accessor(B),U=K.accessor(j);if(A===U)return 0;if(A==null)return 1;if(U==null)return -1;let W=String(A).localeCompare(String(U),void 0,{numeric:true});return P.direction==="asc"?W:-W}):t},[t,P,r]),I=$__namespace.useMemo(()=>{if(!m)return D;let K=k.pageIndex*k.pageSize;return D.slice(K,K+k.pageSize)},[D,m,k]),z=Math.ceil(D.length/k.pageSize),G=K=>{if(K===true){let B=new Set(I.map((j,A)=>s(j,A)));E(B);}else E(new Set);},V=(K,B)=>{let j=new Set(N);B?j.add(K):j.delete(K),E(j);},F=I.length>0&&I.every((K,B)=>N.has(s(K,B))),O=I.some((K,B)=>N.has(s(K,B))),Q=K=>{if(!r.find(A=>A.id===K)?.sortable&&!l)return;let j="asc";P.columnId===K&&(P.direction==="asc"?j="desc":P.direction==="desc"&&(j=null)),H({columnId:j?K:null,direction:j});},re=K=>P.columnId!==K?jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"});return jsxRuntime.jsxs("div",{ref:w,className:i("w-full",e),...y,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxRuntime.jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsxRuntime.jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxRuntime.jsxs("tr",{children:[a&&jsxRuntime.jsx("th",{className:"h-12 w-12 px-4",children:jsxRuntime.jsx(Bn,{checked:F?true:O?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),r.map(K=>{let B=K.sortable??l;return jsxRuntime.jsx("th",{className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground",B&&"cursor-pointer select-none hover:text-foreground"),style:{width:K.width},onClick:()=>B&&Q(K.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[K.header,B&&re(K.id)]})},K.id)})]})}),jsxRuntime.jsx("tbody",{className:"[&_tr:last-child]:border-0",children:x?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:b})}):I.map((K,B)=>{let j=s(K,B),A=N.has(j);return jsxRuntime.jsxs("tr",{className:i("border-b transition-colors",v&&"hover:bg-muted/50",g&&B%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[a&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx(Bn,{checked:A,onCheckedChange:U=>V(j,!!U),"aria-label":`Select row ${B+1}`})}),r.map(U=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:U.cell?U.cell(K,B):U.accessor(K)},U.id))]},j)})})]})}),m&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"Rows per page:"}),jsxRuntime.jsx("select",{value:k.pageSize,onChange:K=>S({pageIndex:0,pageSize:Number(K.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(K=>jsxRuntime.jsx("option",{value:K,children:K},K))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",k.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(J,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...k,pageIndex:k.pageIndex-1}),disabled:k.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(J,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...k,pageIndex:k.pageIndex+1}),disabled:k.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var _0=$__namespace.forwardRef($0);var Vm=classVarianceAuthority.cva("animate-spin",{variants:{size:{xs:"h-3 w-3",sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8",xl:"h-12 w-12"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),j0={xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-base",xl:"text-lg"},Am=$__namespace.forwardRef(({className:e,size:t="md",color:r,label:a="Loading",text:n,textPosition:o="right",customColor:s,...l},c)=>{let d=jsxRuntime.jsxs("svg",{className:i(Vm({size:t,color:s?void 0:r})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":a,children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.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"})]});if(!n)return jsxRuntime.jsx("div",{ref:c,className:i("inline-flex",e),...l,children:d});let m=jsxRuntime.jsx("span",{className:i("text-muted-foreground",j0[t]),children:n}),u=o==="top"||o==="bottom";return jsxRuntime.jsxs("div",{ref:c,className:i("inline-flex items-center",u?"flex-col gap-2":"flex-row gap-3",(o==="left"||o==="top")&&(u?"flex-col-reverse":"flex-row-reverse"),e),...l,children:[d,m]})});Am.displayName="Spinner";var _i=["January","February","March","April","May","June","July","August","September","October","November","December"];function Q0({currentMonth:e,onMonthChange:t,startYear:r,endYear:a}){let[n,o]=$__namespace.useState(false),[s,l]=$__namespace.useState(false),c=$__namespace.useRef(null),d=$__namespace.useRef(null),m=dateFns.getMonth(e),u=dateFns.getYear(e);$__namespace.useEffect(()=>{function x(g){c.current&&!c.current.contains(g.target)&&o(false),d.current&&!d.current.contains(g.target)&&l(false);}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);let f=x=>{let g=dateFns.setMonth(e,x);t(g),o(false);},p=x=>{let g=dateFns.setYear(e,x);t(g),l(false);},b=$__namespace.useMemo(()=>{let x=[];for(let g=a;g>=r;g--)x.push(g);return x},[r,a]);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{ref:c,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>{o(!n),l(false);},className:i("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",n&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsxRuntime.jsx("span",{children:_i[m]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsxRuntime.jsx(je,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:_i.map((x,g)=>jsxRuntime.jsx("button",{type:"button",onClick:()=>f(g),className:i("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",m===g&&"bg-primary/10 text-primary font-medium"),children:x},x))})})})]}),jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>{l(!s),o(false);},className:i("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsxRuntime.jsx("span",{children:u}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsxRuntime.jsx(je,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:b.map(x=>jsxRuntime.jsx("button",{type:"button",onClick:()=>p(x),className:i("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===x&&"bg-primary/10 text-primary font-medium"),children:x},x))})})})]})]})}function ew(e,t,r){return function({calendarMonth:n}){let{goToMonth:o,nextMonth:s,previousMonth:l}=reactDayPicker.useDayPicker();if(e)return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsx(Q0,{currentMonth:n.date,onMonthChange:o,startYear:t,endYear:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!l,onClick:()=>l&&o(l),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&o(s),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]});let c=_i[n.date.getMonth()],d=n.date.getFullYear();return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium w-[90px]",children:c}),jsxRuntime.jsx("span",{className:"text-sm font-medium w-[50px]",children:d})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!l,onClick:()=>l&&o(l),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&o(s),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}}function sn({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:a=false,startYear:n=1900,endYear:o=new Date().getFullYear()+50,components:s,...l}){let c=$__namespace.useMemo(()=>ew(a,n,o),[a,n,o]);return jsxRuntime.jsx(reactDayPicker.DayPicker,{showOutsideDays:r,className:i("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:i("relative h-10 w-10 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:i("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:i("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:bg-transparent [&.outside-day]:text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:c},...l})}sn.displayName="Calendar";var Fm=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center",e),...t});Fm.displayName="Pagination";var Km=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:i("flex flex-row items-center gap-1",e),...t}));Km.displayName="PaginationContent";var Gm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:i("",e),...t}));Gm.displayName="PaginationItem";var as=({className:e,isActive:t,size:r="icon",...a})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:i(fr({variant:t?"solid":"light",size:r}),e),...a});as.displayName="PaginationLink";var $m=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to previous page",size:"md",className:i("gap-1 pl-2.5",e),...t,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:"Previous"})]});$m.displayName="PaginationPrevious";var _m=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to next page",size:"md",className:i("gap-1 pr-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})]});_m.displayName="PaginationNext";var Wm=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Wm.displayName="PaginationEllipsis";var Ui=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command,{ref:r,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ui.displayName=cmdk.Command.displayName;var ow=({children:e,...t})=>jsxRuntime.jsx(ko,{...t,children:jsxRuntime.jsx(Lo,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(Ui,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),jm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:r,className:i("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));jm.displayName=cmdk.Command.Input.displayName;var Um=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.List,{ref:r,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Um.displayName=cmdk.Command.List.displayName;var Ym=$__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ym.displayName=cmdk.Command.Empty.displayName;var Xm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:r,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Xm.displayName=cmdk.Command.Group.displayName;var qm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:r,className:i("-mx-1 h-px bg-border",e),...t}));qm.displayName=cmdk.Command.Separator.displayName;var Zm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:r,className:i("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Zm.displayName=cmdk.Command.Item.displayName;var Jm=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Jm.displayName="CommandShortcut";var Qm=$__namespace.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:a,onBlur:n,style:o,...s},l)=>{let[c,d]=$__namespace.useState(false),[m,u]=$__namespace.useState(false);return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:c?"text":"password",className:i("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:l,disabled:r,style:{...o,borderColor:m?"var(--color-foreground)":void 0},onFocus:f=>{u(true),a?.(f);},onBlur:f=>{u(false),n?.(f);},...s}),t&&jsxRuntime.jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>d(!c),disabled:r,tabIndex:-1,"aria-label":c?"Hide password":"Show password",children:c?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4"})})]})});Qm.displayName="PasswordInput";var ep=$__namespace.forwardRef(({className:e,showButtons:t=true,step:r=1,min:a,max:n,value:o,defaultValue:s,onChange:l,disabled:c,...d},m)=>{let[u,f]=$__namespace.useState(s),[p,b]=$__namespace.useState(false),x=o!==void 0,g=x?o:u,v=T=>{T!==void 0&&(a!==void 0&&T<a&&(T=a),n!==void 0&&T>n&&(T=n)),x||f(T),l?.(T);},y=()=>{v((g??0)+r);},w=()=>{v((g??0)-r);},h=T=>{let L=T.target.value;if(L==="")v(void 0);else {let N=parseFloat(L);isNaN(N)||v(N);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),y()):T.key==="ArrowDown"&&(T.preventDefault(),w());},R=a===void 0||(g??0)>a,M=n===void 0||(g??0)<n;return t?jsxRuntime.jsxs("div",{className:i("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",c&&"opacity-50",e),children:[jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:c||!R,tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}),jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:m,value:g??"",onChange:h,onKeyDown:C,disabled:c,onFocus:()=>b(true),onBlur:()=>b(false),...d}),jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:y,disabled:c||!M,tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}):jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:i("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:m,value:g??"",onChange:h,onKeyDown:C,disabled:c,onFocus:()=>b(true),onBlur:()=>b(false),...d})});ep.displayName="NumberInput";var rp=$__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date",dateFormat:n="PPP",disabled:o=false,minDate:s,maxDate:l,className:c},d)=>{let[m,u]=$__namespace.useState(false),[f,p]=$__namespace.useState(t),b=e!==void 0,x=b?e:f,g=v=>{b||p(v),r?.(v),u(false);};return jsxRuntime.jsxs(at,{open:m,onOpenChange:u,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(J,{ref:d,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!x&&"text-muted-foreground",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),x?dateFns.format(x,n):a]})}),jsxRuntime.jsx(nt,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(sn,{mode:"single",selected:x,onSelect:g,disabled:v=>!!(s&&v<s||l&&v>l),initialFocus:true})})]})});rp.displayName="DatePicker";var sp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),ap=classVarianceAuthority.cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),ip=$__namespace.forwardRef(({className:e,items:t,max:r=5,size:a,showTooltips:n=false,...o},s)=>{let l=t.slice(0,r),c=t.length-r,d=(u,f)=>{let p=jsxRuntime.jsxs(Ma,{className:i(ap({size:a})),children:[u.src&&jsxRuntime.jsx(an,{src:u.src,alt:u.alt||""}),jsxRuntime.jsx(Ta,{className:"text-xs",children:u.fallback||u.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return n&&u.alt?jsxRuntime.jsxs(Wr,{children:[jsxRuntime.jsx(jr,{asChild:true,children:p}),jsxRuntime.jsx(Ur,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:u.alt})]},f):p},m=jsxRuntime.jsxs("div",{ref:s,className:i(sp({size:a,className:e})),...o,children:[l.map((u,f)=>d(u,f)),c>0&&jsxRuntime.jsx(Ma,{className:i(ap({size:a})),children:jsxRuntime.jsxs(Ta,{className:"bg-muted text-muted-foreground",children:["+",c]})})]});return n?jsxRuntime.jsx(_r,{delayDuration:300,children:m}):m});ip.displayName="AvatarGroup";var lp=classVarianceAuthority.cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),cp=$__namespace.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:a,max:n=5,size:o,icon:s="star",allowHalf:l=false,readOnly:c=false,disabled:d=false,filledColor:m,emptyColor:u,...f},p)=>{let[b,x]=$__namespace.useState(r),[g,v]=$__namespace.useState(null),y=t!==void 0,w=y?t:b,h=g!==null?g:w,C=E=>{c||d||(y||x(E),a?.(E));},R=(E,H=false)=>{let S=l&&H?E+.5:E+1;C(S);},M=(E,H)=>{if(c||d)return;let S=E.currentTarget.getBoundingClientRect(),D=l&&E.clientX<S.left+S.width/2;v(D?H+.5:H+1);},T=()=>{v(null);},L=s==="heart"?lucideReact.Heart:lucideReact.Star,N=E=>h>=E+1?"full":h>=E+.5?"half":"empty",P=m?{color:m,fill:m}:{},k=u?{color:u}:{};return jsxRuntime.jsx("div",{ref:p,className:i(lp({size:o,className:e}),d&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:n},(E,H)=>{let S=N(H);return jsxRuntime.jsxs("button",{type:"button",className:i("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!c&&!d&&"cursor-pointer hover:scale-110 transition-transform"),onClick:D=>{let I=D.currentTarget.getBoundingClientRect(),z=l&&D.clientX<I.left+I.width/2;R(H,z);},onMouseMove:D=>M(D,H),disabled:d||c,"aria-label":`Rate ${H+1} out of ${n}`,role:"radio","aria-checked":w===H+1,children:[jsxRuntime.jsx(L,{className:i("text-muted-foreground/30",S!=="empty"&&"absolute inset-0"),style:S==="empty"?k:void 0}),S!=="empty"&&jsxRuntime.jsx(L,{className:i("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",S==="half"&&"clip-path-half"),style:{...P,clipPath:S==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});cp.displayName="Rating";var mp=classVarianceAuthority.cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),yw=classVarianceAuthority.cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),pp=$__namespace.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,clickable:o,startContent:s,endContent:l,closable:c,onClose:d,disabled:m,avatar:u,children:f,onClick:p,...b},x)=>{let g=o||!!p,v=y=>{y.stopPropagation(),d?.();};return jsxRuntime.jsxs("div",{ref:x,role:g?"button":void 0,tabIndex:g&&!m?0:void 0,"aria-disabled":m,onClick:m?void 0:p,onKeyDown:g&&!m?y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p?.(y));}:void 0,className:i(mp({variant:t,color:r,size:a,radius:n,clickable:g}),m&&"opacity-50 cursor-not-allowed",e),...b,children:[u&&jsxRuntime.jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:u}),s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:f}),l&&jsxRuntime.jsx("span",{className:"shrink-0",children:l}),c&&jsxRuntime.jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:m,className:i(yw({size:a})),children:jsxRuntime.jsx(lucideReact.X,{})})]})});pp.displayName="Chip";var fp=$.createContext({direction:"horizontal"}),kw=({className:e,direction:t="horizontal",children:r,...a})=>jsxRuntime.jsx(fp.Provider,{value:{direction:t},children:jsxRuntime.jsx(reactResizablePanels.Group,{orientation:t,className:i("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a,children:r})}),Lw=reactResizablePanels.Panel,Ew=({withHandle:e,className:t,...r})=>{let{direction:a}=$.useContext(fp),n=a==="vertical";return jsxRuntime.jsx(reactResizablePanels.Separator,{className:i("relative flex shrink-0 items-center justify-center bg-border outline-none",n?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...r,children:e&&jsxRuntime.jsx("div",{className:i("z-10 flex items-center justify-center rounded-sm border bg-border",n?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})})})};var vp=classVarianceAuthority.cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),hp=$__namespace.forwardRef(({className:e,size:t,count:r=3,...a},n)=>jsxRuntime.jsx("span",{ref:n,role:"status","aria-label":"Loading",className:i(vp({size:t,className:e})),...a,children:Array.from({length:r}).map((o,s)=>jsxRuntime.jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));hp.displayName="Dots";var wp=classVarianceAuthority.cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),Hw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},xp={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},Cp=$__namespace.forwardRef(({className:e,size:t="md",color:r="default",value:a,max:n=100,showValue:o=false,formatValue:s=m=>`${Math.round(m)}%`,trackClassName:l,...c},d)=>{let m=Math.min(100,Math.max(0,a/n*100)),u=Hw[t],f=(u.size-u.strokeWidth)/2,p=2*Math.PI*f,b=p-m/100*p;return jsxRuntime.jsxs("div",{ref:d,className:i(wp({size:t,color:r}),e),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":n,...c,children:[jsxRuntime.jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",children:[jsxRuntime.jsx("circle",{className:i("stroke-muted",l),cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:xp[r]||xp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:b,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),o&&jsxRuntime.jsx("span",{className:i("absolute font-medium text-foreground",u.fontSize),children:s(m)})]})});Cp.displayName="CircularProgress";var Np=$__namespace.createContext(null),Aw=()=>{let e=$__namespace.useContext(Np);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Mp=classVarianceAuthority.cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),Tp=$__namespace.forwardRef(({className:e,containerClassName:t,maxLength:r,value:a,defaultValue:n="",onChange:o,onComplete:s,pattern:l,disabled:c=false,size:d,children:m,...u},f)=>{let[p,b]=$__namespace.useState(n),[x,g]=$__namespace.useState(0),[v,y]=$__namespace.useState(false),w=$__namespace.useRef(null),h=a!==void 0?a:p;$__namespace.useImperativeHandle(f,()=>w.current),$__namespace.useEffect(()=>{g(Math.min(h.length,r-1));},[h,r]),$__namespace.useEffect(()=>{h.length===r&&s&&s(h);},[h,r,s]);let C=P=>{let k=P.target.value;if(l&&k){let E=new RegExp(l.replace("^","").replace("$","").replace("+",""));k=k.split("").filter(H=>E.test(H)).join("");}k=k.slice(0,r),a===void 0&&b(k),o?.(k);},R=P=>{P.key==="ArrowLeft"?g(k=>Math.max(0,k-1)):P.key==="ArrowRight"&&g(k=>Math.min(h.length,r-1,k+1));},M=()=>{w.current?.focus();},T=()=>{y(true),g(Math.min(h.length,r-1));},L=()=>{y(false);},N={value:h,activeIndex:v?x:-1,maxLength:r,disabled:c};return jsxRuntime.jsx(Np.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:i(Mp({size:d}),t),onClick:M,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:h,onChange:C,onKeyDown:R,onFocus:T,onBlur:L,disabled:c,maxLength:r,className:i("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),m]})})});Tp.displayName="InputOTP";var Pp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center",e),...t}));Pp.displayName="InputOTPGroup";var kp=$__namespace.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:o,disabled:s}=Aw(),l=n[e]||"",c=o===e,d=c&&n.length===e;return jsxRuntime.jsxs("div",{ref:a,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:i("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[l,d&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});kp.displayName="InputOTPSlot";var Lp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("text-muted-foreground",e),...t,children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}));Lp.displayName="InputOTPSeparator";var Sp=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),Hp=$__namespace.forwardRef(({className:e,variant:t,size:r,value:a=[],onChange:n,placeholder:o="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:c=50,triggerKeys:d=["Enter",",","Tab"],allowDuplicates:m=false,disabled:u,readOnly:f,renderTag:p,...b},x)=>{let[g,v]=$__namespace.useState(""),y=$__namespace.useRef(null);$__namespace.useImperativeHandle(x,()=>y.current);let w=N=>{let P=N.trim();if(P.length<l||P.length>c||s&&a.length>=s||!m&&a.some(E=>E.text.toLowerCase()===P.toLowerCase()))return;let k={id:crypto.randomUUID(),text:P};n?.([...a,k]),v("");},h=N=>{u||f||n?.(a.filter(P=>P.id!==N));},C=N=>{if(d.includes(N.key)){if(N.key==="Tab"&&!g)return;N.preventDefault(),w(g);}N.key==="Backspace"&&!g&&a.length>0&&h(a[a.length-1].id);},R=N=>{let P=N.target.value;if(P.includes(",")){P.split(",").forEach(E=>{E.trim()&&w(E);});return}v(P);},M=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(E=>{w(E);});},T=()=>{y.current?.focus();},L=s?a.length>=s:false;return jsxRuntime.jsxs("div",{className:i("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",u&&"cursor-not-allowed opacity-50",e),onClick:T,children:[a.map(N=>p?p(N,()=>h(N.id)):jsxRuntime.jsxs("span",{className:i(Sp({variant:t,size:r})),children:[N.text,!u&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),h(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},N.id)),!L&&!f&&jsxRuntime.jsx("input",{ref:y,type:"text",value:g,onChange:R,onKeyDown:C,onPaste:M,placeholder:a.length===0?o:"",disabled:u,className:i("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...b})]})});Hp.displayName="TagInput";var Vp=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),Ap=$__namespace.forwardRef(({className:e,size:t,icon:r,title:a,description:n,action:o,children:s,...l},c)=>jsxRuntime.jsxs("div",{ref:c,className:i(Vp({size:t,className:e})),...l,children:[r&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),a&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:a}),n&&jsxRuntime.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),o&&jsxRuntime.jsx("div",{className:"mt-2",children:o}),s]}));Ap.displayName="EmptyState";var Bp=classVarianceAuthority.cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),Op=$__namespace.forwardRef(({className:e,variant:t,radius:r,label:a,value:n,icon:o,trend:s,trendValue:l,description:c,...d},m)=>{let u=s==="up"?lucideReact.TrendingUp:s==="down"?lucideReact.TrendingDown:lucideReact.Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:m,className:i(Bp({variant:t,radius:r,className:e})),...d,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:i("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:a}),o&&jsxRuntime.jsx("div",{className:i("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:o})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:n}),s&&l&&jsxRuntime.jsxs("span",{className:i("flex items-center gap-0.5 text-sm",f),children:[jsxRuntime.jsx(u,{className:"h-3 w-3"}),l]})]}),c&&jsxRuntime.jsx("p",{className:i("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:c})]})});Op.displayName="StatCard";var Zi=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),Uw=({checked:e,disabled:t,onClick:r})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:a=>{a.stopPropagation(),t||r(a);},className:i("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})});function Yw({className:e,variant:t,size:r,items:a,renderItem:n,draggable:o=false,onReorder:s,showHandle:l=true,dragIcon:c,selectable:d=false,multiple:m=false,selectedKeys:u,defaultSelectedKeys:f=[],onSelect:p,checkable:b=false,checkedKeys:x,defaultCheckedKeys:g=[],onCheck:v,children:y,...w},h){let[C,R]=$__namespace.useState(null),[M,T]=$__namespace.useState(null),[L,N]=$__namespace.useState(new Set(f)),P=u!==void 0,k=P?new Set(u):L,[E,H]=$__namespace.useState(new Set(g)),S=x!==void 0,D=S?new Set(x):E,I=(B,j)=>{R(j),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",String(j));},z=(B,j)=>{B.preventDefault(),!(C===null||C===j)&&T(j);},G=()=>{T(null);},V=(B,j)=>{if(B.preventDefault(),!a||C===null||C===j){R(null),T(null);return}let A=[...a],[U]=A.splice(C,1);A.splice(j,0,U),s?.(A),R(null),T(null);},F=()=>{R(null),T(null);},O=$__namespace.useCallback((B,j)=>{if(!a)return;let A=new Set(k),U=!A.has(B.id);m?U?A.add(B.id):A.delete(B.id):(A.clear(),U&&A.add(B.id)),P||N(A);let W=a.filter(he=>A.has(he.id));p?.(Array.from(A),{selected:U,selectedItems:W,item:B,event:j});},[a,k,m,P,p]),Q=$__namespace.useCallback((B,j)=>{if(!a)return;let A=new Set(D),U=!A.has(B.id);U?A.add(B.id):A.delete(B.id),S||H(A);let W=a.filter(he=>A.has(he.id));v?.(Array.from(A),{checked:U,checkedItems:W,item:B,event:j});},[a,D,S,v]);return (o||d||b)&&a&&n?jsxRuntime.jsx("div",{ref:h,role:"list",className:i(Zi({variant:t,size:r,className:e})),...w,children:a.map((B,j)=>{let A=k.has(B.id),U=D.has(B.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":d?A:void 0,draggable:o,onDragStart:o?me=>I(me,j):void 0,onDragOver:o?me=>z(me,j):void 0,onDragLeave:o?G:void 0,onDrop:o?me=>V(me,j):void 0,onDragEnd:o?F:void 0,onClick:d&&!b?me=>O(B,me):void 0,className:i("flex items-center gap-3 transition-all",o&&"cursor-move",d&&!b&&"cursor-pointer hover:bg-muted/50",b&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",M===j&&"border-primary border-dashed border rounded-md",A&&d&&!b&&"bg-primary/10"),children:[o&&l&&c!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:c??jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),b&&jsxRuntime.jsx(Uw,{checked:U,onClick:me=>Q(B,me)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n(B,j)})]},B.id)})}):jsxRuntime.jsx("div",{ref:h,role:"list",className:i(Zi({variant:t,size:r,className:e})),...w,children:y})}var Xw=$__namespace.forwardRef(Yw),Kp=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Gp=$__namespace.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:i(Kp({interactive:t,className:e})),...o,children:[r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:a})]}));Gp.displayName="ListItem";var $p=$__namespace.forwardRef(({className:e,primary:t,secondary:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("min-w-0",e),...n,children:[t&&jsxRuntime.jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),a]}));$p.displayName="ListItemText";var jp=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Up=$__namespace.forwardRef(({className:e,position:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,"data-position":t,className:i(jp({position:t,className:e})),...r}));Up.displayName="Timeline";var Yp=classVarianceAuthority.cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Xp=$__namespace.forwardRef(({className:e,variant:t,hideSeparator:r=false,hideConnector:a=false,dot:n,children:o,...s},l)=>jsxRuntime.jsxs("div",{ref:l,className:i(Yp({variant:t,className:e})),...s,children:[!r&&jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:n}),!a&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),o]}));Xp.displayName="TimelineItem";var qp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 pt-0.5",e),...t}));qp.displayName="TimelineContent";var Zp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Zp.displayName="TimelineOpposite";var Qp=classVarianceAuthority.cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),ef=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),tf=$__namespace.createContext({}),rf=$__namespace.forwardRef(({className:e,size:t="md",fullWidth:r,children:a,value:n,defaultValue:o,onValueChange:s,disabled:l,...c},d)=>{let[m,u]=$__namespace.useState(o),f=n!==void 0?n:m,p=$__namespace.useCallback(b=>{n===void 0&&u(b),s?.(b);},[n,s]);return jsxRuntime.jsx(tf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:l},children:jsxRuntime.jsx("div",{ref:d,role:"group",className:i(Qp({size:t,fullWidth:r,className:e})),...c,children:a})})});rf.displayName="SegmentedControl";var af=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,...n},o)=>{let s=$__namespace.useContext(tf),l=s.value===r,c=a||s.disabled;return jsxRuntime.jsx("button",{ref:o,type:"button",role:"radio","aria-checked":l,"data-state":l?"on":"off",disabled:c,onClick:()=>{c||s.onValueChange?.(r);},className:i(ef({size:s.size,selected:l}),"flex-1",e),...n,children:t})});af.displayName="SegmentedControlItem";var nf=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),of=e=>{let t=e.type;return t.startsWith("image/")?lucideReact.Image:t.startsWith("video/")?lucideReact.FileVideo:t.startsWith("audio/")?lucideReact.FileAudio:t.includes("pdf")||t.includes("document")?lucideReact.FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?lucideReact.FileArchive:lucideReact.File},cs=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+r[a]},sf=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${cs(t)}`}),r&&r.length>0&&(r.some(o=>{if(o.startsWith("."))return e.name.toLowerCase().endsWith(o.toLowerCase());if(o.endsWith("/*")){let s=o.slice(0,-2);return e.type.startsWith(s)}return e.type===o})||a.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),a},lf=$__namespace.forwardRef(({className:e,variant:t,size:r,onFilesChange:a,onFilesRejected:n,onFileRemove:o,files:s=[],showFileList:l=true,children:c,maxSize:d=10*1024*1024,accept:m,multiple:u=true,disabled:f,...p},b)=>{let[x,g]=$__namespace.useState(false),[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState([]),C=$__namespace.useRef(null),R=$__namespace.useCallback(D=>{if(!D||D.length===0)return;let I=Array.from(D),z=[],G=[];(u?I:[I[0]]).forEach(F=>{let O=sf(F,d,m);O.length>0?G.push({file:F,errors:O}):z.push(F);}),h(G),z.length>0&&a?.(z),G.length>0&&n?.(G);},[d,m,u,a,n]),M=$__namespace.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),!f&&(g(true),D.dataTransfer.items)){let z=Array.from(D.dataTransfer.items).some(G=>{if(G.kind!=="file")return true;if(m&&m.length>0){let V=G.type;return !m.some(F=>F.endsWith("/*")?V.startsWith(F.slice(0,-2)):V===F)}return false});y(z);}},[f,m]),T=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!f&&(D.dataTransfer.dropEffect="copy");},[f]),L=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation();let I=D.currentTarget.getBoundingClientRect(),z=D.clientX,G=D.clientY;(z<I.left||z>I.right||G<I.top||G>I.bottom)&&(g(false),y(false));},[]),N=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),g(false),y(false),!f&&R(D.dataTransfer.files);},[f,R]),P=$__namespace.useCallback(()=>{f||C.current?.click();},[f]),k=$__namespace.useCallback(D=>{R(D.target.files),D.target.value="";},[R]),E=$__namespace.useCallback(D=>{f||(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),C.current?.click());},[f]),H=v?"error":x?"active":t,S=m?.join(",");return jsxRuntime.jsxs("div",{ref:b,className:i("space-y-4",e),...p,children:[jsxRuntime.jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:M,onDragOver:T,onDragLeave:L,onDrop:N,onClick:P,onKeyDown:E,className:i(nf({variant:H,size:r}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsxRuntime.jsx("input",{ref:C,type:"file",accept:S,multiple:u,disabled:f,onChange:k,className:"sr-only",tabIndex:-1}),c||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsxRuntime.jsx("div",{className:"rounded-full bg-muted p-3",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:x?"Drop files here":"Drop files or click to upload"}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[d&&`Max ${cs(d)}`,m&&m.length>0&&` \u2022 ${m.join(", ")}`]})]})]})]}),w.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:w.map(({file:D,errors:I})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"font-medium",children:D.name}),":"," ",I.map(z=>z.message).join(", ")]},D.name))}),l&&s.length>0&&jsxRuntime.jsx("div",{className:"space-y-2",children:s.map(D=>{let I=of(D.file);return jsxRuntime.jsxs("div",{className:i("flex items-center gap-3 rounded-lg border p-3",D.error&&"border-danger bg-danger/5"),children:[jsxRuntime.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsxRuntime.jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"truncate text-sm font-medium",children:D.file.name}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[cs(D.file.size),D.error&&jsxRuntime.jsx("span",{className:"ml-2 text-danger",children:D.error})]}),D.progress!==void 0&&D.progress<100&&jsxRuntime.jsx(Jo,{value:D.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),o?.(D.file);},children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},D.id)})})]})});lf.displayName="FileUpload";var oC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,df=classVarianceAuthority.cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),Xn=$__namespace.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:a,size:n,shape:o,interactive:s,className:l,onClick:c,disabled:d,...m},u)=>jsxRuntime.jsx("button",{ref:u,type:"button",disabled:d,onClick:b=>{c?.(b),a?.(e);},className:i(df({size:n,shape:o,interactive:s??(!!a||!!c)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?oC:void 0,backgroundSize:r?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Xn.displayName="ColorSwatch";var uf=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),mf=$__namespace.forwardRef(({value:e,defaultValue:t,onChange:r,layout:a,columns:n=6,colors:o,swatchSize:s="md",swatchShape:l="square",disabled:c,className:d,style:m,...u},f)=>{let[p,b]=$__namespace.useState(t),x=e??p,g=$__namespace.useCallback(y=>{c||(e===void 0&&b(y),r?.(y));},[e,r,c]),v=y=>y.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:i(uf({layout:a}),d),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...m},...u,children:o.map(y=>{let w=x?v(x)===v(y):false;return jsxRuntime.jsx(Xn,{role:"option",color:y,size:s,shape:l,isSelected:w,onSelect:g,disabled:c,"aria-selected":w},y)})})});mf.displayName="ColorSwatchPicker";var lC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],pf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},ff=$__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=lC,showInput:o=true,size:s="md",className:l,variant:c="full"},d)=>{let[m,u]=$__namespace.useState(e??t),f=$__namespace.useId();$__namespace.useEffect(()=>{e!==void 0&&u(e);},[e]);let p=g=>{u(g),r?.(g);},b=g=>{u(g),r?.(g);},x=g=>{let v=g.target.value.toUpperCase();u(v),r?.(v);};return c==="simple"?jsxRuntime.jsxs("label",{className:i("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",a&&"opacity-50 cursor-not-allowed",pf[s],l),children:[jsxRuntime.jsx("input",{type:"color",value:m,onChange:x,disabled:a,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:m}})]}):jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsx("button",{ref:d,disabled:a,className:i("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",pf[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsxRuntime.jsx(nt,{className:"w-auto p-3",align:"start",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:m,onChange:p,className:"!w-[200px]"}),o&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Na,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:m}}),jsxRuntime.jsx(reactColorful.HexColorInput,{id:"color-input",color:m,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Na,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(g=>jsxRuntime.jsx(Xn,{color:g,size:"sm",isSelected:m.toLowerCase()===g.toLowerCase(),onSelect:b},g))})]})]})})]})});ff.displayName="ColorPicker";var gf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),el=e=>String(e).padStart(2,"0"),pC=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},fC=(e,t)=>`${el(e)}:${el(t)}`,bf=$__namespace.forwardRef(({className:e,size:t,value:r,onChange:a,use24Hour:n=true,minuteStep:o=1,showPicker:s=true,minTime:l,maxTime:c,disabled:d,...m},u)=>{let[f,p]=$__namespace.useState(r??""),[b,x]=$__namespace.useState(false);$__namespace.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:g,minutes:v}=pC(f||"00:00"),y=L=>{let N=L.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},w=(L,N)=>{let P=Math.max(0,Math.min(23,L)),k=Math.max(0,Math.min(59,N)),E=fC(P,k);p(E),a?.(E);},h=()=>w(g+1,v),C=()=>w(g-1,v),R=()=>w(g,v+o),M=()=>w(g,v-o),T=({value:L,onIncrement:N,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,disabled:d,children:jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:el(L)}),jsxRuntime.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:d,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})})]});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[jsxRuntime.jsx("input",{ref:u,type:"time",value:f,onChange:y,disabled:d,className:i(gf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...m}),s&&jsxRuntime.jsxs(at,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(J,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:d,children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxRuntime.jsxs(nt,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:g,onIncrement:h,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:v,onIncrement:R,onDecrement:M,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(J,{variant:"bordered",size:"sm",onClick:()=>{let L=new Date;w(L.getHours(),L.getMinutes());},children:"Now"}),jsxRuntime.jsx(J,{size:"sm",onClick:()=>x(false),children:"Done"})]})]})]})]})});bf.displayName="TimeInput";var vf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(o=>o.type==="currency")?.value??e}catch{return e}},tl=(e,t,r,a)=>{let n=e.toFixed(t),[o,s]=n.split("."),l=o.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},hf=(e,t,r)=>{if(!e)return;let a=e.replace(new RegExp(`\\${t}`,"g"),"");a=a.replace(r,"."),a=a.replace(/[^0-9.-]/g,"");let n=parseFloat(a);return isNaN(n)?void 0:n},xf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,currency:o="USD",locale:s="en-US",decimals:l=2,min:c,max:d,showCurrency:m=true,currencyPosition:u="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:b=".",disabled:x,placeholder:g,...v},y)=>{let[w,h]=$__namespace.useState(a),[C,R]=$__namespace.useState(""),[M,T]=$__namespace.useState(false),L=r!==void 0?r:w,N=f??bC(o,s);$__namespace.useEffect(()=>{!M&&L!==void 0&&R(tl(L,l,p,b));},[L,l,p,b,M]);let P=D=>{let I=D.target.value;if(!I){R(""),r===void 0&&h(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${b}.-]*$`).test(I))return;R(I);let G=hf(I,p,b);if(G!==void 0){let V=G;c!==void 0&&G<c&&(V=c),d!==void 0&&G>d&&(V=d),r===void 0&&h(V),n?.(V);}},k=()=>{T(true),L!==void 0&&R(L.toString().replace(".",b));},E=()=>{T(false),R(L!==void 0?tl(L,l,p,b):"");},H=m&&u==="prefix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),S=m&&u==="suffix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[H&&jsxRuntime.jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:k,onBlur:E,disabled:x,placeholder:g??`0${b}${"0".repeat(l)}`,className:i(vf({size:t}),H&&"pl-8",S&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...v}),S&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:S})]})});xf.displayName="CurrencyInput";var yf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),rl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},xC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},aa=e=>["#","A","*"].includes(e),us=(e,t,r)=>{let a="",n=0;for(let o=0;o<t.length&&n<=e.length;o++){let s=t[o];if(aa(s)){if(n<e.length){let l=e[n];xC(l,s)?(a+=l,n++):(n++,o--);}}else (n<e.length||r)&&(a+=s);}return a},al=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];aa(n)&&(r+=e[a]);}return r},Rf=(e,t)=>e.split("").map(r=>aa(r)?t:r).join(""),yC=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)aa(t[l])&&a++;let o=0,s=0;for(let l=0;l<t.length&&s<a;l++)o++,aa(t[l])&&s++;for(;o<t.length&&!aa(t[o]);)o++;return Math.min(o,e.length)},wf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,mask:o,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:c=false,disabled:d,placeholder:m,...u},f)=>{let p=typeof o=="string"&&o in rl?rl[o].mask:o,[b,x]=$__namespace.useState(a),[g,v]=$__namespace.useState(""),[y,w]=$__namespace.useState(false),h=$__namespace.useRef(null),C=r!==void 0?r:b;$__namespace.useImperativeHandle(f,()=>h.current),$__namespace.useEffect(()=>{let L=us(C,p,true);v(L);},[C,p]);let R=L=>{let N=L.target.value,P=L.target.selectionStart??0,k=N.replace(/[^\w]/g,""),E=us(k,p,true),H=al(E,p);v(E),r===void 0&&x(c?E:H),n?.(H,E),requestAnimationFrame(()=>{if(h.current){let S=yC(E,p,P);h.current.setSelectionRange(S,S);}});},M=L=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(L.key)||L.ctrlKey||L.metaKey)return;let N=h.current;if(!N)return;let P=N.selectionStart??0;if(L.key==="Backspace"&&P>0){let k=P-1;for(;k>0&&!aa(p[k]);)k--;let E=al(g,p),H=0;for(let I=0;I<k&&I<p.length;I++)aa(p[I])&&H++;let S=E.slice(0,Math.max(0,H-1))+E.slice(H),D=us(S,p,true);v(D),r===void 0&&x(c?D:S),n?.(S,D),L.preventDefault(),requestAnimationFrame(()=>{h.current&&h.current.setSelectionRange(k,k);});}},T=l?Rf(p,s):m;return jsxRuntime.jsx("input",{ref:h,type:"text",value:g,onChange:R,onKeyDown:M,onFocus:()=>w(true),onBlur:()=>w(false),disabled:d,placeholder:T,className:i(yf({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...u})});wf.displayName="MaskedInput";var Cf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},ol={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},nl=(e,t)=>String(e).padStart(t,"0"),ps=(e,t)=>{let r=nl(e.getDate(),2),a=nl(e.getMonth()+1,2),n=nl(e.getFullYear(),4),o=fs[t],s=ol[t],l={day:r,month:a,year:n};return s.map(c=>l[c]).join(o)},Nf=(e,t)=>{let r=fs[t],a=e.split(r);if(a.length!==3)return null;let n=ol[t],o={};if(n.forEach((l,c)=>{o[l]=parseInt(a[c],10);}),isNaN(o.day)||isNaN(o.month)||isNaN(o.year)||o.month<1||o.month>12||o.day<1||o.day>31||o.year<1e3||o.year>9999)return null;let s=new Date(o.year,o.month-1,o.day);return s.getFullYear()!==o.year||s.getMonth()!==o.month-1||s.getDate()!==o.day?null:s},NC=e=>e.toLowerCase(),MC=e=>{let t=fs[e];return ol[e].map(a=>a==="year"?"####":"##").join(t)},Mf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,format:o="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:c=true,disabled:d,placeholder:m,...u},f)=>{let[p,b]=$__namespace.useState(a??null),[x,g]=$__namespace.useState(""),[v,y]=$__namespace.useState(null),w=$__namespace.useRef(null),h=r!==void 0?r:p;$__namespace.useImperativeHandle(f,()=>w.current),$__namespace.useEffect(()=>{h?(g(ps(h,o)),y(null)):g("");},[h,o]);let C=fs[o],R=MC(o),M=N=>{let P=N.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let k=P.replace(new RegExp(`\\${C}`,"g"),""),E="",H=0;for(let S=0;S<R.length&&H<k.length;S++)R[S]==="#"?(E+=k[H],H++):E+=R[S];if(g(E),E.length===R.length){let S=Nf(E,o);if(S){if(s&&S<s){y(`Date must be after ${ps(s,o)}`);return}if(l&&S>l){y(`Date must be before ${ps(l,o)}`);return}y(null),r===void 0&&b(S),n?.(S);}else y("Invalid date");}else r===void 0&&b(null),n?.(null),y(null);},T=()=>{x&&x.length!==R.length&&(g(""),y(null),r===void 0&&b(null),n?.(null));},L=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"numeric",value:x,onChange:M,onBlur:T,disabled:d,placeholder:m??NC(o),className:i(Cf({size:t}),c&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"date-error":void 0,...u}),c&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsxRuntime.jsx(lucideReact.Calendar,{className:i(L,"text-muted-foreground")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});Mf.displayName="DateInput";var Pf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),kf=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],gs=(e,t)=>{let r=e.replace(/\D/g,""),a="",n=0;for(let o=0;o<t.length&&n<r.length;o++)t[o]==="#"?(a+=r[n],n++):a+=t[o];return a},EC=e=>e.replace(/#/g,"_"),Lf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:o,defaultCountry:s="TR",onCountryChange:l,countries:c=kf,showCountrySelect:d=true,showDialCode:m=false,disabled:u,placeholder:f,...p},b)=>{let[x,g]=$__namespace.useState(a),[v,y]=$__namespace.useState(o??s),[w,h]=$__namespace.useState(false),[C,R]=$__namespace.useState(false),[M,T]=$__namespace.useState(false),[L,N]=$__namespace.useState({top:0,left:0,width:0}),P=$__namespace.useRef(null),k=$__namespace.useRef(null),E=r!==void 0?r:x,H=o??v,S=c.find(V=>V.code===H)??c[0],D=gs(E,S.format);$__namespace.useEffect(()=>{T(true);},[]),$__namespace.useEffect(()=>{if(C&&P.current){let V=P.current.getBoundingClientRect();N({top:V.bottom+4,left:V.left,width:Math.max(V.width,280)});}},[C]),$__namespace.useEffect(()=>{if(!C)return;let V=F=>{P.current&&!P.current.contains(F.target)&&k.current&&!k.current.contains(F.target)&&R(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),$__namespace.useEffect(()=>{if(!C)return;let V=F=>{F.key==="Escape"&&R(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let O=V.target.value.replace(/\D/g,"");r===void 0&&g(O);let Q=gs(O,S.format),re=`${S.dialCode} ${Q}`;n?.(O,re,S);},z=V=>{let F=c.find(re=>re.code===V);if(!F)return;o===void 0&&y(V),l?.(F);let O=gs(E,F.format),Q=`${F.dialCode} ${O}`;n?.(E,Q,F),R(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:u,onClick:()=>R(!C),className:i("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("span",{children:S.flag}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:S.dialCode})]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),M&&C&&Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:k,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:L.top,left:L.left,minWidth:L.width},children:jsxRuntime.jsx(je,{style:{maxHeight:300},children:jsxRuntime.jsx("div",{className:"p-1",children:c.map(V=>jsxRuntime.jsxs("div",{role:"option","aria-selected":V.code===H,onClick:()=>z(V.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:V.code===H&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:V.flag}),jsxRuntime.jsx("span",{className:"flex-1",children:V.name}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:V.dialCode})]})]},V.code))})})}),document.body)]}),jsxRuntime.jsxs("div",{className:"relative flex-1",children:[m&&!d&&jsxRuntime.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:S.dialCode}),jsxRuntime.jsx("input",{ref:b,type:"tel",inputMode:"tel",value:D,onChange:I,onFocus:()=>h(true),onBlur:()=>h(false),disabled:u,placeholder:f??EC(S.format),className:i(Pf({size:t}),d&&"rounded-l-none",m&&!d&&"pl-12",e),style:{borderColor:w?"var(--color-foreground)":void 0},...p})]})]})});Lf.displayName="PhoneInput";var Df=classVarianceAuthority.cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),Sf=$__namespace.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:o,mobileBreakpoint:s="md",...l},c)=>{let[d,m]=$__namespace.useState(false),u={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxRuntime.jsxs("nav",{ref:c,className:i(Df({variant:t,size:r,sticky:a,className:e})),...l,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:n}),jsxRuntime.jsx("div",{className:i("items-center gap-4 flex-1 justify-end",u),children:o}),jsxRuntime.jsx("button",{type:"button",className:i("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>m(!d),"aria-label":d?"Close menu":"Open menu","aria-expanded":d,children:d?jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"})})]}),d&&jsxRuntime.jsx("div",{className:i("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:o})]})});Sf.displayName="Navbar";var Hf=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center gap-2 font-semibold text-lg",e),...t}));Hf.displayName="NavbarBrand";var If=$__namespace.forwardRef(({className:e,justify:t="start",...r},a)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsxRuntime.jsx("div",{ref:a,className:i("flex items-center gap-4",n,e),...r})});If.displayName="NavbarContent";var Vf=$__namespace.forwardRef(({className:e,isActive:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("flex items-center",t&&"text-primary font-medium",e),...r}));Vf.displayName="NavbarItem";var Af=$__namespace.forwardRef(({className:e,isActive:t,...r},a)=>jsxRuntime.jsx("a",{ref:a,className:i("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));Af.displayName="NavbarLink";var Bf=classVarianceAuthority.cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),Of=$__namespace.forwardRef(({className:e,variant:t,size:r,underline:a,isExternal:n,showExternalIcon:o=true,isDisabled:s,children:l,...c},d)=>{let m=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxRuntime.jsxs("a",{ref:d,className:i(Bf({variant:t,size:r,underline:a,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...m,...c,children:[l,n&&o&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Of.displayName="Link";var Ff=classVarianceAuthority.cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),Kf=$__namespace.forwardRef(({className:e,position:t,threshold:r=400,icon:a,behavior:n="smooth",variant:o="solid",color:s="default",size:l="md",radius:c="full",target:d,onVisibilityChange:m,onClick:u,...f},p)=>{let[b,x]=$__namespace.useState(false);$__namespace.useEffect(()=>{let y=d?.current||window,w=()=>{let C=(d?.current?d.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==b&&(x(C),m?.(C));};return y.addEventListener("scroll",w,{passive:true}),w(),()=>{y.removeEventListener("scroll",w);}},[r,d,b,m]);let g=y=>{d?.current?d.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),u?.(y);},v=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:i(Ff({position:t}),b?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(J,{ref:p,type:"button",variant:o,color:s,size:"icon",radius:c,onClick:g,"aria-label":"Back to top",className:i("shadow-lg",l==="sm"&&"h-9 w-9",l==="md"&&"h-10 w-10",l==="lg"&&"h-12 w-12"),...f,children:a||jsxRuntime.jsx(lucideReact.ArrowUp,{className:v})})})});Kf.displayName="BackTop";var _C=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),WC=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Gf=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),hs=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),$f=$__namespace.createContext(null),oa=()=>{let e=$__namespace.useContext($f);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},_f=$__namespace.createContext(null),Zn=()=>{let e=$__namespace.useContext(_f);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},il=$__namespace.createContext(null),Wf=$__namespace.createContext(null),jf=$__namespace.forwardRef(({className:e,children:t,radius:r="sm",...a},n)=>{let[o,s]=$__namespace.useState(null);return jsxRuntime.jsx($f.Provider,{value:{activeMenu:o,setActiveMenu:s,radius:r},children:jsxRuntime.jsx("div",{ref:n,role:"menubar",className:i("flex h-10 items-center space-x-1 border bg-background p-1",_C({radius:r}),e),...a,children:t})})});jf.displayName="Menubar";var Uf=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=oa(),a=$__namespace.useId(),n=$__namespace.useRef(null),o=t===a,s=$__namespace.useCallback(l=>{r(l?a:null);},[a,r]);return jsxRuntime.jsx(_f.Provider,{value:{menuId:a,triggerRef:n,open:o,onOpenChange:s},children:e})};Uf.displayName="MenubarMenu";var Yf=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));Yf.displayName="MenubarGroup";var Xf=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Xf.displayName="MenubarPortal";var qf=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx(il.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};qf.displayName="MenubarSub";var Zf=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(Wf.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Zf.displayName="MenubarRadioGroup";var Jf=$__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:r,...a},n)=>{let{activeMenu:o,setActiveMenu:s,radius:l}=oa(),{menuId:c,triggerRef:d,open:m,onOpenChange:u}=Zn(),f=b=>{t?.(b),u(!m);},p=b=>{r?.(b),o&&o!==c&&(s(c),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsxRuntime.jsx("button",{ref:b=>{d.current=b,typeof n=="function"?n(b):n&&(n.current=b);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":m,"data-state":m?"open":"closed",className:i("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",WC({radius:l}),e),onClick:f,onMouseEnter:p,...a})});Jf.displayName="MenubarTrigger";var Qf=$__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let{radius:l}=oa(),c=$__namespace.useContext(il);if(!c)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:d,onOpenChange:m,triggerRef:u}=c,f=b=>{a?.(b),m(true);},p=b=>{n?.(b),m(false);};return jsxRuntime.jsxs("div",{ref:b=>{u.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:i("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",hs({radius:l}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Qf.displayName="MenubarSubTrigger";var eg=$__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let{radius:s}=oa(),l=$__namespace.useContext(il);if(!l)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,[u,f]=$__namespace.useState({top:0,left:0}),[p,b]=$__namespace.useState(false),x=$__namespace.useRef(null);$__namespace.useEffect(()=>{b(true);},[]),$__namespace.useEffect(()=>{if(!c||!m.current||!x.current)return;(()=>{if(!m.current||!x.current)return;let w=m.current.getBoundingClientRect(),h=x.current.getBoundingClientRect(),C=w.top,R=w.right+t;R+h.width>window.innerWidth&&(R=w.left-h.width-t),f({top:C,left:R});})();},[c,t,m]);let g=y=>{r?.(y),d(true);},v=y=>{a?.(y),d(false);};return !p||!c?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:y=>{x.current=y,typeof o=="function"?o(y):o&&(o.current=y);},role:"menu","data-state":c?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",Gf({radius:s}),e),style:{top:u.top,left:u.left},onMouseEnter:g,onMouseLeave:v,...n}),document.body)});eg.displayName="MenubarSubContent";var tg=$__namespace.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,children:n,...o},s)=>{let{radius:l}=oa(),{triggerRef:c,open:d,onOpenChange:m}=Zn(),[u,f]=$__namespace.useState({top:0,left:0}),[p,b]=$__namespace.useState(false),x=$__namespace.useRef(null);return $__namespace.useEffect(()=>{b(true);},[]),$__namespace.useEffect(()=>{if(!d||!c.current||!x.current)return;let g=()=>{if(!c.current||!x.current)return;let v=c.current.getBoundingClientRect(),y=x.current.getBoundingClientRect(),w=v.bottom+a,h=v.left+r;t==="center"?h=v.left+v.width/2-y.width/2:t==="end"&&(h=v.right-y.width-r),f({top:w,left:h});};return g(),window.addEventListener("resize",g),window.addEventListener("scroll",g,true),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,true);}},[d,t,r,a,c]),$__namespace.useEffect(()=>{if(!d)return;let g=v=>{let y=v.target;x.current&&!x.current.contains(y)&&c.current&&!c.current.contains(y)&&m(false);};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[d,m,c]),$__namespace.useEffect(()=>{if(!d)return;let g=v=>{v.key==="Escape"&&m(false);};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[d,m]),!p||!d?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:g=>{x.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menu","data-state":d?"open":"closed",className:i("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",Gf({radius:l}),e),style:{top:u.top,left:u.left},...o,children:n}),document.body)});tg.displayName="MenubarContent";var rg=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{radius:l}=oa(),{onOpenChange:c}=Zn(),d=m=>{if(r){m.preventDefault();return}n?.(m),a?.(),c(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:i("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:l}),t&&"pl-8",!r&&"cursor-pointer",e),onClick:d,...o})});rg.displayName="MenubarItem";var ag=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{radius:c}=oa(),{onOpenChange:d}=Zn(),m=u=>{if(n){u.preventDefault();return}o?.(u),a?.(!r),d(false);};return jsxRuntime.jsxs("div",{ref:l,role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:c}),!n&&"cursor-pointer",e),onClick:m,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});ag.displayName="MenubarCheckboxItem";var ng=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{radius:l}=oa(),{onOpenChange:c}=Zn(),d=$__namespace.useContext(Wf),m=d?.value===r,u=f=>{if(a){f.preventDefault();return}n?.(f),d?.onValueChange(r),c(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":m,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-state":m?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:l}),!a&&"cursor-pointer",e),onClick:u,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});ng.displayName="MenubarRadioItem";var og=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));og.displayName="MenubarLabel";var sg=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-muted",e),...t}));sg.displayName="MenubarSeparator";var ig=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ig.displayName="MenubarShortcut";var lg=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),cg=$__namespace.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...o},s)=>{let l=$__namespace.Children.toArray(n);return jsxRuntime.jsx("div",{ref:s,className:i(lg({orientation:t,size:r,className:e})),...o,children:l.map((c,d)=>$__namespace.isValidElement(c)?$__namespace.cloneElement(c,{...c.props,stepNumber:d+1,status:c.props.status||(d<a?"completed":d===a?"current":"upcoming"),isLast:d===l.length-1,orientation:t,size:r}):c)})});cg.displayName="Steps";var dg=classVarianceAuthority.cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),UC=classVarianceAuthority.cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),YC=classVarianceAuthority.cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),ug=$__namespace.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:a,description:n,icon:o,status:s="upcoming",stepNumber:l,isLast:c,...d},m)=>jsxRuntime.jsxs("div",{ref:m,className:i(dg({orientation:t,size:r,className:e}),!c&&t==="horizontal"&&"flex-1"),...d,children:[jsxRuntime.jsx("div",{className:i("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:i(UC({status:s,size:r})),children:s==="completed"?jsxRuntime.jsx(lucideReact.Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):o||l}),(a||n)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[a&&jsxRuntime.jsx("span",{className:i("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:a}),n&&jsxRuntime.jsx("span",{className:i("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:n})]})]})}),!c&&jsxRuntime.jsx("div",{className:i(YC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));ug.displayName="Step";var pg=classVarianceAuthority.cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),fg=classVarianceAuthority.cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),gg=$__namespace.createContext(null),rN=()=>{let e=$__namespace.useContext(gg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},aN=({checked:e,indeterminate:t,disabled:r,onClick:a})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:r,onClick:n=>{n.stopPropagation(),r||a(n);},className:i("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",r&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:t?jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3"}):jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})}),bg=({node:e,level:t,isLast:r=false,parentIsLastPath:a=[]})=>{let{expandedKeys:n,toggleExpand:o,selectedKeys:s,handleSelect:l,selectable:c,checkedKeys:d,halfCheckedKeys:m,handleCheck:u,checkable:f,draggable:p,draggedNode:b,setDraggedNode:x,dragOverKey:g,dragOverPosition:v,setDragOver:y,handleDrop:w,allowDrop:h,onDragStart:C,onDragOver:R,onDragEnter:M,onDragLeave:T,onDragEnd:L,showLine:N,showIcon:P,showHandle:k,dragIcon:E,icon:H,leafIcon:S,folderIcon:D,folderOpenIcon:I,blockNode:z,disabled:G,size:V,getAllKeys:F}=rN(),O=e.children&&e.children.length>0,Q=e.isLeaf??!O,re=n.has(e.key),K=s.has(e.key),B=d.has(e.key),j=m.has(e.key),A=b?.key===e.key,U=g===e.key,W=!!(G||e.disabled),he=c&&e.selectable!==false,me=f&&e.checkable!==false,Br=$__namespace.useMemo(()=>W?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,W]),ne=$__namespace.useMemo(()=>E!==void 0?E:typeof p=="object"&&p.icon!==void 0?p.icon:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"}),[E,p]),rt=$__namespace.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:re,isLeaf:Q}):H:Q?S:re?I:D,[e.icon,H,re,Q,S,D,I]),Or=Y=>{if(!Br)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ie=Se.cloneNode(true),Ke=document.documentElement.classList.contains("dark"),Ge=Ke?"#0a0a0a":"#ffffff",Kr=Ke?"#27272a":"#e4e4e7";ie.style.cssText=`
43
+ `;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:p}}),jsxRuntime.jsx("div",{ref:s,id:d,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),style:n,className:i("h-full w-full",t==="vertical"&&"overflow-y-auto overflow-x-hidden",t==="horizontal"&&"overflow-x-auto overflow-y-hidden",t==="both"&&"overflow-auto",e),...o,children:a})]})});je.displayName="ScrollArea";var dd=classVarianceAuthority.cva("flex min-h-10 w-full cursor-pointer items-center justify-between border border-zinc-300 dark:border-zinc-700 bg-background px-3 py-2 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),ud=$__namespace.forwardRef(({options:e,multiple:t=false,value:r,defaultValue:a,onValueChange:n,placeholder:o="Select...",searchable:s=false,searchPlaceholder:l="Search...",emptyText:c="No results found.",disabled:d=false,clearable:m=false,maxDisplayItems:u=3,maxDropdownHeight:f=240,radius:p,className:b,...x},g)=>{let[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState(""),[C,R]=$__namespace.useState(a||""),[M,T]=$__namespace.useState(a||[]),[L,N]=$__namespace.useState({top:0,left:0,width:0}),P=$__namespace.useRef(null),k=$__namespace.useRef(null),E=$__namespace.useRef(null),H=$__namespace.useRef(null),S=r!==void 0?r:C,D=r!==void 0?r:M,I=r!==void 0,z=A=>{m&&S===A?(I||R(""),n?.("")):(I||R(A),n?.(A)),y(false),h("");},G=A=>{let U=D.includes(A)?D.filter(W=>W!==A):[...D,A];I||T(U),n?.(U);},V=(A,U)=>{U.stopPropagation();let W=D.filter(he=>he!==A);I||T(W),n?.(W);},F=A=>{A.stopPropagation(),t?(I||T([]),n?.([])):(I||R(""),n?.(""));},O=e.find(A=>A.value===S),Q=e.filter(A=>D.includes(A.value)),re=Q.slice(0,u),K=Q.length-u,B=s?e.filter(A=>A.label.toLowerCase().includes(w.toLowerCase())):e;$__namespace.useEffect(()=>{if(v&&k.current){let A=k.current.getBoundingClientRect();N({top:A.bottom+4,left:A.left,width:A.width}),s&&setTimeout(()=>H.current?.focus(),0);}v||h("");},[v,s]),$__namespace.useEffect(()=>{let A=U=>{let W=U.target,he=P.current&&!P.current.contains(W),me=E.current&&!E.current.contains(W);he&&me&&(y(false),h(""));};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),$__namespace.useEffect(()=>{if(!v)return;let A=U=>{E.current?.contains(U.target)||(y(false),h(""));};return window.addEventListener("scroll",A,true),()=>window.removeEventListener("scroll",A,true)},[v]);let j=t?D.length>0:!!S;return jsxRuntime.jsxs("div",{ref:P,className:i("relative",b),...x,children:[jsxRuntime.jsxs("div",{ref:A=>{k.current=A,typeof g=="function"?g(A):g&&(g.current=A);},role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-disabled":d,onClick:()=>!d&&y(!v),className:i(dd({radius:p}),t&&"flex-wrap gap-1",d&&"cursor-not-allowed opacity-50"),children:[!t&&jsxRuntime.jsx("span",{className:i(!O&&"text-muted-foreground"),children:O?O.label:o}),t&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:Q.length===0?jsxRuntime.jsx("span",{className:"text-muted-foreground",children:o}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[re.map(A=>jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground",children:[A.label,jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:U=>V(A.value,U),onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&V(A.value,U);},className:"rounded-full hover:bg-secondary-foreground/20 cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},A.value)),K>0&&jsxRuntime.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",K," more"]})]})}),jsxRuntime.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[m&&j&&jsxRuntime.jsx("span",{role:"button",tabIndex:0,onClick:F,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&F(A);},className:"rounded-full p-0.5 hover:bg-muted cursor-pointer",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4 opacity-50"})}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 opacity-50 transition-transform",v&&"rotate-180")})]})]}),v&&!d&&typeof document<"u"&&Wo__namespace.createPortal(jsxRuntime.jsxs("div",{ref:E,className:"fixed z-[9999] overflow-hidden rounded-md border border-zinc-300 dark:border-zinc-700 bg-background shadow-md",style:{top:L.top,left:L.left,minWidth:L.width},children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center border-b border-zinc-300 dark:border-zinc-700 px-3",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-4 w-4 opacity-50 mr-2"}),jsxRuntime.jsx("input",{ref:H,type:"text",value:w,onChange:A=>h(A.target.value),placeholder:l,className:"flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground"})]}),jsxRuntime.jsx(je,{style:{maxHeight:f},onWheel:A=>A.stopPropagation(),children:jsxRuntime.jsx("div",{className:"p-1",children:B.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c}):B.map(A=>{let U=t?D.includes(A.value):S===A.value;return jsxRuntime.jsxs("div",{role:"option","aria-selected":U,onClick:()=>{A.disabled||(t?G(A.value):z(A.value));},className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800",A.disabled&&"pointer-events-none opacity-50"),children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:U&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),A.label]},A.value)})})})]}),document.body)]})});ud.displayName="Select";var md=$__namespace.createContext(null),Pa=()=>{let e=$__namespace.useContext(md);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e},ki=$__namespace.createContext(null),pd=$__namespace.createContext(null),Yr=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),[s,l]=$__namespace.useState(-1),c=t!==void 0,d=c?t:n,m=$__namespace.useRef(null),u=$__namespace.useRef(null),f=$__namespace.useId(),p=$__namespace.useRef(new Map),b=$__namespace.useCallback(v=>{c||o(v),a?.(v),v||l(-1);},[c,a]),x=$__namespace.useCallback((v,y)=>{p.current.set(v,y);},[]),g=$__namespace.useCallback(v=>{p.current.delete(v);},[]);return jsxRuntime.jsx(md.Provider,{value:{open:d,onOpenChange:b,triggerRef:m,contentRef:u,contentId:f,activeIndex:s,setActiveIndex:l,items:p,registerItem:x,unregisterItem:g},children:e})};Yr.displayName="Dropdown";var Xr=$__namespace.forwardRef(({asChild:e,children:t,onClick:r,onKeyDown:a,...n},o)=>{let{open:s,onOpenChange:l,triggerRef:c,contentId:d}=Pa(),m=f=>{r?.(f),l(!s);},u=f=>{a?.(f),(f.key==="ArrowDown"||f.key==="ArrowUp")&&(f.preventDefault(),l(true));};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:f=>{c.current=f,typeof o=="function"?o(f):o&&(o.current=f);},onClick:f=>{t.props.onClick?.(f),l(!s);},onKeyDown:f=>{t.props.onKeyDown?.(f),(f.key==="ArrowDown"||f.key==="ArrowUp")&&(f.preventDefault(),l(true));},"aria-expanded":s,"aria-haspopup":"menu","aria-controls":s?d:void 0,...n}):jsxRuntime.jsx("button",{ref:f=>{c.current=f,typeof o=="function"?o(f):o&&(o.current=f);},type:"button","aria-expanded":s,"aria-haspopup":"menu","aria-controls":s?d:void 0,onClick:m,onKeyDown:u,...n,children:t})});Xr.displayName="DropdownTrigger";var qr=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="start",alignOffset:n=0,collisionPadding:o=8,onInteractOutside:s,onEscapeKeyDown:l,loop:c=true,children:d,...m},u)=>{let{open:f,onOpenChange:p,triggerRef:b,contentRef:x,contentId:g,activeIndex:v,setActiveIndex:y,items:w}=Pa(),[h,C]=$__namespace.useState({top:0,left:0}),[R,M]=$__namespace.useState(t),[T,L]=$__namespace.useState(false),N=$__namespace.useRef(0);if($__namespace.useEffect(()=>{L(true);},[]),$__namespace.useEffect(()=>{f&&(N.current=w.current.size);},[f,w]),$__namespace.useEffect(()=>{if(!f||!b.current||!x.current)return;let k=()=>{if(!b.current||!x.current)return;let E=b.current.getBoundingClientRect(),H=x.current.getBoundingClientRect(),S=window.innerWidth,D=window.innerHeight,I=0,z=0,G=t;switch(t){case "top":I=E.top-H.height-r,I<o&&(I=E.bottom+r,G="bottom");break;case "bottom":I=E.bottom+r,I+H.height>D-o&&(I=E.top-H.height-r,G="top");break;case "left":z=E.left-H.width-r,z<o&&(z=E.right+r,G="right");break;case "right":z=E.right+r,z+H.width>S-o&&(z=E.left-H.width-r,G="left");break}if(G==="top"||G==="bottom"){switch(a){case "start":z=E.left+n;break;case "center":z=E.left+E.width/2-H.width/2;break;case "end":z=E.right-H.width-n;break}z<o?z=o:z+H.width>S-o&&(z=S-H.width-o);}else {switch(a){case "start":I=E.top+n;break;case "center":I=E.top+E.height/2-H.height/2;break;case "end":I=E.bottom-H.height-n;break}I<o?I=o:I+H.height>D-o&&(I=D-H.height-o);}C({top:I,left:z}),M(G);};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[f,t,r,a,n,o,b]),$__namespace.useEffect(()=>{if(!f)return;let k=E=>{let H=E.target;x.current&&!x.current.contains(H)&&b.current&&!b.current.contains(H)&&(s?.(),p(false));};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[f,p,s,b,x]),$__namespace.useEffect(()=>{if(!f)return;let k=E=>{let H=Array.from(w.current.entries()).sort(([D],[I])=>D-I).map(([,D])=>D),S=H.length;if(S!==0)switch(E.key){case "Escape":E.preventDefault(),l?.(),p(false),b.current?.focus();break;case "ArrowDown":E.preventDefault(),v===-1||v>=S-1?y(c?0:Math.min(v+1,S-1)):y(v+1);break;case "ArrowUp":E.preventDefault(),v<=0?y(c?S-1:0):y(v-1);break;case "Home":E.preventDefault(),y(0);break;case "End":E.preventDefault(),y(S-1);break;case "Enter":case " ":E.preventDefault(),v>=0&&v<S&&H[v]?.click();break;case "Tab":p(false);break}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[f,p,l,v,y,w,c,b]),$__namespace.useEffect(()=>{f&&v>=0&&Array.from(w.current.entries()).sort(([E],[H])=>E-H).map(([,E])=>E)[v]?.focus();},[f,v,w]),!T||!f)return null;let P={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[R];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:k=>{x.current=k,typeof u=="function"?u(k):u&&(u.current=k);},id:g,role:"menu","aria-orientation":"vertical","data-state":f?"open":"closed","data-side":R,className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none",P,e),style:{top:h.top,left:h.left},...m,children:d}),document.body)});qr.displayName="DropdownContent";var Bo=0,Jt=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,onMouseEnter:o,...s},l)=>{let{onOpenChange:c,activeIndex:d,setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),[p]=$__namespace.useState(()=>Bo++),b=$__namespace.useRef(null);$__namespace.useEffect(()=>(!r&&b.current&&u(p,b.current),()=>{f(p);}),[r,p,u,f]);let x=y=>{if(r){y.preventDefault();return}n?.(y),a?.(),c(false);},g=y=>{o?.(y),r||m(p);};return jsxRuntime.jsx("div",{ref:y=>{b.current=y,typeof l=="function"?l(y):l&&(l.current=y);},role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,"data-highlighted":d===p?"":void 0,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!r&&"cursor-pointer",e),onClick:x,onMouseEnter:g,...s})});Jt.displayName="DropdownItem";var fd=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,onMouseEnter:s,...l},c)=>{let{onOpenChange:d,activeIndex:m,setActiveIndex:u,registerItem:f,unregisterItem:p}=Pa(),[b]=$__namespace.useState(()=>Bo++),x=$__namespace.useRef(null);$__namespace.useEffect(()=>(!n&&x.current&&f(b,x.current),()=>{p(b);}),[n,b,f,p]);let g=w=>{if(n){w.preventDefault();return}o?.(w),a?.(!r),d(false);},v=w=>{s?.(w),n||u(b);};return jsxRuntime.jsxs("div",{ref:w=>{x.current=w,typeof c=="function"?c(w):c&&(c.current=w);},role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-highlighted":m===b?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!n&&"cursor-pointer",e),onClick:g,onMouseEnter:v,...l,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});fd.displayName="DropdownCheckboxItem";var gd=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(pd.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));gd.displayName="DropdownRadioGroup";var bd=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,onMouseEnter:o,...s},l)=>{let{onOpenChange:c,activeIndex:d,setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),p=$__namespace.useContext(pd),b=p?.value===r,[x]=$__namespace.useState(()=>Bo++),g=$__namespace.useRef(null);$__namespace.useEffect(()=>(!a&&g.current&&u(x,g.current),()=>{f(x);}),[a,x,u,f]);let v=h=>{if(a){h.preventDefault();return}n?.(h),p?.onValueChange(r),c(false);},y=h=>{o?.(h),a||m(x);};return jsxRuntime.jsxs("div",{ref:h=>{g.current=h,typeof l=="function"?l(h):l&&(l.current=h);},role:"menuitemradio","aria-checked":b,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-highlighted":d===x?"":void 0,"data-state":b?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!a&&"cursor-pointer",e),onClick:v,onMouseEnter:y,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});bd.displayName="DropdownRadioItem";var vd=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));vd.displayName="DropdownLabel";var Oo=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-muted",e),...t}));Oo.displayName="DropdownSeparator";var hd=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...t});hd.displayName="DropdownShortcut";var xd=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));xd.displayName="DropdownGroup";var yd=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),{contentRef:s}=Pa(),l=t!==void 0,c=l?t:n,d=$__namespace.useRef(null),m=$__namespace.useCallback(u=>{l||o(u),a?.(u);},[l,a]);return jsxRuntime.jsx(ki.Provider,{value:{open:c,onOpenChange:m,triggerRef:d,parentMenuRef:s},children:e})};yd.displayName="DropdownSub";var Rd=$__namespace.forwardRef(({className:e,inset:t,disabled:r,children:a,onMouseEnter:n,onMouseLeave:o,onKeyDown:s,...l},c)=>{let d=$__namespace.useContext(ki),{setActiveIndex:m,registerItem:u,unregisterItem:f}=Pa(),[p]=$__namespace.useState(()=>Bo++),b=$__namespace.useRef(null);if(!d)throw new Error("DropdownSubTrigger must be used within DropdownSub");let{open:x,onOpenChange:g,triggerRef:v}=d;$__namespace.useEffect(()=>(!r&&b.current&&u(p,b.current),()=>{f(p);}),[r,p,u,f]);let y=C=>{n?.(C),r||(m(p),g(true));},w=C=>{o?.(C);},h=C=>{s?.(C),(C.key==="ArrowRight"||C.key==="Enter"||C.key===" ")&&(C.preventDefault(),g(true));};return jsxRuntime.jsxs("div",{ref:C=>{b.current=C,v.current=C,typeof c=="function"?c(C):c&&(c.current=C);},role:"menuitem","aria-haspopup":"menu","aria-expanded":x,tabIndex:r?-1:0,"aria-disabled":r,"data-state":x?"open":"closed","data-disabled":r?"":void 0,className:i("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",!r&&"cursor-pointer",e),onMouseEnter:y,onMouseLeave:w,onKeyDown:h,...l,children:[a,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto"})]})});Rd.displayName="DropdownSubTrigger";var wd=$__namespace.forwardRef(({className:e,sideOffset:t=2,alignOffset:r=-4,collisionPadding:a=8,onMouseEnter:n,onMouseLeave:o,...s},l)=>{let c=$__namespace.useContext(ki);if(!c)throw new Error("DropdownSubContent must be used within DropdownSub");let{open:d,onOpenChange:m,triggerRef:u,parentMenuRef:f}=c,[p,b]=$__namespace.useState({top:0,left:0}),[x,g]=$__namespace.useState(false),v=$__namespace.useRef(null),y=$__namespace.useRef(null);$__namespace.useEffect(()=>{g(true);},[]),$__namespace.useEffect(()=>{if(!d||!u.current||!v.current)return;(()=>{if(!u.current||!v.current)return;let R=u.current.getBoundingClientRect(),M=v.current.getBoundingClientRect(),T=window.innerWidth,L=window.innerHeight,N=R.top+r,P=R.right+t;P+M.width>T-a&&(P=R.left-M.width-t),N+M.height>L-a&&(N=L-M.height-a),N<a&&(N=a),b({top:N,left:P});})();},[d,t,r,a,u]);let w=C=>{n?.(C),y.current&&(clearTimeout(y.current),y.current=null),m(true);},h=C=>{o?.(C);let R=C.relatedTarget;u.current?.contains(R)||f?.current?.contains(R)||(y.current=setTimeout(()=>{m(false);},100));};return $__namespace.useEffect(()=>()=>{y.current&&clearTimeout(y.current);},[]),!x||!d?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:C=>{v.current=C,typeof l=="function"?l(C):l&&(l.current=C);},role:"menu","data-state":d?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:p.top,left:p.left},onMouseEnter:w,onMouseLeave:h,...s}),document.body)});wd.displayName="DropdownSubContent";var Nd=$__namespace.createContext(null),Ei=()=>{let e=$__namespace.useContext(Nd);if(!e)throw new Error("Popover components must be used within a Popover");return e},at=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useId(),m=$__namespace.useCallback(u=>{s||o(u),a?.(u);},[s,a]);return jsxRuntime.jsx(Nd.Provider,{value:{open:l,onOpenChange:m,triggerRef:c,contentId:d},children:e})};at.displayName="Popover";var ht=$__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{open:o,onOpenChange:s,triggerRef:l,contentId:c}=Ei(),d=m=>{r?.(m),s(!o);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:m=>{l.current=m,typeof n=="function"?n(m):n&&(n.current=m);},onClick:m=>{t.props.onClick?.(m),s(!o);},"aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?c:void 0,...a}):jsxRuntime.jsx("button",{ref:m=>{l.current=m,typeof n=="function"?n(m):n&&(n.current=m);},type:"button","aria-expanded":o,"aria-haspopup":"dialog","aria-controls":o?c:void 0,onClick:d,...a,children:t})});ht.displayName="PopoverTrigger";var Fo=$__namespace.forwardRef(({asChild:e,children:t,...r},a)=>{let{triggerRef:n}=Ei();return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:o=>{n.current=o,typeof a=="function"?a(o):a&&(a.current=o);},...r}):jsxRuntime.jsx("div",{ref:o=>{n.current=o,typeof a=="function"?a(o):a&&(a.current=o);},...r,children:t})});Fo.displayName="PopoverAnchor";var nt=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="center",alignOffset:n=0,onInteractOutside:o,onEscapeKeyDown:s,onOpenAutoFocus:l,onCloseAutoFocus:c,children:d,...m},u)=>{let{open:f,onOpenChange:p,triggerRef:b,contentId:x}=Ei(),[g,v]=$__namespace.useState({top:0,left:0}),[y,w]=$__namespace.useState(false),h=$__namespace.useRef(null);if($__namespace.useEffect(()=>{w(true);},[]),$__namespace.useEffect(()=>{if(!f||!b.current||!h.current)return;let R=()=>{if(!b.current||!h.current)return;let M=b.current.getBoundingClientRect(),T=h.current.getBoundingClientRect(),L=0,N=0;switch(t){case "top":L=M.top-T.height-r;break;case "bottom":L=M.bottom+r;break;case "left":N=M.left-T.width-r;break;case "right":N=M.right+r;break}if(t==="top"||t==="bottom")switch(a){case "start":N=M.left+n;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-n;break}else switch(a){case "start":L=M.top+n;break;case "center":L=M.top+M.height/2-T.height/2;break;case "end":L=M.bottom-T.height-n;break}v({top:L,left:N});};return R(),window.addEventListener("resize",R),window.addEventListener("scroll",R,true),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R,true);}},[f,t,r,a,n,b]),$__namespace.useEffect(()=>{if(!f)return;let R=M=>{let T=M.target;h.current&&!h.current.contains(T)&&b.current&&!b.current.contains(T)&&(o?.(),p(false));};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[f,p,o,b]),$__namespace.useEffect(()=>{if(!f)return;let R=M=>{M.key==="Escape"&&(s?.(),p(false));};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[f,p,s]),!y||!f)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:R=>{h.current=R,typeof u=="function"?u(R):u&&(u.current=R);},id:x,role:"dialog","data-state":f?"open":"closed","data-side":t,className:i("fixed z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:g.top,left:g.left},...m,children:d}),document.body)});nt.displayName="PopoverContent";var Md=$__namespace.createContext(null),Si=()=>{let e=$__namespace.useContext(Md);if(!e)throw new Error("Tabs components must be used within a Tabs");return e},Td=$__namespace.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:a,variant:n="solid",radius:o="md",orientation:s="horizontal",children:l,...c},d)=>{let[m,u]=$__namespace.useState(r),f=t!==void 0,p=f?t:m,b=x=>{f||u(x),a?.(x);};return jsxRuntime.jsx(Md.Provider,{value:{value:p,onValueChange:b,variant:n,radius:o,orientation:s},children:jsxRuntime.jsx("div",{ref:d,"data-orientation":s,className:i(s==="vertical"&&"flex gap-4",e),...c,children:l})})});Td.displayName="Tabs";var Di={none:{list:"rounded-none",trigger:"rounded-none",indicator:"rounded-none"},sm:{list:"rounded-md",trigger:"rounded-sm",indicator:"rounded-sm"},md:{list:"rounded-lg",trigger:"rounded-md",indicator:"rounded-md"},lg:{list:"rounded-xl",trigger:"rounded-lg",indicator:"rounded-lg"},full:{list:"rounded-full",trigger:"rounded-full",indicator:"rounded-full"}},Pd=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let{variant:n,radius:o,orientation:s,value:l}=Si(),c=$__namespace.useRef(null),[d,m]=$__namespace.useState({opacity:0});$__namespace.useEffect(()=>{let b=c.current;if(!b)return;let x=()=>{let v=b.querySelector('[data-state="active"]');if(v){let y=b.getBoundingClientRect(),w=v.getBoundingClientRect(),h=s==="vertical";n==="underline"?m(h?{width:2,height:w.height,transform:`translateY(${w.top-y.top}px)`,opacity:1}:{width:w.width,height:2,transform:`translateX(${w.left-y.left}px)`,opacity:1}):n==="solid"&&m(h?{width:w.width,height:w.height,transform:`translateY(${w.top-y.top}px)`,opacity:1}:{width:w.width,height:w.height,transform:`translateX(${w.left-y.left}px)`,opacity:1});}};x();let g=new ResizeObserver(x);return g.observe(b),()=>{g.disconnect();}},[n,s,l]);let u={solid:"bg-muted p-1",underline:"border-b border-border bg-transparent p-0 !rounded-none",outline:"bg-transparent p-0 gap-1 !rounded-none"},f=s==="vertical",p=()=>n==="solid"?f?"top-0 left-1 bg-background shadow":"top-1 left-1 bg-background shadow":n==="underline"?f?"top-0 left-0 bg-primary !rounded-full":"bottom-0 left-0 bg-primary !rounded-full":"";return jsxRuntime.jsxs("div",{ref:b=>{c.current=b,typeof a=="function"?a(b):a&&(a.current=b);},role:"tablist","aria-orientation":s,className:i("relative inline-flex h-9 items-center justify-center text-muted-foreground",f&&"flex-col h-auto w-auto",Di[o].list,u[n],e),...r,children:[(n==="solid"||n==="underline")&&jsxRuntime.jsx("span",{className:i("absolute transition-all duration-200 ease-out",Di[o].indicator,p()),style:d,"aria-hidden":"true"}),t]})});Pd.displayName="TabsList";var kd=$__namespace.forwardRef(({className:e,value:t,disabled:r,onClick:a,...n},o)=>{let{value:s,onValueChange:l,variant:c,radius:d}=Si(),m=s===t,u={solid:"data-[state=active]:text-foreground",underline:"!rounded-none border-b-2 border-transparent pb-2 data-[state=active]:text-foreground",outline:"border border-transparent data-[state=active]:border-border data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm"};return jsxRuntime.jsx("button",{type:"button",role:"tab",ref:o,"aria-selected":m,"data-state":m?"active":"inactive",disabled:r,className:i("relative z-10 inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",Di[d].trigger,u[c],e),onClick:f=>{a?.(f),l(t);},...n})});kd.displayName="TabsTrigger";var Ld=$__namespace.forwardRef(({className:e,value:t,children:r,...a},n)=>{let{value:o}=Si(),s=o===t;return s?jsxRuntime.jsx("div",{ref:n,role:"tabpanel","data-state":s?"active":"inactive",className:i("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...a,children:r}):null});Ld.displayName="TabsContent";var Dd=$__namespace.createContext(null),Go=()=>{let e=$__namespace.useContext(Dd);if(!e)throw new Error("Sheet components must be used within a Sheet");return e},$o=({open:e,defaultOpen:t=false,onOpenChange:r,children:a})=>{let[n,o]=$__namespace.useState(t),s=e!==void 0,l=s?e:n,c=$__namespace.useCallback(d=>{s||o(d),r?.(d);},[s,r]);return jsxRuntime.jsx(Dd.Provider,{value:{open:l,onOpenChange:c},children:a})};$o.displayName="Sheet";var Sd=$__namespace.forwardRef(({asChild:e,onClick:t,children:r,...a},n)=>{let{onOpenChange:o}=Go(),s=l=>{t?.(l),o(true);};return e&&$__namespace.isValidElement(r)?$__namespace.cloneElement(r,{onClick:l=>{r.props.onClick?.(l),o(true);}}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:r})});Sd.displayName="SheetTrigger";var Hd=$__namespace.forwardRef(({asChild:e,onClick:t,children:r,...a},n)=>{let{onOpenChange:o}=Go(),s=l=>{t?.(l),o(false);};return e&&$__namespace.isValidElement(r)?$__namespace.cloneElement(r,{onClick:l=>{r.props.onClick?.(l),o(false);}}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:r})});Hd.displayName="SheetClose";var Ii=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Ii.displayName="SheetPortal";var Id=$__namespace.forwardRef(({className:e,...t},r)=>{let{open:a,onOpenChange:n}=Go();return a?jsxRuntime.jsx("div",{ref:r,className:i("fixed inset-0 z-50 bg-black/80",a?"animate-in fade-in-0":"animate-out fade-out-0",e),onClick:()=>n(false),"aria-hidden":"true",...t}):null});Id.displayName="SheetOverlay";var Vd=classVarianceAuthority.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition-transform duration-300 ease-in-out",{variants:{side:{top:"inset-x-0 top-0 border-b",bottom:"inset-x-0 bottom-0 border-t",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),qR=(e,t)=>({top:t?"animate-in slide-in-from-top":"animate-out slide-out-to-top",bottom:t?"animate-in slide-in-from-bottom":"animate-out slide-out-to-bottom",left:t?"animate-in slide-in-from-left":"animate-out slide-out-to-left",right:t?"animate-in slide-in-from-right":"animate-out slide-out-to-right"})[e],_o=$__namespace.forwardRef(({side:e="right",className:t,children:r,hideCloseButton:a,onEscapeKeyDown:n,onInteractOutside:o,...s},l)=>{let{open:c,onOpenChange:d}=Go(),[m,u]=$__namespace.useState(false),[,f]=$__namespace.useState(false);return $__namespace.useEffect(()=>{if(c)u(true),f(true),document.body.style.overflow="hidden";else {f(true);let p=setTimeout(()=>{u(false),f(false),document.body.style.overflow="";},300);return ()=>clearTimeout(p)}return ()=>{document.body.style.overflow="";}},[c]),$__namespace.useEffect(()=>{let p=b=>{b.key==="Escape"&&c&&(n?.(),d(false));};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[c,d,n]),!m&&!c?null:jsxRuntime.jsxs(Ii,{children:[jsxRuntime.jsx("div",{className:i("fixed inset-0 z-50 bg-black/80 transition-opacity duration-300",c?"opacity-100":"opacity-0"),onClick:()=>{o?.(),d(false);},"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:l,role:"dialog","aria-modal":"true",className:i(Vd({side:e}),qR(e,c),t),...s,children:[!a&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>d(false),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]})});_o.displayName="SheetContent";var Ad=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ad.displayName="SheetHeader";var zd=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});zd.displayName="SheetFooter";var Bd=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("h2",{ref:r,className:i("text-lg font-semibold text-foreground",e),...t}));Bd.displayName="SheetTitle";var Od=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:i("text-sm text-muted-foreground",e),...t}));Od.displayName="SheetDescription";var QR=({theme:e="system",...t})=>jsxRuntime.jsx(sonner.Toaster,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});var Fd=$__namespace.createContext(null),Fn=()=>{let e=$__namespace.useContext(Fd);if(!e)throw new Error("ContextMenu components must be used within a ContextMenu");return e},Vi=$__namespace.createContext(null),Kd=$__namespace.createContext(null),Gd=({children:e,onOpenChange:t})=>{let[r,a]=$__namespace.useState(false),[n,o]=$__namespace.useState({x:0,y:0}),s=$__namespace.useId(),l=$__namespace.useCallback(c=>{a(c),t?.(c);},[t]);return jsxRuntime.jsx(Fd.Provider,{value:{open:r,onOpenChange:l,position:n,setPosition:o,contentId:s},children:e})};Gd.displayName="ContextMenu";var $d=$__namespace.forwardRef(({asChild:e,children:t,onContextMenu:r,...a},n)=>{let{onOpenChange:o,setPosition:s}=Fn(),l=c=>{c.preventDefault(),s({x:c.clientX,y:c.clientY}),o(true);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:n,onContextMenu:c=>{c.preventDefault(),t.props.onContextMenu?.(c),s({x:c.clientX,y:c.clientY}),o(true);},...a}):jsxRuntime.jsx("div",{ref:n,onContextMenu:c=>{r?.(c),l(c);},...a,children:t})});$d.displayName="ContextMenuTrigger";var _d=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));_d.displayName="ContextMenuGroup";var Wd=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Wd.displayName="ContextMenuPortal";var jd=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx(Vi.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};jd.displayName="ContextMenuSub";var Ud=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(Kd.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Ud.displayName="ContextMenuRadioGroup";var Yd=$__namespace.forwardRef(({className:e,onInteractOutside:t,onEscapeKeyDown:r,children:a,...n},o)=>{let{open:s,onOpenChange:l,position:c,contentId:d}=Fn(),[m,u]=$__namespace.useState(false),[f,p]=$__namespace.useState(c),b=$__namespace.useRef(null);return $__namespace.useEffect(()=>{u(true);},[]),$__namespace.useEffect(()=>{if(!s||!b.current){p(c);return}let g=b.current.getBoundingClientRect(),{x:v,y}=c;v+g.width>window.innerWidth&&(v=window.innerWidth-g.width-8),y+g.height>window.innerHeight&&(y=window.innerHeight-g.height-8),p({x:v,y});},[s,c]),$__namespace.useEffect(()=>{if(!s)return;let x=g=>{let v=g.target;b.current&&!b.current.contains(v)&&(t?.(),l(false));};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s,l,t]),$__namespace.useEffect(()=>{if(!s)return;let x=g=>{g.key==="Escape"&&(r?.(),l(false));};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s,l,r]),!m||!s?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{b.current=x,typeof o=="function"?o(x):o&&(o.current=x);},id:d,role:"menu","aria-orientation":"vertical","data-state":s?"open":"closed",className:i("fixed z-50 max-h-[calc(100vh-2rem)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-md","animate-in fade-in-0 zoom-in-95",e),style:{top:f.y,left:f.x},...n,children:a}),document.body)});Yd.displayName="ContextMenuContent";var Xd=$__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let l=$__namespace.useContext(Vi);if(!l)throw new Error("ContextMenuSubTrigger must be used within ContextMenuSub");let{open:c,onOpenChange:d,triggerRef:m}=l,u=p=>{a?.(p),d(true);},f=p=>{n?.(p),d(false);};return jsxRuntime.jsxs("div",{ref:p=>{m.current=p,typeof s=="function"?s(p):s&&(s.current=p);},role:"menuitem","aria-haspopup":"menu","aria-expanded":c,"data-state":c?"open":"closed",className:i("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[state=open]:bg-zinc-100 dark:data-[state=open]:bg-zinc-800",t&&"pl-8",e),onMouseEnter:u,onMouseLeave:f,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Xd.displayName="ContextMenuSubTrigger";var qd=$__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let s=$__namespace.useContext(Vi);if(!s)throw new Error("ContextMenuSubContent must be used within ContextMenuSub");let{open:l,onOpenChange:c,triggerRef:d}=s,[m,u]=$__namespace.useState({top:0,left:0}),[f,p]=$__namespace.useState(false),b=$__namespace.useRef(null);$__namespace.useEffect(()=>{p(true);},[]),$__namespace.useEffect(()=>{if(!l||!d.current||!b.current)return;(()=>{if(!d.current||!b.current)return;let y=d.current.getBoundingClientRect(),w=b.current.getBoundingClientRect(),h=y.top,C=y.right+t;C+w.width>window.innerWidth&&(C=y.left-w.width-t),u({top:h,left:C});})();},[l,t,d]);let x=v=>{r?.(v),c(true);},g=v=>{a?.(v),c(false);};return !f||!l?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:v=>{b.current=v,typeof o=="function"?o(v):o&&(o.current=v);},role:"menu","data-state":l?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-1 text-zinc-950 dark:text-zinc-50 shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",e),style:{top:m.top,left:m.left},onMouseEnter:x,onMouseLeave:g,...n}),document.body)});qd.displayName="ContextMenuSubContent";var Zd=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{onOpenChange:l}=Fn(),c=d=>{if(r){d.preventDefault();return}n?.(d),a?.(),l(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:i("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),onClick:c,...o})});Zd.displayName="ContextMenuItem";var Jd=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{onOpenChange:c}=Fn(),d=m=>{if(n){m.preventDefault();return}o?.(m),a?.(!r),c(false);};return jsxRuntime.jsxs("div",{ref:l,role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:d,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});Jd.displayName="ContextMenuCheckboxItem";var Qd=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{onOpenChange:l}=Fn(),c=$__namespace.useContext(Kd),d=c?.value===r,m=u=>{if(a){u.preventDefault();return}n?.(u),c?.onValueChange(r),l(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":d,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-state":d?"checked":"unchecked",className:i("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:bg-zinc-100 dark:focus:bg-zinc-800 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),onClick:m,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-4 w-4 fill-current"})}),t]})});Qd.displayName="ContextMenuRadioItem";var eu=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...r}));eu.displayName="ContextMenuLabel";var tu=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-border",e),...t}));tu.displayName="ContextMenuSeparator";var ru=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ru.displayName="ContextMenuShortcut";var au=$__namespace.createContext(null),o0=()=>{let e=$__namespace.useContext(au);if(!e)throw new Error("RadioGroupItem must be used within a RadioGroup");return e},nu=$__namespace.forwardRef(({className:e,value:t,defaultValue:r="",onValueChange:a,name:n,disabled:o,required:s,orientation:l="vertical",children:c,...d},m)=>{let[u,f]=$__namespace.useState(r),p=t!==void 0,b=p?t:u,x=$__namespace.useId(),g=v=>{p||f(v),a?.(v);};return jsxRuntime.jsx("div",{ref:m,role:"radiogroup","aria-required":s,"aria-orientation":l,className:i(l==="vertical"?"grid gap-2":"flex gap-4",e),...d,children:jsxRuntime.jsx(au.Provider,{value:{name:n||x,value:b,onValueChange:g,disabled:o,required:s},children:c})})});nu.displayName="RadioGroup";var ou=$__namespace.forwardRef(({className:e,value:t,disabled:r,...a},n)=>{let o=o0(),s=o.value===t,l=r||o.disabled;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":s,disabled:l,ref:n,className:i("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer",e),onClick:()=>o.onValueChange(t),...a,children:s&&jsxRuntime.jsx("span",{className:"flex items-center justify-center",children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}),jsxRuntime.jsx("input",{type:"radio","aria-hidden":true,tabIndex:-1,name:o.name,value:t,checked:s,required:o.required,disabled:l,onChange:()=>{},style:{position:"absolute",pointerEvents:"none",opacity:0,margin:0,width:0,height:0}})]})});ou.displayName="RadioGroupItem";var Uo=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",{variants:{variant:{solid:"bg-transparent hover:bg-muted data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",outline:"border border-input bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",ghost:"bg-transparent hover:bg-accent data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",soft:"bg-transparent hover:bg-primary/10 data-[state=on]:bg-primary/15 data-[state=on]:text-primary",surface:"bg-muted/50 hover:bg-muted data-[state=on]:bg-muted data-[state=on]:text-foreground"},size:{sm:"h-9 px-2.5 min-w-9",md:"h-10 px-3 min-w-10",lg:"h-11 px-5 min-w-11"}},defaultVariants:{variant:"solid",size:"md"}}),su=$__namespace.forwardRef(({className:e,variant:t,size:r,pressed:a,defaultPressed:n=false,onPressedChange:o,disabled:s,onKeyDown:l,...c},d)=>{let[m,u]=$__namespace.useState(n),f=a!==void 0,p=f?a:m,b=()=>{if(s)return;let g=!p;f||u(g),o?.(g);},x=g=>{g.key==="Enter"&&g.preventDefault(),l?.(g);};return jsxRuntime.jsx("button",{type:"button","aria-pressed":p,"data-state":p?"on":"off",disabled:s,ref:d,className:i(Uo({variant:t,size:r,className:e})),onClick:b,onKeyDown:x,...c})});su.displayName="Toggle";var iu=$__namespace.createContext(null),d0=()=>{let e=$__namespace.useContext(iu);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e},lu=$__namespace.forwardRef(({className:e,variant:t,size:r,type:a,value:n,defaultValue:o,onValueChange:s,disabled:l,children:c,...d},m)=>{let[u,f]=$__namespace.useState(()=>a==="single"?o?[o]:[]:o||[]),p=n!==void 0,b=p?a==="single"?n?[n]:[]:n:u,x=g=>{if(a==="single"){let v=b.includes(g)?[]:[g];p||f(v),s?.(v[0]||"");}else {let v=b.includes(g)?b.filter(y=>y!==g):[...b,g];p||f(v),s?.(v);}};return jsxRuntime.jsx("div",{ref:m,role:"group",className:i("flex items-center justify-center gap-1",e),...d,children:jsxRuntime.jsx(iu.Provider,{value:{type:a,variant:t,size:r,value:b,onValueChange:x,disabled:l},children:c})})});lu.displayName="ToggleGroup";var cu=$__namespace.forwardRef(({className:e,children:t,variant:r,size:a,value:n,disabled:o,...s},l)=>{let c=d0(),d=c.value.includes(n),m=o||c.disabled;return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":d,"aria-pressed":d,"data-state":d?"on":"off",disabled:m,ref:l,className:i(Uo({variant:c.variant||r,size:c.size||a}),e),onClick:()=>c.onValueChange(n),...s,children:t})});cu.displayName="ToggleGroupItem";var Xo=$__namespace.forwardRef(({className:e,value:t,defaultValue:r=[0],onValueChange:a,onValueCommit:n,min:o=0,max:s=100,step:l=1,disabled:c=false,orientation:d="horizontal",name:m,...u},f)=>{let[p,b]=$__namespace.useState(r),x=t!==void 0,g=x?t:p,v=$__namespace.useRef(null),[y,w]=$__namespace.useState(false),[h,C]=$__namespace.useState(null),R=(H,S)=>{if(!v.current)return g[0];let D=v.current.getBoundingClientRect(),I;d==="horizontal"?I=(H-D.left)/D.width:I=1-(S-D.top)/D.height,I=Math.max(0,Math.min(1,I));let z=o+I*(s-o),G=Math.round(z/l)*l;return Math.max(o,Math.min(s,G))},M=(H,S)=>{let D=[...g];D[S]=H,S>0&&H<g[S-1]&&(D[S]=g[S-1]),S<g.length-1&&H>g[S+1]&&(D[S]=g[S+1]),x||b(D),a?.(D);},T=(H,S)=>{c||(H.preventDefault(),w(true),C(S),H.target.setPointerCapture(H.pointerId));},L=H=>{if(!y||h===null||c)return;let S=R(H.clientX,H.clientY);M(S,h);},N=()=>{y&&(w(false),C(null),n?.(g));},P=H=>{if(c)return;let S=R(H.clientX,H.clientY),D=0,I=Math.abs(g[0]-S);for(let z=1;z<g.length;z++){let G=Math.abs(g[z]-S);G<I&&(I=G,D=z);}M(S,D),n?.([...g.slice(0,D),S,...g.slice(D+1)]);},k=(H,S)=>{if(c)return;let D=g[S];switch(H.key){case "ArrowRight":case "ArrowUp":H.preventDefault(),D=Math.min(s,g[S]+l);break;case "ArrowLeft":case "ArrowDown":H.preventDefault(),D=Math.max(o,g[S]-l);break;case "Home":H.preventDefault(),D=o;break;case "End":H.preventDefault(),D=s;break;default:return}M(D,S),n?.([...g.slice(0,S),D,...g.slice(S+1)]);},E=H=>(H-o)/(s-o)*100;return jsxRuntime.jsxs("div",{ref:f,className:i("relative flex touch-none select-none items-center",d==="vertical"&&"flex-col h-full w-5",c&&"opacity-50 pointer-events-none",e),...u,children:[jsxRuntime.jsx("div",{ref:v,className:i("relative grow overflow-hidden rounded-full bg-secondary",d==="horizontal"?"h-2 w-full":"h-full w-2"),onClick:P,children:jsxRuntime.jsx("div",{className:"absolute bg-primary",style:d==="horizontal"?{left:g.length>1?`${E(g[0])}%`:0,right:`${100-E(g[g.length-1])}%`,top:0,bottom:0}:{bottom:g.length>1?`${E(g[0])}%`:0,top:`${100-E(g[g.length-1])}%`,left:0,right:0}})}),g.map((H,S)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:c?-1:0,"aria-valuemin":o,"aria-valuemax":s,"aria-valuenow":H,"aria-orientation":d,"aria-disabled":c,className:i("absolute block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-grab",y&&h===S&&"cursor-grabbing"),style:d==="horizontal"?{left:`calc(${E(H)}% - 10px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${E(H)}% - 10px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:D=>T(D,S),onPointerMove:L,onPointerUp:N,onPointerCancel:N,onKeyDown:D=>k(D,S)},S)),m&&g.map((H,S)=>jsxRuntime.jsx("input",{type:"hidden",name:g.length>1?`${m}[${S}]`:m,value:H},S))]})});Xo.displayName="Slider";var du=$__namespace.createContext(null),uu=()=>{let e=$__namespace.useContext(du);if(!e)throw new Error("AccordionItem must be used within an Accordion");return e},Bi=$__namespace.createContext(null),mu=()=>{let e=$__namespace.useContext(Bi);if(!e)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return e},pu=$__namespace.forwardRef(({className:e,type:t="multiple",value:r,defaultValue:a,onValueChange:n,collapsible:o=true,disabled:s,children:l,...c},d)=>{let[m,u]=$__namespace.useState(()=>t==="single"?a?[a]:[]:a||[]),f=$__namespace.useRef(new Map),p=$__namespace.useRef([]),b=r!==void 0,x=b?t==="single"?r?[r]:[]:r:m,g=h=>{if(t==="single"){let R=x.includes(h)&&o?[]:[h];b||u(R),n?.(R[0]||"");}else {let C=x.includes(h)?x.filter(R=>R!==h):[...x,h];b||u(C),n?.(C);}},v=$__namespace.useCallback((h,C)=>{f.current.set(h,C),p.current.includes(h)||p.current.push(h);},[]),y=$__namespace.useCallback(h=>{f.current.delete(h),p.current=p.current.filter(C=>C!==h);},[]),w=$__namespace.useCallback(h=>{let C=p.current;if(C.length===0)return;let R=document.activeElement,M;f.current.forEach((k,E)=>{k===R&&(M=E);});let T=M?C.indexOf(M):-1,L;switch(h){case "first":L=0;break;case "last":L=C.length-1;break;case "next":L=T===-1?0:(T+1)%C.length;break;case "prev":L=T===-1?C.length-1:(T-1+C.length)%C.length;break}let N=C[L];f.current.get(N)?.focus();},[]);return jsxRuntime.jsx(du.Provider,{value:{type:t,value:x,onValueChange:g,collapsible:o,disabled:s,registerTrigger:v,unregisterTrigger:y,focusTrigger:w},children:jsxRuntime.jsx("div",{ref:d,"data-orientation":"vertical",className:i("w-full",e),...c,children:l})})});pu.displayName="Accordion";var fu=$__namespace.forwardRef(({className:e,value:t,disabled:r,title:a,subtitle:n,startContent:o,children:s,...l},c)=>{let d=uu(),m=d.value.includes(t),u=r||d.disabled||false,f=$__namespace.useId(),p=$__namespace.useId();return a!==void 0?jsxRuntime.jsx(Bi.Provider,{value:{value:t,isOpen:m,isDisabled:u,contentId:f,triggerId:p},children:jsxRuntime.jsxs("div",{ref:c,"data-state":m?"open":"closed","data-disabled":u?"":void 0,className:i("border-b",u&&"opacity-50",e),...l,children:[jsxRuntime.jsx(gu,{children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[o,jsxRuntime.jsxs("div",{className:"flex flex-col items-start",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium",children:a}),n&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:n})]})]})}),jsxRuntime.jsx(bu,{children:s})]})}):jsxRuntime.jsx(Bi.Provider,{value:{value:t,isOpen:m,isDisabled:u,contentId:f,triggerId:p},children:jsxRuntime.jsx("div",{ref:c,"data-state":m?"open":"closed","data-disabled":u?"":void 0,className:i("border-b",u&&"opacity-50",e),...l,children:s})})});fu.displayName="AccordionItem";var gu=$__namespace.forwardRef(({className:e,children:t,onClick:r,onKeyDown:a,...n},o)=>{let s=uu(),{value:l,isOpen:c,isDisabled:d,contentId:m,triggerId:u}=mu(),f=$__namespace.useRef(null);$__namespace.useEffect(()=>{let b=f.current;return b&&!d&&s.registerTrigger(l,b),()=>{s.unregisterTrigger(l);}},[l,d,s]);let p=b=>{switch(a?.(b),b.key){case "ArrowDown":b.preventDefault(),s.focusTrigger("next");break;case "ArrowUp":b.preventDefault(),s.focusTrigger("prev");break;case "Home":b.preventDefault(),s.focusTrigger("first");break;case "End":b.preventDefault(),s.focusTrigger("last");break}};return jsxRuntime.jsx("h3",{className:"flex",children:jsxRuntime.jsxs("button",{type:"button",ref:b=>{f.current=b,typeof o=="function"?o(b):o&&(o.current=b);},id:u,"aria-controls":m,"aria-expanded":c,disabled:d,"data-state":c?"open":"closed",className:i("flex flex-1 items-center justify-between py-4 font-medium transition-all text-left cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),onClick:b=>{r?.(b),s.onValueChange(l);},onKeyDown:p,...n,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});gu.displayName="AccordionTrigger";var bu=$__namespace.forwardRef(({className:e,children:t,style:r,...a},n)=>{let{isOpen:o,contentId:s,triggerId:l,isDisabled:c}=mu();return jsxRuntime.jsx("div",{ref:n,id:s,role:"region","aria-labelledby":l,"data-state":o?"open":"closed","data-disabled":c?"":void 0,className:i("grid transition-[grid-template-rows] duration-200 ease-out",o?"grid-rows-[1fr]":"grid-rows-[0fr]",e),style:r,...a,children:jsxRuntime.jsx("div",{className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:"pb-4 pt-0 text-sm",children:t})})})});bu.displayName="AccordionContent";var hu=$__namespace.createContext(null),xu=()=>{let e=$__namespace.useContext(hu);if(!e)throw new Error("Collapsible components must be used within a Collapsible");return e},yu=$__namespace.forwardRef(({className:e,open:t,defaultOpen:r=false,onOpenChange:a,disabled:n,title:o,children:s,...l},c)=>{let[d,m]=$__namespace.useState(r),u=t!==void 0,f=u?t:d,p=$__namespace.useId(),b=$__namespace.useId(),x=g=>{n||(u||m(g),a?.(g));};return jsxRuntime.jsx(hu.Provider,{value:{open:f,onOpenChange:x,disabled:n,contentId:p,triggerId:b},children:jsxRuntime.jsxs("div",{ref:c,"data-state":f?"open":"closed","data-disabled":n?"":void 0,className:i("space-y-2",e),...l,children:[o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between space-x-4 px-4",children:[jsxRuntime.jsx("h4",{className:"text-sm font-semibold",children:o}),jsxRuntime.jsx(Oi,{})]}),s]})})});yu.displayName="Collapsible";var Oi=$__namespace.forwardRef(({className:e,children:t,onClick:r,...a},n)=>{let{open:o,onOpenChange:s,disabled:l,contentId:c,triggerId:d}=xu();return jsxRuntime.jsx("button",{ref:n,type:"button",id:d,"aria-controls":c,"aria-expanded":o,disabled:l,"data-state":o?"open":"closed","data-disabled":l?"":void 0,className:i("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",e),onClick:m=>{r?.(m),s(!o);},...a,children:t??jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4"})})});Oi.displayName="CollapsibleTrigger";var Ru=$__namespace.forwardRef(({className:e,children:t,style:r,...a},n)=>{let{open:o,contentId:s,triggerId:l,disabled:c}=xu(),d=$__namespace.useRef(null),[m,u]=$__namespace.useState(void 0),[f,p]=$__namespace.useState(false),[b,x]=$__namespace.useState(o);$__namespace.useEffect(()=>{o?(x(true),p(true),requestAnimationFrame(()=>{d.current&&u(d.current.scrollHeight);})):(p(true),u(0));},[o]);let g=()=>{p(false),o||x(false),u(void 0);};return b?jsxRuntime.jsx("div",{ref:n,id:s,role:"region","aria-labelledby":l,"data-state":o?"open":"closed","data-disabled":c?"":void 0,className:i("overflow-hidden",e),style:{...r,height:f?m!==void 0?m:"auto":o?"auto":0,transition:f?"height 0.25s ease-out, opacity 0.25s ease-out":void 0,opacity:o?1:0},onTransitionEnd:g,...a,children:jsxRuntime.jsx("div",{ref:d,children:t})}):null});Ru.displayName="CollapsibleContent";var Jo=$__namespace.forwardRef(({className:e,value:t=0,max:r=100,label:a,showPercentage:n=false,formatPercentage:o=c=>`${Math.round(c)}%`,...s},l)=>{let c=Math.min(Math.max(t/r*100,0),100);return jsxRuntime.jsxs("div",{ref:l,className:"w-full",children:[(a||n)&&jsxRuntime.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[a&&jsxRuntime.jsx("span",{className:"text-muted-foreground",children:a}),n&&jsxRuntime.jsx("span",{className:i("text-muted-foreground",!a&&"ml-auto"),children:o(c)})]}),jsxRuntime.jsx("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":typeof a=="string"?a:void 0,className:i("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:jsxRuntime.jsx("div",{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-c}%)`}})})]})});Jo.displayName="Progress";var Mu=$__namespace.createContext(null),Tu=()=>{let e=$__namespace.useContext(Mu);if(!e)throw new Error("HoverCard components must be used within a HoverCard");return e},Pu=({children:e,open:t,defaultOpen:r=false,onOpenChange:a,openDelay:n=700,closeDelay:o=300,closeOnScroll:s=true})=>{let[l,c]=$__namespace.useState(r),d=t!==void 0,m=d?t:l,u=$__namespace.useRef(null),f=$__namespace.useId(),p=$__namespace.useRef(null),b=$__namespace.useRef(null),x=$__namespace.useCallback(g=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current),g?p.current=setTimeout(()=>{d||c(true),a?.(true);},n):b.current=setTimeout(()=>{d||c(false),a?.(false);},o);},[d,a,n,o]);return $__namespace.useEffect(()=>{if(!s||!m)return;let g=()=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current),d||c(false),a?.(false);};return window.addEventListener("scroll",g,true),()=>window.removeEventListener("scroll",g,true)},[s,m,d,a]),$__namespace.useEffect(()=>()=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current);},[]),jsxRuntime.jsx(Mu.Provider,{value:{open:m,onOpenChange:x,triggerRef:u,contentId:f},children:e})};Pu.displayName="HoverCard";var ku=$__namespace.forwardRef(({asChild:e,children:t,onMouseEnter:r,onMouseLeave:a,onFocus:n,onBlur:o,...s},l)=>{let{onOpenChange:c,triggerRef:d}=Tu(),m=b=>{r?.(b),c(true);},u=b=>{a?.(b),c(false);},f=b=>{n?.(b),c(true);},p=b=>{o?.(b),c(false);};return e&&$__namespace.isValidElement(t)?$__namespace.cloneElement(t,{ref:b=>{d.current=b,typeof l=="function"?l(b):l&&(l.current=b);},onMouseEnter:m,onMouseLeave:u,onFocus:f,onBlur:p,...s}):jsxRuntime.jsx("a",{ref:b=>{d.current=b,typeof l=="function"?l(b):l&&(l.current=b);},onMouseEnter:m,onMouseLeave:u,onFocus:f,onBlur:p,...s,children:t})});ku.displayName="HoverCardTrigger";var Lu=$__namespace.forwardRef(({className:e,side:t="bottom",sideOffset:r=4,align:a="center",alignOffset:n=0,onMouseEnter:o,onMouseLeave:s,children:l,...c},d)=>{let{open:m,onOpenChange:u,triggerRef:f,contentId:p}=Tu(),[b,x]=$__namespace.useState({top:0,left:0}),[g,v]=$__namespace.useState(false),y=$__namespace.useRef(null);$__namespace.useEffect(()=>{v(true);},[]),$__namespace.useEffect(()=>{if(!m||!f.current||!y.current)return;(()=>{if(!f.current||!y.current)return;let M=f.current.getBoundingClientRect(),T=y.current.getBoundingClientRect(),L=0,N=0;switch(t){case "top":L=M.top-T.height-r;break;case "bottom":L=M.bottom+r;break;case "left":N=M.left-T.width-r;break;case "right":N=M.right+r;break}if(t==="top"||t==="bottom")switch(a){case "start":N=M.left+n;break;case "center":N=M.left+M.width/2-T.width/2;break;case "end":N=M.right-T.width-n;break}else switch(a){case "start":L=M.top+n;break;case "center":L=M.top+M.height/2-T.height/2;break;case "end":L=M.bottom-T.height-n;break}x({top:L,left:N});})();},[m,t,r,a,n,f]);let w=R=>{o?.(R),u(true);},h=R=>{s?.(R),u(false);};if(!g||!m)return null;let C={top:"animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-2",bottom:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",left:"animate-in fade-in-0 zoom-in-95 slide-in-from-right-2",right:"animate-in fade-in-0 zoom-in-95 slide-in-from-left-2"}[t];return Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:R=>{y.current=R,typeof d=="function"?d(R):d&&(d.current=R);},id:p,"data-state":m?"open":"closed","data-side":t,className:i("fixed z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",C,e),style:{top:b.top,left:b.left},onMouseEnter:w,onMouseLeave:h,...c,children:l}),document.body)});Lu.displayName="HoverCardContent";var Eu=$__namespace.createContext({size:"md",variant:"default",radius:"md"}),es=()=>$__namespace.useContext(Eu);classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""},variant:{default:"",bordered:"",filled:""},radius:{none:"",sm:"",md:"",lg:"",full:""}},defaultVariants:{size:"md",variant:"default",radius:"md"}});var b0=classVarianceAuthority.cva("flex flex-wrap items-center break-words",{variants:{size:{sm:"gap-1 text-xs",md:"gap-1.5 text-sm sm:gap-2",lg:"gap-2 text-base sm:gap-3"},variant:{default:"text-muted-foreground",bordered:"text-muted-foreground px-3 py-1.5 border",filled:"text-muted-foreground bg-muted px-3 py-1.5"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",variant:"default",radius:"md"}}),v0=classVarianceAuthority.cva("",{variants:{size:{sm:"[&>svg]:h-3 [&>svg]:w-3",md:"[&>svg]:h-3.5 [&>svg]:w-3.5",lg:"[&>svg]:h-4 [&>svg]:w-4"}},defaultVariants:{size:"md"}}),h0=classVarianceAuthority.cva("flex items-center justify-center",{variants:{size:{sm:"h-6 w-6 [&>svg]:h-3 [&>svg]:w-3",md:"h-8 w-8 [&>svg]:h-4 [&>svg]:w-4",lg:"h-10 w-10 [&>svg]:h-5 [&>svg]:w-5"}},defaultVariants:{size:"md"}}),Du=$__namespace.forwardRef(({size:e="md",variant:t="default",radius:r="md",children:a,...n},o)=>jsxRuntime.jsx(Eu.Provider,{value:{size:e,variant:t,radius:r},children:jsxRuntime.jsx("nav",{ref:o,"aria-label":"breadcrumb",...n,children:a})}));Du.displayName="Breadcrumb";var Su=$__namespace.forwardRef(({className:e,...t},r)=>{let{size:a,variant:n,radius:o}=es();return jsxRuntime.jsx("ol",{ref:r,className:i(b0({size:a,variant:n,radius:n==="default"?void 0:o}),e),...t})});Su.displayName="BreadcrumbList";var Hu=$__namespace.forwardRef(({className:e,...t},r)=>{let{size:a}=es();return jsxRuntime.jsx("li",{ref:r,className:i("inline-flex items-center",a==="sm"&&"gap-1",a==="md"&&"gap-1.5",a==="lg"&&"gap-2",e),...t})});Hu.displayName="BreadcrumbItem";var Iu=$__namespace.forwardRef(({asChild:e,className:t,...r},a)=>jsxRuntime.jsx(e?To:"a",{ref:a,className:i("transition-colors hover:text-foreground cursor-pointer",t),...r}));Iu.displayName="BreadcrumbLink";var Vu=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:i("font-medium text-foreground",e),...t}));Vu.displayName="BreadcrumbPage";var Au=({children:e,className:t,...r})=>{let{size:a}=es();return jsxRuntime.jsx("li",{role:"presentation","aria-hidden":"true",className:i(v0({size:a}),"text-muted-foreground/60",t),...r,children:e??jsxRuntime.jsx(lucideReact.ChevronRight,{})})};Au.displayName="BreadcrumbSeparator";var zu=({className:e,...t})=>{let{size:r}=es();return jsxRuntime.jsxs("span",{role:"presentation","aria-hidden":"true",className:i(h0({size:r}),e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"More"})]})};zu.displayName="BreadcrumbEllipsis";var Fu=$__namespace.forwardRef(({ratio:e=1,className:t,style:r,children:a,...n},o)=>jsxRuntime.jsx("div",{ref:o,className:i("relative w-full",t),style:{...r,paddingBottom:`${100/e}%`},...n,children:jsxRuntime.jsx("div",{className:"absolute inset-0",children:a})}));Fu.displayName="AspectRatio";var $u=$__namespace.createContext(null),Ki=()=>{let e=$__namespace.useContext($u);if(!e)throw new Error("NavigationMenu components must be used within a NavigationMenu");return e},_u=$__namespace.createContext(null),Wu=()=>{let e=$__namespace.useContext(_u);if(!e)throw new Error("NavigationMenuItem components must be used within a NavigationMenuItem");return e},ju=$__namespace.forwardRef(({className:e,orientation:t="horizontal",children:r,...a},n)=>{let[o,s]=$__namespace.useState(null);return jsxRuntime.jsx($u.Provider,{value:{activeItem:o,setActiveItem:s,orientation:t},children:jsxRuntime.jsxs("nav",{ref:n,className:i("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[r,jsxRuntime.jsx(Gi,{})]})})});ju.displayName="NavigationMenu";var Uu=$__namespace.forwardRef(({className:e,...t},r)=>{let{orientation:a}=Ki();return jsxRuntime.jsx("ul",{ref:r,className:i("group flex flex-1 list-none items-center justify-center gap-1",a==="vertical"&&"flex-col items-start",e),...t})});Uu.displayName="NavigationMenuList";var Yu=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let{activeItem:n,setActiveItem:o}=Ki(),s=$__namespace.useId(),l=$__namespace.useRef(null),c=n===s,d=$__namespace.useCallback(m=>{o(m?s:null);},[s,o]);return jsxRuntime.jsx(_u.Provider,{value:{itemId:s,triggerRef:l,open:c,onOpenChange:d},children:jsxRuntime.jsx("li",{ref:a,className:i("relative",e),...r,children:t})})});Yu.displayName="NavigationMenuItem";var Xu=classVarianceAuthority.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50"),qu=$__namespace.forwardRef(({className:e,children:t,onMouseEnter:r,onClick:a,...n},o)=>{let{triggerRef:s,open:l,onOpenChange:c}=Wu(),d=u=>{r?.(u),c(true);},m=u=>{a?.(u),c(!l);};return jsxRuntime.jsxs("button",{ref:u=>{s.current=u,typeof o=="function"?o(u):o&&(o.current=u);},type:"button","data-state":l?"open":"closed",className:i(Xu(),"group",e),onMouseEnter:d,onClick:m,"aria-expanded":l,...n,children:[t,jsxRuntime.jsx(lucideReact.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]})});qu.displayName="NavigationMenuTrigger";var Zu=$__namespace.forwardRef(({className:e,onMouseEnter:t,onMouseLeave:r,...a},n)=>{let{open:o,onOpenChange:s,triggerRef:l}=Wu(),c=$__namespace.useRef(null),[d,m]=$__namespace.useState({top:0,left:0});$__namespace.useEffect(()=>{if(!o||!l.current)return;let p=()=>{if(!l.current)return;let b=l.current.getBoundingClientRect();m({top:b.bottom+4,left:b.left});};return p(),window.addEventListener("resize",p),window.addEventListener("scroll",p,true),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,true);}},[o,l]);let u=p=>{t?.(p),s(true);},f=p=>{r?.(p),s(false);};return o?Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:p=>{c.current=p,typeof n=="function"?n(p):n&&(n.current=p);},"data-state":o?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-4 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:d.top,left:d.left},onMouseEnter:u,onMouseLeave:f,...a}),document.body):null});Zu.displayName="NavigationMenuContent";var Ju=classVarianceAuthority.cva("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"),Qu=$__namespace.forwardRef(({className:e,active:t,...r},a)=>jsxRuntime.jsx("a",{ref:a,className:i(Ju(),t&&"bg-accent text-accent-foreground",e),...r}));Qu.displayName="NavigationMenuLink";var Gi=$__namespace.forwardRef((e,t)=>null);Gi.displayName="NavigationMenuViewport";var em=$__namespace.forwardRef(({className:e,...t},r)=>{let{activeItem:a}=Ki();return a?jsxRuntime.jsx("div",{ref:r,className:i("top-full z-[1] flex h-2.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:jsxRuntime.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}):null});em.displayName="NavigationMenuIndicator";var nm=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",light:"hover:bg-muted/50",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),vr=$__namespace.forwardRef(({className:e,variant:t,size:r,iconSize:a,...n},o)=>{let l=a??{sm:14,md:16,lg:20}[r??"md"];return jsxRuntime.jsx("button",{ref:o,type:"button",className:i(nm({variant:t,size:r}),e),"aria-label":"Close",...n,children:jsxRuntime.jsx(lucideReact.X,{style:{width:l,height:l}})})});vr.displayName="CloseButton";var ts=$__namespace.createContext(null);function L0(){let e=$__namespace.useContext(ts);if(!e)throw new Error("useDrawer must be used within a DrawerProvider.");return e}function Jr(){return $__namespace.useContext(ts)}var E0="16rem",D0="18rem",S0="3rem",H0="b",I0={xs:"256px",sm:"320px",md:"384px",lg:"448px",xl:"512px","2xl":"576px","3xl":"672px","4xl":"768px","5xl":"896px",full:"100%"},V0={xs:"20vh",sm:"30vh",md:"40vh",lg:"50vh",xl:"60vh","2xl":"70vh","3xl":"75vh","4xl":"80vh","5xl":"90vh",full:"100vh"},$i=$__namespace.forwardRef(({defaultOpen:e=false,open:t,onOpenChange:r,placement:a="left",size:n="md",backdrop:o="opaque",isDismissable:s=true,hideCloseButton:l=false,collapsible:c="offcanvas",mode:d,className:m,style:u,children:f,...p},b)=>{let x=d??"overlay",g=x==="overlay",[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState(false),[C,R]=$__namespace.useState(e),M=t??C,T=$__namespace.useCallback(k=>{let E=typeof k=="function"?k(M):k;r?r(E):R(E);},[r,M]);$__namespace.useEffect(()=>{let k=()=>{y(window.innerWidth<768);};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);let L=$__namespace.useCallback(()=>g?T(k=>!k):v?h(k=>!k):T(k=>!k),[v,T,h,g]);$__namespace.useEffect(()=>{if(g)return;let k=E=>{E.key===H0&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),L());};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[L,g]);let N=M?"expanded":"collapsed",P=$__namespace.useMemo(()=>({placement:a,state:N,open:M,setOpen:T,isMobile:v,openMobile:w,setOpenMobile:h,toggleDrawer:L,collapsible:c,mode:x,size:n,backdrop:o,isDismissable:s,hideCloseButton:l}),[a,N,M,T,v,w,h,L,c,x,n,o,s,l]);return g?jsxRuntime.jsx(ts.Provider,{value:P,children:jsxRuntime.jsx(vaul.Drawer.Root,{open:M,onOpenChange:T,direction:a,dismissible:s,children:f})}):jsxRuntime.jsx(ts.Provider,{value:P,children:jsxRuntime.jsx(_r,{delayDuration:0,children:jsxRuntime.jsx("div",{ref:b,style:{"--drawer-width":E0,"--drawer-width-icon":S0,...u},className:i("group/drawer-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-muted/50",m),...p,children:f})})})});$i.displayName="Drawer";var sm=$__namespace.forwardRef(({variant:e="default",embedded:t=false,className:r,children:a,...n},o)=>{let s=Jr();if(!s)return jsxRuntime.jsx("div",{ref:o,className:i("flex h-full flex-col bg-background text-foreground",r),...n,children:a});let{placement:l,collapsible:c,isMobile:d,state:m,openMobile:u,setOpenMobile:f}=s;if(l==="bottom"||l==="top")return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a});if(c==="none")return jsxRuntime.jsx("div",{ref:o,className:i("flex h-full w-[--drawer-width] flex-col bg-background text-foreground border-r",l==="right"&&"border-l border-r-0",r),...n,children:a});if(d&&!t)return jsxRuntime.jsx(A0,{open:u,onOpenChange:f,placement:l,children:a});if(t){let b=m==="collapsed",x=c==="offcanvas",g=c==="icon";return jsxRuntime.jsx("div",{ref:o,className:i("group peer text-foreground relative"),"data-state":m,"data-collapsible":b?c:"","data-variant":e,"data-placement":l,"data-embedded":"true",children:jsxRuntime.jsx("div",{className:i("flex h-full flex-col overflow-hidden transition-[width,opacity] duration-200 ease-out",x?b?"w-0 opacity-0":"w-[--drawer-width] opacity-100":g&&b?"w-[--drawer-width-icon]":"w-[--drawer-width]",r),...n,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:i("flex h-full w-full flex-col bg-background transition-opacity duration-200",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border",e==="default"&&l==="left"&&"border-r",e==="default"&&l==="right"&&"border-l"),children:a})})})}return jsxRuntime.jsxs("div",{ref:o,className:"group peer hidden md:block text-foreground","data-state":m,"data-collapsible":m==="collapsed"?c:"","data-variant":e,"data-placement":l,children:[jsxRuntime.jsx("div",{className:i("duration-200 relative h-svh w-[--drawer-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0",l==="right"&&"group-data-[placement=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--drawer-width-icon]")}),jsxRuntime.jsx("div",{className:i("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--drawer-width] transition-[left,right,width] ease-linear md:flex",l==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--drawer-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--drawer-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--drawer-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--drawer-width-icon] group-data-[placement=left]:border-r group-data-[placement=right]:border-l",r),...n,children:jsxRuntime.jsx("div",{"data-drawer":"drawer",className:i("flex h-full w-full flex-col bg-background",e==="floating"&&"overflow-hidden rounded-lg border shadow-sm",e==="inset"&&"overflow-hidden rounded-lg border"),children:a})})]})});sm.displayName="DrawerSidebar";var A0=({children:e,open:t,onOpenChange:r,placement:a})=>{let[n,o]=$__namespace.useState(false);return $__namespace.useEffect(()=>{o(true);},[]),$__namespace.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[t]),!n||!t?null:Wo__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/80 animate-in fade-in-0",onClick:()=>r(false)}),jsxRuntime.jsx("div",{className:i("fixed z-50 bg-background p-0 text-foreground shadow-lg","animate-in",a==="left"&&"inset-y-0 left-0 h-full w-[--drawer-width] slide-in-from-left",a==="right"&&"inset-y-0 right-0 h-full w-[--drawer-width] slide-in-from-right"),style:{"--drawer-width":D0},children:jsxRuntime.jsx("div",{className:"flex h-full w-full flex-col",children:e})})]}),document.body)},im=$__namespace.forwardRef(({className:e,onClick:t,...r},a)=>{let n=Jr();if(n?.mode==="overlay")return jsxRuntime.jsx(vaul.Drawer.Trigger,{ref:a,className:e,onClick:t,...r});let o=n?.toggleDrawer;return jsxRuntime.jsxs("button",{ref:a,type:"button","data-drawer":"trigger",className:i("flex items-center justify-center h-9 w-9 rounded-lg bg-transparent hover:bg-accent transition-colors cursor-pointer",e),onClick:s=>{t?.(s),o?.();},...r,children:[jsxRuntime.jsx(lucideReact.PanelLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle Drawer"})]})});im.displayName="DrawerTrigger";var lm=$__namespace.forwardRef(({className:e,children:t,...r},a)=>{let n=Jr(),o=n?.mode==="overlay",s=n?.placement||"left",l=n?.size||"md",c=n?.backdrop||"opaque",d=n?.hideCloseButton||false;if(o){let m=s==="top"||s==="bottom",u=s==="left"||s==="right",f=u?I0[l]:V0[l],p={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},b={top:"inset-x-0 top-0 rounded-b-[10px]",bottom:"inset-x-0 bottom-0 rounded-t-[10px]",left:"inset-y-0 left-0 rounded-r-[10px]",right:"inset-y-0 right-0 rounded-l-[10px]"};return jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:i("fixed inset-0 z-50",p[c])}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:a,className:i("fixed z-50 flex flex-col border bg-background",b[s],e),style:{...u?{width:f,height:"100%"}:{},...m?{maxHeight:f}:{},...r.style},...r,children:[u&&!d&&jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx(vr,{variant:"light",className:"absolute right-4 top-4 z-10"})}),m&&jsxRuntime.jsx("div",{className:i("mx-auto h-2 w-[100px] rounded-full bg-muted",s==="top"?"mb-4 mt-auto":"mt-4")}),t]})]})}return jsxRuntime.jsx("div",{ref:a,className:i("flex flex-col h-full",e),...r,children:t})});lm.displayName="DrawerContent";var cm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"header",className:i("flex flex-col gap-2 p-4",e),...t}));cm.displayName="DrawerHeader";var dm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"body",className:i("flex min-h-0 flex-1 flex-col gap-2 overflow-auto p-4 group-data-[collapsible=icon]:overflow-hidden",e),...t}));dm.displayName="DrawerBody";var um=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 mt-auto",e),...t}));um.displayName="DrawerFooter";var mm=$__namespace.forwardRef(({className:e,...t},r)=>Jr()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Title,{ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}):jsxRuntime.jsx("h2",{ref:r,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));mm.displayName="DrawerTitle";var pm=$__namespace.forwardRef(({className:e,...t},r)=>Jr()?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Description,{ref:r,className:i("text-sm text-muted-foreground",e),...t}):jsxRuntime.jsx("p",{ref:r,className:i("text-sm text-muted-foreground",e),...t}));pm.displayName="DrawerDescription";var fm=$__namespace.forwardRef(({className:e,onClick:t,...r},a)=>{let n=Jr();return n?.mode==="overlay"?jsxRuntime.jsx(vaul.Drawer.Close,{ref:a,className:e,onClick:t,...r}):jsxRuntime.jsx(vr,{ref:a,variant:"light",className:e,onClick:s=>{t?.(s),n?.setOpen(false);},...r})});fm.displayName="DrawerClose";var gm=$__namespace.forwardRef(({className:e,onClick:t,showLabel:r=true,...a},n)=>{let o=Jr();if(!o)return null;let{toggleDrawer:s,state:l,placement:c}=o,d=l==="collapsed",m=c==="left",u=m?lucideReact.PanelLeftOpen:lucideReact.PanelRightOpen,f=m?lucideReact.PanelLeftClose:lucideReact.PanelRightClose;return jsxRuntime.jsxs("button",{ref:n,type:"button","data-drawer":"toggle","data-state":l,className:i("flex items-center gap-2 w-full px-2 py-2 rounded-md text-sm text-muted-foreground","hover:bg-accent hover:text-accent-foreground","transition-colors cursor-pointer","group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),onClick:p=>{t?.(p),s();},...a,children:[d?jsxRuntime.jsx(u,{className:"h-4 w-4 shrink-0"}):jsxRuntime.jsx(f,{className:"h-4 w-4 shrink-0"}),r&&jsxRuntime.jsx("span",{className:"group-data-[collapsible=icon]:hidden truncate",children:d?"Expand":"Collapse"})]})});gm.displayName="DrawerToggle";var bm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"separator",className:i("mx-4 h-px bg-border",e),...t}));bm.displayName="DrawerSeparator";var vm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,"data-drawer":"menu",className:i("flex w-full min-w-0 flex-col gap-1",e),...t}));vm.displayName="DrawerMenu";var hm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,"data-drawer":"menu-item",className:i("group/menu-item relative",e),...t}));hm.displayName="DrawerMenuItem";var xm=classVarianceAuthority.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-ring transition-[width,height,padding] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 active:bg-accent active:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-accent data-[active=true]:font-medium data-[active=true]:text-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-accent hover:text-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--border))] hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent/50 hover:text-accent-foreground"},size:{sm:"h-7 text-xs",md:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"md"}}),ym=$__namespace.forwardRef(({asChild:e=false,isActive:t=false,variant:r="default",size:a="md",tooltip:n,className:o,children:s,...l},c)=>{let d=Jr(),m=d?.isMobile??false,u=d?.state??"expanded",f=jsxRuntime.jsx("button",{ref:c,type:"button","data-drawer":"menu-button","data-size":a,"data-active":t,className:i(xm({variant:r,size:a}),o),...l,children:s});return n?jsxRuntime.jsxs(Wr,{children:[jsxRuntime.jsx(jr,{asChild:true,children:f}),jsxRuntime.jsx(Ur,{side:"right",align:"center",hidden:u!=="collapsed"||m,...typeof n=="string"?{children:n}:n})]}):f});ym.displayName="DrawerMenuButton";var Rm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"group",className:i("relative flex w-full min-w-0 flex-col p-2",e),...t}));Rm.displayName="DrawerGroup";var wm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,"data-drawer":"group-label",className:i("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-muted-foreground outline-none transition-[margin,opacity] ease-linear","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t}));wm.displayName="DrawerGroupLabel";var Cm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("main",{ref:r,className:i("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Cm.displayName="DrawerInset";var z0=$i;var Mm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:r,className:i("w-full caption-bottom text-sm",e),...t})}));Mm.displayName="Table";var Tm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("thead",{ref:r,className:i("[&_tr]:border-b",e),...t}));Tm.displayName="TableHeader";var Pm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tbody",{ref:r,className:i("[&_tr:last-child]:border-0",e),...t}));Pm.displayName="TableBody";var km=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tfoot",{ref:r,className:i("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));km.displayName="TableFooter";var Lm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("tr",{ref:r,className:i("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Lm.displayName="TableRow";var Em=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("th",{ref:r,className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Em.displayName="TableHead";var Dm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("td",{ref:r,className:i("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Dm.displayName="TableCell";var Sm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("caption",{ref:r,className:i("mt-4 text-sm text-muted-foreground",e),...t}));Sm.displayName="TableCaption";function $0({className:e,data:t,columns:r,selectable:a=false,selectedKeys:n,onSelectionChange:o,getRowKey:s=(h,C)=>String(C),sortable:l=false,sortState:c,onSortChange:d,paginated:m=false,pageSizeOptions:u=[10,20,50],paginationState:f,onPaginationChange:p,emptyContent:b="No data",loading:x=false,striped:g=false,hoverable:v=true,...y},w){let[h,C]=$__namespace.useState(new Set),[R,M]=$__namespace.useState({columnId:null,direction:null}),[T,L]=$__namespace.useState({pageIndex:0,pageSize:u[0]||10}),N=n??h,P=c??R,k=f??T,E=K=>{o?o(K):C(K);},H=K=>{d?d(K):M(K);},S=K=>{p?p(K):L(K);},D=$__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let K=r.find(B=>B.id===P.columnId);return K?[...t].sort((B,j)=>{let A=K.accessor(B),U=K.accessor(j);if(A===U)return 0;if(A==null)return 1;if(U==null)return -1;let W=String(A).localeCompare(String(U),void 0,{numeric:true});return P.direction==="asc"?W:-W}):t},[t,P,r]),I=$__namespace.useMemo(()=>{if(!m)return D;let K=k.pageIndex*k.pageSize;return D.slice(K,K+k.pageSize)},[D,m,k]),z=Math.ceil(D.length/k.pageSize),G=K=>{if(K===true){let B=new Set(I.map((j,A)=>s(j,A)));E(B);}else E(new Set);},V=(K,B)=>{let j=new Set(N);B?j.add(K):j.delete(K),E(j);},F=I.length>0&&I.every((K,B)=>N.has(s(K,B))),O=I.some((K,B)=>N.has(s(K,B))),Q=K=>{if(!r.find(A=>A.id===K)?.sortable&&!l)return;let j="asc";P.columnId===K&&(P.direction==="asc"?j="desc":P.direction==="desc"&&(j=null)),H({columnId:j?K:null,direction:j});},re=K=>P.columnId!==K?jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"h-4 w-4 text-muted-foreground/50"}):P.direction==="asc"?jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"});return jsxRuntime.jsxs("div",{ref:w,className:i("w-full",e),...y,children:[jsxRuntime.jsx("div",{className:"relative w-full overflow-auto rounded-md border",children:jsxRuntime.jsxs("table",{className:"w-full caption-bottom text-sm",children:[jsxRuntime.jsx("thead",{className:"[&_tr]:border-b bg-muted/50",children:jsxRuntime.jsxs("tr",{children:[a&&jsxRuntime.jsx("th",{className:"h-12 w-12 px-4",children:jsxRuntime.jsx(Bn,{checked:F?true:O?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),r.map(K=>{let B=K.sortable??l;return jsxRuntime.jsx("th",{className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground",B&&"cursor-pointer select-none hover:text-foreground"),style:{width:K.width},onClick:()=>B&&Q(K.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[K.header,B&&re(K.id)]})},K.id)})]})}),jsxRuntime.jsx("tbody",{className:"[&_tr:last-child]:border-0",children:x?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:"Loading..."})}):I.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{colSpan:r.length+(a?1:0),className:"h-24 text-center text-muted-foreground",children:b})}):I.map((K,B)=>{let j=s(K,B),A=N.has(j);return jsxRuntime.jsxs("tr",{className:i("border-b transition-colors",v&&"hover:bg-muted/50",g&&B%2===1&&"bg-muted/30",A&&"bg-muted"),"data-state":A?"selected":void 0,children:[a&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx(Bn,{checked:A,onCheckedChange:U=>V(j,!!U),"aria-label":`Select row ${B+1}`})}),r.map(U=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:U.cell?U.cell(K,B):U.accessor(K)},U.id))]},j)})})]})}),m&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:"Rows per page:"}),jsxRuntime.jsx("select",{value:k.pageSize,onChange:K=>S({pageIndex:0,pageSize:Number(K.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(K=>jsxRuntime.jsx("option",{value:K,children:K},K))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",k.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(J,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...k,pageIndex:k.pageIndex-1}),disabled:k.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(J,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...k,pageIndex:k.pageIndex+1}),disabled:k.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var _0=$__namespace.forwardRef($0);var Vm=classVarianceAuthority.cva("animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},color:{default:"text-foreground",primary:"text-primary",muted:"text-muted-foreground",success:"text-success",warning:"text-warning",danger:"text-danger",white:"text-white"}},defaultVariants:{size:"md",color:"default"}}),j0={sm:"text-xs",md:"text-sm",lg:"text-base"},Am=$__namespace.forwardRef(({className:e,size:t="md",color:r,label:a="Loading",text:n,textPosition:o="right",customColor:s,...l},c)=>{let d=jsxRuntime.jsxs("svg",{className:i(Vm({size:t,color:s?void 0:r})),style:s?{color:s}:void 0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status","aria-label":a,children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.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"})]});if(!n)return jsxRuntime.jsx("div",{ref:c,className:i("inline-flex",e),...l,children:d});let m=jsxRuntime.jsx("span",{className:i("text-muted-foreground",j0[t]),children:n}),u=o==="top"||o==="bottom";return jsxRuntime.jsxs("div",{ref:c,className:i("inline-flex items-center",u?"flex-col gap-2":"flex-row gap-3",(o==="left"||o==="top")&&(u?"flex-col-reverse":"flex-row-reverse"),e),...l,children:[d,m]})});Am.displayName="Spinner";var _i=["January","February","March","April","May","June","July","August","September","October","November","December"];function Q0({currentMonth:e,onMonthChange:t,startYear:r,endYear:a}){let[n,o]=$__namespace.useState(false),[s,l]=$__namespace.useState(false),c=$__namespace.useRef(null),d=$__namespace.useRef(null),m=dateFns.getMonth(e),u=dateFns.getYear(e);$__namespace.useEffect(()=>{function x(g){c.current&&!c.current.contains(g.target)&&o(false),d.current&&!d.current.contains(g.target)&&l(false);}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);let f=x=>{let g=dateFns.setMonth(e,x);t(g),o(false);},p=x=>{let g=dateFns.setYear(e,x);t(g),l(false);},b=$__namespace.useMemo(()=>{let x=[];for(let g=a;g>=r;g--)x.push(g);return x},[r,a]);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("div",{ref:c,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>{o(!n),l(false);},className:i("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[120px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",n&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsxRuntime.jsx("span",{children:_i[m]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 text-muted-foreground transition-transform",n&&"rotate-180")})]}),n&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[140px] rounded-md border border-border bg-background shadow-lg",children:jsxRuntime.jsx(je,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:_i.map((x,g)=>jsxRuntime.jsx("button",{type:"button",onClick:()=>f(g),className:i("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",m===g&&"bg-primary/10 text-primary font-medium"),children:x},x))})})})]}),jsxRuntime.jsxs("div",{ref:d,className:"relative",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>{l(!s),o(false);},className:i("inline-flex items-center justify-between gap-2 px-3 py-1.5 rounded-md","text-sm font-medium w-[85px]","border border-border bg-background","hover:bg-muted transition-colors cursor-pointer",s&&"ring-2 ring-primary ring-offset-2 ring-offset-background"),children:[jsxRuntime.jsx("span",{children:u}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 text-muted-foreground transition-transform",s&&"rotate-180")})]}),s&&jsxRuntime.jsx("div",{className:"absolute top-full left-0 mt-1 z-50 min-w-[100px] rounded-md border border-border bg-background shadow-lg",children:jsxRuntime.jsx(je,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"p-1",children:b.map(x=>jsxRuntime.jsx("button",{type:"button",onClick:()=>p(x),className:i("w-full text-left px-3 py-2 text-sm rounded-md","hover:bg-muted transition-colors cursor-pointer",u===x&&"bg-primary/10 text-primary font-medium"),children:x},x))})})})]})]})}function ew(e,t,r){return function({calendarMonth:n}){let{goToMonth:o,nextMonth:s,previousMonth:l}=reactDayPicker.useDayPicker();if(e)return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsx(Q0,{currentMonth:n.date,onMonthChange:o,startYear:t,endYear:r}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!l,onClick:()=>l&&o(l),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&o(s),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]});let c=_i[n.date.getMonth()],d=n.date.getFullYear();return jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2 h-10 mb-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium w-[90px]",children:c}),jsxRuntime.jsx("span",{className:"text-sm font-medium w-[50px]",children:d})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("button",{type:"button",disabled:!l,onClick:()=>l&&o(l),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Previous month",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",disabled:!s,onClick:()=>s&&o(s),className:i("h-8 w-8 inline-flex items-center justify-center rounded-md","text-muted-foreground hover:text-foreground hover:bg-muted","transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed"),"aria-label":"Next month",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})}}function sn({className:e,classNames:t,showOutsideDays:r=true,showMonthAndYearPickers:a=false,startYear:n=1900,endYear:o=new Date().getFullYear()+50,components:s,...l}){let c=$__namespace.useMemo(()=>ew(a,n,o),[a,n,o]);return jsxRuntime.jsx(reactDayPicker.DayPicker,{showOutsideDays:r,className:i("p-4",e),classNames:{months:"flex flex-col sm:flex-row gap-4",month:"flex flex-col gap-2",month_caption:"sr-only",nav:"hidden",month_grid:"w-full border-collapse",weekdays:"flex",weekday:"text-muted-foreground w-10 font-normal text-xs text-center",week:"flex w-full mt-1",day:i("relative h-10 w-10 p-0 text-center text-sm","flex items-center justify-center","focus-within:relative focus-within:z-20","[&:has([aria-selected]:not(.outside-day))]:bg-accent","first:[&:has([aria-selected]:not(.outside-day))]:rounded-l-md","last:[&:has([aria-selected]:not(.outside-day))]:rounded-r-md"),day_button:i("size-10 p-0 font-normal rounded-md text-sm","inline-flex items-center justify-center","hover:bg-primary/10 hover:text-primary","focus:outline-none","transition-colors cursor-pointer"),range_start:"rounded-l-md",range_end:"rounded-r-md",selected:i("bg-primary text-primary-foreground rounded-md","hover:bg-primary/90 hover:!text-primary-foreground","focus:bg-primary focus:text-primary-foreground","[&.outside-day]:bg-transparent [&.outside-day]:text-muted-foreground/50"),today:"bg-accent text-accent-foreground rounded-md",outside:"outside-day text-muted-foreground/50",disabled:"text-muted-foreground/30 cursor-not-allowed",range_middle:"rounded-none",hidden:"invisible",...t},modifiersStyles:{range_middle:{backgroundColor:"var(--color-muted)",color:"var(--color-foreground)",borderRadius:0},outside:{backgroundColor:"transparent"}},components:{...s,MonthCaption:c},...l})}sn.displayName="Calendar";var Fm=({className:e,...t})=>jsxRuntime.jsx("nav",{role:"navigation","aria-label":"pagination",className:i("mx-auto flex w-full justify-center",e),...t});Fm.displayName="Pagination";var Km=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("ul",{ref:r,className:i("flex flex-row items-center gap-1",e),...t}));Km.displayName="PaginationContent";var Gm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("li",{ref:r,className:i("",e),...t}));Gm.displayName="PaginationItem";var as=({className:e,isActive:t,size:r="icon",...a})=>jsxRuntime.jsx("a",{"aria-current":t?"page":void 0,className:i(fr({variant:t?"solid":"light",size:r}),e),...a});as.displayName="PaginationLink";var $m=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to previous page",size:"md",className:i("gap-1 pl-2.5",e),...t,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:"Previous"})]});$m.displayName="PaginationPrevious";var _m=({className:e,...t})=>jsxRuntime.jsxs(as,{"aria-label":"Go to next page",size:"md",className:i("gap-1 pr-2.5",e),...t,children:[jsxRuntime.jsx("span",{children:"Next"}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})]});_m.displayName="PaginationNext";var Wm=({className:e,...t})=>jsxRuntime.jsxs("span",{"aria-hidden":true,className:i("flex h-9 w-9 items-center justify-center",e),...t,children:[jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"More pages"})]});Wm.displayName="PaginationEllipsis";var Ui=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command,{ref:r,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Ui.displayName=cmdk.Command.displayName;var ow=({children:e,...t})=>jsxRuntime.jsx(ko,{...t,children:jsxRuntime.jsx(Lo,{className:"overflow-hidden p-0 shadow-lg",children:jsxRuntime.jsx(Ui,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),jm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:r,className:i("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));jm.displayName=cmdk.Command.Input.displayName;var Um=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.List,{ref:r,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Um.displayName=cmdk.Command.List.displayName;var Ym=$__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ym.displayName=cmdk.Command.Empty.displayName;var Xm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:r,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Xm.displayName=cmdk.Command.Group.displayName;var qm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:r,className:i("-mx-1 h-px bg-border",e),...t}));qm.displayName=cmdk.Command.Separator.displayName;var Zm=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:r,className:i("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Zm.displayName=cmdk.Command.Item.displayName;var Jm=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Jm.displayName="CommandShortcut";var Qm=$__namespace.forwardRef(({className:e,showToggle:t=true,disabled:r,onFocus:a,onBlur:n,style:o,...s},l)=>{let[c,d]=$__namespace.useState(false),[m,u]=$__namespace.useState(false);return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{type:c?"text":"password",className:i("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",t&&"pr-10",e),ref:l,disabled:r,style:{...o,borderColor:m?"var(--color-foreground)":void 0},onFocus:f=>{u(true),a?.(f);},onBlur:f=>{u(false),n?.(f);},...s}),t&&jsxRuntime.jsx("button",{type:"button",className:"absolute right-0 top-0 h-10 w-10 px-3 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>d(!c),disabled:r,tabIndex:-1,"aria-label":c?"Hide password":"Show password",children:c?jsxRuntime.jsx(lucideReact.EyeOff,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Eye,{className:"h-4 w-4"})})]})});Qm.displayName="PasswordInput";var ep=$__namespace.forwardRef(({className:e,showButtons:t=true,step:r=1,min:a,max:n,value:o,defaultValue:s,onChange:l,disabled:c,...d},m)=>{let[u,f]=$__namespace.useState(s),[p,b]=$__namespace.useState(false),x=o!==void 0,g=x?o:u,v=T=>{T!==void 0&&(a!==void 0&&T<a&&(T=a),n!==void 0&&T>n&&(T=n)),x||f(T),l?.(T);},y=()=>{v((g??0)+r);},w=()=>{v((g??0)-r);},h=T=>{let L=T.target.value;if(L==="")v(void 0);else {let N=parseFloat(L);isNaN(N)||v(N);}},C=T=>{T.key==="ArrowUp"?(T.preventDefault(),y()):T.key==="ArrowDown"&&(T.preventDefault(),w());},R=a===void 0||(g??0)>a,M=n===void 0||(g??0)<n;return t?jsxRuntime.jsxs("div",{className:i("relative flex items-center rounded-md border transition-colors",p?"border-foreground":"border-input",c&&"opacity-50",e),children:[jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:w,disabled:c||!R,tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}),jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:"min-w-0 flex-1 h-10 bg-background text-sm text-center focus:outline-none disabled:cursor-not-allowed",ref:m,value:g??"",onChange:h,onKeyDown:C,disabled:c,onFocus:()=>b(true),onBlur:()=>b(false),...d}),jsxRuntime.jsx("button",{type:"button",className:"h-10 w-10 shrink-0 flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:y,disabled:c||!M,tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}):jsxRuntime.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:i("flex h-10 w-full bg-background px-3 py-2 text-sm text-center border rounded-md placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",p?"border-foreground":"border-input",e),ref:m,value:g??"",onChange:h,onKeyDown:C,disabled:c,onFocus:()=>b(true),onBlur:()=>b(false),...d})});ep.displayName="NumberInput";var rp=$__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date",dateFormat:n="PPP",disabled:o=false,minDate:s,maxDate:l,className:c},d)=>{let[m,u]=$__namespace.useState(false),[f,p]=$__namespace.useState(t),b=e!==void 0,x=b?e:f,g=v=>{b||p(v),r?.(v),u(false);};return jsxRuntime.jsxs(at,{open:m,onOpenChange:u,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(J,{ref:d,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!x&&"text-muted-foreground",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),x?dateFns.format(x,n):a]})}),jsxRuntime.jsx(nt,{className:"w-auto p-0",align:"start",children:jsxRuntime.jsx(sn,{mode:"single",selected:x,onSelect:g,disabled:v=>!!(s&&v<s||l&&v>l),initialFocus:true})})]})});rp.displayName="DatePicker";var sp=classVarianceAuthority.cva("flex -space-x-2",{variants:{size:{sm:"-space-x-2",md:"-space-x-2.5",lg:"-space-x-3"}},defaultVariants:{size:"md"}}),ap=classVarianceAuthority.cva("border-2 border-background ring-0 cursor-pointer transition-transform duration-200 hover:-translate-y-1",{variants:{size:{sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base"}},defaultVariants:{size:"md"}}),ip=$__namespace.forwardRef(({className:e,items:t,max:r=5,size:a,showTooltips:n=false,...o},s)=>{let l=t.slice(0,r),c=t.length-r,d=(u,f)=>{let p=jsxRuntime.jsxs(Ma,{className:i(ap({size:a})),children:[u.src&&jsxRuntime.jsx(an,{src:u.src,alt:u.alt||""}),jsxRuntime.jsx(Ta,{className:"text-xs",children:u.fallback||u.alt?.charAt(0)?.toUpperCase()||"?"})]},f);return n&&u.alt?jsxRuntime.jsxs(Wr,{children:[jsxRuntime.jsx(jr,{asChild:true,children:p}),jsxRuntime.jsx(Ur,{className:"bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100",children:u.alt})]},f):p},m=jsxRuntime.jsxs("div",{ref:s,className:i(sp({size:a,className:e})),...o,children:[l.map((u,f)=>d(u,f)),c>0&&jsxRuntime.jsx(Ma,{className:i(ap({size:a})),children:jsxRuntime.jsxs(Ta,{className:"bg-muted text-muted-foreground",children:["+",c]})})]});return n?jsxRuntime.jsx(_r,{delayDuration:300,children:m}):m});ip.displayName="AvatarGroup";var lp=classVarianceAuthority.cva("flex gap-0.5",{variants:{size:{sm:"[&_svg]:h-4 [&_svg]:w-4",md:"[&_svg]:h-5 [&_svg]:w-5",lg:"[&_svg]:h-6 [&_svg]:w-6"}},defaultVariants:{size:"md"}}),cp=$__namespace.forwardRef(({className:e,value:t,defaultValue:r=0,onValueChange:a,max:n=5,size:o,icon:s="star",allowHalf:l=false,readOnly:c=false,disabled:d=false,filledColor:m,emptyColor:u,...f},p)=>{let[b,x]=$__namespace.useState(r),[g,v]=$__namespace.useState(null),y=t!==void 0,w=y?t:b,h=g!==null?g:w,C=E=>{c||d||(y||x(E),a?.(E));},R=(E,H=false)=>{let S=l&&H?E+.5:E+1;C(S);},M=(E,H)=>{if(c||d)return;let S=E.currentTarget.getBoundingClientRect(),D=l&&E.clientX<S.left+S.width/2;v(D?H+.5:H+1);},T=()=>{v(null);},L=s==="heart"?lucideReact.Heart:lucideReact.Star,N=E=>h>=E+1?"full":h>=E+.5?"half":"empty",P=m?{color:m,fill:m}:{},k=u?{color:u}:{};return jsxRuntime.jsx("div",{ref:p,className:i(lp({size:o,className:e}),d&&"opacity-50 cursor-not-allowed"),onMouseLeave:T,role:"radiogroup","aria-label":"Rating",...f,children:Array.from({length:n},(E,H)=>{let S=N(H);return jsxRuntime.jsxs("button",{type:"button",className:i("relative focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",!c&&!d&&"cursor-pointer hover:scale-110 transition-transform"),onClick:D=>{let I=D.currentTarget.getBoundingClientRect(),z=l&&D.clientX<I.left+I.width/2;R(H,z);},onMouseMove:D=>M(D,H),disabled:d||c,"aria-label":`Rate ${H+1} out of ${n}`,role:"radio","aria-checked":w===H+1,children:[jsxRuntime.jsx(L,{className:i("text-muted-foreground/30",S!=="empty"&&"absolute inset-0"),style:S==="empty"?k:void 0}),S!=="empty"&&jsxRuntime.jsx(L,{className:i("text-yellow-500 fill-yellow-500",s==="heart"&&"text-red-500 fill-red-500",S==="half"&&"clip-path-half"),style:{...P,clipPath:S==="half"?"inset(0 50% 0 0)":void 0}})]},H)})})});cp.displayName="Rating";var mp=classVarianceAuthority.cva("inline-flex items-center justify-center gap-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"border-transparent text-primary-foreground",outline:"border bg-transparent",ghost:"border-transparent bg-transparent",soft:"border-transparent",surface:"border-transparent bg-muted text-muted-foreground"},color:{primary:"",secondary:"",success:"",warning:"",danger:"",info:""},size:{sm:"h-6 px-2 text-xs",md:"h-7 px-2.5 text-sm",lg:"h-8 px-3 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},clickable:{true:"cursor-pointer",false:""}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"solid",color:"success",className:"bg-success hover:bg-success/90"},{variant:"solid",color:"warning",className:"bg-warning text-warning-foreground hover:bg-warning/90"},{variant:"solid",color:"danger",className:"bg-danger hover:bg-danger/90"},{variant:"solid",color:"info",className:"bg-info hover:bg-info/90"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/10"},{variant:"outline",color:"secondary",className:"border-secondary text-secondary-foreground hover:bg-secondary/10"},{variant:"outline",color:"success",className:"border-success text-success hover:bg-success/10"},{variant:"outline",color:"warning",className:"border-warning text-warning hover:bg-warning/10"},{variant:"outline",color:"danger",className:"border-danger text-danger hover:bg-danger/10"},{variant:"outline",color:"info",className:"border-info text-info hover:bg-info/10"},{variant:"ghost",color:"primary",className:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"secondary",className:"text-secondary-foreground hover:bg-secondary"},{variant:"ghost",color:"success",className:"text-success hover:bg-success/10"},{variant:"ghost",color:"warning",className:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"danger",className:"text-danger hover:bg-danger/10"},{variant:"ghost",color:"info",className:"text-info hover:bg-info/10"},{variant:"soft",color:"primary",className:"bg-primary/15 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/80"},{variant:"soft",color:"success",className:"bg-success/15 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/15 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/15 text-danger hover:bg-danger/20"},{variant:"soft",color:"info",className:"bg-info/15 text-info hover:bg-info/20"}],defaultVariants:{variant:"solid",color:"primary",size:"md",radius:"full",clickable:false}}),yw=classVarianceAuthority.cva("ml-1 rounded-full p-0.5 transition-colors hover:bg-black/10 dark:hover:bg-white/10",{variants:{size:{sm:"[&_svg]:size-3",md:"[&_svg]:size-3.5",lg:"[&_svg]:size-4"}},defaultVariants:{size:"md"}}),pp=$__namespace.forwardRef(({className:e,variant:t,color:r,size:a,radius:n,clickable:o,startContent:s,endContent:l,closable:c,onClose:d,disabled:m,avatar:u,children:f,onClick:p,...b},x)=>{let g=o||!!p,v=y=>{y.stopPropagation(),d?.();};return jsxRuntime.jsxs("div",{ref:x,role:g?"button":void 0,tabIndex:g&&!m?0:void 0,"aria-disabled":m,onClick:m?void 0:p,onKeyDown:g&&!m?y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p?.(y));}:void 0,className:i(mp({variant:t,color:r,size:a,radius:n,clickable:g}),m&&"opacity-50 cursor-not-allowed",e),...b,children:[u&&jsxRuntime.jsx("span",{className:"-ml-1 [&>*]:size-5 [&>*]:rounded-full",children:u}),s&&jsxRuntime.jsx("span",{className:"shrink-0",children:s}),jsxRuntime.jsx("span",{className:"truncate",children:f}),l&&jsxRuntime.jsx("span",{className:"shrink-0",children:l}),c&&jsxRuntime.jsx("button",{type:"button","aria-label":"Remove",onClick:v,disabled:m,className:i(yw({size:a})),children:jsxRuntime.jsx(lucideReact.X,{})})]})});pp.displayName="Chip";var fp=$.createContext({direction:"horizontal"}),kw=({className:e,direction:t="horizontal",children:r,...a})=>jsxRuntime.jsx(fp.Provider,{value:{direction:t},children:jsxRuntime.jsx(reactResizablePanels.Group,{orientation:t,className:i("flex h-full w-full data-[orientation=vertical]:flex-col",e),...a,children:r})}),Lw=reactResizablePanels.Panel,Ew=({withHandle:e,className:t,...r})=>{let{direction:a}=$.useContext(fp),n=a==="vertical";return jsxRuntime.jsx(reactResizablePanels.Separator,{className:i("relative flex shrink-0 items-center justify-center bg-border outline-none",n?"h-px w-full after:absolute after:inset-x-0 after:top-1/2 after:h-1 after:-translate-y-1/2":"w-px after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2",t),...r,children:e&&jsxRuntime.jsx("div",{className:i("z-10 flex items-center justify-center rounded-sm border bg-border",n?"h-3 w-4 rotate-90":"h-4 w-3"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-2.5 w-2.5"})})})};var vp=classVarianceAuthority.cva("inline-flex items-center gap-1",{variants:{size:{sm:"[&>span]:h-1 [&>span]:w-1",md:"[&>span]:h-1.5 [&>span]:w-1.5",lg:"[&>span]:h-2 [&>span]:w-2",xl:"[&>span]:h-3 [&>span]:w-3"}},defaultVariants:{size:"md"}}),hp=$__namespace.forwardRef(({className:e,size:t,count:r=3,...a},n)=>jsxRuntime.jsx("span",{ref:n,role:"status","aria-label":"Loading",className:i(vp({size:t,className:e})),...a,children:Array.from({length:r}).map((o,s)=>jsxRuntime.jsx("span",{className:"rounded-full bg-current animate-dots-bounce",style:{animationDelay:`${s*.16}s`}},s))}));hp.displayName="Dots";var wp=classVarianceAuthority.cva("relative inline-flex items-center justify-center",{variants:{size:{sm:"h-8 w-8",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-24 w-24"},color:{default:"",primary:"",success:"",warning:"",danger:""}},defaultVariants:{size:"md",color:"default"}}),Hw={sm:{size:32,strokeWidth:3,fontSize:"text-[10px]"},md:{size:48,strokeWidth:4,fontSize:"text-xs"},lg:{size:64,strokeWidth:5,fontSize:"text-sm"},xl:{size:96,strokeWidth:6,fontSize:"text-base"}},xp={default:"var(--color-foreground, #18181b)",primary:"var(--color-primary, #18181b)",success:"var(--color-success, #16a34a)",warning:"var(--color-warning, #d97706)",danger:"var(--color-danger, #dc2626)"},Cp=$__namespace.forwardRef(({className:e,size:t="md",color:r="default",value:a,max:n=100,showValue:o=false,formatValue:s=m=>`${Math.round(m)}%`,trackClassName:l,...c},d)=>{let m=Math.min(100,Math.max(0,a/n*100)),u=Hw[t],f=(u.size-u.strokeWidth)/2,p=2*Math.PI*f,b=p-m/100*p;return jsxRuntime.jsxs("div",{ref:d,className:i(wp({size:t,color:r}),e),role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":n,...c,children:[jsxRuntime.jsxs("svg",{width:u.size,height:u.size,viewBox:`0 0 ${u.size} ${u.size}`,fill:"none",children:[jsxRuntime.jsx("circle",{className:i("stroke-muted",l),cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:u.size/2,cy:u.size/2,r:f,strokeWidth:u.strokeWidth,fill:"none",strokeLinecap:"round",stroke:xp[r]||xp.default,strokeDasharray:`${p} ${p}`,strokeDashoffset:b,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:"stroke-dashoffset 0.3s ease-in-out"}})]}),o&&jsxRuntime.jsx("span",{className:i("absolute font-medium text-foreground",u.fontSize),children:s(m)})]})});Cp.displayName="CircularProgress";var Np=$__namespace.createContext(null),Aw=()=>{let e=$__namespace.useContext(Np);if(!e)throw new Error("OTP components must be used within InputOTP");return e},Mp=classVarianceAuthority.cva("flex items-center gap-2 has-[:disabled]:opacity-50",{variants:{size:{sm:"[&_[data-otp-slot]]:h-8 [&_[data-otp-slot]]:w-8 [&_[data-otp-slot]]:text-xs",md:"[&_[data-otp-slot]]:h-10 [&_[data-otp-slot]]:w-10 [&_[data-otp-slot]]:text-sm",lg:"[&_[data-otp-slot]]:h-12 [&_[data-otp-slot]]:w-12 [&_[data-otp-slot]]:text-base"}},defaultVariants:{size:"md"}}),Tp=$__namespace.forwardRef(({className:e,containerClassName:t,maxLength:r,value:a,defaultValue:n="",onChange:o,onComplete:s,pattern:l,disabled:c=false,size:d,children:m,...u},f)=>{let[p,b]=$__namespace.useState(n),[x,g]=$__namespace.useState(0),[v,y]=$__namespace.useState(false),w=$__namespace.useRef(null),h=a!==void 0?a:p;$__namespace.useImperativeHandle(f,()=>w.current),$__namespace.useEffect(()=>{g(Math.min(h.length,r-1));},[h,r]),$__namespace.useEffect(()=>{h.length===r&&s&&s(h);},[h,r,s]);let C=P=>{let k=P.target.value;if(l&&k){let E=new RegExp(l.replace("^","").replace("$","").replace("+",""));k=k.split("").filter(H=>E.test(H)).join("");}k=k.slice(0,r),a===void 0&&b(k),o?.(k);},R=P=>{P.key==="ArrowLeft"?g(k=>Math.max(0,k-1)):P.key==="ArrowRight"&&g(k=>Math.min(h.length,r-1,k+1));},M=()=>{w.current?.focus();},T=()=>{y(true),g(Math.min(h.length,r-1));},L=()=>{y(false);},N={value:h,activeIndex:v?x:-1,maxLength:r,disabled:c};return jsxRuntime.jsx(Np.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:i(Mp({size:d}),t),onClick:M,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:h,onChange:C,onKeyDown:R,onFocus:T,onBlur:L,disabled:c,maxLength:r,className:i("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),m]})})});Tp.displayName="InputOTP";var Pp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center",e),...t}));Pp.displayName="InputOTPGroup";var kp=$__namespace.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:o,disabled:s}=Aw(),l=n[e]||"",c=o===e,d=c&&n.length===e;return jsxRuntime.jsxs("div",{ref:a,"data-otp-slot":true,"data-active":c,"data-filled":!!l,className:i("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm font-medium transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 border-foreground",s&&"cursor-not-allowed opacity-50",t),...r,children:[l,d&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});kp.displayName="InputOTPSlot";var Lp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("text-muted-foreground",e),...t,children:jsxRuntime.jsx(lucideReact.Minus,{className:"h-4 w-4"})}));Lp.displayName="InputOTPSeparator";var Sp=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-zinc-800 text-white dark:bg-zinc-200 dark:text-zinc-900",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-600",light:"bg-transparent text-zinc-800 hover:bg-zinc-100 dark:text-white dark:hover:bg-zinc-800",flat:"bg-zinc-100 text-zinc-800 dark:bg-zinc-800 dark:text-white",ghost:"border-2 border-zinc-800 bg-transparent dark:border-white"},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-2.5 text-xs",lg:"h-7 px-3 text-sm"}},defaultVariants:{variant:"flat",size:"md"}}),Hp=$__namespace.forwardRef(({className:e,variant:t,size:r,value:a=[],onChange:n,placeholder:o="Add tag...",maxTags:s,minTagLength:l=1,maxTagLength:c=50,triggerKeys:d=["Enter",",","Tab"],allowDuplicates:m=false,disabled:u,readOnly:f,renderTag:p,...b},x)=>{let[g,v]=$__namespace.useState(""),y=$__namespace.useRef(null);$__namespace.useImperativeHandle(x,()=>y.current);let w=N=>{let P=N.trim();if(P.length<l||P.length>c||s&&a.length>=s||!m&&a.some(E=>E.text.toLowerCase()===P.toLowerCase()))return;let k={id:crypto.randomUUID(),text:P};n?.([...a,k]),v("");},h=N=>{u||f||n?.(a.filter(P=>P.id!==N));},C=N=>{if(d.includes(N.key)){if(N.key==="Tab"&&!g)return;N.preventDefault(),w(g);}N.key==="Backspace"&&!g&&a.length>0&&h(a[a.length-1].id);},R=N=>{let P=N.target.value;if(P.includes(",")){P.split(",").forEach(E=>{E.trim()&&w(E);});return}v(P);},M=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(E=>{w(E);});},T=()=>{y.current?.focus();},L=s?a.length>=s:false;return jsxRuntime.jsxs("div",{className:i("flex min-h-10 w-full flex-wrap gap-1.5 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",u&&"cursor-not-allowed opacity-50",e),onClick:T,children:[a.map(N=>p?p(N,()=>h(N.id)):jsxRuntime.jsxs("span",{className:i(Sp({variant:t,size:r})),children:[N.text,!u&&!f&&jsxRuntime.jsx("button",{type:"button",onClick:P=>{P.stopPropagation(),h(N.id);},className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${N.text}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},N.id)),!L&&!f&&jsxRuntime.jsx("input",{ref:y,type:"text",value:g,onChange:R,onKeyDown:C,onPaste:M,placeholder:a.length===0?o:"",disabled:u,className:i("flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed","min-w-[80px]"),...b})]})});Hp.displayName="TagInput";var Vp=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-2 py-6",md:"gap-3 py-10",lg:"gap-4 py-16"}},defaultVariants:{size:"md"}}),Ap=$__namespace.forwardRef(({className:e,size:t,icon:r,title:a,description:n,action:o,children:s,...l},c)=>jsxRuntime.jsxs("div",{ref:c,className:i(Vp({size:t,className:e})),...l,children:[r&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-10 [&>svg]:w-10",children:r}),a&&jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:a}),n&&jsxRuntime.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:n}),o&&jsxRuntime.jsx("div",{className:"mt-2",children:o}),s]}));Ap.displayName="EmptyState";var Bp=classVarianceAuthority.cva("border p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-zinc-800 text-white border-zinc-800 dark:bg-zinc-200 dark:text-zinc-900 dark:border-zinc-200",bordered:"border-2 border-zinc-300 bg-transparent dark:border-zinc-700",light:"bg-transparent border-transparent shadow-none",flat:"bg-zinc-100 border-transparent dark:bg-zinc-800",ghost:"border-2 border-zinc-900 bg-transparent dark:border-white"},radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"bordered",radius:"md"}}),Op=$__namespace.forwardRef(({className:e,variant:t,radius:r,label:a,value:n,icon:o,trend:s,trendValue:l,description:c,...d},m)=>{let u=s==="up"?lucideReact.TrendingUp:s==="down"?lucideReact.TrendingDown:lucideReact.Minus,f=s==="up"?"text-green-500":s==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:m,className:i(Bp({variant:t,radius:r,className:e})),...d,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:i("text-sm font-medium",t==="solid"?"opacity-80":"text-muted-foreground"),children:a}),o&&jsxRuntime.jsx("div",{className:i("[&>svg]:h-4 [&>svg]:w-4",t==="solid"?"opacity-80":"text-muted-foreground"),children:o})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:n}),s&&l&&jsxRuntime.jsxs("span",{className:i("flex items-center gap-0.5 text-sm",f),children:[jsxRuntime.jsx(u,{className:"h-3 w-3"}),l]})]}),c&&jsxRuntime.jsx("p",{className:i("mt-1 text-xs",t==="solid"?"opacity-70":"text-muted-foreground"),children:c})]})});Op.displayName="StatCard";var Zi=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",striped:"gap-2 [&>*:nth-child(odd)]:bg-muted/50",filled:"gap-2 bg-muted/30 rounded-lg p-2"},size:{sm:"[&>*]:py-2 [&>*]:px-3",md:"[&>*]:py-3 [&>*]:px-4",lg:"[&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}}),Uw=({checked:e,disabled:t,onClick:r})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":e,disabled:t,onClick:a=>{a.stopPropagation(),t||r(a);},className:i("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e&&"bg-primary text-primary-foreground",t&&"cursor-not-allowed opacity-50"),children:e&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})});function Yw({className:e,variant:t,size:r,items:a,renderItem:n,draggable:o=false,onReorder:s,showHandle:l=true,dragIcon:c,selectable:d=false,multiple:m=false,selectedKeys:u,defaultSelectedKeys:f=[],onSelect:p,checkable:b=false,checkedKeys:x,defaultCheckedKeys:g=[],onCheck:v,children:y,...w},h){let[C,R]=$__namespace.useState(null),[M,T]=$__namespace.useState(null),[L,N]=$__namespace.useState(new Set(f)),P=u!==void 0,k=P?new Set(u):L,[E,H]=$__namespace.useState(new Set(g)),S=x!==void 0,D=S?new Set(x):E,I=(B,j)=>{R(j),B.dataTransfer.effectAllowed="move",B.dataTransfer.setData("text/plain",String(j));},z=(B,j)=>{B.preventDefault(),!(C===null||C===j)&&T(j);},G=()=>{T(null);},V=(B,j)=>{if(B.preventDefault(),!a||C===null||C===j){R(null),T(null);return}let A=[...a],[U]=A.splice(C,1);A.splice(j,0,U),s?.(A),R(null),T(null);},F=()=>{R(null),T(null);},O=$__namespace.useCallback((B,j)=>{if(!a)return;let A=new Set(k),U=!A.has(B.id);m?U?A.add(B.id):A.delete(B.id):(A.clear(),U&&A.add(B.id)),P||N(A);let W=a.filter(he=>A.has(he.id));p?.(Array.from(A),{selected:U,selectedItems:W,item:B,event:j});},[a,k,m,P,p]),Q=$__namespace.useCallback((B,j)=>{if(!a)return;let A=new Set(D),U=!A.has(B.id);U?A.add(B.id):A.delete(B.id),S||H(A);let W=a.filter(he=>A.has(he.id));v?.(Array.from(A),{checked:U,checkedItems:W,item:B,event:j});},[a,D,S,v]);return (o||d||b)&&a&&n?jsxRuntime.jsx("div",{ref:h,role:"list",className:i(Zi({variant:t,size:r,className:e})),...w,children:a.map((B,j)=>{let A=k.has(B.id),U=D.has(B.id);return jsxRuntime.jsxs("div",{role:"listitem","aria-selected":d?A:void 0,draggable:o,onDragStart:o?me=>I(me,j):void 0,onDragOver:o?me=>z(me,j):void 0,onDragLeave:o?G:void 0,onDrop:o?me=>V(me,j):void 0,onDragEnd:o?F:void 0,onClick:d&&!b?me=>O(B,me):void 0,className:i("flex items-center gap-3 transition-all",o&&"cursor-move",d&&!b&&"cursor-pointer hover:bg-muted/50",b&&"cursor-pointer hover:bg-muted/50",C===j&&"opacity-50 scale-[1.02] z-10",M===j&&"border-primary border-dashed border rounded-md",A&&d&&!b&&"bg-primary/10"),children:[o&&l&&c!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:c??jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),b&&jsxRuntime.jsx(Uw,{checked:U,onClick:me=>Q(B,me)}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n(B,j)})]},B.id)})}):jsxRuntime.jsx("div",{ref:h,role:"list",className:i(Zi({variant:t,size:r,className:e})),...w,children:y})}var Xw=$__namespace.forwardRef(Yw),Kp=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),Gp=$__namespace.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:i(Kp({interactive:t,className:e})),...o,children:[r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:r}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 whitespace-nowrap",children:a})]}));Gp.displayName="ListItem";var $p=$__namespace.forwardRef(({className:e,primary:t,secondary:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("min-w-0",e),...n,children:[t&&jsxRuntime.jsx("p",{className:"text-sm font-medium leading-none truncate",children:t}),r&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground truncate",children:r}),a]}));$p.displayName="ListItemText";var jp=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Up=$__namespace.forwardRef(({className:e,position:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,"data-position":t,className:i(jp({position:t,className:e})),...r}));Up.displayName="Timeline";var Yp=classVarianceAuthority.cva("relative flex gap-4 pb-8 last:pb-0",{variants:{variant:{default:"",success:"[&_[data-timeline-dot]]:bg-green-500 [&_[data-timeline-dot]]:border-green-500",warning:"[&_[data-timeline-dot]]:bg-yellow-500 [&_[data-timeline-dot]]:border-yellow-500",error:"[&_[data-timeline-dot]]:bg-red-500 [&_[data-timeline-dot]]:border-red-500",info:"[&_[data-timeline-dot]]:bg-blue-500 [&_[data-timeline-dot]]:border-blue-500"}},defaultVariants:{variant:"default"}}),Xp=$__namespace.forwardRef(({className:e,variant:t,hideSeparator:r=false,hideConnector:a=false,dot:n,children:o,...s},l)=>jsxRuntime.jsxs("div",{ref:l,className:i(Yp({variant:t,className:e})),...s,children:[!r&&jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{"data-timeline-dot":true,className:"flex h-3 w-3 items-center justify-center rounded-full border-2 border-primary bg-primary",children:n}),!a&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}),o]}));Xp.displayName="TimelineItem";var qp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 pt-0.5",e),...t}));qp.displayName="TimelineContent";var Zp=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 text-sm text-muted-foreground pt-0.5",e),...t}));Zp.displayName="TimelineOpposite";var Qp=classVarianceAuthority.cva("inline-flex items-center rounded-lg bg-muted p-1 text-muted-foreground",{variants:{size:{sm:"h-8",md:"h-10",lg:"h-12"},fullWidth:{true:"w-full",false:""}},defaultVariants:{size:"md",fullWidth:false}}),ef=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"h-6 text-xs px-2.5",md:"h-8 text-sm px-3",lg:"h-10 text-base px-4"},selected:{true:"bg-background text-foreground shadow-sm",false:""}},defaultVariants:{size:"md",selected:false}}),tf=$__namespace.createContext({}),rf=$__namespace.forwardRef(({className:e,size:t="md",fullWidth:r,children:a,value:n,defaultValue:o,onValueChange:s,disabled:l,...c},d)=>{let[m,u]=$__namespace.useState(o),f=n!==void 0?n:m,p=$__namespace.useCallback(b=>{n===void 0&&u(b),s?.(b);},[n,s]);return jsxRuntime.jsx(tf.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:l},children:jsxRuntime.jsx("div",{ref:d,role:"group",className:i(Qp({size:t,fullWidth:r,className:e})),...c,children:a})})});rf.displayName="SegmentedControl";var af=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,...n},o)=>{let s=$__namespace.useContext(tf),l=s.value===r,c=a||s.disabled;return jsxRuntime.jsx("button",{ref:o,type:"button",role:"radio","aria-checked":l,"data-state":l?"on":"off",disabled:c,onClick:()=>{c||s.onValueChange?.(r);},className:i(ef({size:s.size,selected:l}),"flex-1",e),...n,children:t})});af.displayName="SegmentedControlItem";var nf=classVarianceAuthority.cva("relative flex flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",{variants:{variant:{default:"border-input bg-background hover:bg-accent/50",active:"border-primary bg-primary/5",error:"border-danger bg-danger/5"},size:{sm:"p-4 min-h-[120px]",md:"p-6 min-h-[160px]",lg:"p-8 min-h-[200px]"}},defaultVariants:{variant:"default",size:"md"}}),of=e=>{let t=e.type;return t.startsWith("image/")?lucideReact.Image:t.startsWith("video/")?lucideReact.FileVideo:t.startsWith("audio/")?lucideReact.FileAudio:t.includes("pdf")||t.includes("document")?lucideReact.FileText:t.includes("zip")||t.includes("rar")||t.includes("archive")?lucideReact.FileArchive:lucideReact.File},cs=e=>{if(e===0)return "0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,a)).toFixed(2))+" "+r[a]},sf=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${cs(t)}`}),r&&r.length>0&&(r.some(o=>{if(o.startsWith("."))return e.name.toLowerCase().endsWith(o.toLowerCase());if(o.endsWith("/*")){let s=o.slice(0,-2);return e.type.startsWith(s)}return e.type===o})||a.push({code:"file-invalid-type",message:`File type not accepted. Accepted: ${r.join(", ")}`})),a},lf=$__namespace.forwardRef(({className:e,variant:t,size:r,onFilesChange:a,onFilesRejected:n,onFileRemove:o,files:s=[],showFileList:l=true,children:c,maxSize:d=10*1024*1024,accept:m,multiple:u=true,disabled:f,...p},b)=>{let[x,g]=$__namespace.useState(false),[v,y]=$__namespace.useState(false),[w,h]=$__namespace.useState([]),C=$__namespace.useRef(null),R=$__namespace.useCallback(D=>{if(!D||D.length===0)return;let I=Array.from(D),z=[],G=[];(u?I:[I[0]]).forEach(F=>{let O=sf(F,d,m);O.length>0?G.push({file:F,errors:O}):z.push(F);}),h(G),z.length>0&&a?.(z),G.length>0&&n?.(G);},[d,m,u,a,n]),M=$__namespace.useCallback(D=>{if(D.preventDefault(),D.stopPropagation(),!f&&(g(true),D.dataTransfer.items)){let z=Array.from(D.dataTransfer.items).some(G=>{if(G.kind!=="file")return true;if(m&&m.length>0){let V=G.type;return !m.some(F=>F.endsWith("/*")?V.startsWith(F.slice(0,-2)):V===F)}return false});y(z);}},[f,m]),T=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!f&&(D.dataTransfer.dropEffect="copy");},[f]),L=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation();let I=D.currentTarget.getBoundingClientRect(),z=D.clientX,G=D.clientY;(z<I.left||z>I.right||G<I.top||G>I.bottom)&&(g(false),y(false));},[]),N=$__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),g(false),y(false),!f&&R(D.dataTransfer.files);},[f,R]),P=$__namespace.useCallback(()=>{f||C.current?.click();},[f]),k=$__namespace.useCallback(D=>{R(D.target.files),D.target.value="";},[R]),E=$__namespace.useCallback(D=>{f||(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),C.current?.click());},[f]),H=v?"error":x?"active":t,S=m?.join(",");return jsxRuntime.jsxs("div",{ref:b,className:i("space-y-4",e),...p,children:[jsxRuntime.jsxs("div",{role:"button",tabIndex:f?-1:0,onDragEnter:M,onDragOver:T,onDragLeave:L,onDrop:N,onClick:P,onKeyDown:E,className:i(nf({variant:H,size:r}),f&&"opacity-50 cursor-not-allowed",!f&&"cursor-pointer focus:outline-none"),"aria-disabled":f,children:[jsxRuntime.jsx("input",{ref:C,type:"file",accept:S,multiple:u,disabled:f,onChange:k,className:"sr-only",tabIndex:-1}),c||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[jsxRuntime.jsx("div",{className:"rounded-full bg-muted p-3",children:jsxRuntime.jsx(lucideReact.Upload,{className:"h-6 w-6 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:x?"Drop files here":"Drop files or click to upload"}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[d&&`Max ${cs(d)}`,m&&m.length>0&&` \u2022 ${m.join(", ")}`]})]})]})]}),w.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:w.map(({file:D,errors:I})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("span",{className:"font-medium",children:D.name}),":"," ",I.map(z=>z.message).join(", ")]},D.name))}),l&&s.length>0&&jsxRuntime.jsx("div",{className:"space-y-2",children:s.map(D=>{let I=of(D.file);return jsxRuntime.jsxs("div",{className:i("flex items-center gap-3 rounded-lg border p-3",D.error&&"border-danger bg-danger/5"),children:[jsxRuntime.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-muted",children:jsxRuntime.jsx(I,{className:"h-5 w-5 text-muted-foreground"})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"truncate text-sm font-medium",children:D.file.name}),jsxRuntime.jsxs("p",{className:"text-xs text-muted-foreground",children:[cs(D.file.size),D.error&&jsxRuntime.jsx("span",{className:"ml-2 text-danger",children:D.error})]}),D.progress!==void 0&&D.progress<100&&jsxRuntime.jsx(Jo,{value:D.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-foreground",onClick:z=>{z.stopPropagation(),o?.(D.file);},children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},D.id)})})]})});lf.displayName="FileUpload";var oC=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cg fill='%23ccc'%3E%3Crect width='4' height='4'/%3E%3Crect x='4' y='4' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E")`,df=classVarianceAuthority.cva("relative rounded-md border border-input shadow-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{xs:"h-4 w-4",sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10",xl:"h-12 w-12"},shape:{square:"rounded-md",circle:"rounded-full"},interactive:{true:"cursor-pointer hover:scale-110 active:scale-105",false:"cursor-default"}},defaultVariants:{size:"md",shape:"square",interactive:false}}),Xn=$__namespace.forwardRef(({color:e,isSelected:t,showTransparency:r=true,onSelect:a,size:n,shape:o,interactive:s,className:l,onClick:c,disabled:d,...m},u)=>jsxRuntime.jsx("button",{ref:u,type:"button",disabled:d,onClick:b=>{c?.(b),a?.(e);},className:i(df({size:n,shape:o,interactive:s??(!!a||!!c)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?oC:void 0,backgroundSize:r?"8px 8px":void 0},"aria-label":`Color ${e}`,"aria-pressed":t,...m,children:jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit]",style:{backgroundColor:e}})}));Xn.displayName="ColorSwatch";var uf=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),mf=$__namespace.forwardRef(({value:e,defaultValue:t,onChange:r,layout:a,columns:n=6,colors:o,swatchSize:s="md",swatchShape:l="square",disabled:c,className:d,style:m,...u},f)=>{let[p,b]=$__namespace.useState(t),x=e??p,g=$__namespace.useCallback(y=>{c||(e===void 0&&b(y),r?.(y));},[e,r,c]),v=y=>y.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:i(uf({layout:a}),d),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...m},...u,children:o.map(y=>{let w=x?v(x)===v(y):false;return jsxRuntime.jsx(Xn,{role:"option",color:y,size:s,shape:l,isSelected:w,onSelect:g,disabled:c,"aria-selected":w},y)})})});mf.displayName="ColorSwatchPicker";var lC=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],pf={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},ff=$__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=lC,showInput:o=true,size:s="md",className:l,variant:c="full"},d)=>{let[m,u]=$__namespace.useState(e??t),f=$__namespace.useId();$__namespace.useEffect(()=>{e!==void 0&&u(e);},[e]);let p=g=>{u(g),r?.(g);},b=g=>{u(g),r?.(g);},x=g=>{let v=g.target.value.toUpperCase();u(v),r?.(v);};return c==="simple"?jsxRuntime.jsxs("label",{className:i("relative rounded-md border border-input shadow-sm transition-colors cursor-pointer hover:border-foreground focus-within:border-foreground overflow-hidden",a&&"opacity-50 cursor-not-allowed",pf[s],l),children:[jsxRuntime.jsx("input",{type:"color",value:m,onChange:x,disabled:a,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",id:f}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:m}})]}):jsxRuntime.jsxs(at,{children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsx("button",{ref:d,disabled:a,className:i("rounded-md border border-input shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",pf[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsxRuntime.jsx(nt,{className:"w-auto p-3",align:"start",children:jsxRuntime.jsxs("div",{className:"space-y-3",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:m,onChange:p,className:"!w-[200px]"}),o&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Na,{htmlFor:"color-input",className:"text-xs",children:"Hex Color"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx("div",{className:"h-9 w-9 shrink-0 rounded-md border",style:{backgroundColor:m}}),jsxRuntime.jsx(reactColorful.HexColorInput,{id:"color-input",color:m,onChange:p,prefixed:true,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-sm uppercase ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]})]}),n.length>0&&jsxRuntime.jsxs("div",{className:"space-y-1.5",children:[jsxRuntime.jsx(Na,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(g=>jsxRuntime.jsx(Xn,{color:g,size:"sm",isSelected:m.toLowerCase()===g.toLowerCase(),onSelect:b},g))})]})]})})]})});ff.displayName="ColorPicker";var gf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),el=e=>String(e).padStart(2,"0"),pC=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},fC=(e,t)=>`${el(e)}:${el(t)}`,bf=$__namespace.forwardRef(({className:e,size:t,value:r,onChange:a,use24Hour:n=true,minuteStep:o=1,showPicker:s=true,minTime:l,maxTime:c,disabled:d,...m},u)=>{let[f,p]=$__namespace.useState(r??""),[b,x]=$__namespace.useState(false);$__namespace.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:g,minutes:v}=pC(f||"00:00"),y=L=>{let N=L.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},w=(L,N)=>{let P=Math.max(0,Math.min(23,L)),k=Math.max(0,Math.min(59,N)),E=fC(P,k);p(E),a?.(E);},h=()=>w(g+1,v),C=()=>w(g-1,v),R=()=>w(g,v+o),M=()=>w(g,v-o),T=({value:L,onIncrement:N,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:N,disabled:d,children:jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"flex h-10 w-12 items-center justify-center rounded-md bg-muted text-lg font-semibold",children:el(L)}),jsxRuntime.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:P,disabled:d,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})})]});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[jsxRuntime.jsx("input",{ref:u,type:"time",value:f,onChange:y,disabled:d,className:i(gf({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...m}),s&&jsxRuntime.jsxs(at,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(J,{type:"button",variant:"ghost",size:"sm",className:"absolute right-1 h-7 w-7 p-0",disabled:d,children:[jsxRuntime.jsx(lucideReact.Clock,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Pick time"})]})}),jsxRuntime.jsxs(nt,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(T,{value:g,onIncrement:h,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(T,{value:v,onIncrement:R,onDecrement:M,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(J,{variant:"bordered",size:"sm",onClick:()=>{let L=new Date;w(L.getHours(),L.getMinutes());},children:"Now"}),jsxRuntime.jsx(J,{size:"sm",onClick:()=>x(false),children:"Done"})]})]})]})]})});bf.displayName="TimeInput";var vf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),bC=(e,t)=>{try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(o=>o.type==="currency")?.value??e}catch{return e}},tl=(e,t,r,a)=>{let n=e.toFixed(t),[o,s]=n.split("."),l=o.replace(/\B(?=(\d{3})+(?!\d))/g,r);return s?`${l}${a}${s}`:l},hf=(e,t,r)=>{if(!e)return;let a=e.replace(new RegExp(`\\${t}`,"g"),"");a=a.replace(r,"."),a=a.replace(/[^0-9.-]/g,"");let n=parseFloat(a);return isNaN(n)?void 0:n},xf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,currency:o="USD",locale:s="en-US",decimals:l=2,min:c,max:d,showCurrency:m=true,currencyPosition:u="prefix",currencySymbol:f,thousandSeparator:p=",",decimalSeparator:b=".",disabled:x,placeholder:g,...v},y)=>{let[w,h]=$__namespace.useState(a),[C,R]=$__namespace.useState(""),[M,T]=$__namespace.useState(false),L=r!==void 0?r:w,N=f??bC(o,s);$__namespace.useEffect(()=>{!M&&L!==void 0&&R(tl(L,l,p,b));},[L,l,p,b,M]);let P=D=>{let I=D.target.value;if(!I){R(""),r===void 0&&h(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${b}.-]*$`).test(I))return;R(I);let G=hf(I,p,b);if(G!==void 0){let V=G;c!==void 0&&G<c&&(V=c),d!==void 0&&G>d&&(V=d),r===void 0&&h(V),n?.(V);}},k=()=>{T(true),L!==void 0&&R(L.toString().replace(".",b));},E=()=>{T(false),R(L!==void 0?tl(L,l,p,b):"");},H=m&&u==="prefix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pr-1",children:N}),S=m&&u==="suffix"&&jsxRuntime.jsx("span",{className:"flex items-center text-muted-foreground pl-1",children:N});return jsxRuntime.jsxs("div",{className:"relative flex items-center",children:[H&&jsxRuntime.jsx("div",{className:"absolute left-3 pointer-events-none",children:H}),jsxRuntime.jsx("input",{ref:y,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:k,onBlur:E,disabled:x,placeholder:g??`0${b}${"0".repeat(l)}`,className:i(vf({size:t}),H&&"pl-8",S&&"pr-8","text-right",e),style:{borderColor:M?"var(--color-foreground)":void 0},...v}),S&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:S})]})});xf.displayName="CurrencyInput";var yf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),rl={creditCard:{mask:"#### #### #### ####"},creditCardAmex:{mask:"#### ###### #####"},cvv:{mask:"###"},expiry:{mask:"##/##"},date:{mask:"##/##/####"},dateISO:{mask:"####-##-##"},time:{mask:"##:##"},ip:{mask:"###.###.###.###"},mac:{mask:"AA:AA:AA:AA:AA:AA"},id11:{mask:"###########"},id9:{mask:"#########"},id10:{mask:"##########"},postal5:{mask:"#####"},postal9:{mask:"#####-####"}},xC=(e,t)=>{switch(t){case "#":return /\d/.test(e);case "A":return /[a-zA-Z]/.test(e);case "*":return /[a-zA-Z0-9]/.test(e);default:return e===t}},aa=e=>["#","A","*"].includes(e),us=(e,t,r)=>{let a="",n=0;for(let o=0;o<t.length&&n<=e.length;o++){let s=t[o];if(aa(s)){if(n<e.length){let l=e[n];xC(l,s)?(a+=l,n++):(n++,o--);}}else (n<e.length||r)&&(a+=s);}return a},al=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];aa(n)&&(r+=e[a]);}return r},Rf=(e,t)=>e.split("").map(r=>aa(r)?t:r).join(""),yC=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)aa(t[l])&&a++;let o=0,s=0;for(let l=0;l<t.length&&s<a;l++)o++,aa(t[l])&&s++;for(;o<t.length&&!aa(t[o]);)o++;return Math.min(o,e.length)},wf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,mask:o,maskPlaceholder:s="_",showMaskPlaceholder:l=false,includeMaskChars:c=false,disabled:d,placeholder:m,...u},f)=>{let p=typeof o=="string"&&o in rl?rl[o].mask:o,[b,x]=$__namespace.useState(a),[g,v]=$__namespace.useState(""),[y,w]=$__namespace.useState(false),h=$__namespace.useRef(null),C=r!==void 0?r:b;$__namespace.useImperativeHandle(f,()=>h.current),$__namespace.useEffect(()=>{let L=us(C,p,true);v(L);},[C,p]);let R=L=>{let N=L.target.value,P=L.target.selectionStart??0,k=N.replace(/[^\w]/g,""),E=us(k,p,true),H=al(E,p);v(E),r===void 0&&x(c?E:H),n?.(H,E),requestAnimationFrame(()=>{if(h.current){let S=yC(E,p,P);h.current.setSelectionRange(S,S);}});},M=L=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(L.key)||L.ctrlKey||L.metaKey)return;let N=h.current;if(!N)return;let P=N.selectionStart??0;if(L.key==="Backspace"&&P>0){let k=P-1;for(;k>0&&!aa(p[k]);)k--;let E=al(g,p),H=0;for(let I=0;I<k&&I<p.length;I++)aa(p[I])&&H++;let S=E.slice(0,Math.max(0,H-1))+E.slice(H),D=us(S,p,true);v(D),r===void 0&&x(c?D:S),n?.(S,D),L.preventDefault(),requestAnimationFrame(()=>{h.current&&h.current.setSelectionRange(k,k);});}},T=l?Rf(p,s):m;return jsxRuntime.jsx("input",{ref:h,type:"text",value:g,onChange:R,onKeyDown:M,onFocus:()=>w(true),onBlur:()=>w(false),disabled:d,placeholder:T,className:i(yf({size:t}),e),style:{borderColor:y?"var(--color-foreground)":void 0},...u})});wf.displayName="MaskedInput";var Cf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),fs={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},ol={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},nl=(e,t)=>String(e).padStart(t,"0"),ps=(e,t)=>{let r=nl(e.getDate(),2),a=nl(e.getMonth()+1,2),n=nl(e.getFullYear(),4),o=fs[t],s=ol[t],l={day:r,month:a,year:n};return s.map(c=>l[c]).join(o)},Nf=(e,t)=>{let r=fs[t],a=e.split(r);if(a.length!==3)return null;let n=ol[t],o={};if(n.forEach((l,c)=>{o[l]=parseInt(a[c],10);}),isNaN(o.day)||isNaN(o.month)||isNaN(o.year)||o.month<1||o.month>12||o.day<1||o.day>31||o.year<1e3||o.year>9999)return null;let s=new Date(o.year,o.month-1,o.day);return s.getFullYear()!==o.year||s.getMonth()!==o.month-1||s.getDate()!==o.day?null:s},NC=e=>e.toLowerCase(),MC=e=>{let t=fs[e];return ol[e].map(a=>a==="year"?"####":"##").join(t)},Mf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a,onChange:n,format:o="DD/MM/YYYY",minDate:s,maxDate:l,showIcon:c=true,disabled:d,placeholder:m,...u},f)=>{let[p,b]=$__namespace.useState(a??null),[x,g]=$__namespace.useState(""),[v,y]=$__namespace.useState(null),w=$__namespace.useRef(null),h=r!==void 0?r:p;$__namespace.useImperativeHandle(f,()=>w.current),$__namespace.useEffect(()=>{h?(g(ps(h,o)),y(null)):g("");},[h,o]);let C=fs[o],R=MC(o),M=N=>{let P=N.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let k=P.replace(new RegExp(`\\${C}`,"g"),""),E="",H=0;for(let S=0;S<R.length&&H<k.length;S++)R[S]==="#"?(E+=k[H],H++):E+=R[S];if(g(E),E.length===R.length){let S=Nf(E,o);if(S){if(s&&S<s){y(`Date must be after ${ps(s,o)}`);return}if(l&&S>l){y(`Date must be before ${ps(l,o)}`);return}y(null),r===void 0&&b(S),n?.(S);}else y("Invalid date");}else r===void 0&&b(null),n?.(null),y(null);},T=()=>{x&&x.length!==R.length&&(g(""),y(null),r===void 0&&b(null),n?.(null));},L=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4";return jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("input",{ref:w,type:"text",inputMode:"numeric",value:x,onChange:M,onBlur:T,disabled:d,placeholder:m??NC(o),className:i(Cf({size:t}),c&&"pr-10",v&&"border-danger focus-visible:ring-danger",e),"aria-invalid":!!v,"aria-describedby":v?"date-error":void 0,...u}),c&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2",children:jsxRuntime.jsx(lucideReact.Calendar,{className:i(L,"text-muted-foreground")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});Mf.displayName="DateInput";var Pf=classVarianceAuthority.cva("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"h-8 px-2 text-xs",md:"h-10 px-3 text-sm",lg:"h-12 px-4 text-base"}},defaultVariants:{size:"md"}}),kf=[{code:"AR",name:"Argentina",dialCode:"+54",flag:"\u{1F1E6}\u{1F1F7}",format:"## ####-####"},{code:"AU",name:"Australia",dialCode:"+61",flag:"\u{1F1E6}\u{1F1FA}",format:"### ### ###"},{code:"AT",name:"Austria",dialCode:"+43",flag:"\u{1F1E6}\u{1F1F9}",format:"### #######"},{code:"BE",name:"Belgium",dialCode:"+32",flag:"\u{1F1E7}\u{1F1EA}",format:"### ## ## ##"},{code:"BR",name:"Brazil",dialCode:"+55",flag:"\u{1F1E7}\u{1F1F7}",format:"(##) #####-####"},{code:"BG",name:"Bulgaria",dialCode:"+359",flag:"\u{1F1E7}\u{1F1EC}",format:"### ### ###"},{code:"CA",name:"Canada",dialCode:"+1",flag:"\u{1F1E8}\u{1F1E6}",format:"(###) ###-####"},{code:"CN",name:"China",dialCode:"+86",flag:"\u{1F1E8}\u{1F1F3}",format:"### #### ####"},{code:"HR",name:"Croatia",dialCode:"+385",flag:"\u{1F1ED}\u{1F1F7}",format:"## ### ####"},{code:"CZ",name:"Czech Republic",dialCode:"+420",flag:"\u{1F1E8}\u{1F1FF}",format:"### ### ###"},{code:"DK",name:"Denmark",dialCode:"+45",flag:"\u{1F1E9}\u{1F1F0}",format:"## ## ## ##"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"\u{1F1EA}\u{1F1EC}",format:"### ### ####"},{code:"FI",name:"Finland",dialCode:"+358",flag:"\u{1F1EB}\u{1F1EE}",format:"## ### ####"},{code:"FR",name:"France",dialCode:"+33",flag:"\u{1F1EB}\u{1F1F7}",format:"# ## ## ## ##"},{code:"DE",name:"Germany",dialCode:"+49",flag:"\u{1F1E9}\u{1F1EA}",format:"#### #######"},{code:"GR",name:"Greece",dialCode:"+30",flag:"\u{1F1EC}\u{1F1F7}",format:"### ### ####"},{code:"HK",name:"Hong Kong",dialCode:"+852",flag:"\u{1F1ED}\u{1F1F0}",format:"#### ####"},{code:"HU",name:"Hungary",dialCode:"+36",flag:"\u{1F1ED}\u{1F1FA}",format:"## ### ####"},{code:"IN",name:"India",dialCode:"+91",flag:"\u{1F1EE}\u{1F1F3}",format:"##### #####"},{code:"IL",name:"Israel",dialCode:"+972",flag:"\u{1F1EE}\u{1F1F1}",format:"##-###-####"},{code:"IT",name:"Italy",dialCode:"+39",flag:"\u{1F1EE}\u{1F1F9}",format:"### ### ####"},{code:"JP",name:"Japan",dialCode:"+81",flag:"\u{1F1EF}\u{1F1F5}",format:"##-####-####"},{code:"MX",name:"Mexico",dialCode:"+52",flag:"\u{1F1F2}\u{1F1FD}",format:"### ### ####"},{code:"NL",name:"Netherlands",dialCode:"+31",flag:"\u{1F1F3}\u{1F1F1}",format:"## ########"},{code:"NZ",name:"New Zealand",dialCode:"+64",flag:"\u{1F1F3}\u{1F1FF}",format:"## ### ####"},{code:"NG",name:"Nigeria",dialCode:"+234",flag:"\u{1F1F3}\u{1F1EC}",format:"### ### ####"},{code:"NO",name:"Norway",dialCode:"+47",flag:"\u{1F1F3}\u{1F1F4}",format:"### ## ###"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"\u{1F1F5}\u{1F1F0}",format:"### #######"},{code:"PL",name:"Poland",dialCode:"+48",flag:"\u{1F1F5}\u{1F1F1}",format:"### ### ###"},{code:"PT",name:"Portugal",dialCode:"+351",flag:"\u{1F1F5}\u{1F1F9}",format:"### ### ###"},{code:"RO",name:"Romania",dialCode:"+40",flag:"\u{1F1F7}\u{1F1F4}",format:"### ### ###"},{code:"RU",name:"Russia",dialCode:"+7",flag:"\u{1F1F7}\u{1F1FA}",format:"(###) ###-##-##"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"\u{1F1F8}\u{1F1E6}",format:"## ### ####"},{code:"RS",name:"Serbia",dialCode:"+381",flag:"\u{1F1F7}\u{1F1F8}",format:"## ### ####"},{code:"SG",name:"Singapore",dialCode:"+65",flag:"\u{1F1F8}\u{1F1EC}",format:"#### ####"},{code:"SK",name:"Slovakia",dialCode:"+421",flag:"\u{1F1F8}\u{1F1F0}",format:"### ### ###"},{code:"SI",name:"Slovenia",dialCode:"+386",flag:"\u{1F1F8}\u{1F1EE}",format:"## ### ###"},{code:"ZA",name:"South Africa",dialCode:"+27",flag:"\u{1F1FF}\u{1F1E6}",format:"## ### ####"},{code:"KR",name:"South Korea",dialCode:"+82",flag:"\u{1F1F0}\u{1F1F7}",format:"##-####-####"},{code:"ES",name:"Spain",dialCode:"+34",flag:"\u{1F1EA}\u{1F1F8}",format:"### ### ###"},{code:"SE",name:"Sweden",dialCode:"+46",flag:"\u{1F1F8}\u{1F1EA}",format:"##-### ## ##"},{code:"CH",name:"Switzerland",dialCode:"+41",flag:"\u{1F1E8}\u{1F1ED}",format:"## ### ## ##"},{code:"TW",name:"Taiwan",dialCode:"+886",flag:"\u{1F1F9}\u{1F1FC}",format:"### ### ###"},{code:"TR",name:"Turkey",dialCode:"+90",flag:"\u{1F1F9}\u{1F1F7}",format:"(###) ### ## ##"},{code:"UA",name:"Ukraine",dialCode:"+380",flag:"\u{1F1FA}\u{1F1E6}",format:"## ### ## ##"},{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"\u{1F1E6}\u{1F1EA}",format:"## ### ####"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"\u{1F1EC}\u{1F1E7}",format:"#### ### ####"},{code:"US",name:"United States",dialCode:"+1",flag:"\u{1F1FA}\u{1F1F8}",format:"(###) ###-####"}],gs=(e,t)=>{let r=e.replace(/\D/g,""),a="",n=0;for(let o=0;o<t.length&&n<r.length;o++)t[o]==="#"?(a+=r[n],n++):a+=t[o];return a},EC=e=>e.replace(/#/g,"_"),Lf=$__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:o,defaultCountry:s="TR",onCountryChange:l,countries:c=kf,showCountrySelect:d=true,showDialCode:m=false,disabled:u,placeholder:f,...p},b)=>{let[x,g]=$__namespace.useState(a),[v,y]=$__namespace.useState(o??s),[w,h]=$__namespace.useState(false),[C,R]=$__namespace.useState(false),[M,T]=$__namespace.useState(false),[L,N]=$__namespace.useState({top:0,left:0,width:0}),P=$__namespace.useRef(null),k=$__namespace.useRef(null),E=r!==void 0?r:x,H=o??v,S=c.find(V=>V.code===H)??c[0],D=gs(E,S.format);$__namespace.useEffect(()=>{T(true);},[]),$__namespace.useEffect(()=>{if(C&&P.current){let V=P.current.getBoundingClientRect();N({top:V.bottom+4,left:V.left,width:Math.max(V.width,280)});}},[C]),$__namespace.useEffect(()=>{if(!C)return;let V=F=>{P.current&&!P.current.contains(F.target)&&k.current&&!k.current.contains(F.target)&&R(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),$__namespace.useEffect(()=>{if(!C)return;let V=F=>{F.key==="Escape"&&R(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let O=V.target.value.replace(/\D/g,"");r===void 0&&g(O);let Q=gs(O,S.format),re=`${S.dialCode} ${Q}`;n?.(O,re,S);},z=V=>{let F=c.find(re=>re.code===V);if(!F)return;o===void 0&&y(V),l?.(F);let O=gs(E,F.format),Q=`${F.dialCode} ${O}`;n?.(E,Q,F),R(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:u,onClick:()=>R(!C),className:i("flex items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","w-[100px] rounded-r-none border-r-0 shrink-0",t==="sm"?"h-8":t==="lg"?"h-12":"h-10"),children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1.5",children:[jsxRuntime.jsx("span",{children:S.flag}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:S.dialCode})]}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:i("h-4 w-4 opacity-50 transition-transform",C&&"rotate-180")})]}),M&&C&&Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:k,className:"fixed z-50 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",style:{top:L.top,left:L.left,minWidth:L.width},children:jsxRuntime.jsx(je,{style:{maxHeight:300},children:jsxRuntime.jsx("div",{className:"p-1",children:c.map(V=>jsxRuntime.jsxs("div",{role:"option","aria-selected":V.code===H,onClick:()=>z(V.code),className:"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:V.code===H&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:V.flag}),jsxRuntime.jsx("span",{className:"flex-1",children:V.name}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:V.dialCode})]})]},V.code))})})}),document.body)]}),jsxRuntime.jsxs("div",{className:"relative flex-1",children:[m&&!d&&jsxRuntime.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:S.dialCode}),jsxRuntime.jsx("input",{ref:b,type:"tel",inputMode:"tel",value:D,onChange:I,onFocus:()=>h(true),onBlur:()=>h(false),disabled:u,placeholder:f??EC(S.format),className:i(Pf({size:t}),d&&"rounded-l-none",m&&!d&&"pl-12",e),style:{borderColor:w?"var(--color-foreground)":void 0},...p})]})]})});Lf.displayName="PhoneInput";var Df=classVarianceAuthority.cva("flex items-center justify-between w-full px-4 py-3 border-b bg-background",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-background border-border",ghost:"bg-transparent border-transparent",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-border"},size:{sm:"h-12 px-3 py-2",md:"h-14 px-4 py-3",lg:"h-16 px-6 py-4"},sticky:{true:"sticky top-0 z-50",false:""}},defaultVariants:{variant:"outline",size:"md",sticky:false}}),Sf=$__namespace.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:o,mobileBreakpoint:s="md",...l},c)=>{let[d,m]=$__namespace.useState(false),u={sm:"hidden sm:flex",md:"hidden md:flex",lg:"hidden lg:flex"}[s],f={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden"}[s];return jsxRuntime.jsxs("nav",{ref:c,className:i(Df({variant:t,size:r,sticky:a,className:e})),...l,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between w-full",children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:n}),jsxRuntime.jsx("div",{className:i("items-center gap-4 flex-1 justify-end",u),children:o}),jsxRuntime.jsx("button",{type:"button",className:i("p-2 rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",f),onClick:()=>m(!d),"aria-label":d?"Close menu":"Open menu","aria-expanded":d,children:d?jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"})})]}),d&&jsxRuntime.jsx("div",{className:i("absolute top-full left-0 right-0 flex flex-col gap-2 p-4 bg-background border-b border-border shadow-lg",f),children:o})]})});Sf.displayName="Navbar";var Hf=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center gap-2 font-semibold text-lg",e),...t}));Hf.displayName="NavbarBrand";var If=$__namespace.forwardRef(({className:e,justify:t="start",...r},a)=>{let n={start:"justify-start",center:"justify-center",end:"justify-end"}[t];return jsxRuntime.jsx("div",{ref:a,className:i("flex items-center gap-4",n,e),...r})});If.displayName="NavbarContent";var Vf=$__namespace.forwardRef(({className:e,isActive:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("flex items-center",t&&"text-primary font-medium",e),...r}));Vf.displayName="NavbarItem";var Af=$__namespace.forwardRef(({className:e,isActive:t,...r},a)=>jsxRuntime.jsx("a",{ref:a,className:i("text-sm font-medium transition-colors hover:text-primary",t?"text-primary":"text-muted-foreground",e),...r}));Af.displayName="NavbarLink";var Bf=classVarianceAuthority.cva("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{solid:"text-primary-foreground bg-primary px-2 py-0.5 rounded hover:bg-primary/90",outline:"text-primary underline-offset-4 hover:underline",ghost:"text-foreground hover:text-primary",soft:"text-primary bg-primary/10 px-2 py-0.5 rounded hover:bg-primary/20",surface:"text-foreground bg-muted px-2 py-0.5 rounded hover:bg-muted/80"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},underline:{none:"",hover:"hover:underline underline-offset-4",always:"underline underline-offset-4"}},defaultVariants:{variant:"outline",size:"md",underline:"hover"}}),Of=$__namespace.forwardRef(({className:e,variant:t,size:r,underline:a,isExternal:n,showExternalIcon:o=true,isDisabled:s,children:l,...c},d)=>{let m=n?{target:"_blank",rel:"noopener noreferrer"}:{};return jsxRuntime.jsxs("a",{ref:d,className:i(Bf({variant:t,size:r,underline:a,className:e}),s&&"pointer-events-none opacity-50"),"aria-disabled":s,...m,...c,children:[l,n&&o&&jsxRuntime.jsx(lucideReact.ExternalLink,{className:"h-3 w-3 ml-0.5","aria-hidden":"true"})]})});Of.displayName="Link";var Ff=classVarianceAuthority.cva("fixed z-50 transition-all duration-300",{variants:{position:{"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","bottom-center":"bottom-6 left-1/2 -translate-x-1/2"}},defaultVariants:{position:"bottom-right"}}),Kf=$__namespace.forwardRef(({className:e,position:t,threshold:r=400,icon:a,behavior:n="smooth",variant:o="solid",color:s="default",size:l="md",radius:c="full",target:d,onVisibilityChange:m,onClick:u,...f},p)=>{let[b,x]=$__namespace.useState(false);$__namespace.useEffect(()=>{let y=d?.current||window,w=()=>{let C=(d?.current?d.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==b&&(x(C),m?.(C));};return y.addEventListener("scroll",w,{passive:true}),w(),()=>{y.removeEventListener("scroll",w);}},[r,d,b,m]);let g=y=>{d?.current?d.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),u?.(y);},v=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:i(Ff({position:t}),b?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(J,{ref:p,type:"button",variant:o,color:s,size:"icon",radius:c,onClick:g,"aria-label":"Back to top",className:i("shadow-lg",l==="sm"&&"h-9 w-9",l==="md"&&"h-10 w-10",l==="lg"&&"h-12 w-12"),...f,children:a||jsxRuntime.jsx(lucideReact.ArrowUp,{className:v})})})});Kf.displayName="BackTop";var _C=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),WC=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"sm"}}),Gf=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-md",md:"rounded-lg",lg:"rounded-xl",full:"rounded-2xl"}},defaultVariants:{radius:"sm"}}),hs=classVarianceAuthority.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-xl"}},defaultVariants:{radius:"sm"}}),$f=$__namespace.createContext(null),oa=()=>{let e=$__namespace.useContext($f);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},_f=$__namespace.createContext(null),Zn=()=>{let e=$__namespace.useContext(_f);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},il=$__namespace.createContext(null),Wf=$__namespace.createContext(null),jf=$__namespace.forwardRef(({className:e,children:t,radius:r="sm",...a},n)=>{let[o,s]=$__namespace.useState(null);return jsxRuntime.jsx($f.Provider,{value:{activeMenu:o,setActiveMenu:s,radius:r},children:jsxRuntime.jsx("div",{ref:n,role:"menubar",className:i("flex h-10 items-center space-x-1 border bg-background p-1",_C({radius:r}),e),...a,children:t})})});jf.displayName="Menubar";var Uf=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=oa(),a=$__namespace.useId(),n=$__namespace.useRef(null),o=t===a,s=$__namespace.useCallback(l=>{r(l?a:null);},[a,r]);return jsxRuntime.jsx(_f.Provider,{value:{menuId:a,triggerRef:n,open:o,onOpenChange:s},children:e})};Uf.displayName="MenubarMenu";var Yf=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));Yf.displayName="MenubarGroup";var Xf=({children:e,container:t})=>{let[r,a]=$__namespace.useState(false);return $__namespace.useEffect(()=>{a(true);},[]),r?Wo__namespace.createPortal(e,t||document.body):null};Xf.displayName="MenubarPortal";var qf=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=$__namespace.useState(r),s=t!==void 0,l=s?t:n,c=$__namespace.useRef(null),d=$__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx(il.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};qf.displayName="MenubarSub";var Zf=$__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(Wf.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Zf.displayName="MenubarRadioGroup";var Jf=$__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:r,...a},n)=>{let{activeMenu:o,setActiveMenu:s,radius:l}=oa(),{menuId:c,triggerRef:d,open:m,onOpenChange:u}=Zn(),f=b=>{t?.(b),u(!m);},p=b=>{r?.(b),o&&o!==c&&(s(c),document.activeElement instanceof HTMLElement&&document.activeElement.blur());};return jsxRuntime.jsx("button",{ref:b=>{d.current=b,typeof n=="function"?n(b):n&&(n.current=b);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":m,"data-state":m?"open":"closed",className:i("flex cursor-default select-none items-center px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",WC({radius:l}),e),onClick:f,onMouseEnter:p,...a})});Jf.displayName="MenubarTrigger";var Qf=$__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let{radius:l}=oa(),c=$__namespace.useContext(il);if(!c)throw new Error("MenubarSubTrigger must be used within MenubarSub");let{open:d,onOpenChange:m,triggerRef:u}=c,f=b=>{a?.(b),m(true);},p=b=>{n?.(b),m(false);};return jsxRuntime.jsxs("div",{ref:b=>{u.current=b,typeof s=="function"?s(b):s&&(s.current=b);},role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:i("flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",hs({radius:l}),t&&"pl-8",e),onMouseEnter:f,onMouseLeave:p,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Qf.displayName="MenubarSubTrigger";var eg=$__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let{radius:s}=oa(),l=$__namespace.useContext(il);if(!l)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:c,onOpenChange:d,triggerRef:m}=l,[u,f]=$__namespace.useState({top:0,left:0}),[p,b]=$__namespace.useState(false),x=$__namespace.useRef(null);$__namespace.useEffect(()=>{b(true);},[]),$__namespace.useEffect(()=>{if(!c||!m.current||!x.current)return;(()=>{if(!m.current||!x.current)return;let w=m.current.getBoundingClientRect(),h=x.current.getBoundingClientRect(),C=w.top,R=w.right+t;R+h.width>window.innerWidth&&(R=w.left-h.width-t),f({top:C,left:R});})();},[c,t,m]);let g=y=>{r?.(y),d(true);},v=y=>{a?.(y),d(false);};return !p||!c?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:y=>{x.current=y,typeof o=="function"?o(y):o&&(o.current=y);},role:"menu","data-state":c?"open":"closed",className:i("fixed z-50 min-w-[8rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-left-2",Gf({radius:s}),e),style:{top:u.top,left:u.left},onMouseEnter:g,onMouseLeave:v,...n}),document.body)});eg.displayName="MenubarSubContent";var tg=$__namespace.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,children:n,...o},s)=>{let{radius:l}=oa(),{triggerRef:c,open:d,onOpenChange:m}=Zn(),[u,f]=$__namespace.useState({top:0,left:0}),[p,b]=$__namespace.useState(false),x=$__namespace.useRef(null);return $__namespace.useEffect(()=>{b(true);},[]),$__namespace.useEffect(()=>{if(!d||!c.current||!x.current)return;let g=()=>{if(!c.current||!x.current)return;let v=c.current.getBoundingClientRect(),y=x.current.getBoundingClientRect(),w=v.bottom+a,h=v.left+r;t==="center"?h=v.left+v.width/2-y.width/2:t==="end"&&(h=v.right-y.width-r),f({top:w,left:h});};return g(),window.addEventListener("resize",g),window.addEventListener("scroll",g,true),()=>{window.removeEventListener("resize",g),window.removeEventListener("scroll",g,true);}},[d,t,r,a,c]),$__namespace.useEffect(()=>{if(!d)return;let g=v=>{let y=v.target;x.current&&!x.current.contains(y)&&c.current&&!c.current.contains(y)&&m(false);};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[d,m,c]),$__namespace.useEffect(()=>{if(!d)return;let g=v=>{v.key==="Escape"&&m(false);};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[d,m]),!p||!d?null:Wo__namespace.createPortal(jsxRuntime.jsx("div",{ref:g=>{x.current=g,typeof s=="function"?s(g):s&&(s.current=g);},role:"menu","data-state":d?"open":"closed",className:i("fixed z-50 min-w-[12rem] overflow-hidden border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",Gf({radius:l}),e),style:{top:u.top,left:u.left},...o,children:n}),document.body)});tg.displayName="MenubarContent";var rg=$__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{radius:l}=oa(),{onOpenChange:c}=Zn(),d=m=>{if(r){m.preventDefault();return}n?.(m),a?.(),c(false);};return jsxRuntime.jsx("div",{ref:s,role:"menuitem",tabIndex:r?-1:0,"aria-disabled":r,"data-disabled":r?"":void 0,className:i("relative flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:l}),t&&"pl-8",!r&&"cursor-pointer",e),onClick:d,...o})});rg.displayName="MenubarItem";var ag=$__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{radius:c}=oa(),{onOpenChange:d}=Zn(),m=u=>{if(n){u.preventDefault();return}o?.(u),a?.(!r),d(false);};return jsxRuntime.jsxs("div",{ref:l,role:"menuitemcheckbox","aria-checked":r,tabIndex:n?-1:0,"aria-disabled":n,"data-disabled":n?"":void 0,"data-state":r?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:c}),!n&&"cursor-pointer",e),onClick:m,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:r&&jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),t]})});ag.displayName="MenubarCheckboxItem";var ng=$__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{radius:l}=oa(),{onOpenChange:c}=Zn(),d=$__namespace.useContext(Wf),m=d?.value===r,u=f=>{if(a){f.preventDefault();return}n?.(f),d?.onValueChange(r),c(false);};return jsxRuntime.jsxs("div",{ref:s,role:"menuitemradio","aria-checked":m,tabIndex:a?-1:0,"aria-disabled":a,"data-disabled":a?"":void 0,"data-state":m?"checked":"unchecked",className:i("relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hs({radius:l}),!a&&"cursor-pointer",e),onClick:u,...o,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m&&jsxRuntime.jsx(lucideReact.Circle,{className:"h-2 w-2 fill-current"})}),t]})});ng.displayName="MenubarRadioItem";var og=$__namespace.forwardRef(({className:e,inset:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));og.displayName="MenubarLabel";var sg=$__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"separator",className:i("-mx-1 my-1 h-px bg-muted",e),...t}));sg.displayName="MenubarSeparator";var ig=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ig.displayName="MenubarShortcut";var lg=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col"},size:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"horizontal",size:"md"}}),cg=$__namespace.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...o},s)=>{let l=$__namespace.Children.toArray(n);return jsxRuntime.jsx("div",{ref:s,className:i(lg({orientation:t,size:r,className:e})),...o,children:l.map((c,d)=>$__namespace.isValidElement(c)?$__namespace.cloneElement(c,{...c.props,stepNumber:d+1,status:c.props.status||(d<a?"completed":d===a?"current":"upcoming"),isLast:d===l.length-1,orientation:t,size:r}):c)})});cg.displayName="Steps";var dg=classVarianceAuthority.cva("flex items-center",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col items-start"},size:{sm:"gap-2",md:"gap-3",lg:"gap-4"}},defaultVariants:{orientation:"horizontal",size:"md"}}),UC=classVarianceAuthority.cva("flex items-center justify-center rounded-full font-medium transition-colors",{variants:{status:{completed:"bg-primary text-primary-foreground",current:"bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2 ring-offset-background",upcoming:"bg-muted text-muted-foreground border-2 border-muted-foreground/30"},size:{sm:"h-6 w-6 text-xs",md:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"}},defaultVariants:{status:"upcoming",size:"md"}}),YC=classVarianceAuthority.cva("bg-muted transition-colors",{variants:{orientation:{horizontal:"h-0.5 flex-1 min-w-8",vertical:"w-0.5 min-h-8 ml-4"},status:{completed:"bg-primary",current:"bg-muted",upcoming:"bg-muted"}},defaultVariants:{orientation:"horizontal",status:"upcoming"}}),ug=$__namespace.forwardRef(({className:e,orientation:t="horizontal",size:r="md",title:a,description:n,icon:o,status:s="upcoming",stepNumber:l,isLast:c,...d},m)=>jsxRuntime.jsxs("div",{ref:m,className:i(dg({orientation:t,size:r,className:e}),!c&&t==="horizontal"&&"flex-1"),...d,children:[jsxRuntime.jsx("div",{className:i("flex items-center",t==="vertical"&&"flex-col items-start"),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:i(UC({status:s,size:r})),children:s==="completed"?jsxRuntime.jsx(lucideReact.Check,{className:r==="sm"?"h-3 w-3":r==="lg"?"h-5 w-5":"h-4 w-4"}):o||l}),(a||n)&&jsxRuntime.jsxs("div",{className:"flex flex-col",children:[a&&jsxRuntime.jsx("span",{className:i("font-medium",r==="sm"&&"text-sm",r==="lg"&&"text-lg",s==="upcoming"&&"text-muted-foreground"),children:a}),n&&jsxRuntime.jsx("span",{className:i("text-muted-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm",r==="lg"&&"text-base"),children:n})]})]})}),!c&&jsxRuntime.jsx("div",{className:i(YC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));ug.displayName="Step";var pg=classVarianceAuthority.cva("flex flex-col select-none",{variants:{variant:{default:"",bordered:"rounded-lg border",filled:"bg-muted/30 rounded-lg p-2"},size:{sm:"[--tree-indent:16px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:20px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:24px] [--tree-item-height:40px] text-base"}},defaultVariants:{variant:"default",size:"md"}}),fg=classVarianceAuthority.cva("flex items-center py-1.5 px-2 rounded-sm transition-colors",{variants:{size:{sm:"py-1 px-1.5 text-sm min-h-[var(--tree-item-height)]",md:"py-1.5 px-2 text-sm min-h-[var(--tree-item-height)]",lg:"py-2 px-3 text-base min-h-[var(--tree-item-height)]"},isSelected:{true:"bg-primary/10 text-primary",false:""},isDragging:{true:"opacity-50",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:""},isHoverable:{true:"hover:bg-muted/50 cursor-pointer",false:""}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDisabled:false,isHoverable:true}}),gg=$__namespace.createContext(null),rN=()=>{let e=$__namespace.useContext(gg);if(!e)throw new Error("TreeNodeComponent must be used within Tree");return e},aN=({checked:e,indeterminate:t,disabled:r,onClick:a})=>jsxRuntime.jsx("button",{type:"button",role:"checkbox","aria-checked":t?"mixed":e,disabled:r,onClick:n=>{n.stopPropagation(),r||a(n);},className:i("h-4 w-4 shrink-0 rounded-sm border border-primary transition-colors","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",(e||t)&&"bg-primary text-primary-foreground",r&&"cursor-not-allowed opacity-50"),children:(e||t)&&jsxRuntime.jsx("span",{className:"flex items-center justify-center text-current",children:t?jsxRuntime.jsx(lucideReact.Minus,{className:"h-3 w-3"}):jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})})}),bg=({node:e,level:t,isLast:r=false,parentIsLastPath:a=[]})=>{let{expandedKeys:n,toggleExpand:o,selectedKeys:s,handleSelect:l,selectable:c,checkedKeys:d,halfCheckedKeys:m,handleCheck:u,checkable:f,draggable:p,draggedNode:b,setDraggedNode:x,dragOverKey:g,dragOverPosition:v,setDragOver:y,handleDrop:w,allowDrop:h,onDragStart:C,onDragOver:R,onDragEnter:M,onDragLeave:T,onDragEnd:L,showLine:N,showIcon:P,showHandle:k,dragIcon:E,icon:H,leafIcon:S,folderIcon:D,folderOpenIcon:I,blockNode:z,disabled:G,size:V,getAllKeys:F}=rN(),O=e.children&&e.children.length>0,Q=e.isLeaf??!O,re=n.has(e.key),K=s.has(e.key),B=d.has(e.key),j=m.has(e.key),A=b?.key===e.key,U=g===e.key,W=!!(G||e.disabled),he=c&&e.selectable!==false,me=f&&e.checkable!==false,Br=$__namespace.useMemo(()=>W?false:typeof p=="boolean"?p:typeof p=="function"?p(e):p&&typeof p=="object"?p.nodeDraggable?p.nodeDraggable(e):true:false,[p,e,W]),ne=$__namespace.useMemo(()=>E!==void 0?E:typeof p=="object"&&p.icon!==void 0?p.icon:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"}),[E,p]),rt=$__namespace.useMemo(()=>e.icon?e.icon:H?typeof H=="function"?H({expanded:re,isLeaf:Q}):H:Q?S:re?I:D,[e.icon,H,re,Q,S,D,I]),Or=Y=>{if(!Br)return;Y.stopPropagation(),Y.dataTransfer.effectAllowed="move";let Se=Y.currentTarget,ie=Se.cloneNode(true),Ke=document.documentElement.classList.contains("dark"),Ge=Ke?"#0a0a0a":"#ffffff",Kr=Ke?"#27272a":"#e4e4e7";ie.style.cssText=`
44
44
  position: fixed;
45
45
  top: -9999px;
46
46
  left: -9999px;