@reeverdev/ui 0.2.72 → 0.2.73
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
0% { transform: rotate(0deg); }
|
|
46
46
|
100% { transform: rotate(360deg); }
|
|
47
47
|
}
|
|
48
|
-
`}),jsxRuntime.jsx("circle",{className:i("stroke-muted",o),cx:m.size/2,cy:m.size/2,r:u,strokeWidth:m.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:m.size/2,cy:m.size/2,r:u,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:qm[r]||qm.default,strokeDasharray:c?`${b} ${f-b}`:`${f} ${f}`,strokeDashoffset:c?0:p,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:c?void 0:"stroke-dashoffset 0.3s ease-in-out"}})]}),n&&!c&&jsxRuntime.jsxs("span",{className:i("absolute font-medium text-foreground",m.fontSize),children:[Math.round(d),"%"]})]})});Qm.displayName="CircularProgress";var ep=K__namespace.createContext(null),j0=()=>{let e=K__namespace.useContext(ep);if(!e)throw new Error("OTP components must be used within InputOTP");return e},tp=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"}}),rp=K__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]=K__namespace.useState(n),[x,g]=K__namespace.useState(0),[v,w]=K__namespace.useState(false),R=K__namespace.useRef(null),h=a!==void 0?a:p;K__namespace.useImperativeHandle(f,()=>R.current),K__namespace.useEffect(()=>{g(Math.min(h.length,r-1));},[h,r]),K__namespace.useEffect(()=>{h.length===r&&s&&s(h);},[h,r,s]);let C=P=>{let L=P.target.value;if(l&&L){let E=new RegExp(l.replace("^","").replace("$","").replace("+",""));L=L.split("").filter(H=>E.test(H)).join("");}L=L.slice(0,r),a===void 0&&b(L),o?.(L);},y=P=>{P.key==="ArrowLeft"?g(L=>Math.max(0,L-1)):P.key==="ArrowRight"&&g(L=>Math.min(h.length,r-1,L+1));},T=()=>{R.current?.focus();},M=()=>{w(true),g(Math.min(h.length,r-1));},k=()=>{w(false);},N={value:h,activeIndex:v?x:-1,maxLength:r,disabled:c};return jsxRuntime.jsx(ep.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:i(tp({size:d}),t),onClick:T,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:R,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:h,onChange:C,onKeyDown:y,onFocus:M,onBlur:k,disabled:c,maxLength:r,className:i("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),m]})})});rp.displayName="InputOTP";var ap=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center",e),...t}));ap.displayName="InputOTPGroup";var np=K__namespace.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:o,disabled:s}=j0(),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"})})]})});np.displayName="InputOTPSlot";var op=K__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"})}));op.displayName="InputOTPSeparator";var lp=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},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:"soft",size:"md"}}),cp=K__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]=K__namespace.useState(""),w=K__namespace.useRef(null);K__namespace.useImperativeHandle(x,()=>w.current);let R=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 L={id:crypto.randomUUID(),text:P};n?.([...a,L]),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(),R(g);}N.key==="Backspace"&&!g&&a.length>0&&h(a[a.length-1].id);},y=N=>{let P=N.target.value;if(P.includes(",")){P.split(",").forEach(E=>{E.trim()&&R(E);});return}v(P);},T=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(E=>{R(E);});},M=()=>{w.current?.focus();},k=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:M,children:[a.map(N=>p?p(N,()=>h(N.id)):jsxRuntime.jsxs("span",{className:i(lp({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)),!k&&!f&&jsxRuntime.jsx("input",{ref:w,type:"text",value:g,onChange:y,onKeyDown:C,onPaste:T,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})]})});cp.displayName="TagInput";var up=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"}}),mp=K__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(up({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]}));mp.displayName="EmptyState";var fp=classVarianceAuthority.cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),gp=K__namespace.forwardRef(({className:e,variant:t,label:r,value:a,icon:n,trend:o,trendValue:s,description:l,...c},d)=>{let m=o==="up"?lucideReact.TrendingUp:o==="down"?lucideReact.TrendingDown:lucideReact.Minus,u=o==="up"?"text-green-500":o==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:d,className:i(fp({variant:t,className:e})),...c,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:r}),n&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:a}),o&&s&&jsxRuntime.jsxs("span",{className:i("flex items-center gap-0.5 text-sm",u),children:[jsxRuntime.jsx(m,{className:"h-3 w-3"}),s]})]}),l&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});gp.displayName="StatCard";var Hi=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}});function rw({className:e,variant:t,size:r,items:a,renderItem:n,draggable:o=false,onReorder:s,showHandle:l=true,children:c,...d},m){let[u,f]=K__namespace.useState(null),[p,b]=K__namespace.useState(null),x=(h,C)=>{f(C),h.dataTransfer.effectAllowed="move",h.dataTransfer.setData("text/plain",String(C));},g=(h,C)=>{h.preventDefault(),!(u===null||u===C)&&b(C);},v=()=>{b(null);},w=(h,C)=>{if(h.preventDefault(),!a||u===null||u===C){f(null),b(null);return}let y=[...a],[T]=y.splice(u,1);y.splice(C,0,T),s?.(y),f(null),b(null);},R=()=>{f(null),b(null);};return !o||!a||!n?jsxRuntime.jsx("div",{ref:m,role:"list",className:i(Hi({variant:t,size:r,className:e})),...d,children:c}):jsxRuntime.jsx("div",{ref:m,role:"list",className:i(Hi({variant:t,size:r,className:e})),...d,children:a.map((h,C)=>jsxRuntime.jsxs("div",{role:"listitem",draggable:true,onDragStart:y=>x(y,C),onDragOver:y=>g(y,C),onDragLeave:v,onDrop:y=>w(y,C),onDragEnd:R,className:i("flex items-center gap-3 transition-all cursor-move",u===C&&"opacity-50 scale-[1.02] z-10",p===C&&"border-primary border-dashed border rounded-md"),children:[l&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n(h,C)})]},h.id))})}var aw=K__namespace.forwardRef(rw),vp=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),hp=K__namespace.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:i(vp({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",children:a})]}));hp.displayName="ListItem";var xp=K__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]}));xp.displayName="ListItemText";var wp=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"",bordered:"rounded-lg border divide-y divide-border",filled:"bg-muted/30 rounded-lg"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Cp=classVarianceAuthority.cva("flex items-center gap-2 py-2 px-3 transition-colors select-none",{variants:{size:{sm:"py-1.5 px-2 text-sm",md:"py-2 px-3 text-sm",lg:"py-3 px-4 text-base"},isSelected:{true:"bg-primary/10 text-primary",false:"hover:bg-muted/50"},isDragging:{true:"opacity-50 bg-muted",false:""},isDragOver:{true:"border-2 border-dashed border-primary rounded-md",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:"cursor-pointer"}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDragOver:false,isDisabled:false}}),Np=K__namespace.createContext(null),sw=()=>{let e=K__namespace.useContext(Np);if(!e)throw new Error("TreeListItem must be used within TreeList");return e},Mp=({node:e,level:t,parentPath:r})=>{let{expandedKeys:a,toggleExpand:n,selectedKeys:o,toggleSelect:s,selectable:l,draggable:c,showHandle:d,indentSize:m,size:u,draggedId:f,setDraggedId:p,dragOverId:b,setDragOverId:x,handleDrop:g}=sw(),v=e.children&&e.children.length>0,w=a.has(e.id),R=o.has(e.id),h=f===e.id,C=b===e.id,y=[...r,e.id],T=H=>{!c||e.disabled||(H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",e.id),H.dataTransfer.setData("application/json",JSON.stringify({id:e.id,path:y})),p(e.id));},M=H=>{H.preventDefault(),!(!c||f===e.id||e.disabled)&&x(e.id);},k=()=>{x(null);},N=H=>{if(H.preventDefault(),!c||f===e.id||e.disabled)return;let S=H.currentTarget.getBoundingClientRect(),D=H.clientY-S.top,I=S.height,z="inside";D<I*.25?z="before":D>I*.75&&(z="after"),g(e.id,z),p(null),x(null);},P=()=>{p(null),x(null);},L=H=>{e.disabled||(l?s(e.id,H):v&&n(e.id));},E=H=>{H.stopPropagation(),e.disabled||n(e.id);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":v?w:void 0,"aria-selected":l?R:void 0,"aria-disabled":e.disabled,draggable:c&&!e.disabled,onDragStart:T,onDragOver:M,onDragLeave:k,onDrop:N,onDragEnd:P,onClick:L,className:i(Cp({size:u,isSelected:R,isDragging:h,isDragOver:C,isDisabled:e.disabled})),style:{paddingLeft:`${t*m+12}px`},children:[c&&d&&!e.disabled&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:E,className:i("flex-shrink-0 p-0.5 rounded hover:bg-muted transition-transform",!v&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:i("h-4 w-4 transition-transform",w&&"rotate-90")})}),e.icon&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:e.icon}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 truncate",children:e.label})]}),v&&w&&jsxRuntime.jsx("div",{role:"group",children:e.children.map(H=>jsxRuntime.jsx(Mp,{node:H,level:t+1,parentPath:y},H.id))})]})},Tp=K__namespace.forwardRef(({className:e,variant:t,size:r,items:a,draggable:n=false,allowCrossLevel:o=true,onReorder:s,expandedKeys:l,defaultExpandedKeys:c=[],onExpand:d,selectable:m=false,selectedKeys:u,onSelect:f,showHandle:p=true,indentSize:b=24,...x},g)=>{let[v,w]=K__namespace.useState(new Set(c)),R=l!==void 0,h=R?new Set(l):v,C=K__namespace.useCallback(V=>{let B=new Set(h);B.has(V)?B.delete(V):B.add(V),R||w(B),d?.(Array.from(B));},[h,R,d]),[y,T]=K__namespace.useState(new Set),M=u!==void 0,k=M?new Set(u):y,N=K__namespace.useCallback((V,B)=>{let A=new Set(k);B.ctrlKey||B.metaKey?A.has(V)?A.delete(V):A.add(V):(A.clear(),A.add(V)),M||T(A),f?.(Array.from(A));},[k,M,f]),[P,L]=K__namespace.useState(null),[E,H]=K__namespace.useState(null),S=K__namespace.useCallback((V,B,A=null)=>{for(let W=0;W<V.length;W++){if(V[W].id===B)return {node:V[W],parent:A,index:W};if(V[W].children){let q=S(V[W].children,B,V[W]);if(q)return q}}return null},[]),D=K__namespace.useCallback((V,B)=>V.reduce((A,W)=>W.id===B?A:W.children?[...A,{...W,children:D(W.children,B)}]:[...A,W],[]),[]),I=K__namespace.useCallback((V,B,A,W)=>V.reduce((q,F)=>F.id===B?W==="before"?[...q,A,F]:W==="after"?[...q,F,A]:[...q,{...F,children:[...F.children||[],A]}]:F.children?[...q,{...F,children:I(F.children,B,A,W)}]:[...q,F],[]),[]),z=K__namespace.useCallback((V,B)=>{if(!P||!s)return;let A=S(a,P);if(!A)return;let W=(F,$)=>{let ae=S(a,F);if(!ae?.node.children)return false;for(let O of ae.node.children)if(O.id===$||W(O.id,$))return true;return false};if(B==="inside"&&W(P,V))return;if(!o){let F=S(a,V);if(A.parent?.id!==F?.parent?.id&&B!=="inside")return}let q=D(a,P);q=I(q,V,A.node,B),s(q);},[P,a,s,S,D,I,o]),G={expandedKeys:h,toggleExpand:C,selectedKeys:k,toggleSelect:N,selectable:m,draggable:n,allowCrossLevel:o,showHandle:p,indentSize:b,size:r,draggedId:P,setDraggedId:L,dragOverId:E,setDragOverId:H,handleDrop:z,items:a};return jsxRuntime.jsx(Np.Provider,{value:G,children:jsxRuntime.jsx("div",{ref:g,role:"tree","aria-multiselectable":m,className:i(wp({variant:t,size:r,className:e})),...x,children:a.map(V=>jsxRuntime.jsx(Mp,{node:V,level:0,parentPath:[]},V.id))})})});Tp.displayName="TreeList";var kp=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Lp=K__namespace.forwardRef(({className:e,position:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,"data-position":t,className:i(kp({position:t,className:e})),...r}));Lp.displayName="Timeline";var Ep=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"}}),Dp=K__namespace.forwardRef(({className:e,variant:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i(Ep({variant:t,className:e})),...r}));Dp.displayName="TimelineItem";var Sp=K__namespace.forwardRef(({className:e,dot:t,showConnector:r=true,...a},n)=>jsxRuntime.jsxs("div",{ref:n,className:i("flex flex-col items-center",e),...a,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:t}),r&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));Sp.displayName="TimelineSeparator";var Hp=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 pt-0.5",e),...t}));Hp.displayName="TimelineContent";var Vp=K__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}));Vp.displayName="TimelineOpposite";var Ap=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}}),zp=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}}),Bp=K__namespace.createContext({}),Op=K__namespace.forwardRef(({className:e,size:t="md",fullWidth:r,children:a,value:n,defaultValue:o,onValueChange:s,disabled:l,...c},d)=>{let[m,u]=K__namespace.useState(o),f=n!==void 0?n:m,p=K__namespace.useCallback(b=>{n===void 0&&u(b),s?.(b);},[n,s]);return jsxRuntime.jsx(Bp.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:l},children:jsxRuntime.jsx("div",{ref:d,role:"group",className:i(Ap({size:t,fullWidth:r,className:e})),...c,children:a})})});Op.displayName="SegmentedControl";var Fp=K__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,...n},o)=>{let s=K__namespace.useContext(Bp),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(zp({size:s.size,selected:l}),"flex-1",e),...n,children:t})});Fp.displayName="SegmentedControlItem";var Gp=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"}}),Kp=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},$o=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]},$p=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${$o(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},_p=K__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]=K__namespace.useState(false),[v,w]=K__namespace.useState(false),[R,h]=K__namespace.useState([]),C=K__namespace.useRef(null),y=K__namespace.useCallback(D=>{if(!D||D.length===0)return;let I=Array.from(D),z=[],G=[];(u?I:[I[0]]).forEach(B=>{let A=$p(B,d,m);A.length>0?G.push({file:B,errors:A}):z.push(B);}),h(G),z.length>0&&a?.(z),G.length>0&&n?.(G);},[d,m,u,a,n]),T=K__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(B=>B.endsWith("/*")?V.startsWith(B.slice(0,-2)):V===B)}return false});w(z);}},[f,m]),M=K__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!f&&(D.dataTransfer.dropEffect="copy");},[f]),k=K__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),w(false));},[]),N=K__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),g(false),w(false),!f&&y(D.dataTransfer.files);},[f,y]),P=K__namespace.useCallback(()=>{f||C.current?.click();},[f]),L=K__namespace.useCallback(D=>{y(D.target.files),D.target.value="";},[y]),E=K__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:T,onDragOver:M,onDragLeave:k,onDrop:N,onClick:P,onKeyDown:E,className:i(Gp({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:L,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 ${$o(d)}`,m&&m.length>0&&` \u2022 ${m.join(", ")}`]})]})]})]}),R.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:R.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=Kp(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:[$o(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(Ho,{value:D.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(X,{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)})})]})});_p.displayName="FileUpload";var hw=`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")`,jp=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}}),Hn=K__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(jp({size:n,shape:o,interactive:s??(!!a||!!c)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?hw: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}})}));Hn.displayName="ColorSwatch";var Yp=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Up=K__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]=K__namespace.useState(t),x=e??p,g=K__namespace.useCallback(w=>{c||(e===void 0&&b(w),r?.(w));},[e,r,c]),v=w=>w.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:i(Yp({layout:a}),d),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...m},...u,children:o.map(w=>{let R=x?v(x)===v(w):false;return jsxRuntime.jsx(Hn,{role:"option",color:w,size:s,shape:l,isSelected:R,onSelect:g,disabled:c,"aria-selected":R},w)})})});Up.displayName="ColorSwatchPicker";var Rw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Xp={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},qp=K__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=Rw,showInput:o=true,size:s="md",className:l,variant:c="full"},d)=>{let[m,u]=K__namespace.useState(e??t),f=K__namespace.useId();K__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",Xp[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(Ie,{children:[jsxRuntime.jsx(Ue,{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",Xp[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsxRuntime.jsx(Ae,{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(ca,{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(ca,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(g=>jsxRuntime.jsx(Hn,{color:g,size:"sm",isSelected:m.toLowerCase()===g.toLowerCase(),onSelect:b},g))})]})]})})]})});qp.displayName="ColorPicker";var Zp=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"}}),Ai=e=>String(e).padStart(2,"0"),Tw=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},Pw=(e,t)=>`${Ai(e)}:${Ai(t)}`,Jp=K__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]=K__namespace.useState(r??""),[b,x]=K__namespace.useState(false);K__namespace.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:g,minutes:v}=Tw(f||"00:00"),w=k=>{let N=k.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},R=(k,N)=>{let P=Math.max(0,Math.min(23,k)),L=Math.max(0,Math.min(59,N)),E=Pw(P,L);p(E),a?.(E);},h=()=>R(g+1,v),C=()=>R(g-1,v),y=()=>R(g,v+o),T=()=>R(g,v-o),M=({value:k,onIncrement:N,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(X,{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:Ai(k)}),jsxRuntime.jsx(X,{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:w,disabled:d,className:i(Zp({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...m}),s&&jsxRuntime.jsxs(Ie,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{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(Ae,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(M,{value:g,onIncrement:h,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(M,{value:v,onIncrement:y,onDecrement:T,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(X,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;R(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(X,{size:"sm",onClick:()=>x(false),children:"Done"})]})]})]})]})});Jp.displayName="TimeInput";var Qp=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"}}),Lw=(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}},zi=(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},ef=(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},tf=K__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},w)=>{let[R,h]=K__namespace.useState(a),[C,y]=K__namespace.useState(""),[T,M]=K__namespace.useState(false),k=r!==void 0?r:R,N=f??Lw(o,s);K__namespace.useEffect(()=>{!T&&k!==void 0&&y(zi(k,l,p,b));},[k,l,p,b,T]);let P=D=>{let I=D.target.value;if(!I){y(""),r===void 0&&h(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${b}.-]*$`).test(I))return;y(I);let G=ef(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);}},L=()=>{M(true),k!==void 0&&y(k.toString().replace(".",b));},E=()=>{M(false),y(k!==void 0?zi(k,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:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:L,onBlur:E,disabled:x,placeholder:g??`0${b}${"0".repeat(l)}`,className:i(Qp({size:t}),H&&"pl-8",S&&"pr-8","text-right",e),style:{borderColor:T?"var(--color-foreground)":void 0},...v}),S&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:S})]})});tf.displayName="CurrencyInput";var rf=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"}}),Bi={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:"#####-####"}},Sw=(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}},_r=e=>["#","A","*"].includes(e),Wo=(e,t,r)=>{let a="",n=0;for(let o=0;o<t.length&&n<=e.length;o++){let s=t[o];if(_r(s)){if(n<e.length){let l=e[n];Sw(l,s)?(a+=l,n++):(n++,o--);}}else (n<e.length||r)&&(a+=s);}return a},Oi=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];_r(n)&&(r+=e[a]);}return r},af=(e,t)=>e.split("").map(r=>_r(r)?t:r).join(""),Hw=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)_r(t[l])&&a++;let o=0,s=0;for(let l=0;l<t.length&&s<a;l++)o++,_r(t[l])&&s++;for(;o<t.length&&!_r(t[o]);)o++;return Math.min(o,e.length)},nf=K__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 Bi?Bi[o].mask:o,[b,x]=K__namespace.useState(a),[g,v]=K__namespace.useState(""),[w,R]=K__namespace.useState(false),h=K__namespace.useRef(null),C=r!==void 0?r:b;K__namespace.useImperativeHandle(f,()=>h.current),K__namespace.useEffect(()=>{let k=Wo(C,p,true);v(k);},[C,p]);let y=k=>{let N=k.target.value,P=k.target.selectionStart??0,L=N.replace(/[^\w]/g,""),E=Wo(L,p,true),H=Oi(E,p);v(E),r===void 0&&x(c?E:H),n?.(H,E),requestAnimationFrame(()=>{if(h.current){let S=Hw(E,p,P);h.current.setSelectionRange(S,S);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let N=h.current;if(!N)return;let P=N.selectionStart??0;if(k.key==="Backspace"&&P>0){let L=P-1;for(;L>0&&!_r(p[L]);)L--;let E=Oi(g,p),H=0;for(let I=0;I<L&&I<p.length;I++)_r(p[I])&&H++;let S=E.slice(0,Math.max(0,H-1))+E.slice(H),D=Wo(S,p,true);v(D),r===void 0&&x(c?D:S),n?.(S,D),k.preventDefault(),requestAnimationFrame(()=>{h.current&&h.current.setSelectionRange(L,L);});}},M=l?af(p,s):m;return jsxRuntime.jsx("input",{ref:h,type:"text",value:g,onChange:y,onKeyDown:T,onFocus:()=>R(true),onBlur:()=>R(false),disabled:d,placeholder:M,className:i(rf({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...u})});nf.displayName="MaskedInput";var of=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"}}),Uo={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},Gi={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},Fi=(e,t)=>String(e).padStart(t,"0"),Yo=(e,t)=>{let r=Fi(e.getDate(),2),a=Fi(e.getMonth()+1,2),n=Fi(e.getFullYear(),4),o=Uo[t],s=Gi[t],l={day:r,month:a,year:n};return s.map(c=>l[c]).join(o)},sf=(e,t)=>{let r=Uo[t],a=e.split(r);if(a.length!==3)return null;let n=Gi[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},zw=e=>e.toLowerCase(),Bw=e=>{let t=Uo[e];return Gi[e].map(a=>a==="year"?"####":"##").join(t)},lf=K__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]=K__namespace.useState(a??null),[x,g]=K__namespace.useState(""),[v,w]=K__namespace.useState(null),R=K__namespace.useRef(null),h=r!==void 0?r:p;K__namespace.useImperativeHandle(f,()=>R.current),K__namespace.useEffect(()=>{h?(g(Yo(h,o)),w(null)):g("");},[h,o]);let C=Uo[o],y=Bw(o),T=N=>{let P=N.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let L=P.replace(new RegExp(`\\${C}`,"g"),""),E="",H=0;for(let S=0;S<y.length&&H<L.length;S++)y[S]==="#"?(E+=L[H],H++):E+=y[S];if(g(E),E.length===y.length){let S=sf(E,o);if(S){if(s&&S<s){w(`Date must be after ${Yo(s,o)}`);return}if(l&&S>l){w(`Date must be before ${Yo(l,o)}`);return}w(null),r===void 0&&b(S),n?.(S);}else w("Invalid date");}else r===void 0&&b(null),n?.(null),w(null);},M=()=>{x&&x.length!==y.length&&(g(""),w(null),r===void 0&&b(null),n?.(null));},k=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:R,type:"text",inputMode:"numeric",value:x,onChange:T,onBlur:M,disabled:d,placeholder:m??zw(o),className:i(of({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(k,"text-muted-foreground")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});lf.displayName="DateInput";var df=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"}}),uf=[{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:"(###) ###-####"}],Xo=(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},$w=e=>e.replace(/#/g,"_"),mf=K__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:o,defaultCountry:s="TR",onCountryChange:l,countries:c=uf,showCountrySelect:d=true,showDialCode:m=false,disabled:u,placeholder:f,...p},b)=>{let[x,g]=K__namespace.useState(a),[v,w]=K__namespace.useState(o??s),[R,h]=K__namespace.useState(false),[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(false),[k,N]=K__namespace.useState({top:0,left:0,width:0}),P=K__namespace.useRef(null),L=K__namespace.useRef(null),E=r!==void 0?r:x,H=o??v,S=c.find(V=>V.code===H)??c[0],D=Xo(E,S.format);K__namespace.useEffect(()=>{M(true);},[]),K__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]),K__namespace.useEffect(()=>{if(!C)return;let V=B=>{P.current&&!P.current.contains(B.target)&&L.current&&!L.current.contains(B.target)&&y(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),K__namespace.useEffect(()=>{if(!C)return;let V=B=>{B.key==="Escape"&&y(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let A=V.target.value.replace(/\D/g,"");r===void 0&&g(A);let W=Xo(A,S.format),q=`${S.dialCode} ${W}`;n?.(A,q,S);},z=V=>{let B=c.find(q=>q.code===V);if(!B)return;o===void 0&&w(V),l?.(B);let A=Xo(E,B.format),W=`${B.dialCode} ${A}`;n?.(E,W,B),y(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:u,onClick:()=>y(!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")})]}),T&&C&&Po__namespace.createPortal(jsxRuntime.jsx("div",{ref:L,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:k.top,left:k.left,minWidth:k.width},children:jsxRuntime.jsx(ke,{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??$w(S.format),className:i(df({size:t}),d&&"rounded-l-none",m&&!d&&"pl-12",e),style:{borderColor:R?"var(--color-foreground)":void 0},...p})]})]})});mf.displayName="PhoneInput";var ff=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}}),gf=K__namespace.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:o,mobileBreakpoint:s="md",...l},c)=>{let[d,m]=K__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(ff({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})]})});gf.displayName="Navbar";var bf=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center gap-2 font-semibold text-lg",e),...t}));bf.displayName="NavbarBrand";var vf=K__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})});vf.displayName="NavbarContent";var hf=K__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}));hf.displayName="NavbarItem";var xf=K__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}));xf.displayName="NavbarLink";var Rf=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"}}),wf=K__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(Rf({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"})]})});wf.displayName="Link";var Cf=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"}}),Nf=K__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]=K__namespace.useState(false);K__namespace.useEffect(()=>{let w=d?.current||window,R=()=>{let C=(d?.current?d.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==b&&(x(C),m?.(C));};return w.addEventListener("scroll",R,{passive:true}),R(),()=>{w.removeEventListener("scroll",R);}},[r,d,b,m]);let g=w=>{d?.current?d.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),u?.(w);},v=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:i(Cf({position:t}),b?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(X,{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})})})});Nf.displayName="BackTop";var Mf=K__namespace.createContext(null),Tf=()=>{let e=K__namespace.useContext(Mf);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Pf=K__namespace.createContext(null),In=()=>{let e=K__namespace.useContext(Pf);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},$i=K__namespace.createContext(null),kf=K__namespace.createContext(null),Lf=K__namespace.forwardRef(({className:e,children:t,...r},a)=>{let[n,o]=K__namespace.useState(null);return jsxRuntime.jsx(Mf.Provider,{value:{activeMenu:n,setActiveMenu:o},children:jsxRuntime.jsx("div",{ref:a,role:"menubar",className:i("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...r,children:t})})});Lf.displayName="Menubar";var Ef=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=Tf(),a=K__namespace.useId(),n=K__namespace.useRef(null),o=t===a,s=K__namespace.useCallback(l=>{r(l?a:null);},[a,r]);return jsxRuntime.jsx(Pf.Provider,{value:{menuId:a,triggerRef:n,open:o,onOpenChange:s},children:e})};Ef.displayName="MenubarMenu";var Df=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));Df.displayName="MenubarGroup";var Sf=({children:e,container:t})=>{let[r,a]=K__namespace.useState(false);return K__namespace.useEffect(()=>{a(true);},[]),r?Po__namespace.createPortal(e,t||document.body):null};Sf.displayName="MenubarPortal";var Hf=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=K__namespace.useState(r),s=t!==void 0,l=s?t:n,c=K__namespace.useRef(null),d=K__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx($i.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};Hf.displayName="MenubarSub";var Vf=K__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(kf.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Vf.displayName="MenubarRadioGroup";var If=K__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:r,...a},n)=>{let{activeMenu:o,setActiveMenu:s}=Tf(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=In(),u=p=>{t?.(p),m(!d);},f=p=>{r?.(p),o&&o!==l&&s(l);};return jsxRuntime.jsx("button",{ref:p=>{c.current=p,typeof n=="function"?n(p):n&&(n.current=p);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:i("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),onClick:u,onMouseEnter:f,...a})});If.displayName="MenubarTrigger";var Af=K__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let l=K__namespace.useContext($i);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");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-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),onMouseEnter:u,onMouseLeave:f,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Af.displayName="MenubarSubTrigger";var zf=K__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let s=K__namespace.useContext($i);if(!s)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=s,[m,u]=K__namespace.useState({top:0,left:0}),[f,p]=K__namespace.useState(false),b=K__namespace.useRef(null);K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>{if(!l||!d.current||!b.current)return;(()=>{if(!d.current||!b.current)return;let w=d.current.getBoundingClientRect(),R=b.current.getBoundingClientRect(),h=w.top,C=w.right+t;C+R.width>window.innerWidth&&(C=w.left-R.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:Po__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 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:m.top,left:m.left},onMouseEnter:x,onMouseLeave:g,...n}),document.body)});zf.displayName="MenubarSubContent";var Bf=K__namespace.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,children:n,...o},s)=>{let{triggerRef:l,open:c,onOpenChange:d}=In(),[m,u]=K__namespace.useState({top:0,left:0}),[f,p]=K__namespace.useState(false),b=K__namespace.useRef(null);return K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>{if(!c||!l.current||!b.current)return;let x=()=>{if(!l.current||!b.current)return;let g=l.current.getBoundingClientRect(),v=b.current.getBoundingClientRect(),w=g.bottom+a,R=g.left+r;t==="center"?R=g.left+g.width/2-v.width/2:t==="end"&&(R=g.right-v.width-r),u({top:w,left:R});};return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,true),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,true);}},[c,t,r,a,l]),K__namespace.useEffect(()=>{if(!c)return;let x=g=>{let v=g.target;b.current&&!b.current.contains(v)&&l.current&&!l.current.contains(v)&&d(false);};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[c,d,l]),K__namespace.useEffect(()=>{if(!c)return;let x=g=>{g.key==="Escape"&&d(false);};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[c,d]),!f||!c?null:Po__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{b.current=x,typeof s=="function"?s(x):s&&(s.current=x);},role:"menu","data-state":c?"open":"closed",className:i("fixed z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:m.top,left:m.left},...o,children:n}),document.body)});Bf.displayName="MenubarContent";var Of=K__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{onOpenChange:l}=In(),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-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!r&&"cursor-pointer",e),onClick:c,...o})});Of.displayName="MenubarItem";var Ff=K__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{onOpenChange:c}=In(),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-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!n&&"cursor-pointer",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]})});Ff.displayName="MenubarCheckboxItem";var Gf=K__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{onOpenChange:l}=In(),c=K__namespace.useContext(kf),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-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!a&&"cursor-pointer",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-2 w-2 fill-current"})}),t]})});Gf.displayName="MenubarRadioItem";var Kf=K__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}));Kf.displayName="MenubarLabel";var $f=K__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}));$f.displayName="MenubarSeparator";var _f=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});_f.displayName="MenubarShortcut";var Wf=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"}}),jf=K__namespace.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...o},s)=>{let l=K__namespace.Children.toArray(n);return jsxRuntime.jsx("div",{ref:s,className:i(Wf({orientation:t,size:r,className:e})),...o,children:l.map((c,d)=>K__namespace.isValidElement(c)?K__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)})});jf.displayName="Steps";var Yf=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"}}),nC=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"}}),oC=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"}}),Uf=K__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(Yf({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(nC({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(oC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Uf.displayName="Step";function uC({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,...w},R){let[h,C]=K__namespace.useState(new Set),[y,T]=K__namespace.useState({columnId:null,direction:null}),[M,k]=K__namespace.useState({pageIndex:0,pageSize:u[0]||10}),N=n??h,P=c??y,L=f??M,E=F=>{o?o(F):C(F);},H=F=>{d?d(F):T(F);},S=F=>{p?p(F):k(F);},D=K__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let F=r.find($=>$.id===P.columnId);return F?[...t].sort(($,ae)=>{let O=F.accessor($),ee=F.accessor(ae);if(O===ee)return 0;if(O==null)return 1;if(ee==null)return -1;let Q=String(O).localeCompare(String(ee),void 0,{numeric:true});return P.direction==="asc"?Q:-Q}):t},[t,P,r]),I=K__namespace.useMemo(()=>{if(!m)return D;let F=L.pageIndex*L.pageSize;return D.slice(F,F+L.pageSize)},[D,m,L]),z=Math.ceil(D.length/L.pageSize),G=F=>{if(F===true){let $=new Set(I.map((ae,O)=>s(ae,O)));E($);}else E(new Set);},V=(F,$)=>{let ae=new Set(N);$?ae.add(F):ae.delete(F),E(ae);},B=I.length>0&&I.every((F,$)=>N.has(s(F,$))),A=I.some((F,$)=>N.has(s(F,$))),W=F=>{if(!r.find(O=>O.id===F)?.sortable&&!l)return;let ae="asc";P.columnId===F&&(P.direction==="asc"?ae="desc":P.direction==="desc"&&(ae=null)),H({columnId:ae?F:null,direction:ae});},q=F=>P.columnId!==F?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:R,className:i("w-full",e),...w,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(Cn,{checked:B?true:A?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),r.map(F=>{let $=F.sortable??l;return jsxRuntime.jsx("th",{className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground",$&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>$&&W(F.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[F.header,$&&q(F.id)]})},F.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((F,$)=>{let ae=s(F,$),O=N.has(ae);return jsxRuntime.jsxs("tr",{className:i("border-b transition-colors",v&&"hover:bg-muted/50",g&&$%2===1&&"bg-muted/30",O&&"bg-muted"),"data-state":O?"selected":void 0,children:[a&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx(Cn,{checked:O,onCheckedChange:ee=>V(ae,!!ee),"aria-label":`Select row ${$+1}`})}),r.map(ee=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:ee.cell?ee.cell(F,$):ee.accessor(F)},ee.id))]},ae)})})]})}),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:L.pageSize,onChange:F=>S({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(F=>jsxRuntime.jsx("option",{value:F,children:F},F))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",L.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(X,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...L,pageIndex:L.pageIndex-1}),disabled:L.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(X,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...L,pageIndex:L.pageIndex+1}),disabled:L.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var mC=K__namespace.forwardRef(uC);var qf=classVarianceAuthority.cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),Zf=K__namespace.forwardRef(({className:e,size:t,data:r,defaultExpandedIds:a=[],expandedIds:n,onExpandedChange:o,selectedId:s,onSelect:l,showIcons:c=true,leafIcon:d=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:m=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:u=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:f=false,...p},b)=>{let x=K__namespace.useCallback(y=>y.reduce((T,M)=>M.children?.length?[...T,M.id,...x(M.children)]:T,[]),[]),[g,v]=K__namespace.useState(()=>f?x(r):a),w=n??g,R=y=>{o?o(y):v(y);},h=y=>{w.includes(y)?R(w.filter(T=>T!==y)):R([...w,y]);},C=(y,T=0)=>{let M=y.children&&y.children.length>0,k=w.includes(y.id),N=s===y.id,P=()=>{y.disabled||l?.(y);},L=H=>{H.stopPropagation(),M&&h(y.id);},E=()=>y.icon?y.icon:M?k?u:m:d;return jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":M?k:void 0,children:[jsxRuntime.jsxs("div",{className:i("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",N&&"bg-primary/10 text-primary",y.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${T} * var(--tree-indent) + 8px)`},onClick:P,children:[jsxRuntime.jsx("button",{type:"button",className:i("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!M&&"invisible"),onClick:L,tabIndex:-1,"aria-label":k?"Collapse":"Expand",children:k?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),c&&jsxRuntime.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:E()}),jsxRuntime.jsx("span",{className:"truncate",children:y.name})]}),M&&k&&jsxRuntime.jsx("div",{role:"group",children:y.children.map(H=>C(H,T+1))})]},y.id)};return jsxRuntime.jsx("div",{ref:b,role:"tree",className:i(qf({size:t,className:e})),...p,children:r.map(y=>C(y))})});Zf.displayName="TreeView";var Qf=classVarianceAuthority.cva("flex rounded-md border border-input bg-background text-sm 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"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),CC=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),a=e.split(r);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a.map((n,o)=>r.test(n)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},o):jsxRuntime.jsx("span",{children:n},o))})},NC=(e,t)=>{let[r,a]=K__namespace.useState(e);return K__namespace.useEffect(()=>{let n=setTimeout(()=>{a(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r},eg=K__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,onSelect:o,options:s=[],loadOptions:l,debounceMs:c=300,minChars:d=0,placeholder:m="Type to search...",emptyText:u="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:b=true,maxHeight:x=200,highlightMatch:g=true,fullWidth:v=false,disabled:w,...R},h)=>{let[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(a),[k,N]=K__namespace.useState([]),[P,L]=K__namespace.useState(false),[E,H]=K__namespace.useState(false),S=K__namespace.useRef(null),D=r!==void 0?r:T,I=NC(D,c);K__namespace.useImperativeHandle(h,()=>S.current);let z=l?k:s,G=K__namespace.useMemo(()=>l?z:z.filter(Q=>Q.label.toLowerCase().includes(D.toLowerCase())),[z,D,l]);K__namespace.useEffect(()=>{if(!l)return;if(I.length<d){N([]);return}let Q=false;return (async()=>{L(true);try{let Ye=await l(I);Q||N(Ye);}catch{Q||N([]);}finally{Q||L(false);}})(),()=>{Q=true;}},[I,l,d]);let V=Q=>{r===void 0&&M(Q),n?.(Q);},B=Q=>{let st=Q.target.value;V(st),st.length>=d&&y(true);},A=Q=>{V(Q.label),o?.(Q),y(false);},W=()=>{V(""),S.current?.focus();},q=()=>{H(true),D.length>=d&&(G.length>0||P)&&y(true);},F=()=>{H(false);},$=Q=>{Q.key==="Escape"&&y(false),Q.key==="ArrowDown"&&!C&&G.length>0&&y(true);},ae=C&&D.length>=d,O=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ee=p&&D?"pr-8":"pr-3";return jsxRuntime.jsxs(Ie,{open:ae,onOpenChange:y,children:[jsxRuntime.jsx(wo,{asChild:true,children:jsxRuntime.jsxs("div",{className:i("relative",v?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:S,type:"text",value:D,onChange:B,onFocus:q,onBlur:F,onKeyDown:$,disabled:w,placeholder:m,className:i(Qf({size:t,fullWidth:v}),ee,e),style:{borderColor:E?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":ae,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...R}),p&&D&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:W,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsxRuntime.jsx(lucideReact.X,{className:O})})]})}),jsxRuntime.jsx(Ae,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:Q=>Q.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:x},children:P?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:i(O,"animate-spin")}),f]}):G.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):G.map(Q=>jsxRuntime.jsxs(cmdk.Command.Item,{value:Q.value,disabled:Q.disabled,onSelect:()=>A(Q),className:i("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsxRuntime.jsx(lucideReact.Check,{className:i("mr-2 h-4 w-4 shrink-0",D===Q.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:g?jsxRuntime.jsx(CC,{text:Q.label,query:D}):Q.label})]},Q.value))})})})]})});eg.displayName="Autocomplete";var Yi=K__namespace.createContext(null),Ui=K__namespace.createContext(null),Xi=()=>{let e=K__namespace.useContext(Yi);if(!e)throw new Error("useFormContext must be used within a Form");return e},Qo=()=>{let e=K__namespace.useContext(Ui);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},MC={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},tg=K__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:a=true,validateOnChange:n=false,children:o,className:s,...l},c)=>{let[d,m]=K__namespace.useState(e),[u,f]=K__namespace.useState({}),[p,b]=K__namespace.useState({}),[x,g]=K__namespace.useState({}),[v,w]=K__namespace.useState(false),R=K__namespace.useRef(new Map),h=K__namespace.useCallback((S,D)=>{R.current.set(S,D);},[]),C=K__namespace.useCallback(S=>{R.current.delete(S);},[]),y=K__namespace.useCallback(S=>{let D=R.current.get(S)||[],I=d[S];for(let z of D)if(!z.validate(I))return f(G=>({...G,[S]:z.message})),false;return f(z=>({...z,[S]:null})),true},[d]),T=K__namespace.useCallback(()=>{let S=true,D={};return R.current.forEach((I,z)=>{let G=d[z];for(let V of I)if(!V.validate(G)){D[z]=V.message,S=false;break}D[z]||(D[z]=null);}),f(D),S},[d]),M=K__namespace.useCallback((S,D)=>{m(I=>({...I,[S]:D})),g(I=>({...I,[S]:true})),n&&setTimeout(()=>{y(S);},0);},[n,y]),k=K__namespace.useCallback((S,D)=>{f(I=>({...I,[S]:D}));},[]),N=K__namespace.useCallback((S,D)=>{b(I=>({...I,[S]:D})),D&&a&&y(S);},[a,y]),P=K__namespace.useCallback(S=>({value:d[S],error:u[S]??null,touched:p[S]??false,dirty:x[S]??false}),[d,u,p,x]),L=K__namespace.useCallback(()=>{m(e),f({}),b({}),g({});},[e]),E=async S=>{S.preventDefault();let D={};if(R.current.forEach((z,G)=>{D[G]=true;}),b(D),!T()){r?.(u);return}if(t){w(true);try{await t(d);}finally{w(false);}}},H={values:d,errors:u,touched:p,dirty:x,isSubmitting:v,setValue:M,setError:k,setTouched:N,validateField:y,validateAll:T,registerField:h,unregisterField:C,getFieldState:P,reset:L};return jsxRuntime.jsx(Yi.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:c,onSubmit:E,className:i("space-y-4",s),...l,children:o})})});tg.displayName="Form";var rg=({name:e,rules:t=[],defaultValue:r,children:a})=>{let n=Xi(),o=K__namespace.useId();K__namespace.useEffect(()=>(n.registerField(e,t),r!==void 0&&n.values[e]===void 0&&n.setValue(e,r),()=>{n.unregisterField(e);}),[e,t,r,n]);let s=n.getFieldState(e),l={name:e,id:`${o}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(Ui.Provider,{value:l,children:a})};rg.displayName="FormField";var ag=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("space-y-1.5",e),...t}));ag.displayName="FormItem";var ng=K__namespace.forwardRef(({className:e,required:t,children:r,...a},n)=>{let{id:o,error:s,touched:l}=Qo();return jsxRuntime.jsxs(ca,{ref:n,htmlFor:o,className:i(s&&l&&"text-danger",e),...a,children:[r,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});ng.displayName="FormLabel";var og=({children:e})=>{let{name:t,id:r,error:a,touched:n}=Qo(),o=Xi(),s=o.getFieldState(t),l=d=>{let m=d.target,u=m.type==="checkbox"?m.checked:m.value;o.setValue(t,u);},c=()=>{o.setTouched(t,true);};return K__namespace.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:l,onBlur:c,"aria-invalid":a&&n?"true":void 0,"aria-describedby":a&&n?`${r}-error`:void 0})};og.displayName="FormControl";var sg=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:i("text-xs text-muted-foreground",e),...t}));sg.displayName="FormDescription";var ig=K__namespace.forwardRef(({className:e,message:t,...r},a)=>{let{id:n,error:o,touched:s}=Qo(),l=t??(s?o:null);return l?jsxRuntime.jsx("p",{ref:a,id:`${n}-error`,className:i("text-xs text-danger",e),role:"alert",...r,children:l}):null});ig.displayName="FormMessage";var cg=classVarianceAuthority.cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),dg=K__namespace.forwardRef(({className:e,size:t,name:r,description:a,avatarUrl:n,avatarFallback:o,trailing:s,...l},c)=>{let d=o||r.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:c,className:i(cg({size:t,className:e})),...l,children:[jsxRuntime.jsxs(da,{"data-user-avatar":true,children:[n&&jsxRuntime.jsx(Ga,{src:n,alt:r}),jsxRuntime.jsx(ua,{children:d})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:a})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});dg.displayName="User";var mg=classVarianceAuthority.cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),pg=K__namespace.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsxRuntime.jsx("code",{ref:n,className:i(mg({variant:t,size:r,className:e})),...a}));pg.displayName="Code";var fg=classVarianceAuthority.cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),gg=K__namespace.forwardRef(({className:e,variant:t,size:r,code:a,copyable:n=true,copyLabel:o="Copy",onCopy:s,symbol:l="$",hideSymbol:c=false,...d},m)=>{let[u,f]=K__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(a),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(b){console.error("Failed to copy:",b);}};return jsxRuntime.jsxs("div",{ref:m,className:i(fg({variant:t,size:r,className:e})),...d,children:[!c&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:l}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:a}),n&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:i("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":u?"Copied":o,children:u?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});gg.displayName="Snippet";var Ji=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),bg=K__namespace.forwardRef(({className:e,radius:t,src:r,alt:a,fallback:n,showSkeleton:o=true,onLoad:s,onError:l,fit:c="cover",aspectRatio:d,style:m,...u},f)=>{let[p,b]=K__namespace.useState("loading");K__namespace.useEffect(()=>{r&&b("loading");},[r]);let x=()=>{b("loaded"),s?.();},g=()=>{b("error"),l?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[c];return p==="error"&&n?jsxRuntime.jsx("div",{className:i(Ji({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:d,...m},children:n}):jsxRuntime.jsxs("div",{className:i(Ji({radius:t}),"relative",e),style:{aspectRatio:d,...m},children:[p==="loading"&&o&&jsxRuntime.jsx(vo,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:r,alt:a,onLoad:x,onError:g,className:i("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...u})]})});bg.displayName="Image";var xg=classVarianceAuthority.cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),yg=classVarianceAuthority.cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),Rg=K__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),wg=K__namespace.forwardRef(({className:e,size:t="md",value:r,defaultValue:a="",onValueChange:n,multiple:o=false,children:s,...l},c)=>{let[d,m]=K__namespace.useState(a),u=r??d,f=p=>{let b;if(o){let x=Array.isArray(u)?u:[u].filter(Boolean);x.includes(p)?b=x.filter(g=>g!==p):b=[...x,p];}else b=p;n?n(b):m(b);};return jsxRuntime.jsx(Rg.Provider,{value:{value:u,onValueChange:f,multiple:o,size:t??"md"},children:jsxRuntime.jsx("div",{ref:c,role:"listbox","aria-multiselectable":o,className:i(xg({size:t,className:e})),...l,children:s})})});wg.displayName="Listbox";var Cg=K__namespace.forwardRef(({className:e,value:t,disabled:r,icon:a,description:n,children:o,...s},l)=>{let{value:c,onValueChange:d,multiple:m,size:u}=K__namespace.useContext(Rg),f=m?Array.isArray(c)&&c.includes(t):c===t,p=()=>{r||d(t);},b=x=>{(x.key==="Enter"||x.key===" ")&&!r&&(x.preventDefault(),d(t));};return jsxRuntime.jsxs("div",{ref:l,role:"option","aria-selected":f,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:i(yg({size:u}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:b,...s,children:[a&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:a}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:o}),n&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Cg.displayName="ListboxItem";var Mg=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Tg=classVarianceAuthority.cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function BC({className:e,variant:t,size:r,items:a,onReorder:n,renderItem:o,showHandle:s=true,disabled:l=false,...c},d){let[m,u]=K__namespace.useState(null),[f,p]=K__namespace.useState(null),b=(R,h)=>{l||(u(h),R.dataTransfer.effectAllowed="move",R.dataTransfer.setData("text/plain",String(h)));},x=(R,h)=>{R.preventDefault(),!(l||m===null||m===h)&&p(h);},g=()=>{p(null);},v=(R,h)=>{if(R.preventDefault(),l||m===null||m===h){u(null),p(null);return}let C=[...a],[y]=C.splice(m,1);C.splice(h,0,y),n?.(C),u(null),p(null);},w=()=>{u(null),p(null);};return jsxRuntime.jsx("div",{ref:d,className:i(Mg({variant:t,size:r,className:e})),...c,children:a.map((R,h)=>jsxRuntime.jsxs("div",{draggable:!l,onDragStart:C=>b(C,h),onDragOver:C=>x(C,h),onDragLeave:g,onDrop:C=>v(C,h),onDragEnd:w,className:i(Tg({variant:t,size:r,isDragging:m===h,isDragOver:f===h}),!l&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:i("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(R,h)})]},R.id))})}var OC=K__namespace.forwardRef(BC);var Lg=classVarianceAuthority.cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),$C={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Eg=K__namespace.forwardRef(({className:e,variant:t,loading:r=true,size:a="md",spinner:n,text:o,children:s,...l},c)=>jsxRuntime.jsxs("div",{ref:c,className:i("relative",e),...l,children:[s,jsxRuntime.jsx("div",{className:i(Lg({variant:t,visible:r})),"aria-hidden":!r,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsxRuntime.jsx(lucideReact.Loader2,{className:i($C[a],"animate-spin text-primary")}),o&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:o})]})})]}));Eg.displayName="LoadingOverlay";var Dg=classVarianceAuthority.cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Sg=K__namespace.forwardRef(({className:e,color:t,isLoading:r=false,progress:a,showSpinner:n=false,...o},s)=>{let[l,c]=K__namespace.useState(0),[d,m]=K__namespace.useState(false),u=K__namespace.useRef(null);return K__namespace.useEffect(()=>{if(a!==void 0){c(a),m(a>0&&a<100);return}return r?(m(true),c(10),u.current=setInterval(()=>{c(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):l>0&&(c(100),setTimeout(()=>{m(false),c(0);},200)),()=>{u.current&&clearInterval(u.current);}},[r,a]),!d&&a===void 0||a!==void 0&&(a<=0||a>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:i(Dg({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...o,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&d&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:i("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Sg.displayName="NProgress";var Ag=classVarianceAuthority.cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),Hg={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},XC={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},zg=K__namespace.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:a,text:n,color:o="primary",...s},l)=>{let c={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[o],d=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(m=>jsxRuntime.jsx("div",{className:i(XC[r||"md"],"animate-bounce rounded-full bg-current",c),style:{animationDelay:`${m*.15}s`}},m))});case "pulse":return jsxRuntime.jsx("div",{className:i(Hg[r||"md"],"animate-pulse rounded-full bg-current",c)});case "skeleton":return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[jsxRuntime.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsxRuntime.jsx(lucideReact.Loader2,{className:i(Hg[r||"md"],"animate-spin",c)})}};return jsxRuntime.jsx("div",{ref:l,className:i(Ag({variant:t,size:r,fullScreen:a,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[d(),n&&jsxRuntime.jsx("span",{className:i("text-sm",c),children:n})]})})});zg.displayName="Loading";var tl=class extends K__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((a,n)=>a!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsx(rl,{error:this.state.error,onReset:this.reset}):this.props.children}},rl=K__namespace.forwardRef(({error:e,onReset:t,className:r},a)=>jsxRuntime.jsxs("div",{ref:a,className:i("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsxRuntime.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxRuntime.jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));rl.displayName="DefaultErrorFallback";var JC=tl;var Og=K__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date range",dateFormat:n="LLL dd, y",disabled:o=false,minDate:s,maxDate:l,numberOfMonths:c=2,className:d,align:m="start"},u)=>{let[f,p]=K__namespace.useState(false),[b,x]=K__namespace.useState(t),g=e!==void 0,v=g?e:b,w=h=>{g||x(h),r?.(h);},R=h=>{if(!h)return a;let{from:C,to:y}=h;return C&&y?`${dateFns.format(C,n)} - ${dateFns.format(y,n)}`:C?dateFns.format(C,n):a};return jsxRuntime.jsxs(Ie,{open:f,onOpenChange:p,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{ref:u,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",d),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),R(v)]})}),jsxRuntime.jsx(Ae,{className:"w-auto p-0",align:m,children:jsxRuntime.jsx(_a,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:w,numberOfMonths:c,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});Og.displayName="DateRangePicker";var rn=e=>String(e).padStart(2,"0"),Fg=K__namespace.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:a=true,minuteStep:n=1,disabled:o=false,className:s},l)=>{let[c,d]=K__namespace.useState(false),m=a?Array.from({length:24},(R,h)=>h):Array.from({length:12},(R,h)=>h+1),u=Array.from({length:Math.floor(60/n)},(R,h)=>h*n),f=R=>{if(!R)return r;if(a)return `${rn(R.hours)}:${rn(R.minutes)}`;let h=R.hours%12||12,C=R.hours>=12?"PM":"AM";return `${rn(h)}:${rn(R.minutes)} ${C}`},p=R=>{let h=e?.minutes??0,C=R;if(!a&&e){let y=e.hours>=12;y&&R!==12?C=R+12:!y&&R===12&&(C=0);}t?.({hours:C,minutes:h});},b=R=>{let h=e?.hours??0;t?.({hours:h,minutes:R});},x=R=>{if(!e)return;let h=e.hours;R==="AM"&&e.hours>=12?h=e.hours-12:R==="PM"&&e.hours<12&&(h=e.hours+12),t?.({hours:h,minutes:e.minutes});},g=()=>{let R=new Date;t?.({hours:R.getHours(),minutes:R.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,w=e?a?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(Ie,{open:c,onOpenChange:d,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{ref:l,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsxRuntime.jsx(lucideReact.Clock,{className:"mr-2 h-4 w-4"}),f(e)]})}),jsxRuntime.jsxs(Ae,{className:"w-auto p-0",align:"start",children:[jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsxRuntime.jsx(ke,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(R=>jsxRuntime.jsx(X,{variant:w===R?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(R),children:rn(R)},R))})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsxRuntime.jsx(ke,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:u.map(R=>jsxRuntime.jsx(X,{variant:e?.minutes===R?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>b(R),children:rn(R)},R))})})]}),!a&&jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(X,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>x("AM"),children:"AM"}),jsxRuntime.jsx(X,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>x("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(X,{variant:"ghost",size:"sm",onClick:g,children:"Now"}),jsxRuntime.jsx(X,{size:"sm",onClick:()=>d(false),children:"Done"})]})]})]})});Fg.displayName="TimePicker";var Gg=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function rN({className:e,variant:t,items:r,itemHeight:a,height:n,overscan:o=3,renderItem:s,getItemKey:l,gap:c=0,onScrollChange:d,...m},u){let f=K__namespace.useRef(null),[p,b]=K__namespace.useState(0);K__namespace.useImperativeHandle(u,()=>f.current);let x=r.length*(a+c)-c,g=a+c,v=Math.max(0,Math.floor(p/g)-o),w=Math.ceil(n/g)+2*o,R=Math.min(r.length-1,v+w),h=y=>{let T=y.currentTarget.scrollTop;b(T),d?.(T);},C=K__namespace.useMemo(()=>{let y=[];for(let T=v;T<=R;T++)r[T]!==void 0&&y.push({item:r[T],index:T,style:{position:"absolute",top:T*g,left:0,right:0,height:a}});return y},[r,v,R,g,a]);return jsxRuntime.jsx("div",{ref:f,className:i(Gg({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:h,...m,children:jsxRuntime.jsx("div",{style:{height:x,position:"relative"},children:C.map(({item:y,index:T,style:M})=>jsxRuntime.jsx("div",{style:M,children:s(y,T)},l?l(y,T):T))})})}var aN=K__namespace.forwardRef(rN);var $g=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),ol=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),_g=K__namespace.forwardRef(({className:e,variant:t,size:r,children:a,onLoadMore:n,hasMore:o,isLoading:s=false,loader:l,threshold:c=100,rootMargin:d,useWindow:m=false,endMessage:u,...f},p)=>{let b=K__namespace.useRef(null),x=K__namespace.useRef(null),g=K__namespace.useRef(false);K__namespace.useImperativeHandle(p,()=>b.current),K__namespace.useEffect(()=>{let w=x.current;if(!w)return;let R=new IntersectionObserver(h=>{let[C]=h;C.isIntersecting&&o&&!s&&!g.current&&(g.current=true,Promise.resolve(n()).finally(()=>{g.current=false;}));},{root:m?null:b.current,rootMargin:d||`${c}px`,threshold:0});return R.observe(w),()=>{R.disconnect();}},[o,s,n,c,d,m]);let v=jsxRuntime.jsx("div",{className:i(ol({size:r})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:b,className:i($g({variant:t,className:e})),...f,children:[a,jsxRuntime.jsx("div",{ref:x,className:"h-px w-full"}),s&&(l||v),!o&&!s&&u&&jsxRuntime.jsx("div",{className:i(ol({size:r}),"text-muted-foreground text-sm"),children:u})]})});_g.displayName="InfiniteScroll";var Fn=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,className:i("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Fn.displayName="VisuallyHidden";var jg={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},iN={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},Yg=classVarianceAuthority.cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),sl=classVarianceAuthority.cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),ls=K__namespace.createContext(null),Ca=()=>{let e=K__namespace.useContext(ls);if(!e)throw new Error("Modal components must be used within a Modal");return e},Xg=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a="Modal",children:n,hideCloseButton:o=false,isDismissable:s=true,isKeyboardDismissDisabled:l=false,backdrop:c="opaque",placement:d="center",scrollBehavior:m="inside",size:u,className:f},p)=>{let[b,x]=K__namespace.useState(false),g=e!==void 0,v=g?e:b,[w,R]=K__namespace.useState(false),h=K__namespace.useRef(null),C=K__namespace.useId(),y=K__namespace.useId();K__namespace.useEffect(()=>{R(true);},[]);let T=K__namespace.useCallback(P=>{g||x(P),t?.(P);},[g,t]);K__namespace.useEffect(()=>(v&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[v]),K__namespace.useEffect(()=>{if(!v||l)return;let P=L=>{L.key==="Escape"&&T(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[v,l,T]);let M=P=>{s&&P.target===P.currentTarget&&T(false);},k=r?K__namespace.isValidElement(r)?K__namespace.cloneElement(r,{onClick:P=>{r.props.onClick?.(P),T(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>T(true),children:r}):null,N=()=>!w||!v?null:m==="outside"?Po__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:i(Yg(),jg[c],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxRuntime.jsxs("div",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:i("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",u==="xs"&&"w-full max-w-xs",u==="sm"&&"w-full max-w-sm",u==="md"&&"w-full max-w-md",u==="lg"&&"w-full max-w-lg",u==="xl"&&"w-full max-w-xl",u==="2xl"&&"w-full max-w-2xl",u==="3xl"&&"w-full max-w-3xl",u==="4xl"&&"w-full max-w-4xl",u==="5xl"&&"w-full max-w-5xl",u==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!u&&"w-full max-w-md",f),children:[jsxRuntime.jsx(Fn,{children:jsxRuntime.jsx("h2",{id:C,children:a})}),n,!o&&jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:i(Yg(),jg[c]),onClick:M,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:i(sl({size:u}),iN[d],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(Fn,{children:jsxRuntime.jsx("h2",{id:C,children:a})}),n,!o&&jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxRuntime.jsxs(ls.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:m,titleId:C,descriptionId:y},children:[k,N()]})});Xg.displayName="Modal";var qg=({children:e,open:t,defaultOpen:r=false,onOpenChange:a,scrollBehavior:n="inside"})=>{let[o,s]=K__namespace.useState(r),l=t!==void 0,c=l?t:o,d=K__namespace.useId(),m=K__namespace.useId(),u=K__namespace.useCallback(f=>{l||s(f),a?.(f);},[l,a]);return jsxRuntime.jsx(ls.Provider,{value:{open:c,onOpenChange:u,scrollBehavior:n,titleId:d,descriptionId:m},children:e})};qg.displayName="ModalRoot";var Zg=K__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{onOpenChange:o}=Ca(),s=l=>{r?.(l),o(true);};return e&&K__namespace.isValidElement(t)?K__namespace.cloneElement(t,{ref:n,onClick:l=>{t.props.onClick?.(l),o(true);},...a}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:t})});Zg.displayName="ModalTrigger";var il=({children:e,container:t})=>{let[r,a]=K__namespace.useState(false);return K__namespace.useEffect(()=>{a(true);},[]),r?Po__namespace.createPortal(e,t||document.body):null};il.displayName="ModalPortal";var ll=K__namespace.forwardRef(({className:e,...t},r)=>{let{open:a,onOpenChange:n}=Ca();return a?jsxRuntime.jsx("div",{ref:r,"data-state":a?"open":"closed",className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>n(false),"aria-hidden":"true",...t}):null});ll.displayName="ModalOverlay";var cl=K__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{onOpenChange:o}=Ca(),s=l=>{r?.(l),o(false);};return e&&K__namespace.isValidElement(t)?K__namespace.cloneElement(t,{ref:n,onClick:l=>{t.props.onClick?.(l),o(false);},...a}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:t})});cl.displayName="ModalClose";var Jg=K__namespace.forwardRef(({className:e,children:t,size:r,showCloseButton:a=true,onEscapeKeyDown:n,onInteractOutside:o,...s},l)=>{let{open:c,onOpenChange:d,titleId:m,descriptionId:u}=Ca(),[f,p]=K__namespace.useState(false);return K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>(c&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[c]),K__namespace.useEffect(()=>{if(!c)return;let b=x=>{x.key==="Escape"&&(n?.(),d(false));};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d,n]),!f||!c?null:jsxRuntime.jsxs(il,{children:[jsxRuntime.jsx(ll,{}),jsxRuntime.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":m,"aria-describedby":u,"data-state":c?"open":"closed",className:i(sl({size:r}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,a&&jsxRuntime.jsx(cl,{asChild:true,children:jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Jg.displayName="ModalContent";var Qg=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qg.displayName="ModalHeader";var eb=({className:e,children:t})=>(K__namespace.useContext(ls)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(ke,{className:i("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:i(e),children:t});eb.displayName="ModalBody";var tb=({className:e,children:t,...r})=>{let{onOpenChange:a}=Ca();return jsxRuntime.jsx("div",{className:i("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:K__namespace.Children.map(t,n=>K__namespace.isValidElement(n)?K__namespace.cloneElement(n,{onClick:o=>{n.props.onClick?.(o),a(false);}}):n)})};tb.displayName="ModalFooter";var rb=K__namespace.forwardRef(({className:e,...t},r)=>{let{titleId:a}=Ca();return jsxRuntime.jsx("h2",{ref:r,id:a,className:i("text-lg font-semibold leading-none tracking-tight",e),...t})});rb.displayName="ModalTitle";var ab=K__namespace.forwardRef(({className:e,...t},r)=>{let{descriptionId:a}=Ca();return jsxRuntime.jsx("p",{ref:r,id:a,className:i("text-sm text-muted-foreground",e),...t})});ab.displayName="ModalDescription";var sb=classVarianceAuthority.cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),fN=classVarianceAuthority.cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),gN=K__namespace.createContext(null),bN={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},dl=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,confirmText:o="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:c,showIcon:d=true,icon:m,variant:u="default",loading:f=false,disabled:p=false,className:b},x)=>{let[g,v]=K__namespace.useState(false),[w,R]=K__namespace.useState(false),[h,C]=K__namespace.useState(false),y=e!==void 0,T=y?e:g,M=bN[u||"default"],k=K__namespace.useId(),N=K__namespace.useId();K__namespace.useEffect(()=>{C(true);},[]);let P=K__namespace.useCallback(I=>{y||v(I),t?.(I);},[y,t]);K__namespace.useEffect(()=>(T&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[T]);let L=async()=>{if(l){let I=l();if(I instanceof Promise){R(true);try{await I;}finally{R(false);}}}P(false);},E=()=>{c?.(),P(false);},H=f||w,S=r?K__namespace.isValidElement(r)?K__namespace.cloneElement(r,{onClick:I=>{r.props.onClick?.(I),P(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>P(true),children:r}):null,D=()=>!h||!T?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":T?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:x,role:"alertdialog","aria-modal":"true","aria-labelledby":k,"aria-describedby":n?N:void 0,"data-state":T?"open":"closed",className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",b),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[d&&jsxRuntime.jsx("div",{className:i(sb({variant:u})),children:m||jsxRuntime.jsx(M,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsxRuntime.jsx("h2",{id:k,className:"text-lg font-semibold",children:a}),n&&jsxRuntime.jsx("p",{id:N,className:"text-sm text-muted-foreground",children:n})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:i(ar({variant:"bordered"})),onClick:E,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:i(ar(),fN({variant:u}),H&&"opacity-50 cursor-not-allowed"),onClick:L,disabled:p||H,children:H?jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),"Loading..."]}):o})]})]})]}),document.body);return jsxRuntime.jsxs(gN.Provider,{value:{open:T,onOpenChange:P,titleId:k,descriptionId:N},children:[S,D()]})});dl.displayName="ConfirmDialog";function vN(){let[e,t]=K__namespace.useState({open:false,options:null,resolve:null}),r=K__namespace.useCallback(l=>new Promise(c=>{t({open:true,options:l,resolve:c});}),[]),a=K__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=K__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),o=K__namespace.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=K__namespace.useMemo(()=>e.options?jsxRuntime.jsx(dl,{open:e.open,onOpenChange:o,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:a,onCancel:n}):null,[e,a,n,o]);return {confirm:r,ConfirmDialog:s}}var kN=e=>e.map(t=>typeof t=="string"?{src:t}:t),ul=K__namespace.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:a=0,onIndexChange:n,trigger:o,showThumbnails:s=true,showZoom:l=true,showRotate:c=true,showDownload:d=true,showFullscreen:m=true,showNavigation:u=true,showCounter:f=true,closeOnBackdropClick:p=true,className:b},x)=>{let g=K__namespace.useMemo(()=>kN(e),[e]),[v,w]=K__namespace.useState(a),[R,h]=K__namespace.useState(1),[C,y]=K__namespace.useState(0),[T,M]=K__namespace.useState(false),[k,N]=K__namespace.useState(false),[P,L]=K__namespace.useState({x:0,y:0}),[E,H]=K__namespace.useState({x:0,y:0}),[S,D]=K__namespace.useState(false),I=K__namespace.useRef(null),z=g[v];K__namespace.useEffect(()=>{D(true);},[]),K__namespace.useEffect(()=>{w(a);},[a]),K__namespace.useEffect(()=>{n?.(v);},[v,n]),K__namespace.useEffect(()=>{h(1),y(0),L({x:0,y:0});},[v]),K__namespace.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[t]);let G=K__namespace.useCallback(()=>{w(oe=>oe>0?oe-1:g.length-1);},[g.length]),V=K__namespace.useCallback(()=>{w(oe=>oe<g.length-1?oe+1:0);},[g.length]),B=()=>{h(oe=>Math.min(oe+.5,4));},A=()=>{h(oe=>{let Mt=Math.max(oe-.5,.5);return Mt===1&&L({x:0,y:0}),Mt});},W=()=>{y(oe=>(oe+90)%360);},q=async()=>{if(z)try{let Mt=await(await fetch(z.src)).blob(),oo=URL.createObjectURL(Mt),oa=document.createElement("a");oa.href=oo,oa.download=z.alt||`image-${v+1}`,document.body.appendChild(oa),oa.click(),document.body.removeChild(oa),URL.revokeObjectURL(oo);}catch{window.open(z.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},$=oe=>{R>1&&(N(true),H({x:oe.clientX-P.x,y:oe.clientY-P.y}));},ae=oe=>{k&&R>1&&L({x:oe.clientX-E.x,y:oe.clientY-E.y});},O=()=>{N(false);},ee=()=>{r?.(false);},Q=oe=>{p&&oe.target===oe.currentTarget&&ee();},st=K__namespace.useCallback(oe=>{switch(oe.key){case "ArrowLeft":G();break;case "ArrowRight":V();break;case "Escape":r?.(false);break;case "+":case "=":B();break;case "-":A();break}},[G,V,r]);if(K__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",st),()=>window.removeEventListener("keydown",st)},[t,st]),K__namespace.useEffect(()=>{let oe=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),g.length===0)return null;let Ye=o?K__namespace.isValidElement(o)?K__namespace.cloneElement(o,{onClick:oe=>{o.props.onClick?.(oe),r?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>r?.(true),children:o}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[Ye,!S||!t?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Q}),jsxRuntime.jsxs("div",{ref:x,className:i("fixed inset-0 z-50 flex flex-col outline-none",b),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[f&&g.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[v+1," / ",g.length]}),z?.title&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:A,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-5 w-5"})}),jsxRuntime.jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(R*100),"%"]}),jsxRuntime.jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),c&&jsxRuntime.jsx("button",{onClick:W,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),m&&jsxRuntime.jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsxRuntime.jsx(lucideReact.Minimize2,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Maximize2,{className:"h-5 w-5"})}),jsxRuntime.jsxs("button",{onClick:ee,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxRuntime.jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:$,onMouseMove:ae,onMouseUp:O,onMouseLeave:O,children:[u&&g.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:G,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"})}),jsxRuntime.jsx("button",{onClick:V,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("img",{src:z?.src,alt:z?.alt||"",className:i("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":R>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${R}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&g.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:g.map((oe,Mt)=>jsxRuntime.jsx("button",{onClick:()=>w(Mt),className:i("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===Mt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${Mt+1}`,className:"h-full w-full object-cover"})},Mt))})]})]}),document.body)]})});ul.displayName="ImageViewer";var lb=({children:e,images:t,index:r=0,className:a})=>{let[n,o]=K__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>o(true),className:i("cursor-zoom-in",a),children:e}),jsxRuntime.jsx(ul,{images:t,open:n,onOpenChange:o,initialIndex:r})]})};lb.displayName="ImageViewerTrigger";var db=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground 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 text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/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"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),ub=K__namespace.forwardRef(({className:e,variant:t,size:r,color:a,radius:n,loading:o,disabled:s,children:l,...c},d)=>jsxRuntime.jsx("button",{ref:d,type:"button",className:i(db({variant:t,size:r,color:a,radius:n}),e),disabled:s||o,...c,children:o?jsxRuntime.jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},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"})]}):l}));ub.displayName="ActionIcon";var fb=({children:e,container:t,disabled:r=false})=>{let[a,n]=K__namespace.useState(false);if(K__namespace.useEffect(()=>{n(true);},[]),r||!a)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let o=null;return typeof t=="string"?o=document.querySelector(t):t instanceof Element?o=t:o=document.body,o?Po.createPortal(e,o):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})};fb.displayName="Portal";var gb=classVarianceAuthority.cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),bb=K__namespace.forwardRef(({className:e,color:t,size:r,position:a,ping:n,content:o,show:s=true,offset:l,style:c,...d},m)=>{if(!s)return null;let u=o!=null;return jsxRuntime.jsxs("span",{ref:m,className:i(gb({color:t,size:u?void 0:r,position:a,ping:n}),u&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...c,...l!==void 0&&{transform:`translate(${a?.includes("right")?l:-l}px, ${a?.includes("top")?-l:l}px)`}},...d,children:[n&&jsxRuntime.jsx("span",{className:i("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),o]})});bb.displayName="Indicator";var vb=K__namespace.forwardRef(({className:e,children:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("relative inline-flex",e),...r,children:t}));vb.displayName="IndicatorWrapper";var xb=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),yb=K__namespace.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:a=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:o,...s},l)=>{let c=K__namespace.useRef(null),[d,m]=K__namespace.useState({top:false,bottom:false,left:false,right:false});K__namespace.useImperativeHandle(l,()=>c.current);let u=K__namespace.useCallback(()=>{let v=c.current;if(!v)return;let{scrollTop:w,scrollLeft:R,scrollHeight:h,scrollWidth:C,clientHeight:y,clientWidth:T}=v;m({top:w>0,bottom:w<h-y-1,left:R>0,right:R<C-T-1});},[]);K__namespace.useEffect(()=>{let v=c.current;if(v)return u(),v.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{v.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[u]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],b=t==="vertical"||t==="both",x=t==="horizontal"||t==="both",g={maskImage:[b&&d.top&&`linear-gradient(to bottom, transparent, black ${p})`,b&&d.bottom&&`linear-gradient(to top, transparent, black ${p})`,x&&d.left&&`linear-gradient(to right, transparent, black ${p})`,x&&d.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:c,className:i(xb({orientation:t,size:r}),a&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:g,...s,children:o})});yb.displayName="ScrollShadow";var Rb=classVarianceAuthority.cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),zN={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},BN={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},ON=e=>{let t=e.toLowerCase();return zN[t]||e.toUpperCase()},Kn=e=>{let t=e.toLowerCase();return BN[t]||t},ds=e=>{let t=Kn(e);return ["meta","control","alt","shift"].includes(t)},wb=K__namespace.forwardRef(({className:e,variant:t,size:r,keys:a,children:n,onPress:o,disabled:s,preventDefault:l=true,...c},d)=>{K__namespace.useEffect(()=>{if(!o||!a||s)return;let u=Array.isArray(a)?a:[a],f=u.filter(ds).map(Kn),p=u.filter(x=>!ds(x)).map(Kn),b=x=>{let g=f.includes("meta")===x.metaKey,v=f.includes("control")===x.ctrlKey,w=f.includes("alt")===x.altKey,R=f.includes("shift")===x.shiftKey,h=p.length===0||p.includes(x.key.toLowerCase());g&&v&&w&&R&&h&&(l&&x.preventDefault(),o(x));};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,o,s,l]);let m=()=>a?(Array.isArray(a)?a:[a]).map((f,p)=>jsxRuntime.jsxs(K__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:ON(f)})]},p)):n;return jsxRuntime.jsx("kbd",{ref:d,className:i(Rb({variant:t,size:r}),s&&"opacity-50",e),...c,children:m()})});wb.displayName="Kbd";function FN(e,t,r={}){let{disabled:a=false,preventDefault:n=true}=r;K__namespace.useEffect(()=>{if(a)return;let o=Array.isArray(e)?e:[e],s=o.filter(ds).map(Kn),l=o.filter(d=>!ds(d)).map(Kn),c=d=>{let m=s.includes("meta")===d.metaKey,u=s.includes("control")===d.ctrlKey,f=s.includes("alt")===d.altKey,p=s.includes("shift")===d.shiftKey,b=l.length===0||l.includes(d.key.toLowerCase());m&&u&&f&&p&&b&&(n&&d.preventDefault(),t(d));};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,t,a,n]);}var Nb=K__namespace.forwardRef(({className:e,size:t,axis:r="both",style:a,...n},o)=>{let s=typeof t=="number"?`${t}px`:t,l={...a,...t?{width:r==="vertical"?void 0:s,height:r==="horizontal"?void 0:s,minWidth:r==="vertical"?void 0:s,minHeight:r==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsxRuntime.jsx("div",{ref:o,"aria-hidden":"true",className:i(e),style:l,...n})});Nb.displayName="Spacer";var Mb=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md 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:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Tb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a,successDuration:n=2e3,onCopySuccess:o,onCopyError:s,copyIcon:l,successIcon:c,...d},m)=>{let[u,f]=K__namespace.useState(false),p={sm:14,md:16,lg:20}[r??"md"],b=async()=>{try{await navigator.clipboard.writeText(a),f(!0),o?.(),setTimeout(()=>{f(!1);},n);}catch(x){s?.(x);}};return jsxRuntime.jsx("button",{ref:m,type:"button",className:i(Mb({variant:t,size:r}),e),onClick:b,"aria-label":u?"Copied":"Copy to clipboard",...d,children:u?c??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):l??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});Tb.displayName="CopyButton";var kb=classVarianceAuthority.cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),XN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function ZN(e,t,r){let a=new Date(e,t,1),n=new Date(e,t+1,0),o=[],s=a.getDay()-r;s<0&&(s+=7);for(let c=s-1;c>=0;c--)o.push(new Date(e,t,-c));for(let c=1;c<=n.getDate();c++)o.push(new Date(e,t,c));let l=42-o.length;for(let c=1;c<=l;c++)o.push(new Date(e,t+1,c));return o}function JN(e,t){let r=[],n=e.getDay()-t;n<0&&(n+=7);let o=new Date(e);o.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(o);l.setDate(o.getDate()+s),r.push(l);}return r}function ps(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ms(e){return ps(e,new Date)}function Pb(e,t){return e.filter(r=>{let a=new Date(r.start),n=new Date(r.end);return ps(a,t)||ps(n,t)||a<t&&n>t})}var Lb=K__namespace.forwardRef(({className:e,variant:t,size:r,events:a=[],view:n="month",onViewChange:o,date:s,onDateChange:l,onEventClick:c,onSlotClick:d,weekStartsOn:m=0,locale:u="en-US",...f},p)=>{let[b,x]=K__namespace.useState(new Date),g=s??b,v=N=>{l?l(N):x(N);},w=m===1?qN:XN,R=()=>{let N=new Date(g);n==="month"?N.setMonth(N.getMonth()-1):n==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},h=()=>{let N=new Date(g);n==="month"?N.setMonth(N.getMonth()+1):n==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},y=()=>n==="day"?g.toLocaleDateString(u,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):g.toLocaleDateString(u,{year:"numeric",month:"long"}),T=()=>{let N=ZN(g.getFullYear(),g.getMonth(),m);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((P,L)=>{let E=Pb(a,P),H=P.getMonth()===g.getMonth();return jsxRuntime.jsxs("div",{className:i("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>d?.(P),children:[jsxRuntime.jsx("div",{className:i("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",ms(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[E.slice(0,3).map(S=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:S.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),c?.(S);},children:S.title},S.id)),E.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",E.length-3," more"]})]})]},L)})})]})},M=()=>{let N=JN(g,m),P=Array.from({length:24},(L,E)=>E);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsxRuntime.jsx("div",{className:"p-2"}),N.map((L,E)=>jsxRuntime.jsxs("div",{className:i("p-2 text-center border-l",ms(L)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:w[E]}),jsxRuntime.jsx("div",{className:i("text-lg font-semibold",ms(L)&&"text-primary"),children:L.getDate()})]},E))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(L=>jsxRuntime.jsxs(K__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[L.toString().padStart(2,"0"),":00"]}),N.map((E,H)=>{let S=new Date(E);S.setHours(L,0,0,0);let D=a.filter(I=>{let z=new Date(I.start);return ps(z,E)&&z.getHours()===L});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(S),children:D.map(I=>jsxRuntime.jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),c?.(I);},children:I.title},I.id))},H)})]},L))})})]})},k=()=>{let N=Array.from({length:24},(L,E)=>E),P=Pb(a,g);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsx("div",{className:"p-4 border-b text-center",children:jsxRuntime.jsx("div",{className:i("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",ms(g)&&"bg-primary text-primary-foreground"),children:g.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(L=>{let E=new Date(g);E.setHours(L,0,0,0);let H=P.filter(S=>new Date(S.start).getHours()===L);return jsxRuntime.jsxs(K__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[L.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(E),children:H.map(S=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:S.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),c?.(S);},children:S.title},S.id))})]},L)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:i(kb({variant:t,size:r,className:e})),...f,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(X,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(X,{variant:"ghost",size:"icon",onClick:R,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(X,{variant:"ghost",size:"icon",onClick:h,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsxRuntime.jsx(X,{variant:n===N?"solid":"ghost",size:"sm",onClick:()=>o?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),n==="month"&&T(),n==="week"&&M(),n==="day"&&k()]})});Lb.displayName="FullCalendar";var _n=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),Wn=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],Eb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",curveType:d="monotone",...m},u)=>jsxRuntime.jsx("div",{ref:u,className:i(_n({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:r,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:c,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:d,dataKey:f,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Eb.displayName="LineChart";var Db=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",stacked:d=false,layout:m="horizontal",...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:r,layout:m,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:m==="horizontal"?c:void 0,type:m==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:m==="vertical"?c:void 0,type:m==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((p,b)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:n[b%n.length],stackId:d?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Db.displayName="BarChart";var Sb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKey:a="value",nameKey:n="name",colors:o=Wn,innerRadius:s=0,outerRadius:l=80,showLegend:c=true,showTooltip:d=true,showLabels:m=false,...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[d&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),c&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:r,dataKey:a,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:m,labelLine:m,children:r.map((p,b)=>jsxRuntime.jsx(recharts.Cell,{fill:o[b%o.length]},`cell-${b}`))})]})})}));Sb.displayName="PieChart";var Hb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",stacked:d=false,curveType:m="monotone",...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:r,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:c,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((p,b)=>jsxRuntime.jsx(recharts.Area,{type:m,dataKey:p,stroke:n[b%n.length],fill:n[b%n.length],fillOpacity:.3,stackId:d?"stack":void 0},p))]})})}));Hb.displayName="AreaChart";var Ab=classVarianceAuthority.cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),zb=classVarianceAuthority.cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),yl=classVarianceAuthority.cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function RM({card:e,columnId:t,variant:r,renderCard:a,onCardClick:n}){let{attributes:o,listeners:s,setNodeRef:l,transform:c,transition:d,isDragging:m}=sortable.useSortable({id:e.id,data:{columnId:t}}),u={transform:utilities.CSS.Transform.toString(c),transition:d};return jsxRuntime.jsx("div",{ref:l,style:u,className:i(yl({variant:r,isDragging:m})),onClick:()=>n?.(e,t),...o,...s,children:a?a(e,t):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function wM({column:e,variant:t,renderCard:r,onCardClick:a,onAddCard:n,showAddCard:o,columnHeight:s}){return jsxRuntime.jsxs("div",{className:i(zb({variant:t})),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsxRuntime.jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),o&&jsxRuntime.jsx(X,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(ke,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(l=>l.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(l=>jsxRuntime.jsx(RM,{card:l,columnId:e.id,variant:t,renderCard:r,onCardClick:a},l.id))}),e.cards.length===0&&jsxRuntime.jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Bb=K__namespace.forwardRef(({className:e,variant:t,columns:r,onCardMove:a,onCardClick:n,onAddCard:o,renderCard:s,showAddCard:l=true,columnHeight:c=500,...d},m)=>{let[u,f]=K__namespace.useState(null),[p,b]=K__namespace.useState(null),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),g=h=>r.find(C=>C.cards.some(y=>y.id===h));return jsxRuntime.jsxs(core.DndContext,{sensors:x,collisionDetection:core.closestCorners,onDragStart:h=>{let{active:C}=h,y=g(C.id);if(y){let T=y.cards.find(M=>M.id===C.id);T&&(f(T),b(y.id));}},onDragOver:h=>{let{active:C,over:y}=h;if(!y)return;let T=C.id,M=y.id,k=g(T),N=g(M)||r.find(E=>E.id===M);if(!k||!N||k.id===N.id)return;let P=N.cards.findIndex(E=>E.id===M),L=P===-1?N.cards.length:P;a?.(T,k.id,N.id,L);},onDragEnd:h=>{let{active:C,over:y}=h;if(y&&C.id!==y.id){let T=g(C.id),M=g(y.id)||r.find(k=>k.id===y.id);if(T&&M){let k=M.cards.findIndex(P=>P.id===y.id),N=k===-1?M.cards.length:k;a?.(C.id,T.id,M.id,N);}}f(null),b(null);},children:[jsxRuntime.jsx("div",{ref:m,className:i(Ab({variant:t,className:e})),...d,children:r.map(h=>jsxRuntime.jsx(wM,{column:h,variant:t,renderCard:s,onCardClick:n,onAddCard:o,showAddCard:l,columnHeight:c},h.id))}),jsxRuntime.jsx(core.DragOverlay,{children:u&&p&&jsxRuntime.jsx("div",{className:i(yl({variant:t,isDragging:true})),children:s?s(u,p):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:u.title}),u.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:u.description})]})]})})})]})});Bb.displayName="KanbanBoard";var Ob=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Fb=K__namespace.createContext(null);function Rl(){let e=K__namespace.useContext(Fb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Gb=K__namespace.forwardRef(({className:e,variant:t,children:r,opts:a,plugins:n,orientation:o="horizontal",showArrows:s=true,showDots:l=true,setApi:c,...d},m)=>{let[u,f]=CM__default.default({...a,axis:o==="horizontal"?"x":"y"},n),[p,b]=K__namespace.useState(false),[x,g]=K__namespace.useState(false),[v,w]=K__namespace.useState(0),[R,h]=K__namespace.useState([]),C=K__namespace.useCallback(N=>{N&&(w(N.selectedScrollSnap()),b(N.canScrollPrev()),g(N.canScrollNext()));},[]),y=K__namespace.useCallback(()=>{f?.scrollPrev();},[f]),T=K__namespace.useCallback(()=>{f?.scrollNext();},[f]),M=K__namespace.useCallback(N=>{f?.scrollTo(N);},[f]),k=K__namespace.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),y()):N.key==="ArrowRight"&&(N.preventDefault(),T());},[y,T]);return K__namespace.useEffect(()=>{!f||!c||c(f);},[f,c]),K__namespace.useEffect(()=>{if(f)return h(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(Fb.Provider,{value:{carouselRef:u,api:f,scrollPrev:y,scrollNext:T,canScrollPrev:p,canScrollNext:x,selectedIndex:v,scrollSnaps:R,scrollTo:M},children:jsxRuntime.jsxs("div",{ref:m,className:i(Ob({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...d,children:[jsxRuntime.jsx("div",{ref:u,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:i("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(Cl,{})]}),l&&R.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:R.map((N,P)=>jsxRuntime.jsx("button",{className:i("w-2 h-2 rounded-full transition-all",P===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});Gb.displayName="Carousel";var Kb=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex",e),...t}));Kb.displayName="CarouselContent";var $b=K__namespace.forwardRef(({className:e,basis:t="basis-full",...r},a)=>jsxRuntime.jsx("div",{ref:a,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 pl-4",t,e),...r}));$b.displayName="CarouselItem";var wl=K__namespace.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollPrev:o,canScrollPrev:s}=Rl();return jsxRuntime.jsxs(X,{ref:n,variant:t,size:r,className:i("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:o,...a,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});wl.displayName="CarouselPrevious";var Cl=K__namespace.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollNext:o,canScrollNext:s}=Rl();return jsxRuntime.jsxs(X,{ref:n,variant:t,size:r,className:i("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:o,...a,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Cl.displayName="CarouselNext";var _b=classVarianceAuthority.cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),xs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Ml={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Wb=K__namespace.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:a=[],defaultCategory:n="smileys",showSearch:o=true,showCategories:s=true,...l},c)=>{let[d,m]=K__namespace.useState(a.length>0?"recent":n),[u,f]=K__namespace.useState(""),b=u?Object.values(Ml).flat().filter(g=>g.toLowerCase().includes(u.toLowerCase())):d==="recent"?a:Ml[d]||[],x=g=>{r?.(g);};return jsxRuntime.jsxs("div",{ref:c,className:i(_b({size:t,className:e})),...l,children:[o&&jsxRuntime.jsx("div",{className:"p-2 border-b",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(po,{placeholder:"Search emojis...",value:u,onChange:g=>f(g.target.value),className:"pl-8 h-8"})]})}),s&&!u&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries(xs).map(([g,{icon:v}])=>g==="recent"&&a.length===0?null:jsxRuntime.jsx("button",{className:i("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",d===g&&"bg-accent"),onClick:()=>m(g),title:xs[g].name,children:v},g))}),!u&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:xs[d].name}),jsxRuntime.jsx(ke,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[b.map((g,v)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>x(g),children:g},`${g}-${v}`)),b.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Wb.displayName="EmojiPicker";var jb=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),tT=classVarianceAuthority.cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),rT=classVarianceAuthority.cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Oe=({icon:e,title:t,isActive:r,onClick:a,disabled:n})=>jsxRuntime.jsxs(Sr,{children:[jsxRuntime.jsx(Hr,{asChild:true,children:jsxRuntime.jsx(X,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:a,disabled:n,children:e})}),jsxRuntime.jsx(Vr,{side:"top",className:"text-xs",children:t})]}),Yb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a="",onChange:n,placeholder:o="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:c,maxHeight:d,onEditorReady:m,...u},f)=>{let p=react.useEditor({extensions:[SM__default.default.configure({heading:{levels:[1,2,3]}}),HM__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),VM__default.default,IM__default.default.configure({types:["heading","paragraph"]}),AM__default.default.configure({placeholder:o})],content:a,editable:!s,onUpdate:({editor:x})=>{n?.(x.getHTML());},onCreate:({editor:x})=>{m?.(x);}});K__namespace.useEffect(()=>{p&&a!==p.getHTML()&&p.commands.setContent(a);},[a,p]),K__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let b=()=>{if(!p)return;let x=p.getAttributes("link").href,g=window.prompt("URL",x);if(g!==null){if(g===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:g}).run();}};return p?jsxRuntime.jsx(Dr,{children:jsxRuntime.jsxs("div",{ref:f,className:i(jb({variant:t,size:r,className:e})),...u,children:[l&&!s&&jsxRuntime.jsxs("div",{className:i(tT({size:r})),children:[jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:b}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsxRuntime.jsx(react.EditorContent,{editor:p,className:i(rT({size:r})),style:{minHeight:c,maxHeight:d}})]})}):null});Yb.displayName="RichTextEditor";var Xb=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function dT(e,t,r){return aT.centerCrop(aT.makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function Ub(e,t,r=0,a=1){let n=document.createElement("canvas"),o=n.getContext("2d");if(!o)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,c=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*c),n.height=Math.floor(t.height*l*c),o.scale(c,c),o.imageSmoothingQuality="high";let d=t.x*s,m=t.y*l,u=r*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return o.save(),o.translate(-d,-m),o.translate(f,p),o.rotate(u),o.scale(a,a),o.translate(-f,-p),o.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),o.restore(),new Promise(b=>{n.toBlob(x=>{b(x);},"image/png");})}var qb=K__namespace.forwardRef(({className:e,variant:t,src:r,aspectRatio:a,onCropChange:n,onCropComplete:o,showZoom:s=true,showRotation:l=true,minZoom:c=1,maxZoom:d=3,circularCrop:m=false,initialCrop:u,...f},p)=>{let b=K__namespace.useRef(null),[x,g]=K__namespace.useState(),[v,w]=K__namespace.useState(),[R,h]=K__namespace.useState(1),[C,y]=K__namespace.useState(0),T=P=>{let{width:L,height:E}=P.currentTarget;if(a){let H=dT(L,E,a);g(H);}else g(u||{unit:"%",x:10,y:10,width:80,height:80});},M=P=>{g(P),n?.(P);},k=async P=>{if(w(P),o&&b.current&&P.width&&P.height){let L=await Ub(b.current,P,C,R);o(L);}},N=()=>{y(P=>(P+90)%360);};return K__namespace.useEffect(()=>{v&&b.current&&o&&Ub(b.current,v,C,R).then(P=>{o(P);});},[R,C,v,o]),jsxRuntime.jsxs("div",{ref:p,className:i(Xb({variant:t,className:e})),...f,children:[jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsxRuntime.jsx(aT__default.default,{crop:x,onChange:M,onComplete:k,aspect:a,circularCrop:m,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:b,src:r,alt:"Crop preview",onLoad:T,style:{transform:`scale(${R}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Do,{value:[R],onValueChange:([P])=>h(P),min:c,max:d,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsxRuntime.jsx(X,{variant:"bordered",size:"icon",onClick:N,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});qb.displayName="ImageCropper";var Ll=classVarianceAuthority.cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),pT={sm:96,md:128,lg:192},Jb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a,qrSize:n,fgColor:o="currentColor",bgColor:s="transparent",level:l="M",includeMargin:c=false,title:d,logo:m,logoSize:u=40,logoPadding:f=4,logoBackgroundColor:p="white",...b},x)=>{let g=n??pT[r??"md"];return a?jsxRuntime.jsx("div",{ref:x,className:i(Ll({variant:t,size:r,className:e})),...b,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(uT__default.default,{value:a,size:g,fgColor:o,bgColor:s,level:l,title:d,style:{padding:c?16:0}}),m&&jsxRuntime.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsxRuntime.jsx("img",{src:m,alt:"Logo",style:{width:u,height:u,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:x,className:i(Ll({variant:t,size:r,className:e})),...b,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:g,height:g},children:"No data"})})});Jb.displayName="QRCode";var Qb=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:a=true,disableTransitionOnChange:n=false,attribute:o="class",forcedTheme:s,themes:l=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:a,disableTransitionOnChange:n,attribute:o,forcedTheme:s,themes:l,children:e});Qb.displayName="ThemeProvider";var yT=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),ev=K__namespace.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:a="dropdown"},n)=>{let{theme:o,setTheme:s,resolvedTheme:l}=nextThemes.useTheme(),[c,d]=K__namespace.useState(false);K__namespace.useEffect(()=>{d(true);},[]);let m=()=>{let u=["light","dark","system"],p=(u.indexOf(o||"system")+1)%u.length;s(u[p]);};return c?a==="cycle"?jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),onClick:m,children:[l==="dark"?jsxRuntime.jsx(lucideReact.Moon,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxRuntime.jsxs(zr,{align:"end",children:[jsxRuntime.jsxs(Ot,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(Ot,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(Ot,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),disabled:true,children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})});ev.displayName="ThemeToggle";var tv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),rv=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground 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.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),av=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),nv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,startContent:u,endContent:f,id:p,...b},x)=>{let g=K__namespace.useId(),v=p||g,w=`${v}-description`,R=`${v}-error`,h=o&&a;return jsxRuntime.jsxs("div",{className:i(tv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:v,className:i(av({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[u&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u}),jsxRuntime.jsx("input",{ref:x,id:v,"aria-invalid":o,"aria-describedby":h?R:r?w:void 0,"aria-required":n,className:i(rv({size:s,isInvalid:o}),u&&"pl-10",f&&"pr-10",c),...b}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),r&&!h&&jsxRuntime.jsx("p",{id:w,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),h&&jsxRuntime.jsx("p",{id:R,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});nv.displayName="TextField";var iv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),CT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),ov=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),sv=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),NT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),lv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,min:u,max:f,step:p=1,value:b,defaultValue:x,onChange:g,showButtons:v=true,formatOptions:w,fullWidth:R=false,disabled:h,id:C,...y},T)=>{let M=K__namespace.useId(),k=C||M,N=`${k}-description`,P=`${k}-error`,[L,E]=K__namespace.useState(x),[H,S]=K__namespace.useState(false),D=b!==void 0?b:L,I=o&&a,z=K__namespace.useCallback($=>{$!==void 0&&(u!==void 0&&$<u&&($=u),f!==void 0&&$>f&&($=f)),b===void 0&&E($),g?.($);},[b,u,f,g]),G=()=>{let $=(D??0)+p;z($);},V=()=>{let $=(D??0)-p;z($);},B=$=>{let ae=$.target.value;if(ae==="")z(void 0);else {let O=parseFloat(ae);isNaN(O)||z(O);}},A=$=>{$.key==="ArrowUp"?($.preventDefault(),G()):$.key==="ArrowDown"&&($.preventDefault(),V());},W=K__namespace.useMemo(()=>D===void 0?"":w?new Intl.NumberFormat(void 0,w).format(D):D.toString(),[D,w]),q=u!==void 0&&D!==void 0&&D<=u,F=f!==void 0&&D!==void 0&&D>=f;return jsxRuntime.jsxs("div",{className:i(iv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:k,className:i(NT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[v&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:h||q,className:i(ov({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:i(sv({size:s}))})}),jsxRuntime.jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:W,onChange:B,onKeyDown:A,onFocus:()=>S(true),onBlur:()=>S(false),"aria-invalid":o,"aria-describedby":I?P:r?N:void 0,"aria-required":n,"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":D,disabled:h,className:i(CT({size:s,isInvalid:o,fullWidth:R}),!v&&"px-3",c),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsxRuntime.jsx("button",{type:"button",onClick:G,disabled:h||F,className:i(ov({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:i(sv({size:s}))})})]}),r&&!I&&jsxRuntime.jsx("p",{id:N,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),I&&jsxRuntime.jsx("p",{id:P,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});lv.displayName="NumberField";var dv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PT=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background 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 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),cv=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),kT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),LT=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),uv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f="",onChange:p,onClear:b,onSearch:x,showClearButton:g=true,showSearchIcon:v=true,disabled:w,placeholder:R="Search...",id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,[P,L]=K__namespace.useState(f),E=u!==void 0?u:P,H=o&&a,S=E.length>0,D=G=>{let V=G.target.value;u===void 0&&L(V),p?.(V);},I=()=>{u===void 0&&L(""),p?.(""),b?.();},z=G=>{G.key==="Enter"?(G.preventDefault(),x?.(E)):G.key==="Escape"&&S&&(G.preventDefault(),I());};return jsxRuntime.jsxs("div",{className:i(dv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(kT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[v&&jsxRuntime.jsx(lucideReact.Search,{className:i(cv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:y,id:M,type:"search",value:E,onChange:D,onKeyDown:z,placeholder:R,"aria-invalid":o,"aria-describedby":H?N:r?k:void 0,"aria-required":n,disabled:w,className:i(PT({size:s,isInvalid:o}),!v&&"pl-3",!g&&"pr-3",c),...C}),g&&S&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:I,className:i(LT({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:i(cv({size:s}))})})]}),r&&!H&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),H&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});uv.displayName="SearchField";var mv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),DT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),ST=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),HT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Il=(e,t="yyyy-MM-dd")=>{if(!e)return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",a).replace("dd",n)},VT=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},pv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f,onChange:p,minDate:b,maxDate:x,dateFormat:g="yyyy-MM-dd",showIcon:v=true,fullWidth:w=false,disabled:R,id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,P=K__namespace.useRef(null),L=y||P,[E,H]=K__namespace.useState(f??null),[S,D]=K__namespace.useState(false),I=()=>{!R&&L.current&&L.current.showPicker?.();},z=u!==void 0?u:E,G=o&&a,V=q=>{let F=VT(q.target.value);u===void 0&&H(F),p?.(F);},B=z?Il(z,"yyyy-MM-dd"):"",A=b?Il(b,"yyyy-MM-dd"):void 0,W=x?Il(x,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:i(mv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(HT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:i("relative",w?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:L,id:M,type:"date",value:B,onChange:V,onFocus:()=>D(true),onBlur:()=>D(false),min:A,max:W,"aria-invalid":o,"aria-describedby":G?N:r?k:void 0,"aria-required":n,disabled:R,className:i(DT({size:s,isInvalid:o,fullWidth:w}),!v&&"pr-3",c),style:{borderColor:S?"var(--color-foreground)":void 0},...C}),v&&jsxRuntime.jsx("button",{type:"button",onClick:I,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:i(ST({size:s}))})})]}),r&&!G&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),G&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});pv.displayName="DateField";var fv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),IT=classVarianceAuthority.cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),AT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),gv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f,onChange:p,minTime:b,maxTime:x,showSeconds:g=false,hourCycle:v=24,disabled:w,fullWidth:R=false,id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,P=K__namespace.useRef(null),L=K__namespace.useRef(null),E=K__namespace.useRef(null),H=K__namespace.useRef(null),[S,D]=K__namespace.useState(f??null),I=u!==void 0?u:S,z=o&&a,G=_=>v===24?_:_===0?12:_>12?_-12:_,V=_=>_>=12?"PM":"AM",B=(_,re)=>re==="AM"?_===12?0:_:_===12?12:_+12,[A,W]=K__namespace.useState(I?String(G(I.hour)).padStart(2,"0"):""),[q,F]=K__namespace.useState(I?String(I.minute).padStart(2,"0"):""),[$,ae]=K__namespace.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[O,ee]=K__namespace.useState(I?V(I.hour):"AM"),[Q,st]=K__namespace.useState(false);K__namespace.useEffect(()=>{u!==void 0&&(u?(W(String(G(u.hour)).padStart(2,"0")),F(String(u.minute).padStart(2,"0")),u.second!==void 0&&ae(String(u.second).padStart(2,"0")),ee(V(u.hour))):(W(""),F(""),ae("")));},[u,v]);let Ye=(_,re,Ge,tr)=>{let ye=parseInt(_,10),Tt=parseInt(re,10),rr=g?parseInt(Ge,10):void 0;if(isNaN(ye)||isNaN(Tt)||g&&isNaN(rr)){u===void 0&&D(null),p?.(null);return}let uc={hour:v===12?B(ye,tr):ye,minute:Tt,...g&&rr!==void 0&&{second:rr}};u===void 0&&D(uc),p?.(uc);},cc=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);W(re);let Ge=v===24?23:12,tr=v===24?0:1;if(re.length===2){let ye=parseInt(re,10);ye>=tr&&ye<=Ge&&(L.current?.focus(),L.current?.select());}},oe=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);if(F(re),re.length===2){let Ge=parseInt(re,10);Ge>=0&&Ge<=59&&(g?(E.current?.focus(),E.current?.select()):v===12&&H.current?.focus());}},Mt=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);ae(re),re.length===2&&v===12&&H.current?.focus();},oo=()=>{if(A){let _=parseInt(A,10),re=v===24?23:12,tr=Math.min(Math.max(_,v===24?0:1),re),ye=String(tr).padStart(2,"0");W(ye),Ye(ye,q,$,O);}},oa=()=>{if(q){let _=parseInt(q,10),re=Math.min(Math.max(_,0),59),Ge=String(re).padStart(2,"0");F(Ge),Ye(A,Ge,$,O);}},my=()=>{if($){let _=parseInt($,10),re=Math.min(Math.max(_,0),59),Ge=String(re).padStart(2,"0");ae(Ge),Ye(A,q,Ge,O);}},dc=()=>{let _=O==="AM"?"PM":"AM";ee(_),Ye(A,q,$,_);},py=_=>{let re=_.key.toLowerCase();re==="a"?(_.preventDefault(),O!=="AM"&&(ee("AM"),Ye(A,q,$,"AM"))):re==="p"?(_.preventDefault(),O!=="PM"&&(ee("PM"),Ye(A,q,$,"PM"))):re==="arrowup"||re==="arrowdown"?(_.preventDefault(),dc()):re==="arrowleft"&&(_.preventDefault(),g?(E.current?.focus(),E.current?.select()):(L.current?.focus(),L.current?.select()));},Zs=(_,re)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let Ge=_.key==="ArrowUp"?1:-1;if(re==="hour"){let tr=parseInt(A,10)||0,ye=v===24?23:12,Tt=v===24?0:1,rr=tr+Ge;rr>ye&&(rr=Tt),rr<Tt&&(rr=ye);let Qs=String(rr).padStart(2,"0");W(Qs),Ye(Qs,q,$,O);}else if(re==="minute"){let ye=(parseInt(q,10)||0)+Ge;ye>59&&(ye=0),ye<0&&(ye=59);let Tt=String(ye).padStart(2,"0");F(Tt),Ye(A,Tt,$,O);}else if(re==="second"){let ye=(parseInt($,10)||0)+Ge;ye>59&&(ye=0),ye<0&&(ye=59);let Tt=String(ye).padStart(2,"0");ae(Tt),Ye(A,q,Tt,O);}}_.key==="ArrowRight"&&(_.preventDefault(),re==="hour"?(L.current?.focus(),L.current?.select()):re==="minute"&&g?(E.current?.focus(),E.current?.select()):(re==="minute"&&!g&&v===12||re==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),re==="minute"?(P.current?.focus(),P.current?.select()):re==="second"&&(L.current?.focus(),L.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(re==="minute"?P.current?.focus():re==="second"&&L.current?.focus());},Js=i((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:y,className:i(fv({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(AT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:i(IT({size:s,isInvalid:o,disabled:w,fullWidth:R}),c),style:{borderColor:Q?"var(--color-foreground)":void 0},onFocus:()=>st(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||st(false);},children:[jsxRuntime.jsx("input",{ref:P,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:A,onChange:cc,onBlur:oo,onKeyDown:_=>Zs(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":o,"aria-describedby":z?N:r?k:void 0,"aria-required":n,disabled:w,className:Js}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"mm",value:q,onChange:oe,onBlur:oa,onKeyDown:_=>Zs(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:w,className:Js}),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"ss",value:$,onChange:Mt,onBlur:my,onKeyDown:_=>Zs(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:w,className:Js})]}),v===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:dc,onKeyDown:py,disabled:w,className:i("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:O})]}),r&&!z&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),z&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});gv.displayName="TimeField";var vv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),BT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),OT=classVarianceAuthority.cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),FT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),bv=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),GT=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),hv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f="#000000",onChange:p,showSwatch:b=true,showPicker:x=true,allowAlpha:g=false,fullWidth:v=false,disabled:w,id:R,...h},C)=>{let y=K__namespace.useId(),T=R||y,M=`${T}-picker`,k=`${T}-description`,N=`${T}-error`,[P,L]=K__namespace.useState(f),[E,H]=K__namespace.useState(false),S=u!==void 0?u:P,D=o&&a,I=B=>{let A=B.target.value;A&&!A.startsWith("#")&&(A="#"+A),u===void 0&&L(A),p?.(A);},z=B=>{let A=B.target.value.toUpperCase();u===void 0&&L(A),p?.(A);},G=()=>{if(S&&bv(S)){let B=GT(S);B!==S&&(u===void 0&&L(B),p?.(B));}},V=bv(S)?S:"#000000";return jsxRuntime.jsxs("div",{className:i(vv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:i(FT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("div",{className:i(OT({size:s})),children:x?jsxRuntime.jsxs("label",{htmlFor:M,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:M,type:"color",value:V,onChange:z,disabled:w,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})}),jsxRuntime.jsx("input",{ref:C,id:T,type:"text",value:S,onChange:I,onFocus:()=>H(true),onBlur:()=>{H(false),G();},placeholder:"#000000",maxLength:g?9:7,"aria-invalid":o,"aria-describedby":D?N:r?k:void 0,"aria-required":n,disabled:w,className:i(BT({size:s,isInvalid:o,fullWidth:v}),!b&&"pl-3",c),style:{borderColor:E?"var(--color-foreground)":void 0},...h})]}),r&&!D&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),D&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});hv.displayName="ColorField";var yv=classVarianceAuthority.cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Rv=K__namespace.createContext({});function $T(){return K__namespace.useContext(Rv)}var wv=K__namespace.forwardRef(({className:e,variant:t,orientation:r,spacing:a,disabled:n,children:o,...s},l)=>jsxRuntime.jsx(Rv.Provider,{value:{disabled:n},children:jsxRuntime.jsx("div",{ref:l,role:"group",className:i(yv({variant:t,orientation:r,spacing:a,className:e})),...s,children:o})}));wv.displayName="ButtonGroup";var Nv=classVarianceAuthority.cva("inline-flex items-center justify-center 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),Mv=K__namespace.forwardRef(({className:e,variant:t,size:r,radius:a,isLoading:n,disabled:o,children:s,...l},c)=>{let d={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[r??"md"];return jsxRuntime.jsx("button",{ref:c,type:"button",disabled:o||n,className:i(Nv({variant:t,size:r,radius:a,className:e})),...l,children:n?jsxRuntime.jsxs("svg",{className:i("animate-spin",d),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}):jsxRuntime.jsx("span",{className:i("[&>svg]:h-full [&>svg]:w-full",d),children:s})})});Mv.displayName="IconButton";var Pv=classVarianceAuthority.cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),kv=K__namespace.forwardRef(({className:e,variant:t,orientation:r,size:a,density:n,items:o,maxVisibleItems:s,isDisabled:l,onAction:c,showLabels:d=false,renderItem:m,...u},f)=>{let p=s&&s<o.length?o.slice(0,s):o,b=s&&s<o.length?o.slice(s):[],x={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[a??"md"],g={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[a??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[a??"md"],w=(h,C)=>{C&&C(),c&&c(h);},R=h=>jsxRuntime.jsxs("button",{type:"button",disabled:l||h.isDisabled,onClick:()=>w(h.key,h.onPress),className:i("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",d?x:g),"aria-label":h.label,children:[h.icon&&jsxRuntime.jsx("span",{className:v,children:h.icon}),d&&jsxRuntime.jsx("span",{children:h.label})]},h.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:i(Pv({variant:t,orientation:r,size:a,density:n,className:e})),...u,children:[p.map(h=>m?m(h):R(h)),b.length>0&&jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",disabled:l,className:i("inline-flex items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",g),"aria-label":"More actions",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:v})})}),jsxRuntime.jsx(zr,{align:"end",children:b.map(h=>jsxRuntime.jsxs(Ot,{disabled:h.isDisabled,onClick:()=>w(h.key,h.onPress),children:[h.icon&&jsxRuntime.jsx("span",{className:i(v,"mr-2"),children:h.icon}),h.label]},h.key))})]})]})});kv.displayName="ActionGroup";var Sv=classVarianceAuthority.cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),UT=classVarianceAuthority.cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Hv=K__namespace.forwardRef(({className:e,variant:t,size:r,pulse:a=false,hideLabel:n=false,children:o,...s},l)=>jsxRuntime.jsxs("span",{ref:l,role:"status",className:i(Sv({variant:t,size:r,className:e})),...s,children:[jsxRuntime.jsx("span",{className:i(UT({size:r,pulse:a})),"aria-hidden":"true"}),!n&&o&&jsxRuntime.jsx("span",{className:"text-foreground",children:o})]}));Hv.displayName="StatusLight";var Iv=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),qT=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),ZT=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),JT=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Av=K__namespace.forwardRef(({className:e,size:t,illustration:r,heading:a,description:n,children:o,...s},l)=>jsxRuntime.jsxs("div",{ref:l,className:i(Iv({size:t,className:e})),...s,children:[r&&jsxRuntime.jsx("div",{className:i(qT({size:t})),"aria-hidden":"true",children:r}),a&&jsxRuntime.jsx("h3",{className:i(ZT({size:t})),children:a}),n&&jsxRuntime.jsx("p",{className:i(JT({size:t})),children:n}),o&&jsxRuntime.jsx("div",{className:"mt-2",children:o})]}));Av.displayName="IllustratedMessage";var Ov=classVarianceAuthority.cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),oP={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},Fv=K__namespace.forwardRef(({className:e,variant:t,title:r,icon:a,hideIcon:n=false,isDismissible:o=false,onDismiss:s,actions:l,children:c,...d},m)=>{let[u,f]=K__namespace.useState(true);if(!u)return null;let p=oP[t??"info"],b=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:m,role:"alert",className:i(Ov({variant:t,className:e})),...d,children:[!n&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsxRuntime.jsx("div",{className:"font-medium",children:r}),c&&jsxRuntime.jsx("div",{className:"opacity-90",children:c}),l&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:l})]}),o&&jsxRuntime.jsx("button",{type:"button",onClick:b,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Fv.displayName="InlineAlert";var Gv=classVarianceAuthority.cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Kv=K__namespace.forwardRef(({className:e,position:t,size:r,selectedCount:a=0,isOpen:n=true,onClose:o,showClose:s=true,selectedText:l,children:c,...d},m)=>{if(!n||a===0)return null;let u=()=>typeof l=="function"?l(a):l||`${a} item${a>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:m,role:"toolbar","aria-label":"Actions for selected items",className:i(Gv({position:t,size:r,className:e})),...d,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:u()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:c}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]})});Kv.displayName="ActionBar";var $v=K__namespace.forwardRef(({className:e,icon:t,children:r,...a},n)=>jsxRuntime.jsxs("button",{ref:n,type:"button",className:i("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...a,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));$v.displayName="ActionBarButton";var _v=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function mP(e){return "items"in e}var Wv=K__namespace.forwardRef(({items:e,align:t="end",side:r="bottom",iconOrientation:a="vertical",trigger:n,variant:o,size:s,onAction:l,"aria-label":c="More actions",triggerClassName:d,disabled:m},u)=>{let f={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=a==="horizontal"?lucideReact.MoreHorizontal:lucideReact.MoreVertical,b=g=>{g.onSelect?.(),l?.(g.key);},x=g=>jsxRuntime.jsxs(Ot,{disabled:g.isDisabled,onClick:()=>b(g),className:i(g.isDestructive&&"text-destructive focus:text-destructive"),children:[g.icon&&jsxRuntime.jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsx("span",{className:"flex-1",children:g.label}),g.shortcut&&jsxRuntime.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:g.shortcut})]},g.key);return jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:n||jsxRuntime.jsx("button",{ref:u,type:"button",disabled:m,className:i(_v({variant:o,size:s}),d),"aria-label":c,children:jsxRuntime.jsx(p,{className:f})})}),jsxRuntime.jsx(zr,{align:t,side:r,children:e.map((g,v)=>mP(g)?jsxRuntime.jsxs(K__namespace.Fragment,{children:[v>0&&jsxRuntime.jsx(Ro,{}),g.items.map(x)]},g.key):x(g))})]})});Wv.displayName="ActionMenu";var Uv=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Xv=classVarianceAuthority.cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function qv({className:e,variant:t,size:r,items:a,selectedKeys:n,selectionMode:o="none",onSelectionChange:s,allowsDragging:l=false,onReorder:c,showCheckbox:d=false,renderItem:m,emptyContent:u,...f}){let[p,b]=K__namespace.useState(new Set),[x,g]=K__namespace.useState(null),[v,w]=K__namespace.useState(null),R=K__namespace.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),h=M=>{if(o==="none")return;let k;o==="single"?k=R.has(M)?new Set:new Set([M]):(k=new Set(R),k.has(M)?k.delete(M):k.add(M)),n||b(k),s?.(k);},C=(M,k)=>{g(k),M.dataTransfer.effectAllowed="move";},y=(M,k)=>{M.preventDefault(),x!==k&&w(k);},T=()=>{if(x&&v&&x!==v){let M=a.findIndex(L=>L.key===x),k=a.findIndex(L=>L.key===v),N=[...a],[P]=N.splice(M,1);N.splice(k,0,P),c?.(N);}g(null),w(null);};return a.length===0?jsxRuntime.jsx("div",{className:i("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":o==="multiple",className:i(Uv({variant:t,size:r,className:e})),...f,children:a.map(M=>{let k=R.has(M.key),N=x===M.key,P=v===M.key;return m?jsxRuntime.jsx("div",{role:"option","aria-selected":k,onClick:()=>h(M.key),children:m(M,k)},M.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:l&&!M.isDisabled,onDragStart:L=>C(L,M.key),onDragOver:L=>y(L,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&h(M.key),className:i(Xv({variant:t,size:r,isSelected:k,isDisabled:M.isDisabled}),N&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[l&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),d&&o!=="none"&&jsxRuntime.jsx("div",{className:i("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:M.label}),M.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}qv.displayName="ListView";var Zv=classVarianceAuthority.cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),gP=classVarianceAuthority.cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),bP=classVarianceAuthority.cva("block 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 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Jv=K__namespace.forwardRef(({className:e,orientation:t="horizontal",size:r="md",value:a,defaultValue:n=[25,75],onValueChange:o,onValueCommit:s,min:l=0,max:c=100,step:d=1,disabled:m=false,showLabels:u=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:b,...x},g)=>{let[v,w]=K__namespace.useState(n),R=a!==void 0,h=R?a:v,C=K__namespace.useRef(null),[y,T]=K__namespace.useState(false),[M,k]=K__namespace.useState(null),N=(V,B)=>{if(!C.current)return h[0];let A=C.current.getBoundingClientRect(),W;t==="horizontal"?W=(V-A.left)/A.width:W=1-(B-A.top)/A.height,W=Math.max(0,Math.min(1,W));let q=l+W*(c-l),F=Math.round(q/d)*d;return Math.max(l,Math.min(c,F))},P=(V,B)=>{let A=[...h];A[B]=V,B===0&&V>h[1]&&(A[0]=h[1]),B===1&&V<h[0]&&(A[1]=h[0]),R||w(A),o?.(A);},L=(V,B)=>{m||(V.preventDefault(),T(true),k(B),V.target.setPointerCapture(V.pointerId));},E=V=>{if(!y||M===null||m)return;let B=N(V.clientX,V.clientY);P(B,M);},H=()=>{y&&(T(false),k(null),s?.(h));},S=V=>{if(m)return;let B=N(V.clientX,V.clientY),A=Math.abs(h[0]-B),W=Math.abs(h[1]-B),q=A<=W?0:1;P(B,q);let F=[...h];F[q]=B,s?.(F);},D=(V,B)=>{if(m)return;let A=h[B];switch(V.key){case "ArrowRight":case "ArrowUp":V.preventDefault(),A=Math.min(c,h[B]+d);break;case "ArrowLeft":case "ArrowDown":V.preventDefault(),A=Math.max(l,h[B]-d);break;case "Home":V.preventDefault(),A=l;break;case "End":V.preventDefault(),A=c;break;default:return}P(A,B);let W=[...h];W[B]=A,s?.(W);},I=V=>(V-l)/(c-l)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],G={sm:14,md:20,lg:24}[r||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[u&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(h[0])}),jsxRuntime.jsx("span",{children:f(h[1])})]}),jsxRuntime.jsxs("div",{ref:g,className:i(Zv({orientation:t,size:r}),m&&"opacity-50 pointer-events-none",e),...x,children:[jsxRuntime.jsx("div",{ref:C,className:i(gP({orientation:t,size:r})),onClick:S,children:jsxRuntime.jsx("div",{className:i("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(h[0])}%`,right:`${100-I(h[1])}%`,top:0,bottom:0}:{bottom:`${I(h[0])}%`,top:`${100-I(h[1])}%`,left:0,right:0}})}),h.map((V,B)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:m?-1:0,"aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":V,"aria-orientation":t||void 0,"aria-disabled":m,className:i(bP({size:r}),y&&M===B&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(V)}% - ${G/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(V)}% - ${G/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:A=>L(A,B),onPointerMove:E,onPointerUp:H,onPointerCancel:H,onKeyDown:A=>D(A,B)},B)),b&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${b}[0]`,value:h[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${b}[1]`,value:h[1]})]})]})]})});Jv.displayName="RangeSlider";var $l=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),RP=classVarianceAuthority.cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),wP={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},th=K__namespace.forwardRef(({variant:e="help",size:t,title:r,children:a,trigger:n,side:o="top",align:s="center",open:l,onOpenChange:c,learnMoreUrl:d,learnMoreText:m="Learn more",triggerClassName:u,contentClassName:f},p)=>{let[b,x]=K__namespace.useState(false),[g,v]=K__namespace.useState(false),[w,R]=K__namespace.useState({top:0,left:0}),h=K__namespace.useRef(null),C=K__namespace.useRef(null),y=l!==void 0?l:b,T=K__namespace.useCallback(P=>{l===void 0&&x(P),c?.(P);},[l,c]);K__namespace.useEffect(()=>{v(true);},[]),K__namespace.useEffect(()=>{if(!y||!h.current)return;let P=()=>{let L=h.current.getBoundingClientRect(),E=288,H=8,S=0,D=0;switch(o){case "top":S=L.top-H,D=L.left+L.width/2;break;case "bottom":S=L.bottom+H,D=L.left+L.width/2;break;case "left":S=L.top+L.height/2,D=L.left-H;break;case "right":S=L.top+L.height/2,D=L.right+H;break}if(o==="top"||o==="bottom")switch(s){case "start":D=L.left;break;case "center":D=L.left+L.width/2-E/2;break;case "end":D=L.right-E;break}D=Math.max(8,Math.min(D,window.innerWidth-E-8)),R({top:S,left:D});};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[y,o,s]),K__namespace.useEffect(()=>{if(!y)return;let P=L=>{C.current&&!C.current.contains(L.target)&&h.current&&!h.current.contains(L.target)&&T(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[y,T]),K__namespace.useEffect(()=>{if(!y)return;let P=L=>{L.key==="Escape"&&T(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,T]);let M=wP[e??"help"],k=()=>{T(!y);},N=()=>{switch(o){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n?K__namespace.isValidElement(n)?K__namespace.cloneElement(n,{ref:h,onClick:P=>{n.props.onClick?.(P),k();}}):jsxRuntime.jsx("button",{ref:h,type:"button",onClick:k,className:i($l({variant:e,size:t}),u),"aria-label":"Help",children:n}):jsxRuntime.jsx("button",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:k,className:i($l({variant:e,size:t}),u),"aria-label":"Help",children:jsxRuntime.jsx(M,{className:"h-full w-full"})}),g&&y&&Po__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:i(RP({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:N()},role:"tooltip",children:[r&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:a}),d&&jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[m," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...o==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...o==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...o==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...o==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});th.displayName="ContextualHelp";var ah=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),_l=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function nh({className:e,spacing:t,variant:r,size:a,items:n,selectedKeys:o,selectionMode:s="none",onSelectionChange:l,allowsRemoving:c=false,onRemove:d,label:m,description:u,errorMessage:f,maxTags:p,...b}){let[x,g]=K__namespace.useState(new Set),v=K__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):x,[o,x]),w=y=>{if(s==="none")return;let T;s==="single"?T=v.has(y)?new Set:new Set([y]):(T=new Set(v),T.has(y)?T.delete(y):T.add(y)),o||g(T),l?.(T);},R=(y,T)=>{T.stopPropagation(),d?.(y);},h=p?n.slice(0,p):n,C=p?Math.max(0,n.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:m}),u&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:u}),jsxRuntime.jsxs("div",{role:"group","aria-label":m,className:i(ah({spacing:t}),e),...b,children:[h.map(y=>{let T=v.has(y.key),M=s!=="none";return jsxRuntime.jsxs("span",{role:M?"button":void 0,tabIndex:M&&!y.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!y.isDisabled&&(k.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:i(_l({variant:y.color?void 0:r,size:a,isSelected:T,isDisabled:y.isDisabled}),M&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,c&&!y.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:k=>R(y.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxRuntime.jsxs("span",{className:i(_l({variant:"surface",size:a}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-destructive",children:f})]})}nh.displayName="TagGroup";var ih=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),lh=classVarianceAuthority.cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function ch({className:e,columns:t,gap:r,items:a,selectedKeys:n,selectionMode:o="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:c="default",itemSize:d="md",renderItem:m,emptyContent:u,...f}){let[p,b]=K__namespace.useState(new Set),x=K__namespace.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),g=v=>{if(o==="none")return;let w;o==="single"?w=x.has(v)?new Set:new Set([v]):(w=new Set(x),w.has(v)?w.delete(v):w.add(v)),n||b(w),s?.(w);};return a.length===0?jsxRuntime.jsx("div",{className:i("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":o==="multiple",className:i(ih({columns:t,gap:r,className:e})),...f,children:a.map(v=>{let w=x.has(v.key);return m?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>g(v.key),children:m(v,w)},v.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&g(v.key),className:i(lh({variant:c,size:d,isSelected:w,isDisabled:v.isDisabled})),children:[l&&o!=="none"&&w&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),v.thumbnail&&jsxRuntime.jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsxRuntime.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}ch.displayName="GridList";var uh=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),TP=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),PP=classVarianceAuthority.cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),zs=K__namespace.forwardRef(({className:e,size:t,value:r,min:a=0,max:n=100,optimum:o,low:s,high:l,label:c,showValueLabel:d=false,formatValue:m,color:u="primary",trackVariant:f="default",...p},b)=>{let x=Math.min(100,Math.max(0,(r-a)/(n-a)*100)),g=()=>{if(u!=="auto")return "";let w=(r-a)/(n-a),R=s!==void 0?(s-a)/(n-a):.25,h=l!==void 0?(l-a)/(n-a):.75;return (o!==void 0?(o-a)/(n-a):1)>=.5?w<=R?"bg-red-500":w<=h?"bg-yellow-500":"bg-green-500":w>=h?"bg-red-500":w>=R?"bg-yellow-500":"bg-green-500"},v=m?m(r,x):`${Math.round(x)}%`;return jsxRuntime.jsxs("div",{ref:b,className:i("w-full",e),...p,children:[(c||d)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[c&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),d&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":a,"aria-valuemax":n,"aria-label":c,className:i(uh({size:t})),children:jsxRuntime.jsx("div",{className:i(TP({variant:f})),children:jsxRuntime.jsx("div",{className:i(PP({color:u==="auto"?void 0:u,rounded:x>=100}),u==="auto"&&g()),style:{width:`${x}%`}})})})]})});zs.displayName="Meter";var mh=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(zs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));mh.displayName="DiskUsageMeter";var ph=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(zs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));ph.displayName="BatteryMeter";var fh=classVarianceAuthority.cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Os=(e,t,r)=>{let a=n=>{let o=(n+e/60)%6;return r-r*t*Math.max(Math.min(o,4-o,1),0)};return [Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]},gh=(e,t,r)=>{e/=255,t/=255,r/=255;let a=Math.max(e,t,r),n=Math.min(e,t,r),o=a-n,s=0,l=a===0?0:o/a,c=a;if(o!==0)switch(a){case e:s=((t-r)/o+(t<r?6:0))*60;break;case t:s=((r-e)/o+2)*60;break;case r:s=((e-t)/o+4)*60;break}return [s,l,c]},bh=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},vh=(e,t,r)=>"#"+[e,t,r].map(a=>a.toString(16).padStart(2,"0")).join(""),hh=K__namespace.forwardRef(({hue:e,saturation:t,brightness:r,value:a,defaultValue:n="#ff0000",onChange:o,onColorChange:s,size:l,disabled:c,thumbSize:d=18,className:m,...u},f)=>{let p=K__namespace.useRef(null),[b,x]=K__namespace.useState(false),g=K__namespace.useCallback(V=>{let B=bh(V);return B?gh(...B):[0,1,1]},[]),[v,w]=K__namespace.useState(()=>g(a||n)),R=e??v[0],h=t??v[1],C=r??v[2];K__namespace.useEffect(()=>{if(a){let V=g(a);w(V);}},[a,g]);let y=K__namespace.useCallback((V,B)=>{if(c||!p.current)return;let A=p.current.getBoundingClientRect(),W=Math.max(0,Math.min(1,(V-A.left)/A.width)),q=Math.max(0,Math.min(1,(B-A.top)/A.height)),F=W,$=1-q;t===void 0&&r===void 0&&w([R,F,$]),o?.({hue:R,saturation:F,brightness:$});let ae=Os(R,F,$);s?.(vh(...ae));},[c,R,t,r,o,s]),T=V=>{c||(V.preventDefault(),x(true),V.target.setPointerCapture(V.pointerId),y(V.clientX,V.clientY));},M=V=>{b&&y(V.clientX,V.clientY);},k=V=>{x(false),V.target.releasePointerCapture(V.pointerId);},[N,P,L]=Os(R,1,1),E=`rgb(${N}, ${P}, ${L})`,H=h*100,S=(1-C)*100,[D,I,z]=Os(R,h,C),G=`rgb(${D}, ${I}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:i(fh({size:l}),c&&"cursor-not-allowed opacity-50",m),...u,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:E},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:d,height:d,left:`calc(${H}% - ${d/2}px)`,top:`calc(${S}% - ${d/2}px)`,backgroundColor:G,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});hh.displayName="ColorArea";var yh=classVarianceAuthority.cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),DP=`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")`,xh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Rh=K__namespace.forwardRef(({value:e,defaultValue:t,onChange:r,channel:a="hue",baseColor:n="#ff0000",orientation:o,size:s,disabled:l,thumbSize:c=18,showBorder:d=true,className:m,...u},f)=>{let p=K__namespace.useRef(null),[b,x]=K__namespace.useState(false),g=()=>{switch(a){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,w]=K__namespace.useState(t??g()),R=e??v,h=a==="hue"?R/360:R,C=K__namespace.useCallback((E,H)=>{if(l||!p.current)return;let S=p.current.getBoundingClientRect(),D=o!=="vertical",I;D?I=Math.max(0,Math.min(1,(E-S.left)/S.width)):I=Math.max(0,Math.min(1,1-(H-S.top)/S.height));let z=a==="hue"?I*360:I;e===void 0&&w(z),r?.(z);},[l,o,a,e,r]),y=E=>{l||(E.preventDefault(),x(true),E.target.setPointerCapture(E.pointerId),C(E.clientX,E.clientY));},T=E=>{b&&C(E.clientX,E.clientY);},M=E=>{x(false),E.target.releasePointerCapture(E.pointerId);},k=()=>{let E=o!=="vertical",H=E?"to right":"to top";switch(a){case "hue":return E?xh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${n})`;case "saturation":return `linear-gradient(${H}, #808080, ${n})`;case "brightness":return `linear-gradient(${H}, #000000, ${n})`;default:return xh}},N=()=>a==="hue"?`hsl(${R}, 100%, 50%)`:n,P=o!=="vertical",L=h*100;return jsxRuntime.jsx("div",{ref:f,className:i(yh({orientation:o,size:s}),l&&"cursor-not-allowed opacity-50",m),...u,children:jsxRuntime.jsxs("div",{ref:p,className:i("absolute inset-0 rounded-full overflow-hidden",d&&"border border-input"),style:{backgroundImage:a==="alpha"?DP:void 0,backgroundSize:a==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:c,height:c,...P?{left:`calc(${L}% - ${c/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${L}% - ${c/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Rh.displayName="ColorSlider";var wh=classVarianceAuthority.cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),VP=(e,t,r)=>{let a=e-r,n=t-r,o=Math.atan2(n,a)*180/Math.PI+90;return o<0&&(o+=360),o},Ch=K__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:a,disabled:n,innerRadius:o=.6,thumbSize:s=20,showCenter:l=true,className:c,...d},m)=>{let u=K__namespace.useRef(null),[f,p]=K__namespace.useState(false),[b,x]=K__namespace.useState(t),g=e??b,v=K__namespace.useCallback((y,T)=>{if(n||!u.current)return;let M=u.current.getBoundingClientRect(),k=M.width/2,N=y-M.left,P=T-M.top,L=VP(N,P,k);e===void 0&&x(L),r?.(L);},[n,e,r]),w=y=>{n||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},R=y=>{f&&v(y.clientX,y.clientY);},h=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let T=0;T<=360;T+=30)y.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsxRuntime.jsx("div",{ref:m,className:i(wh({size:a}),n&&"cursor-not-allowed opacity-50",c),...d,children:jsxRuntime.jsxs("div",{ref:u,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:R,onPointerUp:h,onPointerLeave:h,children:[o<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-o)*50}%`,left:`${(1-o)*50}%`,width:`${o*100}%`,height:`${o*100}%`}}),l&&o<1&&jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsxRuntime.jsx(IP,{hue:g,innerRadius:o,thumbSize:s})]})})});Ch.displayName="ColorWheel";var IP=({hue:e,innerRadius:t,thumbSize:r})=>{let a=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,o=50+a*Math.cos(n),s=50+a*Math.sin(n);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${o}% - ${r/2}px)`,top:`calc(${s}% - ${r/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var Nh=classVarianceAuthority.cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),Qn=K__namespace.forwardRef(({className:e,direction:t,align:r,justify:a,wrap:n,gap:o,inline:s,as:l="div",...c},d)=>jsxRuntime.jsx(l,{ref:d,className:i(Nh({direction:t,align:r,justify:a,wrap:n,gap:o,inline:s,className:e})),...c}));Qn.displayName="Flex";var Mh=K__namespace.forwardRef(({gap:e=2,align:t="center",...r},a)=>jsxRuntime.jsx(Qn,{ref:a,direction:"row",gap:e,align:t,...r}));Mh.displayName="HStack";var Th=K__namespace.forwardRef(({gap:e=2,align:t="stretch",...r},a)=>jsxRuntime.jsx(Qn,{ref:a,direction:"column",gap:e,align:t,...r}));Th.displayName="VStack";var Ph=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Qn,{ref:t,align:"center",justify:"center",...e}));Ph.displayName="Center";var Lh=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),Gs=K__namespace.forwardRef(({className:e,columns:t,rows:r,gap:a,gapX:n,gapY:o,flow:s,align:l,justify:c,placeItems:d,as:m="div",minChildWidth:u,style:f,...p},b)=>{let x=u?{...f,gridTemplateColumns:`repeat(auto-fill, minmax(${u}, 1fr))`}:f;return jsxRuntime.jsx(m,{ref:b,className:i(Lh({columns:u?void 0:t,rows:r,gap:a,gapX:n,gapY:o,flow:s,align:l,justify:c,placeItems:d,className:e})),style:x,...p})});Gs.displayName="Grid";var Eh=classVarianceAuthority.cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Dh=K__namespace.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:o,rowEnd:s,as:l="div",...c},d)=>jsxRuntime.jsx(l,{ref:d,className:i(Eh({colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:o,rowEnd:s,className:e})),...c}));Dh.displayName="GridItem";var Sh=K__namespace.forwardRef(({columns:e=2,className:t,...r},a)=>{if(typeof e=="number")return jsxRuntime.jsx(Gs,{ref:a,columns:e,className:t,...r});let n=i(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsxRuntime.jsx(Gs,{ref:a,columns:1,className:i(n,t),...r})});Sh.displayName="SimpleGrid";var Vh=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),Ih=K__namespace.forwardRef(({className:e,variant:t,size:r,radius:a,as:n="div",...o},s)=>jsxRuntime.jsx(n,{ref:s,className:i(Vh({variant:t,size:r,radius:a,className:e})),...o}));Ih.displayName="Well";var zh=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),FP=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),GP=classVarianceAuthority.cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),Bh=K__namespace.forwardRef(({className:e,orientation:t,size:r,align:a,label:n,value:o,valueWeight:s,mono:l,labelWidth:c,labelClassName:d,valueClassName:m,showColon:u=false,copyable:f=false,onCopy:p,...b},x)=>{let g=async()=>{if(!(!f||o===null||o===void 0))try{let v=typeof o=="string"?o:String(o);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:x,className:i(zh({orientation:t,size:r,align:a,className:e})),...b,children:[jsxRuntime.jsxs("span",{className:i(FP({size:r}),d),style:c?{width:c,flexShrink:0}:void 0,children:[n,u&&":"]}),jsxRuntime.jsx("span",{className:i(GP({size:r,weight:s,mono:l}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",m),onClick:f?g:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),g());}:void 0,children:o})]})});Bh.displayName="LabeledValue";var Oh=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Fh=K__namespace.forwardRef(({className:e,orientation:t,gap:r,...a},n)=>jsxRuntime.jsx("div",{ref:n,className:i(Oh({orientation:t,gap:r,className:e})),...a}));Fh.displayName="LabeledValueGroup";var _h=classVarianceAuthority.cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),fn=classVarianceAuthority.cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Wh=K__namespace.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:a,onSelect:n,suggestions:o=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:c=[],isLoading:d,showClear:m=true,showIcon:u=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:b,variant:x,className:g,placeholder:v="Search...",disabled:w,...R},h)=>{let[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(t),k=e!==void 0?e:T,N=K__namespace.useRef(null);K__namespace.useImperativeHandle(h,()=>N.current);let P=k.length>0,L=C&&(o.length>0||s.length>0||c.length>0||P),E=V=>{e===void 0&&M(V),r?.(V);},H=()=>{E(""),N.current?.focus();},S=V=>{V?.preventDefault(),k.trim()&&(a?.(k.trim()),y(false));},D=V=>{E(V.label),n?.(V),y(false);},I=V=>{E(V),a?.(V),y(false);},z=V=>{E(V),a?.(V),y(false);},G=K__namespace.useMemo(()=>{let V={};return o.forEach(B=>{let A=B.category||"Results";V[A]||(V[A]=[]),V[A].push(B);}),V},[o]);return jsxRuntime.jsxs(Ie,{open:L,onOpenChange:y,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs("form",{onSubmit:S,className:i(_h({size:b,variant:x}),g),children:[u&&jsxRuntime.jsx(lucideReact.Search,{className:i(fn({size:b}),"ml-3")}),jsxRuntime.jsx("input",{ref:N,type:"text",value:k,onChange:V=>E(V.target.value),onFocus:()=>y(true),placeholder:v,disabled:w,className:i("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!u&&"pl-3"),...R}),m&&P&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:i("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",fn({size:b})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(Ae,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:V=>V.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((V,B)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>I(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.Clock,{className:i(fn({size:b}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:V}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:i(fn({size:b}),"opacity-0 group-hover:opacity-100")})]},B))]}),c.length>0&&!P&&jsxRuntime.jsxs("div",{className:"border-t p-2",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),c.map((V,B)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.TrendingUp,{className:i(fn({size:b}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:V})]},B))]}),P&&jsxRuntime.jsx("div",{className:"p-2",children:d?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-6",children:jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):o.length>0?Object.entries(G).map(([V,B])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:V})}),B.map(A=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>D(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[A.icon||jsxRuntime.jsx(lucideReact.Search,{className:i(fn({size:b}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:A.label}),A.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:A.description})]})]},A.id))]},V)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Wh.displayName="SearchBar";var jh={Pages:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),Files:jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),Settings:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"}),Users:jsxRuntime.jsx(lucideReact.User,{className:"h-4 w-4"}),Tags:jsxRuntime.jsx(lucideReact.Hash,{className:"h-4 w-4"})},Xh=K__namespace.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:a=[],placeholder:n="Search...",isLoading:o,emptyMessage:s="No results found.",filter:l,shortcut:c="\u2318K",onSelect:d,footer:m},u)=>{let[f,p]=K__namespace.useState(""),b=K__namespace.useRef(null),[x,g]=K__namespace.useState(false);K__namespace.useEffect(()=>{g(true);},[]),K__namespace.useEffect(()=>{e||p("");},[e]),K__namespace.useEffect(()=>{if(!e)return;let y=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),K__namespace.useEffect(()=>(e&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[e]);let v=K__namespace.useMemo(()=>{let y={};return r.forEach(T=>{let M=T.category||"Results";y[M]||(y[M]=[]),y[M].push(T);}),y},[r]),w=y=>{y.onSelect?.(),d?.(y),t?.(false);},R=()=>{t?.(false);},h=f.length>0,C=!h&&a.length>0;return !x||!e?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:R}),jsxRuntime.jsx("div",{ref:u,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxRuntime.jsxs(cmdk.Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,children:[jsxRuntime.jsxs("div",{className:"flex items-center border-b px-4",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:b,value:f,onValueChange:p,placeholder:n,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsxRuntime.jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(cmdk.Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:o?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-10",children:jsxRuntime.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[C&&jsxRuntime.jsxs(cmdk.Command.Group,{heading:"Recent",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),a.map(y=>jsxRuntime.jsxs(cmdk.Command.Item,{value:y.label,onSelect:()=>w(y),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:y.icon||jh[y.category||""]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((T,M)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},y.id))]}),h&&Object.entries(v).map(([y,T])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:y,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),T.map(M=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>w(M),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:M.icon||jh[y]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},y)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),m?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:m}):jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:c})," to open"]})]})]})})]}),document.body)});Xh.displayName="SpotlightSearch";function ek(e="k"){let[t,r]=K__namespace.useState(false);return K__namespace.useEffect(()=>{let a=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),r(o=>!o));};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),{open:t,setOpen:r,toggle:()=>r(a=>!a)}}var ik=classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),lk={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},ck=e=>{let t=typeof e=="string"?new Date(e):e,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4),o=Math.floor(a/36e5),s=Math.floor(a/864e5);return n<1?"Just now":n<60?`${n}m ago`:o<24?`${o}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},qh=K__namespace.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:r,onMarkAllAsRead:a,onDismiss:n,onClearAll:o,showSettings:s,onSettingsClick:l,trigger:c,align:d="end",emptyMessage:m="No notifications",maxHeight:u=400,className:f},p)=>{let[b,x]=K__namespace.useState(false),g=e.filter(R=>!R.read).length,v=e.length>0,w=R=>{R.read||r?.(R.id),t?.(R);};return jsxRuntime.jsxs(Ie,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(Ue,{asChild:true,children:c||jsxRuntime.jsxs("button",{ref:p,className:i("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",f),children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),g>0&&jsxRuntime.jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:g>99?"99+":g})]})}),jsxRuntime.jsxs(Ae,{className:"w-80 p-0 sm:w-96",align:d,sideOffset:8,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),g>0&&jsxRuntime.jsxs(ti,{size:"sm",children:[g," new"]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[v&&a&&g>0&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-4 w-4"})}),v&&o&&jsxRuntime.jsx("button",{type:"button",onClick:o,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})}),s&&l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"})})]})]}),v?jsxRuntime.jsx(ke,{style:{maxHeight:u},children:jsxRuntime.jsx("div",{className:"divide-y",children:e.map(R=>jsxRuntime.jsxs("div",{className:i("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!R.read&&"bg-muted/30"),children:[jsxRuntime.jsx("div",{className:i("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",R.avatar?"overflow-hidden":lk[R.type||"default"]),children:R.avatar?jsxRuntime.jsx("img",{src:R.avatar,alt:"",className:"h-full w-full object-cover"}):R.icon?R.icon:jsxRuntime.jsx(lucideReact.Bell,{className:"h-4 w-4"})}),jsxRuntime.jsxs("button",{type:"button",onClick:()=>w(R),className:"flex-1 text-left",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:i("text-sm",!R.read&&"font-medium"),children:R.title}),!R.read&&jsxRuntime.jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),R.description&&jsxRuntime.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:R.description}),jsxRuntime.jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:ck(R.timestamp)})]}),jsxRuntime.jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!R.read&&r&&jsxRuntime.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),r(R.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"})}),(n||R.onDismiss)&&jsxRuntime.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),R.onDismiss?.(),n?.(R.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})})]})]},R.id))})}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsxRuntime.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:m})]})]})]})});qh.displayName="NotificationCenter";var Zh=classVarianceAuthority.cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),bk={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Jh=K__namespace.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:a=false,icon:n,dismissible:o=true,onDismiss:s,endContent:l,position:c,animate:d,autoDismiss:m,storageKey:u,className:f,...p},b)=>{let[x,g]=K__namespace.useState(true),[v,w]=K__namespace.useState(false);K__namespace.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&g(false);},[u]),K__namespace.useEffect(()=>{if(m&&x){let y=setTimeout(()=>{R();},m);return ()=>clearTimeout(y)}},[m,x]);let R=()=>{w(true),setTimeout(()=>{g(false),u&&localStorage.setItem(`banner-${u}`,"true"),s?.();},200);};if(!x)return null;let h=bk[t],C=a?n!==void 0?n:h?jsxRuntime.jsx(h,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:b,className:i(Zh({variant:r,type:t,position:c}),d&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsxRuntime.jsx("span",{className:"shrink-0",children:C}),jsxRuntime.jsx("span",{className:"text-center font-medium",children:e}),l&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:l}),o&&jsxRuntime.jsx("button",{type:"button",onClick:R,className:i("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",c==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Jh.displayName="Banner";var eo=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full shadow-lg 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:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-primary bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),xk=classVarianceAuthority.cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),Zl=K__namespace.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:a,actions:n,direction:o="up",showTooltip:s=true,closeIcon:l,animation:c="rotate",variant:d,size:m,position:u,className:f,onClick:p,disabled:b,...x},g)=>{let[v,w]=K__namespace.useState(false),R=n&&n.length>0,h=k=>{R&&w(!v),p?.(k);},C=k=>{k.onClick?.(),w(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=c==="rotate"&&v?"rotate-45":"",M=c==="scale"&&v?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:i("relative z-50",u!=="relative"&&u&&eo({position:u})),children:[R&&v&&jsxRuntime.jsx("div",{className:i("absolute left-1/2 -translate-x-1/2 flex items-center",y[o].container),children:n.map((k,N)=>jsxRuntime.jsxs("div",{className:i("flex items-center gap-2 animate-in fade-in zoom-in duration-200",o==="up"||o==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(o==="up"||o==="down")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsxRuntime.jsx("a",{href:k.href,className:i(eo({variant:k.variant||"flat",size:m==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(k),className:i(eo({variant:k.variant||"flat",size:m==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(o==="left"||o==="right")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxRuntime.jsxs("button",{ref:g,type:"button",onClick:h,disabled:b,className:i(eo({variant:d,size:m,position:"relative"}),r&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":R?v:void 0,...x,children:[v&&l?l:jsxRuntime.jsx("span",{className:i(xk({size:m}),T,M,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),r&&a&&jsxRuntime.jsx("span",{className:"font-medium",children:a})]}),R&&v&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});Zl.displayName="FloatingActionButton";var yk=Zl;var ax=classVarianceAuthority.cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),ex=classVarianceAuthority.cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),nx=K__namespace.forwardRef(({className:e,variant:t,size:r,items:a,value:n,defaultValue:o,onValueChange:s,hideLabels:l=false,showActiveLabel:c=false,renderItem:d,...m},u)=>{let[f,p]=K__namespace.useState(o||a[0]?.key),b=n!==void 0,x=b?n:f,g=h=>{h.disabled||(b||p(h.key),s?.(h.key));},v=h=>t==="filled"?h?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":h?"text-primary":"text-muted-foreground hover:text-foreground",w=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},R=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:u,className:i(ax({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...m,children:a.map(h=>{let C=x===h.key,y=!l&&(c?C:true),T=C&&h.activeIcon?h.activeIcon:h.icon;if(d)return jsxRuntime.jsx("div",{onClick:()=>g(h),className:i(ex({variant:t}),h.disabled&&"opacity-50 cursor-not-allowed"),children:d(h,C)},h.key);let M=jsxRuntime.jsxs("div",{onClick:()=>!h.href&&g(h),className:i(ex({variant:t}),v(C),h.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":h.disabled,tabIndex:h.disabled?-1:0,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),g(h));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:i(w(),"[&>svg]:h-full [&>svg]:w-full"),children:T}),h.badge!==void 0&&h.badge>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:h.badge>99?"99+":h.badge}),h.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),y&&h.label&&jsxRuntime.jsx("span",{className:i(R(),"font-medium truncate max-w-full px-1"),children:h.label})]},h.key);return h.href&&!h.disabled?jsxRuntime.jsx("a",{href:h.href,onClick:()=>g(h),className:i("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:M},h.key):M})})});nx.displayName="BottomNavigation";var wk="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",sx=classVarianceAuthority.cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),ix=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,items:o,cancelLabel:s="Cancel",onCancel:l,showCancel:c=true,children:d,closeOnSelect:m=true,onAction:u},f)=>{let p=b=>{b.isDisabled||(b.onSelect?.(),u?.(b.key),m&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:r}),jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:f,className:wk,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(a||n)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[a&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:a}),n&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:d||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:o?.map(b=>jsxRuntime.jsxs("button",{type:"button",disabled:b.isDisabled,onClick:()=>p(b),className:i(sx({variant:b.isDestructive?"destructive":"default"})),children:[b.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:b.label}),b.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]},b.key))})}),c&&jsxRuntime.jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",onClick:l,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});ix.displayName="ActionSheet";var cx=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Ql=classVarianceAuthority.cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),dx=K__namespace.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:a=[],actionSize:n="md",threshold:o=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:c,children:d,...m},u)=>{let f=K__namespace.useRef(null),[p,b]=K__namespace.useState(0),[x,g]=K__namespace.useState(false),v=K__namespace.useRef(0),w=K__namespace.useRef(0),R=r.length*(n==="sm"?64:n==="lg"?96:80),h=a.length*(n==="sm"?64:n==="lg"?96:80),C=N=>{l||(g(true),v.current=N.touches[0].clientX,w.current=p);},y=N=>{if(!x||l)return;let L=N.touches[0].clientX-v.current,E=w.current+L;(E>0&&r.length===0||E<0&&a.length===0)&&(E=0),E>R?E=R+(E-R)*.3:E<-h&&(E=-h+(E+h)*.3),b(E);},T=()=>{if(!x)return;g(false);let N=f.current?.offsetWidth||0,P=Math.abs(p)/N;if(c&&P>.6){c==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):c==="left"&&p<0&&a[0]&&(a[0].onAction?.(),s?.("left",a[0].key)),b(0);return}p>R*o&&r.length>0?(b(R),s?.("right")):p<-h*o&&a.length>0?(b(-h),s?.("left")):b(0);},M=(N,P)=>{N.onAction?.(),s?.(P,N.key),b(0);},k=()=>{b(0);};return jsxRuntime.jsxs("div",{ref:u,className:i(cx({variant:t,className:e})),...m,children:[r.length>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:R},children:r.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"right"),className:i(Ql({variant:N.variant,size:n})),style:{opacity:Math.min(1,p/R)},children:[N.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),a.length>0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:h},children:a.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"left"),className:i(Ql({variant:N.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/h)},children:[N.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsxRuntime.jsx("div",{ref:f,className:i("relative bg-background",x?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:T,onClick:p!==0?k:void 0,children:d})]})});dx.displayName="SwipeActions";var mx=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),Mk=classVarianceAuthority.cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),px=K__namespace.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:a=80,maxPullDistance:n=120,loadingIndicator:o,pullIndicator:s,indicatorSize:l="md",disabled:c=false,pullText:d="Pull to refresh",releaseText:m="Release to refresh",refreshingText:u="Refreshing...",children:f,...p},b)=>{let x=K__namespace.useRef(null),[g,v]=K__namespace.useState(0),[w,R]=K__namespace.useState("idle"),h=K__namespace.useRef(0),C=K__namespace.useRef(false),y=()=>c||w==="refreshing"?false:(x.current?.scrollTop??window.scrollY)<=0,T=L=>{y()&&(h.current=L.touches[0].clientY,C.current=true);},M=L=>{if(!C.current||!y())return;let H=L.touches[0].clientY-h.current;if(H<0){v(0),R("idle");return}let D=Math.min(H*.5,n);v(D),R(D>=a?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){R("refreshing"),v(a*.6);try{await r();}finally{R("idle"),v(0);}}else R("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],P=()=>{if(w==="refreshing")return o||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:i(N,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:u})]});let L=Math.min(g/a*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:i(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${L}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?m:d})]})};return jsxRuntime.jsxs("div",{ref:b,className:i(mx({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:i(Mk({size:l}),"z-10",w==="idle"&&g===0&&"opacity-0"),style:{top:Math.max(g-60,-60),opacity:Math.min(g/(a*.5),1)},children:P()}),jsxRuntime.jsx("div",{ref:x,className:i("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${g}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});px.displayName="PullToRefresh";var gx=classVarianceAuthority.cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),bx=K__namespace.forwardRef(({className:e,layout:t="default",header:r,footer:a,sidebar:n,aside:o,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:c="4rem",asideWidth:d="16rem",fixed:m=false,children:u,...f},p)=>{let b=s?c:l;return jsxRuntime.jsxs("div",{ref:p,className:i(gx({layout:t}),e),style:{"--app-shell-sidebar-width":b,"--app-shell-aside-width":d},...f,children:[r&&jsxRuntime.jsx(tc,{fixed:m,hasSidebar:!!n,children:r}),jsxRuntime.jsxs("div",{className:"flex flex-1",children:[n&&jsxRuntime.jsx(rc,{collapsed:s,fixed:m,children:n}),jsxRuntime.jsx("main",{className:i("flex-1 flex flex-col min-h-0",m&&r&&"pt-14",m&&a&&"pb-14"),children:u}),o&&jsxRuntime.jsx(ac,{fixed:m,children:o})]}),a&&jsxRuntime.jsx(nc,{fixed:m,hasSidebar:!!n,children:a})]})});bx.displayName="AppShell";var tc=K__namespace.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},o)=>jsxRuntime.jsx("header",{ref:o,className:i("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));tc.displayName="AppShellHeader";var rc=K__namespace.forwardRef(({className:e,collapsed:t,fixed:r,children:a,...n},o)=>jsxRuntime.jsx("aside",{ref:o,className:i("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",r&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:a}));rc.displayName="AppShellSidebar";var ac=K__namespace.forwardRef(({className:e,fixed:t,children:r,...a},n)=>jsxRuntime.jsx("aside",{ref:n,className:i("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...a,children:r}));ac.displayName="AppShellAside";var nc=K__namespace.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},o)=>jsxRuntime.jsx("footer",{ref:o,className:i("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));nc.displayName="AppShellFooter";var vx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 overflow-auto p-4",e),...t}));vx.displayName="AppShellMain";var xx=classVarianceAuthority.cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),yx=K__namespace.forwardRef(({className:e,variant:t,navigation:r,logo:a,userMenu:n,headerActions:o,breadcrumb:s,defaultCollapsed:l=false,collapsed:c,onCollapsedChange:d,children:m,...u},f)=>{let[p,b]=K__namespace.useState(l),[x,g]=K__namespace.useState(false),v=c??p,w=K__namespace.useCallback(R=>{b(R),d?.(R);},[d]);return jsxRuntime.jsxs("div",{ref:f,className:i(xx({variant:t}),e),...u,children:[jsxRuntime.jsxs("aside",{"data-slot":"sidebar","data-collapsed":v,className:i("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",v?"w-16":"w-64"),children:[jsxRuntime.jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsxRuntime.jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsxRuntime.jsx("div",{className:"border-t p-4",children:n})]}),jsxRuntime.jsx(Mo,{open:x,onOpenChange:g,children:jsxRuntime.jsxs(To,{side:"left",className:"w-64 p-0",children:[jsxRuntime.jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsxRuntime.jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsxRuntime.jsx("div",{className:"border-t p-4",children:n})]})}),jsxRuntime.jsxs("div",{className:i("flex flex-1 flex-col transition-[margin-left] duration-200",v?"lg:ml-16":"lg:ml-64"),children:[jsxRuntime.jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxRuntime.jsxs(X,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>g(true),children:[jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxRuntime.jsxs(X,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>w(!v),children:[jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsxRuntime.jsx("div",{className:"flex-1",children:s}),o&&jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:o})]}),jsxRuntime.jsx("main",{className:"flex-1 p-4 lg:p-6",children:m})]})]})});yx.displayName="DashboardLayout";var Rx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("space-y-6",e),...t}));Rx.displayName="DashboardPage";var wx=K__namespace.forwardRef(({className:e,title:t,description:r,actions:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,className:i("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...o,children:[jsxRuntime.jsxs("div",{className:"space-y-1",children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),n]}),a&&jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:a})]}));wx.displayName="DashboardPageHeader";var Cx=K__namespace.forwardRef(({className:e,columns:t=4,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...r}));Cx.displayName="DashboardGrid";var Us=classVarianceAuthority.cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),Nx=K__namespace.forwardRef(({className:e,variant:t="centered",logo:r,sideContent:a,backgroundImage:n,sidePosition:o="left",footer:s,children:l,...c},d)=>t==="split"?jsxRuntime.jsxs("div",{ref:d,className:i(Us({variant:t}),e),...c,children:[jsxRuntime.jsx("div",{className:i("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",o==="right"&&"order-2"),children:a||jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[r&&jsxRuntime.jsx("div",{className:"mb-8",children:r}),jsxRuntime.jsxs("div",{className:"max-w-md text-center",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsxRuntime.jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxRuntime.jsxs("div",{className:i("flex flex-1 flex-col lg:w-1/2",o==="right"&&"order-1"),children:[r&&jsxRuntime.jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:r}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsxRuntime.jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsxRuntime.jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxRuntime.jsxs("div",{ref:d,className:i(Us({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...c,children:[n&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxRuntime.jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[r&&jsxRuntime.jsx("div",{className:"mb-8 flex justify-center",children:r}),jsxRuntime.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsxRuntime.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsxRuntime.jsx("div",{ref:d,className:i(Us({variant:t}),e),...c,children:jsxRuntime.jsxs("div",{className:"w-full max-w-md p-6",children:[r&&jsxRuntime.jsx("div",{className:"mb-8 flex justify-center",children:r}),jsxRuntime.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsxRuntime.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));Nx.displayName="AuthLayout";var Mx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("form",{ref:r,className:i("space-y-4",e),...t}));Mx.displayName="AuthForm";var Tx=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-2 text-center",e),...n,children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),a]}));Tx.displayName="AuthHeader";var Px=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex flex-col gap-2 text-center text-sm",e),...t}));Px.displayName="AuthFooterLinks";var kx=K__namespace.forwardRef(({className:e,text:t="or continue with",...r},a)=>jsxRuntime.jsxs("div",{ref:a,className:i("relative my-4",e),...r,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center",children:jsxRuntime.jsx("span",{className:"w-full border-t"})}),jsxRuntime.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsxRuntime.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));kx.displayName="AuthDivider";var Lx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("grid grid-cols-2 gap-2",e),...t}));Lx.displayName="AuthSocialButtons";var Xs=classVarianceAuthority.cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),Ex=K__namespace.forwardRef(({className:e,variant:t="sidebar",navigation:r,title:a,description:n,children:o,...s},l)=>t==="sidebar"?jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[r&&jsxRuntime.jsx("aside",{className:"lg:w-64 shrink-0",children:jsxRuntime.jsx("nav",{className:"flex flex-col gap-1",children:r})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-6",children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),o]})]}):t==="tabs"?jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),r,jsxRuntime.jsx("div",{className:"pt-4",children:o})]}):jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),o]}));Ex.displayName="SettingsLayout";var ro=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-1",e),...n,children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),a]}));ro.displayName="SettingsHeader";var Dx=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-4",e),...n,children:[(t||r)&&jsxRuntime.jsxs("div",{className:"space-y-1",children:[t&&jsxRuntime.jsx("h2",{className:"text-lg font-medium",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),a]}));Dx.displayName="SettingsSection";var Sx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("rounded-lg border bg-card p-6",e),...t}));Sx.displayName="SettingsCard";var Hx=K__namespace.forwardRef(({className:e,label:t,description:r,htmlFor:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,className:i("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...o,children:[jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[t&&jsxRuntime.jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),jsxRuntime.jsx("div",{className:"shrink-0",children:n})]}));Hx.displayName="SettingsRow";var Vx=K__namespace.forwardRef(({className:e,active:t,icon:r,children:a,...n},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:i("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[r&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:r}),a]}));Vx.displayName="SettingsNavItem";var Ix=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("h-px bg-border my-4",e),...t}));Ix.displayName="SettingsSeparator";var za=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),Ek={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Ax=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let u=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:Ek,custom:l,transition:za(r,a,n),className:i(o),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&u}):u});Ax.displayName="Fade";var Dk=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,a={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...a[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...a[e]}}},zx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,direction:l="up",offset:c=20,onAnimationStart:d,onAnimationComplete:m},u)=>{let f=K__namespace.useMemo(()=>Dk(l,c),[l,c]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:za(r,a,n),className:i(o),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});zx.displayName="Slide";var Sk={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},Hk={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Bx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialScale:l=.9,origin:c="center",onAnimationStart:d,onAnimationComplete:m},u)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:Hk,custom:l,transition:za(r,a,n),className:i(o),style:{transformOrigin:Sk[c]},onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});Bx.displayName="Scale";var Ox=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,horizontal:s=false,startingSize:l=0,animateOpacity:c=true,onAnimationStart:d,onAnimationComplete:m},u)=>{let f=s?"width":"height",p={hidden:{[f]:l,opacity:c?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:l,opacity:c?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:za(r,a,n),className:i("overflow-hidden",o),onAnimationStart:d,onAnimationComplete:m,children:t})})});Ox.displayName="Collapse";var Fx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.4,delay:a=0,ease:n,className:o,initialWidth:s=0,initialHeight:l=0,animateOpacity:c=true,onAnimationStart:d,onAnimationComplete:m},u)=>{let f={hidden:{width:s,height:l,opacity:c?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:c?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:za(r,a,n),className:i("overflow-hidden",o),onAnimationStart:d,onAnimationComplete:m,children:t})})});Fx.displayName="Expand";var Gx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:c=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let f={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:c},exit:{opacity:0,rotate:l}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:za(r,a,n),className:i(o),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Gx.displayName="Rotate";var Kx=K__namespace.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:a=false,duration:n=.6,delay:o=0,ease:s,className:l,onAnimationStart:c,onAnimationComplete:d},m)=>{let u=r==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:m,className:i("relative",l),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[u]:a?180:0},transition:za(n,o,s),style:{transformStyle:"preserve-3d"},onAnimationStart:c,onAnimationComplete:d,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${u}(180deg)`},children:t})]})})});Kx.displayName="Flip";var $x=K__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:a,disabled:n=false},o)=>{let[s,l]=K__namespace.useState([]),c=K__namespace.useRef(null),d=u=>{if(n)return;let f=c.current;if(!f)return;let p=f.getBoundingClientRect(),b=u.clientX-p.left,x=u.clientY-p.top,g=Math.max(p.width,p.height)*2,v={id:Date.now(),x:b,y:x,size:g};l(w=>[...w,v]);},m=u=>{l(f=>f.filter(p=>p.id!==u));};return jsxRuntime.jsxs("div",{ref:o,className:i("relative overflow-hidden",a),onClick:d,children:[jsxRuntime.jsx("div",{ref:c,className:"relative z-0",children:r}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(u=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>m(u.id),className:"pointer-events-none absolute rounded-full",style:{left:u.x-u.size/2,top:u.y-u.size/2,width:u.size,height:u.size,backgroundColor:e}},u.id))})]})});$x.displayName="Ripple";var _x=K__namespace.forwardRef(({children:e,animate:t=true,height:r=10,duration:a=.5,count:n=0,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"bounce":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});_x.displayName="Bounce";var Ak={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},Wx=K__namespace.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:a=.5,count:n=1,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{x:0},shake:{x:Ak[r],transition:{duration:a,ease:"easeInOut",repeat:n-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"shake":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});Wx.displayName="Shake";var zk={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},jx=K__namespace.forwardRef(({children:e,animate:t=true,speed:r="normal",className:a},n)=>jsxRuntime.jsx("div",{ref:n,className:i(t&&zk[r],a),children:e}));jx.displayName="Pulse";var Yx=K__namespace.forwardRef(({children:e,animate:t=true,angle:r=10,duration:a=.3,count:n=0,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"wiggle":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});Yx.displayName="Wiggle";var Ux=K__namespace.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:a=.2,className:n,triggerOnHover:o=false,triggerOnClick:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=t||c,u={type:"spring",stiffness:400,damping:17,duration:a},f=()=>{s&&(d(true),setTimeout(()=>d(false),a*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,animate:{scale:m?r:1},transition:u,className:i(n),onMouseEnter:()=>o&&d(true),onMouseLeave:()=>o&&d(false),onClick:f,children:e})});Ux.displayName="Pop";var Kk=(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},Xx=K__namespace.forwardRef(({value:e,from:t=0,duration:r=2,decimals:a=0,prefix:n="",suffix:o="",separator:s=",",decimalSeparator:l=".",animateOnView:c=true,delay:d=0,className:m,onComplete:u},f)=>{let p=K__namespace.useRef(null),b=framerMotion.useInView(p,{once:true}),[x,g]=K__namespace.useState(!c);K__namespace.useEffect(()=>{if(c&&b){let h=setTimeout(()=>g(true),d*1e3);return ()=>clearTimeout(h)}},[c,b,d]);let v={damping:30,stiffness:100,duration:r*1e3},w=framerMotion.useSpring(x?e:t,v),R=framerMotion.useTransform(w,h=>Kk(h,a,s,l));return K__namespace.useEffect(()=>{x&&w.set(e);},[x,e,w]),K__namespace.useEffect(()=>{let h=w.on("change",C=>{Math.abs(C-e)<.01&&u&&u();});return ()=>h()},[w,e,u]),jsxRuntime.jsx("span",{ref:p,className:i(m),children:jsxRuntime.jsxs("span",{ref:f,children:[n,jsxRuntime.jsx(framerMotion.motion.span,{children:R}),o]})})});Xx.displayName="Counter";var qx=K__namespace.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:a=1500,cursor:n=true,cursorChar:o="|",loop:s=false,deleteSpeed:l=30,animateOnView:c=true,className:d,cursorClassName:m,onComplete:u},f)=>{let p=Array.isArray(e)?e:[e],[b,x]=K__namespace.useState(""),[g,v]=K__namespace.useState(0),[w,R]=K__namespace.useState(false),[h,C]=K__namespace.useState(false),y=K__namespace.useRef(null),T=framerMotion.useInView(y,{once:true}),[M,k]=K__namespace.useState(!c);return K__namespace.useEffect(()=>{if(c&&T){let N=setTimeout(()=>k(true),r*1e3);return ()=>clearTimeout(N)}},[c,T,r]),K__namespace.useEffect(()=>{if(!M||h)return;let N=p[g],P;return w?b.length>0?P=setTimeout(()=>{x(b.slice(0,-1));},l):(R(false),v(L=>(L+1)%p.length)):b.length<N.length?P=setTimeout(()=>{x(N.slice(0,b.length+1));},t):g<p.length-1||s?P=setTimeout(()=>{R(true);},a):(C(true),u?.()),()=>clearTimeout(P)},[M,b,g,w,h,p,t,l,a,s,u]),jsxRuntime.jsxs("span",{ref:y,className:i(d),children:[jsxRuntime.jsx("span",{ref:f,children:b}),n&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:i("ml-0.5",m),children:o})]})});qx.displayName="Typewriter";var Zx=K__namespace.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:a=.5,delay:n=0,splitBy:o="word",animateOnView:s=true,className:l},c)=>{let d=K__namespace.useRef(null),m=framerMotion.useInView(d,{once:true,amount:.5}),u=s?m:true,f=typeof e=="string"?e:"",p=o==="word"?f.split(" "):f.split(""),b={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},x={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:n}}},g={hidden:{opacity:0,...b[t]},visible:{opacity:1,x:0,y:0,transition:{duration:a,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:c,className:i("inline-flex flex-wrap",l),variants:x,initial:"hidden",animate:u?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:d,children:p.map((v,w)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:g,className:"inline-block",children:[v,o==="word"&&w<p.length-1&&"\xA0"]},w))})})});Zx.displayName="TextReveal";var Jx=K__namespace.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:a=.5,className:n,loop:o=true},s)=>{let[l,c]=K__namespace.useState(0);K__namespace.useEffect(()=>{if(!o&&l===e.length-1)return;let m=setInterval(()=>{c(u=>(u+1)%e.length);},t*1e3);return ()=>clearInterval(m)},[e.length,t,o,l]);let d=()=>{switch(r){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsxRuntime.jsx("span",{ref:s,className:i("relative inline-block",n),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:d(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:a},className:"inline-block",children:e[l]},e[l])})})});Jx.displayName="WordRotate";var ry=K__namespace.forwardRef(({children:e,direction:t="up",distance:r=50,duration:a=.6,delay:n=0,once:o=true,threshold:s=.1,className:l,scale:c,rotate:d,blur:m,ease:u=[.4,0,.2,1]},f)=>{let p=K__namespace.useRef(null),b=framerMotion.useInView(p,{once:o,amount:s}),g={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:g.x,y:g.y,scale:c??1,rotate:d??0,filter:m?`blur(${m}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:a,delay:n,ease:u}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:v,initial:"hidden",animate:b?"visible":"hidden",className:i(l),children:e})})});ry.displayName="ScrollReveal";var ay=K__namespace.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:a="transparent",zIndex:n=50,className:o,container:s,showPercentage:l=false,useSpring:c=true},d)=>{let{scrollYProgress:m}=framerMotion.useScroll({container:s}),u=framerMotion.useSpring(m,{stiffness:100,damping:30,restDelta:.001}),f=c?u:m,p=e==="top"||e==="bottom",b={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},x=p?"scaleX":"scaleY",g=p?"left":"top";return jsxRuntime.jsxs("div",{ref:d,className:i("fixed",o),style:{...b[e],zIndex:n,backgroundColor:a},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[x]:f,transformOrigin:g,backgroundColor:r}}),l&&jsxRuntime.jsx(_k,{progress:f,position:e})]})});ay.displayName="ScrollProgress";var _k=({progress:e,position:t})=>{let r=framerMotion.useTransform(e,s=>Math.round(s*100)),[a,n]=K__namespace.useState(0);return K__namespace.useEffect(()=>{let s=r.on("change",n);return ()=>s()},[r]),jsxRuntime.jsxs("span",{className:i("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[a,"%"]})},ny=K__namespace.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:a,container:n},o)=>{let s=K__namespace.useRef(null),{scrollYProgress:l}=framerMotion.useScroll({target:s,container:n,offset:["start end","end start"]}),c=[-100*t,100*t],d=framerMotion.useTransform(l,[0,1],c),m=framerMotion.useSpring(d,{stiffness:100,damping:30}),u=r==="horizontal"?m:0,f=r==="vertical"?m:0;return jsxRuntime.jsx("div",{ref:s,className:i("overflow-hidden",a),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:o,style:{x:u,y:f},children:e})})});ny.displayName="Parallax";var iy=K__namespace.forwardRef(({children:e,width:t,height:r,duration:a=1.5,direction:n="right",baseColor:o="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:c,active:d=true},m)=>{let u={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxRuntime.jsxs("div",{ref:m,className:i("relative overflow-hidden",c),style:{width:t,height:r,borderRadius:l,backgroundColor:o},children:[e,d&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${u[n]}, transparent, ${s}, transparent)`,animation:`${f[n]} ${a}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
48
|
+
`}),jsxRuntime.jsx("circle",{className:i("stroke-muted",o),cx:m.size/2,cy:m.size/2,r:u,strokeWidth:m.strokeWidth,fill:"none"}),jsxRuntime.jsx("circle",{cx:m.size/2,cy:m.size/2,r:u,strokeWidth:m.strokeWidth,fill:"none",strokeLinecap:"round",stroke:qm[r]||qm.default,strokeDasharray:c?`${b} ${f-b}`:`${f} ${f}`,strokeDashoffset:c?0:p,style:{transformOrigin:"center",transform:"rotate(-90deg)",transition:c?void 0:"stroke-dashoffset 0.3s ease-in-out"}})]}),n&&!c&&jsxRuntime.jsxs("span",{className:i("absolute font-medium text-foreground",m.fontSize),children:[Math.round(d),"%"]})]})});Qm.displayName="CircularProgress";var ep=K__namespace.createContext(null),j0=()=>{let e=K__namespace.useContext(ep);if(!e)throw new Error("OTP components must be used within InputOTP");return e},tp=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"}}),rp=K__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]=K__namespace.useState(n),[x,g]=K__namespace.useState(0),[v,w]=K__namespace.useState(false),R=K__namespace.useRef(null),h=a!==void 0?a:p;K__namespace.useImperativeHandle(f,()=>R.current),K__namespace.useEffect(()=>{g(Math.min(h.length,r-1));},[h,r]),K__namespace.useEffect(()=>{h.length===r&&s&&s(h);},[h,r,s]);let C=P=>{let L=P.target.value;if(l&&L){let E=new RegExp(l.replace("^","").replace("$","").replace("+",""));L=L.split("").filter(H=>E.test(H)).join("");}L=L.slice(0,r),a===void 0&&b(L),o?.(L);},y=P=>{P.key==="ArrowLeft"?g(L=>Math.max(0,L-1)):P.key==="ArrowRight"&&g(L=>Math.min(h.length,r-1,L+1));},T=()=>{R.current?.focus();},M=()=>{w(true),g(Math.min(h.length,r-1));},k=()=>{w(false);},N={value:h,activeIndex:v?x:-1,maxLength:r,disabled:c};return jsxRuntime.jsx(ep.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:i(tp({size:d}),t),onClick:T,"data-otp-container":true,children:[jsxRuntime.jsx("input",{ref:R,type:"text",inputMode:"numeric",autoComplete:"one-time-code",value:h,onChange:C,onKeyDown:y,onFocus:M,onBlur:k,disabled:c,maxLength:r,className:i("absolute opacity-0 pointer-events-none w-0 h-0",e),...u}),m]})})});rp.displayName="InputOTP";var ap=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center",e),...t}));ap.displayName="InputOTPGroup";var np=K__namespace.forwardRef(({index:e,className:t,...r},a)=>{let{value:n,activeIndex:o,disabled:s}=j0(),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"})})]})});np.displayName="InputOTPSlot";var op=K__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"})}));op.displayName="InputOTPSeparator";var lp=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent text-foreground",soft:"bg-primary/15 text-primary",surface:"bg-muted text-muted-foreground"},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:"soft",size:"md"}}),cp=K__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]=K__namespace.useState(""),w=K__namespace.useRef(null);K__namespace.useImperativeHandle(x,()=>w.current);let R=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 L={id:crypto.randomUUID(),text:P};n?.([...a,L]),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(),R(g);}N.key==="Backspace"&&!g&&a.length>0&&h(a[a.length-1].id);},y=N=>{let P=N.target.value;if(P.includes(",")){P.split(",").forEach(E=>{E.trim()&&R(E);});return}v(P);},T=N=>{N.preventDefault(),N.clipboardData.getData("text").split(/[,\n\t]/).filter(Boolean).forEach(E=>{R(E);});},M=()=>{w.current?.focus();},k=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:M,children:[a.map(N=>p?p(N,()=>h(N.id)):jsxRuntime.jsxs("span",{className:i(lp({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)),!k&&!f&&jsxRuntime.jsx("input",{ref:w,type:"text",value:g,onChange:y,onKeyDown:C,onPaste:T,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})]})});cp.displayName="TagInput";var up=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"}}),mp=K__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(up({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]}));mp.displayName="EmptyState";var fp=classVarianceAuthority.cva("rounded-lg border bg-card p-6 text-card-foreground shadow-sm",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent",ghost:"border-transparent shadow-none",soft:"bg-primary/10 border-primary/20",surface:"bg-muted border-muted"}},defaultVariants:{variant:"outline"}}),gp=K__namespace.forwardRef(({className:e,variant:t,label:r,value:a,icon:n,trend:o,trendValue:s,description:l,...c},d)=>{let m=o==="up"?lucideReact.TrendingUp:o==="down"?lucideReact.TrendingDown:lucideReact.Minus,u=o==="up"?"text-green-500":o==="down"?"text-red-500":"text-muted-foreground";return jsxRuntime.jsxs("div",{ref:d,className:i(fp({variant:t,className:e})),...c,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:r}),n&&jsxRuntime.jsx("div",{className:"text-muted-foreground [&>svg]:h-4 [&>svg]:w-4",children:n})]}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:a}),o&&s&&jsxRuntime.jsxs("span",{className:i("flex items-center gap-0.5 text-sm",u),children:[jsxRuntime.jsx(m,{className:"h-3 w-3"}),s]})]}),l&&jsxRuntime.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:l})]})});gp.displayName="StatCard";var Hi=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"",bordered:"divide-y divide-border rounded-lg border",striped:"[&>*:nth-child(odd)]:bg-muted/50"},size:{sm:"gap-1 [&>*]:py-2 [&>*]:px-3",md:"gap-2 [&>*]:py-3 [&>*]:px-4",lg:"gap-3 [&>*]:py-4 [&>*]:px-5"}},defaultVariants:{variant:"default",size:"md"}});function rw({className:e,variant:t,size:r,items:a,renderItem:n,draggable:o=false,onReorder:s,showHandle:l=true,children:c,...d},m){let[u,f]=K__namespace.useState(null),[p,b]=K__namespace.useState(null),x=(h,C)=>{f(C),h.dataTransfer.effectAllowed="move",h.dataTransfer.setData("text/plain",String(C));},g=(h,C)=>{h.preventDefault(),!(u===null||u===C)&&b(C);},v=()=>{b(null);},w=(h,C)=>{if(h.preventDefault(),!a||u===null||u===C){f(null),b(null);return}let y=[...a],[T]=y.splice(u,1);y.splice(C,0,T),s?.(y),f(null),b(null);},R=()=>{f(null),b(null);};return !o||!a||!n?jsxRuntime.jsx("div",{ref:m,role:"list",className:i(Hi({variant:t,size:r,className:e})),...d,children:c}):jsxRuntime.jsx("div",{ref:m,role:"list",className:i(Hi({variant:t,size:r,className:e})),...d,children:a.map((h,C)=>jsxRuntime.jsxs("div",{role:"listitem",draggable:true,onDragStart:y=>x(y,C),onDragOver:y=>g(y,C),onDragLeave:v,onDrop:y=>w(y,C),onDragEnd:R,className:i("flex items-center gap-3 transition-all cursor-move",u===C&&"opacity-50 scale-[1.02] z-10",p===C&&"border-primary border-dashed border rounded-md"),children:[l&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:n(h,C)})]},h.id))})}var aw=K__namespace.forwardRef(rw),vp=classVarianceAuthority.cva("flex items-center gap-3 transition-colors",{variants:{interactive:{true:"cursor-pointer hover:bg-muted/50",false:""}},defaultVariants:{interactive:false}}),hp=K__namespace.forwardRef(({className:e,interactive:t,leading:r,trailing:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,role:"listitem",className:i(vp({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})]}));hp.displayName="ListItem";var xp=K__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]}));xp.displayName="ListItemText";var wp=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"",bordered:"rounded-lg border divide-y divide-border",filled:"bg-muted/30 rounded-lg"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Cp=classVarianceAuthority.cva("flex items-center gap-2 py-2 px-3 transition-colors select-none",{variants:{size:{sm:"py-1.5 px-2 text-sm",md:"py-2 px-3 text-sm",lg:"py-3 px-4 text-base"},isSelected:{true:"bg-primary/10 text-primary",false:"hover:bg-muted/50"},isDragging:{true:"opacity-50 bg-muted",false:""},isDragOver:{true:"border-2 border-dashed border-primary rounded-md",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed",false:"cursor-pointer"}},defaultVariants:{size:"md",isSelected:false,isDragging:false,isDragOver:false,isDisabled:false}}),Np=K__namespace.createContext(null),sw=()=>{let e=K__namespace.useContext(Np);if(!e)throw new Error("TreeListItem must be used within TreeList");return e},Mp=({node:e,level:t,parentPath:r})=>{let{expandedKeys:a,toggleExpand:n,selectedKeys:o,toggleSelect:s,selectable:l,draggable:c,showHandle:d,indentSize:m,size:u,draggedId:f,setDraggedId:p,dragOverId:b,setDragOverId:x,handleDrop:g}=sw(),v=e.children&&e.children.length>0,w=a.has(e.id),R=o.has(e.id),h=f===e.id,C=b===e.id,y=[...r,e.id],T=H=>{!c||e.disabled||(H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",e.id),H.dataTransfer.setData("application/json",JSON.stringify({id:e.id,path:y})),p(e.id));},M=H=>{H.preventDefault(),!(!c||f===e.id||e.disabled)&&x(e.id);},k=()=>{x(null);},N=H=>{if(H.preventDefault(),!c||f===e.id||e.disabled)return;let S=H.currentTarget.getBoundingClientRect(),D=H.clientY-S.top,I=S.height,z="inside";D<I*.25?z="before":D>I*.75&&(z="after"),g(e.id,z),p(null),x(null);},P=()=>{p(null),x(null);},L=H=>{e.disabled||(l?s(e.id,H):v&&n(e.id));},E=H=>{H.stopPropagation(),e.disabled||n(e.id);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":v?w:void 0,"aria-selected":l?R:void 0,"aria-disabled":e.disabled,draggable:c&&!e.disabled,onDragStart:T,onDragOver:M,onDragLeave:k,onDrop:N,onDragEnd:P,onClick:L,className:i(Cp({size:u,isSelected:R,isDragging:h,isDragOver:C,isDisabled:e.disabled})),style:{paddingLeft:`${t*m+12}px`},children:[c&&d&&!e.disabled&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:E,className:i("flex-shrink-0 p-0.5 rounded hover:bg-muted transition-transform",!v&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:i("h-4 w-4 transition-transform",w&&"rotate-90")})}),e.icon&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground",children:e.icon}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 truncate",children:e.label})]}),v&&w&&jsxRuntime.jsx("div",{role:"group",children:e.children.map(H=>jsxRuntime.jsx(Mp,{node:H,level:t+1,parentPath:y},H.id))})]})},Tp=K__namespace.forwardRef(({className:e,variant:t,size:r,items:a,draggable:n=false,allowCrossLevel:o=true,onReorder:s,expandedKeys:l,defaultExpandedKeys:c=[],onExpand:d,selectable:m=false,selectedKeys:u,onSelect:f,showHandle:p=true,indentSize:b=24,...x},g)=>{let[v,w]=K__namespace.useState(new Set(c)),R=l!==void 0,h=R?new Set(l):v,C=K__namespace.useCallback(V=>{let B=new Set(h);B.has(V)?B.delete(V):B.add(V),R||w(B),d?.(Array.from(B));},[h,R,d]),[y,T]=K__namespace.useState(new Set),M=u!==void 0,k=M?new Set(u):y,N=K__namespace.useCallback((V,B)=>{let A=new Set(k);B.ctrlKey||B.metaKey?A.has(V)?A.delete(V):A.add(V):(A.clear(),A.add(V)),M||T(A),f?.(Array.from(A));},[k,M,f]),[P,L]=K__namespace.useState(null),[E,H]=K__namespace.useState(null),S=K__namespace.useCallback((V,B,A=null)=>{for(let W=0;W<V.length;W++){if(V[W].id===B)return {node:V[W],parent:A,index:W};if(V[W].children){let q=S(V[W].children,B,V[W]);if(q)return q}}return null},[]),D=K__namespace.useCallback((V,B)=>V.reduce((A,W)=>W.id===B?A:W.children?[...A,{...W,children:D(W.children,B)}]:[...A,W],[]),[]),I=K__namespace.useCallback((V,B,A,W)=>V.reduce((q,F)=>F.id===B?W==="before"?[...q,A,F]:W==="after"?[...q,F,A]:[...q,{...F,children:[...F.children||[],A]}]:F.children?[...q,{...F,children:I(F.children,B,A,W)}]:[...q,F],[]),[]),z=K__namespace.useCallback((V,B)=>{if(!P||!s)return;let A=S(a,P);if(!A)return;let W=(F,$)=>{let ae=S(a,F);if(!ae?.node.children)return false;for(let O of ae.node.children)if(O.id===$||W(O.id,$))return true;return false};if(B==="inside"&&W(P,V))return;if(!o){let F=S(a,V);if(A.parent?.id!==F?.parent?.id&&B!=="inside")return}let q=D(a,P);q=I(q,V,A.node,B),s(q);},[P,a,s,S,D,I,o]),G={expandedKeys:h,toggleExpand:C,selectedKeys:k,toggleSelect:N,selectable:m,draggable:n,allowCrossLevel:o,showHandle:p,indentSize:b,size:r,draggedId:P,setDraggedId:L,dragOverId:E,setDragOverId:H,handleDrop:z,items:a};return jsxRuntime.jsx(Np.Provider,{value:G,children:jsxRuntime.jsx("div",{ref:g,role:"tree","aria-multiselectable":m,className:i(wp({variant:t,size:r,className:e})),...x,children:a.map(V=>jsxRuntime.jsx(Mp,{node:V,level:0,parentPath:[]},V.id))})})});Tp.displayName="TreeList";var kp=classVarianceAuthority.cva("flex flex-col",{variants:{position:{left:"",right:"",alternate:""}},defaultVariants:{position:"left"}}),Lp=K__namespace.forwardRef(({className:e,position:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,"data-position":t,className:i(kp({position:t,className:e})),...r}));Lp.displayName="Timeline";var Ep=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"}}),Dp=K__namespace.forwardRef(({className:e,variant:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i(Ep({variant:t,className:e})),...r}));Dp.displayName="TimelineItem";var Sp=K__namespace.forwardRef(({className:e,dot:t,showConnector:r=true,...a},n)=>jsxRuntime.jsxs("div",{ref:n,className:i("flex flex-col items-center",e),...a,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:t}),r&&jsxRuntime.jsx("div",{className:"w-0.5 flex-1 bg-border"})]}));Sp.displayName="TimelineSeparator";var Hp=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 pt-0.5",e),...t}));Hp.displayName="TimelineContent";var Vp=K__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}));Vp.displayName="TimelineOpposite";var Ap=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}}),zp=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}}),Bp=K__namespace.createContext({}),Op=K__namespace.forwardRef(({className:e,size:t="md",fullWidth:r,children:a,value:n,defaultValue:o,onValueChange:s,disabled:l,...c},d)=>{let[m,u]=K__namespace.useState(o),f=n!==void 0?n:m,p=K__namespace.useCallback(b=>{n===void 0&&u(b),s?.(b);},[n,s]);return jsxRuntime.jsx(Bp.Provider,{value:{size:t??"md",value:f,onValueChange:p,disabled:l},children:jsxRuntime.jsx("div",{ref:d,role:"group",className:i(Ap({size:t,fullWidth:r,className:e})),...c,children:a})})});Op.displayName="SegmentedControl";var Fp=K__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,...n},o)=>{let s=K__namespace.useContext(Bp),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(zp({size:s.size,selected:l}),"flex-1",e),...n,children:t})});Fp.displayName="SegmentedControlItem";var Gp=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"}}),Kp=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},$o=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]},$p=(e,t,r)=>{let a=[];return t&&e.size>t&&a.push({code:"file-too-large",message:`File is larger than ${$o(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},_p=K__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]=K__namespace.useState(false),[v,w]=K__namespace.useState(false),[R,h]=K__namespace.useState([]),C=K__namespace.useRef(null),y=K__namespace.useCallback(D=>{if(!D||D.length===0)return;let I=Array.from(D),z=[],G=[];(u?I:[I[0]]).forEach(B=>{let A=$p(B,d,m);A.length>0?G.push({file:B,errors:A}):z.push(B);}),h(G),z.length>0&&a?.(z),G.length>0&&n?.(G);},[d,m,u,a,n]),T=K__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(B=>B.endsWith("/*")?V.startsWith(B.slice(0,-2)):V===B)}return false});w(z);}},[f,m]),M=K__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),!f&&(D.dataTransfer.dropEffect="copy");},[f]),k=K__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),w(false));},[]),N=K__namespace.useCallback(D=>{D.preventDefault(),D.stopPropagation(),g(false),w(false),!f&&y(D.dataTransfer.files);},[f,y]),P=K__namespace.useCallback(()=>{f||C.current?.click();},[f]),L=K__namespace.useCallback(D=>{y(D.target.files),D.target.value="";},[y]),E=K__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:T,onDragOver:M,onDragLeave:k,onDrop:N,onClick:P,onKeyDown:E,className:i(Gp({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:L,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 ${$o(d)}`,m&&m.length>0&&` \u2022 ${m.join(", ")}`]})]})]})]}),R.length>0&&jsxRuntime.jsx("div",{className:"rounded-md bg-danger/10 p-3 text-sm text-danger",children:R.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=Kp(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:[$o(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(Ho,{value:D.progress,className:"mt-2 h-1"})]}),jsxRuntime.jsxs(X,{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)})})]})});_p.displayName="FileUpload";var hw=`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")`,jp=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}}),Hn=K__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(jp({size:n,shape:o,interactive:s??(!!a||!!c)}),t&&"ring-2 ring-ring ring-offset-2",l),style:{backgroundImage:r?hw: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}})}));Hn.displayName="ColorSwatch";var Yp=classVarianceAuthority.cva("",{variants:{layout:{grid:"grid gap-2",stack:"flex flex-wrap gap-2"}},defaultVariants:{layout:"stack"}}),Up=K__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]=K__namespace.useState(t),x=e??p,g=K__namespace.useCallback(w=>{c||(e===void 0&&b(w),r?.(w));},[e,r,c]),v=w=>w.toLowerCase();return jsxRuntime.jsx("div",{ref:f,role:"listbox","aria-label":"Color options",className:i(Yp({layout:a}),d),style:{...a==="grid"?{gridTemplateColumns:`repeat(${n}, 1fr)`}:{},...m},...u,children:o.map(w=>{let R=x?v(x)===v(w):false;return jsxRuntime.jsx(Hn,{role:"option",color:w,size:s,shape:l,isSelected:R,onSelect:g,disabled:c,"aria-selected":R},w)})})});Up.displayName="ColorSwatchPicker";var Rw=["#000000","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#8b5cf6","#ec4899"],Xp={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},qp=K__namespace.forwardRef(({value:e,defaultValue:t="#3b82f6",onChange:r,disabled:a,presets:n=Rw,showInput:o=true,size:s="md",className:l,variant:c="full"},d)=>{let[m,u]=K__namespace.useState(e??t),f=K__namespace.useId();K__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",Xp[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(Ie,{children:[jsxRuntime.jsx(Ue,{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",Xp[s],l),style:{backgroundColor:m},"aria-label":`Color picker, current color: ${m}`})}),jsxRuntime.jsx(Ae,{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(ca,{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(ca,{className:"text-xs",children:"Presets"}),jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(g=>jsxRuntime.jsx(Hn,{color:g,size:"sm",isSelected:m.toLowerCase()===g.toLowerCase(),onSelect:b},g))})]})]})})]})});qp.displayName="ColorPicker";var Zp=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"}}),Ai=e=>String(e).padStart(2,"0"),Tw=e=>{let[t,r]=e.split(":").map(Number);return {hours:t||0,minutes:r||0}},Pw=(e,t)=>`${Ai(e)}:${Ai(t)}`,Jp=K__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]=K__namespace.useState(r??""),[b,x]=K__namespace.useState(false);K__namespace.useEffect(()=>{r!==void 0&&p(r);},[r]);let{hours:g,minutes:v}=Tw(f||"00:00"),w=k=>{let N=k.target.value;p(N),/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(N)&&a?.(N);},R=(k,N)=>{let P=Math.max(0,Math.min(23,k)),L=Math.max(0,Math.min(59,N)),E=Pw(P,L);p(E),a?.(E);},h=()=>R(g+1,v),C=()=>R(g-1,v),y=()=>R(g,v+o),T=()=>R(g,v-o),M=({value:k,onIncrement:N,onDecrement:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx(X,{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:Ai(k)}),jsxRuntime.jsx(X,{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:w,disabled:d,className:i(Zp({size:t}),s&&"pr-10","[&::-webkit-calendar-picker-indicator]:hidden",e),...m}),s&&jsxRuntime.jsxs(Ie,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{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(Ae,{className:"w-auto p-4",align:"end",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(M,{value:g,onIncrement:h,onDecrement:C,max:23}),jsxRuntime.jsx("div",{className:"text-2xl font-bold text-muted-foreground",children:":"}),jsxRuntime.jsx(M,{value:v,onIncrement:y,onDecrement:T,max:59})]}),jsxRuntime.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[jsxRuntime.jsx(X,{variant:"bordered",size:"sm",onClick:()=>{let k=new Date;R(k.getHours(),k.getMinutes());},children:"Now"}),jsxRuntime.jsx(X,{size:"sm",onClick:()=>x(false),children:"Done"})]})]})]})]})});Jp.displayName="TimeInput";var Qp=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"}}),Lw=(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}},zi=(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},ef=(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},tf=K__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},w)=>{let[R,h]=K__namespace.useState(a),[C,y]=K__namespace.useState(""),[T,M]=K__namespace.useState(false),k=r!==void 0?r:R,N=f??Lw(o,s);K__namespace.useEffect(()=>{!T&&k!==void 0&&y(zi(k,l,p,b));},[k,l,p,b,T]);let P=D=>{let I=D.target.value;if(!I){y(""),r===void 0&&h(void 0),n?.(void 0);return}if(!new RegExp(`^[0-9${p}${b}.-]*$`).test(I))return;y(I);let G=ef(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);}},L=()=>{M(true),k!==void 0&&y(k.toString().replace(".",b));},E=()=>{M(false),y(k!==void 0?zi(k,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:w,type:"text",inputMode:"decimal",value:C,onChange:P,onFocus:L,onBlur:E,disabled:x,placeholder:g??`0${b}${"0".repeat(l)}`,className:i(Qp({size:t}),H&&"pl-8",S&&"pr-8","text-right",e),style:{borderColor:T?"var(--color-foreground)":void 0},...v}),S&&jsxRuntime.jsx("div",{className:"absolute right-3 pointer-events-none",children:S})]})});tf.displayName="CurrencyInput";var rf=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"}}),Bi={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:"#####-####"}},Sw=(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}},_r=e=>["#","A","*"].includes(e),Wo=(e,t,r)=>{let a="",n=0;for(let o=0;o<t.length&&n<=e.length;o++){let s=t[o];if(_r(s)){if(n<e.length){let l=e[n];Sw(l,s)?(a+=l,n++):(n++,o--);}}else (n<e.length||r)&&(a+=s);}return a},Oi=(e,t)=>{let r="";for(let a=0;a<e.length&&a<t.length;a++){let n=t[a];_r(n)&&(r+=e[a]);}return r},af=(e,t)=>e.split("").map(r=>_r(r)?t:r).join(""),Hw=(e,t,r)=>{let a=0;for(let l=0;l<r&&l<e.length&&l<t.length;l++)_r(t[l])&&a++;let o=0,s=0;for(let l=0;l<t.length&&s<a;l++)o++,_r(t[l])&&s++;for(;o<t.length&&!_r(t[o]);)o++;return Math.min(o,e.length)},nf=K__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 Bi?Bi[o].mask:o,[b,x]=K__namespace.useState(a),[g,v]=K__namespace.useState(""),[w,R]=K__namespace.useState(false),h=K__namespace.useRef(null),C=r!==void 0?r:b;K__namespace.useImperativeHandle(f,()=>h.current),K__namespace.useEffect(()=>{let k=Wo(C,p,true);v(k);},[C,p]);let y=k=>{let N=k.target.value,P=k.target.selectionStart??0,L=N.replace(/[^\w]/g,""),E=Wo(L,p,true),H=Oi(E,p);v(E),r===void 0&&x(c?E:H),n?.(H,E),requestAnimationFrame(()=>{if(h.current){let S=Hw(E,p,P);h.current.setSelectionRange(S,S);}});},T=k=>{if(["ArrowLeft","ArrowRight","Home","End","Tab"].includes(k.key)||k.ctrlKey||k.metaKey)return;let N=h.current;if(!N)return;let P=N.selectionStart??0;if(k.key==="Backspace"&&P>0){let L=P-1;for(;L>0&&!_r(p[L]);)L--;let E=Oi(g,p),H=0;for(let I=0;I<L&&I<p.length;I++)_r(p[I])&&H++;let S=E.slice(0,Math.max(0,H-1))+E.slice(H),D=Wo(S,p,true);v(D),r===void 0&&x(c?D:S),n?.(S,D),k.preventDefault(),requestAnimationFrame(()=>{h.current&&h.current.setSelectionRange(L,L);});}},M=l?af(p,s):m;return jsxRuntime.jsx("input",{ref:h,type:"text",value:g,onChange:y,onKeyDown:T,onFocus:()=>R(true),onBlur:()=>R(false),disabled:d,placeholder:M,className:i(rf({size:t}),e),style:{borderColor:w?"var(--color-foreground)":void 0},...u})});nf.displayName="MaskedInput";var of=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"}}),Uo={"DD/MM/YYYY":"/","MM/DD/YYYY":"/","YYYY-MM-DD":"-","DD.MM.YYYY":"."},Gi={"DD/MM/YYYY":["day","month","year"],"MM/DD/YYYY":["month","day","year"],"YYYY-MM-DD":["year","month","day"],"DD.MM.YYYY":["day","month","year"]},Fi=(e,t)=>String(e).padStart(t,"0"),Yo=(e,t)=>{let r=Fi(e.getDate(),2),a=Fi(e.getMonth()+1,2),n=Fi(e.getFullYear(),4),o=Uo[t],s=Gi[t],l={day:r,month:a,year:n};return s.map(c=>l[c]).join(o)},sf=(e,t)=>{let r=Uo[t],a=e.split(r);if(a.length!==3)return null;let n=Gi[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},zw=e=>e.toLowerCase(),Bw=e=>{let t=Uo[e];return Gi[e].map(a=>a==="year"?"####":"##").join(t)},lf=K__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]=K__namespace.useState(a??null),[x,g]=K__namespace.useState(""),[v,w]=K__namespace.useState(null),R=K__namespace.useRef(null),h=r!==void 0?r:p;K__namespace.useImperativeHandle(f,()=>R.current),K__namespace.useEffect(()=>{h?(g(Yo(h,o)),w(null)):g("");},[h,o]);let C=Uo[o],y=Bw(o),T=N=>{let P=N.target.value;P=P.replace(new RegExp(`[^0-9\\${C}]`,"g"),"");let L=P.replace(new RegExp(`\\${C}`,"g"),""),E="",H=0;for(let S=0;S<y.length&&H<L.length;S++)y[S]==="#"?(E+=L[H],H++):E+=y[S];if(g(E),E.length===y.length){let S=sf(E,o);if(S){if(s&&S<s){w(`Date must be after ${Yo(s,o)}`);return}if(l&&S>l){w(`Date must be before ${Yo(l,o)}`);return}w(null),r===void 0&&b(S),n?.(S);}else w("Invalid date");}else r===void 0&&b(null),n?.(null),w(null);},M=()=>{x&&x.length!==y.length&&(g(""),w(null),r===void 0&&b(null),n?.(null));},k=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:R,type:"text",inputMode:"numeric",value:x,onChange:T,onBlur:M,disabled:d,placeholder:m??zw(o),className:i(of({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(k,"text-muted-foreground")})}),v&&jsxRuntime.jsx("p",{id:"date-error",className:"mt-1 text-xs text-danger",children:v})]})});lf.displayName="DateInput";var df=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"}}),uf=[{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:"(###) ###-####"}],Xo=(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},$w=e=>e.replace(/#/g,"_"),mf=K__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,country:o,defaultCountry:s="TR",onCountryChange:l,countries:c=uf,showCountrySelect:d=true,showDialCode:m=false,disabled:u,placeholder:f,...p},b)=>{let[x,g]=K__namespace.useState(a),[v,w]=K__namespace.useState(o??s),[R,h]=K__namespace.useState(false),[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(false),[k,N]=K__namespace.useState({top:0,left:0,width:0}),P=K__namespace.useRef(null),L=K__namespace.useRef(null),E=r!==void 0?r:x,H=o??v,S=c.find(V=>V.code===H)??c[0],D=Xo(E,S.format);K__namespace.useEffect(()=>{M(true);},[]),K__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]),K__namespace.useEffect(()=>{if(!C)return;let V=B=>{P.current&&!P.current.contains(B.target)&&L.current&&!L.current.contains(B.target)&&y(false);};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]),K__namespace.useEffect(()=>{if(!C)return;let V=B=>{B.key==="Escape"&&y(false);};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[C]);let I=V=>{let A=V.target.value.replace(/\D/g,"");r===void 0&&g(A);let W=Xo(A,S.format),q=`${S.dialCode} ${W}`;n?.(A,q,S);},z=V=>{let B=c.find(q=>q.code===V);if(!B)return;o===void 0&&w(V),l?.(B);let A=Xo(E,B.format),W=`${B.dialCode} ${A}`;n?.(E,W,B),y(false);};return jsxRuntime.jsxs("div",{className:"flex",children:[d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{ref:P,type:"button",disabled:u,onClick:()=>y(!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")})]}),T&&C&&Po__namespace.createPortal(jsxRuntime.jsx("div",{ref:L,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:k.top,left:k.left,minWidth:k.width},children:jsxRuntime.jsx(ke,{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??$w(S.format),className:i(df({size:t}),d&&"rounded-l-none",m&&!d&&"pl-12",e),style:{borderColor:R?"var(--color-foreground)":void 0},...p})]})]})});mf.displayName="PhoneInput";var ff=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}}),gf=K__namespace.forwardRef(({className:e,variant:t,size:r,sticky:a,brand:n,children:o,mobileBreakpoint:s="md",...l},c)=>{let[d,m]=K__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(ff({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})]})});gf.displayName="Navbar";var bf=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex items-center gap-2 font-semibold text-lg",e),...t}));bf.displayName="NavbarBrand";var vf=K__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})});vf.displayName="NavbarContent";var hf=K__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}));hf.displayName="NavbarItem";var xf=K__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}));xf.displayName="NavbarLink";var Rf=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"}}),wf=K__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(Rf({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"})]})});wf.displayName="Link";var Cf=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"}}),Nf=K__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]=K__namespace.useState(false);K__namespace.useEffect(()=>{let w=d?.current||window,R=()=>{let C=(d?.current?d.current.scrollTop:window.scrollY||document.documentElement.scrollTop)>r;C!==b&&(x(C),m?.(C));};return w.addEventListener("scroll",R,{passive:true}),R(),()=>{w.removeEventListener("scroll",R);}},[r,d,b,m]);let g=w=>{d?.current?d.current.scrollTo({top:0,behavior:n}):window.scrollTo({top:0,behavior:n}),u?.(w);},v=l==="sm"?"h-4 w-4":l==="lg"?"h-6 w-6":"h-5 w-5";return jsxRuntime.jsx("div",{className:i(Cf({position:t}),b?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 translate-y-4 pointer-events-none",e),children:jsxRuntime.jsx(X,{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})})})});Nf.displayName="BackTop";var Mf=K__namespace.createContext(null),Tf=()=>{let e=K__namespace.useContext(Mf);if(!e)throw new Error("Menubar components must be used within a Menubar");return e},Pf=K__namespace.createContext(null),In=()=>{let e=K__namespace.useContext(Pf);if(!e)throw new Error("Menu components must be used within a MenubarMenu");return e},$i=K__namespace.createContext(null),kf=K__namespace.createContext(null),Lf=K__namespace.forwardRef(({className:e,children:t,...r},a)=>{let[n,o]=K__namespace.useState(null);return jsxRuntime.jsx(Mf.Provider,{value:{activeMenu:n,setActiveMenu:o},children:jsxRuntime.jsx("div",{ref:a,role:"menubar",className:i("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",e),...r,children:t})})});Lf.displayName="Menubar";var Ef=({children:e})=>{let{activeMenu:t,setActiveMenu:r}=Tf(),a=K__namespace.useId(),n=K__namespace.useRef(null),o=t===a,s=K__namespace.useCallback(l=>{r(l?a:null);},[a,r]);return jsxRuntime.jsx(Pf.Provider,{value:{menuId:a,triggerRef:n,open:o,onOpenChange:s},children:e})};Ef.displayName="MenubarMenu";var Df=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,role:"group",className:e,...t}));Df.displayName="MenubarGroup";var Sf=({children:e,container:t})=>{let[r,a]=K__namespace.useState(false);return K__namespace.useEffect(()=>{a(true);},[]),r?Po__namespace.createPortal(e,t||document.body):null};Sf.displayName="MenubarPortal";var Hf=({children:e,open:t,defaultOpen:r=false,onOpenChange:a})=>{let[n,o]=K__namespace.useState(r),s=t!==void 0,l=s?t:n,c=K__namespace.useRef(null),d=K__namespace.useCallback(m=>{s||o(m),a?.(m);},[s,a]);return jsxRuntime.jsx($i.Provider,{value:{open:l,onOpenChange:d,triggerRef:c},children:e})};Hf.displayName="MenubarSub";var Vf=K__namespace.forwardRef(({value:e="",onValueChange:t,className:r,...a},n)=>jsxRuntime.jsx(kf.Provider,{value:{value:e,onValueChange:t||(()=>{})},children:jsxRuntime.jsx("div",{ref:n,role:"group",className:r,...a})}));Vf.displayName="MenubarRadioGroup";var If=K__namespace.forwardRef(({className:e,onClick:t,onMouseEnter:r,...a},n)=>{let{activeMenu:o,setActiveMenu:s}=Tf(),{menuId:l,triggerRef:c,open:d,onOpenChange:m}=In(),u=p=>{t?.(p),m(!d);},f=p=>{r?.(p),o&&o!==l&&s(l);};return jsxRuntime.jsx("button",{ref:p=>{c.current=p,typeof n=="function"?n(p):n&&(n.current=p);},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":d,"data-state":d?"open":"closed",className:i("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e),onClick:u,onMouseEnter:f,...a})});If.displayName="MenubarTrigger";var Af=K__namespace.forwardRef(({className:e,inset:t,children:r,onMouseEnter:a,onMouseLeave:n,...o},s)=>{let l=K__namespace.useContext($i);if(!l)throw new Error("MenubarSubTrigger must be used within MenubarSub");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-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),onMouseEnter:u,onMouseLeave:f,...o,children:[r,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"ml-auto h-4 w-4"})]})});Af.displayName="MenubarSubTrigger";var zf=K__namespace.forwardRef(({className:e,sideOffset:t=2,onMouseEnter:r,onMouseLeave:a,...n},o)=>{let s=K__namespace.useContext($i);if(!s)throw new Error("MenubarSubContent must be used within MenubarSub");let{open:l,onOpenChange:c,triggerRef:d}=s,[m,u]=K__namespace.useState({top:0,left:0}),[f,p]=K__namespace.useState(false),b=K__namespace.useRef(null);K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>{if(!l||!d.current||!b.current)return;(()=>{if(!d.current||!b.current)return;let w=d.current.getBoundingClientRect(),R=b.current.getBoundingClientRect(),h=w.top,C=w.right+t;C+R.width>window.innerWidth&&(C=w.left-R.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:Po__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 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:m.top,left:m.left},onMouseEnter:x,onMouseLeave:g,...n}),document.body)});zf.displayName="MenubarSubContent";var Bf=K__namespace.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:a=8,children:n,...o},s)=>{let{triggerRef:l,open:c,onOpenChange:d}=In(),[m,u]=K__namespace.useState({top:0,left:0}),[f,p]=K__namespace.useState(false),b=K__namespace.useRef(null);return K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>{if(!c||!l.current||!b.current)return;let x=()=>{if(!l.current||!b.current)return;let g=l.current.getBoundingClientRect(),v=b.current.getBoundingClientRect(),w=g.bottom+a,R=g.left+r;t==="center"?R=g.left+g.width/2-v.width/2:t==="end"&&(R=g.right-v.width-r),u({top:w,left:R});};return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,true),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,true);}},[c,t,r,a,l]),K__namespace.useEffect(()=>{if(!c)return;let x=g=>{let v=g.target;b.current&&!b.current.contains(v)&&l.current&&!l.current.contains(v)&&d(false);};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[c,d,l]),K__namespace.useEffect(()=>{if(!c)return;let x=g=>{g.key==="Escape"&&d(false);};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[c,d]),!f||!c?null:Po__namespace.createPortal(jsxRuntime.jsx("div",{ref:x=>{b.current=x,typeof s=="function"?s(x):s&&(s.current=x);},role:"menu","data-state":c?"open":"closed",className:i("fixed z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:m.top,left:m.left},...o,children:n}),document.body)});Bf.displayName="MenubarContent";var Of=K__namespace.forwardRef(({className:e,inset:t,disabled:r,onSelect:a,onClick:n,...o},s)=>{let{onOpenChange:l}=In(),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-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",!r&&"cursor-pointer",e),onClick:c,...o})});Of.displayName="MenubarItem";var Ff=K__namespace.forwardRef(({className:e,children:t,checked:r=false,onCheckedChange:a,disabled:n,onClick:o,...s},l)=>{let{onOpenChange:c}=In(),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-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!n&&"cursor-pointer",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]})});Ff.displayName="MenubarCheckboxItem";var Gf=K__namespace.forwardRef(({className:e,children:t,value:r,disabled:a,onClick:n,...o},s)=>{let{onOpenChange:l}=In(),c=K__namespace.useContext(kf),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-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",!a&&"cursor-pointer",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-2 w-2 fill-current"})}),t]})});Gf.displayName="MenubarRadioItem";var Kf=K__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}));Kf.displayName="MenubarLabel";var $f=K__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}));$f.displayName="MenubarSeparator";var _f=({className:e,...t})=>jsxRuntime.jsx("span",{className:i("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});_f.displayName="MenubarShortcut";var Wf=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"}}),jf=K__namespace.forwardRef(({className:e,orientation:t,size:r,currentStep:a=0,children:n,...o},s)=>{let l=K__namespace.Children.toArray(n);return jsxRuntime.jsx("div",{ref:s,className:i(Wf({orientation:t,size:r,className:e})),...o,children:l.map((c,d)=>K__namespace.isValidElement(c)?K__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)})});jf.displayName="Steps";var Yf=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"}}),nC=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"}}),oC=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"}}),Uf=K__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(Yf({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(nC({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(oC({orientation:t,status:s==="completed"?"completed":"upcoming"}),t==="vertical"&&"my-2")})]}));Uf.displayName="Step";function uC({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,...w},R){let[h,C]=K__namespace.useState(new Set),[y,T]=K__namespace.useState({columnId:null,direction:null}),[M,k]=K__namespace.useState({pageIndex:0,pageSize:u[0]||10}),N=n??h,P=c??y,L=f??M,E=F=>{o?o(F):C(F);},H=F=>{d?d(F):T(F);},S=F=>{p?p(F):k(F);},D=K__namespace.useMemo(()=>{if(!P.columnId||!P.direction)return t;let F=r.find($=>$.id===P.columnId);return F?[...t].sort(($,ae)=>{let O=F.accessor($),ee=F.accessor(ae);if(O===ee)return 0;if(O==null)return 1;if(ee==null)return -1;let Q=String(O).localeCompare(String(ee),void 0,{numeric:true});return P.direction==="asc"?Q:-Q}):t},[t,P,r]),I=K__namespace.useMemo(()=>{if(!m)return D;let F=L.pageIndex*L.pageSize;return D.slice(F,F+L.pageSize)},[D,m,L]),z=Math.ceil(D.length/L.pageSize),G=F=>{if(F===true){let $=new Set(I.map((ae,O)=>s(ae,O)));E($);}else E(new Set);},V=(F,$)=>{let ae=new Set(N);$?ae.add(F):ae.delete(F),E(ae);},B=I.length>0&&I.every((F,$)=>N.has(s(F,$))),A=I.some((F,$)=>N.has(s(F,$))),W=F=>{if(!r.find(O=>O.id===F)?.sortable&&!l)return;let ae="asc";P.columnId===F&&(P.direction==="asc"?ae="desc":P.direction==="desc"&&(ae=null)),H({columnId:ae?F:null,direction:ae});},q=F=>P.columnId!==F?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:R,className:i("w-full",e),...w,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(Cn,{checked:B?true:A?"indeterminate":false,onCheckedChange:G,"aria-label":"Select all"})}),r.map(F=>{let $=F.sortable??l;return jsxRuntime.jsx("th",{className:i("h-12 px-4 text-left align-middle font-medium text-muted-foreground",$&&"cursor-pointer select-none hover:text-foreground"),style:{width:F.width},onClick:()=>$&&W(F.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[F.header,$&&q(F.id)]})},F.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((F,$)=>{let ae=s(F,$),O=N.has(ae);return jsxRuntime.jsxs("tr",{className:i("border-b transition-colors",v&&"hover:bg-muted/50",g&&$%2===1&&"bg-muted/30",O&&"bg-muted"),"data-state":O?"selected":void 0,children:[a&&jsxRuntime.jsx("td",{className:"w-12 px-4",children:jsxRuntime.jsx(Cn,{checked:O,onCheckedChange:ee=>V(ae,!!ee),"aria-label":`Select row ${$+1}`})}),r.map(ee=>jsxRuntime.jsx("td",{className:"p-4 align-middle",children:ee.cell?ee.cell(F,$):ee.accessor(F)},ee.id))]},ae)})})]})}),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:L.pageSize,onChange:F=>S({pageIndex:0,pageSize:Number(F.target.value)}),className:"h-8 rounded-md border bg-transparent px-2",children:u.map(F=>jsxRuntime.jsx("option",{value:F,children:F},F))})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"text-sm text-muted-foreground",children:["Page ",L.pageIndex+1," of ",z||1]}),jsxRuntime.jsxs("div",{className:"flex gap-1",children:[jsxRuntime.jsx(X,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...L,pageIndex:L.pageIndex-1}),disabled:L.pageIndex===0,"aria-label":"Previous page",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(X,{variant:"light",size:"icon",className:"h-8 w-8",onClick:()=>S({...L,pageIndex:L.pageIndex+1}),disabled:L.pageIndex>=z-1,"aria-label":"Next page",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})})]})]})]})]})}var mC=K__namespace.forwardRef(uC);var qf=classVarianceAuthority.cva("",{variants:{size:{sm:"[--tree-indent:12px] [--tree-item-height:28px] text-xs",md:"[--tree-indent:16px] [--tree-item-height:32px] text-sm",lg:"[--tree-indent:20px] [--tree-item-height:40px] text-base"}},defaultVariants:{size:"md"}}),Zf=K__namespace.forwardRef(({className:e,size:t,data:r,defaultExpandedIds:a=[],expandedIds:n,onExpandedChange:o,selectedId:s,onSelect:l,showIcons:c=true,leafIcon:d=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:m=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:u=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),defaultExpandAll:f=false,...p},b)=>{let x=K__namespace.useCallback(y=>y.reduce((T,M)=>M.children?.length?[...T,M.id,...x(M.children)]:T,[]),[]),[g,v]=K__namespace.useState(()=>f?x(r):a),w=n??g,R=y=>{o?o(y):v(y);},h=y=>{w.includes(y)?R(w.filter(T=>T!==y)):R([...w,y]);},C=(y,T=0)=>{let M=y.children&&y.children.length>0,k=w.includes(y.id),N=s===y.id,P=()=>{y.disabled||l?.(y);},L=H=>{H.stopPropagation(),M&&h(y.id);},E=()=>y.icon?y.icon:M?k?u:m:d;return jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":M?k:void 0,children:[jsxRuntime.jsxs("div",{className:i("flex items-center gap-1 rounded-md px-2 cursor-pointer transition-colors","h-[var(--tree-item-height)]","hover:bg-muted/50",N&&"bg-primary/10 text-primary",y.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`calc(${T} * var(--tree-indent) + 8px)`},onClick:P,children:[jsxRuntime.jsx("button",{type:"button",className:i("flex h-5 w-5 items-center justify-center rounded hover:bg-muted",!M&&"invisible"),onClick:L,tabIndex:-1,"aria-label":k?"Collapse":"Expand",children:k?jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),c&&jsxRuntime.jsx("span",{className:"flex-shrink-0 text-muted-foreground",children:E()}),jsxRuntime.jsx("span",{className:"truncate",children:y.name})]}),M&&k&&jsxRuntime.jsx("div",{role:"group",children:y.children.map(H=>C(H,T+1))})]},y.id)};return jsxRuntime.jsx("div",{ref:b,role:"tree",className:i(qf({size:t,className:e})),...p,children:r.map(y=>C(y))})});Zf.displayName="TreeView";var Qf=classVarianceAuthority.cva("flex rounded-md border border-input bg-background text-sm 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"},fullWidth:{true:"w-full",false:"w-fit min-w-48"}},defaultVariants:{size:"md",fullWidth:false}}),CC=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let r=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),a=e.split(r);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a.map((n,o)=>r.test(n)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:n},o):jsxRuntime.jsx("span",{children:n},o))})},NC=(e,t)=>{let[r,a]=K__namespace.useState(e);return K__namespace.useEffect(()=>{let n=setTimeout(()=>{a(e);},t);return ()=>{clearTimeout(n);}},[e,t]),r},eg=K__namespace.forwardRef(({className:e,size:t,value:r,defaultValue:a="",onChange:n,onSelect:o,options:s=[],loadOptions:l,debounceMs:c=300,minChars:d=0,placeholder:m="Type to search...",emptyText:u="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:b=true,maxHeight:x=200,highlightMatch:g=true,fullWidth:v=false,disabled:w,...R},h)=>{let[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(a),[k,N]=K__namespace.useState([]),[P,L]=K__namespace.useState(false),[E,H]=K__namespace.useState(false),S=K__namespace.useRef(null),D=r!==void 0?r:T,I=NC(D,c);K__namespace.useImperativeHandle(h,()=>S.current);let z=l?k:s,G=K__namespace.useMemo(()=>l?z:z.filter(Q=>Q.label.toLowerCase().includes(D.toLowerCase())),[z,D,l]);K__namespace.useEffect(()=>{if(!l)return;if(I.length<d){N([]);return}let Q=false;return (async()=>{L(true);try{let Ye=await l(I);Q||N(Ye);}catch{Q||N([]);}finally{Q||L(false);}})(),()=>{Q=true;}},[I,l,d]);let V=Q=>{r===void 0&&M(Q),n?.(Q);},B=Q=>{let st=Q.target.value;V(st),st.length>=d&&y(true);},A=Q=>{V(Q.label),o?.(Q),y(false);},W=()=>{V(""),S.current?.focus();},q=()=>{H(true),D.length>=d&&(G.length>0||P)&&y(true);},F=()=>{H(false);},$=Q=>{Q.key==="Escape"&&y(false),Q.key==="ArrowDown"&&!C&&G.length>0&&y(true);},ae=C&&D.length>=d,O=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",ee=p&&D?"pr-8":"pr-3";return jsxRuntime.jsxs(Ie,{open:ae,onOpenChange:y,children:[jsxRuntime.jsx(wo,{asChild:true,children:jsxRuntime.jsxs("div",{className:i("relative",v?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:S,type:"text",value:D,onChange:B,onFocus:q,onBlur:F,onKeyDown:$,disabled:w,placeholder:m,className:i(Qf({size:t,fullWidth:v}),ee,e),style:{borderColor:E?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":ae,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...R}),p&&D&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:W,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground","aria-label":"Clear",children:jsxRuntime.jsx(lucideReact.X,{className:O})})]})}),jsxRuntime.jsx(Ae,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:Q=>Q.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"overflow-y-auto p-1",style:{maxHeight:x},children:P?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:i(O,"animate-spin")}),f]}):G.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:u}):G.map(Q=>jsxRuntime.jsxs(cmdk.Command.Item,{value:Q.value,disabled:Q.disabled,onSelect:()=>A(Q),className:i("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground"),children:[jsxRuntime.jsx(lucideReact.Check,{className:i("mr-2 h-4 w-4 shrink-0",D===Q.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:g?jsxRuntime.jsx(CC,{text:Q.label,query:D}):Q.label})]},Q.value))})})})]})});eg.displayName="Autocomplete";var Yi=K__namespace.createContext(null),Ui=K__namespace.createContext(null),Xi=()=>{let e=K__namespace.useContext(Yi);if(!e)throw new Error("useFormContext must be used within a Form");return e},Qo=()=>{let e=K__namespace.useContext(Ui);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},MC={required:(e="This field is required")=>({validate:t=>typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:t!=null,message:e}),minLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:r=>typeof r=="string"&&r.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:r=>typeof r=="number"&&r>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:r=>typeof r=="number"&&r<=e,message:t??`Must be at most ${e}`}),email:(e="Invalid email address")=>({validate:t=>typeof t=="string"&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),message:e}),pattern:(e,t="Invalid format")=>({validate:r=>typeof r=="string"&&e.test(r),message:t}),custom:(e,t)=>({validate:e,message:t})},tg=K__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:r,validateOnBlur:a=true,validateOnChange:n=false,children:o,className:s,...l},c)=>{let[d,m]=K__namespace.useState(e),[u,f]=K__namespace.useState({}),[p,b]=K__namespace.useState({}),[x,g]=K__namespace.useState({}),[v,w]=K__namespace.useState(false),R=K__namespace.useRef(new Map),h=K__namespace.useCallback((S,D)=>{R.current.set(S,D);},[]),C=K__namespace.useCallback(S=>{R.current.delete(S);},[]),y=K__namespace.useCallback(S=>{let D=R.current.get(S)||[],I=d[S];for(let z of D)if(!z.validate(I))return f(G=>({...G,[S]:z.message})),false;return f(z=>({...z,[S]:null})),true},[d]),T=K__namespace.useCallback(()=>{let S=true,D={};return R.current.forEach((I,z)=>{let G=d[z];for(let V of I)if(!V.validate(G)){D[z]=V.message,S=false;break}D[z]||(D[z]=null);}),f(D),S},[d]),M=K__namespace.useCallback((S,D)=>{m(I=>({...I,[S]:D})),g(I=>({...I,[S]:true})),n&&setTimeout(()=>{y(S);},0);},[n,y]),k=K__namespace.useCallback((S,D)=>{f(I=>({...I,[S]:D}));},[]),N=K__namespace.useCallback((S,D)=>{b(I=>({...I,[S]:D})),D&&a&&y(S);},[a,y]),P=K__namespace.useCallback(S=>({value:d[S],error:u[S]??null,touched:p[S]??false,dirty:x[S]??false}),[d,u,p,x]),L=K__namespace.useCallback(()=>{m(e),f({}),b({}),g({});},[e]),E=async S=>{S.preventDefault();let D={};if(R.current.forEach((z,G)=>{D[G]=true;}),b(D),!T()){r?.(u);return}if(t){w(true);try{await t(d);}finally{w(false);}}},H={values:d,errors:u,touched:p,dirty:x,isSubmitting:v,setValue:M,setError:k,setTouched:N,validateField:y,validateAll:T,registerField:h,unregisterField:C,getFieldState:P,reset:L};return jsxRuntime.jsx(Yi.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:c,onSubmit:E,className:i("space-y-4",s),...l,children:o})})});tg.displayName="Form";var rg=({name:e,rules:t=[],defaultValue:r,children:a})=>{let n=Xi(),o=K__namespace.useId();K__namespace.useEffect(()=>(n.registerField(e,t),r!==void 0&&n.values[e]===void 0&&n.setValue(e,r),()=>{n.unregisterField(e);}),[e,t,r,n]);let s=n.getFieldState(e),l={name:e,id:`${o}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(Ui.Provider,{value:l,children:a})};rg.displayName="FormField";var ag=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("space-y-1.5",e),...t}));ag.displayName="FormItem";var ng=K__namespace.forwardRef(({className:e,required:t,children:r,...a},n)=>{let{id:o,error:s,touched:l}=Qo();return jsxRuntime.jsxs(ca,{ref:n,htmlFor:o,className:i(s&&l&&"text-danger",e),...a,children:[r,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});ng.displayName="FormLabel";var og=({children:e})=>{let{name:t,id:r,error:a,touched:n}=Qo(),o=Xi(),s=o.getFieldState(t),l=d=>{let m=d.target,u=m.type==="checkbox"?m.checked:m.value;o.setValue(t,u);},c=()=>{o.setTouched(t,true);};return K__namespace.cloneElement(e,{id:r,name:t,value:s.value??"",onChange:l,onBlur:c,"aria-invalid":a&&n?"true":void 0,"aria-describedby":a&&n?`${r}-error`:void 0})};og.displayName="FormControl";var sg=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("p",{ref:r,className:i("text-xs text-muted-foreground",e),...t}));sg.displayName="FormDescription";var ig=K__namespace.forwardRef(({className:e,message:t,...r},a)=>{let{id:n,error:o,touched:s}=Qo(),l=t??(s?o:null);return l?jsxRuntime.jsx("p",{ref:a,id:`${n}-error`,className:i("text-xs text-danger",e),role:"alert",...r,children:l}):null});ig.displayName="FormMessage";var cg=classVarianceAuthority.cva("inline-flex items-center gap-3",{variants:{size:{sm:"[&_[data-user-avatar]]:h-8 [&_[data-user-avatar]]:w-8",md:"[&_[data-user-avatar]]:h-10 [&_[data-user-avatar]]:w-10",lg:"[&_[data-user-avatar]]:h-12 [&_[data-user-avatar]]:w-12"}},defaultVariants:{size:"md"}}),dg=K__namespace.forwardRef(({className:e,size:t,name:r,description:a,avatarUrl:n,avatarFallback:o,trailing:s,...l},c)=>{let d=o||r.split(" ").map(m=>m[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:c,className:i(cg({size:t,className:e})),...l,children:[jsxRuntime.jsxs(da,{"data-user-avatar":true,children:[n&&jsxRuntime.jsx(Ga,{src:n,alt:r}),jsxRuntime.jsx(ua,{children:d})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:r}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:a})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});dg.displayName="User";var mg=classVarianceAuthority.cva("font-mono rounded",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-transparent",ghost:"bg-transparent",soft:"bg-muted text-foreground",surface:"bg-muted/50 text-foreground border border-border"},size:{sm:"px-1 py-0.5 text-xs",md:"px-1.5 py-0.5 text-sm",lg:"px-2 py-1 text-base"}},defaultVariants:{variant:"soft",size:"md"}}),pg=K__namespace.forwardRef(({className:e,variant:t,size:r,...a},n)=>jsxRuntime.jsx("code",{ref:n,className:i(mg({variant:t,size:r,className:e})),...a}));pg.displayName="Code";var fg=classVarianceAuthority.cva("relative flex items-center gap-2 font-mono rounded-lg border",{variants:{variant:{solid:"bg-primary text-primary-foreground border-primary",outline:"bg-transparent border-input",ghost:"bg-transparent border-transparent",soft:"bg-muted border-muted",surface:"bg-muted/50 border-border"},size:{sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-5 py-3 text-base"}},defaultVariants:{variant:"surface",size:"md"}}),gg=K__namespace.forwardRef(({className:e,variant:t,size:r,code:a,copyable:n=true,copyLabel:o="Copy",onCopy:s,symbol:l="$",hideSymbol:c=false,...d},m)=>{let[u,f]=K__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(a),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(b){console.error("Failed to copy:",b);}};return jsxRuntime.jsxs("div",{ref:m,className:i(fg({variant:t,size:r,className:e})),...d,children:[!c&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:l}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:a}),n&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:i("flex-shrink-0 rounded p-1 transition-colors","hover:bg-black/10 dark:hover:bg-white/10","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":u?"Copied":o,children:u?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});gg.displayName="Snippet";var Ji=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),bg=K__namespace.forwardRef(({className:e,radius:t,src:r,alt:a,fallback:n,showSkeleton:o=true,onLoad:s,onError:l,fit:c="cover",aspectRatio:d,style:m,...u},f)=>{let[p,b]=K__namespace.useState("loading");K__namespace.useEffect(()=>{r&&b("loading");},[r]);let x=()=>{b("loaded"),s?.();},g=()=>{b("error"),l?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[c];return p==="error"&&n?jsxRuntime.jsx("div",{className:i(Ji({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:d,...m},children:n}):jsxRuntime.jsxs("div",{className:i(Ji({radius:t}),"relative",e),style:{aspectRatio:d,...m},children:[p==="loading"&&o&&jsxRuntime.jsx(vo,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:r,alt:a,onLoad:x,onError:g,className:i("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...u})]})});bg.displayName="Image";var xg=classVarianceAuthority.cva("flex flex-col rounded-lg border bg-background",{variants:{size:{sm:"p-1 gap-0.5",md:"p-1.5 gap-1",lg:"p-2 gap-1.5"}},defaultVariants:{size:"md"}}),yg=classVarianceAuthority.cva("relative flex cursor-pointer select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{size:"md"}}),Rg=K__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),wg=K__namespace.forwardRef(({className:e,size:t="md",value:r,defaultValue:a="",onValueChange:n,multiple:o=false,children:s,...l},c)=>{let[d,m]=K__namespace.useState(a),u=r??d,f=p=>{let b;if(o){let x=Array.isArray(u)?u:[u].filter(Boolean);x.includes(p)?b=x.filter(g=>g!==p):b=[...x,p];}else b=p;n?n(b):m(b);};return jsxRuntime.jsx(Rg.Provider,{value:{value:u,onValueChange:f,multiple:o,size:t??"md"},children:jsxRuntime.jsx("div",{ref:c,role:"listbox","aria-multiselectable":o,className:i(xg({size:t,className:e})),...l,children:s})})});wg.displayName="Listbox";var Cg=K__namespace.forwardRef(({className:e,value:t,disabled:r,icon:a,description:n,children:o,...s},l)=>{let{value:c,onValueChange:d,multiple:m,size:u}=K__namespace.useContext(Rg),f=m?Array.isArray(c)&&c.includes(t):c===t,p=()=>{r||d(t);},b=x=>{(x.key==="Enter"||x.key===" ")&&!r&&(x.preventDefault(),d(t));};return jsxRuntime.jsxs("div",{ref:l,role:"option","aria-selected":f,"data-disabled":r?"":void 0,tabIndex:r?-1:0,className:i(yg({size:u}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:b,...s,children:[a&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:a}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:o}),n&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});Cg.displayName="ListboxItem";var Mg=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-2",bordered:"divide-y divide-border rounded-lg border",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Tg=classVarianceAuthority.cva("flex items-center gap-3 bg-background transition-all",{variants:{variant:{default:"rounded-lg border p-3",bordered:"p-3",cards:"rounded-lg border p-3 shadow-sm"},size:{sm:"p-2 text-sm",md:"p-3 text-sm",lg:"p-4 text-base"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg z-10",false:""},isDragOver:{true:"border-primary border-dashed",false:""}},defaultVariants:{variant:"default",size:"md",isDragging:false,isDragOver:false}});function BC({className:e,variant:t,size:r,items:a,onReorder:n,renderItem:o,showHandle:s=true,disabled:l=false,...c},d){let[m,u]=K__namespace.useState(null),[f,p]=K__namespace.useState(null),b=(R,h)=>{l||(u(h),R.dataTransfer.effectAllowed="move",R.dataTransfer.setData("text/plain",String(h)));},x=(R,h)=>{R.preventDefault(),!(l||m===null||m===h)&&p(h);},g=()=>{p(null);},v=(R,h)=>{if(R.preventDefault(),l||m===null||m===h){u(null),p(null);return}let C=[...a],[y]=C.splice(m,1);C.splice(h,0,y),n?.(C),u(null),p(null);},w=()=>{u(null),p(null);};return jsxRuntime.jsx("div",{ref:d,className:i(Mg({variant:t,size:r,className:e})),...c,children:a.map((R,h)=>jsxRuntime.jsxs("div",{draggable:!l,onDragStart:C=>b(C,h),onDragOver:C=>x(C,h),onDragLeave:g,onDrop:C=>v(C,h),onDragEnd:w,className:i(Tg({variant:t,size:r,isDragging:m===h,isDragOver:f===h}),!l&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:i("flex-shrink-0 text-muted-foreground",l?"opacity-30":"cursor-grab active:cursor-grabbing"),children:jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-5 w-5"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:o(R,h)})]},R.id))})}var OC=K__namespace.forwardRef(BC);var Lg=classVarianceAuthority.cva("absolute inset-0 z-50 flex items-center justify-center transition-opacity",{variants:{variant:{solid:"bg-background",soft:"bg-background/80 backdrop-blur-sm",ghost:"bg-background/50"},visible:{true:"opacity-100 pointer-events-auto",false:"opacity-0 pointer-events-none"}},defaultVariants:{variant:"soft",visible:true}}),$C={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Eg=K__namespace.forwardRef(({className:e,variant:t,loading:r=true,size:a="md",spinner:n,text:o,children:s,...l},c)=>jsxRuntime.jsxs("div",{ref:c,className:i("relative",e),...l,children:[s,jsxRuntime.jsx("div",{className:i(Lg({variant:t,visible:r})),"aria-hidden":!r,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n||jsxRuntime.jsx(lucideReact.Loader2,{className:i($C[a],"animate-spin text-primary")}),o&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:o})]})})]}));Eg.displayName="LoadingOverlay";var Dg=classVarianceAuthority.cva("fixed top-0 left-0 z-[9999] h-0.5 transition-all duration-200 ease-out",{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"}},defaultVariants:{color:"primary"}}),Sg=K__namespace.forwardRef(({className:e,color:t,isLoading:r=false,progress:a,showSpinner:n=false,...o},s)=>{let[l,c]=K__namespace.useState(0),[d,m]=K__namespace.useState(false),u=K__namespace.useRef(null);return K__namespace.useEffect(()=>{if(a!==void 0){c(a),m(a>0&&a<100);return}return r?(m(true),c(10),u.current=setInterval(()=>{c(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):l>0&&(c(100),setTimeout(()=>{m(false),c(0);},200)),()=>{u.current&&clearInterval(u.current);}},[r,a]),!d&&a===void 0||a!==void 0&&(a<=0||a>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:i(Dg({color:t,className:e})),style:{width:`${l}%`},role:"progressbar","aria-valuenow":l,"aria-valuemin":0,"aria-valuemax":100,...o,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),n&&d&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:i("h-4 w-4 animate-spin rounded-full border-2 border-transparent",t==="primary"&&"border-t-primary",t==="secondary"&&"border-t-secondary",t==="success"&&"border-t-success",t==="warning"&&"border-t-warning",t==="danger"&&"border-t-danger",t==="info"&&"border-t-info")})})]})});Sg.displayName="NProgress";var Ag=classVarianceAuthority.cva("flex items-center justify-center",{variants:{variant:{spinner:"",dots:"",pulse:"",skeleton:""},size:{sm:"gap-1",md:"gap-2",lg:"gap-3"},fullScreen:{true:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",false:""}},defaultVariants:{variant:"spinner",size:"md",fullScreen:false}}),Hg={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},XC={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},zg=K__namespace.forwardRef(({className:e,variant:t="spinner",size:r="md",fullScreen:a,text:n,color:o="primary",...s},l)=>{let c={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[o],d=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(m=>jsxRuntime.jsx("div",{className:i(XC[r||"md"],"animate-bounce rounded-full bg-current",c),style:{animationDelay:`${m*.15}s`}},m))});case "pulse":return jsxRuntime.jsx("div",{className:i(Hg[r||"md"],"animate-pulse rounded-full bg-current",c)});case "skeleton":return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[jsxRuntime.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"})]});default:return jsxRuntime.jsx(lucideReact.Loader2,{className:i(Hg[r||"md"],"animate-spin",c)})}};return jsxRuntime.jsx("div",{ref:l,className:i(Ag({variant:t,size:r,fullScreen:a,className:e})),role:"status","aria-label":n||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[d(),n&&jsxRuntime.jsx("span",{className:i("text-sm",c),children:n})]})})});zg.displayName="Loading";var tl=class extends K__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,r){this.props.onError?.(t,r);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((a,n)=>a!==t.resetKeys?.[n])&&this.reset();}reset=()=>{this.props.onReset?.(),this.setState({hasError:false,error:null});};render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsx(rl,{error:this.state.error,onReset:this.reset}):this.props.children}},rl=K__namespace.forwardRef(({error:e,onReset:t,className:r},a)=>jsxRuntime.jsxs("div",{ref:a,className:i("flex min-h-[200px] flex-col items-center justify-center gap-4 rounded-lg border border-danger/20 bg-danger/5 p-6 text-center",r),role:"alert",children:[jsxRuntime.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-danger/10",children:jsxRuntime.jsx(lucideReact.AlertTriangle,{className:"h-6 w-6 text-danger"})}),jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Something went wrong"}),e&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:e.message||"An unexpected error occurred"})]}),t&&jsxRuntime.jsxs("button",{onClick:t,className:"inline-flex items-center gap-2 rounded-md bg-danger px-4 py-2 text-sm font-medium text-danger-foreground hover:bg-danger/90 transition-colors",children:[jsxRuntime.jsx(lucideReact.RefreshCw,{className:"h-4 w-4"}),"Try again"]})]}));rl.displayName="DefaultErrorFallback";var JC=tl;var Og=K__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:r,placeholder:a="Pick a date range",dateFormat:n="LLL dd, y",disabled:o=false,minDate:s,maxDate:l,numberOfMonths:c=2,className:d,align:m="start"},u)=>{let[f,p]=K__namespace.useState(false),[b,x]=K__namespace.useState(t),g=e!==void 0,v=g?e:b,w=h=>{g||x(h),r?.(h);},R=h=>{if(!h)return a;let{from:C,to:y}=h;return C&&y?`${dateFns.format(C,n)} - ${dateFns.format(y,n)}`:C?dateFns.format(C,n):a};return jsxRuntime.jsxs(Ie,{open:f,onOpenChange:p,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{ref:u,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",d),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),R(v)]})}),jsxRuntime.jsx(Ae,{className:"w-auto p-0",align:m,children:jsxRuntime.jsx(_a,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:w,numberOfMonths:c,disabled:h=>!!(s&&h<s||l&&h>l),initialFocus:true})})]})});Og.displayName="DateRangePicker";var rn=e=>String(e).padStart(2,"0"),Fg=K__namespace.forwardRef(({value:e,onValueChange:t,placeholder:r="Pick a time",use24Hour:a=true,minuteStep:n=1,disabled:o=false,className:s},l)=>{let[c,d]=K__namespace.useState(false),m=a?Array.from({length:24},(R,h)=>h):Array.from({length:12},(R,h)=>h+1),u=Array.from({length:Math.floor(60/n)},(R,h)=>h*n),f=R=>{if(!R)return r;if(a)return `${rn(R.hours)}:${rn(R.minutes)}`;let h=R.hours%12||12,C=R.hours>=12?"PM":"AM";return `${rn(h)}:${rn(R.minutes)} ${C}`},p=R=>{let h=e?.minutes??0,C=R;if(!a&&e){let y=e.hours>=12;y&&R!==12?C=R+12:!y&&R===12&&(C=0);}t?.({hours:C,minutes:h});},b=R=>{let h=e?.hours??0;t?.({hours:h,minutes:R});},x=R=>{if(!e)return;let h=e.hours;R==="AM"&&e.hours>=12?h=e.hours-12:R==="PM"&&e.hours<12&&(h=e.hours+12),t?.({hours:h,minutes:e.minutes});},g=()=>{let R=new Date;t?.({hours:R.getHours(),minutes:R.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,w=e?a?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(Ie,{open:c,onOpenChange:d,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs(X,{ref:l,variant:"bordered",disabled:o,className:i("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[jsxRuntime.jsx(lucideReact.Clock,{className:"mr-2 h-4 w-4"}),f(e)]})}),jsxRuntime.jsxs(Ae,{className:"w-auto p-0",align:"start",children:[jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Hour"}),jsxRuntime.jsx(ke,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(R=>jsxRuntime.jsx(X,{variant:w===R?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(R),children:rn(R)},R))})})]}),jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"Min"}),jsxRuntime.jsx(ke,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:u.map(R=>jsxRuntime.jsx(X,{variant:e?.minutes===R?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>b(R),children:rn(R)},R))})})]}),!a&&jsxRuntime.jsxs("div",{className:"flex flex-col border-l",children:[jsxRuntime.jsx("div",{className:"border-b px-3 py-2 text-center text-xs font-medium text-muted-foreground",children:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(X,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>x("AM"),children:"AM"}),jsxRuntime.jsx(X,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>x("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(X,{variant:"ghost",size:"sm",onClick:g,children:"Now"}),jsxRuntime.jsx(X,{size:"sm",onClick:()=>d(false),children:"Done"})]})]})]})});Fg.displayName="TimePicker";var Gg=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function rN({className:e,variant:t,items:r,itemHeight:a,height:n,overscan:o=3,renderItem:s,getItemKey:l,gap:c=0,onScrollChange:d,...m},u){let f=K__namespace.useRef(null),[p,b]=K__namespace.useState(0);K__namespace.useImperativeHandle(u,()=>f.current);let x=r.length*(a+c)-c,g=a+c,v=Math.max(0,Math.floor(p/g)-o),w=Math.ceil(n/g)+2*o,R=Math.min(r.length-1,v+w),h=y=>{let T=y.currentTarget.scrollTop;b(T),d?.(T);},C=K__namespace.useMemo(()=>{let y=[];for(let T=v;T<=R;T++)r[T]!==void 0&&y.push({item:r[T],index:T,style:{position:"absolute",top:T*g,left:0,right:0,height:a}});return y},[r,v,R,g,a]);return jsxRuntime.jsx("div",{ref:f,className:i(Gg({variant:t,className:e})),style:{height:n,position:"relative"},onScroll:h,...m,children:jsxRuntime.jsx("div",{style:{height:x,position:"relative"},children:C.map(({item:y,index:T,style:M})=>jsxRuntime.jsx("div",{style:M,children:s(y,T)},l?l(y,T):T))})})}var aN=K__namespace.forwardRef(rN);var $g=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),ol=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),_g=K__namespace.forwardRef(({className:e,variant:t,size:r,children:a,onLoadMore:n,hasMore:o,isLoading:s=false,loader:l,threshold:c=100,rootMargin:d,useWindow:m=false,endMessage:u,...f},p)=>{let b=K__namespace.useRef(null),x=K__namespace.useRef(null),g=K__namespace.useRef(false);K__namespace.useImperativeHandle(p,()=>b.current),K__namespace.useEffect(()=>{let w=x.current;if(!w)return;let R=new IntersectionObserver(h=>{let[C]=h;C.isIntersecting&&o&&!s&&!g.current&&(g.current=true,Promise.resolve(n()).finally(()=>{g.current=false;}));},{root:m?null:b.current,rootMargin:d||`${c}px`,threshold:0});return R.observe(w),()=>{R.disconnect();}},[o,s,n,c,d,m]);let v=jsxRuntime.jsx("div",{className:i(ol({size:r})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:b,className:i($g({variant:t,className:e})),...f,children:[a,jsxRuntime.jsx("div",{ref:x,className:"h-px w-full"}),s&&(l||v),!o&&!s&&u&&jsxRuntime.jsx("div",{className:i(ol({size:r}),"text-muted-foreground text-sm"),children:u})]})});_g.displayName="InfiniteScroll";var Fn=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("span",{ref:r,className:i("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));Fn.displayName="VisuallyHidden";var jg={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},iN={auto:"top-[50%] translate-y-[-50%]",center:"top-[50%] translate-y-[-50%]",top:"top-4 translate-y-0",bottom:"top-auto bottom-4 translate-y-0","top-center":"top-[20%] translate-y-0","bottom-center":"top-auto bottom-[20%] translate-y-0"},Yg=classVarianceAuthority.cva("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"),sl=classVarianceAuthority.cva("fixed left-[50%] z-50 grid translate-x-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",{variants:{size:{xs:"w-full max-w-xs",sm:"w-full max-w-sm",md:"w-full max-w-md",lg:"w-full max-w-lg",xl:"w-full max-w-xl","2xl":"w-full max-w-2xl","3xl":"w-full max-w-3xl","4xl":"w-full max-w-4xl","5xl":"w-full max-w-5xl",full:"w-[calc(100vw-2rem)] h-[calc(100vh-2rem)] max-w-none"}},defaultVariants:{size:"md"}}),ls=K__namespace.createContext(null),Ca=()=>{let e=K__namespace.useContext(ls);if(!e)throw new Error("Modal components must be used within a Modal");return e},Xg=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a="Modal",children:n,hideCloseButton:o=false,isDismissable:s=true,isKeyboardDismissDisabled:l=false,backdrop:c="opaque",placement:d="center",scrollBehavior:m="inside",size:u,className:f},p)=>{let[b,x]=K__namespace.useState(false),g=e!==void 0,v=g?e:b,[w,R]=K__namespace.useState(false),h=K__namespace.useRef(null),C=K__namespace.useId(),y=K__namespace.useId();K__namespace.useEffect(()=>{R(true);},[]);let T=K__namespace.useCallback(P=>{g||x(P),t?.(P);},[g,t]);K__namespace.useEffect(()=>(v&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[v]),K__namespace.useEffect(()=>{if(!v||l)return;let P=L=>{L.key==="Escape"&&T(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[v,l,T]);let M=P=>{s&&P.target===P.currentTarget&&T(false);},k=r?K__namespace.isValidElement(r)?K__namespace.cloneElement(r,{onClick:P=>{r.props.onClick?.(P),T(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>T(true),children:r}):null,N=()=>!w||!v?null:m==="outside"?Po__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:i(Yg(),jg[c],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxRuntime.jsxs("div",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:i("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",u==="xs"&&"w-full max-w-xs",u==="sm"&&"w-full max-w-sm",u==="md"&&"w-full max-w-md",u==="lg"&&"w-full max-w-lg",u==="xl"&&"w-full max-w-xl",u==="2xl"&&"w-full max-w-2xl",u==="3xl"&&"w-full max-w-3xl",u==="4xl"&&"w-full max-w-4xl",u==="5xl"&&"w-full max-w-5xl",u==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!u&&"w-full max-w-md",f),children:[jsxRuntime.jsx(Fn,{children:jsxRuntime.jsx("h2",{id:C,children:a})}),n,!o&&jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:i(Yg(),jg[c]),onClick:M,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":y,"data-state":v?"open":"closed",className:i(sl({size:u}),iN[d],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(Fn,{children:jsxRuntime.jsx("h2",{id:C,children:a})}),n,!o&&jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxRuntime.jsxs(ls.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:m,titleId:C,descriptionId:y},children:[k,N()]})});Xg.displayName="Modal";var qg=({children:e,open:t,defaultOpen:r=false,onOpenChange:a,scrollBehavior:n="inside"})=>{let[o,s]=K__namespace.useState(r),l=t!==void 0,c=l?t:o,d=K__namespace.useId(),m=K__namespace.useId(),u=K__namespace.useCallback(f=>{l||s(f),a?.(f);},[l,a]);return jsxRuntime.jsx(ls.Provider,{value:{open:c,onOpenChange:u,scrollBehavior:n,titleId:d,descriptionId:m},children:e})};qg.displayName="ModalRoot";var Zg=K__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{onOpenChange:o}=Ca(),s=l=>{r?.(l),o(true);};return e&&K__namespace.isValidElement(t)?K__namespace.cloneElement(t,{ref:n,onClick:l=>{t.props.onClick?.(l),o(true);},...a}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:t})});Zg.displayName="ModalTrigger";var il=({children:e,container:t})=>{let[r,a]=K__namespace.useState(false);return K__namespace.useEffect(()=>{a(true);},[]),r?Po__namespace.createPortal(e,t||document.body):null};il.displayName="ModalPortal";var ll=K__namespace.forwardRef(({className:e,...t},r)=>{let{open:a,onOpenChange:n}=Ca();return a?jsxRuntime.jsx("div",{ref:r,"data-state":a?"open":"closed",className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),onClick:()=>n(false),"aria-hidden":"true",...t}):null});ll.displayName="ModalOverlay";var cl=K__namespace.forwardRef(({asChild:e,children:t,onClick:r,...a},n)=>{let{onOpenChange:o}=Ca(),s=l=>{r?.(l),o(false);};return e&&K__namespace.isValidElement(t)?K__namespace.cloneElement(t,{ref:n,onClick:l=>{t.props.onClick?.(l),o(false);},...a}):jsxRuntime.jsx("button",{ref:n,type:"button",onClick:s,...a,children:t})});cl.displayName="ModalClose";var Jg=K__namespace.forwardRef(({className:e,children:t,size:r,showCloseButton:a=true,onEscapeKeyDown:n,onInteractOutside:o,...s},l)=>{let{open:c,onOpenChange:d,titleId:m,descriptionId:u}=Ca(),[f,p]=K__namespace.useState(false);return K__namespace.useEffect(()=>{p(true);},[]),K__namespace.useEffect(()=>(c&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[c]),K__namespace.useEffect(()=>{if(!c)return;let b=x=>{x.key==="Escape"&&(n?.(),d(false));};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[c,d,n]),!f||!c?null:jsxRuntime.jsxs(il,{children:[jsxRuntime.jsx(ll,{}),jsxRuntime.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":m,"aria-describedby":u,"data-state":c?"open":"closed",className:i(sl({size:r}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,a&&jsxRuntime.jsx(cl,{asChild:true,children:jsxRuntime.jsx(sr,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Jg.displayName="ModalContent";var Qg=({className:e,...t})=>jsxRuntime.jsx("div",{className:i("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qg.displayName="ModalHeader";var eb=({className:e,children:t})=>(K__namespace.useContext(ls)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(ke,{className:i("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:i(e),children:t});eb.displayName="ModalBody";var tb=({className:e,children:t,...r})=>{let{onOpenChange:a}=Ca();return jsxRuntime.jsx("div",{className:i("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r,children:K__namespace.Children.map(t,n=>K__namespace.isValidElement(n)?K__namespace.cloneElement(n,{onClick:o=>{n.props.onClick?.(o),a(false);}}):n)})};tb.displayName="ModalFooter";var rb=K__namespace.forwardRef(({className:e,...t},r)=>{let{titleId:a}=Ca();return jsxRuntime.jsx("h2",{ref:r,id:a,className:i("text-lg font-semibold leading-none tracking-tight",e),...t})});rb.displayName="ModalTitle";var ab=K__namespace.forwardRef(({className:e,...t},r)=>{let{descriptionId:a}=Ca();return jsxRuntime.jsx("p",{ref:r,id:a,className:i("text-sm text-muted-foreground",e),...t})});ab.displayName="ModalDescription";var sb=classVarianceAuthority.cva("h-10 w-10 rounded-full p-2",{variants:{variant:{default:"bg-muted text-foreground",danger:"bg-danger/10 text-danger",warning:"bg-warning/10 text-warning",success:"bg-success/10 text-success",info:"bg-info/10 text-info"}},defaultVariants:{variant:"default"}}),fN=classVarianceAuthority.cva("",{variants:{variant:{default:"",danger:"bg-danger text-danger-foreground hover:bg-danger/90",warning:"bg-warning text-warning-foreground hover:bg-warning/90",success:"bg-success text-success-foreground hover:bg-success/90",info:"bg-info text-info-foreground hover:bg-info/90"}},defaultVariants:{variant:"default"}}),gN=K__namespace.createContext(null),bN={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},dl=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,confirmText:o="Confirm",cancelText:s="Cancel",onConfirm:l,onCancel:c,showIcon:d=true,icon:m,variant:u="default",loading:f=false,disabled:p=false,className:b},x)=>{let[g,v]=K__namespace.useState(false),[w,R]=K__namespace.useState(false),[h,C]=K__namespace.useState(false),y=e!==void 0,T=y?e:g,M=bN[u||"default"],k=K__namespace.useId(),N=K__namespace.useId();K__namespace.useEffect(()=>{C(true);},[]);let P=K__namespace.useCallback(I=>{y||v(I),t?.(I);},[y,t]);K__namespace.useEffect(()=>(T&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[T]);let L=async()=>{if(l){let I=l();if(I instanceof Promise){R(true);try{await I;}finally{R(false);}}}P(false);},E=()=>{c?.(),P(false);},H=f||w,S=r?K__namespace.isValidElement(r)?K__namespace.cloneElement(r,{onClick:I=>{r.props.onClick?.(I),P(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>P(true),children:r}):null,D=()=>!h||!T?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":T?"open":"closed",className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:x,role:"alertdialog","aria-modal":"true","aria-labelledby":k,"aria-describedby":n?N:void 0,"data-state":T?"open":"closed",className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",b),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[d&&jsxRuntime.jsx("div",{className:i(sb({variant:u})),children:m||jsxRuntime.jsx(M,{className:"h-6 w-6"})}),jsxRuntime.jsxs("div",{className:"flex flex-col space-y-2 text-center sm:text-left",children:[jsxRuntime.jsx("h2",{id:k,className:"text-lg font-semibold",children:a}),n&&jsxRuntime.jsx("p",{id:N,className:"text-sm text-muted-foreground",children:n})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:i(ar({variant:"bordered"})),onClick:E,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:i(ar(),fN({variant:u}),H&&"opacity-50 cursor-not-allowed"),onClick:L,disabled:p||H,children:H?jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}),"Loading..."]}):o})]})]})]}),document.body);return jsxRuntime.jsxs(gN.Provider,{value:{open:T,onOpenChange:P,titleId:k,descriptionId:N},children:[S,D()]})});dl.displayName="ConfirmDialog";function vN(){let[e,t]=K__namespace.useState({open:false,options:null,resolve:null}),r=K__namespace.useCallback(l=>new Promise(c=>{t({open:true,options:l,resolve:c});}),[]),a=K__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),n=K__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),o=K__namespace.useCallback(l=>{l||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=K__namespace.useMemo(()=>e.options?jsxRuntime.jsx(dl,{open:e.open,onOpenChange:o,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:a,onCancel:n}):null,[e,a,n,o]);return {confirm:r,ConfirmDialog:s}}var kN=e=>e.map(t=>typeof t=="string"?{src:t}:t),ul=K__namespace.forwardRef(({images:e,open:t,onOpenChange:r,initialIndex:a=0,onIndexChange:n,trigger:o,showThumbnails:s=true,showZoom:l=true,showRotate:c=true,showDownload:d=true,showFullscreen:m=true,showNavigation:u=true,showCounter:f=true,closeOnBackdropClick:p=true,className:b},x)=>{let g=K__namespace.useMemo(()=>kN(e),[e]),[v,w]=K__namespace.useState(a),[R,h]=K__namespace.useState(1),[C,y]=K__namespace.useState(0),[T,M]=K__namespace.useState(false),[k,N]=K__namespace.useState(false),[P,L]=K__namespace.useState({x:0,y:0}),[E,H]=K__namespace.useState({x:0,y:0}),[S,D]=K__namespace.useState(false),I=K__namespace.useRef(null),z=g[v];K__namespace.useEffect(()=>{D(true);},[]),K__namespace.useEffect(()=>{w(a);},[a]),K__namespace.useEffect(()=>{n?.(v);},[v,n]),K__namespace.useEffect(()=>{h(1),y(0),L({x:0,y:0});},[v]),K__namespace.useEffect(()=>(t&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[t]);let G=K__namespace.useCallback(()=>{w(oe=>oe>0?oe-1:g.length-1);},[g.length]),V=K__namespace.useCallback(()=>{w(oe=>oe<g.length-1?oe+1:0);},[g.length]),B=()=>{h(oe=>Math.min(oe+.5,4));},A=()=>{h(oe=>{let Mt=Math.max(oe-.5,.5);return Mt===1&&L({x:0,y:0}),Mt});},W=()=>{y(oe=>(oe+90)%360);},q=async()=>{if(z)try{let Mt=await(await fetch(z.src)).blob(),oo=URL.createObjectURL(Mt),oa=document.createElement("a");oa.href=oo,oa.download=z.alt||`image-${v+1}`,document.body.appendChild(oa),oa.click(),document.body.removeChild(oa),URL.revokeObjectURL(oo);}catch{window.open(z.src,"_blank");}},F=async()=>{if(I.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await I.current.requestFullscreen(),M(!0);}catch{}},$=oe=>{R>1&&(N(true),H({x:oe.clientX-P.x,y:oe.clientY-P.y}));},ae=oe=>{k&&R>1&&L({x:oe.clientX-E.x,y:oe.clientY-E.y});},O=()=>{N(false);},ee=()=>{r?.(false);},Q=oe=>{p&&oe.target===oe.currentTarget&&ee();},st=K__namespace.useCallback(oe=>{switch(oe.key){case "ArrowLeft":G();break;case "ArrowRight":V();break;case "Escape":r?.(false);break;case "+":case "=":B();break;case "-":A();break}},[G,V,r]);if(K__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",st),()=>window.removeEventListener("keydown",st)},[t,st]),K__namespace.useEffect(()=>{let oe=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),g.length===0)return null;let Ye=o?K__namespace.isValidElement(o)?K__namespace.cloneElement(o,{onClick:oe=>{o.props.onClick?.(oe),r?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>r?.(true),children:o}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[Ye,!S||!t?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":t?"open":"closed",onClick:Q}),jsxRuntime.jsxs("div",{ref:x,className:i("fixed inset-0 z-50 flex flex-col outline-none",b),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 text-white",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[f&&g.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[v+1," / ",g.length]}),z?.title&&jsxRuntime.jsx("span",{className:"ml-4 text-sm font-medium",children:z.title})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[l&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:A,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom out",children:jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-5 w-5"})}),jsxRuntime.jsxs("span",{className:"min-w-[3rem] text-center text-sm",children:[Math.round(R*100),"%"]}),jsxRuntime.jsx("button",{onClick:B,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),c&&jsxRuntime.jsx("button",{onClick:W,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),m&&jsxRuntime.jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:T?"Exit fullscreen":"Fullscreen",children:T?jsxRuntime.jsx(lucideReact.Minimize2,{className:"h-5 w-5"}):jsxRuntime.jsx(lucideReact.Maximize2,{className:"h-5 w-5"})}),jsxRuntime.jsxs("button",{onClick:ee,className:"rounded-full p-2 hover:bg-white/10 transition-colors ml-2",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}),jsxRuntime.jsxs("div",{ref:I,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:$,onMouseMove:ae,onMouseUp:O,onMouseLeave:O,children:[u&&g.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:G,className:"absolute left-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"})}),jsxRuntime.jsx("button",{onClick:V,className:"absolute right-4 z-10 rounded-full bg-black/50 p-3 text-white hover:bg-black/70 transition-colors",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("img",{src:z?.src,alt:z?.alt||"",className:i("max-h-full max-w-full object-contain transition-transform duration-200",k?"cursor-grabbing":R>1?"cursor-grab":""),style:{transform:`translate(${P.x}px, ${P.y}px) scale(${R}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&g.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:g.map((oe,Mt)=>jsxRuntime.jsx("button",{onClick:()=>w(Mt),className:i("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===Mt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${Mt+1}`,className:"h-full w-full object-cover"})},Mt))})]})]}),document.body)]})});ul.displayName="ImageViewer";var lb=({children:e,images:t,index:r=0,className:a})=>{let[n,o]=K__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>o(true),className:i("cursor-zoom-in",a),children:e}),jsxRuntime.jsx(ul,{images:t,open:n,onOpenChange:o,initialIndex:r})]})};lb.displayName="ImageViewerTrigger";var db=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted hover:bg-muted/80"},size:{sm:"h-7 w-7",md:"h-9 w-9",lg:"h-11 w-11"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},compoundVariants:[{variant:"solid",color:"primary",className:"bg-primary text-primary-foreground hover:bg-primary/90"},{variant:"solid",color:"secondary",className:"bg-secondary text-secondary-foreground hover:bg-secondary/90"},{variant:"solid",color:"success",className:"bg-success text-success-foreground 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 text-danger-foreground hover:bg-danger/90"},{variant:"soft",color:"primary",className:"bg-primary/10 text-primary hover:bg-primary/20"},{variant:"soft",color:"secondary",className:"bg-secondary/10 text-secondary-foreground hover:bg-secondary/20"},{variant:"soft",color:"success",className:"bg-success/10 text-success hover:bg-success/20"},{variant:"soft",color:"warning",className:"bg-warning/10 text-warning hover:bg-warning/20"},{variant:"soft",color:"danger",className:"bg-danger/10 text-danger hover:bg-danger/20"},{variant:"outline",color:"primary",className:"border-primary text-primary hover:bg-primary/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"}],defaultVariants:{variant:"ghost",size:"md",color:"default",radius:"md"}}),ub=K__namespace.forwardRef(({className:e,variant:t,size:r,color:a,radius:n,loading:o,disabled:s,children:l,...c},d)=>jsxRuntime.jsx("button",{ref:d,type:"button",className:i(db({variant:t,size:r,color:a,radius:n}),e),disabled:s||o,...c,children:o?jsxRuntime.jsxs("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"1em",height:"1em"},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"})]}):l}));ub.displayName="ActionIcon";var fb=({children:e,container:t,disabled:r=false})=>{let[a,n]=K__namespace.useState(false);if(K__namespace.useEffect(()=>{n(true);},[]),r||!a)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let o=null;return typeof t=="string"?o=document.querySelector(t):t instanceof Element?o=t:o=document.body,o?Po.createPortal(e,o):jsxRuntime.jsx(jsxRuntime.Fragment,{children:e})};fb.displayName="Portal";var gb=classVarianceAuthority.cva("absolute rounded-full border-2 border-background",{variants:{color:{default:"bg-muted-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},size:{sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3"},position:{"top-right":"top-0 right-0 -translate-y-1/3 translate-x-1/3","top-left":"top-0 left-0 -translate-y-1/3 -translate-x-1/3","bottom-right":"bottom-0 right-0 translate-y-1/3 translate-x-1/3","bottom-left":"bottom-0 left-0 translate-y-1/3 -translate-x-1/3"},ping:{true:"",false:""}},defaultVariants:{color:"primary",size:"md",position:"top-right",ping:false}}),bb=K__namespace.forwardRef(({className:e,color:t,size:r,position:a,ping:n,content:o,show:s=true,offset:l,style:c,...d},m)=>{if(!s)return null;let u=o!=null;return jsxRuntime.jsxs("span",{ref:m,className:i(gb({color:t,size:u?void 0:r,position:a,ping:n}),u&&"flex h-auto w-auto min-w-[1.25rem] items-center justify-center px-1 py-0.5 text-[10px] font-medium text-white",e),style:{...c,...l!==void 0&&{transform:`translate(${a?.includes("right")?l:-l}px, ${a?.includes("top")?-l:l}px)`}},...d,children:[n&&jsxRuntime.jsx("span",{className:i("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",t==="default"&&"bg-muted-foreground",t==="primary"&&"bg-primary",t==="secondary"&&"bg-secondary",t==="success"&&"bg-success",t==="warning"&&"bg-warning",t==="danger"&&"bg-danger")}),o]})});bb.displayName="Indicator";var vb=K__namespace.forwardRef(({className:e,children:t,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("relative inline-flex",e),...r,children:t}));vb.displayName="IndicatorWrapper";var xb=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),yb=K__namespace.forwardRef(({className:e,orientation:t,size:r,hideScrollbar:a=false,shadowColor:n="rgba(0, 0, 0, 0.1)",children:o,...s},l)=>{let c=K__namespace.useRef(null),[d,m]=K__namespace.useState({top:false,bottom:false,left:false,right:false});K__namespace.useImperativeHandle(l,()=>c.current);let u=K__namespace.useCallback(()=>{let v=c.current;if(!v)return;let{scrollTop:w,scrollLeft:R,scrollHeight:h,scrollWidth:C,clientHeight:y,clientWidth:T}=v;m({top:w>0,bottom:w<h-y-1,left:R>0,right:R<C-T-1});},[]);K__namespace.useEffect(()=>{let v=c.current;if(v)return u(),v.addEventListener("scroll",u),window.addEventListener("resize",u),()=>{v.removeEventListener("scroll",u),window.removeEventListener("resize",u);}},[u]);let p={sm:"20px",md:"40px",lg:"60px"}[r??"md"],b=t==="vertical"||t==="both",x=t==="horizontal"||t==="both",g={maskImage:[b&&d.top&&`linear-gradient(to bottom, transparent, black ${p})`,b&&d.bottom&&`linear-gradient(to top, transparent, black ${p})`,x&&d.left&&`linear-gradient(to right, transparent, black ${p})`,x&&d.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:c,className:i(xb({orientation:t,size:r}),a&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:g,...s,children:o})});yb.displayName="ScrollShadow";var Rb=classVarianceAuthority.cva("inline-flex items-center justify-center font-mono font-medium",{variants:{variant:{default:"rounded border border-border bg-muted text-muted-foreground shadow-sm",outline:"rounded border border-border text-foreground",ghost:"text-muted-foreground"},size:{sm:"min-w-[1.25rem] px-1 py-0.5 text-[10px]",md:"min-w-[1.5rem] px-1.5 py-0.5 text-xs",lg:"min-w-[2rem] px-2 py-1 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),zN={cmd:"\u2318",command:"\u2318",meta:"\u2318",ctrl:"\u2303",control:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",return:"\u21B5",backspace:"\u232B",delete:"\u2326",escape:"\u238B",esc:"\u238B",tab:"\u21E5",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2912",end:"\u2913",capslock:"\u21EA"},BN={cmd:"meta",command:"meta",ctrl:"control",alt:"alt",option:"alt",shift:"shift",enter:"enter",return:"enter",backspace:"backspace",delete:"delete",escape:"escape",esc:"escape",tab:"tab",space:" ",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",pageup:"pageup",pagedown:"pagedown",home:"home",end:"end"},ON=e=>{let t=e.toLowerCase();return zN[t]||e.toUpperCase()},Kn=e=>{let t=e.toLowerCase();return BN[t]||t},ds=e=>{let t=Kn(e);return ["meta","control","alt","shift"].includes(t)},wb=K__namespace.forwardRef(({className:e,variant:t,size:r,keys:a,children:n,onPress:o,disabled:s,preventDefault:l=true,...c},d)=>{K__namespace.useEffect(()=>{if(!o||!a||s)return;let u=Array.isArray(a)?a:[a],f=u.filter(ds).map(Kn),p=u.filter(x=>!ds(x)).map(Kn),b=x=>{let g=f.includes("meta")===x.metaKey,v=f.includes("control")===x.ctrlKey,w=f.includes("alt")===x.altKey,R=f.includes("shift")===x.shiftKey,h=p.length===0||p.includes(x.key.toLowerCase());g&&v&&w&&R&&h&&(l&&x.preventDefault(),o(x));};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,o,s,l]);let m=()=>a?(Array.isArray(a)?a:[a]).map((f,p)=>jsxRuntime.jsxs(K__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:ON(f)})]},p)):n;return jsxRuntime.jsx("kbd",{ref:d,className:i(Rb({variant:t,size:r}),s&&"opacity-50",e),...c,children:m()})});wb.displayName="Kbd";function FN(e,t,r={}){let{disabled:a=false,preventDefault:n=true}=r;K__namespace.useEffect(()=>{if(a)return;let o=Array.isArray(e)?e:[e],s=o.filter(ds).map(Kn),l=o.filter(d=>!ds(d)).map(Kn),c=d=>{let m=s.includes("meta")===d.metaKey,u=s.includes("control")===d.ctrlKey,f=s.includes("alt")===d.altKey,p=s.includes("shift")===d.shiftKey,b=l.length===0||l.includes(d.key.toLowerCase());m&&u&&f&&p&&b&&(n&&d.preventDefault(),t(d));};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[e,t,a,n]);}var Nb=K__namespace.forwardRef(({className:e,size:t,axis:r="both",style:a,...n},o)=>{let s=typeof t=="number"?`${t}px`:t,l={...a,...t?{width:r==="vertical"?void 0:s,height:r==="horizontal"?void 0:s,minWidth:r==="vertical"?void 0:s,minHeight:r==="horizontal"?void 0:s,flexShrink:0}:{flex:"1 1 auto"}};return jsxRuntime.jsx("div",{ref:o,"aria-hidden":"true",className:i(e),style:l,...n})});Nb.displayName="Spacer";var Mb=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md 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:{variant:{default:"hover:bg-muted",solid:"bg-muted hover:bg-muted/80",ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input hover:bg-accent hover:text-accent-foreground"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{variant:"default",size:"md"}}),Tb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a,successDuration:n=2e3,onCopySuccess:o,onCopyError:s,copyIcon:l,successIcon:c,...d},m)=>{let[u,f]=K__namespace.useState(false),p={sm:14,md:16,lg:20}[r??"md"],b=async()=>{try{await navigator.clipboard.writeText(a),f(!0),o?.(),setTimeout(()=>{f(!1);},n);}catch(x){s?.(x);}};return jsxRuntime.jsx("button",{ref:m,type:"button",className:i(Mb({variant:t,size:r}),e),onClick:b,"aria-label":u?"Copied":"Copy to clipboard",...d,children:u?c??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):l??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});Tb.displayName="CopyButton";var kb=classVarianceAuthority.cva("flex flex-col bg-background",{variants:{variant:{default:"border rounded-lg",bordered:"border-2 rounded-lg",ghost:""},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"md"}}),XN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function ZN(e,t,r){let a=new Date(e,t,1),n=new Date(e,t+1,0),o=[],s=a.getDay()-r;s<0&&(s+=7);for(let c=s-1;c>=0;c--)o.push(new Date(e,t,-c));for(let c=1;c<=n.getDate();c++)o.push(new Date(e,t,c));let l=42-o.length;for(let c=1;c<=l;c++)o.push(new Date(e,t+1,c));return o}function JN(e,t){let r=[],n=e.getDay()-t;n<0&&(n+=7);let o=new Date(e);o.setDate(e.getDate()-n);for(let s=0;s<7;s++){let l=new Date(o);l.setDate(o.getDate()+s),r.push(l);}return r}function ps(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ms(e){return ps(e,new Date)}function Pb(e,t){return e.filter(r=>{let a=new Date(r.start),n=new Date(r.end);return ps(a,t)||ps(n,t)||a<t&&n>t})}var Lb=K__namespace.forwardRef(({className:e,variant:t,size:r,events:a=[],view:n="month",onViewChange:o,date:s,onDateChange:l,onEventClick:c,onSlotClick:d,weekStartsOn:m=0,locale:u="en-US",...f},p)=>{let[b,x]=K__namespace.useState(new Date),g=s??b,v=N=>{l?l(N):x(N);},w=m===1?qN:XN,R=()=>{let N=new Date(g);n==="month"?N.setMonth(N.getMonth()-1):n==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},h=()=>{let N=new Date(g);n==="month"?N.setMonth(N.getMonth()+1):n==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},y=()=>n==="day"?g.toLocaleDateString(u,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):g.toLocaleDateString(u,{year:"numeric",month:"long"}),T=()=>{let N=ZN(g.getFullYear(),g.getMonth(),m);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:w.map(P=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:P},P))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((P,L)=>{let E=Pb(a,P),H=P.getMonth()===g.getMonth();return jsxRuntime.jsxs("div",{className:i("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>d?.(P),children:[jsxRuntime.jsx("div",{className:i("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",ms(P)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:P.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[E.slice(0,3).map(S=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:S.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),c?.(S);},children:S.title},S.id)),E.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",E.length-3," more"]})]})]},L)})})]})},M=()=>{let N=JN(g,m),P=Array.from({length:24},(L,E)=>E);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-[60px_repeat(7,1fr)] border-b",children:[jsxRuntime.jsx("div",{className:"p-2"}),N.map((L,E)=>jsxRuntime.jsxs("div",{className:i("p-2 text-center border-l",ms(L)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:w[E]}),jsxRuntime.jsx("div",{className:i("text-lg font-semibold",ms(L)&&"text-primary"),children:L.getDate()})]},E))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:P.map(L=>jsxRuntime.jsxs(K__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[L.toString().padStart(2,"0"),":00"]}),N.map((E,H)=>{let S=new Date(E);S.setHours(L,0,0,0);let D=a.filter(I=>{let z=new Date(I.start);return ps(z,E)&&z.getHours()===L});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(S),children:D.map(I=>jsxRuntime.jsx("div",{className:"absolute inset-x-0.5 top-0.5 text-xs px-1 py-0.5 rounded truncate cursor-pointer",style:{backgroundColor:I.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),c?.(I);},children:I.title},I.id))},H)})]},L))})})]})},k=()=>{let N=Array.from({length:24},(L,E)=>E),P=Pb(a,g);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[jsxRuntime.jsx("div",{className:"p-4 border-b text-center",children:jsxRuntime.jsx("div",{className:i("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",ms(g)&&"bg-primary text-primary-foreground"),children:g.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(L=>{let E=new Date(g);E.setHours(L,0,0,0);let H=P.filter(S=>new Date(S.start).getHours()===L);return jsxRuntime.jsxs(K__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[L.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>d?.(E),children:H.map(S=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:S.color||"hsl(var(--primary))",color:"white"},onClick:D=>{D.stopPropagation(),c?.(S);},children:S.title},S.id))})]},L)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:i(kb({variant:t,size:r,className:e})),...f,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(X,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(X,{variant:"ghost",size:"icon",onClick:R,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(X,{variant:"ghost",size:"icon",onClick:h,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:y()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsxRuntime.jsx(X,{variant:n===N?"solid":"ghost",size:"sm",onClick:()=>o?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),n==="month"&&T(),n==="week"&&M(),n==="day"&&k()]})});Lb.displayName="FullCalendar";var _n=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),Wn=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"],Eb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",curveType:d="monotone",...m},u)=>jsxRuntime.jsx("div",{ref:u,className:i(_n({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:r,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:c,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:d,dataKey:f,stroke:n[p%n.length],strokeWidth:2,dot:{fill:n[p%n.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));Eb.displayName="LineChart";var Db=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",stacked:d=false,layout:m="horizontal",...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:r,layout:m,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:m==="horizontal"?c:void 0,type:m==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:m==="vertical"?c:void 0,type:m==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((p,b)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:n[b%n.length],stackId:d?"stack":void 0,radius:[4,4,0,0]},p))]})})}));Db.displayName="BarChart";var Sb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKey:a="value",nameKey:n="name",colors:o=Wn,innerRadius:s=0,outerRadius:l=80,showLegend:c=true,showTooltip:d=true,showLabels:m=false,...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[d&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),c&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:r,dataKey:a,nameKey:n,cx:"50%",cy:"50%",innerRadius:s,outerRadius:l,label:m,labelLine:m,children:r.map((p,b)=>jsxRuntime.jsx(recharts.Cell,{fill:o[b%o.length]},`cell-${b}`))})]})})}));Sb.displayName="PieChart";var Hb=K__namespace.forwardRef(({className:e,size:t,data:r,dataKeys:a,colors:n=Wn,showGrid:o=true,showLegend:s=true,showTooltip:l=true,xAxisKey:c="name",stacked:d=false,curveType:m="monotone",...u},f)=>jsxRuntime.jsx("div",{ref:f,className:i(_n({size:t,className:e})),...u,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:r,children:[o&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:c,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),l&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"},labelStyle:{color:"hsl(var(--popover-foreground))"}}),s&&jsxRuntime.jsx(recharts.Legend,{}),a.map((p,b)=>jsxRuntime.jsx(recharts.Area,{type:m,dataKey:p,stroke:n[b%n.length],fill:n[b%n.length],fillOpacity:.3,stackId:d?"stack":void 0},p))]})})}));Hb.displayName="AreaChart";var Ab=classVarianceAuthority.cva("flex gap-4 overflow-x-auto p-4",{variants:{variant:{default:"bg-muted/30",bordered:"border rounded-lg bg-background",ghost:""}},defaultVariants:{variant:"default"}}),zb=classVarianceAuthority.cva("flex flex-col min-w-[280px] w-[280px] rounded-lg",{variants:{variant:{default:"bg-muted/50",bordered:"border bg-background",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),yl=classVarianceAuthority.cva("rounded-lg p-3 cursor-grab active:cursor-grabbing transition-all",{variants:{variant:{default:"bg-background border shadow-sm hover:shadow-md",bordered:"border-2 bg-background hover:border-primary/50",ghost:"bg-muted/50 hover:bg-muted"},isDragging:{true:"opacity-50 scale-[1.02] shadow-lg",false:""}},defaultVariants:{variant:"default",isDragging:false}});function RM({card:e,columnId:t,variant:r,renderCard:a,onCardClick:n}){let{attributes:o,listeners:s,setNodeRef:l,transform:c,transition:d,isDragging:m}=sortable.useSortable({id:e.id,data:{columnId:t}}),u={transform:utilities.CSS.Transform.toString(c),transition:d};return jsxRuntime.jsx("div",{ref:l,style:u,className:i(yl({variant:r,isDragging:m})),onClick:()=>n?.(e,t),...o,...s,children:a?a(e,t):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:e.title}),e.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]})})}function wM({column:e,variant:t,renderCard:r,onCardClick:a,onAddCard:n,showAddCard:o,columnHeight:s}){return jsxRuntime.jsxs("div",{className:i(zb({variant:t})),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[e.color&&jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),jsxRuntime.jsx("h3",{className:"font-semibold text-sm",children:e.title}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:e.cards.length})]}),o&&jsxRuntime.jsx(X,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>n?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(ke,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(l=>l.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(l=>jsxRuntime.jsx(RM,{card:l,columnId:e.id,variant:t,renderCard:r,onCardClick:a},l.id))}),e.cards.length===0&&jsxRuntime.jsx("div",{className:"h-20 border-2 border-dashed rounded-lg flex items-center justify-center text-muted-foreground text-sm",children:"Drop here"})]})})]})}var Bb=K__namespace.forwardRef(({className:e,variant:t,columns:r,onCardMove:a,onCardClick:n,onAddCard:o,renderCard:s,showAddCard:l=true,columnHeight:c=500,...d},m)=>{let[u,f]=K__namespace.useState(null),[p,b]=K__namespace.useState(null),x=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),g=h=>r.find(C=>C.cards.some(y=>y.id===h));return jsxRuntime.jsxs(core.DndContext,{sensors:x,collisionDetection:core.closestCorners,onDragStart:h=>{let{active:C}=h,y=g(C.id);if(y){let T=y.cards.find(M=>M.id===C.id);T&&(f(T),b(y.id));}},onDragOver:h=>{let{active:C,over:y}=h;if(!y)return;let T=C.id,M=y.id,k=g(T),N=g(M)||r.find(E=>E.id===M);if(!k||!N||k.id===N.id)return;let P=N.cards.findIndex(E=>E.id===M),L=P===-1?N.cards.length:P;a?.(T,k.id,N.id,L);},onDragEnd:h=>{let{active:C,over:y}=h;if(y&&C.id!==y.id){let T=g(C.id),M=g(y.id)||r.find(k=>k.id===y.id);if(T&&M){let k=M.cards.findIndex(P=>P.id===y.id),N=k===-1?M.cards.length:k;a?.(C.id,T.id,M.id,N);}}f(null),b(null);},children:[jsxRuntime.jsx("div",{ref:m,className:i(Ab({variant:t,className:e})),...d,children:r.map(h=>jsxRuntime.jsx(wM,{column:h,variant:t,renderCard:s,onCardClick:n,onAddCard:o,showAddCard:l,columnHeight:c},h.id))}),jsxRuntime.jsx(core.DragOverlay,{children:u&&p&&jsxRuntime.jsx("div",{className:i(yl({variant:t,isDragging:true})),children:s?s(u,p):jsxRuntime.jsxs("div",{className:"flex items-start gap-2",children:[jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("p",{className:"font-medium text-sm truncate",children:u.title}),u.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:u.description})]})]})})})]})});Bb.displayName="KanbanBoard";var Ob=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Fb=K__namespace.createContext(null);function Rl(){let e=K__namespace.useContext(Fb);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Gb=K__namespace.forwardRef(({className:e,variant:t,children:r,opts:a,plugins:n,orientation:o="horizontal",showArrows:s=true,showDots:l=true,setApi:c,...d},m)=>{let[u,f]=CM__default.default({...a,axis:o==="horizontal"?"x":"y"},n),[p,b]=K__namespace.useState(false),[x,g]=K__namespace.useState(false),[v,w]=K__namespace.useState(0),[R,h]=K__namespace.useState([]),C=K__namespace.useCallback(N=>{N&&(w(N.selectedScrollSnap()),b(N.canScrollPrev()),g(N.canScrollNext()));},[]),y=K__namespace.useCallback(()=>{f?.scrollPrev();},[f]),T=K__namespace.useCallback(()=>{f?.scrollNext();},[f]),M=K__namespace.useCallback(N=>{f?.scrollTo(N);},[f]),k=K__namespace.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),y()):N.key==="ArrowRight"&&(N.preventDefault(),T());},[y,T]);return K__namespace.useEffect(()=>{!f||!c||c(f);},[f,c]),K__namespace.useEffect(()=>{if(f)return h(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(Fb.Provider,{value:{carouselRef:u,api:f,scrollPrev:y,scrollNext:T,canScrollPrev:p,canScrollNext:x,selectedIndex:v,scrollSnaps:R,scrollTo:M},children:jsxRuntime.jsxs("div",{ref:m,className:i(Ob({variant:t,className:e})),onKeyDownCapture:k,role:"region","aria-roledescription":"carousel",...d,children:[jsxRuntime.jsx("div",{ref:u,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:i("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:r})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(wl,{}),jsxRuntime.jsx(Cl,{})]}),l&&R.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:R.map((N,P)=>jsxRuntime.jsx("button",{className:i("w-2 h-2 rounded-full transition-all",P===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(P),"aria-label":`Go to slide ${P+1}`},P))})]})})});Gb.displayName="Carousel";var Kb=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex",e),...t}));Kb.displayName="CarouselContent";var $b=K__namespace.forwardRef(({className:e,basis:t="basis-full",...r},a)=>jsxRuntime.jsx("div",{ref:a,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 pl-4",t,e),...r}));$b.displayName="CarouselItem";var wl=K__namespace.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollPrev:o,canScrollPrev:s}=Rl();return jsxRuntime.jsxs(X,{ref:n,variant:t,size:r,className:i("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:o,...a,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});wl.displayName="CarouselPrevious";var Cl=K__namespace.forwardRef(({className:e,variant:t="bordered",size:r="icon",...a},n)=>{let{scrollNext:o,canScrollNext:s}=Rl();return jsxRuntime.jsxs(X,{ref:n,variant:t,size:r,className:i("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:o,...a,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Cl.displayName="CarouselNext";var _b=classVarianceAuthority.cva("flex flex-col bg-popover border rounded-lg shadow-md",{variants:{size:{sm:"w-64 h-72",md:"w-80 h-96",lg:"w-96 h-[480px]"}},defaultVariants:{size:"md"}}),xs={recent:{icon:"\u{1F550}",name:"Recent"},smileys:{icon:"\u{1F600}",name:"Smileys & Emotion"},people:{icon:"\u{1F44B}",name:"People & Body"},animals:{icon:"\u{1F43B}",name:"Animals & Nature"},food:{icon:"\u{1F354}",name:"Food & Drink"},travel:{icon:"\u{1F697}",name:"Travel & Places"},activities:{icon:"\u26BD",name:"Activities"},objects:{icon:"\u{1F4A1}",name:"Objects"},symbols:{icon:"\u2764\uFE0F",name:"Symbols"},flags:{icon:"\u{1F3F3}\uFE0F",name:"Flags"}},Ml={smileys:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A\uFE0F","\u{1F61A}","\u{1F60B}","\u{1F61B}","\u{1F61C}","\u{1F92A}","\u{1F61D}","\u{1F911}","\u{1F917}","\u{1F92D}","\u{1F92B}","\u{1F914}","\u{1F910}","\u{1F928}","\u{1F610}","\u{1F611}","\u{1F636}","\u{1F60F}","\u{1F612}","\u{1F644}","\u{1F62C}","\u{1F925}","\u{1F60C}","\u{1F614}","\u{1F62A}","\u{1F924}","\u{1F634}","\u{1F637}","\u{1F912}","\u{1F915}","\u{1F922}","\u{1F92E}","\u{1F927}","\u{1F975}","\u{1F976}","\u{1F974}","\u{1F635}","\u{1F92F}","\u{1F920}","\u{1F973}","\u{1F978}","\u{1F60E}","\u{1F913}","\u{1F9D0}","\u{1F615}","\u{1F61F}","\u{1F641}","\u2639\uFE0F","\u{1F62E}","\u{1F62F}","\u{1F632}","\u{1F633}","\u{1F97A}","\u{1F626}","\u{1F627}","\u{1F628}","\u{1F630}","\u{1F625}","\u{1F622}","\u{1F62D}","\u{1F631}","\u{1F616}","\u{1F623}","\u{1F61E}","\u{1F613}","\u{1F629}","\u{1F62B}","\u{1F971}","\u{1F624}","\u{1F621}","\u{1F620}","\u{1F92C}","\u{1F608}","\u{1F47F}","\u{1F480}","\u2620\uFE0F","\u{1F4A9}","\u{1F921}","\u{1F479}","\u{1F47A}","\u{1F47B}","\u{1F47D}"],people:["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F91D}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9BE}","\u{1F9BF}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F9E0}","\u{1FAC0}","\u{1FAC1}","\u{1F9B7}","\u{1F9B4}","\u{1F440}","\u{1F441}\uFE0F","\u{1F445}","\u{1F444}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F469}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64E}","\u{1F645}","\u{1F646}","\u{1F481}","\u{1F64B}","\u{1F9CF}","\u{1F647}","\u{1F926}","\u{1F937}","\u{1F46E}","\u{1F575}\uFE0F","\u{1F482}","\u{1F977}","\u{1F477}","\u{1F934}","\u{1F478}"],animals:["\u{1F436}","\u{1F431}","\u{1F42D}","\u{1F439}","\u{1F430}","\u{1F98A}","\u{1F43B}","\u{1F43C}","\u{1F428}","\u{1F42F}","\u{1F981}","\u{1F42E}","\u{1F437}","\u{1F43D}","\u{1F438}","\u{1F435}","\u{1F648}","\u{1F649}","\u{1F64A}","\u{1F412}","\u{1F414}","\u{1F427}","\u{1F426}","\u{1F424}","\u{1F423}","\u{1F425}","\u{1F986}","\u{1F985}","\u{1F989}","\u{1F987}","\u{1F43A}","\u{1F417}","\u{1F434}","\u{1F984}","\u{1F41D}","\u{1FAB1}","\u{1F41B}","\u{1F98B}","\u{1F40C}","\u{1F41E}","\u{1F41C}","\u{1FAB0}","\u{1FAB2}","\u{1FAB3}","\u{1F99F}","\u{1F997}","\u{1F577}\uFE0F","\u{1F578}\uFE0F","\u{1F982}","\u{1F422}","\u{1F40D}","\u{1F98E}","\u{1F996}","\u{1F995}","\u{1F419}","\u{1F991}","\u{1F990}","\u{1F99E}","\u{1F980}","\u{1F421}","\u{1F420}","\u{1F41F}","\u{1F42C}","\u{1F433}","\u{1F40B}","\u{1F988}","\u{1F40A}","\u{1F405}","\u{1F406}","\u{1F993}","\u{1F98D}","\u{1F9A7}","\u{1F9A3}","\u{1F418}","\u{1F99B}","\u{1F98F}","\u{1F42A}","\u{1F42B}","\u{1F992}","\u{1F998}"],food:["\u{1F347}","\u{1F348}","\u{1F349}","\u{1F34A}","\u{1F34B}","\u{1F34C}","\u{1F34D}","\u{1F96D}","\u{1F34E}","\u{1F34F}","\u{1F350}","\u{1F351}","\u{1F352}","\u{1F353}","\u{1FAD0}","\u{1F95D}","\u{1F345}","\u{1FAD2}","\u{1F965}","\u{1F951}","\u{1F346}","\u{1F954}","\u{1F955}","\u{1F33D}","\u{1F336}\uFE0F","\u{1FAD1}","\u{1F952}","\u{1F96C}","\u{1F966}","\u{1F9C4}","\u{1F9C5}","\u{1F344}","\u{1F95C}","\u{1F330}","\u{1F35E}","\u{1F950}","\u{1F956}","\u{1FAD3}","\u{1F968}","\u{1F96F}","\u{1F95E}","\u{1F9C7}","\u{1F9C0}","\u{1F356}","\u{1F357}","\u{1F969}","\u{1F953}","\u{1F354}","\u{1F35F}","\u{1F355}","\u{1F32D}","\u{1F96A}","\u{1F32E}","\u{1F32F}","\u{1FAD4}","\u{1F959}","\u{1F9C6}","\u{1F95A}","\u{1F373}","\u{1F958}","\u{1F372}","\u{1FAD5}","\u{1F963}","\u{1F957}","\u{1F37F}","\u{1F9C8}","\u{1F9C2}","\u{1F96B}","\u{1F371}","\u{1F358}","\u{1F359}","\u{1F35A}","\u{1F35B}","\u{1F35C}","\u{1F35D}","\u{1F360}","\u{1F362}","\u{1F363}","\u{1F364}","\u{1F365}"],travel:["\u{1F697}","\u{1F695}","\u{1F699}","\u{1F68C}","\u{1F68E}","\u{1F3CE}\uFE0F","\u{1F693}","\u{1F691}","\u{1F692}","\u{1F690}","\u{1F6FB}","\u{1F69A}","\u{1F69B}","\u{1F69C}","\u{1F9AF}","\u{1F9BD}","\u{1F9BC}","\u{1F6F4}","\u{1F6B2}","\u{1F6F5}","\u{1F3CD}\uFE0F","\u{1F6FA}","\u{1F6A8}","\u{1F694}","\u{1F68D}","\u{1F698}","\u{1F696}","\u{1F6A1}","\u{1F6A0}","\u{1F69F}","\u{1F683}","\u{1F68B}","\u{1F69E}","\u{1F69D}","\u{1F684}","\u{1F685}","\u{1F688}","\u{1F682}","\u{1F686}","\u{1F687}","\u{1F68A}","\u{1F689}","\u2708\uFE0F","\u{1F6EB}","\u{1F6EC}","\u{1F6E9}\uFE0F","\u{1F4BA}","\u{1F6F0}\uFE0F","\u{1F680}","\u{1F6F8}","\u{1F681}","\u{1F6F6}","\u26F5","\u{1F6A4}","\u{1F6E5}\uFE0F","\u{1F6F3}\uFE0F","\u26F4\uFE0F","\u{1F6A2}","\u2693","\u{1FA9D}","\u26FD","\u{1F6A7}","\u{1F6A6}","\u{1F6A5}","\u{1F68F}","\u{1F5FA}\uFE0F","\u{1F5FF}","\u{1F5FD}","\u{1F5FC}","\u{1F3F0}","\u{1F3EF}","\u{1F3DF}\uFE0F","\u{1F3A1}","\u{1F3A2}","\u{1F3A0}","\u26F2","\u26F1\uFE0F","\u{1F3D6}\uFE0F","\u{1F3DD}\uFE0F","\u{1F3DC}\uFE0F"],activities:["\u26BD","\u{1F3C0}","\u{1F3C8}","\u26BE","\u{1F94E}","\u{1F3BE}","\u{1F3D0}","\u{1F3C9}","\u{1F94F}","\u{1F3B1}","\u{1FA80}","\u{1F3D3}","\u{1F3F8}","\u{1F3D2}","\u{1F3D1}","\u{1F94D}","\u{1F3CF}","\u{1FA83}","\u{1F945}","\u26F3","\u{1FA81}","\u{1F3F9}","\u{1F3A3}","\u{1F93F}","\u{1F94A}","\u{1F94B}","\u{1F3BD}","\u{1F6F9}","\u{1F6FC}","\u{1F6F7}","\u26F8\uFE0F","\u{1F94C}","\u{1F3BF}","\u26F7\uFE0F","\u{1F3C2}","\u{1FA82}","\u{1F3CB}\uFE0F","\u{1F93C}","\u{1F938}","\u26F9\uFE0F","\u{1F93A}","\u{1F93E}","\u{1F3CC}\uFE0F","\u{1F3C7}","\u26D1\uFE0F","\u{1F9D8}","\u{1F3C4}","\u{1F3CA}","\u{1F93D}","\u{1F6A3}","\u{1F9D7}","\u{1F6B5}","\u{1F6B4}","\u{1F3C6}","\u{1F947}","\u{1F948}","\u{1F949}","\u{1F3C5}","\u{1F396}\uFE0F","\u{1F3F5}\uFE0F","\u{1F397}\uFE0F","\u{1F3AB}","\u{1F39F}\uFE0F","\u{1F3AA}","\u{1F939}","\u{1F3AD}","\u{1FA70}","\u{1F3A8}","\u{1F3AC}","\u{1F3A4}","\u{1F3A7}","\u{1F3BC}","\u{1F3B9}","\u{1F941}","\u{1FA98}","\u{1F3B7}","\u{1F3BA}","\u{1FA97}","\u{1F3B8}","\u{1FA95}"],objects:["\u231A","\u{1F4F1}","\u{1F4F2}","\u{1F4BB}","\u2328\uFE0F","\u{1F5A5}\uFE0F","\u{1F5A8}\uFE0F","\u{1F5B1}\uFE0F","\u{1F5B2}\uFE0F","\u{1F579}\uFE0F","\u{1F5DC}\uFE0F","\u{1F4BD}","\u{1F4BE}","\u{1F4BF}","\u{1F4C0}","\u{1F4FC}","\u{1F4F7}","\u{1F4F8}","\u{1F4F9}","\u{1F3A5}","\u{1F4FD}\uFE0F","\u{1F39E}\uFE0F","\u{1F4DE}","\u260E\uFE0F","\u{1F4DF}","\u{1F4E0}","\u{1F4FA}","\u{1F4FB}","\u{1F399}\uFE0F","\u{1F39A}\uFE0F","\u{1F39B}\uFE0F","\u{1F9ED}","\u23F1\uFE0F","\u23F2\uFE0F","\u23F0","\u{1F570}\uFE0F","\u231B","\u23F3","\u{1F4E1}","\u{1F50B}","\u{1F50C}","\u{1F4A1}","\u{1F526}","\u{1F56F}\uFE0F","\u{1FA94}","\u{1F9EF}","\u{1F6E2}\uFE0F","\u{1F4B8}","\u{1F4B5}","\u{1F4B4}","\u{1F4B6}","\u{1F4B7}","\u{1FA99}","\u{1F4B0}","\u{1F4B3}","\u{1F48E}","\u2696\uFE0F","\u{1FA9C}","\u{1F9F0}","\u{1FA9B}","\u{1F527}","\u{1F528}","\u2692\uFE0F","\u{1F6E0}\uFE0F","\u26CF\uFE0F","\u{1FA9A}","\u{1F529}","\u2699\uFE0F","\u{1FAA4}","\u{1F9F1}","\u26D3\uFE0F","\u{1F9F2}","\u{1F52B}","\u{1F4A3}","\u{1F9E8}","\u{1FA93}","\u{1F52A}","\u{1F5E1}\uFE0F","\u2694\uFE0F","\u{1F6E1}\uFE0F"],symbols:["\u2764\uFE0F","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F90E}","\u{1F494}","\u2763\uFE0F","\u{1F495}","\u{1F49E}","\u{1F493}","\u{1F497}","\u{1F496}","\u{1F498}","\u{1F49D}","\u{1F49F}","\u262E\uFE0F","\u271D\uFE0F","\u262A\uFE0F","\u{1F549}\uFE0F","\u2638\uFE0F","\u2721\uFE0F","\u{1F52F}","\u{1F54E}","\u262F\uFE0F","\u2626\uFE0F","\u{1F6D0}","\u26CE","\u2648","\u2649","\u264A","\u264B","\u264C","\u264D","\u264E","\u264F","\u2650","\u2651","\u2652","\u2653","\u{1F194}","\u269B\uFE0F","\u{1F251}","\u2622\uFE0F","\u2623\uFE0F","\u{1F4F4}","\u{1F4F3}","\u{1F236}","\u{1F21A}","\u{1F238}","\u{1F23A}","\u{1F237}\uFE0F","\u2734\uFE0F","\u{1F19A}","\u{1F4AE}","\u{1F250}","\u3299\uFE0F","\u3297\uFE0F","\u{1F234}","\u{1F235}","\u{1F239}","\u{1F232}","\u{1F170}\uFE0F","\u{1F171}\uFE0F","\u{1F18E}","\u{1F191}","\u{1F17E}\uFE0F","\u{1F198}","\u274C","\u2B55","\u{1F6D1}","\u26D4","\u{1F4DB}","\u{1F6AB}","\u{1F4AF}","\u{1F4A2}","\u2668\uFE0F"],flags:["\u{1F3F3}\uFE0F","\u{1F3F4}","\u{1F3C1}","\u{1F6A9}","\u{1F3F3}\uFE0F\u200D\u{1F308}","\u{1F3F3}\uFE0F\u200D\u26A7\uFE0F","\u{1F1FA}\u{1F1F3}","\u{1F1E6}\u{1F1EB}","\u{1F1E6}\u{1F1F1}","\u{1F1E9}\u{1F1FF}","\u{1F1E6}\u{1F1F8}","\u{1F1E6}\u{1F1E9}","\u{1F1E6}\u{1F1F4}","\u{1F1E6}\u{1F1EE}","\u{1F1E6}\u{1F1F6}","\u{1F1E6}\u{1F1EC}","\u{1F1E6}\u{1F1F7}","\u{1F1E6}\u{1F1F2}","\u{1F1E6}\u{1F1FC}","\u{1F1E6}\u{1F1FA}","\u{1F1E6}\u{1F1F9}","\u{1F1E6}\u{1F1FF}","\u{1F1E7}\u{1F1F8}","\u{1F1E7}\u{1F1ED}","\u{1F1E7}\u{1F1E9}","\u{1F1E7}\u{1F1E7}","\u{1F1E7}\u{1F1FE}","\u{1F1E7}\u{1F1EA}","\u{1F1E7}\u{1F1FF}","\u{1F1E7}\u{1F1EF}","\u{1F1E7}\u{1F1F2}","\u{1F1E7}\u{1F1F9}","\u{1F1E7}\u{1F1F4}","\u{1F1E7}\u{1F1E6}","\u{1F1E7}\u{1F1FC}","\u{1F1E7}\u{1F1F7}","\u{1F1E7}\u{1F1F3}","\u{1F1E7}\u{1F1EC}","\u{1F1E7}\u{1F1EB}","\u{1F1E7}\u{1F1EE}","\u{1F1E8}\u{1F1FB}","\u{1F1F0}\u{1F1ED}","\u{1F1E8}\u{1F1F2}","\u{1F1E8}\u{1F1E6}","\u{1F1E8}\u{1F1EB}","\u{1F1F9}\u{1F1E9}","\u{1F1E8}\u{1F1F1}","\u{1F1E8}\u{1F1F3}","\u{1F1E8}\u{1F1F4}","\u{1F1F0}\u{1F1F2}","\u{1F1E8}\u{1F1EC}","\u{1F1E8}\u{1F1E9}","\u{1F1E8}\u{1F1F7}","\u{1F1ED}\u{1F1F7}","\u{1F1E8}\u{1F1FA}","\u{1F1E8}\u{1F1FE}","\u{1F1E8}\u{1F1FF}","\u{1F1E9}\u{1F1F0}","\u{1F1E9}\u{1F1EF}","\u{1F1E9}\u{1F1F2}","\u{1F1E9}\u{1F1F4}","\u{1F1EA}\u{1F1E8}","\u{1F1EA}\u{1F1EC}","\u{1F1F8}\u{1F1FB}","\u{1F1EC}\u{1F1F6}","\u{1F1EA}\u{1F1F7}","\u{1F1EA}\u{1F1EA}","\u{1F1EA}\u{1F1F9}","\u{1F1EA}\u{1F1FA}","\u{1F1EB}\u{1F1EF}","\u{1F1EB}\u{1F1EE}","\u{1F1EB}\u{1F1F7}","\u{1F1EC}\u{1F1E6}","\u{1F1EC}\u{1F1F2}","\u{1F1EC}\u{1F1EA}","\u{1F1E9}\u{1F1EA}","\u{1F1EC}\u{1F1ED}","\u{1F1EC}\u{1F1F7}","\u{1F1EC}\u{1F1F9}","\u{1F1EC}\u{1F1F3}"]},Wb=K__namespace.forwardRef(({className:e,size:t,onEmojiSelect:r,recentEmojis:a=[],defaultCategory:n="smileys",showSearch:o=true,showCategories:s=true,...l},c)=>{let[d,m]=K__namespace.useState(a.length>0?"recent":n),[u,f]=K__namespace.useState(""),b=u?Object.values(Ml).flat().filter(g=>g.toLowerCase().includes(u.toLowerCase())):d==="recent"?a:Ml[d]||[],x=g=>{r?.(g);};return jsxRuntime.jsxs("div",{ref:c,className:i(_b({size:t,className:e})),...l,children:[o&&jsxRuntime.jsx("div",{className:"p-2 border-b",children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(lucideReact.Search,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(po,{placeholder:"Search emojis...",value:u,onChange:g=>f(g.target.value),className:"pl-8 h-8"})]})}),s&&!u&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries(xs).map(([g,{icon:v}])=>g==="recent"&&a.length===0?null:jsxRuntime.jsx("button",{className:i("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",d===g&&"bg-accent"),onClick:()=>m(g),title:xs[g].name,children:v},g))}),!u&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:xs[d].name}),jsxRuntime.jsx(ke,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[b.map((g,v)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>x(g),children:g},`${g}-${v}`)),b.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Wb.displayName="EmojiPicker";var jb=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-transparent"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),tT=classVarianceAuthority.cva("flex flex-wrap items-center gap-0.5 p-1 border-b",{variants:{size:{sm:"p-0.5",md:"p-1",lg:"p-1.5"}},defaultVariants:{size:"md"}}),rT=classVarianceAuthority.cva("flex-1 overflow-auto prose prose-sm max-w-none dark:prose-invert [&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[inherit] [&_.ProseMirror.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.ProseMirror.is-editor-empty:first-child::before]:float-left [&_.ProseMirror.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror.is-editor-empty:first-child::before]:h-0",{variants:{size:{sm:"min-h-[100px] [&_.ProseMirror]:p-2 text-sm",md:"min-h-[150px] [&_.ProseMirror]:p-3 text-sm",lg:"min-h-[200px] [&_.ProseMirror]:p-4 text-base"}},defaultVariants:{size:"md"}}),Oe=({icon:e,title:t,isActive:r,onClick:a,disabled:n})=>jsxRuntime.jsxs(Sr,{children:[jsxRuntime.jsx(Hr,{asChild:true,children:jsxRuntime.jsx(X,{type:"button",variant:r?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:a,disabled:n,children:e})}),jsxRuntime.jsx(Vr,{side:"top",className:"text-xs",children:t})]}),Yb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a="",onChange:n,placeholder:o="Start writing...",readOnly:s=false,showToolbar:l=true,minHeight:c,maxHeight:d,onEditorReady:m,...u},f)=>{let p=react.useEditor({extensions:[SM__default.default.configure({heading:{levels:[1,2,3]}}),HM__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),VM__default.default,IM__default.default.configure({types:["heading","paragraph"]}),AM__default.default.configure({placeholder:o})],content:a,editable:!s,onUpdate:({editor:x})=>{n?.(x.getHTML());},onCreate:({editor:x})=>{m?.(x);}});K__namespace.useEffect(()=>{p&&a!==p.getHTML()&&p.commands.setContent(a);},[a,p]),K__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let b=()=>{if(!p)return;let x=p.getAttributes("link").href,g=window.prompt("URL",x);if(g!==null){if(g===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:g}).run();}};return p?jsxRuntime.jsx(Dr,{children:jsxRuntime.jsxs("div",{ref:f,className:i(jb({variant:t,size:r,className:e})),...u,children:[l&&!s&&jsxRuntime.jsxs("div",{className:i(tT({size:r})),children:[jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading1,{className:"h-4 w-4"}),title:"Heading 1",isActive:p.isActive("heading",{level:1}),onClick:()=>p.chain().focus().toggleHeading({level:1}).run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading2,{className:"h-4 w-4"}),title:"Heading 2",isActive:p.isActive("heading",{level:2}),onClick:()=>p.chain().focus().toggleHeading({level:2}).run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Heading3,{className:"h-4 w-4"}),title:"Heading 3",isActive:p.isActive("heading",{level:3}),onClick:()=>p.chain().focus().toggleHeading({level:3}).run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Bold,{className:"h-4 w-4"}),title:"Bold (Ctrl+B)",isActive:p.isActive("bold"),onClick:()=>p.chain().focus().toggleBold().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Italic,{className:"h-4 w-4"}),title:"Italic (Ctrl+I)",isActive:p.isActive("italic"),onClick:()=>p.chain().focus().toggleItalic().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Underline,{className:"h-4 w-4"}),title:"Underline (Ctrl+U)",isActive:p.isActive("underline"),onClick:()=>p.chain().focus().toggleUnderline().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.List,{className:"h-4 w-4"}),title:"Bullet List",isActive:p.isActive("bulletList"),onClick:()=>p.chain().focus().toggleBulletList().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.ListOrdered,{className:"h-4 w-4"}),title:"Numbered List",isActive:p.isActive("orderedList"),onClick:()=>p.chain().focus().toggleOrderedList().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignLeft,{className:"h-4 w-4"}),title:"Align Left",isActive:p.isActive({textAlign:"left"}),onClick:()=>p.chain().focus().setTextAlign("left").run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignCenter,{className:"h-4 w-4"}),title:"Align Center",isActive:p.isActive({textAlign:"center"}),onClick:()=>p.chain().focus().setTextAlign("center").run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.AlignRight,{className:"h-4 w-4"}),title:"Align Right",isActive:p.isActive({textAlign:"right"}),onClick:()=>p.chain().focus().setTextAlign("right").run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Code,{className:"h-4 w-4"}),title:"Code Block",isActive:p.isActive("codeBlock"),onClick:()=>p.chain().focus().toggleCodeBlock().run()}),jsxRuntime.jsx(Er,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:b}),jsxRuntime.jsx(Oe,{icon:jsxRuntime.jsx(lucideReact.Unlink,{className:"h-4 w-4"}),title:"Remove Link",onClick:()=>p.chain().focus().unsetLink().run(),disabled:!p.isActive("link")})]}),jsxRuntime.jsx(react.EditorContent,{editor:p,className:i(rT({size:r})),style:{minHeight:c,maxHeight:d}})]})}):null});Yb.displayName="RichTextEditor";var Xb=classVarianceAuthority.cva("flex flex-col border rounded-lg bg-background overflow-hidden",{variants:{variant:{default:"",bordered:"border-2",ghost:"border-none bg-transparent"}},defaultVariants:{variant:"default"}});function dT(e,t,r){return aT.centerCrop(aT.makeAspectCrop({unit:"%",width:90},r,e,t),e,t)}async function Ub(e,t,r=0,a=1){let n=document.createElement("canvas"),o=n.getContext("2d");if(!o)return null;let s=e.naturalWidth/e.width,l=e.naturalHeight/e.height,c=window.devicePixelRatio||1;n.width=Math.floor(t.width*s*c),n.height=Math.floor(t.height*l*c),o.scale(c,c),o.imageSmoothingQuality="high";let d=t.x*s,m=t.y*l,u=r*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return o.save(),o.translate(-d,-m),o.translate(f,p),o.rotate(u),o.scale(a,a),o.translate(-f,-p),o.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),o.restore(),new Promise(b=>{n.toBlob(x=>{b(x);},"image/png");})}var qb=K__namespace.forwardRef(({className:e,variant:t,src:r,aspectRatio:a,onCropChange:n,onCropComplete:o,showZoom:s=true,showRotation:l=true,minZoom:c=1,maxZoom:d=3,circularCrop:m=false,initialCrop:u,...f},p)=>{let b=K__namespace.useRef(null),[x,g]=K__namespace.useState(),[v,w]=K__namespace.useState(),[R,h]=K__namespace.useState(1),[C,y]=K__namespace.useState(0),T=P=>{let{width:L,height:E}=P.currentTarget;if(a){let H=dT(L,E,a);g(H);}else g(u||{unit:"%",x:10,y:10,width:80,height:80});},M=P=>{g(P),n?.(P);},k=async P=>{if(w(P),o&&b.current&&P.width&&P.height){let L=await Ub(b.current,P,C,R);o(L);}},N=()=>{y(P=>(P+90)%360);};return K__namespace.useEffect(()=>{v&&b.current&&o&&Ub(b.current,v,C,R).then(P=>{o(P);});},[R,C,v,o]),jsxRuntime.jsxs("div",{ref:p,className:i(Xb({variant:t,className:e})),...f,children:[jsxRuntime.jsx("div",{className:"flex-1 flex items-center justify-center p-4 bg-muted/30 min-h-[300px]",children:jsxRuntime.jsx(aT__default.default,{crop:x,onChange:M,onComplete:k,aspect:a,circularCrop:m,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:b,src:r,alt:"Crop preview",onLoad:T,style:{transform:`scale(${R}) rotate(${C}deg)`,maxHeight:"400px"}})})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 p-3 border-t",children:[s&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsxRuntime.jsx(lucideReact.ZoomOut,{className:"h-4 w-4 text-muted-foreground"}),jsxRuntime.jsx(Do,{value:[R],onValueChange:([P])=>h(P),min:c,max:d,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),l&&jsxRuntime.jsx(X,{variant:"bordered",size:"icon",onClick:N,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});qb.displayName="ImageCropper";var Ll=classVarianceAuthority.cva("inline-block",{variants:{variant:{default:"",bordered:"border rounded-lg p-2",card:"border rounded-lg p-4 bg-card shadow-sm"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),pT={sm:96,md:128,lg:192},Jb=K__namespace.forwardRef(({className:e,variant:t,size:r,value:a,qrSize:n,fgColor:o="currentColor",bgColor:s="transparent",level:l="M",includeMargin:c=false,title:d,logo:m,logoSize:u=40,logoPadding:f=4,logoBackgroundColor:p="white",...b},x)=>{let g=n??pT[r??"md"];return a?jsxRuntime.jsx("div",{ref:x,className:i(Ll({variant:t,size:r,className:e})),...b,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(uT__default.default,{value:a,size:g,fgColor:o,bgColor:s,level:l,title:d,style:{padding:c?16:0}}),m&&jsxRuntime.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded",style:{padding:f,backgroundColor:p},children:jsxRuntime.jsx("img",{src:m,alt:"Logo",style:{width:u,height:u,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:x,className:i(Ll({variant:t,size:r,className:e})),...b,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:g,height:g},children:"No data"})})});Jb.displayName="QRCode";var Qb=({children:e,defaultTheme:t="system",storageKey:r="reever-ui-theme",enableSystem:a=true,disableTransitionOnChange:n=false,attribute:o="class",forcedTheme:s,themes:l=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:r,enableSystem:a,disableTransitionOnChange:n,attribute:o,forcedTheme:s,themes:l,children:e});Qb.displayName="ThemeProvider";var yT=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),ev=K__namespace.forwardRef(({className:e,variant:t="ghost",size:r="md",mode:a="dropdown"},n)=>{let{theme:o,setTheme:s,resolvedTheme:l}=nextThemes.useTheme(),[c,d]=K__namespace.useState(false);K__namespace.useEffect(()=>{d(true);},[]);let m=()=>{let u=["light","dark","system"],p=(u.indexOf(o||"system")+1)%u.length;s(u[p]);};return c?a==="cycle"?jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),onClick:m,children:[l==="dark"?jsxRuntime.jsx(lucideReact.Moon,{className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]}):jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),jsxRuntime.jsx(lucideReact.Moon,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),jsxRuntime.jsxs(zr,{align:"end",children:[jsxRuntime.jsxs(Ot,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(Ot,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(Ot,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(X,{ref:n,variant:t==="default"?"bordered":t,size:"icon",className:i("h-9 w-9",e),disabled:true,children:[jsxRuntime.jsx(lucideReact.Sun,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle theme"})]})});ev.displayName="ThemeToggle";var tv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),rv=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background file:border-0 file:bg-transparent file:font-medium file:text-foreground 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.5 py-1.5 text-xs",md:"h-10 px-3 py-2 text-sm",lg:"h-12 px-4 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),av=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),nv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,startContent:u,endContent:f,id:p,...b},x)=>{let g=K__namespace.useId(),v=p||g,w=`${v}-description`,R=`${v}-error`,h=o&&a;return jsxRuntime.jsxs("div",{className:i(tv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:v,className:i(av({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[u&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:u}),jsxRuntime.jsx("input",{ref:x,id:v,"aria-invalid":o,"aria-describedby":h?R:r?w:void 0,"aria-required":n,className:i(rv({size:s,isInvalid:o}),u&&"pl-10",f&&"pr-10",c),...b}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),r&&!h&&jsxRuntime.jsx("p",{id:w,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),h&&jsxRuntime.jsx("p",{id:R,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});nv.displayName="TextField";var iv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),CT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",{variants:{size:{sm:"h-8 px-8 py-1.5 text-xs",md:"h-10 px-10 py-2 text-sm",lg:"h-12 px-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit min-w-24"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),ov=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors",{variants:{size:{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"}},defaultVariants:{size:"md"}}),sv=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),NT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),lv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,min:u,max:f,step:p=1,value:b,defaultValue:x,onChange:g,showButtons:v=true,formatOptions:w,fullWidth:R=false,disabled:h,id:C,...y},T)=>{let M=K__namespace.useId(),k=C||M,N=`${k}-description`,P=`${k}-error`,[L,E]=K__namespace.useState(x),[H,S]=K__namespace.useState(false),D=b!==void 0?b:L,I=o&&a,z=K__namespace.useCallback($=>{$!==void 0&&(u!==void 0&&$<u&&($=u),f!==void 0&&$>f&&($=f)),b===void 0&&E($),g?.($);},[b,u,f,g]),G=()=>{let $=(D??0)+p;z($);},V=()=>{let $=(D??0)-p;z($);},B=$=>{let ae=$.target.value;if(ae==="")z(void 0);else {let O=parseFloat(ae);isNaN(O)||z(O);}},A=$=>{$.key==="ArrowUp"?($.preventDefault(),G()):$.key==="ArrowDown"&&($.preventDefault(),V());},W=K__namespace.useMemo(()=>D===void 0?"":w?new Intl.NumberFormat(void 0,w).format(D):D.toString(),[D,w]),q=u!==void 0&&D!==void 0&&D<=u,F=f!==void 0&&D!==void 0&&D>=f;return jsxRuntime.jsxs("div",{className:i(iv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:k,className:i(NT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[v&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:h||q,className:i(ov({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:i(sv({size:s}))})}),jsxRuntime.jsx("input",{ref:T,id:k,type:"text",inputMode:"decimal",value:W,onChange:B,onKeyDown:A,onFocus:()=>S(true),onBlur:()=>S(false),"aria-invalid":o,"aria-describedby":I?P:r?N:void 0,"aria-required":n,"aria-valuemin":u,"aria-valuemax":f,"aria-valuenow":D,disabled:h,className:i(CT({size:s,isInvalid:o,fullWidth:R}),!v&&"px-3",c),style:{borderColor:H?"var(--color-foreground)":void 0},...y}),v&&jsxRuntime.jsx("button",{type:"button",onClick:G,disabled:h||F,className:i(ov({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:i(sv({size:s}))})})]}),r&&!I&&jsxRuntime.jsx("p",{id:N,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),I&&jsxRuntime.jsx("p",{id:P,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});lv.displayName="NumberField";var dv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),PT=classVarianceAuthority.cva("flex w-full rounded-md border border-input bg-background ring-offset-background 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 pl-8 pr-8 py-1.5 text-xs",md:"h-10 pl-10 pr-10 py-2 text-sm",lg:"h-12 pl-12 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus-visible:ring-danger",false:""}},defaultVariants:{size:"md",isInvalid:false}}),cv=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),kT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),LT=classVarianceAuthority.cva("absolute top-1/2 -translate-y-1/2 flex items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",{variants:{size:{sm:"h-5 w-5 right-1.5",md:"h-6 w-6 right-2",lg:"h-7 w-7 right-2.5"}},defaultVariants:{size:"md"}}),uv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f="",onChange:p,onClear:b,onSearch:x,showClearButton:g=true,showSearchIcon:v=true,disabled:w,placeholder:R="Search...",id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,[P,L]=K__namespace.useState(f),E=u!==void 0?u:P,H=o&&a,S=E.length>0,D=G=>{let V=G.target.value;u===void 0&&L(V),p?.(V);},I=()=>{u===void 0&&L(""),p?.(""),b?.();},z=G=>{G.key==="Enter"?(G.preventDefault(),x?.(E)):G.key==="Escape"&&S&&(G.preventDefault(),I());};return jsxRuntime.jsxs("div",{className:i(dv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(kT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[v&&jsxRuntime.jsx(lucideReact.Search,{className:i(cv({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:y,id:M,type:"search",value:E,onChange:D,onKeyDown:z,placeholder:R,"aria-invalid":o,"aria-describedby":H?N:r?k:void 0,"aria-required":n,disabled:w,className:i(PT({size:s,isInvalid:o}),!v&&"pl-3",!g&&"pr-3",c),...C}),g&&S&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:I,className:i(LT({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:i(cv({size:s}))})})]}),r&&!H&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),H&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});uv.displayName="SearchField";var mv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),DT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-calendar-picker-indicator]:hidden",{variants:{size:{sm:"h-8 pl-3 pr-8 py-1.5 text-xs",md:"h-10 pl-3 pr-10 py-2 text-sm",lg:"h-12 pl-4 pr-12 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),ST=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),HT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Il=(e,t="yyyy-MM-dd")=>{if(!e)return "";let r=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",a).replace("dd",n)},VT=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},pv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f,onChange:p,minDate:b,maxDate:x,dateFormat:g="yyyy-MM-dd",showIcon:v=true,fullWidth:w=false,disabled:R,id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,P=K__namespace.useRef(null),L=y||P,[E,H]=K__namespace.useState(f??null),[S,D]=K__namespace.useState(false),I=()=>{!R&&L.current&&L.current.showPicker?.();},z=u!==void 0?u:E,G=o&&a,V=q=>{let F=VT(q.target.value);u===void 0&&H(F),p?.(F);},B=z?Il(z,"yyyy-MM-dd"):"",A=b?Il(b,"yyyy-MM-dd"):void 0,W=x?Il(x,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:i(mv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(HT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:i("relative",w?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:L,id:M,type:"date",value:B,onChange:V,onFocus:()=>D(true),onBlur:()=>D(false),min:A,max:W,"aria-invalid":o,"aria-describedby":G?N:r?k:void 0,"aria-required":n,disabled:R,className:i(DT({size:s,isInvalid:o,fullWidth:w}),!v&&"pr-3",c),style:{borderColor:S?"var(--color-foreground)":void 0},...C}),v&&jsxRuntime.jsx("button",{type:"button",onClick:I,disabled:R,className:"absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",tabIndex:-1,"aria-label":"Open calendar",children:jsxRuntime.jsx(lucideReact.Calendar,{className:i(ST({size:s}))})})]}),r&&!G&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),G&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});pv.displayName="DateField";var fv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),IT=classVarianceAuthority.cva("inline-flex items-center rounded-md border border-input bg-background transition-colors",{variants:{size:{sm:"h-8 px-2 gap-0.5 text-xs",md:"h-10 px-3 gap-1 text-sm",lg:"h-12 px-4 gap-1.5 text-base"},isInvalid:{true:"border-danger",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""},fullWidth:{true:"w-full justify-center",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,disabled:false,fullWidth:false}}),AT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),gv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f,onChange:p,minTime:b,maxTime:x,showSeconds:g=false,hourCycle:v=24,disabled:w,fullWidth:R=false,id:h,...C},y)=>{let T=K__namespace.useId(),M=h||T,k=`${M}-description`,N=`${M}-error`,P=K__namespace.useRef(null),L=K__namespace.useRef(null),E=K__namespace.useRef(null),H=K__namespace.useRef(null),[S,D]=K__namespace.useState(f??null),I=u!==void 0?u:S,z=o&&a,G=_=>v===24?_:_===0?12:_>12?_-12:_,V=_=>_>=12?"PM":"AM",B=(_,re)=>re==="AM"?_===12?0:_:_===12?12:_+12,[A,W]=K__namespace.useState(I?String(G(I.hour)).padStart(2,"0"):""),[q,F]=K__namespace.useState(I?String(I.minute).padStart(2,"0"):""),[$,ae]=K__namespace.useState(I?.second!==void 0?String(I.second).padStart(2,"0"):""),[O,ee]=K__namespace.useState(I?V(I.hour):"AM"),[Q,st]=K__namespace.useState(false);K__namespace.useEffect(()=>{u!==void 0&&(u?(W(String(G(u.hour)).padStart(2,"0")),F(String(u.minute).padStart(2,"0")),u.second!==void 0&&ae(String(u.second).padStart(2,"0")),ee(V(u.hour))):(W(""),F(""),ae("")));},[u,v]);let Ye=(_,re,Ge,tr)=>{let ye=parseInt(_,10),Tt=parseInt(re,10),rr=g?parseInt(Ge,10):void 0;if(isNaN(ye)||isNaN(Tt)||g&&isNaN(rr)){u===void 0&&D(null),p?.(null);return}let uc={hour:v===12?B(ye,tr):ye,minute:Tt,...g&&rr!==void 0&&{second:rr}};u===void 0&&D(uc),p?.(uc);},cc=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);W(re);let Ge=v===24?23:12,tr=v===24?0:1;if(re.length===2){let ye=parseInt(re,10);ye>=tr&&ye<=Ge&&(L.current?.focus(),L.current?.select());}},oe=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);if(F(re),re.length===2){let Ge=parseInt(re,10);Ge>=0&&Ge<=59&&(g?(E.current?.focus(),E.current?.select()):v===12&&H.current?.focus());}},Mt=_=>{let re=_.target.value.replace(/\D/g,"").slice(0,2);ae(re),re.length===2&&v===12&&H.current?.focus();},oo=()=>{if(A){let _=parseInt(A,10),re=v===24?23:12,tr=Math.min(Math.max(_,v===24?0:1),re),ye=String(tr).padStart(2,"0");W(ye),Ye(ye,q,$,O);}},oa=()=>{if(q){let _=parseInt(q,10),re=Math.min(Math.max(_,0),59),Ge=String(re).padStart(2,"0");F(Ge),Ye(A,Ge,$,O);}},my=()=>{if($){let _=parseInt($,10),re=Math.min(Math.max(_,0),59),Ge=String(re).padStart(2,"0");ae(Ge),Ye(A,q,Ge,O);}},dc=()=>{let _=O==="AM"?"PM":"AM";ee(_),Ye(A,q,$,_);},py=_=>{let re=_.key.toLowerCase();re==="a"?(_.preventDefault(),O!=="AM"&&(ee("AM"),Ye(A,q,$,"AM"))):re==="p"?(_.preventDefault(),O!=="PM"&&(ee("PM"),Ye(A,q,$,"PM"))):re==="arrowup"||re==="arrowdown"?(_.preventDefault(),dc()):re==="arrowleft"&&(_.preventDefault(),g?(E.current?.focus(),E.current?.select()):(L.current?.focus(),L.current?.select()));},Zs=(_,re)=>{if(_.key==="ArrowUp"||_.key==="ArrowDown"){_.preventDefault();let Ge=_.key==="ArrowUp"?1:-1;if(re==="hour"){let tr=parseInt(A,10)||0,ye=v===24?23:12,Tt=v===24?0:1,rr=tr+Ge;rr>ye&&(rr=Tt),rr<Tt&&(rr=ye);let Qs=String(rr).padStart(2,"0");W(Qs),Ye(Qs,q,$,O);}else if(re==="minute"){let ye=(parseInt(q,10)||0)+Ge;ye>59&&(ye=0),ye<0&&(ye=59);let Tt=String(ye).padStart(2,"0");F(Tt),Ye(A,Tt,$,O);}else if(re==="second"){let ye=(parseInt($,10)||0)+Ge;ye>59&&(ye=0),ye<0&&(ye=59);let Tt=String(ye).padStart(2,"0");ae(Tt),Ye(A,q,Tt,O);}}_.key==="ArrowRight"&&(_.preventDefault(),re==="hour"?(L.current?.focus(),L.current?.select()):re==="minute"&&g?(E.current?.focus(),E.current?.select()):(re==="minute"&&!g&&v===12||re==="second"&&v===12)&&H.current?.focus()),_.key==="ArrowLeft"&&(_.preventDefault(),re==="minute"?(P.current?.focus(),P.current?.select()):re==="second"&&(L.current?.focus(),L.current?.select())),_.key==="Backspace"&&_.currentTarget.value===""&&(re==="minute"?P.current?.focus():re==="second"&&L.current?.focus());},Js=i((()=>{switch(s){case "sm":return "w-5";case "lg":return "w-7";default:return "w-6"}})(),"bg-transparent text-center outline-none placeholder:text-muted-foreground tabular-nums",w&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:y,className:i(fv({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:i(AT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:i(IT({size:s,isInvalid:o,disabled:w,fullWidth:R}),c),style:{borderColor:Q?"var(--color-foreground)":void 0},onFocus:()=>st(true),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||st(false);},children:[jsxRuntime.jsx("input",{ref:P,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:A,onChange:cc,onBlur:oo,onKeyDown:_=>Zs(_,"hour"),onFocus:_=>_.target.select(),"aria-label":"Hour","aria-invalid":o,"aria-describedby":z?N:r?k:void 0,"aria-required":n,disabled:w,className:Js}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:L,type:"text",inputMode:"numeric",placeholder:"mm",value:q,onChange:oe,onBlur:oa,onKeyDown:_=>Zs(_,"minute"),onFocus:_=>_.target.select(),"aria-label":"Minute",disabled:w,className:Js}),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:E,type:"text",inputMode:"numeric",placeholder:"ss",value:$,onChange:Mt,onBlur:my,onKeyDown:_=>Zs(_,"second"),onFocus:_=>_.target.select(),"aria-label":"Second",disabled:w,className:Js})]}),v===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:dc,onKeyDown:py,disabled:w,className:i("ml-0.5 rounded text-muted-foreground hover:text-foreground focus:outline-none focus:text-foreground transition-colors tabular-nums",s==="sm"?"w-6":s==="lg"?"w-8":"w-7",w&&"cursor-not-allowed"),"aria-label":"AM/PM",children:O})]}),r&&!z&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),z&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});gv.displayName="TimeField";var vv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),BT=classVarianceAuthority.cva("flex rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-50 font-mono uppercase",{variants:{size:{sm:"h-8 pl-10 pr-3 py-1.5 text-xs",md:"h-10 pl-12 pr-3 py-2 text-sm",lg:"h-12 pl-14 pr-4 py-3 text-base"},isInvalid:{true:"border-danger focus:border-danger",false:""},fullWidth:{true:"w-full",false:"w-fit"}},defaultVariants:{size:"md",isInvalid:false,fullWidth:false}}),OT=classVarianceAuthority.cva("absolute left-2 top-1/2 -translate-y-1/2 rounded border border-input overflow-hidden",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),FT=classVarianceAuthority.cva("font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),bv=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),GT=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),hv=K__namespace.forwardRef(({className:e,label:t,description:r,errorMessage:a,isRequired:n,isInvalid:o,size:s,labelClassName:l,inputClassName:c,descriptionClassName:d,errorClassName:m,value:u,defaultValue:f="#000000",onChange:p,showSwatch:b=true,showPicker:x=true,allowAlpha:g=false,fullWidth:v=false,disabled:w,id:R,...h},C)=>{let y=K__namespace.useId(),T=R||y,M=`${T}-picker`,k=`${T}-description`,N=`${T}-error`,[P,L]=K__namespace.useState(f),[E,H]=K__namespace.useState(false),S=u!==void 0?u:P,D=o&&a,I=B=>{let A=B.target.value;A&&!A.startsWith("#")&&(A="#"+A),u===void 0&&L(A),p?.(A);},z=B=>{let A=B.target.value.toUpperCase();u===void 0&&L(A),p?.(A);},G=()=>{if(S&&bv(S)){let B=GT(S);B!==S&&(u===void 0&&L(B),p?.(B));}},V=bv(S)?S:"#000000";return jsxRuntime.jsxs("div",{className:i(vv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:i(FT({size:s}),l),children:[t,n&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("div",{className:i(OT({size:s})),children:x?jsxRuntime.jsxs("label",{htmlFor:M,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:M,type:"color",value:V,onChange:z,disabled:w,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:V}})}),jsxRuntime.jsx("input",{ref:C,id:T,type:"text",value:S,onChange:I,onFocus:()=>H(true),onBlur:()=>{H(false),G();},placeholder:"#000000",maxLength:g?9:7,"aria-invalid":o,"aria-describedby":D?N:r?k:void 0,"aria-required":n,disabled:w,className:i(BT({size:s,isInvalid:o,fullWidth:v}),!b&&"pl-3",c),style:{borderColor:E?"var(--color-foreground)":void 0},...h})]}),r&&!D&&jsxRuntime.jsx("p",{id:k,className:i("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r}),D&&jsxRuntime.jsx("p",{id:N,role:"alert",className:i("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",m),children:a})]})});hv.displayName="ColorField";var yv=classVarianceAuthority.cva("inline-flex",{variants:{variant:{default:"",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},spacing:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3"}},compoundVariants:[{variant:"attached",spacing:["sm","md","lg"],className:"gap-0"}],defaultVariants:{variant:"default",orientation:"horizontal",spacing:"sm"}}),Rv=K__namespace.createContext({});function $T(){return K__namespace.useContext(Rv)}var wv=K__namespace.forwardRef(({className:e,variant:t,orientation:r,spacing:a,disabled:n,children:o,...s},l)=>jsxRuntime.jsx(Rv.Provider,{value:{disabled:n},children:jsxRuntime.jsx("div",{ref:l,role:"group",className:i(yv({variant:t,orientation:r,spacing:a,className:e})),...s,children:o})}));wv.displayName="ButtonGroup";var Nv=classVarianceAuthority.cva("inline-flex items-center justify-center 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:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",soft:"bg-primary/10 text-primary hover:bg-primary/20",surface:"bg-muted text-muted-foreground hover:bg-muted/80"},size:{sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10",xl:"h-12 w-12"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"ghost",size:"md",radius:"md"}}),Mv=K__namespace.forwardRef(({className:e,variant:t,size:r,radius:a,isLoading:n,disabled:o,children:s,...l},c)=>{let d={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-6 w-6"}[r??"md"];return jsxRuntime.jsx("button",{ref:c,type:"button",disabled:o||n,className:i(Nv({variant:t,size:r,radius:a,className:e})),...l,children:n?jsxRuntime.jsxs("svg",{className:i("animate-spin",d),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",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"})]}):jsxRuntime.jsx("span",{className:i("[&>svg]:h-full [&>svg]:w-full",d),children:s})})});Mv.displayName="IconButton";var Pv=classVarianceAuthority.cva("inline-flex items-center",{variants:{variant:{default:"gap-1",compact:"gap-0.5",attached:"[&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child)]:-ml-px gap-0"},orientation:{horizontal:"flex-row",vertical:"flex-col [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none [&>*:not(:first-child)]:-mt-px [&>*:not(:first-child)]:ml-0"},size:{sm:"",md:"",lg:""},density:{compact:"gap-0.5",regular:"gap-1",spacious:"gap-2"}},defaultVariants:{variant:"default",orientation:"horizontal",size:"md",density:"regular"}}),kv=K__namespace.forwardRef(({className:e,variant:t,orientation:r,size:a,density:n,items:o,maxVisibleItems:s,isDisabled:l,onAction:c,showLabels:d=false,renderItem:m,...u},f)=>{let p=s&&s<o.length?o.slice(0,s):o,b=s&&s<o.length?o.slice(s):[],x={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[a??"md"],g={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[a??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[a??"md"],w=(h,C)=>{C&&C(),c&&c(h);},R=h=>jsxRuntime.jsxs("button",{type:"button",disabled:l||h.isDisabled,onClick:()=>w(h.key,h.onPress),className:i("inline-flex items-center justify-center gap-2 rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",d?x:g),"aria-label":h.label,children:[h.icon&&jsxRuntime.jsx("span",{className:v,children:h.icon}),d&&jsxRuntime.jsx("span",{children:h.label})]},h.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:i(Pv({variant:t,orientation:r,size:a,density:n,className:e})),...u,children:[p.map(h=>m?m(h):R(h)),b.length>0&&jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",disabled:l,className:i("inline-flex items-center justify-center rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50",g),"aria-label":"More actions",children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:v})})}),jsxRuntime.jsx(zr,{align:"end",children:b.map(h=>jsxRuntime.jsxs(Ot,{disabled:h.isDisabled,onClick:()=>w(h.key,h.onPress),children:[h.icon&&jsxRuntime.jsx("span",{className:i(v,"mr-2"),children:h.icon}),h.label]},h.key))})]})]})});kv.displayName="ActionGroup";var Sv=classVarianceAuthority.cva("inline-flex items-center gap-2",{variants:{variant:{neutral:"[--status-color:theme(colors.muted.foreground)]",info:"[--status-color:theme(colors.blue.500)]",positive:"[--status-color:theme(colors.green.500)]",notice:"[--status-color:theme(colors.yellow.500)]",negative:"[--status-color:theme(colors.red.500)]"},size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{variant:"neutral",size:"md"}}),UT=classVarianceAuthority.cva("rounded-full bg-[--status-color] flex-shrink-0",{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2.5 w-2.5"},pulse:{true:"animate-pulse",false:""}},defaultVariants:{size:"md",pulse:false}}),Hv=K__namespace.forwardRef(({className:e,variant:t,size:r,pulse:a=false,hideLabel:n=false,children:o,...s},l)=>jsxRuntime.jsxs("span",{ref:l,role:"status",className:i(Sv({variant:t,size:r,className:e})),...s,children:[jsxRuntime.jsx("span",{className:i(UT({size:r,pulse:a})),"aria-hidden":"true"}),!n&&o&&jsxRuntime.jsx("span",{className:"text-foreground",children:o})]}));Hv.displayName="StatusLight";var Iv=classVarianceAuthority.cva("flex flex-col items-center justify-center text-center",{variants:{size:{sm:"gap-3 max-w-xs",md:"gap-4 max-w-sm",lg:"gap-5 max-w-md"}},defaultVariants:{size:"md"}}),qT=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"[&>svg]:h-16 [&>svg]:w-16",md:"[&>svg]:h-24 [&>svg]:w-24",lg:"[&>svg]:h-32 [&>svg]:w-32"}},defaultVariants:{size:"md"}}),ZT=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),JT=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Av=K__namespace.forwardRef(({className:e,size:t,illustration:r,heading:a,description:n,children:o,...s},l)=>jsxRuntime.jsxs("div",{ref:l,className:i(Iv({size:t,className:e})),...s,children:[r&&jsxRuntime.jsx("div",{className:i(qT({size:t})),"aria-hidden":"true",children:r}),a&&jsxRuntime.jsx("h3",{className:i(ZT({size:t})),children:a}),n&&jsxRuntime.jsx("p",{className:i(JT({size:t})),children:n}),o&&jsxRuntime.jsx("div",{className:"mt-2",children:o})]}));Av.displayName="IllustratedMessage";var Ov=classVarianceAuthority.cva("relative flex gap-3 rounded-lg border p-4 text-sm",{variants:{variant:{info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-400",error:"border-red-200 bg-red-50 text-red-900 dark:border-red-800 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400",neutral:"border-border bg-muted text-foreground [&>svg]:text-muted-foreground"}},defaultVariants:{variant:"info"}}),oP={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},Fv=K__namespace.forwardRef(({className:e,variant:t,title:r,icon:a,hideIcon:n=false,isDismissible:o=false,onDismiss:s,actions:l,children:c,...d},m)=>{let[u,f]=K__namespace.useState(true);if(!u)return null;let p=oP[t??"info"],b=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:m,role:"alert",className:i(Ov({variant:t,className:e})),...d,children:[!n&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[r&&jsxRuntime.jsx("div",{className:"font-medium",children:r}),c&&jsxRuntime.jsx("div",{className:"opacity-90",children:c}),l&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:l})]}),o&&jsxRuntime.jsx("button",{type:"button",onClick:b,className:"absolute right-2 top-2 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Fv.displayName="InlineAlert";var Gv=classVarianceAuthority.cva("fixed flex items-center gap-2 rounded-lg border bg-background shadow-lg transition-all duration-200",{variants:{position:{bottom:"bottom-4 left-1/2 -translate-x-1/2",top:"top-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"},size:{sm:"px-3 py-2 gap-1.5",md:"px-4 py-2.5 gap-2",lg:"px-5 py-3 gap-3"}},defaultVariants:{position:"bottom",size:"md"}}),Kv=K__namespace.forwardRef(({className:e,position:t,size:r,selectedCount:a=0,isOpen:n=true,onClose:o,showClose:s=true,selectedText:l,children:c,...d},m)=>{if(!n||a===0)return null;let u=()=>typeof l=="function"?l(a):l||`${a} item${a>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:m,role:"toolbar","aria-label":"Actions for selected items",className:i(Gv({position:t,size:r,className:e})),...d,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:u()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:c}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors","aria-label":"Close action bar",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]})});Kv.displayName="ActionBar";var $v=K__namespace.forwardRef(({className:e,icon:t,children:r,...a},n)=>jsxRuntime.jsxs("button",{ref:n,type:"button",className:i("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",e),...a,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),r]}));$v.displayName="ActionBarButton";var _v=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{ghost:"hover:bg-accent hover:text-accent-foreground",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",subtle:"text-muted-foreground hover:text-foreground hover:bg-muted"},size:{sm:"h-7 w-7",md:"h-8 w-8",lg:"h-9 w-9"}},defaultVariants:{variant:"ghost",size:"md"}});function mP(e){return "items"in e}var Wv=K__namespace.forwardRef(({items:e,align:t="end",side:r="bottom",iconOrientation:a="vertical",trigger:n,variant:o,size:s,onAction:l,"aria-label":c="More actions",triggerClassName:d,disabled:m},u)=>{let f={sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}[s??"md"],p=a==="horizontal"?lucideReact.MoreHorizontal:lucideReact.MoreVertical,b=g=>{g.onSelect?.(),l?.(g.key);},x=g=>jsxRuntime.jsxs(Ot,{disabled:g.isDisabled,onClick:()=>b(g),className:i(g.isDestructive&&"text-destructive focus:text-destructive"),children:[g.icon&&jsxRuntime.jsx("span",{className:"mr-2 h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsx("span",{className:"flex-1",children:g.label}),g.shortcut&&jsxRuntime.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:g.shortcut})]},g.key);return jsxRuntime.jsxs(Ir,{children:[jsxRuntime.jsx(Ar,{asChild:true,children:n||jsxRuntime.jsx("button",{ref:u,type:"button",disabled:m,className:i(_v({variant:o,size:s}),d),"aria-label":c,children:jsxRuntime.jsx(p,{className:f})})}),jsxRuntime.jsx(zr,{align:t,side:r,children:e.map((g,v)=>mP(g)?jsxRuntime.jsxs(K__namespace.Fragment,{children:[v>0&&jsxRuntime.jsx(Ro,{}),g.items.map(x)]},g.key):x(g))})]})});Wv.displayName="ActionMenu";var Uv=classVarianceAuthority.cva("flex flex-col",{variants:{variant:{default:"gap-1",bordered:"border rounded-lg divide-y",cards:"gap-2"},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"default",size:"md"}}),Xv=classVarianceAuthority.cva("flex items-center gap-3 transition-colors cursor-pointer",{variants:{variant:{default:"rounded-md hover:bg-accent",bordered:"hover:bg-accent",cards:"rounded-lg border hover:border-primary/50 hover:bg-accent/50"},size:{sm:"px-2 py-1.5 text-sm",md:"px-3 py-2",lg:"px-4 py-3 text-lg"},isSelected:{true:"bg-accent",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"cards",isSelected:true,className:"border-primary bg-accent"}],defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function qv({className:e,variant:t,size:r,items:a,selectedKeys:n,selectionMode:o="none",onSelectionChange:s,allowsDragging:l=false,onReorder:c,showCheckbox:d=false,renderItem:m,emptyContent:u,...f}){let[p,b]=K__namespace.useState(new Set),[x,g]=K__namespace.useState(null),[v,w]=K__namespace.useState(null),R=K__namespace.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),h=M=>{if(o==="none")return;let k;o==="single"?k=R.has(M)?new Set:new Set([M]):(k=new Set(R),k.has(M)?k.delete(M):k.add(M)),n||b(k),s?.(k);},C=(M,k)=>{g(k),M.dataTransfer.effectAllowed="move";},y=(M,k)=>{M.preventDefault(),x!==k&&w(k);},T=()=>{if(x&&v&&x!==v){let M=a.findIndex(L=>L.key===x),k=a.findIndex(L=>L.key===v),N=[...a],[P]=N.splice(M,1);N.splice(k,0,P),c?.(N);}g(null),w(null);};return a.length===0?jsxRuntime.jsx("div",{className:i("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":o==="multiple",className:i(Uv({variant:t,size:r,className:e})),...f,children:a.map(M=>{let k=R.has(M.key),N=x===M.key,P=v===M.key;return m?jsxRuntime.jsx("div",{role:"option","aria-selected":k,onClick:()=>h(M.key),children:m(M,k)},M.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":k,"aria-disabled":M.isDisabled,draggable:l&&!M.isDisabled,onDragStart:L=>C(L,M.key),onDragOver:L=>y(L,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&h(M.key),className:i(Xv({variant:t,size:r,isSelected:k,isDisabled:M.isDisabled}),N&&"opacity-50",P&&"border-t-2 border-t-primary"),children:[l&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),d&&o!=="none"&&jsxRuntime.jsx("div",{className:i("flex h-4 w-4 items-center justify-center rounded border",k?"bg-primary border-primary text-primary-foreground":"border-input"),children:k&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),M.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 text-muted-foreground [&>svg]:h-full [&>svg]:w-full",children:M.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:M.label}),M.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:M.description})]})]},M.key)})})}qv.displayName="ListView";var Zv=classVarianceAuthority.cva("relative flex w-full touch-none select-none",{variants:{orientation:{horizontal:"items-center",vertical:"flex-col justify-center h-full"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),gP=classVarianceAuthority.cva("relative grow overflow-hidden rounded-full bg-secondary",{variants:{orientation:{horizontal:"w-full",vertical:"w-2 h-full"},size:{sm:"h-1",md:"h-2",lg:"h-3"}},compoundVariants:[{orientation:"vertical",size:"sm",className:"w-1 h-full"},{orientation:"vertical",size:"md",className:"w-2 h-full"},{orientation:"vertical",size:"lg",className:"w-3 h-full"}],defaultVariants:{orientation:"horizontal",size:"md"}}),bP=classVarianceAuthority.cva("block 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 disabled:pointer-events-none disabled:opacity-50 cursor-grab",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{size:"md"}}),Jv=K__namespace.forwardRef(({className:e,orientation:t="horizontal",size:r="md",value:a,defaultValue:n=[25,75],onValueChange:o,onValueCommit:s,min:l=0,max:c=100,step:d=1,disabled:m=false,showLabels:u=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:b,...x},g)=>{let[v,w]=K__namespace.useState(n),R=a!==void 0,h=R?a:v,C=K__namespace.useRef(null),[y,T]=K__namespace.useState(false),[M,k]=K__namespace.useState(null),N=(V,B)=>{if(!C.current)return h[0];let A=C.current.getBoundingClientRect(),W;t==="horizontal"?W=(V-A.left)/A.width:W=1-(B-A.top)/A.height,W=Math.max(0,Math.min(1,W));let q=l+W*(c-l),F=Math.round(q/d)*d;return Math.max(l,Math.min(c,F))},P=(V,B)=>{let A=[...h];A[B]=V,B===0&&V>h[1]&&(A[0]=h[1]),B===1&&V<h[0]&&(A[1]=h[0]),R||w(A),o?.(A);},L=(V,B)=>{m||(V.preventDefault(),T(true),k(B),V.target.setPointerCapture(V.pointerId));},E=V=>{if(!y||M===null||m)return;let B=N(V.clientX,V.clientY);P(B,M);},H=()=>{y&&(T(false),k(null),s?.(h));},S=V=>{if(m)return;let B=N(V.clientX,V.clientY),A=Math.abs(h[0]-B),W=Math.abs(h[1]-B),q=A<=W?0:1;P(B,q);let F=[...h];F[q]=B,s?.(F);},D=(V,B)=>{if(m)return;let A=h[B];switch(V.key){case "ArrowRight":case "ArrowUp":V.preventDefault(),A=Math.min(c,h[B]+d);break;case "ArrowLeft":case "ArrowDown":V.preventDefault(),A=Math.max(l,h[B]-d);break;case "Home":V.preventDefault(),A=l;break;case "End":V.preventDefault(),A=c;break;default:return}P(A,B);let W=[...h];W[B]=A,s?.(W);},I=V=>(V-l)/(c-l)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],G={sm:14,md:20,lg:24}[r||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[u&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(h[0])}),jsxRuntime.jsx("span",{children:f(h[1])})]}),jsxRuntime.jsxs("div",{ref:g,className:i(Zv({orientation:t,size:r}),m&&"opacity-50 pointer-events-none",e),...x,children:[jsxRuntime.jsx("div",{ref:C,className:i(gP({orientation:t,size:r})),onClick:S,children:jsxRuntime.jsx("div",{className:i("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${I(h[0])}%`,right:`${100-I(h[1])}%`,top:0,bottom:0}:{bottom:`${I(h[0])}%`,top:`${100-I(h[1])}%`,left:0,right:0}})}),h.map((V,B)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:m?-1:0,"aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":V,"aria-orientation":t||void 0,"aria-disabled":m,className:i(bP({size:r}),y&&M===B&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${I(V)}% - ${G/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${I(V)}% - ${G/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:A=>L(A,B),onPointerMove:E,onPointerUp:H,onPointerCancel:H,onKeyDown:A=>D(A,B)},B)),b&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${b}[0]`,value:h[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${b}[1]`,value:h[1]})]})]})]})});Jv.displayName="RangeSlider";var $l=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{help:"text-muted-foreground hover:text-foreground",info:"text-blue-500 hover:text-blue-600",warning:"text-yellow-500 hover:text-yellow-600"},size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"help",size:"md"}}),RP=classVarianceAuthority.cva("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",{variants:{size:{sm:"w-56 text-xs",md:"w-72 text-sm",lg:"w-80 text-base"}},defaultVariants:{size:"md"}}),wP={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},th=K__namespace.forwardRef(({variant:e="help",size:t,title:r,children:a,trigger:n,side:o="top",align:s="center",open:l,onOpenChange:c,learnMoreUrl:d,learnMoreText:m="Learn more",triggerClassName:u,contentClassName:f},p)=>{let[b,x]=K__namespace.useState(false),[g,v]=K__namespace.useState(false),[w,R]=K__namespace.useState({top:0,left:0}),h=K__namespace.useRef(null),C=K__namespace.useRef(null),y=l!==void 0?l:b,T=K__namespace.useCallback(P=>{l===void 0&&x(P),c?.(P);},[l,c]);K__namespace.useEffect(()=>{v(true);},[]),K__namespace.useEffect(()=>{if(!y||!h.current)return;let P=()=>{let L=h.current.getBoundingClientRect(),E=288,H=8,S=0,D=0;switch(o){case "top":S=L.top-H,D=L.left+L.width/2;break;case "bottom":S=L.bottom+H,D=L.left+L.width/2;break;case "left":S=L.top+L.height/2,D=L.left-H;break;case "right":S=L.top+L.height/2,D=L.right+H;break}if(o==="top"||o==="bottom")switch(s){case "start":D=L.left;break;case "center":D=L.left+L.width/2-E/2;break;case "end":D=L.right-E;break}D=Math.max(8,Math.min(D,window.innerWidth-E-8)),R({top:S,left:D});};return P(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true);}},[y,o,s]),K__namespace.useEffect(()=>{if(!y)return;let P=L=>{C.current&&!C.current.contains(L.target)&&h.current&&!h.current.contains(L.target)&&T(false);};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[y,T]),K__namespace.useEffect(()=>{if(!y)return;let P=L=>{L.key==="Escape"&&T(false);};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[y,T]);let M=wP[e??"help"],k=()=>{T(!y);},N=()=>{switch(o){case "top":return "bottom center";case "bottom":return "top center";case "left":return "right center";case "right":return "left center";default:return "center center"}};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n?K__namespace.isValidElement(n)?K__namespace.cloneElement(n,{ref:h,onClick:P=>{n.props.onClick?.(P),k();}}):jsxRuntime.jsx("button",{ref:h,type:"button",onClick:k,className:i($l({variant:e,size:t}),u),"aria-label":"Help",children:n}):jsxRuntime.jsx("button",{ref:P=>{h.current=P,typeof p=="function"?p(P):p&&(p.current=P);},type:"button",onClick:k,className:i($l({variant:e,size:t}),u),"aria-label":"Help",children:jsxRuntime.jsx(M,{className:"h-full w-full"})}),g&&y&&Po__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:i(RP({size:t}),f),style:{position:"fixed",top:w.top,left:w.left,transformOrigin:N()},role:"tooltip",children:[r&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:r}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:a}),d&&jsxRuntime.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[m," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...o==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...o==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...o==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...o==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});th.displayName="ContextualHelp";var ah=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),_l=classVarianceAuthority.cva("inline-flex items-center gap-1 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",{variants:{variant:{solid:"bg-primary text-primary-foreground",outline:"border border-input bg-background hover:bg-accent",soft:"bg-primary/10 text-primary",surface:"bg-muted text-muted-foreground"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},isSelected:{true:"",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},compoundVariants:[{variant:"outline",isSelected:true,className:"border-primary bg-primary/5"},{variant:"soft",isSelected:true,className:"bg-primary/20"},{variant:"surface",isSelected:true,className:"bg-muted/80 ring-2 ring-primary/20"}],defaultVariants:{variant:"soft",size:"md",isSelected:false,isDisabled:false}});function nh({className:e,spacing:t,variant:r,size:a,items:n,selectedKeys:o,selectionMode:s="none",onSelectionChange:l,allowsRemoving:c=false,onRemove:d,label:m,description:u,errorMessage:f,maxTags:p,...b}){let[x,g]=K__namespace.useState(new Set),v=K__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):x,[o,x]),w=y=>{if(s==="none")return;let T;s==="single"?T=v.has(y)?new Set:new Set([y]):(T=new Set(v),T.has(y)?T.delete(y):T.add(y)),o||g(T),l?.(T);},R=(y,T)=>{T.stopPropagation(),d?.(y);},h=p?n.slice(0,p):n,C=p?Math.max(0,n.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:m}),u&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:u}),jsxRuntime.jsxs("div",{role:"group","aria-label":m,className:i(ah({spacing:t}),e),...b,children:[h.map(y=>{let T=v.has(y.key),M=s!=="none";return jsxRuntime.jsxs("span",{role:M?"button":void 0,tabIndex:M&&!y.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!y.isDisabled&&w(y.key),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!y.isDisabled&&(k.preventDefault(),w(y.key));},style:y.color?{backgroundColor:y.color}:void 0,className:i(_l({variant:y.color?void 0:r,size:a,isSelected:T,isDisabled:y.isDisabled}),M&&!y.isDisabled&&"cursor-pointer hover:opacity-80",y.color&&"text-white"),children:[y.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:y.icon}),y.label,c&&!y.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:k=>R(y.key,k),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${y.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},y.key)}),C>0&&jsxRuntime.jsxs("span",{className:i(_l({variant:"surface",size:a}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-destructive",children:f})]})}nh.displayName="TagGroup";var ih=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",auto:"grid-cols-[repeat(auto-fill,minmax(150px,1fr))]"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{columns:"auto",gap:"md"}}),lh=classVarianceAuthority.cva("relative flex flex-col rounded-lg border transition-all cursor-pointer",{variants:{variant:{default:"hover:border-primary/50 hover:bg-accent/50",card:"bg-card shadow-sm hover:shadow-md hover:border-primary/50"},size:{sm:"p-2",md:"p-3",lg:"p-4"},isSelected:{true:"border-primary bg-accent ring-2 ring-primary/20",false:""},isDisabled:{true:"opacity-50 pointer-events-none",false:""}},defaultVariants:{variant:"default",size:"md",isSelected:false,isDisabled:false}});function ch({className:e,columns:t,gap:r,items:a,selectedKeys:n,selectionMode:o="none",onSelectionChange:s,showSelectionIndicator:l=true,itemVariant:c="default",itemSize:d="md",renderItem:m,emptyContent:u,...f}){let[p,b]=K__namespace.useState(new Set),x=K__namespace.useMemo(()=>n?n instanceof Set?n:new Set(n):p,[n,p]),g=v=>{if(o==="none")return;let w;o==="single"?w=x.has(v)?new Set:new Set([v]):(w=new Set(x),w.has(v)?w.delete(v):w.add(v)),n||b(w),s?.(w);};return a.length===0?jsxRuntime.jsx("div",{className:i("flex items-center justify-center p-8 text-muted-foreground",e),children:u||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":o==="multiple",className:i(ih({columns:t,gap:r,className:e})),...f,children:a.map(v=>{let w=x.has(v.key);return m?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":w,onClick:()=>g(v.key),children:m(v,w)},v.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":w,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&g(v.key),className:i(lh({variant:c,size:d,isSelected:w,isDisabled:v.isDisabled})),children:[l&&o!=="none"&&w&&jsxRuntime.jsx("div",{className:"absolute top-2 right-2 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),v.thumbnail&&jsxRuntime.jsx("div",{className:"mb-2 aspect-square w-full overflow-hidden rounded-md bg-muted",children:v.thumbnail}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:v.label}),v.description&&jsxRuntime.jsx("div",{className:"mt-1 truncate text-sm text-muted-foreground",children:v.description})]})]},v.key)})})}ch.displayName="GridList";var uh=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),TP=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),PP=classVarianceAuthority.cva("h-full transition-all duration-300 ease-out",{variants:{color:{primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500",auto:""},rounded:{true:"rounded-full",false:"rounded-l-full"}},defaultVariants:{color:"primary",rounded:true}}),zs=K__namespace.forwardRef(({className:e,size:t,value:r,min:a=0,max:n=100,optimum:o,low:s,high:l,label:c,showValueLabel:d=false,formatValue:m,color:u="primary",trackVariant:f="default",...p},b)=>{let x=Math.min(100,Math.max(0,(r-a)/(n-a)*100)),g=()=>{if(u!=="auto")return "";let w=(r-a)/(n-a),R=s!==void 0?(s-a)/(n-a):.25,h=l!==void 0?(l-a)/(n-a):.75;return (o!==void 0?(o-a)/(n-a):1)>=.5?w<=R?"bg-red-500":w<=h?"bg-yellow-500":"bg-green-500":w>=h?"bg-red-500":w>=R?"bg-yellow-500":"bg-green-500"},v=m?m(r,x):`${Math.round(x)}%`;return jsxRuntime.jsxs("div",{ref:b,className:i("w-full",e),...p,children:[(c||d)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[c&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),d&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":r,"aria-valuemin":a,"aria-valuemax":n,"aria-label":c,className:i(uh({size:t})),children:jsxRuntime.jsx("div",{className:i(TP({variant:f})),children:jsxRuntime.jsx("div",{className:i(PP({color:u==="auto"?void 0:u,rounded:x>=100}),u==="auto"&&g()),style:{width:`${x}%`}})})})]})});zs.displayName="Meter";var mh=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(zs,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));mh.displayName="DiskUsageMeter";var ph=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(zs,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));ph.displayName="BatteryMeter";var fh=classVarianceAuthority.cva("relative rounded-lg overflow-hidden cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64",full:"h-full w-full min-h-48"}},defaultVariants:{size:"md"}}),Os=(e,t,r)=>{let a=n=>{let o=(n+e/60)%6;return r-r*t*Math.max(Math.min(o,4-o,1),0)};return [Math.round(a(5)*255),Math.round(a(3)*255),Math.round(a(1)*255)]},gh=(e,t,r)=>{e/=255,t/=255,r/=255;let a=Math.max(e,t,r),n=Math.min(e,t,r),o=a-n,s=0,l=a===0?0:o/a,c=a;if(o!==0)switch(a){case e:s=((t-r)/o+(t<r?6:0))*60;break;case t:s=((r-e)/o+2)*60;break;case r:s=((e-t)/o+4)*60;break}return [s,l,c]},bh=e=>{let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null},vh=(e,t,r)=>"#"+[e,t,r].map(a=>a.toString(16).padStart(2,"0")).join(""),hh=K__namespace.forwardRef(({hue:e,saturation:t,brightness:r,value:a,defaultValue:n="#ff0000",onChange:o,onColorChange:s,size:l,disabled:c,thumbSize:d=18,className:m,...u},f)=>{let p=K__namespace.useRef(null),[b,x]=K__namespace.useState(false),g=K__namespace.useCallback(V=>{let B=bh(V);return B?gh(...B):[0,1,1]},[]),[v,w]=K__namespace.useState(()=>g(a||n)),R=e??v[0],h=t??v[1],C=r??v[2];K__namespace.useEffect(()=>{if(a){let V=g(a);w(V);}},[a,g]);let y=K__namespace.useCallback((V,B)=>{if(c||!p.current)return;let A=p.current.getBoundingClientRect(),W=Math.max(0,Math.min(1,(V-A.left)/A.width)),q=Math.max(0,Math.min(1,(B-A.top)/A.height)),F=W,$=1-q;t===void 0&&r===void 0&&w([R,F,$]),o?.({hue:R,saturation:F,brightness:$});let ae=Os(R,F,$);s?.(vh(...ae));},[c,R,t,r,o,s]),T=V=>{c||(V.preventDefault(),x(true),V.target.setPointerCapture(V.pointerId),y(V.clientX,V.clientY));},M=V=>{b&&y(V.clientX,V.clientY);},k=V=>{x(false),V.target.releasePointerCapture(V.pointerId);},[N,P,L]=Os(R,1,1),E=`rgb(${N}, ${P}, ${L})`,H=h*100,S=(1-C)*100,[D,I,z]=Os(R,h,C),G=`rgb(${D}, ${I}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:i(fh({size:l}),c&&"cursor-not-allowed opacity-50",m),...u,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:E},onPointerDown:T,onPointerMove:M,onPointerUp:k,onPointerLeave:k,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to right, white, transparent)"}}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, black)"}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white pointer-events-none",style:{width:d,height:d,left:`calc(${H}% - ${d/2}px)`,top:`calc(${S}% - ${d/2}px)`,backgroundColor:G,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});hh.displayName="ColorArea";var yh=classVarianceAuthority.cva("relative rounded-full cursor-pointer touch-none select-none",{variants:{orientation:{horizontal:"w-full",vertical:"h-full"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",size:"sm",className:"h-3"},{orientation:"horizontal",size:"md",className:"h-4"},{orientation:"horizontal",size:"lg",className:"h-5"},{orientation:"vertical",size:"sm",className:"w-3"},{orientation:"vertical",size:"md",className:"w-4"},{orientation:"vertical",size:"lg",className:"w-5"}],defaultVariants:{orientation:"horizontal",size:"md"}}),DP=`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")`,xh="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",Rh=K__namespace.forwardRef(({value:e,defaultValue:t,onChange:r,channel:a="hue",baseColor:n="#ff0000",orientation:o,size:s,disabled:l,thumbSize:c=18,showBorder:d=true,className:m,...u},f)=>{let p=K__namespace.useRef(null),[b,x]=K__namespace.useState(false),g=()=>{switch(a){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,w]=K__namespace.useState(t??g()),R=e??v,h=a==="hue"?R/360:R,C=K__namespace.useCallback((E,H)=>{if(l||!p.current)return;let S=p.current.getBoundingClientRect(),D=o!=="vertical",I;D?I=Math.max(0,Math.min(1,(E-S.left)/S.width)):I=Math.max(0,Math.min(1,1-(H-S.top)/S.height));let z=a==="hue"?I*360:I;e===void 0&&w(z),r?.(z);},[l,o,a,e,r]),y=E=>{l||(E.preventDefault(),x(true),E.target.setPointerCapture(E.pointerId),C(E.clientX,E.clientY));},T=E=>{b&&C(E.clientX,E.clientY);},M=E=>{x(false),E.target.releasePointerCapture(E.pointerId);},k=()=>{let E=o!=="vertical",H=E?"to right":"to top";switch(a){case "hue":return E?xh:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${n})`;case "saturation":return `linear-gradient(${H}, #808080, ${n})`;case "brightness":return `linear-gradient(${H}, #000000, ${n})`;default:return xh}},N=()=>a==="hue"?`hsl(${R}, 100%, 50%)`:n,P=o!=="vertical",L=h*100;return jsxRuntime.jsx("div",{ref:f,className:i(yh({orientation:o,size:s}),l&&"cursor-not-allowed opacity-50",m),...u,children:jsxRuntime.jsxs("div",{ref:p,className:i("absolute inset-0 rounded-full overflow-hidden",d&&"border border-input"),style:{backgroundImage:a==="alpha"?DP:void 0,backgroundSize:a==="alpha"?"8px 8px":void 0},onPointerDown:y,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:k()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:c,height:c,...P?{left:`calc(${L}% - ${c/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${L}% - ${c/2}px)`,left:"50%",transform:"translateX(-50%)"},backgroundColor:N(),boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});Rh.displayName="ColorSlider";var wh=classVarianceAuthority.cva("relative cursor-crosshair touch-none select-none",{variants:{size:{sm:"h-32 w-32",md:"h-48 w-48",lg:"h-64 w-64"}},defaultVariants:{size:"md"}}),VP=(e,t,r)=>{let a=e-r,n=t-r,o=Math.atan2(n,a)*180/Math.PI+90;return o<0&&(o+=360),o},Ch=K__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:r,size:a,disabled:n,innerRadius:o=.6,thumbSize:s=20,showCenter:l=true,className:c,...d},m)=>{let u=K__namespace.useRef(null),[f,p]=K__namespace.useState(false),[b,x]=K__namespace.useState(t),g=e??b,v=K__namespace.useCallback((y,T)=>{if(n||!u.current)return;let M=u.current.getBoundingClientRect(),k=M.width/2,N=y-M.left,P=T-M.top,L=VP(N,P,k);e===void 0&&x(L),r?.(L);},[n,e,r]),w=y=>{n||(y.preventDefault(),p(true),y.target.setPointerCapture(y.pointerId),v(y.clientX,y.clientY));},R=y=>{f&&v(y.clientX,y.clientY);},h=y=>{p(false),y.target.releasePointerCapture(y.pointerId);},C=()=>{let y=[];for(let T=0;T<=360;T+=30)y.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${y.join(", ")})`};return jsxRuntime.jsx("div",{ref:m,className:i(wh({size:a}),n&&"cursor-not-allowed opacity-50",c),...d,children:jsxRuntime.jsxs("div",{ref:u,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:w,onPointerMove:R,onPointerUp:h,onPointerLeave:h,children:[o<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-o)*50}%`,left:`${(1-o)*50}%`,width:`${o*100}%`,height:`${o*100}%`}}),l&&o<1&&jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-input bg-background",style:{width:8,height:8,top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),jsxRuntime.jsx(IP,{hue:g,innerRadius:o,thumbSize:s})]})})});Ch.displayName="ColorWheel";var IP=({hue:e,innerRadius:t,thumbSize:r})=>{let a=(1-(1-t)/2)*50,n=(e-90)*Math.PI/180,o=50+a*Math.cos(n),s=50+a*Math.sin(n);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:r,height:r,left:`calc(${o}% - ${r/2}px)`,top:`calc(${s}% - ${r/2}px)`,backgroundColor:`hsl(${e}, 100%, 50%)`,boxShadow:"0 0 0 1px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2)"}})};var Nh=classVarianceAuthority.cva("flex",{variants:{direction:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},inline:{true:"inline-flex",false:"flex"}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"nowrap",gap:0,inline:false}}),Qn=K__namespace.forwardRef(({className:e,direction:t,align:r,justify:a,wrap:n,gap:o,inline:s,as:l="div",...c},d)=>jsxRuntime.jsx(l,{ref:d,className:i(Nh({direction:t,align:r,justify:a,wrap:n,gap:o,inline:s,className:e})),...c}));Qn.displayName="Flex";var Mh=K__namespace.forwardRef(({gap:e=2,align:t="center",...r},a)=>jsxRuntime.jsx(Qn,{ref:a,direction:"row",gap:e,align:t,...r}));Mh.displayName="HStack";var Th=K__namespace.forwardRef(({gap:e=2,align:t="stretch",...r},a)=>jsxRuntime.jsx(Qn,{ref:a,direction:"column",gap:e,align:t,...r}));Th.displayName="VStack";var Ph=K__namespace.forwardRef((e,t)=>jsxRuntime.jsx(Qn,{ref:t,align:"center",justify:"center",...e}));Ph.displayName="Center";var Lh=classVarianceAuthority.cva("grid",{variants:{columns:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none",auto:"grid-cols-[repeat(auto-fill,minmax(200px,1fr))]"},rows:{1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",none:"grid-rows-none"},gap:{0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},gapX:{0:"gap-x-0",1:"gap-x-1",2:"gap-x-2",3:"gap-x-3",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",8:"gap-x-8",10:"gap-x-10",12:"gap-x-12"},gapY:{0:"gap-y-0",1:"gap-y-1",2:"gap-y-2",3:"gap-y-3",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",8:"gap-y-8",10:"gap-y-10",12:"gap-y-12"},flow:{row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-items-start",center:"justify-items-center",end:"justify-items-end",stretch:"justify-items-stretch"},placeItems:{start:"place-items-start",center:"place-items-center",end:"place-items-end",stretch:"place-items-stretch"}},defaultVariants:{columns:1,gap:4,flow:"row",align:"stretch",justify:"stretch"}}),Gs=K__namespace.forwardRef(({className:e,columns:t,rows:r,gap:a,gapX:n,gapY:o,flow:s,align:l,justify:c,placeItems:d,as:m="div",minChildWidth:u,style:f,...p},b)=>{let x=u?{...f,gridTemplateColumns:`repeat(auto-fill, minmax(${u}, 1fr))`}:f;return jsxRuntime.jsx(m,{ref:b,className:i(Lh({columns:u?void 0:t,rows:r,gap:a,gapX:n,gapY:o,flow:s,align:l,justify:c,placeItems:d,className:e})),style:x,...p})});Gs.displayName="Grid";var Eh=classVarianceAuthority.cva("",{variants:{colSpan:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},rowSpan:{1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6",full:"row-span-full"},colStart:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12",13:"col-start-13",auto:"col-start-auto"},colEnd:{1:"col-end-1",2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13",auto:"col-end-auto"},rowStart:{1:"row-start-1",2:"row-start-2",3:"row-start-3",4:"row-start-4",5:"row-start-5",6:"row-start-6",7:"row-start-7",auto:"row-start-auto"},rowEnd:{1:"row-end-1",2:"row-end-2",3:"row-end-3",4:"row-end-4",5:"row-end-5",6:"row-end-6",7:"row-end-7",auto:"row-end-auto"}}}),Dh=K__namespace.forwardRef(({className:e,colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:o,rowEnd:s,as:l="div",...c},d)=>jsxRuntime.jsx(l,{ref:d,className:i(Eh({colSpan:t,rowSpan:r,colStart:a,colEnd:n,rowStart:o,rowEnd:s,className:e})),...c}));Dh.displayName="GridItem";var Sh=K__namespace.forwardRef(({columns:e=2,className:t,...r},a)=>{if(typeof e=="number")return jsxRuntime.jsx(Gs,{ref:a,columns:e,className:t,...r});let n=i(e.sm&&`sm:grid-cols-${e.sm}`,e.md&&`md:grid-cols-${e.md}`,e.lg&&`lg:grid-cols-${e.lg}`,e.xl&&`xl:grid-cols-${e.xl}`);return jsxRuntime.jsx(Gs,{ref:a,columns:1,className:i(n,t),...r})});Sh.displayName="SimpleGrid";var Vh=classVarianceAuthority.cva("rounded-lg",{variants:{variant:{default:"bg-muted",subtle:"bg-muted/50",outline:"border border-border bg-transparent",filled:"bg-accent",sunken:"bg-muted shadow-inner"},size:{sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-3xl"}},defaultVariants:{variant:"default",size:"md",radius:"lg"}}),Ih=K__namespace.forwardRef(({className:e,variant:t,size:r,radius:a,as:n="div",...o},s)=>jsxRuntime.jsx(n,{ref:s,className:i(Vh({variant:t,size:r,radius:a,className:e})),...o}));Ih.displayName="Well";var zh=classVarianceAuthority.cva("flex",{variants:{orientation:{horizontal:"flex-row items-center gap-2",vertical:"flex-col gap-1"},size:{sm:"",md:"",lg:""},align:{start:"items-start",center:"items-center",end:"items-end"}},compoundVariants:[{orientation:"horizontal",align:"start",className:"items-start"},{orientation:"horizontal",align:"center",className:"items-center"},{orientation:"horizontal",align:"end",className:"items-end"}],defaultVariants:{orientation:"vertical",size:"md",align:"start"}}),FP=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),GP=classVarianceAuthority.cva("text-foreground",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},mono:{true:"font-mono",false:""}},defaultVariants:{size:"md",weight:"normal",mono:false}}),Bh=K__namespace.forwardRef(({className:e,orientation:t,size:r,align:a,label:n,value:o,valueWeight:s,mono:l,labelWidth:c,labelClassName:d,valueClassName:m,showColon:u=false,copyable:f=false,onCopy:p,...b},x)=>{let g=async()=>{if(!(!f||o===null||o===void 0))try{let v=typeof o=="string"?o:String(o);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:x,className:i(zh({orientation:t,size:r,align:a,className:e})),...b,children:[jsxRuntime.jsxs("span",{className:i(FP({size:r}),d),style:c?{width:c,flexShrink:0}:void 0,children:[n,u&&":"]}),jsxRuntime.jsx("span",{className:i(GP({size:r,weight:s,mono:l}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",m),onClick:f?g:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),g());}:void 0,children:o})]})});Bh.displayName="LabeledValue";var Oh=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"flex flex-row flex-wrap",vertical:"flex flex-col"},gap:{sm:"gap-2",md:"gap-4",lg:"gap-6"}},defaultVariants:{orientation:"vertical",gap:"md"}}),Fh=K__namespace.forwardRef(({className:e,orientation:t,gap:r,...a},n)=>jsxRuntime.jsx("div",{ref:n,className:i(Oh({orientation:t,gap:r,className:e})),...a}));Fh.displayName="LabeledValueGroup";var _h=classVarianceAuthority.cva("flex items-center rounded-md border border-input bg-background ring-offset-background transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},variant:{default:"",filled:"bg-muted border-transparent",ghost:"border-transparent hover:bg-muted"}},defaultVariants:{size:"md",variant:"default"}}),fn=classVarianceAuthority.cva("text-muted-foreground shrink-0",{variants:{size:{sm:"h-3.5 w-3.5",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),Wh=K__namespace.forwardRef(({value:e,defaultValue:t="",onChange:r,onSearch:a,onSelect:n,suggestions:o=[],recentSearches:s=[],onClearRecentSearches:l,trendingSearches:c=[],isLoading:d,showClear:m=true,showIcon:u=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:b,variant:x,className:g,placeholder:v="Search...",disabled:w,...R},h)=>{let[C,y]=K__namespace.useState(false),[T,M]=K__namespace.useState(t),k=e!==void 0?e:T,N=K__namespace.useRef(null);K__namespace.useImperativeHandle(h,()=>N.current);let P=k.length>0,L=C&&(o.length>0||s.length>0||c.length>0||P),E=V=>{e===void 0&&M(V),r?.(V);},H=()=>{E(""),N.current?.focus();},S=V=>{V?.preventDefault(),k.trim()&&(a?.(k.trim()),y(false));},D=V=>{E(V.label),n?.(V),y(false);},I=V=>{E(V),a?.(V),y(false);},z=V=>{E(V),a?.(V),y(false);},G=K__namespace.useMemo(()=>{let V={};return o.forEach(B=>{let A=B.category||"Results";V[A]||(V[A]=[]),V[A].push(B);}),V},[o]);return jsxRuntime.jsxs(Ie,{open:L,onOpenChange:y,children:[jsxRuntime.jsx(Ue,{asChild:true,children:jsxRuntime.jsxs("form",{onSubmit:S,className:i(_h({size:b,variant:x}),g),children:[u&&jsxRuntime.jsx(lucideReact.Search,{className:i(fn({size:b}),"ml-3")}),jsxRuntime.jsx("input",{ref:N,type:"text",value:k,onChange:V=>E(V.target.value),onFocus:()=>y(true),placeholder:v,disabled:w,className:i("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!u&&"pl-3"),...R}),m&&P&&!w&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:i("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",fn({size:b})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(Ae,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:V=>V.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!P&&jsxRuntime.jsxs("div",{className:"p-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5",children:[jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Recent"}),l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((V,B)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>I(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.Clock,{className:i(fn({size:b}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:V}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:i(fn({size:b}),"opacity-0 group-hover:opacity-100")})]},B))]}),c.length>0&&!P&&jsxRuntime.jsxs("div",{className:"border-t p-2",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Trending"})}),c.map((V,B)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(V),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[jsxRuntime.jsx(lucideReact.TrendingUp,{className:i(fn({size:b}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:V})]},B))]}),P&&jsxRuntime.jsx("div",{className:"p-2",children:d?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-6",children:jsxRuntime.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):o.length>0?Object.entries(G).map(([V,B])=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5",children:jsxRuntime.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:V})}),B.map(A=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>D(A),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[A.icon||jsxRuntime.jsx(lucideReact.Search,{className:i(fn({size:b}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:A.label}),A.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:A.description})]})]},A.id))]},V)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});Wh.displayName="SearchBar";var jh={Pages:jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),Files:jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),Settings:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"}),Users:jsxRuntime.jsx(lucideReact.User,{className:"h-4 w-4"}),Tags:jsxRuntime.jsx(lucideReact.Hash,{className:"h-4 w-4"})},Xh=K__namespace.forwardRef(({open:e,onOpenChange:t,items:r=[],recentItems:a=[],placeholder:n="Search...",isLoading:o,emptyMessage:s="No results found.",filter:l,shortcut:c="\u2318K",onSelect:d,footer:m},u)=>{let[f,p]=K__namespace.useState(""),b=K__namespace.useRef(null),[x,g]=K__namespace.useState(false);K__namespace.useEffect(()=>{g(true);},[]),K__namespace.useEffect(()=>{e||p("");},[e]),K__namespace.useEffect(()=>{if(!e)return;let y=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e,t]),K__namespace.useEffect(()=>(e&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="";}),[e]);let v=K__namespace.useMemo(()=>{let y={};return r.forEach(T=>{let M=T.category||"Results";y[M]||(y[M]=[]),y[M].push(T);}),y},[r]),w=y=>{y.onSelect?.(),d?.(y),t?.(false);},R=()=>{t?.(false);},h=f.length>0,C=!h&&a.length>0;return !x||!e?null:Po__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-state":e?"open":"closed",onClick:R}),jsxRuntime.jsx("div",{ref:u,className:"fixed left-1/2 top-[20%] z-50 w-full max-w-2xl -translate-x-1/2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-state":e?"open":"closed",children:jsxRuntime.jsxs(cmdk.Command,{className:"overflow-hidden rounded-xl border bg-background shadow-2xl",filter:l,shouldFilter:!l,children:[jsxRuntime.jsxs("div",{className:"flex items-center border-b px-4",children:[jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:b,value:f,onValueChange:p,placeholder:n,className:"flex h-14 w-full bg-transparent px-4 py-4 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),f&&jsxRuntime.jsx("button",{type:"button",onClick:()=>p(""),className:"rounded-sm p-1 text-muted-foreground hover:text-foreground",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(cmdk.Command.List,{className:"max-h-[400px] overflow-y-auto p-2",children:o?jsxRuntime.jsx("div",{className:"flex items-center justify-center py-10",children:jsxRuntime.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[C&&jsxRuntime.jsxs(cmdk.Command.Group,{heading:"Recent",children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Recent"}),a.map(y=>jsxRuntime.jsxs(cmdk.Command.Item,{value:y.label,onSelect:()=>w(y),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:y.icon||jh[y.category||""]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:y.label}),y.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:y.description})]}),y.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:y.shortcut.map((T,M)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},y.id))]}),h&&Object.entries(v).map(([y,T])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:y,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:y}),T.map(M=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>w(M),className:"flex cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-sm aria-selected:bg-muted",children:[jsxRuntime.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-muted",children:M.icon||jh[y]||jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"})}),jsxRuntime.jsxs("div",{className:"flex-1 overflow-hidden",children:[jsxRuntime.jsx("div",{className:"truncate font-medium",children:M.label}),M.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description})]}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:"h-4 w-4 text-muted-foreground opacity-0 group-aria-selected:opacity-100"})]},M.id))]},y)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),m?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:m}):jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-t px-4 py-3 text-xs text-muted-foreground",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u2191\u2193"}),"Navigate"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"\u21B5"}),"Select"]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:"Esc"}),"Close"]})]}),jsxRuntime.jsxs("span",{className:"flex items-center gap-1",children:["Press ",jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 font-medium",children:c})," to open"]})]})]})})]}),document.body)});Xh.displayName="SpotlightSearch";function ek(e="k"){let[t,r]=K__namespace.useState(false);return K__namespace.useEffect(()=>{let a=n=>{(n.metaKey||n.ctrlKey)&&n.key===e&&(n.preventDefault(),r(o=>!o));};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e]),{open:t,setOpen:r,toggle:()=>r(a=>!a)}}var ik=classVarianceAuthority.cva("",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),lk={default:"bg-muted",info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",success:"bg-green-500/10 text-green-600 dark:text-green-400",warning:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",error:"bg-red-500/10 text-red-600 dark:text-red-400"},ck=e=>{let t=typeof e=="string"?new Date(e):e,a=new Date().getTime()-t.getTime(),n=Math.floor(a/6e4),o=Math.floor(a/36e5),s=Math.floor(a/864e5);return n<1?"Just now":n<60?`${n}m ago`:o<24?`${o}h ago`:s<7?`${s}d ago`:t.toLocaleDateString()},qh=K__namespace.forwardRef(({notifications:e=[],onNotificationClick:t,onMarkAsRead:r,onMarkAllAsRead:a,onDismiss:n,onClearAll:o,showSettings:s,onSettingsClick:l,trigger:c,align:d="end",emptyMessage:m="No notifications",maxHeight:u=400,className:f},p)=>{let[b,x]=K__namespace.useState(false),g=e.filter(R=>!R.read).length,v=e.length>0,w=R=>{R.read||r?.(R.id),t?.(R);};return jsxRuntime.jsxs(Ie,{open:b,onOpenChange:x,children:[jsxRuntime.jsx(Ue,{asChild:true,children:c||jsxRuntime.jsxs("button",{ref:p,className:i("relative inline-flex h-10 w-10 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",f),children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),g>0&&jsxRuntime.jsx("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium text-primary-foreground",children:g>99?"99+":g})]})}),jsxRuntime.jsxs(Ae,{className:"w-80 p-0 sm:w-96",align:d,sideOffset:8,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),g>0&&jsxRuntime.jsxs(ti,{size:"sm",children:[g," new"]})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[v&&a&&g>0&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Mark all as read",children:jsxRuntime.jsx(lucideReact.CheckCheck,{className:"h-4 w-4"})}),v&&o&&jsxRuntime.jsx("button",{type:"button",onClick:o,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Clear all",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})}),s&&l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:"rounded-sm p-1.5 text-muted-foreground hover:bg-muted hover:text-foreground",title:"Settings",children:jsxRuntime.jsx(lucideReact.Settings,{className:"h-4 w-4"})})]})]}),v?jsxRuntime.jsx(ke,{style:{maxHeight:u},children:jsxRuntime.jsx("div",{className:"divide-y",children:e.map(R=>jsxRuntime.jsxs("div",{className:i("group relative flex gap-3 px-4 py-3 transition-colors hover:bg-muted/50",!R.read&&"bg-muted/30"),children:[jsxRuntime.jsx("div",{className:i("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",R.avatar?"overflow-hidden":lk[R.type||"default"]),children:R.avatar?jsxRuntime.jsx("img",{src:R.avatar,alt:"",className:"h-full w-full object-cover"}):R.icon?R.icon:jsxRuntime.jsx(lucideReact.Bell,{className:"h-4 w-4"})}),jsxRuntime.jsxs("button",{type:"button",onClick:()=>w(R),className:"flex-1 text-left",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:i("text-sm",!R.read&&"font-medium"),children:R.title}),!R.read&&jsxRuntime.jsx("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-primary"})]}),R.description&&jsxRuntime.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground line-clamp-2",children:R.description}),jsxRuntime.jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:ck(R.timestamp)})]}),jsxRuntime.jsxs("div",{className:"absolute right-2 top-2 flex gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[!R.read&&r&&jsxRuntime.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),r(R.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-3.5 w-3.5"})}),(n||R.onDismiss)&&jsxRuntime.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),R.onDismiss?.(),n?.(R.id);},className:"rounded-sm p-1 text-muted-foreground hover:bg-background hover:text-foreground",title:"Dismiss",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3.5 w-3.5"})})]})]},R.id))})}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 text-muted-foreground/50"}),jsxRuntime.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:m})]})]})]})});qh.displayName="NotificationCenter";var Zh=classVarianceAuthority.cva("relative flex items-center justify-center gap-3 px-4 py-2.5 text-sm",{variants:{variant:{solid:"",flat:""},type:{default:"",success:"",warning:"",error:""},position:{top:"fixed top-0 left-0 right-0 z-50",relative:"relative"}},compoundVariants:[{variant:"solid",type:"default",className:"bg-primary text-primary-foreground [&>svg]:text-primary-foreground"},{variant:"flat",type:"default",className:"bg-primary/10 text-primary [&>svg]:text-primary"},{variant:"solid",type:"success",className:"bg-green-600 text-white dark:bg-green-500 [&>svg]:text-white"},{variant:"flat",type:"success",className:"bg-green-600/10 text-green-600 dark:bg-green-500/10 dark:text-green-500 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"},{variant:"solid",type:"warning",className:"bg-amber-600 text-white dark:bg-amber-500 [&>svg]:text-white"},{variant:"flat",type:"warning",className:"bg-amber-600/10 text-amber-600 dark:bg-amber-500/10 dark:text-amber-500 [&>svg]:text-amber-600 dark:[&>svg]:text-amber-500"},{variant:"solid",type:"error",className:"bg-red-600 text-white dark:bg-red-500 [&>svg]:text-white"},{variant:"flat",type:"error",className:"bg-red-600/10 text-red-600 dark:bg-red-500/10 dark:text-red-500 [&>svg]:text-red-600 dark:[&>svg]:text-red-500"}],defaultVariants:{variant:"solid",type:"default",position:"relative"}}),bk={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Jh=K__namespace.forwardRef(({message:e,type:t="default",variant:r="solid",showIcon:a=false,icon:n,dismissible:o=true,onDismiss:s,endContent:l,position:c,animate:d,autoDismiss:m,storageKey:u,className:f,...p},b)=>{let[x,g]=K__namespace.useState(true),[v,w]=K__namespace.useState(false);K__namespace.useEffect(()=>{u&&localStorage.getItem(`banner-${u}`)==="true"&&g(false);},[u]),K__namespace.useEffect(()=>{if(m&&x){let y=setTimeout(()=>{R();},m);return ()=>clearTimeout(y)}},[m,x]);let R=()=>{w(true),setTimeout(()=>{g(false),u&&localStorage.setItem(`banner-${u}`,"true"),s?.();},200);};if(!x)return null;let h=bk[t],C=a?n!==void 0?n:h?jsxRuntime.jsx(h,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:b,className:i(Zh({variant:r,type:t,position:c}),d&&"animate-pulse",v&&"animate-out fade-out slide-out-to-top duration-200",f),role:"banner",...p,children:[C&&jsxRuntime.jsx("span",{className:"shrink-0",children:C}),jsxRuntime.jsx("span",{className:"text-center font-medium",children:e}),l&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:l}),o&&jsxRuntime.jsx("button",{type:"button",onClick:R,className:i("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",c==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Jh.displayName="Banner";var eo=classVarianceAuthority.cva("inline-flex items-center justify-center rounded-full shadow-lg 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:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",bordered:"border-2 border-primary bg-transparent text-primary hover:opacity-70",light:"bg-transparent text-primary hover:bg-primary/10",flat:"bg-primary/20 text-primary hover:opacity-70",ghost:"border-2 border-primary bg-transparent text-primary hover:bg-primary hover:text-primary-foreground"},size:{sm:"h-10 w-10",md:"h-14 w-14",lg:"h-16 w-16"},position:{"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2",relative:"relative"}},defaultVariants:{variant:"solid",size:"md",position:"bottom-right"}}),xk=classVarianceAuthority.cva("transition-transform duration-200 [&>svg]:h-full [&>svg]:w-full",{variants:{size:{sm:"h-5 w-5",md:"h-6 w-6",lg:"h-8 w-8"}},defaultVariants:{size:"md"}}),Zl=K__namespace.forwardRef(({icon:e,label:t="Action button",extended:r,extendedLabel:a,actions:n,direction:o="up",showTooltip:s=true,closeIcon:l,animation:c="rotate",variant:d,size:m,position:u,className:f,onClick:p,disabled:b,...x},g)=>{let[v,w]=K__namespace.useState(false),R=n&&n.length>0,h=k=>{R&&w(!v),p?.(k);},C=k=>{k.onClick?.(),w(false);},y={up:{container:"flex-col-reverse bottom-full mb-3 gap-3",item:""},down:{container:"flex-col top-full mt-3 gap-3",item:""},left:{container:"flex-row-reverse right-full mr-3 gap-3",item:""},right:{container:"flex-row left-full ml-3 gap-3",item:""}},T=c==="rotate"&&v?"rotate-45":"",M=c==="scale"&&v?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:i("relative z-50",u!=="relative"&&u&&eo({position:u})),children:[R&&v&&jsxRuntime.jsx("div",{className:i("absolute left-1/2 -translate-x-1/2 flex items-center",y[o].container),children:n.map((k,N)=>jsxRuntime.jsxs("div",{className:i("flex items-center gap-2 animate-in fade-in zoom-in duration-200",o==="up"||o==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(o==="up"||o==="down")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label}),k.href?jsxRuntime.jsx("a",{href:k.href,className:i(eo({variant:k.variant||"flat",size:m==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(k),className:i(eo({variant:k.variant||"flat",size:m==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":k.label,children:k.icon}),s&&(o==="left"||o==="right")&&jsxRuntime.jsx("span",{className:"rounded-md bg-popover px-2 py-1 text-xs font-medium text-popover-foreground shadow-md whitespace-nowrap",children:k.label})]},k.id))}),jsxRuntime.jsxs("button",{ref:g,type:"button",onClick:h,disabled:b,className:i(eo({variant:d,size:m,position:"relative"}),r&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":R?v:void 0,...x,children:[v&&l?l:jsxRuntime.jsx("span",{className:i(xk({size:m}),T,M,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),r&&a&&jsxRuntime.jsx("span",{className:"font-medium",children:a})]}),R&&v&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>w(false)})]})});Zl.displayName="FloatingActionButton";var yk=Zl;var ax=classVarianceAuthority.cva("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around border-t bg-background safe-area-pb",{variants:{variant:{default:"border-border",elevated:"border-transparent shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]",filled:"border-transparent bg-primary text-primary-foreground"},size:{sm:"h-14",md:"h-16",lg:"h-20"}},defaultVariants:{variant:"default",size:"md"}}),ex=classVarianceAuthority.cva("flex flex-1 flex-col items-center justify-center gap-1 transition-colors cursor-pointer",{variants:{variant:{default:"",elevated:"",filled:""}},defaultVariants:{variant:"default"}}),nx=K__namespace.forwardRef(({className:e,variant:t,size:r,items:a,value:n,defaultValue:o,onValueChange:s,hideLabels:l=false,showActiveLabel:c=false,renderItem:d,...m},u)=>{let[f,p]=K__namespace.useState(o||a[0]?.key),b=n!==void 0,x=b?n:f,g=h=>{h.disabled||(b||p(h.key),s?.(h.key));},v=h=>t==="filled"?h?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":h?"text-primary":"text-muted-foreground hover:text-foreground",w=()=>{switch(r){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},R=()=>{switch(r){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:u,className:i(ax({variant:t,size:r}),e),role:"navigation","aria-label":"Bottom navigation",...m,children:a.map(h=>{let C=x===h.key,y=!l&&(c?C:true),T=C&&h.activeIcon?h.activeIcon:h.icon;if(d)return jsxRuntime.jsx("div",{onClick:()=>g(h),className:i(ex({variant:t}),h.disabled&&"opacity-50 cursor-not-allowed"),children:d(h,C)},h.key);let M=jsxRuntime.jsxs("div",{onClick:()=>!h.href&&g(h),className:i(ex({variant:t}),v(C),h.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":h.disabled,tabIndex:h.disabled?-1:0,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),g(h));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:i(w(),"[&>svg]:h-full [&>svg]:w-full"),children:T}),h.badge!==void 0&&h.badge>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:h.badge>99?"99+":h.badge}),h.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),y&&h.label&&jsxRuntime.jsx("span",{className:i(R(),"font-medium truncate max-w-full px-1"),children:h.label})]},h.key);return h.href&&!h.disabled?jsxRuntime.jsx("a",{href:h.href,onClick:()=>g(h),className:i("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:M},h.key):M})})});nx.displayName="BottomNavigation";var wk="fixed inset-x-0 bottom-0 z-50 mt-24 flex h-fit max-h-[90vh] flex-col rounded-t-[20px] border-t border-border/40 dark:border-border/20 bg-background",sx=classVarianceAuthority.cva("flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"hover:bg-accent",destructive:"text-destructive hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),ix=K__namespace.forwardRef(({open:e,onOpenChange:t,trigger:r,title:a,description:n,items:o,cancelLabel:s="Cancel",onCancel:l,showCancel:c=true,children:d,closeOnSelect:m=true,onAction:u},f)=>{let p=b=>{b.isDisabled||(b.onSelect?.(),u?.(b.key),m&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[r&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:r}),jsxRuntime.jsxs(vaul.Drawer.Portal,{children:[jsxRuntime.jsx(vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/40"}),jsxRuntime.jsxs(vaul.Drawer.Content,{ref:f,className:wk,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(a||n)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[a&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:a}),n&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:n})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:d||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:o?.map(b=>jsxRuntime.jsxs("button",{type:"button",disabled:b.isDisabled,onClick:()=>p(b),className:i(sx({variant:b.isDestructive?"destructive":"default"})),children:[b.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:b.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:b.label}),b.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]},b.key))})}),c&&jsxRuntime.jsx("div",{className:"border-t border-border/40 dark:border-border/20 p-2 pb-safe",children:jsxRuntime.jsx(vaul.Drawer.Close,{asChild:true,children:jsxRuntime.jsx("button",{type:"button",onClick:l,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});ix.displayName="ActionSheet";var cx=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Ql=classVarianceAuthority.cva("flex h-full items-center justify-center px-4 text-white font-medium transition-opacity",{variants:{variant:{primary:"bg-primary",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500",info:"bg-blue-500"},size:{sm:"min-w-16",md:"min-w-20",lg:"min-w-24"}},defaultVariants:{variant:"primary",size:"md"}}),dx=K__namespace.forwardRef(({className:e,variant:t,leftActions:r=[],rightActions:a=[],actionSize:n="md",threshold:o=.3,onSwipeEnd:s,disabled:l=false,fullSwipeAction:c,children:d,...m},u)=>{let f=K__namespace.useRef(null),[p,b]=K__namespace.useState(0),[x,g]=K__namespace.useState(false),v=K__namespace.useRef(0),w=K__namespace.useRef(0),R=r.length*(n==="sm"?64:n==="lg"?96:80),h=a.length*(n==="sm"?64:n==="lg"?96:80),C=N=>{l||(g(true),v.current=N.touches[0].clientX,w.current=p);},y=N=>{if(!x||l)return;let L=N.touches[0].clientX-v.current,E=w.current+L;(E>0&&r.length===0||E<0&&a.length===0)&&(E=0),E>R?E=R+(E-R)*.3:E<-h&&(E=-h+(E+h)*.3),b(E);},T=()=>{if(!x)return;g(false);let N=f.current?.offsetWidth||0,P=Math.abs(p)/N;if(c&&P>.6){c==="right"&&p>0&&r[0]?(r[0].onAction?.(),s?.("right",r[0].key)):c==="left"&&p<0&&a[0]&&(a[0].onAction?.(),s?.("left",a[0].key)),b(0);return}p>R*o&&r.length>0?(b(R),s?.("right")):p<-h*o&&a.length>0?(b(-h),s?.("left")):b(0);},M=(N,P)=>{N.onAction?.(),s?.(P,N.key),b(0);},k=()=>{b(0);};return jsxRuntime.jsxs("div",{ref:u,className:i(cx({variant:t,className:e})),...m,children:[r.length>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:R},children:r.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"right"),className:i(Ql({variant:N.variant,size:n})),style:{opacity:Math.min(1,p/R)},children:[N.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),a.length>0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:h},children:a.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"left"),className:i(Ql({variant:N.variant,size:n})),style:{opacity:Math.min(1,Math.abs(p)/h)},children:[N.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 [&>svg]:h-full [&>svg]:w-full",children:N.icon}),!N.icon&&N.label]},N.key))}),jsxRuntime.jsx("div",{ref:f,className:i("relative bg-background",x?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:y,onTouchEnd:T,onClick:p!==0?k:void 0,children:d})]})});dx.displayName="SwipeActions";var mx=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),Mk=classVarianceAuthority.cva("absolute left-1/2 -translate-x-1/2 flex items-center justify-center transition-all duration-200",{variants:{size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{size:"md"}}),px=K__namespace.forwardRef(({className:e,variant:t,onRefresh:r,pullThreshold:a=80,maxPullDistance:n=120,loadingIndicator:o,pullIndicator:s,indicatorSize:l="md",disabled:c=false,pullText:d="Pull to refresh",releaseText:m="Release to refresh",refreshingText:u="Refreshing...",children:f,...p},b)=>{let x=K__namespace.useRef(null),[g,v]=K__namespace.useState(0),[w,R]=K__namespace.useState("idle"),h=K__namespace.useRef(0),C=K__namespace.useRef(false),y=()=>c||w==="refreshing"?false:(x.current?.scrollTop??window.scrollY)<=0,T=L=>{y()&&(h.current=L.touches[0].clientY,C.current=true);},M=L=>{if(!C.current||!y())return;let H=L.touches[0].clientY-h.current;if(H<0){v(0),R("idle");return}let D=Math.min(H*.5,n);v(D),R(D>=a?"ready":"pulling");},k=async()=>{if(C.current)if(C.current=false,w==="ready"){R("refreshing"),v(a*.6);try{await r();}finally{R("idle"),v(0);}}else R("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[l],P=()=>{if(w==="refreshing")return o||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:i(N,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:u})]});let L=Math.min(g/a*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:i(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${L}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:w==="ready"?m:d})]})};return jsxRuntime.jsxs("div",{ref:b,className:i(mx({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:i(Mk({size:l}),"z-10",w==="idle"&&g===0&&"opacity-0"),style:{top:Math.max(g-60,-60),opacity:Math.min(g/(a*.5),1)},children:P()}),jsxRuntime.jsx("div",{ref:x,className:i("transition-transform duration-200",w==="refreshing"&&"ease-out"),style:{transform:`translateY(${g}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:k,children:f})]})});px.displayName="PullToRefresh";var gx=classVarianceAuthority.cva("flex min-h-screen w-full",{variants:{layout:{default:"flex-col",sidebar:"flex-row"}},defaultVariants:{layout:"default"}}),bx=K__namespace.forwardRef(({className:e,layout:t="default",header:r,footer:a,sidebar:n,aside:o,sidebarCollapsed:s=false,sidebarWidth:l="16rem",sidebarCollapsedWidth:c="4rem",asideWidth:d="16rem",fixed:m=false,children:u,...f},p)=>{let b=s?c:l;return jsxRuntime.jsxs("div",{ref:p,className:i(gx({layout:t}),e),style:{"--app-shell-sidebar-width":b,"--app-shell-aside-width":d},...f,children:[r&&jsxRuntime.jsx(tc,{fixed:m,hasSidebar:!!n,children:r}),jsxRuntime.jsxs("div",{className:"flex flex-1",children:[n&&jsxRuntime.jsx(rc,{collapsed:s,fixed:m,children:n}),jsxRuntime.jsx("main",{className:i("flex-1 flex flex-col min-h-0",m&&r&&"pt-14",m&&a&&"pb-14"),children:u}),o&&jsxRuntime.jsx(ac,{fixed:m,children:o})]}),a&&jsxRuntime.jsx(nc,{fixed:m,hasSidebar:!!n,children:a})]})});bx.displayName="AppShell";var tc=K__namespace.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},o)=>jsxRuntime.jsx("header",{ref:o,className:i("flex h-14 items-center border-b bg-background px-4",t&&"fixed top-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));tc.displayName="AppShellHeader";var rc=K__namespace.forwardRef(({className:e,collapsed:t,fixed:r,children:a,...n},o)=>jsxRuntime.jsx("aside",{ref:o,className:i("w-[var(--app-shell-sidebar-width)] shrink-0 border-r bg-background transition-[width] duration-200",r&&"fixed left-0 top-0 bottom-0 z-50",e),"data-collapsed":t,...n,children:a}));rc.displayName="AppShellSidebar";var ac=K__namespace.forwardRef(({className:e,fixed:t,children:r,...a},n)=>jsxRuntime.jsx("aside",{ref:n,className:i("w-[var(--app-shell-aside-width)] shrink-0 border-l bg-background",t&&"fixed right-0 top-14 bottom-0 z-40",e),...a,children:r}));ac.displayName="AppShellAside";var nc=K__namespace.forwardRef(({className:e,fixed:t,hasSidebar:r,children:a,...n},o)=>jsxRuntime.jsx("footer",{ref:o,className:i("flex h-14 items-center border-t bg-background px-4",t&&"fixed bottom-0 right-0 z-40",t&&r&&"left-[var(--app-shell-sidebar-width)]",t&&!r&&"left-0",e),...n,children:a}));nc.displayName="AppShellFooter";var vx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex-1 overflow-auto p-4",e),...t}));vx.displayName="AppShellMain";var xx=classVarianceAuthority.cva("flex min-h-screen w-full bg-muted/40",{variants:{variant:{default:"",bordered:"[&_[data-slot=sidebar]]:border-r [&_[data-slot=header]]:border-b",filled:"[&_[data-slot=sidebar]]:bg-background [&_[data-slot=header]]:bg-background"}},defaultVariants:{variant:"bordered"}}),yx=K__namespace.forwardRef(({className:e,variant:t,navigation:r,logo:a,userMenu:n,headerActions:o,breadcrumb:s,defaultCollapsed:l=false,collapsed:c,onCollapsedChange:d,children:m,...u},f)=>{let[p,b]=K__namespace.useState(l),[x,g]=K__namespace.useState(false),v=c??p,w=K__namespace.useCallback(R=>{b(R),d?.(R);},[d]);return jsxRuntime.jsxs("div",{ref:f,className:i(xx({variant:t}),e),...u,children:[jsxRuntime.jsxs("aside",{"data-slot":"sidebar","data-collapsed":v,className:i("hidden lg:flex flex-col fixed inset-y-0 left-0 z-50 bg-background transition-[width] duration-200",v?"w-16":"w-64"),children:[jsxRuntime.jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsxRuntime.jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsxRuntime.jsx("div",{className:"border-t p-4",children:n})]}),jsxRuntime.jsx(Mo,{open:x,onOpenChange:g,children:jsxRuntime.jsxs(To,{side:"left",className:"w-64 p-0",children:[jsxRuntime.jsx("div",{className:"flex h-14 items-center border-b px-4",children:a}),jsxRuntime.jsx("nav",{className:"flex-1 overflow-auto py-4",children:r}),n&&jsxRuntime.jsx("div",{className:"border-t p-4",children:n})]})}),jsxRuntime.jsxs("div",{className:i("flex flex-1 flex-col transition-[margin-left] duration-200",v?"lg:ml-16":"lg:ml-64"),children:[jsxRuntime.jsxs("header",{"data-slot":"header",className:"sticky top-0 z-40 flex h-14 items-center gap-4 bg-background px-4 lg:px-6",children:[jsxRuntime.jsxs(X,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>g(true),children:[jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle menu"})]}),jsxRuntime.jsxs(X,{variant:"ghost",size:"icon",className:"hidden lg:flex",onClick:()=>w(!v),children:[jsxRuntime.jsx(lucideReact.Menu,{className:"h-5 w-5"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Toggle sidebar"})]}),s&&jsxRuntime.jsx("div",{className:"flex-1",children:s}),o&&jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:o})]}),jsxRuntime.jsx("main",{className:"flex-1 p-4 lg:p-6",children:m})]})]})});yx.displayName="DashboardLayout";var Rx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("space-y-6",e),...t}));Rx.displayName="DashboardPage";var wx=K__namespace.forwardRef(({className:e,title:t,description:r,actions:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,className:i("flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",e),...o,children:[jsxRuntime.jsxs("div",{className:"space-y-1",children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),n]}),a&&jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:a})]}));wx.displayName="DashboardPageHeader";var Cx=K__namespace.forwardRef(({className:e,columns:t=4,...r},a)=>jsxRuntime.jsx("div",{ref:a,className:i("grid gap-4",{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[t],e),...r}));Cx.displayName="DashboardGrid";var Us=classVarianceAuthority.cva("min-h-screen w-full",{variants:{variant:{centered:"flex items-center justify-center bg-muted/40",split:"flex flex-col lg:flex-row",cover:"relative flex items-center justify-center"}},defaultVariants:{variant:"centered"}}),Nx=K__namespace.forwardRef(({className:e,variant:t="centered",logo:r,sideContent:a,backgroundImage:n,sidePosition:o="left",footer:s,children:l,...c},d)=>t==="split"?jsxRuntime.jsxs("div",{ref:d,className:i(Us({variant:t}),e),...c,children:[jsxRuntime.jsx("div",{className:i("hidden lg:flex lg:w-1/2 flex-col bg-primary text-primary-foreground",o==="right"&&"order-2"),children:a||jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:[r&&jsxRuntime.jsx("div",{className:"mb-8",children:r}),jsxRuntime.jsxs("div",{className:"max-w-md text-center",children:[jsxRuntime.jsx("h2",{className:"text-3xl font-bold",children:"Welcome back"}),jsxRuntime.jsx("p",{className:"mt-4 text-primary-foreground/80",children:"Sign in to your account to continue"})]})]})}),jsxRuntime.jsxs("div",{className:i("flex flex-1 flex-col lg:w-1/2",o==="right"&&"order-1"),children:[r&&jsxRuntime.jsx("div",{className:"flex items-center justify-center p-6 lg:hidden",children:r}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center justify-center p-6",children:jsxRuntime.jsx("div",{className:"w-full max-w-md space-y-6",children:l})}),s&&jsxRuntime.jsx("div",{className:"p-6 text-center text-sm text-muted-foreground",children:s})]})]}):t==="cover"?jsxRuntime.jsxs("div",{ref:d,className:i(Us({variant:t}),e),style:n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,...c,children:[n&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background/80 backdrop-blur-sm"}),jsxRuntime.jsxs("div",{className:"relative z-10 w-full max-w-md p-6",children:[r&&jsxRuntime.jsx("div",{className:"mb-8 flex justify-center",children:r}),jsxRuntime.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-lg",children:l}),s&&jsxRuntime.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})]}):jsxRuntime.jsx("div",{ref:d,className:i(Us({variant:t}),e),...c,children:jsxRuntime.jsxs("div",{className:"w-full max-w-md p-6",children:[r&&jsxRuntime.jsx("div",{className:"mb-8 flex justify-center",children:r}),jsxRuntime.jsx("div",{className:"rounded-lg border bg-card p-6 shadow-sm",children:l}),s&&jsxRuntime.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s})]})}));Nx.displayName="AuthLayout";var Mx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("form",{ref:r,className:i("space-y-4",e),...t}));Mx.displayName="AuthForm";var Tx=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-2 text-center",e),...n,children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),a]}));Tx.displayName="AuthHeader";var Px=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("flex flex-col gap-2 text-center text-sm",e),...t}));Px.displayName="AuthFooterLinks";var kx=K__namespace.forwardRef(({className:e,text:t="or continue with",...r},a)=>jsxRuntime.jsxs("div",{ref:a,className:i("relative my-4",e),...r,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center",children:jsxRuntime.jsx("span",{className:"w-full border-t"})}),jsxRuntime.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:jsxRuntime.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:t})})]}));kx.displayName="AuthDivider";var Lx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("grid grid-cols-2 gap-2",e),...t}));Lx.displayName="AuthSocialButtons";var Xs=classVarianceAuthority.cva("w-full",{variants:{variant:{sidebar:"flex flex-col lg:flex-row gap-8",tabs:"space-y-6",stacked:"space-y-8"}},defaultVariants:{variant:"sidebar"}}),Ex=K__namespace.forwardRef(({className:e,variant:t="sidebar",navigation:r,title:a,description:n,children:o,...s},l)=>t==="sidebar"?jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[r&&jsxRuntime.jsx("aside",{className:"lg:w-64 shrink-0",children:jsxRuntime.jsx("nav",{className:"flex flex-col gap-1",children:r})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-6",children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),o]})]}):t==="tabs"?jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),r,jsxRuntime.jsx("div",{className:"pt-4",children:o})]}):jsxRuntime.jsxs("div",{ref:l,className:i(Xs({variant:t}),e),...s,children:[(a||n)&&jsxRuntime.jsx(ro,{title:a,description:n}),o]}));Ex.displayName="SettingsLayout";var ro=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-1",e),...n,children:[t&&jsxRuntime.jsx("h1",{className:"text-2xl font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-muted-foreground",children:r}),a]}));ro.displayName="SettingsHeader";var Dx=K__namespace.forwardRef(({className:e,title:t,description:r,children:a,...n},o)=>jsxRuntime.jsxs("div",{ref:o,className:i("space-y-4",e),...n,children:[(t||r)&&jsxRuntime.jsxs("div",{className:"space-y-1",children:[t&&jsxRuntime.jsx("h2",{className:"text-lg font-medium",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),a]}));Dx.displayName="SettingsSection";var Sx=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("rounded-lg border bg-card p-6",e),...t}));Sx.displayName="SettingsCard";var Hx=K__namespace.forwardRef(({className:e,label:t,description:r,htmlFor:a,children:n,...o},s)=>jsxRuntime.jsxs("div",{ref:s,className:i("flex flex-col gap-4 py-4 sm:flex-row sm:items-center sm:justify-between","border-b last:border-0 first:pt-0 last:pb-0",e),...o,children:[jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[t&&jsxRuntime.jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),jsxRuntime.jsx("div",{className:"shrink-0",children:n})]}));Hx.displayName="SettingsRow";var Vx=K__namespace.forwardRef(({className:e,active:t,icon:r,children:a,...n},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:i("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors","hover:bg-muted",t&&"bg-muted",e),...n,children:[r&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:r}),a]}));Vx.displayName="SettingsNavItem";var Ix=K__namespace.forwardRef(({className:e,...t},r)=>jsxRuntime.jsx("div",{ref:r,className:i("h-px bg-border my-4",e),...t}));Ix.displayName="SettingsSeparator";var za=(e,t,r)=>({duration:e,delay:t,ease:r||[.4,0,.2,1]}),Ek={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Ax=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialOpacity:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let u=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:Ek,custom:l,transition:za(r,a,n),className:i(o),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&u}):u});Ax.displayName="Fade";var Dk=(e,t)=>{let r=typeof t=="number"?`${t}px`:t,a={up:{y:r},down:{y:`-${r}`},left:{x:r},right:{x:`-${r}`}};return {hidden:{opacity:0,...a[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...a[e]}}},zx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,direction:l="up",offset:c=20,onAnimationStart:d,onAnimationComplete:m},u)=>{let f=K__namespace.useMemo(()=>Dk(l,c),[l,c]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:za(r,a,n),className:i(o),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});zx.displayName="Slide";var Sk={center:"center center",top:"center top",bottom:"center bottom",left:"left center",right:"right center","top-left":"left top","top-right":"right top","bottom-left":"left bottom","bottom-right":"right bottom"},Hk={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},Bx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialScale:l=.9,origin:c="center",onAnimationStart:d,onAnimationComplete:m},u)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:Hk,custom:l,transition:za(r,a,n),className:i(o),style:{transformOrigin:Sk[c]},onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});Bx.displayName="Scale";var Ox=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,horizontal:s=false,startingSize:l=0,animateOpacity:c=true,onAnimationStart:d,onAnimationComplete:m},u)=>{let f=s?"width":"height",p={hidden:{[f]:l,opacity:c?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:l,opacity:c?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:za(r,a,n),className:i("overflow-hidden",o),onAnimationStart:d,onAnimationComplete:m,children:t})})});Ox.displayName="Collapse";var Fx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.4,delay:a=0,ease:n,className:o,initialWidth:s=0,initialHeight:l=0,animateOpacity:c=true,onAnimationStart:d,onAnimationComplete:m},u)=>{let f={hidden:{width:s,height:l,opacity:c?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:l,opacity:c?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:za(r,a,n),className:i("overflow-hidden",o),onAnimationStart:d,onAnimationComplete:m,children:t})})});Fx.displayName="Expand";var Gx=K__namespace.forwardRef(({show:e=true,children:t,duration:r=.3,delay:a=0,ease:n,className:o,unmountOnExit:s=true,initialRotation:l=-180,finalRotation:c=0,onAnimationStart:d,onAnimationComplete:m},u)=>{let f={hidden:{opacity:0,rotate:l},visible:{opacity:1,rotate:c},exit:{opacity:0,rotate:l}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:u,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:za(r,a,n),className:i(o),onAnimationStart:d,onAnimationComplete:m,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Gx.displayName="Rotate";var Kx=K__namespace.forwardRef(({front:e,back:t,direction:r="horizontal",flipped:a=false,duration:n=.6,delay:o=0,ease:s,className:l,onAnimationStart:c,onAnimationComplete:d},m)=>{let u=r==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:m,className:i("relative",l),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[u]:a?180:0},transition:za(n,o,s),style:{transformStyle:"preserve-3d"},onAnimationStart:c,onAnimationComplete:d,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${u}(180deg)`},children:t})]})})});Kx.displayName="Flip";var $x=K__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:r,className:a,disabled:n=false},o)=>{let[s,l]=K__namespace.useState([]),c=K__namespace.useRef(null),d=u=>{if(n)return;let f=c.current;if(!f)return;let p=f.getBoundingClientRect(),b=u.clientX-p.left,x=u.clientY-p.top,g=Math.max(p.width,p.height)*2,v={id:Date.now(),x:b,y:x,size:g};l(w=>[...w,v]);},m=u=>{l(f=>f.filter(p=>p.id!==u));};return jsxRuntime.jsxs("div",{ref:o,className:i("relative overflow-hidden",a),onClick:d,children:[jsxRuntime.jsx("div",{ref:c,className:"relative z-0",children:r}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(u=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>m(u.id),className:"pointer-events-none absolute rounded-full",style:{left:u.x-u.size/2,top:u.y-u.size/2,width:u.size,height:u.size,backgroundColor:e}},u.id))})]})});$x.displayName="Ripple";var _x=K__namespace.forwardRef(({children:e,animate:t=true,height:r=10,duration:a=.5,count:n=0,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{y:0},bounce:{y:[0,-r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"bounce":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});_x.displayName="Bounce";var Ak={subtle:[0,-2,2,-2,2,-1,1,0],normal:[0,-5,5,-5,5,-3,3,0],strong:[0,-10,10,-10,10,-5,5,0]},Wx=K__namespace.forwardRef(({children:e,animate:t=true,intensity:r="normal",duration:a=.5,count:n=1,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{x:0},shake:{x:Ak[r],transition:{duration:a,ease:"easeInOut",repeat:n-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"shake":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});Wx.displayName="Shake";var zk={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},jx=K__namespace.forwardRef(({children:e,animate:t=true,speed:r="normal",className:a},n)=>jsxRuntime.jsx("div",{ref:n,className:i(t&&zk[r],a),children:e}));jx.displayName="Pulse";var Yx=K__namespace.forwardRef(({children:e,animate:t=true,angle:r=10,duration:a=.3,count:n=0,className:o,triggerOnHover:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=s?c:t,u={idle:{rotate:0},wiggle:{rotate:[0,-r,r,-r,r,0],transition:{duration:a,ease:"easeInOut",repeat:n===0?1/0:n-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,variants:u,initial:"idle",animate:m?"wiggle":"idle",className:i(o),onMouseEnter:()=>s&&d(true),onMouseLeave:()=>s&&d(false),children:e})});Yx.displayName="Wiggle";var Ux=K__namespace.forwardRef(({children:e,animate:t=false,scale:r=1.2,duration:a=.2,className:n,triggerOnHover:o=false,triggerOnClick:s=false},l)=>{let[c,d]=K__namespace.useState(false),m=t||c,u={type:"spring",stiffness:400,damping:17,duration:a},f=()=>{s&&(d(true),setTimeout(()=>d(false),a*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,animate:{scale:m?r:1},transition:u,className:i(n),onMouseEnter:()=>o&&d(true),onMouseLeave:()=>o&&d(false),onClick:f,children:e})});Ux.displayName="Pop";var Kk=(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},Xx=K__namespace.forwardRef(({value:e,from:t=0,duration:r=2,decimals:a=0,prefix:n="",suffix:o="",separator:s=",",decimalSeparator:l=".",animateOnView:c=true,delay:d=0,className:m,onComplete:u},f)=>{let p=K__namespace.useRef(null),b=framerMotion.useInView(p,{once:true}),[x,g]=K__namespace.useState(!c);K__namespace.useEffect(()=>{if(c&&b){let h=setTimeout(()=>g(true),d*1e3);return ()=>clearTimeout(h)}},[c,b,d]);let v={damping:30,stiffness:100,duration:r*1e3},w=framerMotion.useSpring(x?e:t,v),R=framerMotion.useTransform(w,h=>Kk(h,a,s,l));return K__namespace.useEffect(()=>{x&&w.set(e);},[x,e,w]),K__namespace.useEffect(()=>{let h=w.on("change",C=>{Math.abs(C-e)<.01&&u&&u();});return ()=>h()},[w,e,u]),jsxRuntime.jsx("span",{ref:p,className:i(m),children:jsxRuntime.jsxs("span",{ref:f,children:[n,jsxRuntime.jsx(framerMotion.motion.span,{children:R}),o]})})});Xx.displayName="Counter";var qx=K__namespace.forwardRef(({text:e,speed:t=50,delay:r=0,pauseBetween:a=1500,cursor:n=true,cursorChar:o="|",loop:s=false,deleteSpeed:l=30,animateOnView:c=true,className:d,cursorClassName:m,onComplete:u},f)=>{let p=Array.isArray(e)?e:[e],[b,x]=K__namespace.useState(""),[g,v]=K__namespace.useState(0),[w,R]=K__namespace.useState(false),[h,C]=K__namespace.useState(false),y=K__namespace.useRef(null),T=framerMotion.useInView(y,{once:true}),[M,k]=K__namespace.useState(!c);return K__namespace.useEffect(()=>{if(c&&T){let N=setTimeout(()=>k(true),r*1e3);return ()=>clearTimeout(N)}},[c,T,r]),K__namespace.useEffect(()=>{if(!M||h)return;let N=p[g],P;return w?b.length>0?P=setTimeout(()=>{x(b.slice(0,-1));},l):(R(false),v(L=>(L+1)%p.length)):b.length<N.length?P=setTimeout(()=>{x(N.slice(0,b.length+1));},t):g<p.length-1||s?P=setTimeout(()=>{R(true);},a):(C(true),u?.()),()=>clearTimeout(P)},[M,b,g,w,h,p,t,l,a,s,u]),jsxRuntime.jsxs("span",{ref:y,className:i(d),children:[jsxRuntime.jsx("span",{ref:f,children:b}),n&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:i("ml-0.5",m),children:o})]})});qx.displayName="Typewriter";var Zx=K__namespace.forwardRef(({children:e,direction:t="up",stagger:r=.05,duration:a=.5,delay:n=0,splitBy:o="word",animateOnView:s=true,className:l},c)=>{let d=K__namespace.useRef(null),m=framerMotion.useInView(d,{once:true,amount:.5}),u=s?m:true,f=typeof e=="string"?e:"",p=o==="word"?f.split(" "):f.split(""),b={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},x={hidden:{},visible:{transition:{staggerChildren:r,delayChildren:n}}},g={hidden:{opacity:0,...b[t]},visible:{opacity:1,x:0,y:0,transition:{duration:a,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:c,className:i("inline-flex flex-wrap",l),variants:x,initial:"hidden",animate:u?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:d,children:p.map((v,w)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:g,className:"inline-block",children:[v,o==="word"&&w<p.length-1&&"\xA0"]},w))})})});Zx.displayName="TextReveal";var Jx=K__namespace.forwardRef(({words:e,duration:t=2,animation:r="slide",animationDuration:a=.5,className:n,loop:o=true},s)=>{let[l,c]=K__namespace.useState(0);K__namespace.useEffect(()=>{if(!o&&l===e.length-1)return;let m=setInterval(()=>{c(u=>(u+1)%e.length);},t*1e3);return ()=>clearInterval(m)},[e.length,t,o,l]);let d=()=>{switch(r){case "fade":return {initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};case "slide":return {initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20}};case "scale":return {initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.2}};case "blur":return {initial:{opacity:0,filter:"blur(10px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(10px)"}}}};return jsxRuntime.jsx("span",{ref:s,className:i("relative inline-block",n),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:d(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:a},className:"inline-block",children:e[l]},e[l])})})});Jx.displayName="WordRotate";var ry=K__namespace.forwardRef(({children:e,direction:t="up",distance:r=50,duration:a=.6,delay:n=0,once:o=true,threshold:s=.1,className:l,scale:c,rotate:d,blur:m,ease:u=[.4,0,.2,1]},f)=>{let p=K__namespace.useRef(null),b=framerMotion.useInView(p,{once:o,amount:s}),g={up:{x:0,y:r},down:{x:0,y:-r},left:{x:r,y:0},right:{x:-r,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:g.x,y:g.y,scale:c??1,rotate:d??0,filter:m?`blur(${m}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:a,delay:n,ease:u}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:v,initial:"hidden",animate:b?"visible":"hidden",className:i(l),children:e})})});ry.displayName="ScrollReveal";var ay=K__namespace.forwardRef(({position:e="top",size:t=4,color:r="hsl(var(--primary))",backgroundColor:a="transparent",zIndex:n=50,className:o,container:s,showPercentage:l=false,useSpring:c=true},d)=>{let{scrollYProgress:m}=framerMotion.useScroll({container:s}),u=framerMotion.useSpring(m,{stiffness:100,damping:30,restDelta:.001}),f=c?u:m,p=e==="top"||e==="bottom",b={top:{top:0,left:0,right:0,height:t},bottom:{bottom:0,left:0,right:0,height:t},left:{top:0,left:0,bottom:0,width:t},right:{top:0,right:0,bottom:0,width:t}},x=p?"scaleX":"scaleY",g=p?"left":"top";return jsxRuntime.jsxs("div",{ref:d,className:i("fixed",o),style:{...b[e],zIndex:n,backgroundColor:a},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[x]:f,transformOrigin:g,backgroundColor:r}}),l&&jsxRuntime.jsx(_k,{progress:f,position:e})]})});ay.displayName="ScrollProgress";var _k=({progress:e,position:t})=>{let r=framerMotion.useTransform(e,s=>Math.round(s*100)),[a,n]=K__namespace.useState(0);return K__namespace.useEffect(()=>{let s=r.on("change",n);return ()=>s()},[r]),jsxRuntime.jsxs("span",{className:i("fixed rounded bg-background/80 px-2 py-1 text-xs font-medium backdrop-blur-sm",{top:"top-2 right-4",bottom:"bottom-2 right-4",left:"top-4 left-2",right:"top-4 right-2"}[t]),children:[a,"%"]})},ny=K__namespace.forwardRef(({children:e,speed:t=.5,direction:r="vertical",className:a,container:n},o)=>{let s=K__namespace.useRef(null),{scrollYProgress:l}=framerMotion.useScroll({target:s,container:n,offset:["start end","end start"]}),c=[-100*t,100*t],d=framerMotion.useTransform(l,[0,1],c),m=framerMotion.useSpring(d,{stiffness:100,damping:30}),u=r==="horizontal"?m:0,f=r==="vertical"?m:0;return jsxRuntime.jsx("div",{ref:s,className:i("overflow-hidden",a),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:o,style:{x:u,y:f},children:e})})});ny.displayName="Parallax";var iy=K__namespace.forwardRef(({children:e,width:t,height:r,duration:a=1.5,direction:n="right",baseColor:o="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:l,className:c,active:d=true},m)=>{let u={left:"to left",right:"to right",top:"to top",bottom:"to bottom"},f={left:"shimmer-left",right:"shimmer-right",top:"shimmer-top",bottom:"shimmer-bottom"};return jsxRuntime.jsxs("div",{ref:m,className:i("relative overflow-hidden",c),style:{width:t,height:r,borderRadius:l,backgroundColor:o},children:[e,d&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${u[n]}, transparent, ${s}, transparent)`,animation:`${f[n]} ${a}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
49
49
|
@keyframes shimmer-right {
|
|
50
50
|
0% { transform: translateX(-100%); }
|
|
51
51
|
100% { transform: translateX(100%); }
|