@reeverdev/ui 0.2.106 → 0.2.107
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/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
width: ${Se.offsetWidth}px;
|
|
53
53
|
opacity: 1;
|
|
54
54
|
z-index: 9999;
|
|
55
|
-
`,document.body.appendChild(ie),Y.dataTransfer.setDragImage(ie,20,15),setTimeout(()=>{document.body.removeChild(ie);},0),h(e),C?.({event:Y,node:e});},bt=Y=>{if(Y.preventDefault(),Y.stopPropagation(),!g||g.key===e.key||U)return;let Se=Y.currentTarget.getBoundingClientRect(),ie=Y.clientY-Se.top,Ke=Se.height,Ge;ie<Ke*.25?Ge=-1:ie>Ke*.75?Ge=1:Ge=0,!(x&&!x({dropNode:e,dropPosition:Ge,dragNode:g}))&&(y(e.key,Ge),R?.({event:Y,node:e}));},br=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:Y,node:e,expandedKeys:F()});},Bn=Y=>{Y.stopPropagation(),M?.({event:Y,node:e});},Fo=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key||U)&&(v!==null&&w(e,v),h(null),y(null,null));},Ft=Y=>{h(null),y(null,null),E?.({event:Y,node:e});},La=Y=>{U||he&&i(e.key,e,Y);},vr=Y=>{Y.stopPropagation(),!U&&!Q&&a(e.key,e);},$=W__namespace.useMemo(()=>{if(!_||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[_,v]),re=[...r,n];return jsxRuntime.jsxs("div",{className:"relative",children:[N&&t>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.map((Y,Se)=>!Y&&jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsxRuntime.jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":Q?void 0:ne,"aria-selected":he?G:void 0,"aria-disabled":U,draggable:zn,onDragStart:On,onDragOver:bt,onDragEnter:br,onDragLeave:Bn,onDrop:Fo,onDragEnd:Ft,onClick:La,className:u("relative",jg({size:I,isSelected:G,isDragging:A,isDisabled:U,isHoverable:he&&!U}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[zn&&S&&oe!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:oe}),jsxRuntime.jsx("button",{type:"button",onClick:vr,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Q&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),me&&jsxRuntime.jsx(VT,{checked:O,indeterminate:j,disabled:U,onClick:Y=>m(e.key,e,Y)}),k&&nt&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:nt}),jsxRuntime.jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsxRuntime.jsx("div",{role:"group",children:e.children.map((Y,Se)=>jsxRuntime.jsx(Yg,{node:Y,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},Y.key))})]})},AT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},zT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Xg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Xg(n,t))return true;return false},qg=W__namespace.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:y=[],onCheck:w,showLine:x=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:E=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:N=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:k=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),onDragStart:S,onDragEnter:D,onDragOver:H,onDragLeave:P,onDragEnd:L,onDrop:V,blockNode:z=false,disabled:K=false,...I},F)=>{let B=W__namespace.useCallback(()=>l?new Set(AT(r)):new Set(i),[l,i,r]),[Q,ne]=W__namespace.useState(B),G=s!==void 0,O=G?new Set(s):Q,j=W__namespace.useCallback((xe,Ue)=>{let Kt=new Set(O),Ve=!Kt.has(xe);Ve?Kt.add(xe):Kt.delete(xe),G||ne(Kt),c?.(Array.from(Kt),{expanded:Ve,node:Ue});},[O,G,c]),[A,_]=W__namespace.useState(new Set(p)),U=f!==void 0,he=U?new Set(f):A,me=W__namespace.useCallback((xe,Ue,Kt)=>{let Ve=new Set(he),gn=!Ve.has(xe);m?gn?Ve.add(xe):Ve.delete(xe):(Ve.clear(),gn&&Ve.add(xe)),U||_(Ve);let Yr=[],Ko=Sa=>{for(let Xr of Sa)Ve.has(Xr.key)&&Yr.push(Xr),Xr.children&&Ko(Xr.children);};Ko(r),g?.(Array.from(Ve),{selected:gn,selectedNodes:Yr,node:Ue,event:Kt});},[he,m,U,g,r]),[zn,oe]=W__namespace.useState(new Set(y)),[nt,On]=W__namespace.useState(new Set),bt=v!==void 0,br=bt?new Set(Array.isArray(v)?v:v.checked):zn,Bn=bt&&!Array.isArray(v)?new Set(v.halfChecked):nt,Fo=W__namespace.useCallback((xe,Ue,Kt)=>{let Ve=new Set(br),gn=new Set(Bn),Yr=!Ve.has(xe);if(Yr?(Ve.add(xe),gn.delete(xe)):Ve.delete(xe),!b&&Ue.children){let Mi=zT(Ue);for(let Kn of Mi)Yr?(Ve.add(Kn),gn.delete(Kn)):Ve.delete(Kn);}bt||(oe(Ve),On(gn));let Ko=[],Sa=Mi=>{for(let Kn of Mi)Ve.has(Kn.key)&&Ko.push(Kn),Kn.children&&Sa(Kn.children);};Sa(r);let Xr=b?{checked:Array.from(Ve),halfChecked:Array.from(gn)}:Array.from(Ve);w?.(Xr,{checked:Yr,checkedNodes:Ko,node:Ue,event:Kt,halfCheckedKeys:Array.from(gn)});},[br,Bn,b,bt,w,r]),[Ft,La]=W__namespace.useState(null),[vr,$]=W__namespace.useState(null),[re,Y]=W__namespace.useState(null),Se=W__namespace.useCallback((xe,Ue)=>{$(xe),Y(Ue);},[]),ie=W__namespace.useCallback((xe,Ue)=>{!Ft||!V||Ue===0&&Xg(Ft,xe.key)||V({event:{},node:xe,dragNode:Ft,dropPosition:Ue,dropToGap:Ue!==0});},[Ft,V]),Ke=W__namespace.useCallback(()=>Array.from(O),[O]),Ge={expandedKeys:O,toggleExpand:j,selectedKeys:he,handleSelect:me,selectable:d,multiple:m,checkedKeys:br,halfCheckedKeys:Bn,handleCheck:Fo,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ft,setDraggedNode:La,dragOverKey:vr,dragOverPosition:re,setDragOver:Se,handleDrop:ie,allowDrop:a,onDragStart:S,onDragEnter:D,onDragOver:H,onDragLeave:P,onDragEnd:L,showLine:x,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:E,folderIcon:N,folderOpenIcon:k,blockNode:z,disabled:K,size:n,data:r,getAllKeys:Ke},Fn=xe=>{let Ue=xe.relatedTarget,Kt=xe.currentTarget;(!Ue||!Kt.contains(Ue))&&Se(null,null);};return jsxRuntime.jsx(_g.Provider,{value:Ge,children:jsxRuntime.jsx("div",{ref:F,role:"tree","aria-multiselectable":m||h,className:u(Wg({variant:t,size:n,className:e})),onDragLeave:Fn,...I,children:r.map((xe,Ue)=>jsxRuntime.jsx(Yg,{node:xe,level:0,isLast:Ue===r.length-1},xe.key))})})});qg.displayName="Tree";var Qg=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}}),$T=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map((o,a)=>n.test(o)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsxRuntime.jsx("span",{children:o},a))})},UT=(e,t)=>{let[n,r]=W__namespace.useState(e);return W__namespace.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Jg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:y,...w},x)=>{let[C,R]=W__namespace.useState(false),[T,M]=W__namespace.useState(r),[E,N]=W__namespace.useState([]),[k,S]=W__namespace.useState(false),[D,H]=W__namespace.useState(false),P=W__namespace.useRef(null),L=n!==void 0?n:T,V=UT(L,l);W__namespace.useImperativeHandle(x,()=>P.current);let z=i?E:s,K=W__namespace.useMemo(()=>i?z:z.filter(U=>U.label.toLowerCase().includes(L.toLowerCase())),[z,L,i]);W__namespace.useEffect(()=>{if(!i)return;if(V.length<c){N([]);return}let U=false;return (async()=>{S(true);try{let me=await i(V);U||N(me);}catch{U||N([]);}finally{U||S(false);}})(),()=>{U=true;}},[V,i,c]);let I=U=>{n===void 0&&M(U),o?.(U);},F=U=>{let he=U.target.value;I(he),he.length>=c&&R(true);},B=U=>{I(U.label),a?.(U),R(false);},Q=()=>{I(""),P.current?.focus();},ne=()=>{H(true),L.length>=c&&(K.length>0||k)&&R(true);},G=()=>{H(false);},O=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&K.length>0&&R(true);},j=C&&L.length>=c,A=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",_=p&&L?"pr-8":"pr-3";return jsxRuntime.jsxs(rt,{open:j,onOpenChange:R,children:[jsxRuntime.jsx(ja,{asChild:true,children:jsxRuntime.jsxs("div",{className:u("relative",v?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:P,type:"text",value:L,onChange:F,onFocus:ne,onBlur:G,onKeyDown:O,disabled:y,placeholder:d,className:u(Qg({size:t,fullWidth:v}),_,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":j,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&L&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:Q,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:A})})]})}),jsxRuntime.jsx(ot,{className:"w-[--radix-popover-trigger-width] p-0",align:"start",onOpenAutoFocus:U=>U.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(Ae,{style:{maxHeight:h},children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"p-1",children:k?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(A,"animate-spin")}),f]}):K.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):K.map(U=>jsxRuntime.jsxs(cmdk.Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>B(U),className:u("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:u("mr-2 h-4 w-4 shrink-0",L===U.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:b?jsxRuntime.jsx($T,{text:U.label,query:L}):U.label})]},U.value))})})})})]})});Jg.displayName="Autocomplete";var Rl=W__namespace.createContext(null),yl=W__namespace.createContext(null),wl=()=>{let e=W__namespace.useContext(Rl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Ts=()=>{let e=W__namespace.useContext(yl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},WT={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:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=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:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},eb=W__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=W__namespace.useState(e),[m,f]=W__namespace.useState({}),[p,g]=W__namespace.useState({}),[h,b]=W__namespace.useState({}),[v,y]=W__namespace.useState(false),w=W__namespace.useRef(new Map),x=W__namespace.useCallback((P,L)=>{w.current.set(P,L);},[]),C=W__namespace.useCallback(P=>{w.current.delete(P);},[]),R=W__namespace.useCallback(P=>{let L=w.current.get(P)||[],V=c[P];for(let z of L)if(!z.validate(V))return f(K=>({...K,[P]:z.message})),false;return f(z=>({...z,[P]:null})),true},[c]),T=W__namespace.useCallback(()=>{let P=true,L={};return w.current.forEach((V,z)=>{let K=c[z];for(let I of V)if(!I.validate(K)){L[z]=I.message,P=false;break}L[z]||(L[z]=null);}),f(L),P},[c]),M=W__namespace.useCallback((P,L)=>{d(V=>({...V,[P]:L})),b(V=>({...V,[P]:true})),o&&setTimeout(()=>{R(P);},0);},[o,R]),E=W__namespace.useCallback((P,L)=>{f(V=>({...V,[P]:L}));},[]),N=W__namespace.useCallback((P,L)=>{g(V=>({...V,[P]:L})),L&&r&&R(P);},[r,R]),k=W__namespace.useCallback(P=>({value:c[P],error:m[P]??null,touched:p[P]??false,dirty:h[P]??false}),[c,m,p,h]),S=W__namespace.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),D=async P=>{P.preventDefault();let L={};if(w.current.forEach((z,K)=>{L[K]=true;}),g(L),!T()){n?.(m);return}if(t){y(true);try{await t(c);}finally{y(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:E,setTouched:N,validateField:R,validateAll:T,registerField:x,unregisterField:C,getFieldState:k,reset:S};return jsxRuntime.jsx(Rl.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});eb.displayName="Form";var tb=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=wl(),a=W__namespace.useId();W__namespace.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(yl.Provider,{value:i,children:r})};tb.displayName="FormField";var nb=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));nb.displayName="FormItem";var rb=W__namespace.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Ts();return jsxRuntime.jsxs(wr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});rb.displayName="FormLabel";var ob=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Ts(),a=wl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return W__namespace.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};ob.displayName="FormControl";var ab=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));ab.displayName="FormDescription";var sb=W__namespace.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Ts(),i=t??(s?a:null);return i?jsxRuntime.jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});sb.displayName="FormMessage";var lb=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"}}),cb=W__namespace.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:l,className:u(lb({size:t,className:e})),...i,children:[jsxRuntime.jsxs(Cr,{"data-user-avatar":true,children:[o&&jsxRuntime.jsx(eo,{src:o,alt:n}),jsxRuntime.jsx(Tr,{children:c})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});cb.displayName="User";var ub=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"}}),mb=W__namespace.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsxRuntime.jsx("code",{ref:o,className:u(ub({variant:t,size:n,className:e})),...r}));mb.displayName="Code";var pb=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"}}),fb=W__namespace.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=W__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxRuntime.jsxs("div",{ref:d,className:u(pb({variant:t,size:n,className:e})),...c,children:[!l&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:i}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:r}),o&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:u("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":m?"Copied":a,children:m?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});fb.displayName="Snippet";var Ml=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),gb=W__namespace.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState("loading");W__namespace.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsxRuntime.jsx("div",{className:u(Ml({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxRuntime.jsxs("div",{className:u(Ml({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsxRuntime.jsx($a,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});gb.displayName="Image";var hb=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"}}),xb=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"}}),Rb=W__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),yb=W__namespace.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=W__namespace.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsxRuntime.jsx(Rb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsxRuntime.jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(hb({size:t,className:e})),...i,children:s})})});yb.displayName="Listbox";var wb=W__namespace.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=W__namespace.useContext(Rb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxRuntime.jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(xb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:a}),o&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});wb.displayName="ListboxItem";var Tb=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"}}),Mb=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 oM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=W__namespace.useState(null),[f,p]=W__namespace.useState(null),g=(w,x)=>{i||(m(x),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",String(x)));},h=(w,x)=>{w.preventDefault(),!(i||d===null||d===x)&&p(x);},b=()=>{p(null);},v=(w,x)=>{if(w.preventDefault(),i||d===null||d===x){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(x,0,R),o?.(C),m(null),p(null);},y=()=>{m(null),p(null);};return jsxRuntime.jsx("div",{ref:c,className:u(Tb({variant:t,size:n,className:e})),...l,children:r.map((w,x)=>jsxRuntime.jsxs("div",{draggable:!i,onDragStart:C=>g(C,x),onDragOver:C=>h(C,x),onDragLeave:b,onDrop:C=>v(C,x),onDragEnd:y,className:u(Mb({variant:t,size:n,isDragging:d===x,isDragOver:f===x}),!i&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"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:a(w,x)})]},w.id))})}var aM=W__namespace.forwardRef(oM);var kb=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}}),cM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Pb=W__namespace.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsxRuntime.jsx("div",{className:u(kb({variant:t,visible:n})),"aria-hidden":!n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsxRuntime.jsx(lucideReact.Loader2,{className:u(cM[r],"animate-spin text-primary")}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Pb.displayName="LoadingOverlay";var Lb=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"}}),Sb=W__namespace.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=W__namespace.useState(0),[c,d]=W__namespace.useState(false),m=W__namespace.useRef(null);return W__namespace.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:u(Lb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:u("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")})})]})});Sb.displayName="NProgress";var Vb=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}}),Db={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},gM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ab=W__namespace.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsxRuntime.jsx("div",{className:u(gM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsxRuntime.jsx("div",{className:u(Db[n||"md"],"animate-pulse rounded-full bg-current",l)});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:u(Db[n||"md"],"animate-spin",l)})}};return jsxRuntime.jsx("div",{ref:i,className:u(Vb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsxRuntime.jsx("span",{className:u("text-sm",l),children:o})]})})});Ab.displayName="Loading";var kl=class extends W__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&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(Pl,{error:this.state.error,onReset:this.reset}):this.props.children}},Pl=W__namespace.forwardRef(({error:e,onReset:t,className:n},r)=>jsxRuntime.jsxs("div",{ref:r,className:u("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",n),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"]})]}));Pl.displayName="DefaultErrorFallback";var hM=kl;var Ob=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),b=e!==void 0,v=b?e:g,y=x=>{b||h(x),n?.(x);},w=x=>{if(!x)return r;let{from:C,to:R}=x;return C&&R?`${dateFns.format(C,o)} - ${dateFns.format(R,o)}`:C?dateFns.format(C,o):r};return jsxRuntime.jsxs(rt,{open:f,onOpenChange:p,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(te,{ref:m,variant:"bordered",disabled:a,className:u("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),w(v)]})}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:d,children:jsxRuntime.jsx(so,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:y,numberOfMonths:l,disabled:x=>!!(s&&x<s||i&&x>i),initialFocus:true})})]})});Ob.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),Bb=W__namespace.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=W__namespace.useState(false),d=r?Array.from({length:24},(w,x)=>x):Array.from({length:12},(w,x)=>x+1),m=Array.from({length:Math.floor(60/o)},(w,x)=>x*o),f=w=>{if(!w)return n;if(r)return `${bo(w.hours)}:${bo(w.minutes)}`;let x=w.hours%12||12,C=w.hours>=12?"PM":"AM";return `${bo(x)}:${bo(w.minutes)} ${C}`},p=w=>{let x=e?.minutes??0,C=w;if(!r&&e){let R=e.hours>=12;R&&w!==12?C=w+12:!R&&w===12&&(C=0);}t?.({hours:C,minutes:x});},g=w=>{let x=e?.hours??0;t?.({hours:x,minutes:w});},h=w=>{if(!e)return;let x=e.hours;w==="AM"&&e.hours>=12?x=e.hours-12:w==="PM"&&e.hours<12&&(x=e.hours+12),t?.({hours:x,minutes:e.minutes});},b=()=>{let w=new Date;t?.({hours:w.getHours(),minutes:w.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,y=e?r?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(rt,{open:l,onOpenChange:c,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(te,{ref:i,variant:"bordered",disabled:a,className:u("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(ot,{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(Ae,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:d.map(w=>jsxRuntime.jsx(te,{variant:y===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(w),children:bo(w)},w))})})]}),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(Ae,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(w=>jsxRuntime.jsx(te,{variant:e?.minutes===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(w),children:bo(w)},w))})})]}),!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:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(te,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsxRuntime.jsx(te,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsxRuntime.jsx(te,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Bb.displayName="TimePicker";var Fb=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function wM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0);W__namespace.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),y=Math.ceil(o/b)+2*a,w=Math.min(n.length-1,v+y),x=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=W__namespace.useMemo(()=>{let R=[];for(let T=v;T<=w;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,w,b,r]);return jsxRuntime.jsx("div",{ref:f,className:u(Fb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:x,...d,children:jsxRuntime.jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsxRuntime.jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var CM=W__namespace.forwardRef(wM);var Gb=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Dl=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),$b=W__namespace.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=W__namespace.useRef(null),h=W__namespace.useRef(null),b=W__namespace.useRef(false);W__namespace.useImperativeHandle(p,()=>g.current),W__namespace.useEffect(()=>{let y=h.current;if(!y)return;let w=new IntersectionObserver(x=>{let[C]=x;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return w.observe(y),()=>{w.disconnect();}},[a,s,o,l,c,d]);let v=jsxRuntime.jsx("div",{className:u(Dl({size:n})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:g,className:u(Gb({variant:t,className:e})),...f,children:[r,jsxRuntime.jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&m&&jsxRuntime.jsx("div",{className:u(Dl({size:n}),"text-muted-foreground text-sm"),children:m})]})});$b.displayName="InfiniteScroll";var ca=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var Wb={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},EM={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"},jb=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"),Hl=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"}}),Hs=W__namespace.createContext(null),Ir=()=>{let e=W__namespace.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},Yb=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=W__namespace.useState(false),b=e!==void 0,v=b?e:g,[y,w]=W__namespace.useState(false),x=W__namespace.useRef(null),C=W__namespace.useId(),R=W__namespace.useId();W__namespace.useEffect(()=>{w(true);},[]);let T=W__namespace.useCallback(k=>{b||h(k),t?.(k);},[b,t]);W__namespace.useEffect(()=>{if(v)return ct(),()=>dt()},[v]),W__namespace.useEffect(()=>{if(!v||i)return;let k=S=>{S.key==="Escape"&&T(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[v,i,T]);let M=k=>{s&&k.target===k.currentTarget&&T(false);},E=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:k=>{n.props.onClick?.(k),T(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,N=()=>!y||!v?null:d==="outside"?Xa__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxRuntime.jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Xa__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l]),onClick:M,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Hl({size:m}),EM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxRuntime.jsxs(Hs.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[E,N()]})});Yb.displayName="Modal";var Xb=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=W__namespace.useState(n),i=t!==void 0,l=i?t:a,c=W__namespace.useId(),d=W__namespace.useId(),m=W__namespace.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsxRuntime.jsx(Hs.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Xb.displayName="ModalRoot";var qb=W__namespace.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(true);};return e&&W__namespace.isValidElement(t)?W__namespace.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsxRuntime.jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});qb.displayName="ModalTrigger";var Il=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?Xa__namespace.createPortal(e,t||document.body):null};Il.displayName="ModalPortal";var Vl=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ir();return r?jsxRuntime.jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("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:()=>o(false),"aria-hidden":"true",...t}):null});Vl.displayName="ModalOverlay";var Al=W__namespace.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(false);};return e&&W__namespace.isValidElement(t)?W__namespace.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsxRuntime.jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Al.displayName="ModalClose";var Zb=W__namespace.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Ir(),[f,p]=W__namespace.useState(false);return W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(l)return ct(),()=>dt()},[l]),W__namespace.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxRuntime.jsxs(Il,{children:[jsxRuntime.jsx(Vl,{}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Hl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsxRuntime.jsx(Al,{asChild:true,children:jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Zb.displayName="ModalContent";var Qb=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qb.displayName="ModalHeader";var Jb=({className:e,children:t})=>(W__namespace.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(Ae,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:u(e),children:t});Jb.displayName="ModalBody";var ev=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ir();return jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:W__namespace.Children.map(t,o=>W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};ev.displayName="ModalFooter";var tv=W__namespace.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ir();return jsxRuntime.jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});tv.displayName="ModalTitle";var nv=W__namespace.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ir();return jsxRuntime.jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});nv.displayName="ModalDescription";var av=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"}}),IM=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"}}),VM=W__namespace.createContext(null),AM={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},zl=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:m="default",loading:f=false,disabled:p=false,className:g},h)=>{let[b,v]=W__namespace.useState(false),[y,w]=W__namespace.useState(false),[x,C]=W__namespace.useState(false),R=e!==void 0,T=R?e:b,M=AM[m||"default"],E=W__namespace.useId(),N=W__namespace.useId();W__namespace.useEffect(()=>{C(true);},[]);let k=W__namespace.useCallback(V=>{R||v(V),t?.(V);},[R,t]);W__namespace.useEffect(()=>{if(T)return ct(),()=>dt()},[T]);let S=async()=>{if(i){let V=i();if(V instanceof Promise){w(true);try{await V;}finally{w(false);}}}k(false);},D=()=>{l?.(),k(false);},H=f||y,P=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:V=>{n.props.onClick?.(V),k(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>k(true),children:n}):null,L=()=>!x||!T?null:Xa__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:h,role:"alertdialog","aria-modal":"true","aria-labelledby":E,"aria-describedby":o?N:void 0,"data-state":T?"open":"closed",className:u("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",g),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsxRuntime.jsx("div",{className:u(av({variant:m})),children:d||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:E,className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("p",{id:N,className:"text-sm text-muted-foreground",children:o})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:u(tn({variant:"bordered"})),onClick:D,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:u(tn(),IM({variant:m}),H&&"opacity-50 cursor-not-allowed"),onClick:S,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..."]}):a})]})]})]}),document.body);return jsxRuntime.jsxs(VM.Provider,{value:{open:T,onOpenChange:k,titleId:E,descriptionId:N},children:[P,L()]})});zl.displayName="ConfirmDialog";function zM(){let[e,t]=W__namespace.useState({open:false,options:null,resolve:null}),n=W__namespace.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=W__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=W__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=W__namespace.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=W__namespace.useMemo(()=>e.options?jsxRuntime.jsx(zl,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var YM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Ol=W__namespace.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=W__namespace.useMemo(()=>YM(e),[e]),[v,y]=W__namespace.useState(r),[w,x]=W__namespace.useState(1),[C,R]=W__namespace.useState(0),[T,M]=W__namespace.useState(false),[E,N]=W__namespace.useState(false),[k,S]=W__namespace.useState({x:0,y:0}),[D,H]=W__namespace.useState({x:0,y:0}),[P,L]=W__namespace.useState(false),V=W__namespace.useRef(null),z=b[v];W__namespace.useEffect(()=>{L(true);},[]),W__namespace.useEffect(()=>{y(r);},[r]),W__namespace.useEffect(()=>{o?.(v);},[v,o]),W__namespace.useEffect(()=>{x(1),R(0),S({x:0,y:0});},[v]),W__namespace.useEffect(()=>{if(t)return ct(),()=>dt()},[t]);let K=W__namespace.useCallback(()=>{y(oe=>oe>0?oe-1:b.length-1);},[b.length]),I=W__namespace.useCallback(()=>{y(oe=>oe<b.length-1?oe+1:0);},[b.length]),F=()=>{x(oe=>Math.min(oe+.5,4));},B=()=>{x(oe=>{let nt=Math.max(oe-.5,.5);return nt===1&&S({x:0,y:0}),nt});},Q=()=>{R(oe=>(oe+90)%360);},ne=async()=>{if(z)try{let nt=await(await fetch(z.src)).blob(),On=URL.createObjectURL(nt),bt=document.createElement("a");bt.href=On,bt.download=z.alt||`image-${v+1}`,document.body.appendChild(bt),bt.click(),document.body.removeChild(bt),URL.revokeObjectURL(On);}catch{window.open(z.src,"_blank");}},G=async()=>{if(V.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await V.current.requestFullscreen(),M(!0);}catch{}},O=oe=>{w>1&&(N(true),H({x:oe.clientX-k.x,y:oe.clientY-k.y}));},j=oe=>{E&&w>1&&S({x:oe.clientX-D.x,y:oe.clientY-D.y});},A=()=>{N(false);},_=()=>{n?.(false);},U=oe=>{p&&oe.target===oe.currentTarget&&_();},he=W__namespace.useCallback(oe=>{switch(oe.key){case "ArrowLeft":K();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":B();break}},[K,I,n]);if(W__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",he),()=>window.removeEventListener("keydown",he)},[t,he]),W__namespace.useEffect(()=>{let oe=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),b.length===0)return null;let me=a?W__namespace.isValidElement(a)?W__namespace.cloneElement(a,{onClick:oe=>{a.props.onClick?.(oe),n?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[me,!P||!t?null:Xa__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:U}),jsxRuntime.jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),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&&b.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[v+1," / ",b.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:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:B,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(w*100),"%"]}),jsxRuntime.jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),l&&jsxRuntime.jsx("button",{onClick:Q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),c&&jsxRuntime.jsx("button",{onClick:ne,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:G,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:_,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:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:j,onMouseUp:A,onMouseLeave:A,children:[m&&b.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:K,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:I,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:u("max-h-full max-w-full object-contain transition-transform duration-200",E?"cursor-grabbing":w>1?"cursor-grab":""),style:{transform:`translate(${k.x}px, ${k.y}px) scale(${w}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&b.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((oe,nt)=>jsxRuntime.jsx("button",{onClick:()=>y(nt),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===nt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${nt+1}`,className:"h-full w-full object-cover"})},nt))})]})]}),document.body)]})});Ol.displayName="ImageViewer";var iv=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=W__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsxRuntime.jsx(Ol,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};iv.displayName="ImageViewerTrigger";var lv=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}}),cv=W__namespace.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxRuntime.jsxs("span",{ref:d,className:u(lv({color:t,size:m?void 0:n,position:r,ping:o}),m&&"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:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsxRuntime.jsx("span",{className:u("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")}),a]})});cv.displayName="Indicator";var dv=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-flex",e),...n,children:t}));dv.displayName="IndicatorWrapper";var mv=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),pv=W__namespace.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:false,bottom:false,left:false,right:false});W__namespace.useImperativeHandle(i,()=>l.current);let m=W__namespace.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:y,scrollLeft:w,scrollHeight:x,scrollWidth:C,clientHeight:R,clientWidth:T}=v;d({top:y>0,bottom:y<x-R-1,left:w>0,right:w<C-T-1});},[]);W__namespace.useEffect(()=>{let v=l.current;if(v)return m(),v.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{v.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:l,className:u(mv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});pv.displayName="ScrollShadow";var fv=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"}}),eN={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"},tN={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"},nN=e=>{let t=e.toLowerCase();return eN[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return tN[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},gv=W__namespace.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{W__namespace.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(Is).map(ua),p=m.filter(h=>!Is(h)).map(ua),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,y=f.includes("alt")===h.altKey,w=f.includes("shift")===h.shiftKey,x=p.length===0||p.includes(h.key.toLowerCase());b&&v&&y&&w&&x&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:nN(f)})]},p)):o;return jsxRuntime.jsx("kbd",{ref:c,className:u(fv({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});gv.displayName="Kbd";function rN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;W__namespace.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var bv=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"}}),vv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[m,f]=W__namespace.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsxRuntime.jsx("button",{ref:d,type:"button",className:u(bv({variant:t,size:n}),e),onClick:g,"aria-label":m?"Copied":"Copy to clipboard",...c,children:m?l??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):i??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});vv.displayName="CopyButton";var xv=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"}}),uN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function pN(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function fN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function hv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var Rv=W__namespace.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=W__namespace.useState(new Date),b=s??g,v=N=>{i?i(N):h(N);},y=d===1?mN:uN,w=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()-1):o==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},x=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()+1):o==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},R=()=>o==="day"?b.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(m,{year:"numeric",month:"long"}),T=()=>{let N=pN(b.getFullYear(),b.getMonth(),d);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:y.map(k=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:k},k))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((k,S)=>{let D=hv(r,k),H=k.getMonth()===b.getMonth();return jsxRuntime.jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(k),children:[jsxRuntime.jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(k)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:k.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(P=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:P.color||"hsl(var(--primary))",color:"white"},onClick:L=>{L.stopPropagation(),l?.(P);},children:P.title},P.id)),D.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},S)})})]})},M=()=>{let N=fN(b,d),k=Array.from({length:24},(S,D)=>D);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((S,D)=>jsxRuntime.jsxs("div",{className:u("p-2 text-center border-l",As(S)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:y[D]}),jsxRuntime.jsx("div",{className:u("text-lg font-semibold",As(S)&&"text-primary"),children:S.getDate()})]},D))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:k.map(S=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),N.map((D,H)=>{let P=new Date(D);P.setHours(S,0,0,0);let L=r.filter(V=>{let z=new Date(V.start);return zs(z,D)&&z.getHours()===S});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(P),children:L.map(V=>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:V.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},S))})})]})},E=()=>{let N=Array.from({length:24},(S,D)=>D),k=hv(r,b);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:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(S=>{let D=new Date(b);D.setHours(S,0,0,0);let H=k.filter(P=>new Date(P.start).getHours()===S);return jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(P=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:P.color||"hsl(var(--primary))",color:"white"},onClick:L=>{L.stopPropagation(),l?.(P);},children:P.title},P.id))})]},S)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:u(xv({variant:t,size:n,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(te,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(te,{variant:"ghost",size:"icon",onClick:w,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(te,{variant:"ghost",size:"icon",onClick:x,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:R()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsxRuntime.jsx(te,{variant:o===N?"solid":"ghost",size:"sm",onClick:()=>a?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),o==="month"&&T(),o==="week"&&M(),o==="day"&&E()]})});Rv.displayName="FullCalendar";var pa=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["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%))"],yv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsxRuntime.jsx("div",{ref:m,className:u(pa({size:t,className:e})),...d,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));yv.displayName="LineChart";var wv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:n,layout:d,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));wv.displayName="BarChart";var Cv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[c&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),l&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsxRuntime.jsx(recharts.Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Cv.displayName="PieChart";var Tv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Tv.displayName="AreaChart";var Ev=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"}}),kv=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"}}),jl=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 zN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=sortable.useSortable({id:e.id,data:{columnId:t}}),m={transform:utilities.CSS.Transform.toString(l),transition:c};return jsxRuntime.jsx("div",{ref:i,style:m,className:u(jl({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(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 ON({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxRuntime.jsxs("div",{className:u(kv({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})]}),a&&jsxRuntime.jsx(te,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(Ae,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(i=>i.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(i=>jsxRuntime.jsx(zN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.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 Pv=W__namespace.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=W__namespace.useState(null),[p,g]=W__namespace.useState(null),h=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),b=x=>n.find(C=>C.cards.some(R=>R.id===x));return jsxRuntime.jsxs(core.DndContext,{sensors:h,collisionDetection:core.closestCorners,onDragStart:x=>{let{active:C}=x,R=b(C.id);if(R){let T=R.cards.find(M=>M.id===C.id);T&&(f(T),g(R.id));}},onDragOver:x=>{let{active:C,over:R}=x;if(!R)return;let T=C.id,M=R.id,E=b(T),N=b(M)||n.find(D=>D.id===M);if(!E||!N||E.id===N.id)return;let k=N.cards.findIndex(D=>D.id===M),S=k===-1?N.cards.length:k;r?.(T,E.id,N.id,S);},onDragEnd:x=>{let{active:C,over:R}=x;if(R&&C.id!==R.id){let T=b(C.id),M=b(R.id)||n.find(E=>E.id===R.id);if(T&&M){let E=M.cards.findIndex(k=>k.id===R.id),N=E===-1?M.cards.length:E;r?.(C.id,T.id,M.id,N);}}f(null),g(null);},children:[jsxRuntime.jsx("div",{ref:d,className:u(Ev({variant:t,className:e})),...c,children:n.map(x=>jsxRuntime.jsx(ON,{column:x,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},x.id))}),jsxRuntime.jsx(core.DragOverlay,{children:m&&p&&jsxRuntime.jsx("div",{className:u(jl({variant:t,isDragging:true})),children:s?s(m,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:m.title}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});Pv.displayName="KanbanBoard";var Lv=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Sv=W__namespace.createContext(null);function _l(){let e=W__namespace.useContext(Sv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Dv=W__namespace.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=BN__default.default({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=W__namespace.useState(false),[h,b]=W__namespace.useState(false),[v,y]=W__namespace.useState(0),[w,x]=W__namespace.useState([]),C=W__namespace.useCallback(N=>{N&&(y(N.selectedScrollSnap()),g(N.canScrollPrev()),b(N.canScrollNext()));},[]),R=W__namespace.useCallback(()=>{f?.scrollPrev();},[f]),T=W__namespace.useCallback(()=>{f?.scrollNext();},[f]),M=W__namespace.useCallback(N=>{f?.scrollTo(N);},[f]),E=W__namespace.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),R()):N.key==="ArrowRight"&&(N.preventDefault(),T());},[R,T]);return W__namespace.useEffect(()=>{!f||!l||l(f);},[f,l]),W__namespace.useEffect(()=>{if(f)return x(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(Sv.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:w,scrollTo:M},children:jsxRuntime.jsxs("div",{ref:d,className:u(Lv({variant:t,className:e})),onKeyDownCapture:E,role:"region","aria-roledescription":"carousel",...c,children:[jsxRuntime.jsx("div",{ref:m,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Yl,{}),jsxRuntime.jsx(Xl,{})]}),i&&w.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:w.map((N,k)=>jsxRuntime.jsx("button",{className:u("w-2 h-2 rounded-full transition-all",k===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(k),"aria-label":`Go to slide ${k+1}`},k))})]})})});Dv.displayName="Carousel";var Hv=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex",e),...t}));Hv.displayName="CarouselContent";var Iv=W__namespace.forwardRef(({className:e,basis:t="basis-full",...n},r)=>jsxRuntime.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0 pl-4",t,e),...n}));Iv.displayName="CarouselItem";var Yl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=_l();return jsxRuntime.jsxs(te,{ref:o,variant:t,size:n,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Yl.displayName="CarouselPrevious";var Xl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=_l();return jsxRuntime.jsxs(te,{ref:o,variant:t,size:n,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Xl.displayName="CarouselNext";var Vv=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"}}),$s={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"}},Zl={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}"]},Av=W__namespace.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=W__namespace.useState(r.length>0?"recent":o),[m,f]=W__namespace.useState(""),g=m?Object.values(Zl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Zl[c]||[],h=b=>{n?.(b);};return jsxRuntime.jsxs("div",{ref:l,className:u(Vv({size:t,className:e})),...i,children:[a&&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(Oa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries($s).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsxRuntime.jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:$s[b].name,children:v},b))}),!m&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:$s[c].name}),jsxRuntime.jsx(Ae,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Av.displayName="EmojiPicker";var zv=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"}}),vE=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"}}),hE=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"}}),je=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxRuntime.jsxs(Un,{children:[jsxRuntime.jsx(Wn,{asChild:true,children:jsxRuntime.jsx(te,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsxRuntime.jsx(jn,{side:"top",className:"text-xs",children:t})]}),Ov=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=react.useEditor({extensions:[YN__default.default.configure({heading:{levels:[1,2,3]}}),XN__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),qN__default.default,ZN__default.default.configure({types:["heading","paragraph"]}),QN__default.default.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});W__namespace.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),W__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsxRuntime.jsx($n,{children:jsxRuntime.jsxs("div",{ref:f,className:u(zv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxRuntime.jsxs("div",{className:u(vE({size:n})),children:[jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(je,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsxRuntime.jsx(je,{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:u(hE({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Ov.displayName="RichTextEditor";var Fv=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 NE(e,t,n){return xE.centerCrop(xE.makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function Bv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var Kv=W__namespace.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=W__namespace.useRef(null),[h,b]=W__namespace.useState(),[v,y]=W__namespace.useState(),[w,x]=W__namespace.useState(1),[C,R]=W__namespace.useState(0),T=k=>{let{width:S,height:D}=k.currentTarget;if(r){let H=NE(S,D,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=k=>{b(k),o?.(k);},E=async k=>{if(y(k),a&&g.current&&k.width&&k.height){let S=await Bv(g.current,k,C,w);a(S);}},N=()=>{R(k=>(k+90)%360);};return W__namespace.useEffect(()=>{v&&g.current&&a&&Bv(g.current,v,C,w).then(k=>{a(k);});},[w,C,v,a]),jsxRuntime.jsxs("div",{ref:p,className:u(Fv({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(xE__default.default,{crop:h,onChange:M,onComplete:E,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:T,style:{transform:`scale(${w}) 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(Ja,{value:[w],onValueChange:([k])=>x(k),min:l,max:c,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsxRuntime.jsx(te,{variant:"bordered",size:"icon",onClick:N,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});Kv.displayName="ImageCropper";var tc=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"}}),PE={sm:96,md:128,lg:192},$v=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??PE[n??"md"];return r?jsxRuntime.jsx("div",{ref:h,className:u(tc({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(EE__default.default,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&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:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:h,className:u(tc({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});$v.displayName="QRCode";var Uv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});Uv.displayName="ThemeProvider";var AE=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Wv=W__namespace.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=nextThemes.useTheme(),[l,c]=W__namespace.useState(false);W__namespace.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="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(no,{children:[jsxRuntime.jsx(ro,{children:jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("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(oo,{align:"end",children:[jsxRuntime.jsxs(_n,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(_n,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(_n,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("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"})]})});Wv.displayName="ThemeToggle";var jv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_v=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}}),Yv=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"}}),Xv=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=W__namespace.useId(),v=p||b,y=`${v}-description`,w=`${v}-error`,x=a&&r;return jsxRuntime.jsxs("div",{className:u(jv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:v,className:u(Yv({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[m&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsxRuntime.jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":x?w:n?y:void 0,"aria-required":o,className:u(_v({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!x&&jsxRuntime.jsx("p",{id:y,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),x&&jsxRuntime.jsx("p",{id:w,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Xv.displayName="TextField";var Qv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),BE=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}}),qv=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"}}),Zv=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),FE=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"}}),Jv=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:y,fullWidth:w=false,disabled:x,id:C,...R},T)=>{let M=W__namespace.useId(),E=C||M,N=`${E}-description`,k=`${E}-error`,[S,D]=W__namespace.useState(h),[H,P]=W__namespace.useState(false),L=g!==void 0?g:S,V=a&&r,z=W__namespace.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),b?.(O);},[g,m,f,b]),K=()=>{let O=(L??0)+p;z(O);},I=()=>{let O=(L??0)-p;z(O);},F=O=>{let j=O.target.value;if(j==="")z(void 0);else {let A=parseFloat(j);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),K()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Q=W__namespace.useMemo(()=>L===void 0?"":y?new Intl.NumberFormat(void 0,y).format(L):L.toString(),[L,y]),ne=m!==void 0&&L!==void 0&&L<=m,G=f!==void 0&&L!==void 0&&L>=f;return jsxRuntime.jsxs("div",{className:u(Qv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:E,className:u(FE({size:s}),i),children:[t,o&&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:I,disabled:x||ne,className:u(qv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:u(Zv({size:s}))})}),jsxRuntime.jsx("input",{ref:T,id:E,type:"text",inputMode:"decimal",value:Q,onChange:F,onKeyDown:B,onFocus:()=>P(true),onBlur:()=>P(false),"aria-invalid":a,"aria-describedby":V?k:n?N:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:x,className:u(BE({size:s,isInvalid:a,fullWidth:w}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsxRuntime.jsx("button",{type:"button",onClick:K,disabled:x||G,className:u(qv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:u(Zv({size:s}))})})]}),n&&!V&&jsxRuntime.jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsxRuntime.jsx("p",{id:k,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Jv.displayName="NumberField";var th=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),$E=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}}),eh=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"}}),UE=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"}}),WE=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"}}),nh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:y,placeholder:w="Search...",id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,[k,S]=W__namespace.useState(f),D=m!==void 0?m:k,H=a&&r,P=D.length>0,L=K=>{let I=K.target.value;m===void 0&&S(I),p?.(I);},V=()=>{m===void 0&&S(""),p?.(""),g?.();},z=K=>{K.key==="Enter"?(K.preventDefault(),h?.(D)):K.key==="Escape"&&P&&(K.preventDefault(),V());};return jsxRuntime.jsxs("div",{className:u(th({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(UE({size:s}),i),children:[t,o&&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:u(eh({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:R,id:M,type:"search",value:D,onChange:L,onKeyDown:z,placeholder:w,"aria-invalid":a,"aria-describedby":H?N:n?E:void 0,"aria-required":o,disabled:y,className:u($E({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&P&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:V,className:u(WE({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:u(eh({size:s}))})})]}),n&&!H&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});nh.displayName="SearchField";var rh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_E=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}}),YE=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"}}),XE=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"}}),ic=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},qE=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},oh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="yyyy-MM-dd",showIcon:v=true,fullWidth:y=false,disabled:w,id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,k=W__namespace.useRef(null),S=R||k,[D,H]=W__namespace.useState(f??null),[P,L]=W__namespace.useState(false),V=()=>{!w&&S.current&&S.current.showPicker?.();},z=m!==void 0?m:D,K=a&&r,I=ne=>{let G=qE(ne.target.value);m===void 0&&H(G),p?.(G);},F=z?ic(z,"yyyy-MM-dd"):"",B=g?ic(g,"yyyy-MM-dd"):void 0,Q=h?ic(h,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:u(rh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(XE({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u("relative",y?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:S,id:M,type:"date",value:F,onChange:I,onFocus:()=>L(true),onBlur:()=>L(false),min:B,max:Q,"aria-invalid":a,"aria-describedby":K?N:n?E:void 0,"aria-required":o,disabled:w,className:u(_E({size:s,isInvalid:a,fullWidth:y}),!v&&"pr-3",l),style:{borderColor:P?"var(--color-foreground)":void 0},...C}),v&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:w,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:u(YE({size:s}))})})]}),n&&!K&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),K&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});oh.displayName="DateField";var ah=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZE=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}}),QE=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"}}),sh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:y,fullWidth:w=false,id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,k=W__namespace.useRef(null),S=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),[P,L]=W__namespace.useState(f??null),V=m!==void 0?m:P,z=a&&r,K=$=>v===24?$:$===0?12:$>12?$-12:$,I=$=>$>=12?"PM":"AM",F=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,Q]=W__namespace.useState(V?String(K(V.hour)).padStart(2,"0"):""),[ne,G]=W__namespace.useState(V?String(V.minute).padStart(2,"0"):""),[O,j]=W__namespace.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[A,_]=W__namespace.useState(V?I(V.hour):"AM"),[U,he]=W__namespace.useState(false);W__namespace.useEffect(()=>{m!==void 0&&(m?(Q(String(K(m.hour)).padStart(2,"0")),G(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),_(I(m.hour))):(Q(""),G(""),j("")));},[m,v]);let me=($,re,Y,Se)=>{let ie=parseInt($,10),Ke=parseInt(re,10),Ge=b?parseInt(Y,10):void 0;if(isNaN(ie)||isNaN(Ke)||b&&isNaN(Ge)){m===void 0&&L(null),p?.(null);return}let xe={hour:v===12?F(ie,Se):ie,minute:Ke,...b&&Ge!==void 0&&{second:Ge}};m===void 0&&L(xe),p?.(xe);},zn=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);Q(re);let Y=v===24?23:12,Se=v===24?0:1;if(re.length===2){let ie=parseInt(re,10);ie>=Se&&ie<=Y&&(S.current?.focus(),S.current?.select());}},oe=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(G(re),re.length===2){let Y=parseInt(re,10);Y>=0&&Y<=59&&(b?(D.current?.focus(),D.current?.select()):v===12&&H.current?.focus());}},nt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);j(re),re.length===2&&v===12&&H.current?.focus();},On=()=>{if(B){let $=parseInt(B,10),re=v===24?23:12,Se=Math.min(Math.max($,v===24?0:1),re),ie=String(Se).padStart(2,"0");Q(ie),me(ie,ne,O,A);}},bt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");G(Y),me(B,Y,O,A);}},br=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");j(Y),me(B,ne,Y,A);}},Bn=()=>{let $=A==="AM"?"PM":"AM";_($),me(B,ne,O,$);},Fo=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(_("AM"),me(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(_("PM"),me(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),Bn()):re==="arrowleft"&&($.preventDefault(),b?(D.current?.focus(),D.current?.select()):(S.current?.focus(),S.current?.select()));},Ft=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let Y=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(B,10)||0,ie=v===24?23:12,Ke=v===24?0:1,Ge=Se+Y;Ge>ie&&(Ge=Ke),Ge<Ke&&(Ge=ie);let Fn=String(Ge).padStart(2,"0");Q(Fn),me(Fn,ne,O,A);}else if(re==="minute"){let ie=(parseInt(ne,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Ke=String(ie).padStart(2,"0");G(Ke),me(B,Ke,O,A);}else if(re==="second"){let ie=(parseInt(O,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Ke=String(ie).padStart(2,"0");j(Ke),me(B,ne,Ke,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(S.current?.focus(),S.current?.select()):re==="minute"&&b?(D.current?.focus(),D.current?.select()):(re==="minute"&&!b&&v===12||re==="second"&&v===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(k.current?.focus(),k.current?.select()):re==="second"&&(S.current?.focus(),S.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?k.current?.focus():re==="second"&&S.current?.focus());},vr=u((()=>{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",y&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:R,className:u(ah({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(QE({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u(ZE({size:s,isInvalid:a,disabled:y,fullWidth:w}),l),style:{borderColor:U?"var(--color-foreground)":void 0},onFocus:()=>he(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||he(false);},children:[jsxRuntime.jsx("input",{ref:k,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:B,onChange:zn,onBlur:On,onKeyDown:$=>Ft($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?N:n?E:void 0,"aria-required":o,disabled:y,className:vr}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:oe,onBlur:bt,onKeyDown:$=>Ft($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:y,className:vr}),b&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:nt,onBlur:br,onKeyDown:$=>Ft($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:y,className:vr})]}),v===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:Bn,onKeyDown:Fo,disabled:y,className:u("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",y&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});sh.displayName="TimeField";var lh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ek=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}}),tk=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"}}),nk=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"}}),ih=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),rk=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),ch=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:b=false,fullWidth:v=false,disabled:y,id:w,...x},C)=>{let R=W__namespace.useId(),T=w||R,M=`${T}-picker`,E=`${T}-description`,N=`${T}-error`,[k,S]=W__namespace.useState(f),[D,H]=W__namespace.useState(false),P=m!==void 0?m:k,L=a&&r,V=F=>{let B=F.target.value;B&&!B.startsWith("#")&&(B="#"+B),m===void 0&&S(B),p?.(B);},z=F=>{let B=F.target.value.toUpperCase();m===void 0&&S(B),p?.(B);},K=()=>{if(P&&ih(P)){let F=rk(P);F!==P&&(m===void 0&&S(F),p?.(F));}},I=ih(P)?P:"#000000";return jsxRuntime.jsxs("div",{className:u(lh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(nk({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[g&&jsxRuntime.jsx("div",{className:u(tk({size:s})),children:h?jsxRuntime.jsxs("label",{htmlFor:M,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:M,type:"color",value:I,onChange:z,disabled:y,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})}),jsxRuntime.jsx("input",{ref:C,id:T,type:"text",value:P,onChange:V,onFocus:()=>H(true),onBlur:()=>{H(false),K();},placeholder:"#000000",maxLength:b?9:7,"aria-invalid":a,"aria-describedby":L?N:n?E:void 0,"aria-required":o,disabled:y,className:u(ek({size:s,isInvalid:a,fullWidth:v}),!g&&"pl-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...x})]}),n&&!L&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),L&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});ch.displayName="ColorField";var uh=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"}}),mh=W__namespace.createContext({});function ak(){return W__namespace.useContext(mh)}var ph=W__namespace.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsxRuntime.jsx(mh.Provider,{value:{disabled:o},children:jsxRuntime.jsx("div",{ref:i,role:"group",className:u(uh({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));ph.displayName="ButtonGroup";var gh=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"}}),bh=W__namespace.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],y=(x,C)=>{C&&C(),l&&l(x);},w=x=>jsxRuntime.jsxs("button",{type:"button",disabled:i||x.isDisabled,onClick:()=>y(x.key,x.onPress),className:u("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",c?h:b),"aria-label":x.label,children:[x.icon&&jsxRuntime.jsx("span",{className:v,children:x.icon}),c&&jsxRuntime.jsx("span",{children:x.label})]},x.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:u(gh({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(x=>d?d(x):w(x)),g.length>0&&jsxRuntime.jsxs(no,{children:[jsxRuntime.jsx(ro,{"aria-label":"More actions",className:u("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",i&&"pointer-events-none opacity-50",b),children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:v})}),jsxRuntime.jsx(oo,{align:"end",children:g.map(x=>jsxRuntime.jsxs(_n,{disabled:x.isDisabled,onClick:()=>y(x.key,x.onPress),children:[x.icon&&jsxRuntime.jsx("span",{className:u(v,"mr-2"),children:x.icon}),x.label]},x.key))})]})]})});bh.displayName="ActionGroup";var Rh=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"}}),lk=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}}),yh=W__namespace.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxRuntime.jsxs("span",{ref:i,role:"status",className:u(Rh({variant:t,size:n,className:e})),...s,children:[jsxRuntime.jsx("span",{className:u(lk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsxRuntime.jsx("span",{className:"text-foreground",children:a})]}));yh.displayName="StatusLight";var Ch=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"}}),dk=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"}}),uk=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),mk=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Th=W__namespace.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Ch({size:t,className:e})),...s,children:[n&&jsxRuntime.jsx("div",{className:u(dk({size:t})),"aria-hidden":"true",children:n}),r&&jsxRuntime.jsx("h3",{className:u(uk({size:t})),children:r}),o&&jsxRuntime.jsx("p",{className:u(mk({size:t})),children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a})]}));Th.displayName="IllustratedMessage";var Eh=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"}}),xk={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},kh=W__namespace.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(true);if(!m)return null;let p=xk[t??"info"],g=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:d,role:"alert",className:u(Eh({variant:t,className:e})),...c,children:[!o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsxRuntime.jsx("div",{className:"font-medium",children:n}),l&&jsxRuntime.jsx("div",{className:"opacity-90",children:l}),i&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsxRuntime.jsx("button",{type:"button",onClick:g,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"})})]})});kh.displayName="InlineAlert";var Ph=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"}}),Lh=W__namespace.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Ph({position:t,size:n,className:e})),...c,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("button",{type:"button",onClick:a,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"})})]})]})});Lh.displayName="ActionBar";var Sh=W__namespace.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:u("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),...r,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Sh.displayName="ActionBarButton";var Ih=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"}}),Vh=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 Ah({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),[h,b]=W__namespace.useState(null),[v,y]=W__namespace.useState(null),w=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),x=M=>{if(a==="none")return;let E;a==="single"?E=w.has(M)?new Set:new Set([M]):(E=new Set(w),E.has(M)?E.delete(M):E.add(M)),o||g(E),s?.(E);},C=(M,E)=>{b(E),M.dataTransfer.effectAllowed="move";},R=(M,E)=>{M.preventDefault(),h!==E&&y(E);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(S=>S.key===h),E=r.findIndex(S=>S.key===v),N=[...r],[k]=N.splice(M,1);N.splice(E,0,k),l?.(N);}b(null),y(null);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Ih({variant:t,size:n,className:e})),...f,children:r.map(M=>{let E=w.has(M.key),N=h===M.key,k=v===M.key;return d?jsxRuntime.jsx("div",{role:"option","aria-selected":E,onClick:()=>x(M.key),children:d(M,E)},M.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":E,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:S=>C(S,M.key),onDragOver:S=>R(S,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&x(M.key),className:u(Vh({variant:t,size:n,isSelected:E,isDisabled:M.isDisabled}),N&&"opacity-50",k&&"border-t-2 border-t-primary"),children:[i&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsxRuntime.jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",E?"bg-primary border-primary text-primary-foreground":"border-input"),children:E&&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)})})}Ah.displayName="ListView";var zh=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"}}),Mk=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"}}),Nk=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"}}),Oh=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,y]=W__namespace.useState(o),w=r!==void 0,x=w?r:v,C=W__namespace.useRef(null),[R,T]=W__namespace.useState(false),[M,E]=W__namespace.useState(null),N=(I,F)=>{if(!C.current)return x[0];let B=C.current.getBoundingClientRect(),Q;t==="horizontal"?Q=(I-B.left)/B.width:Q=1-(F-B.top)/B.height,Q=Math.max(0,Math.min(1,Q));let ne=i+Q*(l-i),G=Math.round(ne/c)*c;return Math.max(i,Math.min(l,G))},k=(I,F)=>{let B=[...x];B[F]=I,F===0&&I>x[1]&&(B[0]=x[1]),F===1&&I<x[0]&&(B[1]=x[0]),w||y(B),a?.(B);},S=(I,F)=>{d||(I.preventDefault(),T(true),E(F),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!R||M===null||d)return;let F=N(I.clientX,I.clientY);k(F,M);},H=()=>{R&&(T(false),E(null),s?.(x));},P=I=>{if(d)return;let F=N(I.clientX,I.clientY),B=Math.abs(x[0]-F),Q=Math.abs(x[1]-F),ne=B<=Q?0:1;k(F,ne);let G=[...x];G[ne]=F,s?.(G);},L=(I,F)=>{if(d)return;let B=x[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),B=Math.min(l,x[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),B=Math.max(i,x[F]-c);break;case "Home":I.preventDefault(),B=i;break;case "End":I.preventDefault(),B=l;break;default:return}k(B,F);let Q=[...x];Q[F]=B,s?.(Q);},V=I=>(I-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],K={sm:14,md:20,lg:24}[n||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[m&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(x[0])}),jsxRuntime.jsx("span",{children:f(x[1])})]}),jsxRuntime.jsxs("div",{ref:b,className:u(zh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsxRuntime.jsx("div",{ref:C,className:u(Mk({orientation:t,size:n})),onClick:P,children:jsxRuntime.jsx("div",{className:u("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(x[0])}%`,right:`${100-V(x[1])}%`,top:0,bottom:0}:{bottom:`${V(x[0])}%`,top:`${100-V(x[1])}%`,left:0,right:0}})}),x.map((I,F)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(Nk({size:n}),R&&M===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${K/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${K/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>S(B,F),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>L(B,F)},F)),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${g}[0]`,value:x[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${g}[1]`,value:x[1]})]})]})]})});Oh.displayName="RangeSlider";var fc=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"}}),Sk=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"}}),Dk={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},Kh=W__namespace.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=W__namespace.useState(false),[b,v]=W__namespace.useState(false),[y,w]=W__namespace.useState({top:0,left:0}),x=W__namespace.useRef(null),C=W__namespace.useRef(null),R=i!==void 0?i:g,T=W__namespace.useCallback(k=>{i===void 0&&h(k),l?.(k);},[i,l]);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!R||!x.current)return;let k=()=>{let S=x.current.getBoundingClientRect(),D=288,H=8,P=0,L=0;switch(a){case "top":P=S.top-H,L=S.left+S.width/2;break;case "bottom":P=S.bottom+H,L=S.left+S.width/2;break;case "left":P=S.top+S.height/2,L=S.left-H;break;case "right":P=S.top+S.height/2,L=S.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":L=S.left;break;case "center":L=S.left+S.width/2-D/2;break;case "end":L=S.right-D;break}L=Math.max(8,Math.min(L,window.innerWidth-D-8)),w({top:P,left:L});};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[R,a,s]),W__namespace.useEffect(()=>{if(!R)return;let k=S=>{C.current&&!C.current.contains(S.target)&&x.current&&!x.current.contains(S.target)&&T(false);};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[R,T]),W__namespace.useEffect(()=>{if(!R)return;let k=S=>{S.key==="Escape"&&T(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[R,T]);let M=Dk[e??"help"],E=()=>{T(!R);},N=()=>{switch(a){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:[o?W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{ref:x,onClick:k=>{o.props.onClick?.(k),E();}}):jsxRuntime.jsx("button",{ref:x,type:"button",onClick:E,className:u(fc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsxRuntime.jsx("button",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},type:"button",onClick:E,className:u(fc({variant:e,size:t}),m),"aria-label":"Help",children:jsxRuntime.jsx(M,{className:"h-full w-full"})}),b&&R&&Xa__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:u(Sk({size:t}),f),style:{position:"fixed",top:y.top,left:y.left,transformOrigin:N()},role:"tooltip",children:[n&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxRuntime.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Kh.displayName="ContextualHelp";var $h=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),gc=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 Uh({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=W__namespace.useState(new Set),v=W__namespace.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),y=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},w=(R,T)=>{T.stopPropagation(),c?.(R);},x=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxRuntime.jsxs("div",{role:"group","aria-label":d,className:u($h({spacing:t}),e),...g,children:[x.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxRuntime.jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&y(R.key),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&!R.isDisabled&&(E.preventDefault(),y(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(gc({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:E=>w(R.key,E),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxRuntime.jsxs("span",{className:u(gc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-danger",children:f})]})}Uh.displayName="TagGroup";var _h=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"}}),Yh=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 Xh({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),h=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let y;a==="single"?y=h.has(v)?new Set:new Set([v]):(y=new Set(h),y.has(v)?y.delete(v):y.add(v)),o||g(y),s?.(y);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(_h({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let y=h.has(v.key);return d?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":y,onClick:()=>b(v.key),children:d(v,y)},v.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":y,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(Yh({variant:l,size:c,isSelected:y,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&y&&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)})})}Xh.displayName="GridList";var Zh=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Ak=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),zk=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}}),ai=W__namespace.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let y=(n-r)/(o-r),w=s!==void 0?(s-r)/(o-r):.25,x=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?y<=w?"bg-red-500":y<=x?"bg-yellow-500":"bg-green-500":y>=x?"bg-red-500":y>=w?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxRuntime.jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(Zh({size:t})),children:jsxRuntime.jsx("div",{className:u(Ak({variant:f})),children:jsxRuntime.jsx("div",{className:u(zk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});ai.displayName="Meter";var Qh=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(ai,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Qh.displayName="DiskUsageMeter";var Jh=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(ai,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Jh.displayName="BatteryMeter";var ex=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"}}),ii=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},tx=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},nx=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},rx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),ox=W__namespace.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),b=W__namespace.useCallback(I=>{let F=nx(I);return F?tx(...F):[0,1,1]},[]),[v,y]=W__namespace.useState(()=>b(r||o)),w=e??v[0],x=t??v[1],C=n??v[2];W__namespace.useEffect(()=>{if(r){let I=b(r);y(I);}},[r,b]);let R=W__namespace.useCallback((I,F)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(I-B.left)/B.width)),ne=Math.max(0,Math.min(1,(F-B.top)/B.height)),G=Q,O=1-ne;t===void 0&&n===void 0&&y([w,G,O]),a?.({hue:w,saturation:G,brightness:O});let j=ii(w,G,O);s?.(rx(...j));},[l,w,t,n,a,s]),T=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),R(I.clientX,I.clientY));},M=I=>{g&&R(I.clientX,I.clientY);},E=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[N,k,S]=ii(w,1,1),D=`rgb(${N}, ${k}, ${S})`,H=x*100,P=(1-C)*100,[L,V,z]=ii(w,x,C),K=`rgb(${L}, ${V}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:u(ex({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:T,onPointerMove:M,onPointerUp:E,onPointerLeave:E,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:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${P}% - ${c/2}px)`,backgroundColor:K,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ox.displayName="ColorArea";var sx=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"}}),Kk=`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")`,ax="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ix=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,y]=W__namespace.useState(t??b()),w=e??v,x=r==="hue"?w/360:w,C=W__namespace.useCallback((D,H)=>{if(i||!p.current)return;let P=p.current.getBoundingClientRect(),L=a!=="vertical",V;L?V=Math.max(0,Math.min(1,(D-P.left)/P.width)):V=Math.max(0,Math.min(1,1-(H-P.top)/P.height));let z=r==="hue"?V*360:V;e===void 0&&y(z),n?.(z);},[i,a,r,e,n]),R=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},T=D=>{g&&C(D.clientX,D.clientY);},M=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},E=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(r){case "hue":return D?ax:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return ax}},N=()=>r==="hue"?`hsl(${w}, 100%, 50%)`:o,k=a!=="vertical",S=x*100;return jsxRuntime.jsx("div",{ref:f,className:u(sx({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Kk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:E()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...k?{left:`calc(${S}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S}% - ${l/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)"}})]})})});ix.displayName="ColorSlider";var lx=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"}}),Uk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},cx=W__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=W__namespace.useRef(null),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),b=e??g,v=W__namespace.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),E=M.width/2,N=R-M.left,k=T-M.top,S=Uk(N,k,E);e===void 0&&h(S),n?.(S);},[o,e,n]),y=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},w=R=>{f&&v(R.clientX,R.clientY);},x=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsxRuntime.jsx("div",{ref:d,className:u(lx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxRuntime.jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:y,onPointerMove:w,onPointerUp:x,onPointerLeave:x,children:[a<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<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(Wk,{hue:b,innerRadius:a,thumbSize:s})]})})});cx.displayName="ColorWheel";var Wk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/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 ux=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"}}),_k=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Yk=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}}),mx=W__namespace.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:h,className:u(ux({orientation:t,size:n,align:r,className:e})),...g,children:[jsxRuntime.jsxs("span",{className:u(_k({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsxRuntime.jsx("span",{className:u(Yk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});mx.displayName="LabeledValue";var px=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"}}),fx=W__namespace.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(px({orientation:t,gap:n,className:e})),...r}));fx.displayName="LabeledValueGroup";var hx=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"}}),ko=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"}}),xx=W__namespace.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:y,...w},x)=>{let[C,R]=W__namespace.useState(false),[T,M]=W__namespace.useState(t),E=e!==void 0?e:T,N=W__namespace.useRef(null);W__namespace.useImperativeHandle(x,()=>N.current);let k=E.length>0,S=C&&(a.length>0||s.length>0||l.length>0||k),D=I=>{e===void 0&&M(I),n?.(I);},H=()=>{D(""),N.current?.focus();},P=I=>{I?.preventDefault(),E.trim()&&(r?.(E.trim()),R(false));},L=I=>{D(I.label),o?.(I),R(false);},V=I=>{D(I),r?.(I),R(false);},z=I=>{D(I),r?.(I),R(false);},K=W__namespace.useMemo(()=>{let I={};return a.forEach(F=>{let B=F.category||"Results";I[B]||(I[B]=[]),I[B].push(F);}),I},[a]);return jsxRuntime.jsxs(rt,{open:S,onOpenChange:R,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs("form",{onSubmit:P,className:u(hx({size:g,variant:h}),b),children:[m&&jsxRuntime.jsx(lucideReact.Search,{className:u(ko({size:g}),"ml-3")}),jsxRuntime.jsx("input",{ref:N,type:"text",value:E,onChange:I=>D(I.target.value),onFocus:()=>R(true),placeholder:v,disabled:y,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...w}),d&&k&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",ko({size:g})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(ot,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!k&&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"}),i&&jsxRuntime.jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,F)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>V(I),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:u(ko({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:u(ko({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!k&&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"})}),l.map((I,F)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(I),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:u(ko({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),k&&jsxRuntime.jsx("div",{className:"p-2",children:c?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"})}):a.length>0?Object.entries(K).map(([I,F])=>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:I})}),F.map(B=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>L(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsxRuntime.jsx(lucideReact.Search,{className:u(ko({size:g}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:B.label}),B.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},I)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});xx.displayName="SearchBar";var Rx={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"})},Cx=W__namespace.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=W__namespace.useState(""),g=W__namespace.useRef(null),[h,b]=W__namespace.useState(false);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{e||p("");},[e]),W__namespace.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),W__namespace.useEffect(()=>{if(e)return ct(),()=>dt()},[e]);let v=W__namespace.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),y=R=>{R.onSelect?.(),c?.(R),t?.(false);},w=()=>{t?.(false);},x=f.length>0,C=!x&&r.length>0;return !h||!e?null:Xa__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:w}),jsxRuntime.jsx("div",{ref:m,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:i,shouldFilter:!i,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:g,value:f,onValueChange:p,placeholder:o,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:a?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"}),r.map(R=>jsxRuntime.jsxs(cmdk.Command.Item,{value:R.label,onSelect:()=>y(R),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:R.icon||Rx[R.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:R.label}),R.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),x&&Object.entries(v).map(([R,T])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:R,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>y(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||Rx[R]||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))]},R)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:d}):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:l})," to open"]})]})]})})]}),document.body)});Cx.displayName="SpotlightSearch";function iP(e="k"){let[t,n]=W__namespace.useState(false);return W__namespace.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Nx=W__namespace.createContext(null),ci=()=>{let e=W__namespace.useContext(Nx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},gP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=W__namespace.useState([]),[a,s]=W__namespace.useState(false),i=W__namespace.useRef(null),l=t!==void 0,c=l?t:r,d=W__namespace.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=W__namespace.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=W__namespace.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=W__namespace.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=W__namespace.useCallback(()=>{d([]);},[d]);return jsxRuntime.jsx(Nx.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ex=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ex.displayName="NotificationCenter";var kx=W__namespace.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ci(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxRuntime.jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),t&&s>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});kx.displayName="NotificationCenterTrigger";var Px=W__namespace.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=ci(),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null),[b,v]=W__namespace.useState({top:0,left:0});return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!i||!f.current||!h.current)return;let y=()=>{if(!f.current||!h.current)return;let w=f.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.bottom+n,R=w.left;t==="center"?R=w.left+w.width/2-x.width/2:t==="end"&&(R=w.right-x.width),R+x.width>window.innerWidth-16&&(R=window.innerWidth-x.width-16),R<16&&(R=16),v({top:C,left:R});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[i,f,t,n]),W__namespace.useEffect(()=>{if(!i)return;let y=x=>{h.current&&!h.current.contains(x.target)&&f.current&&!f.current.contains(x.target)&&l(false);},w=x=>{x.key==="Escape"&&l(false);};return document.addEventListener("mousedown",y),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",w);}},[i,l,f]),!p||!i?null:Xa__namespace.createPortal(jsxRuntime.jsxs("div",{ref:y=>{h.current=y,typeof s=="function"?s(y):s&&(s.current=y);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsxRuntime.jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsxRuntime.jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]}):c.map(y=>jsxRuntime.jsx(Rc,{notification:y},y.id)))})]}),document.body)});Px.displayName="NotificationCenterContent";var bP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},vP={info:lucideReact.Info,success:lucideReact.CheckCircle,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Rc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=ci(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=vP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let y=typeof v=="string"?new Date(v):v,x=new Date().getTime()-y.getTime(),C=Math.floor(x/6e4),R=Math.floor(x/36e5),T=Math.floor(x/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":y.toLocaleDateString()};return jsxRuntime.jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",bP[l],!d&&"bg-accent/20"),children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:m||jsxRuntime.jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsxRuntime.jsx(p,{className:"h-4 w-4"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsxRuntime.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsxRuntime.jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[!d&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]})};Rc.displayName="NotificationItem";var Lx=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Lx.displayName="NotificationList";var Sx=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"}}),MP={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Dx=W__namespace.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=W__namespace.useState(true),[v,y]=W__namespace.useState(false);W__namespace.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),W__namespace.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{w();},d);return ()=>clearTimeout(R)}},[d,h]);let w=()=>{y(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let x=MP[t],C=r?o!==void 0?o:x?jsxRuntime.jsx(x,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:g,className:u(Sx({variant:n,type:t,position:l}),c&&"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}),i&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsxRuntime.jsx("button",{type:"button",onClick:w,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Dx.displayName="Banner";var ya=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"}}),kP=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"}}),wc=W__namespace.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,y]=W__namespace.useState(false),w=o&&o.length>0,x=E=>{w&&y(!v),p?.(E);},C=E=>{E.onClick?.(),y(false);},R={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=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&ya({position:m})),children:[w&&v&&jsxRuntime.jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((E,N)=>jsxRuntime.jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(a==="up"||a==="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:E.label}),E.href?jsxRuntime.jsx("a",{href:E.href,className:u(ya({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(E),className:u(ya({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}),s&&(a==="left"||a==="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:E.label})]},E.id))}),jsxRuntime.jsxs("button",{ref:b,type:"button",onClick:x,disabled:g,className:u(ya({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":w?v:void 0,...h,children:[v&&i?i:jsxRuntime.jsx("span",{className:u(kP({size:d}),T,M,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),n&&r&&jsxRuntime.jsx("span",{className:"font-medium",children:r})]}),w&&v&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>y(false)})]})});wc.displayName="FloatingActionButton";var PP=wc;var zx=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"}}),Ix=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"}}),Ox=W__namespace.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,hideLabels:i=false,showActiveLabel:l=false,renderItem:c,...d},m)=>{let[f,p]=W__namespace.useState(a||r[0]?.key),g=o!==void 0,h=g?o:f,b=x=>{x.disabled||(g||p(x.key),s?.(x.key));},v=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",y=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:m,className:u(zx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...d,children:r.map(x=>{let C=h===x.key,R=!i&&(l?C:true),T=C&&x.activeIcon?x.activeIcon:x.icon;if(c)return jsxRuntime.jsx("div",{onClick:()=>b(x),className:u(Ix({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:c(x,C)},x.key);let M=jsxRuntime.jsxs("div",{onClick:()=>!x.href&&b(x),className:u(Ix({variant:t}),v(C),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),b(x));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:u(y(),"[&>svg]:h-full [&>svg]:w-full"),children:T}),x.badge!==void 0&&x.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:x.badge>99?"99+":x.badge}),x.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),R&&x.label&&jsxRuntime.jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsxRuntime.jsx("a",{href:x.href,onClick:()=>b(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:M},x.key):M})})});Ox.displayName="BottomNavigation";var SP="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",Fx=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-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Kx=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:n}),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:SP,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxRuntime.jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Fx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:g.label}),g.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&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:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Kx.displayName="ActionSheet";var $x=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Tc=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"}}),Ux=W__namespace.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0),[h,b]=W__namespace.useState(false),v=W__namespace.useRef(0),y=W__namespace.useRef(0),w=n.length*(o==="sm"?64:o==="lg"?96:80),x=r.length*(o==="sm"?64:o==="lg"?96:80),C=N=>{i||(b(true),v.current=N.touches[0].clientX,y.current=p);},R=N=>{if(!h||i)return;let S=N.touches[0].clientX-v.current,D=y.current+S;(D>0&&n.length===0||D<0&&r.length===0)&&(D=0),D>w?D=w+(D-w)*.3:D<-x&&(D=-x+(D+x)*.3),g(D);},T=()=>{if(!h)return;b(false);let N=f.current?.offsetWidth||0,k=Math.abs(p)/N;if(l&&k>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>w*a&&n.length>0?(g(w),s?.("right")):p<-x*a&&r.length>0?(g(-x),s?.("left")):g(0);},M=(N,k)=>{N.onAction?.(),s?.(k,N.key),g(0);},E=()=>{g(0);};return jsxRuntime.jsxs("div",{ref:m,className:u($x({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:w},children:n.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"right"),className:u(Tc({variant:N.variant,size:o})),style:{opacity:Math.min(1,p/w)},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))}),r.length>0&&p<0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:x},children:r.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"left"),className:u(Tc({variant:N.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/x)},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:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?E:void 0,children:c})]})});Ux.displayName="SwipeActions";var jx=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),IP=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"}}),_x=W__namespace.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=W__namespace.useRef(null),[b,v]=W__namespace.useState(0),[y,w]=W__namespace.useState("idle"),x=W__namespace.useRef(0),C=W__namespace.useRef(false),R=()=>l||y==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=S=>{R()&&(x.current=S.touches[0].clientY,C.current=true);},M=S=>{if(!C.current||!R())return;let H=S.touches[0].clientY-x.current;if(H<0){v(0),w("idle");return}let L=Math.min(H*.5,o);v(L),w(L>=r?"ready":"pulling");},E=async()=>{if(C.current)if(C.current=false,y==="ready"){w("refreshing"),v(r*.6);try{await n();}finally{w("idle"),v(0);}}else w("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],k=()=>{if(y==="refreshing")return a||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(N,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let S=Math.min(b/r*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:u(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${S}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:y==="ready"?d:c})]})};return jsxRuntime.jsxs("div",{ref:g,className:u(jx({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:u(IP({size:i}),"z-10",y==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:k()}),jsxRuntime.jsx("div",{ref:h,className:u("transition-transform duration-200",y==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:E,children:f})]})});_x.displayName="PullToRefresh";var Wr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),VP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Yx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsxRuntime.jsx(framerMotion.motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:VP,custom:i,transition:Wr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&m}):m});Yx.displayName="Fade";var AP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Xx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=W__namespace.useMemo(()=>AP(i,l),[i,l]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Xx.displayName="Slide";var zP={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"},OP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},qx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:OP,custom:i,transition:Wr(n,r,o),className:u(a),style:{transformOrigin:zP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});qx.displayName="Scale";var Zx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Wr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Zx.displayName="Collapse";var Qx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Wr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Qx.displayName="Expand";var Jx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Jx.displayName="Rotate";var eR=W__namespace.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[m]:r?180:0},transition:Wr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});eR.displayName="Flip";var tR=W__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=W__namespace.useState([]),l=W__namespace.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(y=>[...y,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxRuntime.jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsxRuntime.jsx("div",{ref:l,className:"relative z-0",children:n}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(m=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});tR.displayName="Ripple";var nR=W__namespace.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});nR.displayName="Bounce";var KP={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]},rR=W__namespace.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:KP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});rR.displayName="Shake";var GP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},oR=W__namespace.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(t&&GP[n],r),children:e}));oR.displayName="Pulse";var aR=W__namespace.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});aR.displayName="Wiggle";var sR=W__namespace.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});sR.displayName="Pop";var YP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},iR=W__namespace.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:true}),[h,b]=W__namespace.useState(!l);W__namespace.useEffect(()=>{if(l&&g){let w=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(w)}},[l,g,c]);let v=framerMotion.useMotionValue(t),y=framerMotion.useTransform(v,w=>YP(w,r,s,i));return W__namespace.useEffect(()=>{if(h){let w=framerMotion.animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>w.stop()}},[h,e,n,v,m]),jsxRuntime.jsx("span",{ref:p,className:u(d),children:jsxRuntime.jsxs("span",{ref:f,children:[o,jsxRuntime.jsx(framerMotion.motion.span,{children:y}),a]})})});iR.displayName="Counter";var lR=W__namespace.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=W__namespace.useState(""),[b,v]=W__namespace.useState(0),[y,w]=W__namespace.useState(false),[x,C]=W__namespace.useState(false),R=W__namespace.useRef(null),T=framerMotion.useInView(R,{once:true}),[M,E]=W__namespace.useState(!l);return W__namespace.useEffect(()=>{if(l&&T){let N=setTimeout(()=>E(true),n*1e3);return ()=>clearTimeout(N)}},[l,T,n]),W__namespace.useEffect(()=>{if(!M||x)return;let N=p[b],k;return y?g.length>0?k=setTimeout(()=>{h(g.slice(0,-1));},i):(w(false),v(S=>(S+1)%p.length)):g.length<N.length?k=setTimeout(()=>{h(N.slice(0,g.length+1));},t):b<p.length-1||s?k=setTimeout(()=>{w(true);},r):(C(true),m?.()),()=>clearTimeout(k)},[M,g,b,y,x,p,t,i,r,s,m]),jsxRuntime.jsxs("span",{ref:R,className:u(c),children:[jsxRuntime.jsx("span",{ref:f,children:g}),o&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});lR.displayName="Typewriter";var cR=W__namespace.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=W__namespace.useRef(null),d=framerMotion.useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:c,children:p.map((v,y)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&y<p.length-1&&"\xA0"]},y))})})});cR.displayName="TextReveal";var dR=W__namespace.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=W__namespace.useState(0);W__namespace.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){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:u("relative inline-block",o),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});dR.displayName="WordRotate";var fR=W__namespace.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});fR.displayName="ScrollReveal";var gR=W__namespace.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=framerMotion.useScroll({container:s}),m=framerMotion.useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={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}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxRuntime.jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsxRuntime.jsx(qP,{progress:f,position:e})]})});gR.displayName="ScrollProgress";var qP=({progress:e,position:t})=>{let n=framerMotion.useTransform(e,s=>Math.round(s*100)),[r,o]=W__namespace.useState(0);return W__namespace.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxRuntime.jsxs("span",{className:u("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:[r,"%"]})},bR=W__namespace.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=W__namespace.useRef(null),{scrollYProgress:i}=framerMotion.useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=framerMotion.useTransform(i,[0,1],l),d=framerMotion.useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsxRuntime.jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:a,style:{x:m,y:f},children:e})})});bR.displayName="Parallax";var xR=W__namespace.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={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:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
55
|
+
`,document.body.appendChild(ie),Y.dataTransfer.setDragImage(ie,20,15),setTimeout(()=>{document.body.removeChild(ie);},0),h(e),C?.({event:Y,node:e});},bt=Y=>{if(Y.preventDefault(),Y.stopPropagation(),!g||g.key===e.key||U)return;let Se=Y.currentTarget.getBoundingClientRect(),ie=Y.clientY-Se.top,Ke=Se.height,Ge;ie<Ke*.25?Ge=-1:ie>Ke*.75?Ge=1:Ge=0,!(x&&!x({dropNode:e,dropPosition:Ge,dragNode:g}))&&(y(e.key,Ge),R?.({event:Y,node:e}));},br=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key)&&T?.({event:Y,node:e,expandedKeys:F()});},Bn=Y=>{Y.stopPropagation(),M?.({event:Y,node:e});},Fo=Y=>{Y.preventDefault(),Y.stopPropagation(),!(!g||g.key===e.key||U)&&(v!==null&&w(e,v),h(null),y(null,null));},Ft=Y=>{h(null),y(null,null),E?.({event:Y,node:e});},La=Y=>{U||he&&i(e.key,e,Y);},vr=Y=>{Y.stopPropagation(),!U&&!Q&&a(e.key,e);},$=W__namespace.useMemo(()=>{if(!_||v===null)return "";switch(v){case -1:return "before:absolute before:left-0 before:right-0 before:top-0 before:h-0.5 before:bg-foreground";case 1:return "after:absolute after:left-0 after:right-0 after:bottom-0 after:h-0.5 after:bg-foreground";case 0:return "ring-2 ring-foreground ring-inset";default:return ""}},[_,v]),re=[...r,n];return jsxRuntime.jsxs("div",{className:"relative",children:[N&&t>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.map((Y,Se)=>!Y&&jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${Se} * var(--tree-indent) + 12px)`,top:0,bottom:0}},Se)),jsxRuntime.jsx("div",{className:"absolute border-l border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:0,height:n?"calc(var(--tree-item-height) / 2)":"100%"}}),jsxRuntime.jsx("div",{className:"absolute border-t border-border",style:{left:`calc(${t-1} * var(--tree-indent) + 12px)`,top:"calc(var(--tree-item-height) / 2)",width:"calc(var(--tree-indent) - 4px)"}})]}),jsxRuntime.jsxs("div",{role:"treeitem","aria-expanded":Q?void 0:ne,"aria-selected":he?G:void 0,"aria-disabled":U,draggable:zn,onDragStart:On,onDragOver:bt,onDragEnter:br,onDragLeave:Bn,onDrop:Fo,onDragEnd:Ft,onClick:La,className:u("relative",jg({size:I,isSelected:G,isDragging:A,isDisabled:U,isHoverable:he&&!U}),$,z&&"flex-1"),style:{paddingLeft:`calc(${t} * var(--tree-indent) + 8px)`},children:[zn&&S&&oe!==false&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground cursor-grab active:cursor-grabbing",children:oe}),jsxRuntime.jsx("button",{type:"button",onClick:vr,className:u("flex-shrink-0 p-0.5 rounded hover:bg-muted/80 transition-transform",Q&&"invisible"),tabIndex:-1,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:u("h-4 w-4 transition-transform duration-200",ne&&"rotate-90")})}),me&&jsxRuntime.jsx(VT,{checked:O,indeterminate:j,disabled:U,onClick:Y=>m(e.key,e,Y)}),k&&nt&&jsxRuntime.jsx("div",{className:"flex-shrink-0 text-muted-foreground ml-1",children:nt}),jsxRuntime.jsx("div",{className:u("flex-1 min-w-0 truncate ml-1",z&&"flex-none"),children:e.label})]}),B&&ne&&jsxRuntime.jsx("div",{role:"group",children:e.children.map((Y,Se)=>jsxRuntime.jsx(Yg,{node:Y,level:t+1,isLast:Se===e.children.length-1,parentIsLastPath:re},Y.key))})]})},AT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return n(e),t},zT=e=>{let t=[],n=r=>{for(let o of r)t.push(o.key),o.children&&n(o.children);};return e.children&&n(e.children),t},Xg=(e,t)=>{if(!e.children)return false;for(let n of e.children)if(n.key===t||Xg(n,t))return true;return false},qg=W__namespace.forwardRef(({className:e,variant:t,size:n,data:r,draggable:o=false,allowDrop:a,expandedKeys:s,defaultExpandedKeys:i=[],defaultExpandAll:l=false,onExpand:c,selectable:d=true,multiple:m=false,selectedKeys:f,defaultSelectedKeys:p=[],onSelect:g,checkable:h=false,checkStrictly:b=false,checkedKeys:v,defaultCheckedKeys:y=[],onCheck:w,showLine:x=false,showIcon:C=false,showHandle:R=true,dragIcon:T,icon:M,leafIcon:E=jsxRuntime.jsx(lucideReact.File,{className:"h-4 w-4"}),folderIcon:N=jsxRuntime.jsx(lucideReact.Folder,{className:"h-4 w-4"}),folderOpenIcon:k=jsxRuntime.jsx(lucideReact.FolderOpen,{className:"h-4 w-4"}),onDragStart:S,onDragEnter:D,onDragOver:H,onDragLeave:P,onDragEnd:L,onDrop:V,blockNode:z=false,disabled:K=false,...I},F)=>{let B=W__namespace.useCallback(()=>l?new Set(AT(r)):new Set(i),[l,i,r]),[Q,ne]=W__namespace.useState(B),G=s!==void 0,O=G?new Set(s):Q,j=W__namespace.useCallback((xe,Ue)=>{let Kt=new Set(O),Ve=!Kt.has(xe);Ve?Kt.add(xe):Kt.delete(xe),G||ne(Kt),c?.(Array.from(Kt),{expanded:Ve,node:Ue});},[O,G,c]),[A,_]=W__namespace.useState(new Set(p)),U=f!==void 0,he=U?new Set(f):A,me=W__namespace.useCallback((xe,Ue,Kt)=>{let Ve=new Set(he),gn=!Ve.has(xe);m?gn?Ve.add(xe):Ve.delete(xe):(Ve.clear(),gn&&Ve.add(xe)),U||_(Ve);let Yr=[],Ko=Sa=>{for(let Xr of Sa)Ve.has(Xr.key)&&Yr.push(Xr),Xr.children&&Ko(Xr.children);};Ko(r),g?.(Array.from(Ve),{selected:gn,selectedNodes:Yr,node:Ue,event:Kt});},[he,m,U,g,r]),[zn,oe]=W__namespace.useState(new Set(y)),[nt,On]=W__namespace.useState(new Set),bt=v!==void 0,br=bt?new Set(Array.isArray(v)?v:v.checked):zn,Bn=bt&&!Array.isArray(v)?new Set(v.halfChecked):nt,Fo=W__namespace.useCallback((xe,Ue,Kt)=>{let Ve=new Set(br),gn=new Set(Bn),Yr=!Ve.has(xe);if(Yr?(Ve.add(xe),gn.delete(xe)):Ve.delete(xe),!b&&Ue.children){let Mi=zT(Ue);for(let Kn of Mi)Yr?(Ve.add(Kn),gn.delete(Kn)):Ve.delete(Kn);}bt||(oe(Ve),On(gn));let Ko=[],Sa=Mi=>{for(let Kn of Mi)Ve.has(Kn.key)&&Ko.push(Kn),Kn.children&&Sa(Kn.children);};Sa(r);let Xr=b?{checked:Array.from(Ve),halfChecked:Array.from(gn)}:Array.from(Ve);w?.(Xr,{checked:Yr,checkedNodes:Ko,node:Ue,event:Kt,halfCheckedKeys:Array.from(gn)});},[br,Bn,b,bt,w,r]),[Ft,La]=W__namespace.useState(null),[vr,$]=W__namespace.useState(null),[re,Y]=W__namespace.useState(null),Se=W__namespace.useCallback((xe,Ue)=>{$(xe),Y(Ue);},[]),ie=W__namespace.useCallback((xe,Ue)=>{!Ft||!V||Ue===0&&Xg(Ft,xe.key)||V({event:{},node:xe,dragNode:Ft,dropPosition:Ue,dropToGap:Ue!==0});},[Ft,V]),Ke=W__namespace.useCallback(()=>Array.from(O),[O]),Ge={expandedKeys:O,toggleExpand:j,selectedKeys:he,handleSelect:me,selectable:d,multiple:m,checkedKeys:br,halfCheckedKeys:Bn,handleCheck:Fo,checkable:h,checkStrictly:b,draggable:o,draggedNode:Ft,setDraggedNode:La,dragOverKey:vr,dragOverPosition:re,setDragOver:Se,handleDrop:ie,allowDrop:a,onDragStart:S,onDragEnter:D,onDragOver:H,onDragLeave:P,onDragEnd:L,showLine:x,showIcon:C,showHandle:R,dragIcon:T,icon:M,leafIcon:E,folderIcon:N,folderOpenIcon:k,blockNode:z,disabled:K,size:n,data:r,getAllKeys:Ke},Fn=xe=>{let Ue=xe.relatedTarget,Kt=xe.currentTarget;(!Ue||!Kt.contains(Ue))&&Se(null,null);};return jsxRuntime.jsx(_g.Provider,{value:Ge,children:jsxRuntime.jsx("div",{ref:F,role:"tree","aria-multiselectable":m||h,className:u(Wg({variant:t,size:n,className:e})),onDragLeave:Fn,...I,children:r.map((xe,Ue)=>jsxRuntime.jsx(Yg,{node:xe,level:0,isLast:Ue===r.length-1},xe.key))})})});qg.displayName="Tree";var Qg=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}}),$T=({text:e,query:t})=>{if(!t)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e});let n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=e.split(n);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map((o,a)=>n.test(o)?jsxRuntime.jsx("mark",{className:"bg-primary/20 text-foreground rounded-sm",children:o},a):jsxRuntime.jsx("span",{children:o},a))})},UT=(e,t)=>{let[n,r]=W__namespace.useState(e);return W__namespace.useEffect(()=>{let o=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(o);}},[e,t]),n},Jg=W__namespace.forwardRef(({className:e,size:t,value:n,defaultValue:r="",onChange:o,onSelect:a,options:s=[],loadOptions:i,debounceMs:l=300,minChars:c=0,placeholder:d="Type to search...",emptyText:m="No results found.",loadingText:f="Loading...",clearable:p=false,freeSolo:g=true,maxHeight:h=200,highlightMatch:b=true,fullWidth:v=false,disabled:y,...w},x)=>{let[C,R]=W__namespace.useState(false),[T,M]=W__namespace.useState(r),[E,N]=W__namespace.useState([]),[k,S]=W__namespace.useState(false),[D,H]=W__namespace.useState(false),P=W__namespace.useRef(null),L=n!==void 0?n:T,V=UT(L,l);W__namespace.useImperativeHandle(x,()=>P.current);let z=i?E:s,K=W__namespace.useMemo(()=>i?z:z.filter(U=>U.label.toLowerCase().includes(L.toLowerCase())),[z,L,i]);W__namespace.useEffect(()=>{if(!i)return;if(V.length<c){N([]);return}let U=false;return (async()=>{S(true);try{let me=await i(V);U||N(me);}catch{U||N([]);}finally{U||S(false);}})(),()=>{U=true;}},[V,i,c]);let I=U=>{n===void 0&&M(U),o?.(U);},F=U=>{let he=U.target.value;I(he),he.length>=c&&R(true);},B=U=>{I(U.label),a?.(U),R(false);},Q=()=>{I(""),P.current?.focus();},ne=()=>{H(true),L.length>=c&&(K.length>0||k)&&R(true);},G=()=>{H(false);},O=U=>{U.key==="Escape"&&R(false),U.key==="ArrowDown"&&!C&&K.length>0&&R(true);},j=C&&L.length>=c,A=t==="sm"?"h-3 w-3":t==="lg"?"h-5 w-5":"h-4 w-4",_=p&&L?"pr-8":"pr-3";return jsxRuntime.jsxs(rt,{open:j,onOpenChange:R,children:[jsxRuntime.jsx(ja,{asChild:true,children:jsxRuntime.jsxs("div",{className:u("relative",v?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:P,type:"text",value:L,onChange:F,onFocus:ne,onBlur:G,onKeyDown:O,disabled:y,placeholder:d,className:u(Qg({size:t,fullWidth:v}),_,e),style:{borderColor:D?"var(--color-foreground)":void 0},role:"combobox","aria-expanded":j,"aria-autocomplete":"list","aria-controls":"autocomplete-list",...w}),p&&L&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:Q,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:A})})]})}),jsxRuntime.jsx(ot,{className:"w-[--radix-popover-anchor-width] p-0",align:"start",onOpenAutoFocus:U=>U.preventDefault(),children:jsxRuntime.jsx(cmdk.Command,{className:"overflow-hidden rounded-md",shouldFilter:false,children:jsxRuntime.jsx(Ae,{style:{maxHeight:h},children:jsxRuntime.jsx(cmdk.Command.List,{id:"autocomplete-list",className:"p-1",children:k?jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(A,"animate-spin")}),f]}):K.length===0?jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:m}):K.map(U=>jsxRuntime.jsxs(cmdk.Command.Item,{value:U.value,disabled:U.disabled,onSelect:()=>B(U),className:u("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:u("mr-2 h-4 w-4 shrink-0",L===U.label?"opacity-100":"opacity-0")}),jsxRuntime.jsx("span",{className:"flex-1",children:b?jsxRuntime.jsx($T,{text:U.label,query:L}):U.label})]},U.value))})})})})]})});Jg.displayName="Autocomplete";var Rl=W__namespace.createContext(null),yl=W__namespace.createContext(null),wl=()=>{let e=W__namespace.useContext(Rl);if(!e)throw new Error("useFormContext must be used within a Form");return e},Ts=()=>{let e=W__namespace.useContext(yl);if(!e)throw new Error("useFieldContext must be used within a FormField");return e},WT={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:n=>typeof n=="string"&&n.length>=e,message:t??`Must be at least ${e} characters`}),maxLength:(e,t)=>({validate:n=>typeof n=="string"&&n.length<=e,message:t??`Must be at most ${e} characters`}),min:(e,t)=>({validate:n=>typeof n=="number"&&n>=e,message:t??`Must be at least ${e}`}),max:(e,t)=>({validate:n=>typeof n=="number"&&n<=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:n=>typeof n=="string"&&e.test(n),message:t}),custom:(e,t)=>({validate:e,message:t})},eb=W__namespace.forwardRef(({defaultValues:e={},onSubmit:t,onError:n,validateOnBlur:r=true,validateOnChange:o=false,children:a,className:s,...i},l)=>{let[c,d]=W__namespace.useState(e),[m,f]=W__namespace.useState({}),[p,g]=W__namespace.useState({}),[h,b]=W__namespace.useState({}),[v,y]=W__namespace.useState(false),w=W__namespace.useRef(new Map),x=W__namespace.useCallback((P,L)=>{w.current.set(P,L);},[]),C=W__namespace.useCallback(P=>{w.current.delete(P);},[]),R=W__namespace.useCallback(P=>{let L=w.current.get(P)||[],V=c[P];for(let z of L)if(!z.validate(V))return f(K=>({...K,[P]:z.message})),false;return f(z=>({...z,[P]:null})),true},[c]),T=W__namespace.useCallback(()=>{let P=true,L={};return w.current.forEach((V,z)=>{let K=c[z];for(let I of V)if(!I.validate(K)){L[z]=I.message,P=false;break}L[z]||(L[z]=null);}),f(L),P},[c]),M=W__namespace.useCallback((P,L)=>{d(V=>({...V,[P]:L})),b(V=>({...V,[P]:true})),o&&setTimeout(()=>{R(P);},0);},[o,R]),E=W__namespace.useCallback((P,L)=>{f(V=>({...V,[P]:L}));},[]),N=W__namespace.useCallback((P,L)=>{g(V=>({...V,[P]:L})),L&&r&&R(P);},[r,R]),k=W__namespace.useCallback(P=>({value:c[P],error:m[P]??null,touched:p[P]??false,dirty:h[P]??false}),[c,m,p,h]),S=W__namespace.useCallback(()=>{d(e),f({}),g({}),b({});},[e]),D=async P=>{P.preventDefault();let L={};if(w.current.forEach((z,K)=>{L[K]=true;}),g(L),!T()){n?.(m);return}if(t){y(true);try{await t(c);}finally{y(false);}}},H={values:c,errors:m,touched:p,dirty:h,isSubmitting:v,setValue:M,setError:E,setTouched:N,validateField:R,validateAll:T,registerField:x,unregisterField:C,getFieldState:k,reset:S};return jsxRuntime.jsx(Rl.Provider,{value:H,children:jsxRuntime.jsx("form",{ref:l,onSubmit:D,className:u("space-y-4",s),...i,children:a})})});eb.displayName="Form";var tb=({name:e,rules:t=[],defaultValue:n,children:r})=>{let o=wl(),a=W__namespace.useId();W__namespace.useEffect(()=>(o.registerField(e,t),n!==void 0&&o.values[e]===void 0&&o.setValue(e,n),()=>{o.unregisterField(e);}),[e,t,n,o]);let s=o.getFieldState(e),i={name:e,id:`${a}-${e}`,value:s.value,error:s.error,touched:s.touched,dirty:s.dirty};return jsxRuntime.jsx(yl.Provider,{value:i,children:r})};tb.displayName="FormField";var nb=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("space-y-1.5",e),...t}));nb.displayName="FormItem";var rb=W__namespace.forwardRef(({className:e,required:t,children:n,...r},o)=>{let{id:a,error:s,touched:i}=Ts();return jsxRuntime.jsxs(wr,{ref:o,htmlFor:a,className:u(s&&i&&"text-danger",e),...r,children:[n,t&&jsxRuntime.jsx("span",{className:"ml-1 text-danger",children:"*"})]})});rb.displayName="FormLabel";var ob=({children:e})=>{let{name:t,id:n,error:r,touched:o}=Ts(),a=wl(),s=a.getFieldState(t),i=c=>{let d=c.target,m=d.type==="checkbox"?d.checked:d.value;a.setValue(t,m);},l=()=>{a.setTouched(t,true);};return W__namespace.cloneElement(e,{id:n,name:t,value:s.value??"",onChange:i,onBlur:l,"aria-invalid":r&&o?"true":void 0,"aria-describedby":r&&o?`${n}-error`:void 0})};ob.displayName="FormControl";var ab=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("p",{ref:n,className:u("text-xs text-muted-foreground",e),...t}));ab.displayName="FormDescription";var sb=W__namespace.forwardRef(({className:e,message:t,...n},r)=>{let{id:o,error:a,touched:s}=Ts(),i=t??(s?a:null);return i?jsxRuntime.jsx("p",{ref:r,id:`${o}-error`,className:u("text-xs text-danger",e),role:"alert",...n,children:i}):null});sb.displayName="FormMessage";var lb=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"}}),cb=W__namespace.forwardRef(({className:e,size:t,name:n,description:r,avatarUrl:o,avatarFallback:a,trailing:s,...i},l)=>{let c=a||n.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2);return jsxRuntime.jsxs("div",{ref:l,className:u(lb({size:t,className:e})),...i,children:[jsxRuntime.jsxs(Cr,{"data-user-avatar":true,children:[o&&jsxRuntime.jsx(eo,{src:o,alt:n}),jsxRuntime.jsx(Tr,{children:c})]}),jsxRuntime.jsxs("div",{className:"flex flex-col min-w-0",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium leading-none truncate",children:n}),r&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground truncate",children:r})]}),s&&jsxRuntime.jsx("div",{className:"ml-auto flex-shrink-0",children:s})]})});cb.displayName="User";var ub=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"}}),mb=W__namespace.forwardRef(({className:e,variant:t,size:n,...r},o)=>jsxRuntime.jsx("code",{ref:o,className:u(ub({variant:t,size:n,className:e})),...r}));mb.displayName="Code";var pb=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"}}),fb=W__namespace.forwardRef(({className:e,variant:t,size:n,code:r,copyable:o=true,copyLabel:a="Copy",onCopy:s,symbol:i="$",hideSymbol:l=false,...c},d)=>{let[m,f]=W__namespace.useState(false),p=async()=>{try{await navigator.clipboard.writeText(r),f(!0),s?.(),setTimeout(()=>f(!1),2e3);}catch(g){console.error("Failed to copy:",g);}};return jsxRuntime.jsxs("div",{ref:d,className:u(pb({variant:t,size:n,className:e})),...c,children:[!l&&jsxRuntime.jsx("span",{className:"text-muted-foreground select-none",children:i}),jsxRuntime.jsx("code",{className:"flex-1 truncate",children:r}),o&&jsxRuntime.jsx("button",{type:"button",onClick:p,className:u("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":m?"Copied":a,children:m?jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4 text-green-500"}):jsxRuntime.jsx(lucideReact.Copy,{className:"h-4 w-4 text-muted-foreground"})})]})});fb.displayName="Snippet";var Ml=classVarianceAuthority.cva("overflow-hidden",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{radius:"md"}}),gb=W__namespace.forwardRef(({className:e,radius:t,src:n,alt:r,fallback:o,showSkeleton:a=true,onLoad:s,onError:i,fit:l="cover",aspectRatio:c,style:d,...m},f)=>{let[p,g]=W__namespace.useState("loading");W__namespace.useEffect(()=>{n&&g("loading");},[n]);let h=()=>{g("loaded"),s?.();},b=()=>{g("error"),i?.();},v={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}[l];return p==="error"&&o?jsxRuntime.jsx("div",{className:u(Ml({radius:t}),"flex items-center justify-center bg-muted",e),style:{aspectRatio:c,...d},children:o}):jsxRuntime.jsxs("div",{className:u(Ml({radius:t}),"relative",e),style:{aspectRatio:c,...d},children:[p==="loading"&&a&&jsxRuntime.jsx($a,{className:"absolute inset-0 h-full w-full"}),jsxRuntime.jsx("img",{ref:f,src:n,alt:r,onLoad:h,onError:b,className:u("h-full w-full transition-opacity duration-300",v,p==="loading"?"opacity-0":"opacity-100"),...m})]})});gb.displayName="Image";var hb=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"}}),xb=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"}}),Rb=W__namespace.createContext({value:"",onValueChange:()=>{},multiple:false,size:"md"}),yb=W__namespace.forwardRef(({className:e,size:t="md",value:n,defaultValue:r="",onValueChange:o,multiple:a=false,children:s,...i},l)=>{let[c,d]=W__namespace.useState(r),m=n??c,f=p=>{let g;if(a){let h=Array.isArray(m)?m:[m].filter(Boolean);h.includes(p)?g=h.filter(b=>b!==p):g=[...h,p];}else g=p;o?o(g):d(g);};return jsxRuntime.jsx(Rb.Provider,{value:{value:m,onValueChange:f,multiple:a,size:t??"md"},children:jsxRuntime.jsx("div",{ref:l,role:"listbox","aria-multiselectable":a,className:u(hb({size:t,className:e})),...i,children:s})})});yb.displayName="Listbox";var wb=W__namespace.forwardRef(({className:e,value:t,disabled:n,icon:r,description:o,children:a,...s},i)=>{let{value:l,onValueChange:c,multiple:d,size:m}=W__namespace.useContext(Rb),f=d?Array.isArray(l)&&l.includes(t):l===t,p=()=>{n||c(t);},g=h=>{(h.key==="Enter"||h.key===" ")&&!n&&(h.preventDefault(),c(t));};return jsxRuntime.jsxs("div",{ref:i,role:"option","aria-selected":f,"data-disabled":n?"":void 0,tabIndex:n?-1:0,className:u(xb({size:m}),f&&"bg-accent text-accent-foreground",e),onClick:p,onKeyDown:g,...s,children:[r&&jsxRuntime.jsx("span",{className:"mr-2 flex-shrink-0",children:r}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"truncate",children:a}),o&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o})]}),f&&jsxRuntime.jsx(lucideReact.Check,{className:"ml-2 h-4 w-4 flex-shrink-0"})]})});wb.displayName="ListboxItem";var Tb=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"}}),Mb=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 oM({className:e,variant:t,size:n,items:r,onReorder:o,renderItem:a,showHandle:s=true,disabled:i=false,...l},c){let[d,m]=W__namespace.useState(null),[f,p]=W__namespace.useState(null),g=(w,x)=>{i||(m(x),w.dataTransfer.effectAllowed="move",w.dataTransfer.setData("text/plain",String(x)));},h=(w,x)=>{w.preventDefault(),!(i||d===null||d===x)&&p(x);},b=()=>{p(null);},v=(w,x)=>{if(w.preventDefault(),i||d===null||d===x){m(null),p(null);return}let C=[...r],[R]=C.splice(d,1);C.splice(x,0,R),o?.(C),m(null),p(null);},y=()=>{m(null),p(null);};return jsxRuntime.jsx("div",{ref:c,className:u(Tb({variant:t,size:n,className:e})),...l,children:r.map((w,x)=>jsxRuntime.jsxs("div",{draggable:!i,onDragStart:C=>g(C,x),onDragOver:C=>h(C,x),onDragLeave:b,onDrop:C=>v(C,x),onDragEnd:y,className:u(Mb({variant:t,size:n,isDragging:d===x,isDragOver:f===x}),!i&&"cursor-move"),children:[s&&jsxRuntime.jsx("div",{className:u("flex-shrink-0 text-muted-foreground",i?"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:a(w,x)})]},w.id))})}var aM=W__namespace.forwardRef(oM);var kb=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}}),cM={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},Pb=W__namespace.forwardRef(({className:e,variant:t,loading:n=true,size:r="md",spinner:o,text:a,children:s,...i},l)=>jsxRuntime.jsxs("div",{ref:l,className:u("relative",e),...i,children:[s,jsxRuntime.jsx("div",{className:u(kb({variant:t,visible:n})),"aria-hidden":!n,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o||jsxRuntime.jsx(lucideReact.Loader2,{className:u(cM[r],"animate-spin text-primary")}),a&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:a})]})})]}));Pb.displayName="LoadingOverlay";var Lb=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"}}),Sb=W__namespace.forwardRef(({className:e,color:t,isLoading:n=false,progress:r,showSpinner:o=false,...a},s)=>{let[i,l]=W__namespace.useState(0),[c,d]=W__namespace.useState(false),m=W__namespace.useRef(null);return W__namespace.useEffect(()=>{if(r!==void 0){l(r),d(r>0&&r<100);return}return n?(d(true),l(10),m.current=setInterval(()=>{l(f=>{if(f>=90)return f;let p=Math.random()*10;return Math.min(f+p,90)});},500)):i>0&&(l(100),setTimeout(()=>{d(false),l(0);},200)),()=>{m.current&&clearInterval(m.current);}},[n,r]),!c&&r===void 0||r!==void 0&&(r<=0||r>=100)?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:s,className:u(Lb({color:t,className:e})),style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,...a,children:jsxRuntime.jsx("div",{className:"absolute right-0 h-full w-24 -translate-y-1 rotate-3 bg-inherit opacity-50 blur-sm"})}),o&&c&&jsxRuntime.jsx("div",{className:"fixed top-4 right-4 z-[9999]",children:jsxRuntime.jsx("div",{className:u("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")})})]})});Sb.displayName="NProgress";var Vb=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}}),Db={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},gM={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"},Ab=W__namespace.forwardRef(({className:e,variant:t="spinner",size:n="md",fullScreen:r,text:o,color:a="primary",...s},i)=>{let l={primary:"text-primary",secondary:"text-secondary",muted:"text-muted-foreground"}[a],c=()=>{switch(t){case "dots":return jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(d=>jsxRuntime.jsx("div",{className:u(gM[n||"md"],"animate-bounce rounded-full bg-current",l),style:{animationDelay:`${d*.15}s`}},d))});case "pulse":return jsxRuntime.jsx("div",{className:u(Db[n||"md"],"animate-pulse rounded-full bg-current",l)});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:u(Db[n||"md"],"animate-spin",l)})}};return jsxRuntime.jsx("div",{ref:i,className:u(Vb({variant:t,size:n,fullScreen:r,className:e})),role:"status","aria-label":o||"Loading",...s,children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[c(),o&&jsxRuntime.jsx("span",{className:u("text-sm",l),children:o})]})})});Ab.displayName="Loading";var kl=class extends W__namespace.Component{constructor(t){super(t),this.state={hasError:false,error:null};}static getDerivedStateFromError(t){return {hasError:true,error:t}}componentDidCatch(t,n){this.props.onError?.(t,n);}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&this.props.resetKeys.some((r,o)=>r!==t.resetKeys?.[o])&&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(Pl,{error:this.state.error,onReset:this.reset}):this.props.children}},Pl=W__namespace.forwardRef(({error:e,onReset:t,className:n},r)=>jsxRuntime.jsxs("div",{ref:r,className:u("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",n),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"]})]}));Pl.displayName="DefaultErrorFallback";var hM=kl;var Ob=W__namespace.forwardRef(({value:e,defaultValue:t,onValueChange:n,placeholder:r="Pick a date range",dateFormat:o="LLL dd, y",disabled:a=false,minDate:s,maxDate:i,numberOfMonths:l=2,className:c,align:d="start"},m)=>{let[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),b=e!==void 0,v=b?e:g,y=x=>{b||h(x),n?.(x);},w=x=>{if(!x)return r;let{from:C,to:R}=x;return C&&R?`${dateFns.format(C,o)} - ${dateFns.format(R,o)}`:C?dateFns.format(C,o):r};return jsxRuntime.jsxs(rt,{open:f,onOpenChange:p,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(te,{ref:m,variant:"bordered",disabled:a,className:u("w-full justify-start text-left font-normal",!v?.from&&"text-muted-foreground",c),children:[jsxRuntime.jsx(lucideReact.Calendar,{className:"mr-2 h-4 w-4"}),w(v)]})}),jsxRuntime.jsx(ot,{className:"w-auto p-0",align:d,children:jsxRuntime.jsx(so,{mode:"range",defaultMonth:v?.from,selected:v,onSelect:y,numberOfMonths:l,disabled:x=>!!(s&&x<s||i&&x>i),initialFocus:true})})]})});Ob.displayName="DateRangePicker";var bo=e=>String(e).padStart(2,"0"),Bb=W__namespace.forwardRef(({value:e,onValueChange:t,placeholder:n="Pick a time",use24Hour:r=true,minuteStep:o=1,disabled:a=false,className:s},i)=>{let[l,c]=W__namespace.useState(false),d=r?Array.from({length:24},(w,x)=>x):Array.from({length:12},(w,x)=>x+1),m=Array.from({length:Math.floor(60/o)},(w,x)=>x*o),f=w=>{if(!w)return n;if(r)return `${bo(w.hours)}:${bo(w.minutes)}`;let x=w.hours%12||12,C=w.hours>=12?"PM":"AM";return `${bo(x)}:${bo(w.minutes)} ${C}`},p=w=>{let x=e?.minutes??0,C=w;if(!r&&e){let R=e.hours>=12;R&&w!==12?C=w+12:!R&&w===12&&(C=0);}t?.({hours:C,minutes:x});},g=w=>{let x=e?.hours??0;t?.({hours:x,minutes:w});},h=w=>{if(!e)return;let x=e.hours;w==="AM"&&e.hours>=12?x=e.hours-12:w==="PM"&&e.hours<12&&(x=e.hours+12),t?.({hours:x,minutes:e.minutes});},b=()=>{let w=new Date;t?.({hours:w.getHours(),minutes:w.getMinutes()});},v=e?e.hours>=12?"PM":"AM":void 0,y=e?r?e.hours:e.hours%12||12:void 0;return jsxRuntime.jsxs(rt,{open:l,onOpenChange:c,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs(te,{ref:i,variant:"bordered",disabled:a,className:u("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(ot,{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(Ae,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:d.map(w=>jsxRuntime.jsx(te,{variant:y===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>p(w),children:bo(w)},w))})})]}),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(Ae,{className:"h-[200px]",children:jsxRuntime.jsx("div",{className:"flex flex-col p-1",children:m.map(w=>jsxRuntime.jsx(te,{variant:e?.minutes===w?"solid":"ghost",size:"sm",className:"h-8 w-12 justify-center",onClick:()=>g(w),children:bo(w)},w))})})]}),!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:"\xA0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 p-1",children:[jsxRuntime.jsx(te,{variant:v==="AM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("AM"),children:"AM"}),jsxRuntime.jsx(te,{variant:v==="PM"?"solid":"ghost",size:"sm",className:"h-8 w-12",onClick:()=>h("PM"),children:"PM"})]})]})]}),jsxRuntime.jsxs("div",{className:"flex justify-between border-t p-2",children:[jsxRuntime.jsx(te,{variant:"ghost",size:"sm",onClick:b,children:"Now"}),jsxRuntime.jsx(te,{size:"sm",onClick:()=>c(false),children:"Done"})]})]})]})});Bb.displayName="TimePicker";var Fb=classVarianceAuthority.cva("overflow-auto",{variants:{variant:{default:"",bordered:"border rounded-lg",cards:""}},defaultVariants:{variant:"default"}});function wM({className:e,variant:t,items:n,itemHeight:r,height:o,overscan:a=3,renderItem:s,getItemKey:i,gap:l=0,onScrollChange:c,...d},m){let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0);W__namespace.useImperativeHandle(m,()=>f.current);let h=n.length*(r+l)-l,b=r+l,v=Math.max(0,Math.floor(p/b)-a),y=Math.ceil(o/b)+2*a,w=Math.min(n.length-1,v+y),x=R=>{let T=R.currentTarget.scrollTop;g(T),c?.(T);},C=W__namespace.useMemo(()=>{let R=[];for(let T=v;T<=w;T++)n[T]!==void 0&&R.push({item:n[T],index:T,style:{position:"absolute",top:T*b,left:0,right:0,height:r}});return R},[n,v,w,b,r]);return jsxRuntime.jsx("div",{ref:f,className:u(Fb({variant:t,className:e})),style:{height:o,position:"relative"},onScroll:x,...d,children:jsxRuntime.jsx("div",{style:{height:h,position:"relative"},children:C.map(({item:R,index:T,style:M})=>jsxRuntime.jsx("div",{style:M,children:s(R,T)},i?i(R,T):T))})})}var CM=W__namespace.forwardRef(wM);var Gb=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"border rounded-lg overflow-hidden"}},defaultVariants:{variant:"default"}}),Dl=classVarianceAuthority.cva("flex items-center justify-center py-4",{variants:{size:{sm:"py-2",md:"py-4",lg:"py-6"}},defaultVariants:{size:"md"}}),$b=W__namespace.forwardRef(({className:e,variant:t,size:n,children:r,onLoadMore:o,hasMore:a,isLoading:s=false,loader:i,threshold:l=100,rootMargin:c,useWindow:d=false,endMessage:m,...f},p)=>{let g=W__namespace.useRef(null),h=W__namespace.useRef(null),b=W__namespace.useRef(false);W__namespace.useImperativeHandle(p,()=>g.current),W__namespace.useEffect(()=>{let y=h.current;if(!y)return;let w=new IntersectionObserver(x=>{let[C]=x;C.isIntersecting&&a&&!s&&!b.current&&(b.current=true,Promise.resolve(o()).finally(()=>{b.current=false;}));},{root:d?null:g.current,rootMargin:c||`${l}px`,threshold:0});return w.observe(y),()=>{w.disconnect();}},[a,s,o,l,c,d]);let v=jsxRuntime.jsx("div",{className:u(Dl({size:n})),children:jsxRuntime.jsx(lucideReact.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})});return jsxRuntime.jsxs("div",{ref:g,className:u(Gb({variant:t,className:e})),...f,children:[r,jsxRuntime.jsx("div",{ref:h,className:"h-px w-full"}),s&&(i||v),!a&&!s&&m&&jsxRuntime.jsx("div",{className:u(Dl({size:n}),"text-muted-foreground text-sm"),children:m})]})});$b.displayName="InfiniteScroll";var ca=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("span",{ref:n,className:u("absolute h-px w-px p-0 -m-px overflow-hidden whitespace-nowrap border-0","[clip:rect(0,0,0,0)]",e),...t}));ca.displayName="VisuallyHidden";var Wb={opaque:"bg-black/80",blur:"bg-black/50 backdrop-blur-sm",transparent:"bg-transparent"},EM={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"},jb=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"),Hl=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"}}),Hs=W__namespace.createContext(null),Ir=()=>{let e=W__namespace.useContext(Hs);if(!e)throw new Error("Modal components must be used within a Modal");return e},Yb=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r="Modal",children:o,hideCloseButton:a=false,isDismissable:s=true,isKeyboardDismissDisabled:i=false,backdrop:l="opaque",placement:c="center",scrollBehavior:d="inside",size:m,className:f},p)=>{let[g,h]=W__namespace.useState(false),b=e!==void 0,v=b?e:g,[y,w]=W__namespace.useState(false),x=W__namespace.useRef(null),C=W__namespace.useId(),R=W__namespace.useId();W__namespace.useEffect(()=>{w(true);},[]);let T=W__namespace.useCallback(k=>{b||h(k),t?.(k);},[b,t]);W__namespace.useEffect(()=>{if(v)return ct(),()=>dt()},[v]),W__namespace.useEffect(()=>{if(!v||i)return;let k=S=>{S.key==="Escape"&&T(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[v,i,T]);let M=k=>{s&&k.target===k.currentTarget&&T(false);},E=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:k=>{n.props.onClick?.(k),T(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>T(true),children:n}):null,N=()=>!y||!v?null:d==="outside"?Xa__namespace.createPortal(jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l],"overflow-y-auto flex items-start justify-center py-4"),onClick:M,children:jsxRuntime.jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u("relative z-50 grid gap-4 border bg-background p-6 shadow-lg sm:rounded-lg dark:border-0",m==="xs"&&"w-full max-w-xs",m==="sm"&&"w-full max-w-sm",m==="md"&&"w-full max-w-md",m==="lg"&&"w-full max-w-lg",m==="xl"&&"w-full max-w-xl",m==="2xl"&&"w-full max-w-2xl",m==="3xl"&&"w-full max-w-3xl",m==="4xl"&&"w-full max-w-4xl",m==="5xl"&&"w-full max-w-5xl",m==="full"&&"w-[calc(100vw-2rem)] min-h-[calc(100vh-2rem)]",!m&&"w-full max-w-md",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})}),document.body):Xa__namespace.createPortal(jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{"data-state":v?"open":"closed",className:u(jb(),Wb[l]),onClick:M,"aria-hidden":"true"}),jsxRuntime.jsxs("div",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},role:"dialog","aria-modal":"true","aria-labelledby":C,"aria-describedby":R,"data-state":v?"open":"closed",className:u(Hl({size:m}),EM[c],"dark:border-0 max-h-[calc(100vh-2rem)] !flex !flex-col overflow-hidden gap-4",f),children:[jsxRuntime.jsx(ca,{children:jsxRuntime.jsx("h2",{id:C,children:r})}),o,!a&&jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10",onClick:()=>T(false)})]})]}),document.body);return jsxRuntime.jsxs(Hs.Provider,{value:{open:v,onOpenChange:T,scrollBehavior:d,titleId:C,descriptionId:R},children:[E,N()]})});Yb.displayName="Modal";var Xb=({children:e,open:t,defaultOpen:n=false,onOpenChange:r,scrollBehavior:o="inside"})=>{let[a,s]=W__namespace.useState(n),i=t!==void 0,l=i?t:a,c=W__namespace.useId(),d=W__namespace.useId(),m=W__namespace.useCallback(f=>{i||s(f),r?.(f);},[i,r]);return jsxRuntime.jsx(Hs.Provider,{value:{open:l,onOpenChange:m,scrollBehavior:o,titleId:c,descriptionId:d},children:e})};Xb.displayName="ModalRoot";var qb=W__namespace.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(true);};return e&&W__namespace.isValidElement(t)?W__namespace.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(true);},...r}):jsxRuntime.jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});qb.displayName="ModalTrigger";var Il=({children:e,container:t})=>{let[n,r]=W__namespace.useState(false);return W__namespace.useEffect(()=>{r(true);},[]),n?Xa__namespace.createPortal(e,t||document.body):null};Il.displayName="ModalPortal";var Vl=W__namespace.forwardRef(({className:e,...t},n)=>{let{open:r,onOpenChange:o}=Ir();return r?jsxRuntime.jsx("div",{ref:n,"data-state":r?"open":"closed",className:u("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:()=>o(false),"aria-hidden":"true",...t}):null});Vl.displayName="ModalOverlay";var Al=W__namespace.forwardRef(({asChild:e,children:t,onClick:n,...r},o)=>{let{onOpenChange:a}=Ir(),s=i=>{n?.(i),a(false);};return e&&W__namespace.isValidElement(t)?W__namespace.cloneElement(t,{ref:o,onClick:i=>{t.props.onClick?.(i),a(false);},...r}):jsxRuntime.jsx("button",{ref:o,type:"button",onClick:s,...r,children:t})});Al.displayName="ModalClose";var Zb=W__namespace.forwardRef(({className:e,children:t,size:n,showCloseButton:r=true,onEscapeKeyDown:o,onInteractOutside:a,...s},i)=>{let{open:l,onOpenChange:c,titleId:d,descriptionId:m}=Ir(),[f,p]=W__namespace.useState(false);return W__namespace.useEffect(()=>{p(true);},[]),W__namespace.useEffect(()=>{if(l)return ct(),()=>dt()},[l]),W__namespace.useEffect(()=>{if(!l)return;let g=h=>{h.key==="Escape"&&(o?.(),c(false));};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l,c,o]),!f||!l?null:jsxRuntime.jsxs(Il,{children:[jsxRuntime.jsx(Vl,{}),jsxRuntime.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":m,"data-state":l?"open":"closed",className:u(Hl({size:n}),"top-[50%] translate-y-[-50%]",e),...s,children:[t,r&&jsxRuntime.jsx(Al,{asChild:true,children:jsxRuntime.jsx(hn,{variant:"light",className:"absolute right-4 top-4 z-10"})})]})]})});Zb.displayName="ModalContent";var Qb=({className:e,...t})=>jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Qb.displayName="ModalHeader";var Jb=({className:e,children:t})=>(W__namespace.useContext(Hs)?.scrollBehavior??"inside")==="inside"?jsxRuntime.jsx(Ae,{className:u("flex-1 min-h-0 -mx-6 px-6",e),children:t}):jsxRuntime.jsx("div",{className:u(e),children:t});Jb.displayName="ModalBody";var ev=({className:e,children:t,...n})=>{let{onOpenChange:r}=Ir();return jsxRuntime.jsx("div",{className:u("flex-shrink-0 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n,children:W__namespace.Children.map(t,o=>W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{onClick:a=>{o.props.onClick?.(a),r(false);}}):o)})};ev.displayName="ModalFooter";var tv=W__namespace.forwardRef(({className:e,...t},n)=>{let{titleId:r}=Ir();return jsxRuntime.jsx("h2",{ref:n,id:r,className:u("text-lg font-semibold leading-none tracking-tight",e),...t})});tv.displayName="ModalTitle";var nv=W__namespace.forwardRef(({className:e,...t},n)=>{let{descriptionId:r}=Ir();return jsxRuntime.jsx("p",{ref:n,id:r,className:u("text-sm text-muted-foreground",e),...t})});nv.displayName="ModalDescription";var av=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"}}),IM=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"}}),VM=W__namespace.createContext(null),AM={default:lucideReact.HelpCircle,danger:lucideReact.XCircle,warning:lucideReact.AlertTriangle,success:lucideReact.CheckCircle,info:lucideReact.Info},zl=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,confirmText:a="Confirm",cancelText:s="Cancel",onConfirm:i,onCancel:l,showIcon:c=true,icon:d,variant:m="default",loading:f=false,disabled:p=false,className:g},h)=>{let[b,v]=W__namespace.useState(false),[y,w]=W__namespace.useState(false),[x,C]=W__namespace.useState(false),R=e!==void 0,T=R?e:b,M=AM[m||"default"],E=W__namespace.useId(),N=W__namespace.useId();W__namespace.useEffect(()=>{C(true);},[]);let k=W__namespace.useCallback(V=>{R||v(V),t?.(V);},[R,t]);W__namespace.useEffect(()=>{if(T)return ct(),()=>dt()},[T]);let S=async()=>{if(i){let V=i();if(V instanceof Promise){w(true);try{await V;}finally{w(false);}}}k(false);},D=()=>{l?.(),k(false);},H=f||y,P=n?W__namespace.isValidElement(n)?W__namespace.cloneElement(n,{onClick:V=>{n.props.onClick?.(V),k(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>k(true),children:n}):null,L=()=>!x||!T?null:Xa__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:h,role:"alertdialog","aria-modal":"true","aria-labelledby":E,"aria-describedby":o?N:void 0,"data-state":T?"open":"closed",className:u("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",g),children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 sm:flex-row sm:items-start",children:[c&&jsxRuntime.jsx("div",{className:u(av({variant:m})),children:d||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:E,className:"text-lg font-semibold",children:r}),o&&jsxRuntime.jsx("p",{id:N,className:"text-sm text-muted-foreground",children:o})]})]}),jsxRuntime.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:[jsxRuntime.jsx("button",{type:"button",className:u(tn({variant:"bordered"})),onClick:D,disabled:H,children:s}),jsxRuntime.jsx("button",{type:"button",className:u(tn(),IM({variant:m}),H&&"opacity-50 cursor-not-allowed"),onClick:S,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..."]}):a})]})]})]}),document.body);return jsxRuntime.jsxs(VM.Provider,{value:{open:T,onOpenChange:k,titleId:E,descriptionId:N},children:[P,L()]})});zl.displayName="ConfirmDialog";function zM(){let[e,t]=W__namespace.useState({open:false,options:null,resolve:null}),n=W__namespace.useCallback(i=>new Promise(l=>{t({open:true,options:i,resolve:l});}),[]),r=W__namespace.useCallback(()=>{e.resolve?.(true),t({open:false,options:null,resolve:null});},[e.resolve]),o=W__namespace.useCallback(()=>{e.resolve?.(false),t({open:false,options:null,resolve:null});},[e.resolve]),a=W__namespace.useCallback(i=>{i||(e.resolve?.(false),t({open:false,options:null,resolve:null}));},[e.resolve]),s=W__namespace.useMemo(()=>e.options?jsxRuntime.jsx(zl,{open:e.open,onOpenChange:a,title:e.options.title,description:e.options.description,confirmText:e.options.confirmText,cancelText:e.options.cancelText,variant:e.options.variant,onConfirm:r,onCancel:o}):null,[e,r,o,a]);return {confirm:n,ConfirmDialog:s}}var YM=e=>e.map(t=>typeof t=="string"?{src:t}:t),Ol=W__namespace.forwardRef(({images:e,open:t,onOpenChange:n,initialIndex:r=0,onIndexChange:o,trigger:a,showThumbnails:s=true,showZoom:i=true,showRotate:l=true,showDownload:c=true,showFullscreen:d=true,showNavigation:m=true,showCounter:f=true,closeOnBackdropClick:p=true,className:g},h)=>{let b=W__namespace.useMemo(()=>YM(e),[e]),[v,y]=W__namespace.useState(r),[w,x]=W__namespace.useState(1),[C,R]=W__namespace.useState(0),[T,M]=W__namespace.useState(false),[E,N]=W__namespace.useState(false),[k,S]=W__namespace.useState({x:0,y:0}),[D,H]=W__namespace.useState({x:0,y:0}),[P,L]=W__namespace.useState(false),V=W__namespace.useRef(null),z=b[v];W__namespace.useEffect(()=>{L(true);},[]),W__namespace.useEffect(()=>{y(r);},[r]),W__namespace.useEffect(()=>{o?.(v);},[v,o]),W__namespace.useEffect(()=>{x(1),R(0),S({x:0,y:0});},[v]),W__namespace.useEffect(()=>{if(t)return ct(),()=>dt()},[t]);let K=W__namespace.useCallback(()=>{y(oe=>oe>0?oe-1:b.length-1);},[b.length]),I=W__namespace.useCallback(()=>{y(oe=>oe<b.length-1?oe+1:0);},[b.length]),F=()=>{x(oe=>Math.min(oe+.5,4));},B=()=>{x(oe=>{let nt=Math.max(oe-.5,.5);return nt===1&&S({x:0,y:0}),nt});},Q=()=>{R(oe=>(oe+90)%360);},ne=async()=>{if(z)try{let nt=await(await fetch(z.src)).blob(),On=URL.createObjectURL(nt),bt=document.createElement("a");bt.href=On,bt.download=z.alt||`image-${v+1}`,document.body.appendChild(bt),bt.click(),document.body.removeChild(bt),URL.revokeObjectURL(On);}catch{window.open(z.src,"_blank");}},G=async()=>{if(V.current)if(T)try{await document.exitFullscreen(),M(!1);}catch{}else try{await V.current.requestFullscreen(),M(!0);}catch{}},O=oe=>{w>1&&(N(true),H({x:oe.clientX-k.x,y:oe.clientY-k.y}));},j=oe=>{E&&w>1&&S({x:oe.clientX-D.x,y:oe.clientY-D.y});},A=()=>{N(false);},_=()=>{n?.(false);},U=oe=>{p&&oe.target===oe.currentTarget&&_();},he=W__namespace.useCallback(oe=>{switch(oe.key){case "ArrowLeft":K();break;case "ArrowRight":I();break;case "Escape":n?.(false);break;case "+":case "=":F();break;case "-":B();break}},[K,I,n]);if(W__namespace.useEffect(()=>{if(t)return window.addEventListener("keydown",he),()=>window.removeEventListener("keydown",he)},[t,he]),W__namespace.useEffect(()=>{let oe=()=>{M(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",oe),()=>document.removeEventListener("fullscreenchange",oe)},[]),b.length===0)return null;let me=a?W__namespace.isValidElement(a)?W__namespace.cloneElement(a,{onClick:oe=>{a.props.onClick?.(oe),n?.(true);}}):jsxRuntime.jsx("button",{type:"button",onClick:()=>n?.(true),children:a}):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[me,!P||!t?null:Xa__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:U}),jsxRuntime.jsxs("div",{ref:h,className:u("fixed inset-0 z-50 flex flex-col outline-none",g),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&&b.length>1&&jsxRuntime.jsxs("span",{className:"text-sm",children:[v+1," / ",b.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:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:B,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(w*100),"%"]}),jsxRuntime.jsx("button",{onClick:F,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Zoom in",children:jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-5 w-5"})})]}),l&&jsxRuntime.jsx("button",{onClick:Q,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Rotate",children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-5 w-5"})}),c&&jsxRuntime.jsx("button",{onClick:ne,className:"rounded-full p-2 hover:bg-white/10 transition-colors",title:"Download",children:jsxRuntime.jsx(lucideReact.Download,{className:"h-5 w-5"})}),d&&jsxRuntime.jsx("button",{onClick:G,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:_,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:V,className:"relative flex-1 flex items-center justify-center overflow-hidden",onMouseDown:O,onMouseMove:j,onMouseUp:A,onMouseLeave:A,children:[m&&b.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:K,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:I,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:u("max-h-full max-w-full object-contain transition-transform duration-200",E?"cursor-grabbing":w>1?"cursor-grab":""),style:{transform:`translate(${k.x}px, ${k.y}px) scale(${w}) rotate(${C}deg)`},draggable:false})]}),z?.description&&jsxRuntime.jsx("div",{className:"p-4 text-center text-white text-sm",children:z.description}),s&&b.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-2 p-4 overflow-x-auto",children:b.map((oe,nt)=>jsxRuntime.jsx("button",{onClick:()=>y(nt),className:u("h-16 w-16 flex-shrink-0 overflow-hidden rounded border-2 transition-all",v===nt?"border-white opacity-100":"border-transparent opacity-50 hover:opacity-75"),children:jsxRuntime.jsx("img",{src:oe.src,alt:oe.alt||`Thumbnail ${nt+1}`,className:"h-full w-full object-cover"})},nt))})]})]}),document.body)]})});Ol.displayName="ImageViewer";var iv=({children:e,images:t,index:n=0,className:r})=>{let[o,a]=W__namespace.useState(false);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>a(true),className:u("cursor-zoom-in",r),children:e}),jsxRuntime.jsx(Ol,{images:t,open:o,onOpenChange:a,initialIndex:n})]})};iv.displayName="ImageViewerTrigger";var lv=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}}),cv=W__namespace.forwardRef(({className:e,color:t,size:n,position:r,ping:o,content:a,show:s=true,offset:i,style:l,...c},d)=>{if(!s)return null;let m=a!=null;return jsxRuntime.jsxs("span",{ref:d,className:u(lv({color:t,size:m?void 0:n,position:r,ping:o}),m&&"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:{...l,...i!==void 0&&{transform:`translate(${r?.includes("right")?i:-i}px, ${r?.includes("top")?-i:i}px)`}},...c,children:[o&&jsxRuntime.jsx("span",{className:u("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")}),a]})});cv.displayName="Indicator";var dv=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-flex",e),...n,children:t}));dv.displayName="IndicatorWrapper";var mv=classVarianceAuthority.cva("relative overflow-auto",{variants:{orientation:{vertical:"",horizontal:"",both:""},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"vertical",size:"md"}}),pv=W__namespace.forwardRef(({className:e,orientation:t,size:n,hideScrollbar:r=false,shadowColor:o="rgba(0, 0, 0, 0.1)",children:a,...s},i)=>{let l=W__namespace.useRef(null),[c,d]=W__namespace.useState({top:false,bottom:false,left:false,right:false});W__namespace.useImperativeHandle(i,()=>l.current);let m=W__namespace.useCallback(()=>{let v=l.current;if(!v)return;let{scrollTop:y,scrollLeft:w,scrollHeight:x,scrollWidth:C,clientHeight:R,clientWidth:T}=v;d({top:y>0,bottom:y<x-R-1,left:w>0,right:w<C-T-1});},[]);W__namespace.useEffect(()=>{let v=l.current;if(v)return m(),v.addEventListener("scroll",m),window.addEventListener("resize",m),()=>{v.removeEventListener("scroll",m),window.removeEventListener("resize",m);}},[m]);let p={sm:"20px",md:"40px",lg:"60px"}[n??"md"],g=t==="vertical"||t==="both",h=t==="horizontal"||t==="both",b={maskImage:[g&&c.top&&`linear-gradient(to bottom, transparent, black ${p})`,g&&c.bottom&&`linear-gradient(to top, transparent, black ${p})`,h&&c.left&&`linear-gradient(to right, transparent, black ${p})`,h&&c.right&&`linear-gradient(to left, transparent, black ${p})`].filter(Boolean).join(", ")||void 0,maskComposite:"intersect",WebkitMaskComposite:"source-in"};return jsxRuntime.jsx("div",{ref:l,className:u(mv({orientation:t,size:n}),r&&"scrollbar-hide [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",e),style:b,...s,children:a})});pv.displayName="ScrollShadow";var fv=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"}}),eN={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"},tN={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"},nN=e=>{let t=e.toLowerCase();return eN[t]||e.toUpperCase()},ua=e=>{let t=e.toLowerCase();return tN[t]||t},Is=e=>{let t=ua(e);return ["meta","control","alt","shift"].includes(t)},gv=W__namespace.forwardRef(({className:e,variant:t,size:n,keys:r,children:o,onPress:a,disabled:s,preventDefault:i=true,...l},c)=>{W__namespace.useEffect(()=>{if(!a||!r||s)return;let m=Array.isArray(r)?r:[r],f=m.filter(Is).map(ua),p=m.filter(h=>!Is(h)).map(ua),g=h=>{let b=f.includes("meta")===h.metaKey,v=f.includes("control")===h.ctrlKey,y=f.includes("alt")===h.altKey,w=f.includes("shift")===h.shiftKey,x=p.length===0||p.includes(h.key.toLowerCase());b&&v&&y&&w&&x&&(i&&h.preventDefault(),a(h));};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,a,s,i]);let d=()=>r?(Array.isArray(r)?r:[r]).map((f,p)=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[p>0&&jsxRuntime.jsx("span",{className:"mx-0.5 text-muted-foreground",children:"+"}),jsxRuntime.jsx("span",{children:nN(f)})]},p)):o;return jsxRuntime.jsx("kbd",{ref:c,className:u(fv({variant:t,size:n}),s&&"opacity-50",e),...l,children:d()})});gv.displayName="Kbd";function rN(e,t,n={}){let{disabled:r=false,preventDefault:o=true}=n;W__namespace.useEffect(()=>{if(r)return;let a=Array.isArray(e)?e:[e],s=a.filter(Is).map(ua),i=a.filter(c=>!Is(c)).map(ua),l=c=>{let d=s.includes("meta")===c.metaKey,m=s.includes("control")===c.ctrlKey,f=s.includes("alt")===c.altKey,p=s.includes("shift")===c.shiftKey,g=i.length===0||i.includes(c.key.toLowerCase());d&&m&&f&&p&&g&&(o&&c.preventDefault(),t(c));};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,r,o]);}var bv=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"}}),vv=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,successDuration:o=2e3,onCopySuccess:a,onCopyError:s,copyIcon:i,successIcon:l,...c},d)=>{let[m,f]=W__namespace.useState(false),p={sm:14,md:16,lg:20}[n??"md"],g=async()=>{try{await navigator.clipboard.writeText(r),f(!0),a?.(),setTimeout(()=>{f(!1);},o);}catch(h){s?.(h);}};return jsxRuntime.jsx("button",{ref:d,type:"button",className:u(bv({variant:t,size:n}),e),onClick:g,"aria-label":m?"Copied":"Copy to clipboard",...c,children:m?l??jsxRuntime.jsx(lucideReact.Check,{className:"text-success",style:{width:p,height:p}}):i??jsxRuntime.jsx(lucideReact.Copy,{style:{width:p,height:p}})})});vv.displayName="CopyButton";var xv=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"}}),uN=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],mN=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function pN(e,t,n){let r=new Date(e,t,1),o=new Date(e,t+1,0),a=[],s=r.getDay()-n;s<0&&(s+=7);for(let l=s-1;l>=0;l--)a.push(new Date(e,t,-l));for(let l=1;l<=o.getDate();l++)a.push(new Date(e,t,l));let i=42-a.length;for(let l=1;l<=i;l++)a.push(new Date(e,t+1,l));return a}function fN(e,t){let n=[],o=e.getDay()-t;o<0&&(o+=7);let a=new Date(e);a.setDate(e.getDate()-o);for(let s=0;s<7;s++){let i=new Date(a);i.setDate(a.getDate()+s),n.push(i);}return n}function zs(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function As(e){return zs(e,new Date)}function hv(e,t){return e.filter(n=>{let r=new Date(n.start),o=new Date(n.end);return zs(r,t)||zs(o,t)||r<t&&o>t})}var Rv=W__namespace.forwardRef(({className:e,variant:t,size:n,events:r=[],view:o="month",onViewChange:a,date:s,onDateChange:i,onEventClick:l,onSlotClick:c,weekStartsOn:d=0,locale:m="en-US",...f},p)=>{let[g,h]=W__namespace.useState(new Date),b=s??g,v=N=>{i?i(N):h(N);},y=d===1?mN:uN,w=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()-1):o==="week"?N.setDate(N.getDate()-7):N.setDate(N.getDate()-1),v(N);},x=()=>{let N=new Date(b);o==="month"?N.setMonth(N.getMonth()+1):o==="week"?N.setDate(N.getDate()+7):N.setDate(N.getDate()+1),v(N);},C=()=>{v(new Date);},R=()=>o==="day"?b.toLocaleDateString(m,{weekday:"long",year:"numeric",month:"long",day:"numeric"}):b.toLocaleDateString(m,{year:"numeric",month:"long"}),T=()=>{let N=pN(b.getFullYear(),b.getMonth(),d);return jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col",children:[jsxRuntime.jsx("div",{className:"grid grid-cols-7 border-b",children:y.map(k=>jsxRuntime.jsx("div",{className:"p-2 text-center font-medium text-muted-foreground",children:k},k))}),jsxRuntime.jsx("div",{className:"flex-1 grid grid-cols-7 grid-rows-6",children:N.map((k,S)=>{let D=hv(r,k),H=k.getMonth()===b.getMonth();return jsxRuntime.jsxs("div",{className:u("min-h-[80px] border-b border-r p-1 cursor-pointer hover:bg-accent/50 transition-colors",!H&&"bg-muted/30"),onClick:()=>c?.(k),children:[jsxRuntime.jsx("div",{className:u("flex items-center justify-center w-7 h-7 rounded-full text-sm mb-1",As(k)&&"bg-primary text-primary-foreground",!H&&"text-muted-foreground"),children:k.getDate()}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[D.slice(0,3).map(P=>jsxRuntime.jsx("div",{className:"text-xs px-1 py-0.5 rounded truncate cursor-pointer hover:opacity-80",style:{backgroundColor:P.color||"hsl(var(--primary))",color:"white"},onClick:L=>{L.stopPropagation(),l?.(P);},children:P.title},P.id)),D.length>3&&jsxRuntime.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",D.length-3," more"]})]})]},S)})})]})},M=()=>{let N=fN(b,d),k=Array.from({length:24},(S,D)=>D);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((S,D)=>jsxRuntime.jsxs("div",{className:u("p-2 text-center border-l",As(S)&&"bg-primary/10"),children:[jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground",children:y[D]}),jsxRuntime.jsx("div",{className:u("text-lg font-semibold",As(S)&&"text-primary"),children:S.getDate()})]},D))]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_repeat(7,1fr)]",children:k.map(S=>jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),N.map((D,H)=>{let P=new Date(D);P.setHours(S,0,0,0);let L=r.filter(V=>{let z=new Date(V.start);return zs(z,D)&&z.getHours()===S});return jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(P),children:L.map(V=>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:V.color||"hsl(var(--primary))",color:"white"},onClick:z=>{z.stopPropagation(),l?.(V);},children:V.title},V.id))},H)})]},S))})})]})},E=()=>{let N=Array.from({length:24},(S,D)=>D),k=hv(r,b);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:u("inline-flex items-center justify-center w-12 h-12 rounded-full text-2xl font-semibold",As(b)&&"bg-primary text-primary-foreground"),children:b.getDate()})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx("div",{className:"grid grid-cols-[60px_1fr]",children:N.map(S=>{let D=new Date(b);D.setHours(S,0,0,0);let H=k.filter(P=>new Date(P.start).getHours()===S);return jsxRuntime.jsxs(W__namespace.Fragment,{children:[jsxRuntime.jsxs("div",{className:"h-12 text-xs text-muted-foreground text-right pr-2 pt-0 border-b",children:[S.toString().padStart(2,"0"),":00"]}),jsxRuntime.jsx("div",{className:"h-12 border-b border-l cursor-pointer hover:bg-accent/50 relative",onClick:()=>c?.(D),children:H.map(P=>jsxRuntime.jsx("div",{className:"absolute inset-x-1 top-0.5 text-xs px-2 py-1 rounded truncate cursor-pointer",style:{backgroundColor:P.color||"hsl(var(--primary))",color:"white"},onClick:L=>{L.stopPropagation(),l?.(P);},children:P.title},P.id))})]},S)})})})]})};return jsxRuntime.jsxs("div",{ref:p,className:u(xv({variant:t,size:n,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(te,{variant:"bordered",size:"sm",onClick:C,children:"Today"}),jsxRuntime.jsx(te,{variant:"ghost",size:"icon",onClick:w,children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"})}),jsxRuntime.jsx(te,{variant:"ghost",size:"icon",onClick:x,children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"})}),jsxRuntime.jsx("h2",{className:"text-lg font-semibold ml-2",children:R()})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-1 border rounded-lg p-1",children:["month","week","day"].map(N=>jsxRuntime.jsx(te,{variant:o===N?"solid":"ghost",size:"sm",onClick:()=>a?.(N),children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),o==="month"&&T(),o==="week"&&M(),o==="day"&&E()]})});Rv.displayName="FullCalendar";var pa=classVarianceAuthority.cva("w-full",{variants:{size:{sm:"h-48",md:"h-64",lg:"h-96"}},defaultVariants:{size:"md"}}),fa=["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%))"],yv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",curveType:c="monotone",...d},m)=>jsxRuntime.jsx("div",{ref:m,className:u(pa({size:t,className:e})),...d,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.LineChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((f,p)=>jsxRuntime.jsx(recharts.Line,{type:c,dataKey:f,stroke:o[p%o.length],strokeWidth:2,dot:{fill:o[p%o.length],strokeWidth:0},activeDot:{r:6}},f))]})})}));yv.displayName="LineChart";var wv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,layout:d="horizontal",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.BarChart,{data:n,layout:d,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:d==="horizontal"?l:void 0,type:d==="horizontal"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{dataKey:d==="vertical"?l:void 0,type:d==="vertical"?"category":"number",className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Bar,{dataKey:p,fill:o[g%o.length],stackId:c?"stack":void 0,radius:[4,4,0,0]},p))]})})}));wv.displayName="BarChart";var Cv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKey:r="value",nameKey:o="name",colors:a=fa,innerRadius:s=0,outerRadius:i=80,showLegend:l=true,showTooltip:c=true,showLabels:d=false,...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.PieChart,{children:[c&&jsxRuntime.jsx(recharts.Tooltip,{contentStyle:{backgroundColor:"hsl(var(--popover))",border:"1px solid hsl(var(--border))",borderRadius:"var(--radius)"}}),l&&jsxRuntime.jsx(recharts.Legend,{}),jsxRuntime.jsx(recharts.Pie,{data:n,dataKey:r,nameKey:o,cx:"50%",cy:"50%",innerRadius:s,outerRadius:i,label:d,labelLine:d,children:n.map((p,g)=>jsxRuntime.jsx(recharts.Cell,{fill:a[g%a.length]},`cell-${g}`))})]})})}));Cv.displayName="PieChart";var Tv=W__namespace.forwardRef(({className:e,size:t,data:n,dataKeys:r,colors:o=fa,showGrid:a=true,showLegend:s=true,showTooltip:i=true,xAxisKey:l="name",stacked:c=false,curveType:d="monotone",...m},f)=>jsxRuntime.jsx("div",{ref:f,className:u(pa({size:t,className:e})),...m,children:jsxRuntime.jsx(recharts.ResponsiveContainer,{width:"100%",height:"100%",children:jsxRuntime.jsxs(recharts.AreaChart,{data:n,children:[a&&jsxRuntime.jsx(recharts.CartesianGrid,{strokeDasharray:"3 3",className:"stroke-muted"}),jsxRuntime.jsx(recharts.XAxis,{dataKey:l,className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),jsxRuntime.jsx(recharts.YAxis,{className:"text-xs fill-muted-foreground",tickLine:false,axisLine:false}),i&&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,{}),r.map((p,g)=>jsxRuntime.jsx(recharts.Area,{type:d,dataKey:p,stroke:o[g%o.length],fill:o[g%o.length],fillOpacity:.3,stackId:c?"stack":void 0},p))]})})}));Tv.displayName="AreaChart";var Ev=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"}}),kv=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"}}),jl=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 zN({card:e,columnId:t,variant:n,renderCard:r,onCardClick:o}){let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=sortable.useSortable({id:e.id,data:{columnId:t}}),m={transform:utilities.CSS.Transform.toString(l),transition:c};return jsxRuntime.jsx("div",{ref:i,style:m,className:u(jl({variant:n,isDragging:d})),onClick:()=>o?.(e,t),...a,...s,children:r?r(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 ON({column:e,variant:t,renderCard:n,onCardClick:r,onAddCard:o,showAddCard:a,columnHeight:s}){return jsxRuntime.jsxs("div",{className:u(kv({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})]}),a&&jsxRuntime.jsx(te,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>o?.(e.id),children:jsxRuntime.jsx(lucideReact.Plus,{className:"h-4 w-4"})})]}),jsxRuntime.jsx(Ae,{style:{height:s},children:jsxRuntime.jsxs("div",{className:"p-2 space-y-2",children:[jsxRuntime.jsx(sortable.SortableContext,{items:e.cards.map(i=>i.id),strategy:sortable.verticalListSortingStrategy,children:e.cards.map(i=>jsxRuntime.jsx(zN,{card:i,columnId:e.id,variant:t,renderCard:n,onCardClick:r},i.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 Pv=W__namespace.forwardRef(({className:e,variant:t,columns:n,onCardMove:r,onCardClick:o,onAddCard:a,renderCard:s,showAddCard:i=true,columnHeight:l=500,...c},d)=>{let[m,f]=W__namespace.useState(null),[p,g]=W__namespace.useState(null),h=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:8}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),b=x=>n.find(C=>C.cards.some(R=>R.id===x));return jsxRuntime.jsxs(core.DndContext,{sensors:h,collisionDetection:core.closestCorners,onDragStart:x=>{let{active:C}=x,R=b(C.id);if(R){let T=R.cards.find(M=>M.id===C.id);T&&(f(T),g(R.id));}},onDragOver:x=>{let{active:C,over:R}=x;if(!R)return;let T=C.id,M=R.id,E=b(T),N=b(M)||n.find(D=>D.id===M);if(!E||!N||E.id===N.id)return;let k=N.cards.findIndex(D=>D.id===M),S=k===-1?N.cards.length:k;r?.(T,E.id,N.id,S);},onDragEnd:x=>{let{active:C,over:R}=x;if(R&&C.id!==R.id){let T=b(C.id),M=b(R.id)||n.find(E=>E.id===R.id);if(T&&M){let E=M.cards.findIndex(k=>k.id===R.id),N=E===-1?M.cards.length:E;r?.(C.id,T.id,M.id,N);}}f(null),g(null);},children:[jsxRuntime.jsx("div",{ref:d,className:u(Ev({variant:t,className:e})),...c,children:n.map(x=>jsxRuntime.jsx(ON,{column:x,variant:t,renderCard:s,onCardClick:o,onAddCard:a,showAddCard:i,columnHeight:l},x.id))}),jsxRuntime.jsx(core.DragOverlay,{children:m&&p&&jsxRuntime.jsx("div",{className:u(jl({variant:t,isDragging:true})),children:s?s(m,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:m.title}),m.description&&jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:m.description})]})]})})})]})});Pv.displayName="KanbanBoard";var Lv=classVarianceAuthority.cva("relative",{variants:{variant:{default:"",bordered:"border rounded-lg p-4",cards:"rounded-lg"}},defaultVariants:{variant:"default"}}),Sv=W__namespace.createContext(null);function _l(){let e=W__namespace.useContext(Sv);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Dv=W__namespace.forwardRef(({className:e,variant:t,children:n,opts:r,plugins:o,orientation:a="horizontal",showArrows:s=true,showDots:i=true,setApi:l,...c},d)=>{let[m,f]=BN__default.default({...r,axis:a==="horizontal"?"x":"y"},o),[p,g]=W__namespace.useState(false),[h,b]=W__namespace.useState(false),[v,y]=W__namespace.useState(0),[w,x]=W__namespace.useState([]),C=W__namespace.useCallback(N=>{N&&(y(N.selectedScrollSnap()),g(N.canScrollPrev()),b(N.canScrollNext()));},[]),R=W__namespace.useCallback(()=>{f?.scrollPrev();},[f]),T=W__namespace.useCallback(()=>{f?.scrollNext();},[f]),M=W__namespace.useCallback(N=>{f?.scrollTo(N);},[f]),E=W__namespace.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),R()):N.key==="ArrowRight"&&(N.preventDefault(),T());},[R,T]);return W__namespace.useEffect(()=>{!f||!l||l(f);},[f,l]),W__namespace.useEffect(()=>{if(f)return x(f.scrollSnapList()),C(f),f.on("reInit",C),f.on("select",C),()=>{f?.off("select",C);}},[f,C]),jsxRuntime.jsx(Sv.Provider,{value:{carouselRef:m,api:f,scrollPrev:R,scrollNext:T,canScrollPrev:p,canScrollNext:h,selectedIndex:v,scrollSnaps:w,scrollTo:M},children:jsxRuntime.jsxs("div",{ref:d,className:u(Lv({variant:t,className:e})),onKeyDownCapture:E,role:"region","aria-roledescription":"carousel",...c,children:[jsxRuntime.jsx("div",{ref:m,className:"overflow-hidden",children:jsxRuntime.jsx("div",{className:u("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col"),children:n})}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Yl,{}),jsxRuntime.jsx(Xl,{})]}),i&&w.length>1&&jsxRuntime.jsx("div",{className:"flex justify-center gap-1.5 mt-4",children:w.map((N,k)=>jsxRuntime.jsx("button",{className:u("w-2 h-2 rounded-full transition-all",k===v?"bg-primary w-4":"bg-muted-foreground/30 hover:bg-muted-foreground/50"),onClick:()=>M(k),"aria-label":`Go to slide ${k+1}`},k))})]})})});Dv.displayName="Carousel";var Hv=W__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx("div",{ref:n,className:u("flex",e),...t}));Hv.displayName="CarouselContent";var Iv=W__namespace.forwardRef(({className:e,basis:t="basis-full",...n},r)=>jsxRuntime.jsx("div",{ref:r,role:"group","aria-roledescription":"slide",className:u("min-w-0 shrink-0 grow-0 pl-4",t,e),...n}));Iv.displayName="CarouselItem";var Yl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollPrev:a,canScrollPrev:s}=_l();return jsxRuntime.jsxs(te,{ref:o,variant:t,size:n,className:u("absolute left-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})});Yl.displayName="CarouselPrevious";var Xl=W__namespace.forwardRef(({className:e,variant:t="bordered",size:n="icon",...r},o)=>{let{scrollNext:a,canScrollNext:s}=_l();return jsxRuntime.jsxs(te,{ref:o,variant:t,size:n,className:u("absolute right-2 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",e),disabled:!s,onClick:a,...r,children:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})});Xl.displayName="CarouselNext";var Vv=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"}}),$s={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"}},Zl={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}"]},Av=W__namespace.forwardRef(({className:e,size:t,onEmojiSelect:n,recentEmojis:r=[],defaultCategory:o="smileys",showSearch:a=true,showCategories:s=true,...i},l)=>{let[c,d]=W__namespace.useState(r.length>0?"recent":o),[m,f]=W__namespace.useState(""),g=m?Object.values(Zl).flat().filter(b=>b.toLowerCase().includes(m.toLowerCase())):c==="recent"?r:Zl[c]||[],h=b=>{n?.(b);};return jsxRuntime.jsxs("div",{ref:l,className:u(Vv({size:t,className:e})),...i,children:[a&&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(Oa,{placeholder:"Search emojis...",value:m,onChange:b=>f(b.target.value),className:"pl-8 h-8"})]})}),s&&!m&&jsxRuntime.jsx("div",{className:"flex border-b px-1",children:Object.entries($s).map(([b,{icon:v}])=>b==="recent"&&r.length===0?null:jsxRuntime.jsx("button",{className:u("flex-1 p-2 text-lg hover:bg-accent rounded transition-colors",c===b&&"bg-accent"),onClick:()=>d(b),title:$s[b].name,children:v},b))}),!m&&jsxRuntime.jsx("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground",children:$s[c].name}),jsxRuntime.jsx(Ae,{className:"flex-1",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-8 gap-1 p-2",children:[g.map((b,v)=>jsxRuntime.jsx("button",{className:"w-8 h-8 flex items-center justify-center text-xl hover:bg-accent rounded transition-colors",onClick:()=>h(b),children:b},`${b}-${v}`)),g.length===0&&jsxRuntime.jsx("div",{className:"col-span-8 py-8 text-center text-muted-foreground text-sm",children:"No emojis found"})]})})]})});Av.displayName="EmojiPicker";var zv=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"}}),vE=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"}}),hE=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"}}),je=({icon:e,title:t,isActive:n,onClick:r,disabled:o})=>jsxRuntime.jsxs(Un,{children:[jsxRuntime.jsx(Wn,{asChild:true,children:jsxRuntime.jsx(te,{type:"button",variant:n?"solid":"ghost",size:"icon",className:"h-7 w-7",onClick:r,disabled:o,children:e})}),jsxRuntime.jsx(jn,{side:"top",className:"text-xs",children:t})]}),Ov=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r="",onChange:o,placeholder:a="Start writing...",readOnly:s=false,showToolbar:i=true,minHeight:l,maxHeight:c,onEditorReady:d,...m},f)=>{let p=react.useEditor({extensions:[YN__default.default.configure({heading:{levels:[1,2,3]}}),XN__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-primary underline"}}),qN__default.default,ZN__default.default.configure({types:["heading","paragraph"]}),QN__default.default.configure({placeholder:a})],content:r,editable:!s,onUpdate:({editor:h})=>{o?.(h.getHTML());},onCreate:({editor:h})=>{d?.(h);}});W__namespace.useEffect(()=>{p&&r!==p.getHTML()&&p.commands.setContent(r);},[r,p]),W__namespace.useEffect(()=>{p&&p.setEditable(!s);},[s,p]);let g=()=>{if(!p)return;let h=p.getAttributes("link").href,b=window.prompt("URL",h);if(b!==null){if(b===""){p.chain().focus().extendMarkRange("link").unsetLink().run();return}p.chain().focus().extendMarkRange("link").setLink({href:b}).run();}};return p?jsxRuntime.jsx($n,{children:jsxRuntime.jsxs("div",{ref:f,className:u(zv({variant:t,size:n,className:e})),...m,children:[i&&!s&&jsxRuntime.jsxs("div",{className:u(vE({size:n})),children:[jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Undo,{className:"h-4 w-4"}),title:"Undo",onClick:()=>p.chain().focus().undo().run(),disabled:!p.can().undo()}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Redo,{className:"h-4 w-4"}),title:"Redo",onClick:()=>p.chain().focus().redo().run(),disabled:!p.can().redo()}),jsxRuntime.jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(je,{icon:jsxRuntime.jsx(lucideReact.Strikethrough,{className:"h-4 w-4"}),title:"Strikethrough",isActive:p.isActive("strike"),onClick:()=>p.chain().focus().toggleStrike().run()}),jsxRuntime.jsx(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{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(je,{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(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Quote,{className:"h-4 w-4"}),title:"Blockquote",isActive:p.isActive("blockquote"),onClick:()=>p.chain().focus().toggleBlockquote().run()}),jsxRuntime.jsx(je,{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(Gn,{orientation:"vertical",className:"h-6 mx-1"}),jsxRuntime.jsx(je,{icon:jsxRuntime.jsx(lucideReact.Link,{className:"h-4 w-4"}),title:"Insert Link",isActive:p.isActive("link"),onClick:g}),jsxRuntime.jsx(je,{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:u(hE({size:n})),style:{minHeight:l,maxHeight:c}})]})}):null});Ov.displayName="RichTextEditor";var Fv=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 NE(e,t,n){return xE.centerCrop(xE.makeAspectCrop({unit:"%",width:90},n,e,t),e,t)}async function Bv(e,t,n=0,r=1){let o=document.createElement("canvas"),a=o.getContext("2d");if(!a)return null;let s=e.naturalWidth/e.width,i=e.naturalHeight/e.height,l=window.devicePixelRatio||1;o.width=Math.floor(t.width*s*l),o.height=Math.floor(t.height*i*l),a.scale(l,l),a.imageSmoothingQuality="high";let c=t.x*s,d=t.y*i,m=n*Math.PI/180,f=e.naturalWidth/2,p=e.naturalHeight/2;return a.save(),a.translate(-c,-d),a.translate(f,p),a.rotate(m),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore(),new Promise(g=>{o.toBlob(h=>{g(h);},"image/png");})}var Kv=W__namespace.forwardRef(({className:e,variant:t,src:n,aspectRatio:r,onCropChange:o,onCropComplete:a,showZoom:s=true,showRotation:i=true,minZoom:l=1,maxZoom:c=3,circularCrop:d=false,initialCrop:m,...f},p)=>{let g=W__namespace.useRef(null),[h,b]=W__namespace.useState(),[v,y]=W__namespace.useState(),[w,x]=W__namespace.useState(1),[C,R]=W__namespace.useState(0),T=k=>{let{width:S,height:D}=k.currentTarget;if(r){let H=NE(S,D,r);b(H);}else b(m||{unit:"%",x:10,y:10,width:80,height:80});},M=k=>{b(k),o?.(k);},E=async k=>{if(y(k),a&&g.current&&k.width&&k.height){let S=await Bv(g.current,k,C,w);a(S);}},N=()=>{R(k=>(k+90)%360);};return W__namespace.useEffect(()=>{v&&g.current&&a&&Bv(g.current,v,C,w).then(k=>{a(k);});},[w,C,v,a]),jsxRuntime.jsxs("div",{ref:p,className:u(Fv({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(xE__default.default,{crop:h,onChange:M,onComplete:E,aspect:r,circularCrop:d,className:"max-h-[400px]",children:jsxRuntime.jsx("img",{ref:g,src:n,alt:"Crop preview",onLoad:T,style:{transform:`scale(${w}) 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(Ja,{value:[w],onValueChange:([k])=>x(k),min:l,max:c,step:.1,className:"flex-1"}),jsxRuntime.jsx(lucideReact.ZoomIn,{className:"h-4 w-4 text-muted-foreground"})]}),i&&jsxRuntime.jsx(te,{variant:"bordered",size:"icon",onClick:N,children:jsxRuntime.jsx(lucideReact.RotateCw,{className:"h-4 w-4"})})]})]})});Kv.displayName="ImageCropper";var tc=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"}}),PE={sm:96,md:128,lg:192},$v=W__namespace.forwardRef(({className:e,variant:t,size:n,value:r,qrSize:o,fgColor:a="currentColor",bgColor:s="transparent",level:i="M",includeMargin:l=false,title:c,logo:d,logoSize:m=40,logoPadding:f=4,logoBackgroundColor:p="white",...g},h)=>{let b=o??PE[n??"md"];return r?jsxRuntime.jsx("div",{ref:h,className:u(tc({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx(EE__default.default,{value:r,size:b,fgColor:a,bgColor:s,level:i,title:c,style:{padding:l?16:0}}),d&&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:d,alt:"Logo",style:{width:m,height:m,objectFit:"contain"}})})]})}):jsxRuntime.jsx("div",{ref:h,className:u(tc({variant:t,size:n,className:e})),...g,children:jsxRuntime.jsx("div",{className:"flex items-center justify-center bg-muted text-muted-foreground text-xs rounded",style:{width:b,height:b},children:"No data"})})});$v.displayName="QRCode";var Uv=({children:e,defaultTheme:t="system",storageKey:n="reever-ui-theme",enableSystem:r=true,disableTransitionOnChange:o=false,attribute:a="class",forcedTheme:s,themes:i=["light","dark"]})=>jsxRuntime.jsx(nextThemes.ThemeProvider,{defaultTheme:t,storageKey:n,enableSystem:r,disableTransitionOnChange:o,attribute:a,forcedTheme:s,themes:i,children:e});Uv.displayName="ThemeProvider";var AE=classVarianceAuthority.cva("",{variants:{variant:{default:"",bordered:"",ghost:""},size:{sm:"",md:"",lg:""}},defaultVariants:{variant:"ghost",size:"md"}}),Wv=W__namespace.forwardRef(({className:e,variant:t="ghost",size:n="md",mode:r="dropdown"},o)=>{let{theme:a,setTheme:s,resolvedTheme:i}=nextThemes.useTheme(),[l,c]=W__namespace.useState(false);W__namespace.useEffect(()=>{c(true);},[]);let d=()=>{let m=["light","dark","system"],p=(m.indexOf(a||"system")+1)%m.length;s(m[p]);};return l?r==="cycle"?jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("h-9 w-9",e),onClick:d,children:[i==="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(no,{children:[jsxRuntime.jsx(ro,{children:jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("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(oo,{align:"end",children:[jsxRuntime.jsxs(_n,{onClick:()=>s("light"),children:[jsxRuntime.jsx(lucideReact.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),jsxRuntime.jsxs(_n,{onClick:()=>s("dark"),children:[jsxRuntime.jsx(lucideReact.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),jsxRuntime.jsxs(_n,{onClick:()=>s("system"),children:[jsxRuntime.jsx(lucideReact.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]}):jsxRuntime.jsxs(te,{ref:o,variant:t==="default"?"bordered":t,size:"icon",className:u("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"})]})});Wv.displayName="ThemeToggle";var jv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_v=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}}),Yv=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"}}),Xv=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,startContent:m,endContent:f,id:p,...g},h)=>{let b=W__namespace.useId(),v=p||b,y=`${v}-description`,w=`${v}-error`,x=a&&r;return jsxRuntime.jsxs("div",{className:u(jv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:v,className:u(Yv({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[m&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:m}),jsxRuntime.jsx("input",{ref:h,id:v,"aria-invalid":a,"aria-describedby":x?w:n?y:void 0,"aria-required":o,className:u(_v({size:s,isInvalid:a}),m&&"pl-10",f&&"pr-10",l),...g}),f&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:f})]}),n&&!x&&jsxRuntime.jsx("p",{id:y,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),x&&jsxRuntime.jsx("p",{id:w,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Xv.displayName="TextField";var Qv=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),BE=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}}),qv=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"}}),Zv=classVarianceAuthority.cva("",{variants:{size:{sm:"h-3 w-3",md:"h-4 w-4",lg:"h-5 w-5"}},defaultVariants:{size:"md"}}),FE=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"}}),Jv=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,min:m,max:f,step:p=1,value:g,defaultValue:h,onChange:b,showButtons:v=true,formatOptions:y,fullWidth:w=false,disabled:x,id:C,...R},T)=>{let M=W__namespace.useId(),E=C||M,N=`${E}-description`,k=`${E}-error`,[S,D]=W__namespace.useState(h),[H,P]=W__namespace.useState(false),L=g!==void 0?g:S,V=a&&r,z=W__namespace.useCallback(O=>{O!==void 0&&(m!==void 0&&O<m&&(O=m),f!==void 0&&O>f&&(O=f)),g===void 0&&D(O),b?.(O);},[g,m,f,b]),K=()=>{let O=(L??0)+p;z(O);},I=()=>{let O=(L??0)-p;z(O);},F=O=>{let j=O.target.value;if(j==="")z(void 0);else {let A=parseFloat(j);isNaN(A)||z(A);}},B=O=>{O.key==="ArrowUp"?(O.preventDefault(),K()):O.key==="ArrowDown"&&(O.preventDefault(),I());},Q=W__namespace.useMemo(()=>L===void 0?"":y?new Intl.NumberFormat(void 0,y).format(L):L.toString(),[L,y]),ne=m!==void 0&&L!==void 0&&L<=m,G=f!==void 0&&L!==void 0&&L>=f;return jsxRuntime.jsxs("div",{className:u(Qv({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:E,className:u(FE({size:s}),i),children:[t,o&&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:I,disabled:x||ne,className:u(qv({size:s}),"left-1"),tabIndex:-1,"aria-label":"Decrease value",children:jsxRuntime.jsx(lucideReact.Minus,{className:u(Zv({size:s}))})}),jsxRuntime.jsx("input",{ref:T,id:E,type:"text",inputMode:"decimal",value:Q,onChange:F,onKeyDown:B,onFocus:()=>P(true),onBlur:()=>P(false),"aria-invalid":a,"aria-describedby":V?k:n?N:void 0,"aria-required":o,"aria-valuemin":m,"aria-valuemax":f,"aria-valuenow":L,disabled:x,className:u(BE({size:s,isInvalid:a,fullWidth:w}),!v&&"px-3",l),style:{borderColor:H?"var(--color-foreground)":void 0},...R}),v&&jsxRuntime.jsx("button",{type:"button",onClick:K,disabled:x||G,className:u(qv({size:s}),"right-1"),tabIndex:-1,"aria-label":"Increase value",children:jsxRuntime.jsx(lucideReact.Plus,{className:u(Zv({size:s}))})})]}),n&&!V&&jsxRuntime.jsx("p",{id:N,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),V&&jsxRuntime.jsx("p",{id:k,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});Jv.displayName="NumberField";var th=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),$E=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}}),eh=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"}}),UE=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"}}),WE=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"}}),nh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="",onChange:p,onClear:g,onSearch:h,showClearButton:b=true,showSearchIcon:v=true,disabled:y,placeholder:w="Search...",id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,[k,S]=W__namespace.useState(f),D=m!==void 0?m:k,H=a&&r,P=D.length>0,L=K=>{let I=K.target.value;m===void 0&&S(I),p?.(I);},V=()=>{m===void 0&&S(""),p?.(""),g?.();},z=K=>{K.key==="Enter"?(K.preventDefault(),h?.(D)):K.key==="Escape"&&P&&(K.preventDefault(),V());};return jsxRuntime.jsxs("div",{className:u(th({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(UE({size:s}),i),children:[t,o&&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:u(eh({size:s}),"absolute left-3 top-1/2 -translate-y-1/2")}),jsxRuntime.jsx("input",{ref:R,id:M,type:"search",value:D,onChange:L,onKeyDown:z,placeholder:w,"aria-invalid":a,"aria-describedby":H?N:n?E:void 0,"aria-required":o,disabled:y,className:u($E({size:s,isInvalid:a}),!v&&"pl-3",!b&&"pr-3",l),...C}),b&&P&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:V,className:u(WE({size:s})),tabIndex:-1,"aria-label":"Clear search",children:jsxRuntime.jsx(lucideReact.X,{className:u(eh({size:s}))})})]}),n&&!H&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),H&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});nh.displayName="SearchField";var rh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),_E=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}}),YE=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"}}),XE=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"}}),ic=(e,t="yyyy-MM-dd")=>{if(!e)return "";let n=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(n)).replace("MM",r).replace("dd",o)},qE=e=>{if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},oh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minDate:g,maxDate:h,dateFormat:b="yyyy-MM-dd",showIcon:v=true,fullWidth:y=false,disabled:w,id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,k=W__namespace.useRef(null),S=R||k,[D,H]=W__namespace.useState(f??null),[P,L]=W__namespace.useState(false),V=()=>{!w&&S.current&&S.current.showPicker?.();},z=m!==void 0?m:D,K=a&&r,I=ne=>{let G=qE(ne.target.value);m===void 0&&H(G),p?.(G);},F=z?ic(z,"yyyy-MM-dd"):"",B=g?ic(g,"yyyy-MM-dd"):void 0,Q=h?ic(h,"yyyy-MM-dd"):void 0;return jsxRuntime.jsxs("div",{className:u(rh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(XE({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u("relative",y?"w-full":"w-fit"),children:[jsxRuntime.jsx("input",{ref:S,id:M,type:"date",value:F,onChange:I,onFocus:()=>L(true),onBlur:()=>L(false),min:B,max:Q,"aria-invalid":a,"aria-describedby":K?N:n?E:void 0,"aria-required":o,disabled:w,className:u(_E({size:s,isInvalid:a,fullWidth:y}),!v&&"pr-3",l),style:{borderColor:P?"var(--color-foreground)":void 0},...C}),v&&jsxRuntime.jsx("button",{type:"button",onClick:V,disabled:w,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:u(YE({size:s}))})})]}),n&&!K&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),K&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});oh.displayName="DateField";var ah=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ZE=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}}),QE=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"}}),sh=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f,onChange:p,minTime:g,maxTime:h,showSeconds:b=false,hourCycle:v=24,disabled:y,fullWidth:w=false,id:x,...C},R)=>{let T=W__namespace.useId(),M=x||T,E=`${M}-description`,N=`${M}-error`,k=W__namespace.useRef(null),S=W__namespace.useRef(null),D=W__namespace.useRef(null),H=W__namespace.useRef(null),[P,L]=W__namespace.useState(f??null),V=m!==void 0?m:P,z=a&&r,K=$=>v===24?$:$===0?12:$>12?$-12:$,I=$=>$>=12?"PM":"AM",F=($,re)=>re==="AM"?$===12?0:$:$===12?12:$+12,[B,Q]=W__namespace.useState(V?String(K(V.hour)).padStart(2,"0"):""),[ne,G]=W__namespace.useState(V?String(V.minute).padStart(2,"0"):""),[O,j]=W__namespace.useState(V?.second!==void 0?String(V.second).padStart(2,"0"):""),[A,_]=W__namespace.useState(V?I(V.hour):"AM"),[U,he]=W__namespace.useState(false);W__namespace.useEffect(()=>{m!==void 0&&(m?(Q(String(K(m.hour)).padStart(2,"0")),G(String(m.minute).padStart(2,"0")),m.second!==void 0&&j(String(m.second).padStart(2,"0")),_(I(m.hour))):(Q(""),G(""),j("")));},[m,v]);let me=($,re,Y,Se)=>{let ie=parseInt($,10),Ke=parseInt(re,10),Ge=b?parseInt(Y,10):void 0;if(isNaN(ie)||isNaN(Ke)||b&&isNaN(Ge)){m===void 0&&L(null),p?.(null);return}let xe={hour:v===12?F(ie,Se):ie,minute:Ke,...b&&Ge!==void 0&&{second:Ge}};m===void 0&&L(xe),p?.(xe);},zn=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);Q(re);let Y=v===24?23:12,Se=v===24?0:1;if(re.length===2){let ie=parseInt(re,10);ie>=Se&&ie<=Y&&(S.current?.focus(),S.current?.select());}},oe=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);if(G(re),re.length===2){let Y=parseInt(re,10);Y>=0&&Y<=59&&(b?(D.current?.focus(),D.current?.select()):v===12&&H.current?.focus());}},nt=$=>{let re=$.target.value.replace(/\D/g,"").slice(0,2);j(re),re.length===2&&v===12&&H.current?.focus();},On=()=>{if(B){let $=parseInt(B,10),re=v===24?23:12,Se=Math.min(Math.max($,v===24?0:1),re),ie=String(Se).padStart(2,"0");Q(ie),me(ie,ne,O,A);}},bt=()=>{if(ne){let $=parseInt(ne,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");G(Y),me(B,Y,O,A);}},br=()=>{if(O){let $=parseInt(O,10),re=Math.min(Math.max($,0),59),Y=String(re).padStart(2,"0");j(Y),me(B,ne,Y,A);}},Bn=()=>{let $=A==="AM"?"PM":"AM";_($),me(B,ne,O,$);},Fo=$=>{let re=$.key.toLowerCase();re==="a"?($.preventDefault(),A!=="AM"&&(_("AM"),me(B,ne,O,"AM"))):re==="p"?($.preventDefault(),A!=="PM"&&(_("PM"),me(B,ne,O,"PM"))):re==="arrowup"||re==="arrowdown"?($.preventDefault(),Bn()):re==="arrowleft"&&($.preventDefault(),b?(D.current?.focus(),D.current?.select()):(S.current?.focus(),S.current?.select()));},Ft=($,re)=>{if($.key==="ArrowUp"||$.key==="ArrowDown"){$.preventDefault();let Y=$.key==="ArrowUp"?1:-1;if(re==="hour"){let Se=parseInt(B,10)||0,ie=v===24?23:12,Ke=v===24?0:1,Ge=Se+Y;Ge>ie&&(Ge=Ke),Ge<Ke&&(Ge=ie);let Fn=String(Ge).padStart(2,"0");Q(Fn),me(Fn,ne,O,A);}else if(re==="minute"){let ie=(parseInt(ne,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Ke=String(ie).padStart(2,"0");G(Ke),me(B,Ke,O,A);}else if(re==="second"){let ie=(parseInt(O,10)||0)+Y;ie>59&&(ie=0),ie<0&&(ie=59);let Ke=String(ie).padStart(2,"0");j(Ke),me(B,ne,Ke,A);}}$.key==="ArrowRight"&&($.preventDefault(),re==="hour"?(S.current?.focus(),S.current?.select()):re==="minute"&&b?(D.current?.focus(),D.current?.select()):(re==="minute"&&!b&&v===12||re==="second"&&v===12)&&H.current?.focus()),$.key==="ArrowLeft"&&($.preventDefault(),re==="minute"?(k.current?.focus(),k.current?.select()):re==="second"&&(S.current?.focus(),S.current?.select())),$.key==="Backspace"&&$.currentTarget.value===""&&(re==="minute"?k.current?.focus():re==="second"&&S.current?.focus());},vr=u((()=>{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",y&&"cursor-not-allowed");return jsxRuntime.jsxs("div",{ref:R,className:u(ah({size:s}),e),...C,children:[t&&jsxRuntime.jsxs("label",{htmlFor:M,className:u(QE({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:u(ZE({size:s,isInvalid:a,disabled:y,fullWidth:w}),l),style:{borderColor:U?"var(--color-foreground)":void 0},onFocus:()=>he(true),onBlur:$=>{$.currentTarget.contains($.relatedTarget)||he(false);},children:[jsxRuntime.jsx("input",{ref:k,id:M,type:"text",inputMode:"numeric",placeholder:v===24?"HH":"hh",value:B,onChange:zn,onBlur:On,onKeyDown:$=>Ft($,"hour"),onFocus:$=>$.target.select(),"aria-label":"Hour","aria-invalid":a,"aria-describedby":z?N:n?E:void 0,"aria-required":o,disabled:y,className:vr}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:S,type:"text",inputMode:"numeric",placeholder:"mm",value:ne,onChange:oe,onBlur:bt,onKeyDown:$=>Ft($,"minute"),onFocus:$=>$.target.select(),"aria-label":"Minute",disabled:y,className:vr}),b&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"text-muted-foreground",children:":"}),jsxRuntime.jsx("input",{ref:D,type:"text",inputMode:"numeric",placeholder:"ss",value:O,onChange:nt,onBlur:br,onKeyDown:$=>Ft($,"second"),onFocus:$=>$.target.select(),"aria-label":"Second",disabled:y,className:vr})]}),v===12&&jsxRuntime.jsx("button",{ref:H,type:"button",onClick:Bn,onKeyDown:Fo,disabled:y,className:u("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",y&&"cursor-not-allowed"),"aria-label":"AM/PM",children:A})]}),n&&!z&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),z&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});sh.displayName="TimeField";var lh=classVarianceAuthority.cva("flex flex-col gap-1.5",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),ek=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}}),tk=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"}}),nk=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"}}),ih=e=>/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e),rk=e=>(e.startsWith("#")||(e="#"+e),e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.toUpperCase()),ch=W__namespace.forwardRef(({className:e,label:t,description:n,errorMessage:r,isRequired:o,isInvalid:a,size:s,labelClassName:i,inputClassName:l,descriptionClassName:c,errorClassName:d,value:m,defaultValue:f="#000000",onChange:p,showSwatch:g=true,showPicker:h=true,allowAlpha:b=false,fullWidth:v=false,disabled:y,id:w,...x},C)=>{let R=W__namespace.useId(),T=w||R,M=`${T}-picker`,E=`${T}-description`,N=`${T}-error`,[k,S]=W__namespace.useState(f),[D,H]=W__namespace.useState(false),P=m!==void 0?m:k,L=a&&r,V=F=>{let B=F.target.value;B&&!B.startsWith("#")&&(B="#"+B),m===void 0&&S(B),p?.(B);},z=F=>{let B=F.target.value.toUpperCase();m===void 0&&S(B),p?.(B);},K=()=>{if(P&&ih(P)){let F=rk(P);F!==P&&(m===void 0&&S(F),p?.(F));}},I=ih(P)?P:"#000000";return jsxRuntime.jsxs("div",{className:u(lh({size:s}),e),children:[t&&jsxRuntime.jsxs("label",{htmlFor:T,className:u(nk({size:s}),i),children:[t,o&&jsxRuntime.jsx("span",{className:"text-danger ml-0.5","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsxs("div",{className:"relative",children:[g&&jsxRuntime.jsx("div",{className:u(tk({size:s})),children:h?jsxRuntime.jsxs("label",{htmlFor:M,className:"block h-full w-full cursor-pointer",children:[jsxRuntime.jsx("input",{id:M,type:"color",value:I,onChange:z,disabled:y,className:"absolute inset-0 h-full w-full cursor-pointer opacity-0",tabIndex:-1}),jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})]}):jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundColor:I}})}),jsxRuntime.jsx("input",{ref:C,id:T,type:"text",value:P,onChange:V,onFocus:()=>H(true),onBlur:()=>{H(false),K();},placeholder:"#000000",maxLength:b?9:7,"aria-invalid":a,"aria-describedby":L?N:n?E:void 0,"aria-required":o,disabled:y,className:u(ek({size:s,isInvalid:a,fullWidth:v}),!g&&"pl-3",l),style:{borderColor:D?"var(--color-foreground)":void 0},...x})]}),n&&!L&&jsxRuntime.jsx("p",{id:E,className:u("text-muted-foreground",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",c),children:n}),L&&jsxRuntime.jsx("p",{id:N,role:"alert",className:u("text-danger",s==="sm"?"text-xs":s==="lg"?"text-sm":"text-xs",d),children:r})]})});ch.displayName="ColorField";var uh=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"}}),mh=W__namespace.createContext({});function ak(){return W__namespace.useContext(mh)}var ph=W__namespace.forwardRef(({className:e,variant:t,orientation:n,spacing:r,disabled:o,children:a,...s},i)=>jsxRuntime.jsx(mh.Provider,{value:{disabled:o},children:jsxRuntime.jsx("div",{ref:i,role:"group",className:u(uh({variant:t,orientation:n,spacing:r,className:e})),...s,children:a})}));ph.displayName="ButtonGroup";var gh=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"}}),bh=W__namespace.forwardRef(({className:e,variant:t,orientation:n,size:r,density:o,items:a,maxVisibleItems:s,isDisabled:i,onAction:l,showLabels:c=false,renderItem:d,...m},f)=>{let p=s&&s<a.length?a.slice(0,s):a,g=s&&s<a.length?a.slice(s):[],h={sm:"h-8 px-2 text-xs",md:"h-9 px-3 text-sm",lg:"h-10 px-4 text-base"}[r??"md"],b={sm:"h-8 w-8",md:"h-9 w-9",lg:"h-10 w-10"}[r??"md"],v={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[r??"md"],y=(x,C)=>{C&&C(),l&&l(x);},w=x=>jsxRuntime.jsxs("button",{type:"button",disabled:i||x.isDisabled,onClick:()=>y(x.key,x.onPress),className:u("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",c?h:b),"aria-label":x.label,children:[x.icon&&jsxRuntime.jsx("span",{className:v,children:x.icon}),c&&jsxRuntime.jsx("span",{children:x.label})]},x.key);return jsxRuntime.jsxs("div",{ref:f,role:"group",className:u(gh({variant:t,orientation:n,size:r,density:o,className:e})),...m,children:[p.map(x=>d?d(x):w(x)),g.length>0&&jsxRuntime.jsxs(no,{children:[jsxRuntime.jsx(ro,{"aria-label":"More actions",className:u("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",i&&"pointer-events-none opacity-50",b),children:jsxRuntime.jsx(lucideReact.MoreHorizontal,{className:v})}),jsxRuntime.jsx(oo,{align:"end",children:g.map(x=>jsxRuntime.jsxs(_n,{disabled:x.isDisabled,onClick:()=>y(x.key,x.onPress),children:[x.icon&&jsxRuntime.jsx("span",{className:u(v,"mr-2"),children:x.icon}),x.label]},x.key))})]})]})});bh.displayName="ActionGroup";var Rh=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"}}),lk=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}}),yh=W__namespace.forwardRef(({className:e,variant:t,size:n,pulse:r=false,hideLabel:o=false,children:a,...s},i)=>jsxRuntime.jsxs("span",{ref:i,role:"status",className:u(Rh({variant:t,size:n,className:e})),...s,children:[jsxRuntime.jsx("span",{className:u(lk({size:n,pulse:r})),"aria-hidden":"true"}),!o&&a&&jsxRuntime.jsx("span",{className:"text-foreground",children:a})]}));yh.displayName="StatusLight";var Ch=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"}}),dk=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"}}),uk=classVarianceAuthority.cva("font-semibold text-foreground",{variants:{size:{sm:"text-base",md:"text-lg",lg:"text-xl"}},defaultVariants:{size:"md"}}),mk=classVarianceAuthority.cva("text-muted-foreground",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Th=W__namespace.forwardRef(({className:e,size:t,illustration:n,heading:r,description:o,children:a,...s},i)=>jsxRuntime.jsxs("div",{ref:i,className:u(Ch({size:t,className:e})),...s,children:[n&&jsxRuntime.jsx("div",{className:u(dk({size:t})),"aria-hidden":"true",children:n}),r&&jsxRuntime.jsx("h3",{className:u(uk({size:t})),children:r}),o&&jsxRuntime.jsx("p",{className:u(mk({size:t})),children:o}),a&&jsxRuntime.jsx("div",{className:"mt-2",children:a})]}));Th.displayName="IllustratedMessage";var Eh=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"}}),xk={info:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle,neutral:lucideReact.Info},kh=W__namespace.forwardRef(({className:e,variant:t,title:n,icon:r,hideIcon:o=false,isDismissible:a=false,onDismiss:s,actions:i,children:l,...c},d)=>{let[m,f]=W__namespace.useState(true);if(!m)return null;let p=xk[t??"info"],g=()=>{f(false),s?.();};return jsxRuntime.jsxs("div",{ref:d,role:"alert",className:u(Eh({variant:t,className:e})),...c,children:[!o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r||jsxRuntime.jsx(p,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[n&&jsxRuntime.jsx("div",{className:"font-medium",children:n}),l&&jsxRuntime.jsx("div",{className:"opacity-90",children:l}),i&&jsxRuntime.jsx("div",{className:"mt-3 flex gap-2",children:i})]}),a&&jsxRuntime.jsx("button",{type:"button",onClick:g,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"})})]})});kh.displayName="InlineAlert";var Ph=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"}}),Lh=W__namespace.forwardRef(({className:e,position:t,size:n,selectedCount:r=0,isOpen:o=true,onClose:a,showClose:s=true,selectedText:i,children:l,...c},d)=>{if(!o||r===0)return null;let m=()=>typeof i=="function"?i(r):i||`${r} item${r>1?"s":""} selected`;return jsxRuntime.jsxs("div",{ref:d,role:"toolbar","aria-label":"Actions for selected items",className:u(Ph({position:t,size:n,className:e})),...c,children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:m()}),jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:l}),s&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-4 w-px bg-border"}),jsxRuntime.jsx("button",{type:"button",onClick:a,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"})})]})]})});Lh.displayName="ActionBar";var Sh=W__namespace.forwardRef(({className:e,icon:t,children:n,...r},o)=>jsxRuntime.jsxs("button",{ref:o,type:"button",className:u("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),...r,children:[t&&jsxRuntime.jsx("span",{className:"h-4 w-4 [&>svg]:h-full [&>svg]:w-full",children:t}),n]}));Sh.displayName="ActionBarButton";var Ih=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"}}),Vh=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 Ah({className:e,variant:t,size:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,allowsDragging:i=false,onReorder:l,showCheckbox:c=false,renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),[h,b]=W__namespace.useState(null),[v,y]=W__namespace.useState(null),w=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),x=M=>{if(a==="none")return;let E;a==="single"?E=w.has(M)?new Set:new Set([M]):(E=new Set(w),E.has(M)?E.delete(M):E.add(M)),o||g(E),s?.(E);},C=(M,E)=>{b(E),M.dataTransfer.effectAllowed="move";},R=(M,E)=>{M.preventDefault(),h!==E&&y(E);},T=()=>{if(h&&v&&h!==v){let M=r.findIndex(S=>S.key===h),E=r.findIndex(S=>S.key===v),N=[...r],[k]=N.splice(M,1);N.splice(E,0,k),l?.(N);}b(null),y(null);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"listbox","aria-multiselectable":a==="multiple",className:u(Ih({variant:t,size:n,className:e})),...f,children:r.map(M=>{let E=w.has(M.key),N=h===M.key,k=v===M.key;return d?jsxRuntime.jsx("div",{role:"option","aria-selected":E,onClick:()=>x(M.key),children:d(M,E)},M.key):jsxRuntime.jsxs("div",{role:"option","aria-selected":E,"aria-disabled":M.isDisabled,draggable:i&&!M.isDisabled,onDragStart:S=>C(S,M.key),onDragOver:S=>R(S,M.key),onDragEnd:T,onClick:()=>!M.isDisabled&&x(M.key),className:u(Vh({variant:t,size:n,isSelected:E,isDisabled:M.isDisabled}),N&&"opacity-50",k&&"border-t-2 border-t-primary"),children:[i&&jsxRuntime.jsx(lucideReact.GripVertical,{className:"h-4 w-4 text-muted-foreground cursor-grab"}),c&&a!=="none"&&jsxRuntime.jsx("div",{className:u("flex h-4 w-4 items-center justify-center rounded border",E?"bg-primary border-primary text-primary-foreground":"border-input"),children:E&&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)})})}Ah.displayName="ListView";var zh=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"}}),Mk=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"}}),Nk=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"}}),Oh=W__namespace.forwardRef(({className:e,orientation:t="horizontal",size:n="md",value:r,defaultValue:o=[25,75],onValueChange:a,onValueCommit:s,min:i=0,max:l=100,step:c=1,disabled:d=false,showLabels:m=false,formatLabel:f=v=>String(v),trackColor:p="primary",name:g,...h},b)=>{let[v,y]=W__namespace.useState(o),w=r!==void 0,x=w?r:v,C=W__namespace.useRef(null),[R,T]=W__namespace.useState(false),[M,E]=W__namespace.useState(null),N=(I,F)=>{if(!C.current)return x[0];let B=C.current.getBoundingClientRect(),Q;t==="horizontal"?Q=(I-B.left)/B.width:Q=1-(F-B.top)/B.height,Q=Math.max(0,Math.min(1,Q));let ne=i+Q*(l-i),G=Math.round(ne/c)*c;return Math.max(i,Math.min(l,G))},k=(I,F)=>{let B=[...x];B[F]=I,F===0&&I>x[1]&&(B[0]=x[1]),F===1&&I<x[0]&&(B[1]=x[0]),w||y(B),a?.(B);},S=(I,F)=>{d||(I.preventDefault(),T(true),E(F),I.target.setPointerCapture(I.pointerId));},D=I=>{if(!R||M===null||d)return;let F=N(I.clientX,I.clientY);k(F,M);},H=()=>{R&&(T(false),E(null),s?.(x));},P=I=>{if(d)return;let F=N(I.clientX,I.clientY),B=Math.abs(x[0]-F),Q=Math.abs(x[1]-F),ne=B<=Q?0:1;k(F,ne);let G=[...x];G[ne]=F,s?.(G);},L=(I,F)=>{if(d)return;let B=x[F];switch(I.key){case "ArrowRight":case "ArrowUp":I.preventDefault(),B=Math.min(l,x[F]+c);break;case "ArrowLeft":case "ArrowDown":I.preventDefault(),B=Math.max(i,x[F]-c);break;case "Home":I.preventDefault(),B=i;break;case "End":I.preventDefault(),B=l;break;default:return}k(B,F);let Q=[...x];Q[F]=B,s?.(Q);},V=I=>(I-i)/(l-i)*100,z={primary:"bg-primary",success:"bg-green-500",warning:"bg-yellow-500",danger:"bg-red-500"}[p],K={sm:14,md:20,lg:24}[n||"md"];return jsxRuntime.jsxs("div",{className:"relative w-full",children:[m&&jsxRuntime.jsxs("div",{className:"flex justify-between mb-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx("span",{children:f(x[0])}),jsxRuntime.jsx("span",{children:f(x[1])})]}),jsxRuntime.jsxs("div",{ref:b,className:u(zh({orientation:t,size:n}),d&&"opacity-50 pointer-events-none",e),...h,children:[jsxRuntime.jsx("div",{ref:C,className:u(Mk({orientation:t,size:n})),onClick:P,children:jsxRuntime.jsx("div",{className:u("absolute rounded-full",z,{"h-full":t==="horizontal","w-full":t==="vertical"}),style:t==="horizontal"?{left:`${V(x[0])}%`,right:`${100-V(x[1])}%`,top:0,bottom:0}:{bottom:`${V(x[0])}%`,top:`${100-V(x[1])}%`,left:0,right:0}})}),x.map((I,F)=>jsxRuntime.jsx("div",{role:"slider",tabIndex:d?-1:0,"aria-valuemin":i,"aria-valuemax":l,"aria-valuenow":I,"aria-orientation":t||void 0,"aria-disabled":d,className:u(Nk({size:n}),R&&M===F&&"cursor-grabbing"),style:t==="horizontal"?{position:"absolute",left:`calc(${V(I)}% - ${K/2}px)`,top:"50%",transform:"translateY(-50%)"}:{position:"absolute",bottom:`calc(${V(I)}% - ${K/2}px)`,left:"50%",transform:"translateX(-50%)"},onPointerDown:B=>S(B,F),onPointerMove:D,onPointerUp:H,onPointerCancel:H,onKeyDown:B=>L(B,F)},F)),g&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:`${g}[0]`,value:x[0]}),jsxRuntime.jsx("input",{type:"hidden",name:`${g}[1]`,value:x[1]})]})]})]})});Oh.displayName="RangeSlider";var fc=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"}}),Sk=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"}}),Dk={help:lucideReact.HelpCircle,info:lucideReact.Info,warning:lucideReact.AlertCircle},Kh=W__namespace.forwardRef(({variant:e="help",size:t,title:n,children:r,trigger:o,side:a="top",align:s="center",open:i,onOpenChange:l,learnMoreUrl:c,learnMoreText:d="Learn more",triggerClassName:m,contentClassName:f},p)=>{let[g,h]=W__namespace.useState(false),[b,v]=W__namespace.useState(false),[y,w]=W__namespace.useState({top:0,left:0}),x=W__namespace.useRef(null),C=W__namespace.useRef(null),R=i!==void 0?i:g,T=W__namespace.useCallback(k=>{i===void 0&&h(k),l?.(k);},[i,l]);W__namespace.useEffect(()=>{v(true);},[]),W__namespace.useEffect(()=>{if(!R||!x.current)return;let k=()=>{let S=x.current.getBoundingClientRect(),D=288,H=8,P=0,L=0;switch(a){case "top":P=S.top-H,L=S.left+S.width/2;break;case "bottom":P=S.bottom+H,L=S.left+S.width/2;break;case "left":P=S.top+S.height/2,L=S.left-H;break;case "right":P=S.top+S.height/2,L=S.right+H;break}if(a==="top"||a==="bottom")switch(s){case "start":L=S.left;break;case "center":L=S.left+S.width/2-D/2;break;case "end":L=S.right-D;break}L=Math.max(8,Math.min(L,window.innerWidth-D-8)),w({top:P,left:L});};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,true),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true);}},[R,a,s]),W__namespace.useEffect(()=>{if(!R)return;let k=S=>{C.current&&!C.current.contains(S.target)&&x.current&&!x.current.contains(S.target)&&T(false);};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[R,T]),W__namespace.useEffect(()=>{if(!R)return;let k=S=>{S.key==="Escape"&&T(false);};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[R,T]);let M=Dk[e??"help"],E=()=>{T(!R);},N=()=>{switch(a){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:[o?W__namespace.isValidElement(o)?W__namespace.cloneElement(o,{ref:x,onClick:k=>{o.props.onClick?.(k),E();}}):jsxRuntime.jsx("button",{ref:x,type:"button",onClick:E,className:u(fc({variant:e,size:t}),m),"aria-label":"Help",children:o}):jsxRuntime.jsx("button",{ref:k=>{x.current=k,typeof p=="function"?p(k):p&&(p.current=k);},type:"button",onClick:E,className:u(fc({variant:e,size:t}),m),"aria-label":"Help",children:jsxRuntime.jsx(M,{className:"h-full w-full"})}),b&&R&&Xa__namespace.createPortal(jsxRuntime.jsxs("div",{ref:C,className:u(Sk({size:t}),f),style:{position:"fixed",top:y.top,left:y.left,transformOrigin:N()},role:"tooltip",children:[n&&jsxRuntime.jsx("div",{className:"mb-2 font-semibold text-foreground",children:n}),jsxRuntime.jsx("div",{className:"text-muted-foreground",children:r}),c&&jsxRuntime.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-block text-primary hover:underline",children:[d," \u2192"]}),jsxRuntime.jsx("div",{className:"absolute h-2 w-2 rotate-45 border bg-popover",style:{...a==="top"&&{bottom:-4,left:"50%",marginLeft:-4,borderTop:"none",borderLeft:"none"},...a==="bottom"&&{top:-4,left:"50%",marginLeft:-4,borderBottom:"none",borderRight:"none"},...a==="left"&&{right:-4,top:"50%",marginTop:-4,borderBottom:"none",borderLeft:"none"},...a==="right"&&{left:-4,top:"50%",marginTop:-4,borderTop:"none",borderRight:"none"}}})]}),document.body)]})});Kh.displayName="ContextualHelp";var $h=classVarianceAuthority.cva("flex flex-wrap",{variants:{spacing:{sm:"gap-1",md:"gap-2",lg:"gap-3"}},defaultVariants:{spacing:"md"}}),gc=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 Uh({className:e,spacing:t,variant:n,size:r,items:o,selectedKeys:a,selectionMode:s="none",onSelectionChange:i,allowsRemoving:l=false,onRemove:c,label:d,description:m,errorMessage:f,maxTags:p,...g}){let[h,b]=W__namespace.useState(new Set),v=W__namespace.useMemo(()=>a?a instanceof Set?a:new Set(a):h,[a,h]),y=R=>{if(s==="none")return;let T;s==="single"?T=v.has(R)?new Set:new Set([R]):(T=new Set(v),T.has(R)?T.delete(R):T.add(R)),a||b(T),i?.(T);},w=(R,T)=>{T.stopPropagation(),c?.(R);},x=p?o.slice(0,p):o,C=p?Math.max(0,o.length-p):0;return jsxRuntime.jsxs("div",{className:"flex flex-col gap-1.5",children:[d&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:d}),m&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:m}),jsxRuntime.jsxs("div",{role:"group","aria-label":d,className:u($h({spacing:t}),e),...g,children:[x.map(R=>{let T=v.has(R.key),M=s!=="none";return jsxRuntime.jsxs("span",{role:M?"button":void 0,tabIndex:M&&!R.isDisabled?0:void 0,"aria-pressed":M?T:void 0,onClick:()=>!R.isDisabled&&y(R.key),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&!R.isDisabled&&(E.preventDefault(),y(R.key));},style:R.color?{backgroundColor:R.color}:void 0,className:u(gc({variant:R.color?void 0:n,size:r,isSelected:T,isDisabled:R.isDisabled}),M&&!R.isDisabled&&"cursor-pointer hover:opacity-80",R.color&&"text-white"),children:[R.icon&&jsxRuntime.jsx("span",{className:"h-3.5 w-3.5 [&>svg]:h-full [&>svg]:w-full",children:R.icon}),R.label,l&&!R.isDisabled&&jsxRuntime.jsx("button",{type:"button",onClick:E=>w(R.key,E),className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10","aria-label":`Remove ${R.label}`,children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},R.key)}),C>0&&jsxRuntime.jsxs("span",{className:u(gc({variant:"surface",size:r}),"cursor-default"),children:["+",C," more"]})]}),f&&jsxRuntime.jsx("span",{className:"text-sm text-danger",children:f})]})}Uh.displayName="TagGroup";var _h=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"}}),Yh=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 Xh({className:e,columns:t,gap:n,items:r,selectedKeys:o,selectionMode:a="none",onSelectionChange:s,showSelectionIndicator:i=true,itemVariant:l="default",itemSize:c="md",renderItem:d,emptyContent:m,...f}){let[p,g]=W__namespace.useState(new Set),h=W__namespace.useMemo(()=>o?o instanceof Set?o:new Set(o):p,[o,p]),b=v=>{if(a==="none")return;let y;a==="single"?y=h.has(v)?new Set:new Set([v]):(y=new Set(h),y.has(v)?y.delete(v):y.add(v)),o||g(y),s?.(y);};return r.length===0?jsxRuntime.jsx("div",{className:u("flex items-center justify-center p-8 text-muted-foreground",e),children:m||"No items"}):jsxRuntime.jsx("div",{role:"grid","aria-multiselectable":a==="multiple",className:u(_h({columns:t,gap:n,className:e})),...f,children:r.map(v=>{let y=h.has(v.key);return d?jsxRuntime.jsx("div",{role:"gridcell","aria-selected":y,onClick:()=>b(v.key),children:d(v,y)},v.key):jsxRuntime.jsxs("div",{role:"gridcell","aria-selected":y,"aria-disabled":v.isDisabled,onClick:()=>!v.isDisabled&&b(v.key),className:u(Yh({variant:l,size:c,isSelected:y,isDisabled:v.isDisabled})),children:[i&&a!=="none"&&y&&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)})})}Xh.displayName="GridList";var Zh=classVarianceAuthority.cva("relative w-full",{variants:{size:{sm:"h-1.5",md:"h-2",lg:"h-3"}},defaultVariants:{size:"md"}}),Ak=classVarianceAuthority.cva("w-full h-full rounded-full overflow-hidden",{variants:{variant:{default:"bg-secondary",subtle:"bg-muted"}},defaultVariants:{variant:"default"}}),zk=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}}),ai=W__namespace.forwardRef(({className:e,size:t,value:n,min:r=0,max:o=100,optimum:a,low:s,high:i,label:l,showValueLabel:c=false,formatValue:d,color:m="primary",trackVariant:f="default",...p},g)=>{let h=Math.min(100,Math.max(0,(n-r)/(o-r)*100)),b=()=>{if(m!=="auto")return "";let y=(n-r)/(o-r),w=s!==void 0?(s-r)/(o-r):.25,x=i!==void 0?(i-r)/(o-r):.75;return (a!==void 0?(a-r)/(o-r):1)>=.5?y<=w?"bg-red-500":y<=x?"bg-yellow-500":"bg-green-500":y>=x?"bg-red-500":y>=w?"bg-yellow-500":"bg-green-500"},v=d?d(n,h):`${Math.round(h)}%`;return jsxRuntime.jsxs("div",{ref:g,className:u("w-full",e),...p,children:[(l||c)&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[l&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:l}),c&&jsxRuntime.jsx("span",{className:"text-sm text-muted-foreground",children:v})]}),jsxRuntime.jsx("div",{role:"meter","aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":o,"aria-label":l,className:u(Zh({size:t})),children:jsxRuntime.jsx("div",{className:u(Ak({variant:f})),children:jsxRuntime.jsx("div",{className:u(zk({color:m==="auto"?void 0:m,rounded:h>=100}),m==="auto"&&b()),style:{width:`${h}%`}})})})]})});ai.displayName="Meter";var Qh=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(ai,{ref:t,color:"auto",low:50,high:80,optimum:0,...e}));Qh.displayName="DiskUsageMeter";var Jh=W__namespace.forwardRef((e,t)=>jsxRuntime.jsx(ai,{ref:t,color:"auto",low:20,high:50,optimum:100,...e}));Jh.displayName="BatteryMeter";var ex=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"}}),ii=(e,t,n)=>{let r=o=>{let a=(o+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return [Math.round(r(5)*255),Math.round(r(3)*255),Math.round(r(1)*255)]},tx=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),o=Math.min(e,t,n),a=r-o,s=0,i=r===0?0:a/r,l=r;if(a!==0)switch(r){case e:s=((t-n)/a+(t<n?6:0))*60;break;case t:s=((n-e)/a+2)*60;break;case n:s=((e-t)/a+4)*60;break}return [s,i,l]},nx=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},rx=(e,t,n)=>"#"+[e,t,n].map(r=>r.toString(16).padStart(2,"0")).join(""),ox=W__namespace.forwardRef(({hue:e,saturation:t,brightness:n,value:r,defaultValue:o="#ff0000",onChange:a,onColorChange:s,size:i,disabled:l,thumbSize:c=18,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),b=W__namespace.useCallback(I=>{let F=nx(I);return F?tx(...F):[0,1,1]},[]),[v,y]=W__namespace.useState(()=>b(r||o)),w=e??v[0],x=t??v[1],C=n??v[2];W__namespace.useEffect(()=>{if(r){let I=b(r);y(I);}},[r,b]);let R=W__namespace.useCallback((I,F)=>{if(l||!p.current)return;let B=p.current.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(I-B.left)/B.width)),ne=Math.max(0,Math.min(1,(F-B.top)/B.height)),G=Q,O=1-ne;t===void 0&&n===void 0&&y([w,G,O]),a?.({hue:w,saturation:G,brightness:O});let j=ii(w,G,O);s?.(rx(...j));},[l,w,t,n,a,s]),T=I=>{l||(I.preventDefault(),h(true),I.target.setPointerCapture(I.pointerId),R(I.clientX,I.clientY));},M=I=>{g&&R(I.clientX,I.clientY);},E=I=>{h(false),I.target.releasePointerCapture(I.pointerId);},[N,k,S]=ii(w,1,1),D=`rgb(${N}, ${k}, ${S})`,H=x*100,P=(1-C)*100,[L,V,z]=ii(w,x,C),K=`rgb(${L}, ${V}, ${z})`;return jsxRuntime.jsx("div",{ref:f,className:u(ex({size:i}),l&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:"absolute inset-0",style:{backgroundColor:D},onPointerDown:T,onPointerMove:M,onPointerUp:E,onPointerLeave:E,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:c,height:c,left:`calc(${H}% - ${c/2}px)`,top:`calc(${P}% - ${c/2}px)`,backgroundColor:K,boxShadow:"0 0 0 1px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.2)"}})]})})});ox.displayName="ColorArea";var sx=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"}}),Kk=`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")`,ax="linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)",ix=W__namespace.forwardRef(({value:e,defaultValue:t,onChange:n,channel:r="hue",baseColor:o="#ff0000",orientation:a,size:s,disabled:i,thumbSize:l=18,showBorder:c=true,className:d,...m},f)=>{let p=W__namespace.useRef(null),[g,h]=W__namespace.useState(false),b=()=>{switch(r){case "hue":return 0;case "alpha":case "saturation":case "brightness":return 1;default:return 0}},[v,y]=W__namespace.useState(t??b()),w=e??v,x=r==="hue"?w/360:w,C=W__namespace.useCallback((D,H)=>{if(i||!p.current)return;let P=p.current.getBoundingClientRect(),L=a!=="vertical",V;L?V=Math.max(0,Math.min(1,(D-P.left)/P.width)):V=Math.max(0,Math.min(1,1-(H-P.top)/P.height));let z=r==="hue"?V*360:V;e===void 0&&y(z),n?.(z);},[i,a,r,e,n]),R=D=>{i||(D.preventDefault(),h(true),D.target.setPointerCapture(D.pointerId),C(D.clientX,D.clientY));},T=D=>{g&&C(D.clientX,D.clientY);},M=D=>{h(false),D.target.releasePointerCapture(D.pointerId);},E=()=>{let D=a!=="vertical",H=D?"to right":"to top";switch(r){case "hue":return D?ax:"linear-gradient(to top, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)";case "alpha":return `linear-gradient(${H}, transparent, ${o})`;case "saturation":return `linear-gradient(${H}, #808080, ${o})`;case "brightness":return `linear-gradient(${H}, #000000, ${o})`;default:return ax}},N=()=>r==="hue"?`hsl(${w}, 100%, 50%)`:o,k=a!=="vertical",S=x*100;return jsxRuntime.jsx("div",{ref:f,className:u(sx({orientation:a,size:s}),i&&"cursor-not-allowed opacity-50",d),...m,children:jsxRuntime.jsxs("div",{ref:p,className:u("absolute inset-0 rounded-full overflow-hidden",c&&"border border-input"),style:{backgroundImage:r==="alpha"?Kk:void 0,backgroundSize:r==="alpha"?"8px 8px":void 0},onPointerDown:R,onPointerMove:T,onPointerUp:M,onPointerLeave:M,children:[jsxRuntime.jsx("div",{className:"absolute inset-0 rounded-full",style:{background:E()}}),jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:l,height:l,...k?{left:`calc(${S}% - ${l/2}px)`,top:"50%",transform:"translateY(-50%)"}:{bottom:`calc(${S}% - ${l/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)"}})]})})});ix.displayName="ColorSlider";var lx=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"}}),Uk=(e,t,n)=>{let r=e-n,o=t-n,a=Math.atan2(o,r)*180/Math.PI+90;return a<0&&(a+=360),a},cx=W__namespace.forwardRef(({value:e,defaultValue:t=0,onChange:n,size:r,disabled:o,innerRadius:a=.6,thumbSize:s=20,showCenter:i=true,className:l,...c},d)=>{let m=W__namespace.useRef(null),[f,p]=W__namespace.useState(false),[g,h]=W__namespace.useState(t),b=e??g,v=W__namespace.useCallback((R,T)=>{if(o||!m.current)return;let M=m.current.getBoundingClientRect(),E=M.width/2,N=R-M.left,k=T-M.top,S=Uk(N,k,E);e===void 0&&h(S),n?.(S);},[o,e,n]),y=R=>{o||(R.preventDefault(),p(true),R.target.setPointerCapture(R.pointerId),v(R.clientX,R.clientY));},w=R=>{f&&v(R.clientX,R.clientY);},x=R=>{p(false),R.target.releasePointerCapture(R.pointerId);},C=()=>{let R=[];for(let T=0;T<=360;T+=30)R.push(`hsl(${T}, 100%, 50%) ${T}deg`);return `conic-gradient(from 270deg, ${R.join(", ")})`};return jsxRuntime.jsx("div",{ref:d,className:u(lx({size:r}),o&&"cursor-not-allowed opacity-50",l),...c,children:jsxRuntime.jsxs("div",{ref:m,className:"absolute inset-0 rounded-full",style:{background:C()},onPointerDown:y,onPointerMove:w,onPointerUp:x,onPointerLeave:x,children:[a<1&&jsxRuntime.jsx("div",{className:"absolute bg-background rounded-full",style:{top:`${(1-a)*50}%`,left:`${(1-a)*50}%`,width:`${a*100}%`,height:`${a*100}%`}}),i&&a<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(Wk,{hue:b,innerRadius:a,thumbSize:s})]})})});cx.displayName="ColorWheel";var Wk=({hue:e,innerRadius:t,thumbSize:n})=>{let r=(1-(1-t)/2)*50,o=(e-90)*Math.PI/180,a=50+r*Math.cos(o),s=50+r*Math.sin(o);return jsxRuntime.jsx("div",{className:"absolute rounded-full border-2 border-white shadow-md pointer-events-none",style:{width:n,height:n,left:`calc(${a}% - ${n/2}px)`,top:`calc(${s}% - ${n/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 ux=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"}}),_k=classVarianceAuthority.cva("text-muted-foreground font-medium",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Yk=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}}),mx=W__namespace.forwardRef(({className:e,orientation:t,size:n,align:r,label:o,value:a,valueWeight:s,mono:i,labelWidth:l,labelClassName:c,valueClassName:d,showColon:m=false,copyable:f=false,onCopy:p,...g},h)=>{let b=async()=>{if(!(!f||a===null||a===void 0))try{let v=typeof a=="string"?a:String(a);await navigator.clipboard.writeText(v),p?.();}catch{}};return jsxRuntime.jsxs("div",{ref:h,className:u(ux({orientation:t,size:n,align:r,className:e})),...g,children:[jsxRuntime.jsxs("span",{className:u(_k({size:n}),c),style:l?{width:l,flexShrink:0}:void 0,children:[o,m&&":"]}),jsxRuntime.jsx("span",{className:u(Yk({size:n,weight:s,mono:i}),f&&"cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 transition-colors",d),onClick:f?b:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,onKeyDown:f?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b());}:void 0,children:a})]})});mx.displayName="LabeledValue";var px=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"}}),fx=W__namespace.forwardRef(({className:e,orientation:t,gap:n,...r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(px({orientation:t,gap:n,className:e})),...r}));fx.displayName="LabeledValueGroup";var hx=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"}}),ko=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"}}),xx=W__namespace.forwardRef(({value:e,defaultValue:t="",onChange:n,onSearch:r,onSelect:o,suggestions:a=[],recentSearches:s=[],onClearRecentSearches:i,trendingSearches:l=[],isLoading:c,showClear:d=true,showIcon:m=true,popoverWidth:f="trigger",emptyMessage:p="No results found",size:g,variant:h,className:b,placeholder:v="Search...",disabled:y,...w},x)=>{let[C,R]=W__namespace.useState(false),[T,M]=W__namespace.useState(t),E=e!==void 0?e:T,N=W__namespace.useRef(null);W__namespace.useImperativeHandle(x,()=>N.current);let k=E.length>0,S=C&&(a.length>0||s.length>0||l.length>0||k),D=I=>{e===void 0&&M(I),n?.(I);},H=()=>{D(""),N.current?.focus();},P=I=>{I?.preventDefault(),E.trim()&&(r?.(E.trim()),R(false));},L=I=>{D(I.label),o?.(I),R(false);},V=I=>{D(I),r?.(I),R(false);},z=I=>{D(I),r?.(I),R(false);},K=W__namespace.useMemo(()=>{let I={};return a.forEach(F=>{let B=F.category||"Results";I[B]||(I[B]=[]),I[B].push(F);}),I},[a]);return jsxRuntime.jsxs(rt,{open:S,onOpenChange:R,children:[jsxRuntime.jsx(ht,{asChild:true,children:jsxRuntime.jsxs("form",{onSubmit:P,className:u(hx({size:g,variant:h}),b),children:[m&&jsxRuntime.jsx(lucideReact.Search,{className:u(ko({size:g}),"ml-3")}),jsxRuntime.jsx("input",{ref:N,type:"text",value:E,onChange:I=>D(I.target.value),onFocus:()=>R(true),placeholder:v,disabled:y,className:u("flex-1 bg-transparent px-3 py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",!m&&"pl-3"),...w}),d&&k&&!y&&jsxRuntime.jsx("button",{type:"button",onClick:H,className:u("mr-2 rounded-sm p-1 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",ko({size:g})),children:jsxRuntime.jsx(lucideReact.X,{className:"h-full w-full"})})]})}),jsxRuntime.jsx(ot,{className:"p-0",style:{width:f==="trigger"?"var(--radix-popover-trigger-width)":f},align:"start",onOpenAutoFocus:I=>I.preventDefault(),children:jsxRuntime.jsxs(cmdk.Command,{className:"rounded-lg border-0",children:[s.length>0&&!k&&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"}),i&&jsxRuntime.jsx("button",{type:"button",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]}),s.map((I,F)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>V(I),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:u(ko({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I}),jsxRuntime.jsx(lucideReact.ArrowRight,{className:u(ko({size:g}),"opacity-0 group-hover:opacity-100")})]},F))]}),l.length>0&&!k&&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"})}),l.map((I,F)=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>z(I),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:u(ko({size:g}))}),jsxRuntime.jsx("span",{className:"flex-1 text-left truncate",children:I})]},F))]}),k&&jsxRuntime.jsx("div",{className:"p-2",children:c?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"})}):a.length>0?Object.entries(K).map(([I,F])=>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:I})}),F.map(B=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>L(B),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[B.icon||jsxRuntime.jsx(lucideReact.Search,{className:u(ko({size:g}))}),jsxRuntime.jsxs("div",{className:"flex-1 text-left",children:[jsxRuntime.jsx("div",{className:"truncate",children:B.label}),B.description&&jsxRuntime.jsx("div",{className:"text-xs text-muted-foreground truncate",children:B.description})]})]},B.id))]},I)):jsxRuntime.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:p})})]})})]})});xx.displayName="SearchBar";var Rx={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"})},Cx=W__namespace.forwardRef(({open:e,onOpenChange:t,items:n=[],recentItems:r=[],placeholder:o="Search...",isLoading:a,emptyMessage:s="No results found.",filter:i,shortcut:l="\u2318K",onSelect:c,footer:d},m)=>{let[f,p]=W__namespace.useState(""),g=W__namespace.useRef(null),[h,b]=W__namespace.useState(false);W__namespace.useEffect(()=>{b(true);},[]),W__namespace.useEffect(()=>{e||p("");},[e]),W__namespace.useEffect(()=>{if(!e)return;let R=T=>{T.key==="Escape"&&t?.(false);};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[e,t]),W__namespace.useEffect(()=>{if(e)return ct(),()=>dt()},[e]);let v=W__namespace.useMemo(()=>{let R={};return n.forEach(T=>{let M=T.category||"Results";R[M]||(R[M]=[]),R[M].push(T);}),R},[n]),y=R=>{R.onSelect?.(),c?.(R),t?.(false);},w=()=>{t?.(false);},x=f.length>0,C=!x&&r.length>0;return !h||!e?null:Xa__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:w}),jsxRuntime.jsx("div",{ref:m,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:i,shouldFilter:!i,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:g,value:f,onValueChange:p,placeholder:o,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:a?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"}),r.map(R=>jsxRuntime.jsxs(cmdk.Command.Item,{value:R.label,onSelect:()=>y(R),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:R.icon||Rx[R.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:R.label}),R.description&&jsxRuntime.jsx("div",{className:"truncate text-xs text-muted-foreground",children:R.description})]}),R.shortcut&&jsxRuntime.jsx("div",{className:"flex items-center gap-1",children:R.shortcut.map((T,M)=>jsxRuntime.jsx("kbd",{className:"rounded bg-muted px-1.5 py-0.5 text-xs font-medium",children:T},M))})]},R.id))]}),x&&Object.entries(v).map(([R,T])=>jsxRuntime.jsxs(cmdk.Command.Group,{heading:R,children:[jsxRuntime.jsx("div",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:R}),T.map(M=>jsxRuntime.jsxs(cmdk.Command.Item,{value:`${M.label} ${M.keywords?.join(" ")||""}`,onSelect:()=>y(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||Rx[R]||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))]},R)),jsxRuntime.jsx(cmdk.Command.Empty,{className:"py-10 text-center text-sm text-muted-foreground",children:s})]})}),d?jsxRuntime.jsx("div",{className:"border-t px-4 py-3",children:d}):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:l})," to open"]})]})]})})]}),document.body)});Cx.displayName="SpotlightSearch";function iP(e="k"){let[t,n]=W__namespace.useState(false);return W__namespace.useEffect(()=>{let r=o=>{(o.metaKey||o.ctrlKey)&&o.key===e&&(o.preventDefault(),n(a=>!a));};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),{open:t,setOpen:n,toggle:()=>n(r=>!r)}}var Nx=W__namespace.createContext(null),ci=()=>{let e=W__namespace.useContext(Nx);if(!e)throw new Error("useNotificationCenter must be used within a NotificationCenterProvider");return e},gP=({children:e,notifications:t,onNotificationsChange:n})=>{let[r,o]=W__namespace.useState([]),[a,s]=W__namespace.useState(false),i=W__namespace.useRef(null),l=t!==void 0,c=l?t:r,d=W__namespace.useCallback(b=>{l?n?.(b):o(b);},[l,n]),m=c.filter(b=>!b.read).length,f=W__namespace.useCallback(b=>{d(c.map(v=>v.id===b?{...v,read:true}:v));},[c,d]),p=W__namespace.useCallback(()=>{d(c.map(b=>({...b,read:true})));},[c,d]),g=W__namespace.useCallback(b=>{d(c.filter(v=>v.id!==b));},[c,d]),h=W__namespace.useCallback(()=>{d([]);},[d]);return jsxRuntime.jsx(Nx.Provider,{value:{notifications:c,unreadCount:m,markAsRead:f,markAllAsRead:p,removeNotification:g,clearAll:h,open:a,setOpen:s,triggerRef:i},children:e})},Ex=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("relative inline-block",e),...n,children:t}));Ex.displayName="NotificationCenter";var kx=W__namespace.forwardRef(({className:e,showBadge:t=true,children:n,onClick:r,...o},a)=>{let{unreadCount:s,open:i,setOpen:l,triggerRef:c}=ci(),d=f=>{r?.(f),l(!i);},m=s>99?"99+":String(s);return jsxRuntime.jsxs("button",{ref:f=>{c.current=f,typeof a=="function"?a(f):a&&(a.current=f);},type:"button",onClick:d,"aria-label":"Notifications"+(s>0?", "+s+" unread":""),className:u("relative inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...o,children:[n||jsxRuntime.jsx(lucideReact.Bell,{className:"h-5 w-5"}),t&&s>0&&jsxRuntime.jsx("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-medium text-danger-foreground",children:m})]})});kx.displayName="NotificationCenterTrigger";var Px=W__namespace.forwardRef(({className:e,align:t="end",sideOffset:n=8,emptyMessage:r="No notifications",children:o,...a},s)=>{let{open:i,setOpen:l,notifications:c,markAllAsRead:d,clearAll:m,triggerRef:f}=ci(),[p,g]=W__namespace.useState(false),h=W__namespace.useRef(null),[b,v]=W__namespace.useState({top:0,left:0});return W__namespace.useEffect(()=>{g(true);},[]),W__namespace.useEffect(()=>{if(!i||!f.current||!h.current)return;let y=()=>{if(!f.current||!h.current)return;let w=f.current.getBoundingClientRect(),x=h.current.getBoundingClientRect(),C=w.bottom+n,R=w.left;t==="center"?R=w.left+w.width/2-x.width/2:t==="end"&&(R=w.right-x.width),R+x.width>window.innerWidth-16&&(R=window.innerWidth-x.width-16),R<16&&(R=16),v({top:C,left:R});};return y(),window.addEventListener("resize",y),window.addEventListener("scroll",y,true),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",y,true);}},[i,f,t,n]),W__namespace.useEffect(()=>{if(!i)return;let y=x=>{h.current&&!h.current.contains(x.target)&&f.current&&!f.current.contains(x.target)&&l(false);},w=x=>{x.key==="Escape"&&l(false);};return document.addEventListener("mousedown",y),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",y),document.removeEventListener("keydown",w);}},[i,l,f]),!p||!i?null:Xa__namespace.createPortal(jsxRuntime.jsxs("div",{ref:y=>{h.current=y,typeof s=="function"?s(y):s&&(s.current=y);},className:u("fixed z-50 w-80 sm:w-96 max-h-[70vh] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg","animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",e),style:{top:b.top,left:b.left},...a,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[jsxRuntime.jsx("h3",{className:"font-semibold",children:"Notifications"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[c.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{type:"button",onClick:d,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all read"}),jsxRuntime.jsx("button",{type:"button",onClick:m,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]}),jsxRuntime.jsx("button",{type:"button",onClick:()=>l(false),className:"rounded-md p-1 hover:bg-accent",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})]}),jsxRuntime.jsx("div",{className:"max-h-[calc(70vh-60px)] overflow-y-auto",children:o||(c.length===0?jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-muted-foreground",children:[jsxRuntime.jsx(lucideReact.Bell,{className:"h-10 w-10 mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]}):c.map(y=>jsxRuntime.jsx(Rc,{notification:y},y.id)))})]}),document.body)});Px.displayName="NotificationCenterContent";var bP={info:"border-l-blue-500",success:"border-l-green-500",warning:"border-l-yellow-500",error:"border-l-red-500"},vP={info:lucideReact.Info,success:lucideReact.CheckCircle,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Rc=({notification:e,onMarkAsRead:t,onRemove:n})=>{let{markAsRead:r,removeNotification:o}=ci(),{id:a,title:s,description:i,type:l="info",timestamp:c,read:d,avatar:m,action:f}=e,p=vP[l],g=()=>{t?t():r(a);},h=()=>{n?n():o(a);},b=v=>{if(!v)return null;let y=typeof v=="string"?new Date(v):v,x=new Date().getTime()-y.getTime(),C=Math.floor(x/6e4),R=Math.floor(x/36e5),T=Math.floor(x/864e5);return C<1?"Just now":C<60?C+"m ago":R<24?R+"h ago":T<7?T+"d ago":y.toLocaleDateString()};return jsxRuntime.jsxs("div",{className:u("group relative flex gap-3 border-b border-l-4 px-4 py-3 transition-colors hover:bg-accent/50",bP[l],!d&&"bg-accent/20"),children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:m||jsxRuntime.jsx("div",{className:u("flex h-8 w-8 items-center justify-center rounded-full",l==="info"&&"bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400",l==="success"&&"bg-green-100 text-green-600 dark:bg-green-900 dark:text-green-400",l==="warning"&&"bg-yellow-100 text-yellow-600 dark:bg-yellow-900 dark:text-yellow-400",l==="error"&&"bg-red-100 text-red-600 dark:bg-red-900 dark:text-red-400"),children:jsxRuntime.jsx(p,{className:"h-4 w-4"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-start justify-between gap-2",children:[jsxRuntime.jsx("p",{className:u("text-sm font-medium",!d&&"font-semibold"),children:s}),!d&&jsxRuntime.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-primary"})]}),i&&jsxRuntime.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:i}),jsxRuntime.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[c&&jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:b(c)}),f&&jsxRuntime.jsx("button",{type:"button",onClick:f.onClick,className:"text-xs font-medium text-primary hover:underline",children:f.label})]})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:jsxRuntime.jsxs("div",{className:"flex gap-1",children:[!d&&jsxRuntime.jsx("button",{type:"button",onClick:g,className:"rounded-md p-1 hover:bg-accent",title:"Mark as read",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})}),jsxRuntime.jsx("button",{type:"button",onClick:h,className:"rounded-md p-1 hover:bg-accent text-danger",title:"Remove",children:jsxRuntime.jsx(lucideReact.Trash2,{className:"h-4 w-4"})})]})})]})};Rc.displayName="NotificationItem";var Lx=W__namespace.forwardRef(({className:e,children:t,...n},r)=>jsxRuntime.jsx("div",{ref:r,className:u("divide-y",e),...n,children:t}));Lx.displayName="NotificationList";var Sx=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"}}),MP={default:lucideReact.Info,success:lucideReact.CheckCircle2,warning:lucideReact.AlertTriangle,error:lucideReact.AlertCircle},Dx=W__namespace.forwardRef(({message:e,type:t="default",variant:n="solid",showIcon:r=false,icon:o,dismissible:a=true,onDismiss:s,endContent:i,position:l,animate:c,autoDismiss:d,storageKey:m,className:f,...p},g)=>{let[h,b]=W__namespace.useState(true),[v,y]=W__namespace.useState(false);W__namespace.useEffect(()=>{m&&localStorage.getItem(`banner-${m}`)==="true"&&b(false);},[m]),W__namespace.useEffect(()=>{if(d&&h){let R=setTimeout(()=>{w();},d);return ()=>clearTimeout(R)}},[d,h]);let w=()=>{y(true),setTimeout(()=>{b(false),m&&localStorage.setItem(`banner-${m}`,"true"),s?.();},200);};if(!h)return null;let x=MP[t],C=r?o!==void 0?o:x?jsxRuntime.jsx(x,{className:"h-4 w-4"}):null:null;return jsxRuntime.jsxs("div",{ref:g,className:u(Sx({variant:n,type:t,position:l}),c&&"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}),i&&jsxRuntime.jsx("div",{className:"shrink-0 ml-2",children:i}),a&&jsxRuntime.jsx("button",{type:"button",onClick:w,className:u("absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-1 transition-opacity hover:opacity-70 cursor-pointer",l==="relative"&&"right-4"),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})});Dx.displayName="Banner";var ya=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"}}),kP=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"}}),wc=W__namespace.forwardRef(({icon:e,label:t="Action button",extended:n,extendedLabel:r,actions:o,direction:a="up",showTooltip:s=true,closeIcon:i,animation:l="rotate",variant:c,size:d,position:m,className:f,onClick:p,disabled:g,...h},b)=>{let[v,y]=W__namespace.useState(false),w=o&&o.length>0,x=E=>{w&&y(!v),p?.(E);},C=E=>{E.onClick?.(),y(false);},R={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=l==="rotate"&&v?"rotate-45":"",M=l==="scale"&&v?"scale-0":"scale-100";return jsxRuntime.jsxs("div",{className:u("relative z-50",m!=="relative"&&m&&ya({position:m})),children:[w&&v&&jsxRuntime.jsx("div",{className:u("absolute left-1/2 -translate-x-1/2 flex items-center",R[a].container),children:o.map((E,N)=>jsxRuntime.jsxs("div",{className:u("flex items-center gap-2 animate-in fade-in zoom-in duration-200",a==="up"||a==="down"?"flex-row":"flex-col"),style:{animationDelay:`${N*50}ms`},children:[s&&(a==="up"||a==="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:E.label}),E.href?jsxRuntime.jsx("a",{href:E.href,className:u(ya({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}):jsxRuntime.jsx("button",{type:"button",onClick:()=>C(E),className:u(ya({variant:E.variant||"flat",size:d==="lg"?"md":"sm",position:"relative"}),"[&>svg]:h-5 [&>svg]:w-5"),"aria-label":E.label,children:E.icon}),s&&(a==="left"||a==="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:E.label})]},E.id))}),jsxRuntime.jsxs("button",{ref:b,type:"button",onClick:x,disabled:g,className:u(ya({variant:c,size:d,position:"relative"}),n&&"w-auto px-6 gap-2",f),"aria-label":t,"aria-expanded":w?v:void 0,...h,children:[v&&i?i:jsxRuntime.jsx("span",{className:u(kP({size:d}),T,M,"transition-all duration-200"),children:e||jsxRuntime.jsx(lucideReact.Plus,{})}),n&&r&&jsxRuntime.jsx("span",{className:"font-medium",children:r})]}),w&&v&&jsxRuntime.jsx("div",{className:"fixed inset-0 -z-10",onClick:()=>y(false)})]})});wc.displayName="FloatingActionButton";var PP=wc;var zx=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"}}),Ix=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"}}),Ox=W__namespace.forwardRef(({className:e,variant:t,size:n,items:r,value:o,defaultValue:a,onValueChange:s,hideLabels:i=false,showActiveLabel:l=false,renderItem:c,...d},m)=>{let[f,p]=W__namespace.useState(a||r[0]?.key),g=o!==void 0,h=g?o:f,b=x=>{x.disabled||(g||p(x.key),s?.(x.key));},v=x=>t==="filled"?x?"text-primary-foreground":"text-primary-foreground/60 hover:text-primary-foreground/80":x?"text-primary":"text-muted-foreground hover:text-foreground",y=()=>{switch(n){case "sm":return "h-5 w-5";case "lg":return "h-7 w-7";default:return "h-6 w-6"}},w=()=>{switch(n){case "sm":return "text-[10px]";case "lg":return "text-sm";default:return "text-xs"}};return jsxRuntime.jsx("nav",{ref:m,className:u(zx({variant:t,size:n}),e),role:"navigation","aria-label":"Bottom navigation",...d,children:r.map(x=>{let C=h===x.key,R=!i&&(l?C:true),T=C&&x.activeIcon?x.activeIcon:x.icon;if(c)return jsxRuntime.jsx("div",{onClick:()=>b(x),className:u(Ix({variant:t}),x.disabled&&"opacity-50 cursor-not-allowed"),children:c(x,C)},x.key);let M=jsxRuntime.jsxs("div",{onClick:()=>!x.href&&b(x),className:u(Ix({variant:t}),v(C),x.disabled&&"opacity-50 cursor-not-allowed"),role:"button","aria-current":C?"page":void 0,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),b(x));},children:[jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx("span",{className:u(y(),"[&>svg]:h-full [&>svg]:w-full"),children:T}),x.badge!==void 0&&x.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:x.badge>99?"99+":x.badge}),x.showDot&&jsxRuntime.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2 w-2 rounded-full bg-red-500"})]}),R&&x.label&&jsxRuntime.jsx("span",{className:u(w(),"font-medium truncate max-w-full px-1"),children:x.label})]},x.key);return x.href&&!x.disabled?jsxRuntime.jsx("a",{href:x.href,onClick:()=>b(x),className:u("flex flex-1 flex-col items-center justify-center gap-1 no-underline",v(C)),children:M},x.key):M})})});Ox.displayName="BottomNavigation";var SP="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",Fx=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-danger hover:bg-destructive/10"}},defaultVariants:{variant:"default"}}),Kx=W__namespace.forwardRef(({open:e,onOpenChange:t,trigger:n,title:r,description:o,items:a,cancelLabel:s="Cancel",onCancel:i,showCancel:l=true,children:c,closeOnSelect:d=true,onAction:m},f)=>{let p=g=>{g.isDisabled||(g.onSelect?.(),m?.(g.key),d&&t?.(false));};return jsxRuntime.jsxs(vaul.Drawer.Root,{open:e,onOpenChange:t,children:[n&&jsxRuntime.jsx(vaul.Drawer.Trigger,{asChild:true,children:n}),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:SP,children:[jsxRuntime.jsx("div",{className:"mx-auto mt-4 h-1.5 w-12 flex-shrink-0 rounded-full bg-muted"}),(r||o)&&jsxRuntime.jsxs("div",{className:"px-4 py-3 text-center",children:[r&&jsxRuntime.jsx(vaul.Drawer.Title,{className:"text-base font-semibold",children:r}),o&&jsxRuntime.jsx(vaul.Drawer.Description,{className:"mt-1 text-sm text-muted-foreground",children:o})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:c||jsxRuntime.jsx("div",{className:"divide-y divide-border/40 dark:divide-border/20",children:a?.map(g=>jsxRuntime.jsxs("button",{type:"button",disabled:g.isDisabled,onClick:()=>p(g),className:u(Fx({variant:g.isDestructive?"destructive":"default"})),children:[g.icon&&jsxRuntime.jsx("span",{className:"h-5 w-5 flex-shrink-0 [&>svg]:h-full [&>svg]:w-full",children:g.icon}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:"font-medium",children:g.label}),g.description&&jsxRuntime.jsx("div",{className:"text-sm text-muted-foreground truncate",children:g.description})]})]},g.key))})}),l&&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:i,className:"w-full rounded-lg bg-muted py-3.5 text-center font-semibold transition-colors hover:bg-muted/80",children:s})})})]})]})]})});Kx.displayName="ActionSheet";var $x=classVarianceAuthority.cva("relative overflow-hidden touch-pan-y",{variants:{variant:{default:"",card:"rounded-lg border bg-card"}},defaultVariants:{variant:"default"}}),Tc=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"}}),Ux=W__namespace.forwardRef(({className:e,variant:t,leftActions:n=[],rightActions:r=[],actionSize:o="md",threshold:a=.3,onSwipeEnd:s,disabled:i=false,fullSwipeAction:l,children:c,...d},m)=>{let f=W__namespace.useRef(null),[p,g]=W__namespace.useState(0),[h,b]=W__namespace.useState(false),v=W__namespace.useRef(0),y=W__namespace.useRef(0),w=n.length*(o==="sm"?64:o==="lg"?96:80),x=r.length*(o==="sm"?64:o==="lg"?96:80),C=N=>{i||(b(true),v.current=N.touches[0].clientX,y.current=p);},R=N=>{if(!h||i)return;let S=N.touches[0].clientX-v.current,D=y.current+S;(D>0&&n.length===0||D<0&&r.length===0)&&(D=0),D>w?D=w+(D-w)*.3:D<-x&&(D=-x+(D+x)*.3),g(D);},T=()=>{if(!h)return;b(false);let N=f.current?.offsetWidth||0,k=Math.abs(p)/N;if(l&&k>.6){l==="right"&&p>0&&n[0]?(n[0].onAction?.(),s?.("right",n[0].key)):l==="left"&&p<0&&r[0]&&(r[0].onAction?.(),s?.("left",r[0].key)),g(0);return}p>w*a&&n.length>0?(g(w),s?.("right")):p<-x*a&&r.length>0?(g(-x),s?.("left")):g(0);},M=(N,k)=>{N.onAction?.(),s?.(k,N.key),g(0);},E=()=>{g(0);};return jsxRuntime.jsxs("div",{ref:m,className:u($x({variant:t,className:e})),...d,children:[n.length>0&&p>0&&jsxRuntime.jsx("div",{className:"absolute left-0 top-0 bottom-0 flex",style:{width:w},children:n.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"right"),className:u(Tc({variant:N.variant,size:o})),style:{opacity:Math.min(1,p/w)},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))}),r.length>0&&p<0&&jsxRuntime.jsx("div",{className:"absolute right-0 top-0 bottom-0 flex",style:{width:x},children:r.map(N=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>M(N,"left"),className:u(Tc({variant:N.variant,size:o})),style:{opacity:Math.min(1,Math.abs(p)/x)},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:u("relative bg-background",h?"":"transition-transform duration-200"),style:{transform:`translateX(${p}px)`},onTouchStart:C,onTouchMove:R,onTouchEnd:T,onClick:p!==0?E:void 0,children:c})]})});Ux.displayName="SwipeActions";var jx=classVarianceAuthority.cva("relative overflow-hidden",{variants:{variant:{default:"",contained:"h-full"}},defaultVariants:{variant:"default"}}),IP=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"}}),_x=W__namespace.forwardRef(({className:e,variant:t,onRefresh:n,pullThreshold:r=80,maxPullDistance:o=120,loadingIndicator:a,pullIndicator:s,indicatorSize:i="md",disabled:l=false,pullText:c="Pull to refresh",releaseText:d="Release to refresh",refreshingText:m="Refreshing...",children:f,...p},g)=>{let h=W__namespace.useRef(null),[b,v]=W__namespace.useState(0),[y,w]=W__namespace.useState("idle"),x=W__namespace.useRef(0),C=W__namespace.useRef(false),R=()=>l||y==="refreshing"?false:(h.current?.scrollTop??window.scrollY)<=0,T=S=>{R()&&(x.current=S.touches[0].clientY,C.current=true);},M=S=>{if(!C.current||!R())return;let H=S.touches[0].clientY-x.current;if(H<0){v(0),w("idle");return}let L=Math.min(H*.5,o);v(L),w(L>=r?"ready":"pulling");},E=async()=>{if(C.current)if(C.current=false,y==="ready"){w("refreshing"),v(r*.6);try{await n();}finally{w("idle"),v(0);}}else w("idle"),v(0);},N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}[i],k=()=>{if(y==="refreshing")return a||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.Loader2,{className:u(N,"animate-spin text-primary")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:m})]});let S=Math.min(b/r*180,180);return s||jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-1",children:[jsxRuntime.jsx(lucideReact.ArrowDown,{className:u(N,"text-muted-foreground transition-transform"),style:{transform:`rotate(${S}deg)`}}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:y==="ready"?d:c})]})};return jsxRuntime.jsxs("div",{ref:g,className:u(jx({variant:t,className:e})),...p,children:[jsxRuntime.jsx("div",{className:u(IP({size:i}),"z-10",y==="idle"&&b===0&&"opacity-0"),style:{top:Math.max(b-60,-60),opacity:Math.min(b/(r*.5),1)},children:k()}),jsxRuntime.jsx("div",{ref:h,className:u("transition-transform duration-200",y==="refreshing"&&"ease-out"),style:{transform:`translateY(${b}px)`,transition:C.current?"none":void 0},onTouchStart:T,onTouchMove:M,onTouchEnd:E,children:f})]})});_x.displayName="PullToRefresh";var Wr=(e,t,n)=>({duration:e,delay:t,ease:n||[.4,0,.2,1]}),VP={hidden:e=>({opacity:e}),visible:{opacity:1},exit:e=>({opacity:e})},Yx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialOpacity:i=0,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=jsxRuntime.jsx(framerMotion.motion.div,{ref:d,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:VP,custom:i,transition:Wr(n,r,o),className:u(a),onAnimationStart:l,onAnimationComplete:c,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&m}):m});Yx.displayName="Fade";var AP=(e,t)=>{let n=typeof t=="number"?`${t}px`:t,r={up:{y:n},down:{y:`-${n}`},left:{x:n},right:{x:`-${n}`}};return {hidden:{opacity:0,...r[e]},visible:{opacity:1,x:0,y:0},exit:{opacity:0,...r[e]}}},Xx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,direction:i="up",offset:l=20,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=W__namespace.useMemo(()=>AP(i,l),[i,l]),p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Xx.displayName="Slide";var zP={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"},OP={hidden:e=>({opacity:0,scale:e}),visible:{opacity:1,scale:1},exit:e=>({opacity:0,scale:e})},qx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialScale:i=.9,origin:l="center",onAnimationStart:c,onAnimationComplete:d},m)=>{let f=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:OP,custom:i,transition:Wr(n,r,o),className:u(a),style:{transformOrigin:zP[l]},onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&f}):f});qx.displayName="Scale";var Zx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,horizontal:s=false,startingSize:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f=s?"width":"height",p={hidden:{[f]:i,opacity:l?0:1},visible:{[f]:"auto",opacity:1},exit:{[f]:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:p,transition:Wr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Zx.displayName="Collapse";var Qx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.4,delay:r=0,ease:o,className:a,initialWidth:s=0,initialHeight:i=0,animateOpacity:l=true,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{width:s,height:i,opacity:l?0:1},visible:{width:"auto",height:"auto",opacity:1},exit:{width:s,height:i,opacity:l?0:1}};return jsxRuntime.jsx(framerMotion.AnimatePresence,{initial:false,children:e&&jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:"visible",exit:"exit",variants:f,transition:Wr(n,r,o),className:u("overflow-hidden",a),onAnimationStart:c,onAnimationComplete:d,children:t})})});Qx.displayName="Expand";var Jx=W__namespace.forwardRef(({show:e=true,children:t,duration:n=.3,delay:r=0,ease:o,className:a,unmountOnExit:s=true,initialRotation:i=-180,finalRotation:l=0,onAnimationStart:c,onAnimationComplete:d},m)=>{let f={hidden:{opacity:0,rotate:i},visible:{opacity:1,rotate:l},exit:{opacity:0,rotate:i}},p=jsxRuntime.jsx(framerMotion.motion.div,{ref:m,initial:"hidden",animate:e?"visible":"hidden",exit:s?"exit":void 0,variants:f,transition:Wr(n,r,o),className:u(a),onAnimationStart:c,onAnimationComplete:d,children:t});return s?jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&p}):p});Jx.displayName="Rotate";var eR=W__namespace.forwardRef(({front:e,back:t,direction:n="horizontal",flipped:r=false,duration:o=.6,delay:a=0,ease:s,className:i,onAnimationStart:l,onAnimationComplete:c},d)=>{let m=n==="horizontal"?"rotateY":"rotateX";return jsxRuntime.jsx("div",{ref:d,className:u("relative",i),style:{perspective:1e3},children:jsxRuntime.jsxs(framerMotion.motion.div,{animate:{[m]:r?180:0},transition:Wr(o,a,s),style:{transformStyle:"preserve-3d"},onAnimationStart:l,onAnimationComplete:c,children:[jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden"},children:e}),jsxRuntime.jsx("div",{className:"absolute inset-0",style:{backfaceVisibility:"hidden",transform:`${m}(180deg)`},children:t})]})})});eR.displayName="Flip";var tR=W__namespace.forwardRef(({color:e="currentColor",duration:t=.6,children:n,className:r,disabled:o=false},a)=>{let[s,i]=W__namespace.useState([]),l=W__namespace.useRef(null),c=m=>{if(o)return;let f=l.current;if(!f)return;let p=f.getBoundingClientRect(),g=m.clientX-p.left,h=m.clientY-p.top,b=Math.max(p.width,p.height)*2,v={id:Date.now(),x:g,y:h,size:b};i(y=>[...y,v]);},d=m=>{i(f=>f.filter(p=>p.id!==m));};return jsxRuntime.jsxs("div",{ref:a,className:u("relative overflow-hidden rounded-[inherit]",r),onClick:c,children:[jsxRuntime.jsx("div",{ref:l,className:"relative z-0",children:n}),jsxRuntime.jsx(framerMotion.AnimatePresence,{children:s.map(m=>jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0,opacity:.35},animate:{scale:1,opacity:0},exit:{opacity:0},transition:{duration:t,ease:"easeOut"},onAnimationComplete:()=>d(m.id),className:"pointer-events-none absolute rounded-full",style:{left:m.x-m.size/2,top:m.y-m.size/2,width:m.size,height:m.size,backgroundColor:e}},m.id))})]})});tR.displayName="Ripple";var nR=W__namespace.forwardRef(({children:e,animate:t=true,height:n=10,duration:r=.5,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{y:0},bounce:{y:[0,-n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"bounce":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});nR.displayName="Bounce";var KP={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]},rR=W__namespace.forwardRef(({children:e,animate:t=true,intensity:n="normal",duration:r=.5,count:o=1,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{x:0},shake:{x:KP[n],transition:{duration:r,ease:"easeInOut",repeat:o-1}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"shake":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});rR.displayName="Shake";var GP={slow:"animate-[pulse_3s_ease-in-out_infinite]",normal:"animate-[pulse_2s_ease-in-out_infinite]",fast:"animate-[pulse_1s_ease-in-out_infinite]"},oR=W__namespace.forwardRef(({children:e,animate:t=true,speed:n="normal",className:r},o)=>jsxRuntime.jsx("div",{ref:o,className:u(t&&GP[n],r),children:e}));oR.displayName="Pulse";var aR=W__namespace.forwardRef(({children:e,animate:t=true,angle:n=10,duration:r=.3,count:o=0,className:a,triggerOnHover:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=s?l:t,m={idle:{rotate:0},wiggle:{rotate:[0,-n,n,-n,n,0],transition:{duration:r,ease:"easeInOut",repeat:o===0?1/0:o-1,repeatType:"loop"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,variants:m,initial:"idle",animate:d?"wiggle":"idle",className:u(a),onMouseEnter:()=>s&&c(true),onMouseLeave:()=>s&&c(false),children:e})});aR.displayName="Wiggle";var sR=W__namespace.forwardRef(({children:e,animate:t=false,scale:n=1.2,duration:r=.2,className:o,triggerOnHover:a=false,triggerOnClick:s=false},i)=>{let[l,c]=W__namespace.useState(false),d=t||l,m={type:"spring",stiffness:400,damping:17,duration:r},f=()=>{s&&(c(true),setTimeout(()=>c(false),r*1e3));};return jsxRuntime.jsx(framerMotion.motion.div,{ref:i,animate:{scale:d?n:1},transition:m,className:u(o),onMouseEnter:()=>a&&c(true),onMouseLeave:()=>a&&c(false),onClick:f,children:e})});sR.displayName="Pop";var YP=(e,t,n,r)=>{let o=e.toFixed(t),[a,s]=o.split("."),i=a.replace(/\B(?=(\d{3})+(?!\d))/g,n);return s?`${i}${r}${s}`:i},iR=W__namespace.forwardRef(({value:e,from:t=0,duration:n=2,decimals:r=0,prefix:o="",suffix:a="",separator:s=",",decimalSeparator:i=".",animateOnView:l=true,delay:c=0,className:d,onComplete:m},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:true}),[h,b]=W__namespace.useState(!l);W__namespace.useEffect(()=>{if(l&&g){let w=setTimeout(()=>b(true),c*1e3);return ()=>clearTimeout(w)}},[l,g,c]);let v=framerMotion.useMotionValue(t),y=framerMotion.useTransform(v,w=>YP(w,r,s,i));return W__namespace.useEffect(()=>{if(h){let w=framerMotion.animate(v,e,{duration:n,ease:"easeOut",onComplete:m});return ()=>w.stop()}},[h,e,n,v,m]),jsxRuntime.jsx("span",{ref:p,className:u(d),children:jsxRuntime.jsxs("span",{ref:f,children:[o,jsxRuntime.jsx(framerMotion.motion.span,{children:y}),a]})})});iR.displayName="Counter";var lR=W__namespace.forwardRef(({text:e,speed:t=50,delay:n=0,pauseBetween:r=1500,cursor:o=true,cursorChar:a="|",loop:s=false,deleteSpeed:i=30,animateOnView:l=true,className:c,cursorClassName:d,onComplete:m},f)=>{let p=Array.isArray(e)?e:[e],[g,h]=W__namespace.useState(""),[b,v]=W__namespace.useState(0),[y,w]=W__namespace.useState(false),[x,C]=W__namespace.useState(false),R=W__namespace.useRef(null),T=framerMotion.useInView(R,{once:true}),[M,E]=W__namespace.useState(!l);return W__namespace.useEffect(()=>{if(l&&T){let N=setTimeout(()=>E(true),n*1e3);return ()=>clearTimeout(N)}},[l,T,n]),W__namespace.useEffect(()=>{if(!M||x)return;let N=p[b],k;return y?g.length>0?k=setTimeout(()=>{h(g.slice(0,-1));},i):(w(false),v(S=>(S+1)%p.length)):g.length<N.length?k=setTimeout(()=>{h(N.slice(0,g.length+1));},t):b<p.length-1||s?k=setTimeout(()=>{w(true);},r):(C(true),m?.()),()=>clearTimeout(k)},[M,g,b,y,x,p,t,i,r,s,m]),jsxRuntime.jsxs("span",{ref:R,className:u(c),children:[jsxRuntime.jsx("span",{ref:f,children:g}),o&&jsxRuntime.jsx(framerMotion.motion.span,{animate:{opacity:[1,0]},transition:{duration:.8,repeat:1/0,repeatType:"reverse"},className:u("ml-0.5",d),children:a})]})});lR.displayName="Typewriter";var cR=W__namespace.forwardRef(({children:e,direction:t="up",stagger:n=.05,duration:r=.5,delay:o=0,splitBy:a="word",animateOnView:s=true,className:i},l)=>{let c=W__namespace.useRef(null),d=framerMotion.useInView(c,{once:true,amount:.5}),m=s?d:true,f=typeof e=="string"?e:"",p=a==="word"?f.split(" "):f.split(""),g={up:{y:20},down:{y:-20},left:{x:20},right:{x:-20}},h={hidden:{},visible:{transition:{staggerChildren:n,delayChildren:o}}},b={hidden:{opacity:0,...g[t]},visible:{opacity:1,x:0,y:0,transition:{duration:r,ease:"easeInOut"}}};return jsxRuntime.jsx(framerMotion.motion.div,{ref:l,className:u("inline-flex flex-wrap",i),variants:h,initial:"hidden",animate:m?"visible":"hidden",children:jsxRuntime.jsx("span",{ref:c,children:p.map((v,y)=>jsxRuntime.jsxs(framerMotion.motion.span,{variants:b,className:"inline-block",children:[v,a==="word"&&y<p.length-1&&"\xA0"]},y))})})});cR.displayName="TextReveal";var dR=W__namespace.forwardRef(({words:e,duration:t=2,animation:n="slide",animationDuration:r=.5,className:o,loop:a=true},s)=>{let[i,l]=W__namespace.useState(0);W__namespace.useEffect(()=>{if(!a&&i===e.length-1)return;let d=setInterval(()=>{l(m=>(m+1)%e.length);},t*1e3);return ()=>clearInterval(d)},[e.length,t,a,i]);let c=()=>{switch(n){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:u("relative inline-block",o),children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(framerMotion.motion.span,{variants:c(),initial:"initial",animate:"animate",exit:"exit",transition:{duration:r},className:"inline-block",children:e[i]},e[i])})})});dR.displayName="WordRotate";var fR=W__namespace.forwardRef(({children:e,direction:t="up",distance:n=50,duration:r=.6,delay:o=0,once:a=true,threshold:s=.1,className:i,scale:l,rotate:c,blur:d,ease:m=[.4,0,.2,1]},f)=>{let p=W__namespace.useRef(null),g=framerMotion.useInView(p,{once:a,amount:s}),b={up:{x:0,y:n},down:{x:0,y:-n},left:{x:n,y:0},right:{x:-n,y:0},none:{x:0,y:0}}[t],v={hidden:{opacity:0,x:b.x,y:b.y,scale:l??1,rotate:c??0,filter:d?`blur(${d}px)`:"blur(0px)"},visible:{opacity:1,x:0,y:0,scale:1,rotate:0,filter:"blur(0px)",transition:{duration:r,delay:o,ease:m}}};return jsxRuntime.jsx("div",{ref:p,children:jsxRuntime.jsx(framerMotion.motion.div,{ref:f,variants:v,initial:"hidden",animate:g?"visible":"hidden",className:u(i),children:e})})});fR.displayName="ScrollReveal";var gR=W__namespace.forwardRef(({position:e="top",size:t=4,color:n="hsl(var(--primary))",backgroundColor:r="transparent",zIndex:o=50,className:a,container:s,showPercentage:i=false,useSpring:l=true},c)=>{let{scrollYProgress:d}=framerMotion.useScroll({container:s}),m=framerMotion.useSpring(d,{stiffness:100,damping:30,restDelta:.001}),f=l?m:d,p=e==="top"||e==="bottom",g={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}},h=p?"scaleX":"scaleY",b=p?"left":"top";return jsxRuntime.jsxs("div",{ref:c,className:u("fixed",a),style:{...g[e],zIndex:o,backgroundColor:r},children:[jsxRuntime.jsx(framerMotion.motion.div,{className:"h-full w-full",style:{[h]:f,transformOrigin:b,backgroundColor:n}}),i&&jsxRuntime.jsx(qP,{progress:f,position:e})]})});gR.displayName="ScrollProgress";var qP=({progress:e,position:t})=>{let n=framerMotion.useTransform(e,s=>Math.round(s*100)),[r,o]=W__namespace.useState(0);return W__namespace.useEffect(()=>{let s=n.on("change",o);return ()=>s()},[n]),jsxRuntime.jsxs("span",{className:u("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:[r,"%"]})},bR=W__namespace.forwardRef(({children:e,speed:t=.5,direction:n="vertical",className:r,container:o},a)=>{let s=W__namespace.useRef(null),{scrollYProgress:i}=framerMotion.useScroll({target:s,container:o,offset:["start end","end start"]}),l=[-100*t,100*t],c=framerMotion.useTransform(i,[0,1],l),d=framerMotion.useSpring(c,{stiffness:100,damping:30}),m=n==="horizontal"?d:0,f=n==="vertical"?d:0;return jsxRuntime.jsx("div",{ref:s,className:u("overflow-hidden",r),children:jsxRuntime.jsx(framerMotion.motion.div,{ref:a,style:{x:m,y:f},children:e})})});bR.displayName="Parallax";var xR=W__namespace.forwardRef(({children:e,width:t,height:n,duration:r=1.5,direction:o="right",baseColor:a="hsl(var(--muted))",highlightColor:s="hsl(var(--muted-foreground) / 0.1)",borderRadius:i,className:l,active:c=true},d)=>{let m={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:d,className:u("relative overflow-hidden",l),style:{width:t,height:n,borderRadius:i,backgroundColor:a},children:[e,c&&jsxRuntime.jsx("div",{className:"absolute inset-0",style:{background:`linear-gradient(${m[o]}, transparent, ${s}, transparent)`,animation:`${f[o]} ${r}s infinite`}}),jsxRuntime.jsx("style",{children:`
|
|
56
56
|
@keyframes shimmer-right {
|
|
57
57
|
0% { transform: translateX(-100%); }
|
|
58
58
|
100% { transform: translateX(100%); }
|