@sourceful-energy/ui 0.1.28 → 0.1.30

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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import*as h from'react';import {useRef,useEffect}from'react';import*as $ from'@radix-ui/react-accordion';import {ChevronDown,Check,X as X$1,ChevronRight,Circle,ChevronUp,ChevronLeft,Menu}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as ge from'@radix-ui/react-checkbox';import*as M from'@radix-ui/react-dialog';import*as m from'@radix-ui/react-dropdown-menu';import*as Ie from'@radix-ui/react-label';import*as be from'@radix-ui/react-progress';import*as ie from'@radix-ui/react-radio-group';import*as q from'@radix-ui/react-scroll-area';import*as u from'@radix-ui/react-select';import*as Oe from'@radix-ui/react-separator';import*as Y from'@radix-ui/react-slider';import*as ye from'@radix-ui/react-switch';import*as X from'@radix-ui/react-tabs';import*as J from'@radix-ui/react-tooltip';import or from'lenis';var Jo=Object.defineProperty,Qo=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var Se=Object.getOwnPropertySymbols;var st=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable;var at=(e,t,o)=>t in e?Jo(e,t,{enumerable:true,configurable:true,writable:true,value:o}):e[t]=o,s=(e,t)=>{for(var o in t||(t={}))st.call(t,o)&&at(e,o,t[o]);if(Se)for(var o of Se(t))nt.call(t,o)&&at(e,o,t[o]);return e},x=(e,t)=>Qo(e,Yo(t));var n=(e,t)=>{var o={};for(var r in e)st.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Se)for(var r of Se(e))t.indexOf(r)<0&&nt.call(e,r)&&(o[r]=e[r]);return o};function a(...e){return twMerge(clsx(e))}var ei=$.Root,lt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx($.Item,s({ref:o,className:a("border-b",e)},t))});lt.displayName="AccordionItem";var ct=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsx($.Header,{className:"flex",children:jsxs($.Trigger,x(s({ref:r,className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e)},o),{children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]}))})});ct.displayName=$.Trigger.displayName;var dt=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsx($.Content,x(s({ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"},o),{children:jsx("div",{className:a("pb-4 pt-0",e),children:t})}))});dt.displayName=$.Content.displayName;var ii=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-red-700 bg-destructive/10 text-destructive dark:border-red-500 dark:bg-red-950 dark:text-red-200 [&>svg]:text-destructive dark:[&>svg]:text-red-400",success:"border-green-700 bg-sourceful-green-50 text-sourceful-green-900 dark:border-green-500 dark:bg-green-950 dark:text-green-200 [&>svg]:text-sourceful-green-600 dark:[&>svg]:text-green-400",warning:"border-yellow-600 bg-sourceful-yellow-50 text-sourceful-yellow-900 dark:border-yellow-500 dark:bg-yellow-950 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",info:"border-blue-700 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950 dark:text-blue-200 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",energy:"border-yellow-600 bg-sourceful-yellow-50 text-sourceful-gray-900 dark:border-yellow-400 dark:bg-yellow-950 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400"}},defaultVariants:{variant:"default"}}),mt=h.forwardRef((i,r)=>{var l=i,{className:e,variant:t}=l,o=n(l,["className","variant"]);return jsx("div",s({ref:r,role:"alert",className:a(ii({variant:t}),e)},o))});mt.displayName="Alert";var pt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("h5",s({ref:o,className:a("mb-1 font-medium leading-none tracking-tight",e)},t))});pt.displayName="AlertTitle";var ft=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("text-sm [&_p]:leading-relaxed",e)},t))});ft.displayName="AlertDescription";var ut=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",energy:"border-transparent bg-energy text-energy-foreground shadow hover:bg-energy/80",success:"border-transparent bg-success text-success-foreground shadow hover:bg-success/80",warning:"border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80",info:"border-transparent bg-info text-info-foreground shadow hover:bg-info/80","success-soft":"border-sourceful-green-500/20 bg-sourceful-green-500/10 text-sourceful-green-600 dark:text-sourceful-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","energy-soft":"border-sourceful-yellow-500/20 bg-sourceful-yellow-400/10 text-sourceful-yellow-600 dark:text-sourceful-yellow-400","success-outline":"border-sourceful-green-500/50 bg-transparent text-sourceful-green-600 dark:text-sourceful-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function ai(i){var l=i,{className:e,variant:t,rounded:o}=l,r=n(l,["className","variant","rounded"]);return jsx("div",s({className:a(ut({variant:t,rounded:o}),e)},r))}var gt=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),xt=h.forwardRef((d,l)=>{var y=d,{className:e,variant:t,size:o,asChild:r=false}=y,i=n(y,["className","variant","size","asChild"]);return jsx(r?Slot:"button",s({className:a(gt({variant:t,size:o,className:e})),ref:l},i))});xt.displayName="Button";var bt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("rounded-xl border bg-card text-card-foreground shadow",e)},t))});bt.displayName="Card";var Pt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("flex flex-col space-y-1.5 p-6",e)},t))});Pt.displayName="CardHeader";var Rt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("font-semibold leading-none tracking-tight",e)},t))});Rt.displayName="CardTitle";var yt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("text-sm text-muted-foreground",e)},t))});yt.displayName="CardDescription";var ht=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("p-6 pt-0",e)},t))});ht.displayName="CardContent";var wt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",s({ref:o,className:a("flex items-center p-6 pt-0",e)},t))});wt.displayName="CardFooter";var Tt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(ge.Root,x(s({ref:o,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e)},t),{children:jsx(ge.Indicator,{className:a("flex items-center justify-center text-current"),children:jsx(Check,{className:"h-4 w-4"})})}))});Tt.displayName=ge.Root.displayName;var pi=M.Root,fi=M.Trigger,Nt=M.Portal,ui=M.Close,Ae=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Overlay,s({ref:o,className:a("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)},t))});Ae.displayName=M.Overlay.displayName;var Mt=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsxs(Nt,{children:[jsx(Ae,{}),jsxs(M.Content,x(s({ref:r,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg 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",e)},o),{children:[t,jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});Mt.displayName=M.Content.displayName;var Ct=o=>{var r=o,{className:e}=r,t=n(r,["className"]);return jsx("div",s({className:a("flex flex-col space-y-1.5 text-center sm:text-left",e)},t))};Ct.displayName="DialogHeader";var Dt=o=>{var r=o,{className:e}=r,t=n(r,["className"]);return jsx("div",s({className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};Dt.displayName="DialogFooter";var kt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Title,s({ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e)},t))});kt.displayName=M.Title.displayName;var Lt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Description,s({ref:o,className:a("text-sm text-muted-foreground",e)},t))});Lt.displayName=M.Description.displayName;var bi=m.Root,Pi=m.Trigger,Ri=m.Group,yi=m.Portal,hi=m.Sub,wi=m.RadioGroup,Et=h.forwardRef((l,i)=>{var d=l,{className:e,inset:t,children:o}=d,r=n(d,["className","inset","children"]);return jsxs(m.SubTrigger,x(s({ref:i,className:a("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e)},r),{children:[o,jsx(ChevronRight,{className:"ml-auto"})]}))});Et.displayName=m.SubTrigger.displayName;var At=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(m.SubContent,s({ref:o,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e)},t))});At.displayName=m.SubContent.displayName;var Ht=h.forwardRef((i,r)=>{var l=i,{className:e,sideOffset:t=4}=l,o=n(l,["className","sideOffset"]);return jsx(m.Portal,{children:jsx(m.Content,s({ref:r,sideOffset:t,className:a("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e)},o))})});Ht.displayName=m.Content.displayName;var It=h.forwardRef((i,r)=>{var l=i,{className:e,inset:t}=l,o=n(l,["className","inset"]);return jsx(m.Item,s({ref:r,className:a("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e)},o))});It.displayName=m.Item.displayName;var Gt=h.forwardRef((l,i)=>{var d=l,{className:e,children:t,checked:o}=d,r=n(d,["className","children","checked"]);return jsxs(m.CheckboxItem,x(s({ref:i,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o},r),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(m.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}))});Gt.displayName=m.CheckboxItem.displayName;var zt=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsxs(m.RadioItem,x(s({ref:r,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},o),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(m.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}))});zt.displayName=m.RadioItem.displayName;var Ft=h.forwardRef((i,r)=>{var l=i,{className:e,inset:t}=l,o=n(l,["className","inset"]);return jsx(m.Label,s({ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e)},o))});Ft.displayName=m.Label.displayName;var Bt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(m.Separator,s({ref:o,className:a("-mx-1 my-1 h-px bg-muted",e)},t))});Bt.displayName=m.Separator.displayName;var Vt=o=>{var r=o,{className:e}=r,t=n(r,["className"]);return jsx("span",s({className:a("ml-auto text-xs tracking-widest opacity-60",e)},t))};Vt.displayName="DropdownMenuShortcut";var Ot=h.forwardRef((i,r)=>{var l=i,{className:e,type:t}=l,o=n(l,["className","type"]);return jsx("input",s({type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r},o))});Ot.displayName="Input";var Ni=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_t=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(Ie.Root,s({ref:o,className:a(Ni(),e)},t))});_t.displayName=Ie.Root.displayName;var Xt=h.forwardRef((i,r)=>{var l=i,{className:e,value:t}=l,o=n(l,["className","value"]);return jsx(be.Root,x(s({ref:r,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e)},o),{children:jsx(be.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}))});Xt.displayName=be.Root.displayName;var Jt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(ie.Root,x(s({className:a("grid gap-2",e)},t),{ref:o}))});Jt.displayName=ie.Root.displayName;var Qt=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(ie.Item,x(s({ref:o,className:a("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e)},t),{children:jsx(ie.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}))});Qt.displayName=ie.Item.displayName;var Yt=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsxs(q.Root,x(s({ref:r,className:a("relative overflow-hidden",e)},o),{children:[jsx(q.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),jsx(Fe,{}),jsx(q.Corner,{})]}))});Yt.displayName=q.Root.displayName;var Fe=h.forwardRef((i,r)=>{var l=i,{className:e,orientation:t="vertical"}=l,o=n(l,["className","orientation"]);return jsx(q.ScrollAreaScrollbar,x(s({ref:r,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e)},o),{children:jsx(q.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))});Fe.displayName=q.ScrollAreaScrollbar.displayName;var Ei=u.Root,Ai=u.Group,Hi=u.Value,Kt=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsxs(u.Trigger,x(s({ref:r,className:a("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e)},o),{children:[t,jsx(u.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}))});Kt.displayName=u.Trigger.displayName;var Be=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(u.ScrollUpButton,x(s({ref:o,className:a("flex cursor-default items-center justify-center py-1",e)},t),{children:jsx(ChevronUp,{className:"h-4 w-4"})}))});Be.displayName=u.ScrollUpButton.displayName;var Ve=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(u.ScrollDownButton,x(s({ref:o,className:a("flex cursor-default items-center justify-center py-1",e)},t),{children:jsx(ChevronDown,{className:"h-4 w-4"})}))});Ve.displayName=u.ScrollDownButton.displayName;var jt=h.forwardRef((l,i)=>{var d=l,{className:e,children:t,position:o="popper"}=d,r=n(d,["className","children","position"]);return jsx(u.Portal,{children:jsxs(u.Content,x(s({ref:i,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o},r),{children:[jsx(Be,{}),jsx(u.Viewport,{className:a("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsx(Ve,{})]}))})});jt.displayName=u.Content.displayName;var eo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(u.Label,s({ref:o,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e)},t))});eo.displayName=u.Label.displayName;var to=h.forwardRef((i,r)=>{var l=i,{className:e,children:t}=l,o=n(l,["className","children"]);return jsxs(u.Item,x(s({ref:r,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},o),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(u.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(u.ItemText,{children:t})]}))});to.displayName=u.Item.displayName;var oo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(u.Separator,s({ref:o,className:a("-mx-1 my-1 h-px bg-muted",e)},t))});oo.displayName=u.Separator.displayName;var ro=h.forwardRef((l,i)=>{var d=l,{className:e,orientation:t="horizontal",decorative:o=true}=d,r=n(d,["className","orientation","decorative"]);return jsx(Oe.Root,s({ref:i,decorative:o,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e)},r))});ro.displayName=Oe.Root.displayName;var Fi=M.Root,Bi=M.Trigger,Vi=M.Close,ao=M.Portal,_e=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Overlay,x(s({className:a("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)},t),{ref:o}))});_e.displayName=M.Overlay.displayName;var Wi=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),so=h.forwardRef((l,i)=>{var d=l,{side:e="right",className:t,children:o}=d,r=n(d,["side","className","children"]);return jsxs(ao,{children:[jsx(_e,{}),jsxs(M.Content,x(s({ref:i,className:a(Wi({side:e}),t)},r),{children:[o,jsxs(M.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X$1,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});so.displayName=M.Content.displayName;var no=o=>{var r=o,{className:e}=r,t=n(r,["className"]);return jsx("div",s({className:a("flex flex-col space-y-2 text-center sm:text-left",e)},t))};no.displayName="SheetHeader";var lo=o=>{var r=o,{className:e}=r,t=n(r,["className"]);return jsx("div",s({className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};lo.displayName="SheetFooter";var co=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Title,s({ref:o,className:a("text-lg font-semibold text-foreground",e)},t))});co.displayName=M.Title.displayName;var mo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(M.Description,s({ref:o,className:a("text-sm text-muted-foreground",e)},t))});mo.displayName=M.Description.displayName;function Oi(o){var r=o,{className:e}=r,t=n(r,["className"]);return jsx("div",s({className:a("animate-pulse rounded-md bg-muted",e)},t))}var fo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsxs(Y.Root,x(s({ref:o,className:a("relative flex w-full touch-none select-none items-center",e)},t),{children:[jsx(Y.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(Y.Range,{className:"absolute h-full bg-primary"})}),jsx(Y.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}))});fo.displayName=Y.Root.displayName;var go=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(ye.Root,x(s({className:a("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e)},t),{ref:o,children:jsx(ye.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}))});go.displayName=ye.Root.displayName;var xo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",s({ref:o,className:a("w-full caption-bottom text-sm",e)},t))})});xo.displayName="Table";var bo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("thead",s({ref:o,className:a("[&_tr]:border-b",e)},t))});bo.displayName="TableHeader";var Po=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("tbody",s({ref:o,className:a("[&_tr:last-child]:border-0",e)},t))});Po.displayName="TableBody";var Ro=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("tfoot",s({ref:o,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e)},t))});Ro.displayName="TableFooter";var yo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("tr",s({ref:o,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e)},t))});yo.displayName="TableRow";var ho=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("th",s({ref:o,className:a("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e)},t))});ho.displayName="TableHead";var wo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("td",s({ref:o,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e)},t))});wo.displayName="TableCell";var So=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("caption",s({ref:o,className:a("mt-4 text-sm text-muted-foreground",e)},t))});So.displayName="TableCaption";var $i=X.Root,To=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(X.List,s({ref:o,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e)},t))});To.displayName=X.List.displayName;var No=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(X.Trigger,s({ref:o,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",e)},t))});No.displayName=X.Trigger.displayName;var Mo=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx(X.Content,s({ref:o,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e)},t))});Mo.displayName=X.Content.displayName;var Do=h.forwardRef((r,o)=>{var i=r,{className:e}=i,t=n(i,["className"]);return jsx("textarea",s({className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm 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",e),ref:o},t))});Do.displayName="Textarea";var Xe=J.Provider,Je=J.Root,Qe=J.Trigger,De=h.forwardRef((i,r)=>{var l=i,{className:e,sideOffset:t=4}=l,o=n(l,["className","sideOffset"]);return jsx(J.Portal,{children:jsx(J.Content,s({ref:r,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e)},o))})});De.displayName=J.Content.displayName;var Ao=h.createContext(null);function Ho(){let e=h.useContext(Ao);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var Qi=({href:e,className:t,children:o})=>jsx("a",{href:e,className:t,children:o}),Io=h.forwardRef(({header:e,collapsedHeader:t,sections:o,items:r,footer:i,collapsed:l,onCollapsedChange:d,collapsible:y=true,defaultCollapsed:f=false,activeItem:I,className:N,linkComponent:L=Qi},G)=>{let[k,E]=h.useState(f),z=l!=null?l:k,_=()=>{let F=!z;E(F),d==null||d(F);};return jsx(Xe,{delayDuration:0,children:jsx(Ao.Provider,{value:{collapsed:z,activeItem:I,LinkComponent:L},children:jsxs("aside",{ref:G,className:a("flex h-full flex-col transition-[width] duration-300 ease-in-out","bg-white dark:bg-[#141414] border-r border-sourceful-gray-200 dark:border-[#1a1a1a]",z?"w-16":"w-64",N),children:[jsxs("div",{className:a("flex items-center border-b border-sourceful-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",z?"justify-center px-2":"justify-between px-3"),children:[z&&t||e,y&&jsx("button",{onClick:_,className:a("rounded-md h-5 w-5 flex items-center justify-center","text-sourceful-gray-400 dark:text-sourceful-gray-500","hover:text-sourceful-gray-600 dark:hover:text-sourceful-gray-300 transition-colors","bg-white dark:bg-[#141414] border border-sourceful-gray-200 dark:border-sourceful-gray-700 shadow-sm",z&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":z?"Expand sidebar":"Collapse sidebar",children:z?jsx(ChevronRight,{className:"h-3 w-3"}):jsx(ChevronLeft,{className:"h-3 w-3"})})]}),jsxs("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden",children:[r&&r.length>0&&jsx("div",{className:"px-2 mb-1 space-y-0.5",children:r.map(F=>jsx(Ye,{item:F},F.id))}),o==null?void 0:o.map(F=>jsx(Yi,{section:F},F.id))]}),i&&jsx("div",{className:"flex-shrink-0 border-t border-sourceful-gray-200 dark:border-[#1a1a1a] p-2",children:i})]})})})});Io.displayName="SideMenu";function Yi({section:e}){var i;let{collapsed:t}=Ho(),[o,r]=h.useState((i=e.defaultExpanded)!=null?i:true);return t?jsx("div",{className:"px-2 mb-1 space-y-0.5",children:e.items.map(l=>jsx(Ye,{item:l},l.id))}):jsxs("div",{className:"px-2 mb-1",children:[jsxs("button",{onClick:()=>r(!o),className:a("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm font-medium","text-sourceful-gray-700 dark:text-sourceful-gray-300","hover:bg-sourceful-gray-50 dark:hover:bg-sourceful-gray-900","hover:text-sourceful-gray-900 dark:hover:text-white transition-colors"),children:[e.icon&&jsx("span",{className:"h-3.5 w-3.5 flex-shrink-0",children:e.icon}),jsx("span",{className:"flex-1 text-left",children:e.title}),o?jsx(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):jsx(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})]}),o&&jsxs("div",{className:"mt-0.5 space-y-0.5 relative pl-5",children:[jsx("div",{className:"absolute left-[1.1rem] top-0 bottom-0 w-px bg-sourceful-gray-200 dark:bg-sourceful-gray-700"}),e.items.map(l=>jsx(Ye,{item:l,nested:true},l.id))]})]})}function Ye({item:e,nested:t=false}){let{collapsed:o,activeItem:r,LinkComponent:i}=Ho(),l=r===e.id,d=a("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",o?"justify-center px-2 py-2.5":"px-2 py-1.5",l?t?"bg-sourceful-gray-100 dark:bg-[#1a1a1a] text-sourceful-gray-900 dark:text-white":"bg-sourceful-green-50 dark:bg-sourceful-green-950 text-sourceful-green-700 dark:text-sourceful-green-400":"text-sourceful-gray-700 dark:text-sourceful-gray-300 hover:bg-sourceful-gray-50 dark:hover:bg-sourceful-gray-900 hover:text-sourceful-gray-900 dark:hover:text-white",e.disabled&&"opacity-50 pointer-events-none"),y=jsxs(Fragment,{children:[e.icon&&jsx("span",{className:a("flex-shrink-0",o?"h-5 w-5":"h-3.5 w-3.5"),children:e.icon}),!o&&jsx("span",{children:e.label}),!o&&e.badge&&jsx("span",{className:"ml-auto text-xs bg-sourceful-gray-100 dark:bg-sourceful-gray-800 px-1.5 py-0.5 rounded",children:e.badge})]}),f=e.href?jsx(i,{href:e.href,className:d,children:y}):jsx("button",{onClick:e.onClick,disabled:e.disabled,className:a(d,"w-full"),children:y});return o?jsxs(Je,{children:[jsx(Qe,{asChild:true,children:f}),jsx(De,{side:"right",sideOffset:8,children:e.label})]}):f}var ji=({href:e,className:t,children:o})=>jsx("a",{href:e,className:t,children:o}),Go=h.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:o,leftContent:r,rightContent:i,className:l,linkComponent:d=ji},y)=>jsxs("header",{ref:y,className:a("sticky top-0 z-30 flex h-12 items-center gap-3","border-b border-sourceful-gray-200 dark:border-[#1a1a1a]","bg-white dark:bg-[#141414] px-4",l),children:[t&&jsx("button",{onClick:o,className:"lg:hidden rounded-md p-1.5 text-sourceful-gray-600 hover:bg-sourceful-gray-100 dark:text-sourceful-gray-400 dark:hover:bg-sourceful-gray-800","aria-label":"Toggle menu",children:jsx(Menu,{className:"h-4 w-4"})}),e.length>0&&jsx("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb",children:e.map((f,I)=>jsxs(h.Fragment,{children:[I>0&&jsx("span",{className:"text-sourceful-gray-400 dark:text-sourceful-gray-500 text-xs",children:"/"}),f.href?jsx(d,{href:f.href,className:"text-sourceful-gray-600 dark:text-sourceful-gray-400 hover:text-sourceful-gray-900 dark:hover:text-white transition-colors text-sm",children:f.label}):jsx("span",{className:"text-sourceful-gray-900 dark:text-white font-medium text-sm",children:f.label})]},I))}),r,jsx("div",{className:"flex-1"}),i&&jsx("div",{className:"flex items-center gap-1.5",children:i})]}));Go.displayName="TopMenu";var zo=h.forwardRef(({name:e,email:t,avatarUrl:o,avatarContent:r,avatarClassName:i,children:l,className:d},y)=>{let[f,I]=h.useState(false),N=h.useRef(null);return h.useEffect(()=>{let L=G=>{N.current&&!N.current.contains(G.target)&&I(false);};return f&&document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L);}},[f]),jsx("div",{ref:y,className:a("relative",d),children:jsxs("div",{ref:N,children:[jsx("button",{onClick:()=>I(!f),className:"flex items-center gap-1.5 rounded-full p-0.5 hover:ring-2 hover:ring-sourceful-green-500 hover:ring-offset-2 dark:hover:ring-offset-[#141414] transition-all","aria-label":"Account menu",children:jsx("div",{className:a("h-8 w-8 rounded-full overflow-hidden flex items-center justify-center",i||"bg-gradient-to-br from-sourceful-yellow-400 to-sourceful-yellow-600"),children:o?jsx("img",{src:o,alt:e||"User",className:"h-full w-full object-cover"}):r})}),f&&jsxs("div",{className:"absolute right-0 mt-2 w-64 rounded-lg border border-sourceful-gray-200 dark:border-[#1a1a1a] bg-white dark:bg-[#141414] shadow-lg overflow-hidden z-50",children:[(e||t)&&jsx("div",{className:"px-4 py-3 border-b border-sourceful-gray-200 dark:border-[#1a1a1a]",children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:a("h-10 w-10 rounded-full overflow-hidden flex items-center justify-center",i||"bg-gradient-to-br from-sourceful-yellow-400 to-sourceful-yellow-600"),children:o?jsx("img",{src:o,alt:e||"User",className:"h-full w-full object-cover"}):r}),jsxs("div",{className:"flex-1 min-w-0",children:[e&&jsx("p",{className:"text-sm font-medium text-sourceful-gray-900 dark:text-white truncate",children:e}),t&&jsx("p",{className:"text-xs text-sourceful-gray-500 dark:text-sourceful-gray-400 truncate",children:t})]})]})}),l]})]})})});zo.displayName="TopMenuUser";var Fo=h.forwardRef(({icon:e,children:t,onClick:o,href:r,variant:i="default",className:l},d)=>jsxs(r?"a":"button",{ref:d,onClick:o,href:r,className:a("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",{default:"text-sourceful-gray-700 dark:text-sourceful-gray-300 hover:bg-sourceful-gray-50 dark:hover:bg-[#1a1a1a]",danger:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950/20",success:"text-sourceful-green-600 dark:text-sourceful-green-400 hover:bg-sourceful-green-50 dark:hover:bg-sourceful-green-950/20"}[i],l),children:[e&&jsx("span",{className:"h-4 w-4",children:e}),jsx("span",{children:t})]}));Fo.displayName="TopMenuUserItem";var Bo=h.forwardRef(({children:e,className:t},o)=>jsx("div",{ref:o,className:a("py-1 border-t border-sourceful-gray-200 dark:border-[#1a1a1a] first:border-t-0",t),children:e}));Bo.displayName="TopMenuUserSection";var Ke=h.createContext(null);function je(){let e=h.useContext(Ke);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var Vo=h.forwardRef(({tabs:e,activeTab:t,defaultTab:o,onTabChange:r,children:i,className:l,tabsClassName:d},y)=>{var G;let[f,I]=h.useState(o||((G=e[0])==null?void 0:G.id)||""),N=t!=null?t:f,L=k=>{I(k),r==null||r(k);};return jsx(Ke.Provider,{value:{activeTab:N,setActiveTab:L},children:jsxs("div",{ref:y,className:a("space-y-6",l),children:[jsx("div",{className:"border-b border-sourceful-gray-200 dark:border-sourceful-gray-800",children:jsx("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",d),"aria-label":"Tabs",children:e.map(k=>{let E=N===k.id;return jsxs("button",{onClick:()=>!k.disabled&&L(k.id),disabled:k.disabled,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",E?"text-sourceful-green-600 dark:text-sourceful-green-400":"text-sourceful-gray-500 dark:text-sourceful-gray-400 hover:text-sourceful-gray-700 dark:hover:text-sourceful-gray-300",k.disabled&&"opacity-50 cursor-not-allowed"),children:[k.icon&&jsx("span",{className:"h-4 w-4",children:k.icon}),k.label,E&&jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-sourceful-green-500","aria-hidden":"true"})]},k.id)})})}),i&&jsx("div",{children:i})]})})});Vo.displayName="SimpleTabs";var Wo=h.forwardRef(({id:e,children:t,className:o},r)=>{let{activeTab:i}=je();return i!==e?null:jsx("div",{ref:r,role:"tabpanel","aria-labelledby":`tab-${e}`,className:o,children:t})});Wo.displayName="SimpleTabsPanel";var Oo=h.forwardRef(({activeTab:e,defaultTab:t,onTabChange:o,children:r,className:i},l)=>{let[d,y]=h.useState(t||""),f=e!=null?e:d,I=N=>{y(N),o==null||o(N);};return jsx(Ke.Provider,{value:{activeTab:f,setActiveTab:I},children:jsx("div",{ref:l,className:a("space-y-6",i),children:r})})});Oo.displayName="SimpleTabsRoot";var Uo=h.forwardRef(({children:e,className:t},o)=>jsx("div",{ref:o,className:"border-b border-sourceful-gray-200 dark:border-sourceful-gray-800",children:jsx("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs",children:e})}));Uo.displayName="SimpleTabsList";var _o=h.forwardRef(({value:e,children:t,icon:o,disabled:r,className:i},l)=>{let{activeTab:d,setActiveTab:y}=je(),f=d===e;return jsxs("button",{ref:l,role:"tab",id:`tab-${e}`,"aria-selected":f,"aria-controls":`panel-${e}`,onClick:()=>!r&&y(e),disabled:r,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",f?"text-sourceful-green-600 dark:text-sourceful-green-400":"text-sourceful-gray-500 dark:text-sourceful-gray-400 hover:text-sourceful-gray-700 dark:hover:text-sourceful-gray-300",r&&"opacity-50 cursor-not-allowed",i),children:[o&&jsx("span",{className:"h-4 w-4",children:o}),t,f&&jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-sourceful-green-500","aria-hidden":"true"})]})});_o.displayName="SimpleTabsTrigger";var $o=h.forwardRef(({value:e,children:t,className:o},r)=>{let{activeTab:i}=je();return i!==e?null:jsx("div",{ref:r,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:o,children:t})});$o.displayName="SimpleTabsContent";function ir({children:e}){let t=useRef(null);return useEffect(()=>{let o=new or({duration:1.2,easing:i=>Math.min(1,1.001-Math.pow(2,-10*i)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(i){o.raf(i),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),jsx(Fragment,{children:e})}var ne=h.createContext(null);function sr(){let e=h.useContext(ne);if(!e)throw new Error("useDesignSystemTheme must be used within DesignSystemProvider");return {theme:e.theme,setTheme:e.setTheme}}function nr(){let e=h.useContext(ne);if(!e)throw new Error("useFontMode must be used within DesignSystemProvider");return {fontMode:e.fontMode,setFontMode:e.setFontMode}}function lr(){let e=h.useContext(ne);if(!e)throw new Error("useColorMode must be used within DesignSystemProvider");return {colorMode:e.colorMode,setColorMode:e.setColorMode}}function cr(){let e=h.useContext(ne);if(!e)throw new Error("useSpacingMode must be used within DesignSystemProvider");return {spacingMode:e.spacingMode,setSpacingMode:e.setSpacingMode}}function dr(){let e=h.useContext(ne);if(!e)throw new Error("useFocusMode must be used within DesignSystemProvider");return {focusMode:e.focusMode,setFocusMode:e.setFocusMode}}function mr(){let e=h.useContext(ne);if(!e)throw new Error("useAccessibility must be used within DesignSystemProvider");return {fontMode:e.fontMode,setFontMode:e.setFontMode,colorMode:e.colorMode,setColorMode:e.setColorMode,spacingMode:e.spacingMode,setSpacingMode:e.setSpacingMode,focusMode:e.focusMode,setFocusMode:e.setFocusMode}}function pr(){let e=h.useContext(ne);if(!e)throw new Error("useDesignSystem must be used within DesignSystemProvider");return e}function fr({children:e,defaultTheme:t="base",defaultFontMode:o="default",defaultColorMode:r="default",defaultSpacingMode:i="default",defaultFocusMode:l="default",storageKey:d="sourceful-a11y",disableStorage:y=false}){let[f,I]=h.useState(t),[N,L]=h.useState(o),[G,k]=h.useState(r),[E,z]=h.useState(i),[_,F]=h.useState(l),[A,me]=h.useState(false);h.useEffect(()=>{if(me(true),!(y||typeof window=="undefined"))try{let pe=localStorage.getItem(d);if(pe){let te=JSON.parse(pe);te.fontMode&&L(te.fontMode),te.colorMode&&k(te.colorMode),te.spacingMode&&z(te.spacingMode),te.focusMode&&F(te.focusMode);}}catch(pe){console.warn("Failed to load accessibility preferences:",pe);}},[d,y]),h.useEffect(()=>{A&&document.documentElement.setAttribute("data-theme",f);},[f,A]),h.useEffect(()=>{A&&(N==="default"?document.documentElement.removeAttribute("data-font-mode"):document.documentElement.setAttribute("data-font-mode",N));},[N,A]),h.useEffect(()=>{A&&(G==="default"?document.documentElement.removeAttribute("data-color-mode"):document.documentElement.setAttribute("data-color-mode",G));},[G,A]),h.useEffect(()=>{A&&(E==="default"?document.documentElement.removeAttribute("data-spacing"):document.documentElement.setAttribute("data-spacing",E));},[E,A]),h.useEffect(()=>{A&&(_==="default"?document.documentElement.removeAttribute("data-focus-mode"):document.documentElement.setAttribute("data-focus-mode",_));},[_,A]),h.useEffect(()=>{if(!(!A||y||typeof window=="undefined"))try{localStorage.setItem(d,JSON.stringify({fontMode:N,colorMode:G,spacingMode:E,focusMode:_}));}catch(pe){console.warn("Failed to save accessibility preferences:",pe);}},[N,G,E,_,d,A,y]);let Xo=h.useMemo(()=>({theme:f,setTheme:I,fontMode:N,setFontMode:L,colorMode:G,setColorMode:k,spacingMode:E,setSpacingMode:z,focusMode:_,setFocusMode:F}),[f,N,G,E,_]);return jsx(ne.Provider,{value:Xo,children:e})}var ee=(e,t)=>t*3+e,p=ee(0,0),w=ee(1,0),b=ee(2,0),P=ee(0,1),c=ee(1,1),R=ee(2,1),g=ee(0,2),S=ee(1,2),v=ee(2,2),he={"solo-center":{name:"Solo Center",description:"Center pixel pulses",frames:[{activePixels:[]},{activePixels:[c]},{activePixels:[c]},{activePixels:[]}]},"solo-tl":{name:"Solo Top-Left",description:"Top-left pixel pulses",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p]},{activePixels:[]}]},"solo-br":{name:"Solo Bottom-Right",description:"Bottom-right pixel pulses",frames:[{activePixels:[]},{activePixels:[v]},{activePixels:[v]},{activePixels:[]}]},"line-h-top":{name:"Horizontal Top",description:"Top row lights up left to right",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,w]},{activePixels:[p,w,b]},{activePixels:[w,b]},{activePixels:[b]},{activePixels:[]}]},"line-h-mid":{name:"Horizontal Middle",description:"Middle row lights up left to right",frames:[{activePixels:[]},{activePixels:[P]},{activePixels:[P,c]},{activePixels:[P,c,R]},{activePixels:[c,R]},{activePixels:[R]},{activePixels:[]}]},"line-h-bot":{name:"Horizontal Bottom",description:"Bottom row lights up left to right",frames:[{activePixels:[]},{activePixels:[g]},{activePixels:[g,S]},{activePixels:[g,S,v]},{activePixels:[S,v]},{activePixels:[v]},{activePixels:[]}]},"line-v-left":{name:"Vertical Left",description:"Left column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,P]},{activePixels:[p,P,g]},{activePixels:[P,g]},{activePixels:[g]},{activePixels:[]}]},"line-v-mid":{name:"Vertical Middle",description:"Middle column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[w]},{activePixels:[w,c]},{activePixels:[w,c,S]},{activePixels:[c,S]},{activePixels:[S]},{activePixels:[]}]},"line-v-right":{name:"Vertical Right",description:"Right column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,R]},{activePixels:[b,R,v]},{activePixels:[R,v]},{activePixels:[v]},{activePixels:[]}]},"line-diag-1":{name:"Diagonal TL-BR",description:"Diagonal from top-left to bottom-right",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,c]},{activePixels:[p,c,v]},{activePixels:[c,v]},{activePixels:[v]},{activePixels:[]}]},"line-diag-2":{name:"Diagonal TR-BL",description:"Diagonal from top-right to bottom-left",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,c]},{activePixels:[b,c,g]},{activePixels:[c,g]},{activePixels:[g]},{activePixels:[]}]},"corners-sync":{name:"Corners Sync",description:"All corners pulse together",frames:[{activePixels:[]},{activePixels:[p,b,g,v]},{activePixels:[p,b,g,v]},{activePixels:[]}]},"corners-only":{name:"Corners Clockwise",description:"Corners light up clockwise",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,b]},{activePixels:[b]},{activePixels:[b,v]},{activePixels:[v]},{activePixels:[v,g]},{activePixels:[g]},{activePixels:[g,p]},{activePixels:[]}],cycleDuration:2e3},"L-tl":{name:"L Top-Left",description:"L shape in top-left corner",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,P]},{activePixels:[p,P,c]},{activePixels:[p,P,c]},{activePixels:[P,c]},{activePixels:[c]},{activePixels:[]}]},"L-tr":{name:"L Top-Right",description:"L shape in top-right corner",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,R]},{activePixels:[b,R,c]},{activePixels:[b,R,c]},{activePixels:[R,c]},{activePixels:[c]},{activePixels:[]}]},"L-bl":{name:"L Bottom-Left",description:"L shape in bottom-left corner",frames:[{activePixels:[]},{activePixels:[g]},{activePixels:[g,P]},{activePixels:[g,P,c]},{activePixels:[g,P,c]},{activePixels:[P,c]},{activePixels:[c]},{activePixels:[]}]},"L-br":{name:"L Bottom-Right",description:"L shape in bottom-right corner",frames:[{activePixels:[]},{activePixels:[v]},{activePixels:[v,R]},{activePixels:[v,R,c]},{activePixels:[v,R,c]},{activePixels:[R,c]},{activePixels:[c]},{activePixels:[]}]},"T-top":{name:"T Top",description:"T shape pointing down",frames:[{activePixels:[]},{activePixels:[w]},{activePixels:[p,w,b]},{activePixels:[p,w,b,c]},{activePixels:[p,w,b,c]},{activePixels:[w,c]},{activePixels:[c]},{activePixels:[]}]},"T-bot":{name:"T Bottom",description:"T shape pointing up",frames:[{activePixels:[]},{activePixels:[S]},{activePixels:[g,S,v]},{activePixels:[g,S,v,c]},{activePixels:[g,S,v,c]},{activePixels:[S,c]},{activePixels:[c]},{activePixels:[]}]},"T-left":{name:"T Left",description:"T shape pointing right",frames:[{activePixels:[]},{activePixels:[P]},{activePixels:[p,P,g]},{activePixels:[p,P,g,c]},{activePixels:[p,P,g,c]},{activePixels:[P,c]},{activePixels:[c]},{activePixels:[]}]},"T-right":{name:"T Right",description:"T shape pointing left",frames:[{activePixels:[]},{activePixels:[R]},{activePixels:[b,R,v]},{activePixels:[b,R,v,c]},{activePixels:[b,R,v,c]},{activePixels:[R,c]},{activePixels:[c]},{activePixels:[]}]},"duo-h":{name:"Duo Horizontal",description:"Two horizontal pixels pulse",frames:[{activePixels:[]},{activePixels:[P]},{activePixels:[P,R]},{activePixels:[P,R]},{activePixels:[R]},{activePixels:[]}]},"duo-v":{name:"Duo Vertical",description:"Two vertical pixels pulse",frames:[{activePixels:[]},{activePixels:[w]},{activePixels:[w,S]},{activePixels:[w,S]},{activePixels:[S]},{activePixels:[]}]},"duo-diag":{name:"Duo Diagonal",description:"Diagonal pair pulses",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,v]},{activePixels:[p,v]},{activePixels:[v]},{activePixels:[]}]},frame:{name:"Frame",description:"Outer pixels light up clockwise",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,w]},{activePixels:[w,b]},{activePixels:[b,R]},{activePixels:[R,v]},{activePixels:[v,S]},{activePixels:[S,g]},{activePixels:[g,P]},{activePixels:[P,p]},{activePixels:[p]},{activePixels:[]}],cycleDuration:2e3},"frame-sync":{name:"Frame Sync",description:"All outer pixels pulse together",frames:[{activePixels:[]},{activePixels:[p,w,b,P,R,g,S,v]},{activePixels:[p,w,b,P,R,g,S,v]},{activePixels:[]}]},"plus-hollow":{name:"Plus",description:"Plus/cross shape lights up",frames:[{activePixels:[]},{activePixels:[c]},{activePixels:[w,c,S]},{activePixels:[w,P,c,R,S]},{activePixels:[w,P,c,R,S]},{activePixels:[w,c,S]},{activePixels:[c]},{activePixels:[]}]},"sparse-1":{name:"Sparse 1",description:"Scattered pattern variation 1",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,R]},{activePixels:[p,R,S]},{activePixels:[p,R,S]},{activePixels:[R,S]},{activePixels:[S]},{activePixels:[]}]},"sparse-2":{name:"Sparse 2",description:"Scattered pattern variation 2",frames:[{activePixels:[]},{activePixels:[w]},{activePixels:[w,g]},{activePixels:[w,g,v]},{activePixels:[w,g,v]},{activePixels:[g,v]},{activePixels:[v]},{activePixels:[]}]},"sparse-3":{name:"Sparse 3",description:"Scattered pattern variation 3",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,P]},{activePixels:[b,P,g]},{activePixels:[b,P,g]},{activePixels:[P,g]},{activePixels:[g]},{activePixels:[]}]}},qo=Object.keys(he),we={Solo:["solo-center","solo-tl","solo-br"],"Horizontal Lines":["line-h-top","line-h-mid","line-h-bot"],"Vertical Lines":["line-v-left","line-v-mid","line-v-right"],"Diagonal Lines":["line-diag-1","line-diag-2"],Corners:["corners-sync","corners-only"],"L-Shapes":["L-tl","L-tr","L-bl","L-br"],"T-Shapes":["T-top","T-bot","T-left","T-right"],Duos:["duo-h","duo-v","duo-diag"],Frame:["frame","frame-sync"],Plus:["plus-hollow"],Sparse:["sparse-1","sparse-2","sparse-3"]};var vr={slow:2e3,normal:1500,fast:1e3},gr={sm:{pixel:6,gap:2},md:{pixel:10,gap:3},lg:{pixel:14,gap:4}};function le({pattern:e,color:t="green",speed:o="normal",size:r="md",paused:i=false,className:l,showLabel:d=false}){var F;let[y,f]=h.useState(0),[I,N]=h.useState(new Set),L=he[e],k=((F=L.cycleDuration)!=null?F:vr[o])/L.frames.length;h.useEffect(()=>{if(i)return;let A=setInterval(()=>{f(me=>(me+1)%L.frames.length);},k);return ()=>clearInterval(A)},[i,k,L.frames.length]),h.useEffect(()=>{let A=L.frames[y];N(new Set(A.activePixels));},[y,L.frames]);let{pixel:E,gap:z}=gr[r],_=E*3+z*2;return jsxs("div",{className:a("pixel-grid-wrapper",l),children:[jsx("div",{className:a("pixel-grid-container",`pixel-grid-${t}`),style:{width:_,height:_,gap:z,"--pixel-size":`${E}px`},role:"img","aria-label":`Animated pixel grid: ${L.name}`,children:Array.from({length:9},(A,me)=>jsx("div",{className:a("pixel-grid-pixel",{"pixel-active":I.has(me)}),style:{width:E,height:E}},me))}),d&&jsx("span",{className:"pixel-grid-label font-mono",children:e})]})}le.displayName="PixelGrid";function tt({color:e="green",size:t="md",showCategories:o=true,categories:r,className:i}){let l=r?Object.entries(we).filter(([d])=>r.includes(d)):Object.entries(we);return jsx("div",{className:a("pixel-grid-showcase",i),children:o?jsx("div",{className:"space-y-8",children:l.map(([d,y])=>jsxs("div",{children:[jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-4",children:d}),jsx("div",{className:"flex flex-wrap gap-6",children:y.map(f=>jsx(le,{pattern:f,color:e,size:t,showLabel:true},f))})]},d))}):jsx("div",{className:"flex flex-wrap gap-6",children:l.flatMap(([d,y])=>y.map(f=>jsx(le,{pattern:f,color:e,size:t,showLabel:true},f)))})})}tt.displayName="PixelGridShowcase";function ot({pattern:e,size:t="md",className:o}){let r=["blue","pink","green"];return jsx("div",{className:a("flex gap-6 items-center",o),children:r.map(i=>jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsx(le,{pattern:e,color:i,size:t}),jsx("span",{className:"text-xs text-muted-foreground font-mono",children:i})]},i))})}ot.displayName="PixelGridColorComparison";function it({pattern:e,color:t="green",className:o}){let r=["sm","md","lg"];return jsx("div",{className:a("flex gap-6 items-end",o),children:r.map(i=>jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsx(le,{pattern:e,color:t,size:i}),jsx("span",{className:"text-xs text-muted-foreground font-mono",children:i})]},i))})}it.displayName="PixelGridSizeComparison";export{ei as Accordion,dt as AccordionContent,lt as AccordionItem,ct as AccordionTrigger,mt as Alert,ft as AlertDescription,pt as AlertTitle,ai as Badge,xt as Button,bt as Card,ht as CardContent,yt as CardDescription,wt as CardFooter,Pt as CardHeader,Rt as CardTitle,Tt as Checkbox,fr as DesignSystemProvider,pi as Dialog,ui as DialogClose,Mt as DialogContent,Lt as DialogDescription,Dt as DialogFooter,Ct as DialogHeader,Ae as DialogOverlay,Nt as DialogPortal,kt as DialogTitle,fi as DialogTrigger,bi as DropdownMenu,Gt as DropdownMenuCheckboxItem,Ht as DropdownMenuContent,Ri as DropdownMenuGroup,It as DropdownMenuItem,Ft as DropdownMenuLabel,yi as DropdownMenuPortal,wi as DropdownMenuRadioGroup,zt as DropdownMenuRadioItem,Bt as DropdownMenuSeparator,Vt as DropdownMenuShortcut,hi as DropdownMenuSub,At as DropdownMenuSubContent,Et as DropdownMenuSubTrigger,Pi as DropdownMenuTrigger,Ot as Input,_t as Label,ir as LenisProvider,le as PixelGrid,ot as PixelGridColorComparison,tt as PixelGridShowcase,it as PixelGridSizeComparison,Xt as Progress,Jt as RadioGroup,Qt as RadioGroupItem,Yt as ScrollArea,Fe as ScrollBar,Ei as Select,jt as SelectContent,Ai as SelectGroup,to as SelectItem,eo as SelectLabel,Ve as SelectScrollDownButton,Be as SelectScrollUpButton,oo as SelectSeparator,Kt as SelectTrigger,Hi as SelectValue,ro as Separator,Fi as Sheet,Vi as SheetClose,so as SheetContent,mo as SheetDescription,lo as SheetFooter,no as SheetHeader,_e as SheetOverlay,ao as SheetPortal,co as SheetTitle,Bi as SheetTrigger,Io as SideMenu,Vo as SimpleTabs,$o as SimpleTabsContent,Uo as SimpleTabsList,Wo as SimpleTabsPanel,Oo as SimpleTabsRoot,_o as SimpleTabsTrigger,Oi as Skeleton,fo as Slider,go as Switch,xo as Table,Po as TableBody,So as TableCaption,wo as TableCell,Ro as TableFooter,ho as TableHead,bo as TableHeader,yo as TableRow,$i as Tabs,Mo as TabsContent,To as TabsList,No as TabsTrigger,Do as Textarea,Je as Tooltip,De as TooltipContent,Xe as TooltipProvider,Qe as TooltipTrigger,Go as TopMenu,zo as TopMenuUser,Fo as TopMenuUserItem,Bo as TopMenuUserSection,ut as badgeVariants,gt as buttonVariants,a as cn,we as patternCategories,qo as patternNames,he as patterns,mr as useAccessibility,lr as useColorMode,pr as useDesignSystem,sr as useDesignSystemTheme,dr as useFocusMode,nr as useFontMode,cr as useSpacingMode};//# sourceMappingURL=index.mjs.map
1
+ import*as M from'react';import {useRef,useEffect}from'react';import*as de from'@radix-ui/react-accordion';import {ChevronDown,Check,X,ChevronRight,Circle,ChevronUp,ChevronLeft,Menu}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as Fe from'@radix-ui/react-checkbox';import*as q from'@radix-ui/react-dialog';import*as m from'@radix-ui/react-dropdown-menu';import*as lt from'@radix-ui/react-label';import*as Be from'@radix-ui/react-progress';import*as Te from'@radix-ui/react-radio-group';import*as me from'@radix-ui/react-scroll-area';import*as u from'@radix-ui/react-select';import*as vt from'@radix-ui/react-separator';import*as Pe from'@radix-ui/react-slider';import*as Oe from'@radix-ui/react-switch';import*as fe from'@radix-ui/react-tabs';import*as ue from'@radix-ui/react-tooltip';import Ir from'lenis';var Mo=Object.defineProperty,Do=Object.defineProperties;var ko=Object.getOwnPropertyDescriptors;var Qe=Object.getOwnPropertySymbols;var Gt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable;var Et=(e,t,i)=>t in e?Mo(e,t,{enumerable:true,configurable:true,writable:true,value:i}):e[t]=i,n=(e,t)=>{for(var i in t||(t={}))Gt.call(t,i)&&Et(e,i,t[i]);if(Qe)for(var i of Qe(t))It.call(t,i)&&Et(e,i,t[i]);return e},g=(e,t)=>Do(e,ko(t));var l=(e,t)=>{var i={};for(var r in e)Gt.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&Qe)for(var r of Qe(e))t.indexOf(r)<0&&It.call(e,r)&&(i[r]=e[r]);return i};function a(...e){return twMerge(clsx(e))}var Eo=de.Root,Ft=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(de.Item,n({ref:i,className:a("border-b",e)},t))});Ft.displayName="AccordionItem";var zt=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsx(de.Header,{className:"flex",children:jsxs(de.Trigger,g(n({ref:r,className:a("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e)},i),{children:[t,jsx(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]}))})});zt.displayName=de.Trigger.displayName;var Bt=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsx(de.Content,g(n({ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"},i),{children:jsx("div",{className:a("pb-4 pt-0",e),children:t})}))});Bt.displayName=de.Content.displayName;var Fo=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-red-700 bg-destructive/10 text-destructive dark:border-red-500 dark:bg-red-950 dark:text-red-200 [&>svg]:text-destructive dark:[&>svg]:text-red-400",success:"border-green-700 bg-sourceful-green-50 text-sourceful-green-900 dark:border-green-500 dark:bg-green-950 dark:text-green-200 [&>svg]:text-sourceful-green-600 dark:[&>svg]:text-green-400",warning:"border-yellow-600 bg-sourceful-yellow-50 text-sourceful-yellow-900 dark:border-yellow-500 dark:bg-yellow-950 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",info:"border-blue-700 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950 dark:text-blue-200 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",energy:"border-yellow-600 bg-sourceful-yellow-50 text-sourceful-gray-900 dark:border-yellow-400 dark:bg-yellow-950 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400"}},defaultVariants:{variant:"default"}}),Vt=M.forwardRef((o,r)=>{var s=o,{className:e,variant:t}=s,i=l(s,["className","variant"]);return jsx("div",n({ref:r,role:"alert",className:a(Fo({variant:t}),e)},i))});Vt.displayName="Alert";var Wt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("h5",n({ref:i,className:a("mb-1 font-medium leading-none tracking-tight",e)},t))});Wt.displayName="AlertTitle";var Ot=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("text-sm [&_p]:leading-relaxed",e)},t))});Ot.displayName="AlertDescription";var Ut=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",energy:"border-transparent bg-energy text-energy-foreground shadow hover:bg-energy/80",success:"border-transparent bg-success text-success-foreground shadow hover:bg-success/80",warning:"border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80",info:"border-transparent bg-info text-info-foreground shadow hover:bg-info/80","success-soft":"border-sourceful-green-500/20 bg-sourceful-green-500/10 text-sourceful-green-600 dark:text-sourceful-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","energy-soft":"border-sourceful-yellow-500/20 bg-sourceful-yellow-400/10 text-sourceful-yellow-600 dark:text-sourceful-yellow-400","success-outline":"border-sourceful-green-500/50 bg-transparent text-sourceful-green-600 dark:text-sourceful-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function Bo(o){var s=o,{className:e,variant:t,rounded:i}=s,r=l(s,["className","variant","rounded"]);return jsx("div",n({className:a(Ut({variant:t,rounded:i}),e)},r))}var _t=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),qt=M.forwardRef((c,s)=>{var C=c,{className:e,variant:t,size:i,asChild:r=false}=C,o=l(C,["className","variant","size","asChild"]);return jsx(r?Slot:"button",n({className:a(_t({variant:t,size:i,className:e})),ref:s},o))});qt.displayName="Button";var Xt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("rounded-xl border bg-card text-card-foreground shadow",e)},t))});Xt.displayName="Card";var Jt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("flex flex-col space-y-1.5 p-6",e)},t))});Jt.displayName="CardHeader";var Qt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("font-semibold leading-none tracking-tight",e)},t))});Qt.displayName="CardTitle";var Yt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("text-sm text-muted-foreground",e)},t))});Yt.displayName="CardDescription";var Zt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("p-6 pt-0",e)},t))});Zt.displayName="CardContent";var Kt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",n({ref:i,className:a("flex items-center p-6 pt-0",e)},t))});Kt.displayName="CardFooter";var ei=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(Fe.Root,g(n({ref:i,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e)},t),{children:jsx(Fe.Indicator,{className:a("flex items-center justify-center text-current"),children:jsx(Check,{className:"h-4 w-4"})})}))});ei.displayName=Fe.Root.displayName;var qo=q.Root,Xo=q.Trigger,ti=q.Portal,Jo=q.Close,st=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Overlay,n({ref:i,className:a("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)},t))});st.displayName=q.Overlay.displayName;var ii=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsxs(ti,{children:[jsx(st,{}),jsxs(q.Content,g(n({ref:r,className:a("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg 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",e)},i),{children:[t,jsxs(q.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});ii.displayName=q.Content.displayName;var oi=i=>{var r=i,{className:e}=r,t=l(r,["className"]);return jsx("div",n({className:a("flex flex-col space-y-1.5 text-center sm:text-left",e)},t))};oi.displayName="DialogHeader";var ri=i=>{var r=i,{className:e}=r,t=l(r,["className"]);return jsx("div",n({className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};ri.displayName="DialogFooter";var ai=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Title,n({ref:i,className:a("text-lg font-semibold leading-none tracking-tight",e)},t))});ai.displayName=q.Title.displayName;var si=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Description,n({ref:i,className:a("text-sm text-muted-foreground",e)},t))});si.displayName=q.Description.displayName;var Ko=m.Root,jo=m.Trigger,er=m.Group,tr=m.Portal,ir=m.Sub,or=m.RadioGroup,ni=M.forwardRef((s,o)=>{var c=s,{className:e,inset:t,children:i}=c,r=l(c,["className","inset","children"]);return jsxs(m.SubTrigger,g(n({ref:o,className:a("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e)},r),{children:[i,jsx(ChevronRight,{className:"ml-auto"})]}))});ni.displayName=m.SubTrigger.displayName;var li=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(m.SubContent,n({ref:i,className:a("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e)},t))});li.displayName=m.SubContent.displayName;var ci=M.forwardRef((o,r)=>{var s=o,{className:e,sideOffset:t=4}=s,i=l(s,["className","sideOffset"]);return jsx(m.Portal,{children:jsx(m.Content,n({ref:r,sideOffset:t,className:a("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e)},i))})});ci.displayName=m.Content.displayName;var di=M.forwardRef((o,r)=>{var s=o,{className:e,inset:t}=s,i=l(s,["className","inset"]);return jsx(m.Item,n({ref:r,className:a("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e)},i))});di.displayName=m.Item.displayName;var mi=M.forwardRef((s,o)=>{var c=s,{className:e,children:t,checked:i}=c,r=l(c,["className","children","checked"]);return jsxs(m.CheckboxItem,g(n({ref:o,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:i},r),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(m.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),t]}))});mi.displayName=m.CheckboxItem.displayName;var pi=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsxs(m.RadioItem,g(n({ref:r,className:a("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},i),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(m.ItemIndicator,{children:jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}))});pi.displayName=m.RadioItem.displayName;var fi=M.forwardRef((o,r)=>{var s=o,{className:e,inset:t}=s,i=l(s,["className","inset"]);return jsx(m.Label,n({ref:r,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e)},i))});fi.displayName=m.Label.displayName;var ui=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(m.Separator,n({ref:i,className:a("-mx-1 my-1 h-px bg-muted",e)},t))});ui.displayName=m.Separator.displayName;var vi=i=>{var r=i,{className:e}=r,t=l(r,["className"]);return jsx("span",n({className:a("ml-auto text-xs tracking-widest opacity-60",e)},t))};vi.displayName="DropdownMenuShortcut";var Pi=M.forwardRef((o,r)=>{var s=o,{className:e,type:t}=s,i=l(s,["className","type"]);return jsx("input",n({type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r},i))});Pi.displayName="Input";var sr=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),bi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(lt.Root,n({ref:i,className:a(sr(),e)},t))});bi.displayName=lt.Root.displayName;var Ri=M.forwardRef((o,r)=>{var s=o,{className:e,value:t}=s,i=l(s,["className","value"]);return jsx(Be.Root,g(n({ref:r,className:a("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e)},i),{children:jsx(Be.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}))});Ri.displayName=Be.Root.displayName;var wi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(Te.Root,g(n({className:a("grid gap-2",e)},t),{ref:i}))});wi.displayName=Te.Root.displayName;var Ti=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(Te.Item,g(n({ref:i,className:a("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e)},t),{children:jsx(Te.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}))});Ti.displayName=Te.Item.displayName;var Si=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsxs(me.Root,g(n({ref:r,className:a("relative overflow-hidden",e)},i),{children:[jsx(me.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),jsx(mt,{}),jsx(me.Corner,{})]}))});Si.displayName=me.Root.displayName;var mt=M.forwardRef((o,r)=>{var s=o,{className:e,orientation:t="vertical"}=s,i=l(s,["className","orientation"]);return jsx(me.ScrollAreaScrollbar,g(n({ref:r,orientation:t,className:a("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e)},i),{children:jsx(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}))});mt.displayName=me.ScrollAreaScrollbar.displayName;var pr=u.Root,fr=u.Group,ur=u.Value,Ni=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsxs(u.Trigger,g(n({ref:r,className:a("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e)},i),{children:[t,jsx(u.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}))});Ni.displayName=u.Trigger.displayName;var pt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(u.ScrollUpButton,g(n({ref:i,className:a("flex cursor-default items-center justify-center py-1",e)},t),{children:jsx(ChevronUp,{className:"h-4 w-4"})}))});pt.displayName=u.ScrollUpButton.displayName;var ft=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(u.ScrollDownButton,g(n({ref:i,className:a("flex cursor-default items-center justify-center py-1",e)},t),{children:jsx(ChevronDown,{className:"h-4 w-4"})}))});ft.displayName=u.ScrollDownButton.displayName;var Mi=M.forwardRef((s,o)=>{var c=s,{className:e,children:t,position:i="popper"}=c,r=l(c,["className","children","position"]);return jsx(u.Portal,{children:jsxs(u.Content,g(n({ref:o,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:i},r),{children:[jsx(pt,{}),jsx(u.Viewport,{className:a("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsx(ft,{})]}))})});Mi.displayName=u.Content.displayName;var Di=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(u.Label,n({ref:i,className:a("py-1.5 pl-8 pr-2 text-sm font-semibold",e)},t))});Di.displayName=u.Label.displayName;var ki=M.forwardRef((o,r)=>{var s=o,{className:e,children:t}=s,i=l(s,["className","children"]);return jsxs(u.Item,g(n({ref:r,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e)},i),{children:[jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(u.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(u.ItemText,{children:t})]}))});ki.displayName=u.Item.displayName;var Li=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(u.Separator,n({ref:i,className:a("-mx-1 my-1 h-px bg-muted",e)},t))});Li.displayName=u.Separator.displayName;var Ai=M.forwardRef((s,o)=>{var c=s,{className:e,orientation:t="horizontal",decorative:i=true}=c,r=l(c,["className","orientation","decorative"]);return jsx(vt.Root,n({ref:o,decorative:i,orientation:t,className:a("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e)},r))});Ai.displayName=vt.Root.displayName;var gr=q.Root,br=q.Trigger,yr=q.Close,Ei=q.Portal,Pt=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Overlay,g(n({className:a("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)},t),{ref:i}))});Pt.displayName=q.Overlay.displayName;var hr=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Gi=M.forwardRef((s,o)=>{var c=s,{side:e="right",className:t,children:i}=c,r=l(c,["side","className","children"]);return jsxs(Ei,{children:[jsx(Pt,{}),jsxs(q.Content,g(n({ref:o,className:a(hr({side:e}),t)},r),{children:[i,jsxs(q.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}))]})});Gi.displayName=q.Content.displayName;var Ii=i=>{var r=i,{className:e}=r,t=l(r,["className"]);return jsx("div",n({className:a("flex flex-col space-y-2 text-center sm:text-left",e)},t))};Ii.displayName="SheetHeader";var Fi=i=>{var r=i,{className:e}=r,t=l(r,["className"]);return jsx("div",n({className:a("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e)},t))};Fi.displayName="SheetFooter";var zi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Title,n({ref:i,className:a("text-lg font-semibold text-foreground",e)},t))});zi.displayName=q.Title.displayName;var Bi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(q.Description,n({ref:i,className:a("text-sm text-muted-foreground",e)},t))});Bi.displayName=q.Description.displayName;function Rr(i){var r=i,{className:e}=r,t=l(r,["className"]);return jsx("div",n({className:a("animate-pulse rounded-md bg-muted",e)},t))}var Wi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsxs(Pe.Root,g(n({ref:i,className:a("relative flex w-full touch-none select-none items-center",e)},t),{children:[jsx(Pe.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:jsx(Pe.Range,{className:"absolute h-full bg-primary"})}),jsx(Pe.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}))});Wi.displayName=Pe.Root.displayName;var $i=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(Oe.Root,g(n({className:a("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e)},t),{ref:i,children:jsx(Oe.Thumb,{className:a("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}))});$i.displayName=Oe.Root.displayName;var _i=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",n({ref:i,className:a("w-full caption-bottom text-sm",e)},t))})});_i.displayName="Table";var qi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("thead",n({ref:i,className:a("[&_tr]:border-b",e)},t))});qi.displayName="TableHeader";var Xi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("tbody",n({ref:i,className:a("[&_tr:last-child]:border-0",e)},t))});Xi.displayName="TableBody";var Ji=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("tfoot",n({ref:i,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e)},t))});Ji.displayName="TableFooter";var Qi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("tr",n({ref:i,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e)},t))});Qi.displayName="TableRow";var Yi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("th",n({ref:i,className:a("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e)},t))});Yi.displayName="TableHead";var Zi=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("td",n({ref:i,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e)},t))});Zi.displayName="TableCell";var Ki=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("caption",n({ref:i,className:a("mt-4 text-sm text-muted-foreground",e)},t))});Ki.displayName="TableCaption";var Sr=fe.Root,ji=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(fe.List,n({ref:i,className:a("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e)},t))});ji.displayName=fe.List.displayName;var eo=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(fe.Trigger,n({ref:i,className:a("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",e)},t))});eo.displayName=fe.Trigger.displayName;var to=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx(fe.Content,n({ref:i,className:a("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e)},t))});to.displayName=fe.Content.displayName;var oo=M.forwardRef((r,i)=>{var o=r,{className:e}=o,t=l(o,["className"]);return jsx("textarea",n({className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm 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",e),ref:i},t))});oo.displayName="Textarea";var yt=ue.Provider,ht=ue.Root,Rt=ue.Trigger,et=M.forwardRef((o,r)=>{var s=o,{className:e,sideOffset:t=4}=s,i=l(s,["className","sideOffset"]);return jsx(ue.Portal,{children:jsx(ue.Content,n({ref:r,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e)},i))})});et.displayName=ue.Content.displayName;var no=M.createContext(null);function lo(){let e=M.useContext(no);if(!e)throw new Error("SideMenu components must be used within SideMenu");return e}var Dr=({href:e,className:t,children:i})=>jsx("a",{href:e,className:t,children:i}),co=M.forwardRef(({header:e,collapsedHeader:t,sections:i,items:r,footer:o,collapsed:s,onCollapsedChange:c,collapsible:C=true,defaultCollapsed:P=false,activeItem:V,className:H,linkComponent:Q=Dr},Z)=>{let[Y,W]=M.useState(P),le=s!=null?s:Y,ce=()=>{let se=!le;W(se),c==null||c(se);};return jsx(yt,{delayDuration:0,children:jsx(no.Provider,{value:{collapsed:le,activeItem:V,LinkComponent:Q},children:jsxs("aside",{ref:Z,className:a("flex h-full flex-col transition-[width] duration-300 ease-in-out","bg-white dark:bg-[#141414] border-r border-sourceful-gray-200 dark:border-[#1a1a1a]",le?"w-16":"w-64",H),children:[jsxs("div",{className:a("flex items-center border-b border-sourceful-gray-200 dark:border-[#1a1a1a] flex-shrink-0 h-12",le?"justify-center px-2":"justify-between px-3"),children:[le&&t||e,C&&jsx("button",{onClick:ce,className:a("rounded-md h-5 w-5 flex items-center justify-center","text-sourceful-gray-400 dark:text-sourceful-gray-500","hover:text-sourceful-gray-600 dark:hover:text-sourceful-gray-300 transition-colors","bg-white dark:bg-[#141414] border border-sourceful-gray-200 dark:border-sourceful-gray-700 shadow-sm",le&&"absolute left-[calc(4rem-10px)] top-6 -translate-y-1/2 z-50"),"aria-label":le?"Expand sidebar":"Collapse sidebar",children:le?jsx(ChevronRight,{className:"h-3 w-3"}):jsx(ChevronLeft,{className:"h-3 w-3"})})]}),jsxs("nav",{className:"flex-1 py-2 overflow-y-auto overflow-x-hidden",children:[r&&r.length>0&&jsx("div",{className:"px-2 mb-1 space-y-0.5",children:r.map(se=>jsx(wt,{item:se},se.id))}),i==null?void 0:i.map(se=>jsx(kr,{section:se},se.id))]}),o&&jsx("div",{className:"flex-shrink-0 border-t border-sourceful-gray-200 dark:border-[#1a1a1a] p-2",children:o})]})})})});co.displayName="SideMenu";function kr({section:e}){var o;let{collapsed:t}=lo(),[i,r]=M.useState((o=e.defaultExpanded)!=null?o:true);return t?jsx("div",{className:"px-2 mb-1 space-y-0.5",children:e.items.map(s=>jsx(wt,{item:s},s.id))}):jsxs("div",{className:"px-2 mb-1",children:[jsxs("button",{onClick:()=>r(!i),className:a("flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-sm font-medium","text-sourceful-gray-700 dark:text-sourceful-gray-300","hover:bg-sourceful-gray-50 dark:hover:bg-sourceful-gray-900","hover:text-sourceful-gray-900 dark:hover:text-white transition-colors"),children:[e.icon&&jsx("span",{className:"h-3.5 w-3.5 flex-shrink-0",children:e.icon}),jsx("span",{className:"flex-1 text-left",children:e.title}),i?jsx(ChevronDown,{className:"h-3 w-3",strokeWidth:1.5}):jsx(ChevronRight,{className:"h-3 w-3",strokeWidth:1.5})]}),i&&jsxs("div",{className:"mt-0.5 space-y-0.5 relative pl-5",children:[jsx("div",{className:"absolute left-[1.1rem] top-0 bottom-0 w-px bg-sourceful-gray-200 dark:bg-sourceful-gray-700"}),e.items.map(s=>jsx(wt,{item:s,nested:true},s.id))]})]})}function wt({item:e,nested:t=false}){let{collapsed:i,activeItem:r,LinkComponent:o}=lo(),s=r===e.id,c=a("flex items-center gap-2.5 rounded-md text-sm font-medium transition-colors",i?"justify-center px-2 py-2.5":"px-2 py-1.5",s?t?"bg-sourceful-gray-100 dark:bg-[#1a1a1a] text-sourceful-gray-900 dark:text-white":"bg-sourceful-green-50 dark:bg-sourceful-green-950 text-sourceful-green-700 dark:text-sourceful-green-400":"text-sourceful-gray-700 dark:text-sourceful-gray-300 hover:bg-sourceful-gray-50 dark:hover:bg-sourceful-gray-900 hover:text-sourceful-gray-900 dark:hover:text-white",e.disabled&&"opacity-50 pointer-events-none"),C=jsxs(Fragment,{children:[e.icon&&jsx("span",{className:a("flex-shrink-0",i?"h-5 w-5":"h-3.5 w-3.5"),children:e.icon}),!i&&jsx("span",{children:e.label}),!i&&e.badge&&jsx("span",{className:"ml-auto text-xs bg-sourceful-gray-100 dark:bg-sourceful-gray-800 px-1.5 py-0.5 rounded",children:e.badge})]}),P=e.href?jsx(o,{href:e.href,className:c,children:C}):jsx("button",{onClick:e.onClick,disabled:e.disabled,className:a(c,"w-full"),children:C});return i?jsxs(ht,{children:[jsx(Rt,{asChild:true,children:P}),jsx(et,{side:"right",sideOffset:8,children:e.label})]}):P}var Ar=({href:e,className:t,children:i})=>jsx("a",{href:e,className:t,children:i}),mo=M.forwardRef(({breadcrumbs:e=[],showMobileMenu:t=false,onMobileMenuClick:i,leftContent:r,rightContent:o,className:s,linkComponent:c=Ar},C)=>jsxs("header",{ref:C,className:a("sticky top-0 z-30 flex h-12 items-center gap-3","border-b border-sourceful-gray-200 dark:border-[#1a1a1a]","bg-white dark:bg-[#141414] px-4",s),children:[t&&jsx("button",{onClick:i,className:"lg:hidden rounded-md p-1.5 text-sourceful-gray-600 hover:bg-sourceful-gray-100 dark:text-sourceful-gray-400 dark:hover:bg-sourceful-gray-800","aria-label":"Toggle menu",children:jsx(Menu,{className:"h-4 w-4"})}),e.length>0&&jsx("nav",{className:"hidden md:flex items-center gap-1.5 text-sm","aria-label":"Breadcrumb",children:e.map((P,V)=>jsxs(M.Fragment,{children:[V>0&&jsx("span",{className:"text-sourceful-gray-400 dark:text-sourceful-gray-500 text-xs",children:"/"}),P.href?jsx(c,{href:P.href,className:"text-sourceful-gray-600 dark:text-sourceful-gray-400 hover:text-sourceful-gray-900 dark:hover:text-white transition-colors text-sm",children:P.label}):jsx("span",{className:"text-sourceful-gray-900 dark:text-white font-medium text-sm",children:P.label})]},V))}),r,jsx("div",{className:"flex-1"}),o&&jsx("div",{className:"flex items-center gap-1.5",children:o})]}));mo.displayName="TopMenu";var po=M.forwardRef(({name:e,email:t,avatarUrl:i,avatarContent:r,avatarClassName:o,children:s,className:c},C)=>{let[P,V]=M.useState(false),H=M.useRef(null);return M.useEffect(()=>{let Q=Z=>{H.current&&!H.current.contains(Z.target)&&V(false);};return P&&document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q);}},[P]),jsx("div",{ref:C,className:a("relative",c),children:jsxs("div",{ref:H,children:[jsx("button",{onClick:()=>V(!P),className:"flex items-center gap-1.5 rounded-full p-0.5 hover:ring-2 hover:ring-sourceful-green-500 hover:ring-offset-2 dark:hover:ring-offset-[#141414] transition-all","aria-label":"Account menu",children:jsx("div",{className:a("h-8 w-8 rounded-full overflow-hidden flex items-center justify-center",o||"bg-gradient-to-br from-sourceful-yellow-400 to-sourceful-yellow-600"),children:i?jsx("img",{src:i,alt:e||"User",className:"h-full w-full object-cover"}):r})}),P&&jsxs("div",{className:"absolute right-0 mt-2 w-64 rounded-lg border border-sourceful-gray-200 dark:border-[#1a1a1a] bg-white dark:bg-[#141414] shadow-lg overflow-hidden z-50",children:[(e||t)&&jsx("div",{className:"px-4 py-3 border-b border-sourceful-gray-200 dark:border-[#1a1a1a]",children:jsxs("div",{className:"flex items-center gap-3",children:[jsx("div",{className:a("h-10 w-10 rounded-full overflow-hidden flex items-center justify-center",o||"bg-gradient-to-br from-sourceful-yellow-400 to-sourceful-yellow-600"),children:i?jsx("img",{src:i,alt:e||"User",className:"h-full w-full object-cover"}):r}),jsxs("div",{className:"flex-1 min-w-0",children:[e&&jsx("p",{className:"text-sm font-medium text-sourceful-gray-900 dark:text-white truncate",children:e}),t&&jsx("p",{className:"text-xs text-sourceful-gray-500 dark:text-sourceful-gray-400 truncate",children:t})]})]})}),s]})]})})});po.displayName="TopMenuUser";var fo=M.forwardRef(({icon:e,children:t,onClick:i,href:r,variant:o="default",className:s},c)=>jsxs(r?"a":"button",{ref:c,onClick:i,href:r,className:a("w-full flex items-center gap-3 px-4 py-2 text-sm transition-colors",{default:"text-sourceful-gray-700 dark:text-sourceful-gray-300 hover:bg-sourceful-gray-50 dark:hover:bg-[#1a1a1a]",danger:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-950/20",success:"text-sourceful-green-600 dark:text-sourceful-green-400 hover:bg-sourceful-green-50 dark:hover:bg-sourceful-green-950/20"}[o],s),children:[e&&jsx("span",{className:"h-4 w-4",children:e}),jsx("span",{children:t})]}));fo.displayName="TopMenuUserItem";var uo=M.forwardRef(({children:e,className:t},i)=>jsx("div",{ref:i,className:a("py-1 border-t border-sourceful-gray-200 dark:border-[#1a1a1a] first:border-t-0",t),children:e}));uo.displayName="TopMenuUserSection";var St=M.createContext(null);function Ct(){let e=M.useContext(St);if(!e)throw new Error("SimpleTabsPanel must be used within SimpleTabs");return e}var vo=M.forwardRef(({tabs:e,activeTab:t,defaultTab:i,onTabChange:r,children:o,className:s,tabsClassName:c},C)=>{var Z;let[P,V]=M.useState(i||((Z=e[0])==null?void 0:Z.id)||""),H=t!=null?t:P,Q=Y=>{V(Y),r==null||r(Y);};return jsx(St.Provider,{value:{activeTab:H,setActiveTab:Q},children:jsxs("div",{ref:C,className:a("space-y-6",s),children:[jsx("div",{className:"border-b border-sourceful-gray-200 dark:border-sourceful-gray-800",children:jsx("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",c),"aria-label":"Tabs",children:e.map(Y=>{let W=H===Y.id;return jsxs("button",{onClick:()=>!Y.disabled&&Q(Y.id),disabled:Y.disabled,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",W?"text-sourceful-green-600 dark:text-sourceful-green-400":"text-sourceful-gray-500 dark:text-sourceful-gray-400 hover:text-sourceful-gray-700 dark:hover:text-sourceful-gray-300",Y.disabled&&"opacity-50 cursor-not-allowed"),children:[Y.icon&&jsx("span",{className:"h-4 w-4",children:Y.icon}),Y.label,W&&jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-sourceful-green-500","aria-hidden":"true"})]},Y.id)})})}),o&&jsx("div",{children:o})]})})});vo.displayName="SimpleTabs";var xo=M.forwardRef(({id:e,children:t,className:i},r)=>{let{activeTab:o}=Ct();return o!==e?null:jsx("div",{ref:r,role:"tabpanel","aria-labelledby":`tab-${e}`,className:i,children:t})});xo.displayName="SimpleTabsPanel";var Po=M.forwardRef(({activeTab:e,defaultTab:t,onTabChange:i,children:r,className:o},s)=>{let[c,C]=M.useState(t||""),P=e!=null?e:c,V=H=>{C(H),i==null||i(H);};return jsx(St.Provider,{value:{activeTab:P,setActiveTab:V},children:jsx("div",{ref:s,className:a("space-y-6",o),children:r})})});Po.displayName="SimpleTabsRoot";var go=M.forwardRef(({children:e,className:t},i)=>jsx("div",{ref:i,className:"border-b border-sourceful-gray-200 dark:border-sourceful-gray-800",children:jsx("nav",{className:a("-mb-px flex gap-1 overflow-x-auto scrollbar-hide",t),role:"tablist","aria-label":"Tabs",children:e})}));go.displayName="SimpleTabsList";var bo=M.forwardRef(({value:e,children:t,icon:i,disabled:r,className:o},s)=>{let{activeTab:c,setActiveTab:C}=Ct(),P=c===e;return jsxs("button",{ref:s,role:"tab",id:`tab-${e}`,"aria-selected":P,"aria-controls":`panel-${e}`,onClick:()=>!r&&C(e),disabled:r,className:a("relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors whitespace-nowrap",P?"text-sourceful-green-600 dark:text-sourceful-green-400":"text-sourceful-gray-500 dark:text-sourceful-gray-400 hover:text-sourceful-gray-700 dark:hover:text-sourceful-gray-300",r&&"opacity-50 cursor-not-allowed",o),children:[i&&jsx("span",{className:"h-4 w-4",children:i}),t,P&&jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-sourceful-green-500","aria-hidden":"true"})]})});bo.displayName="SimpleTabsTrigger";var yo=M.forwardRef(({value:e,children:t,className:i},r)=>{let{activeTab:o}=Ct();return o!==e?null:jsx("div",{ref:r,role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,className:i,children:t})});yo.displayName="SimpleTabsContent";function Fr({children:e}){let t=useRef(null);return useEffect(()=>{let i=new Ir({duration:1.2,easing:o=>Math.min(1,1.001-Math.pow(2,-10*o)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=i;function r(o){i.raf(o),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{i.destroy(),t.current=null;}},[]),jsx(Fragment,{children:e})}var Me=M.createContext(null);function Vr(){let e=M.useContext(Me);if(!e)throw new Error("useDesignSystemTheme must be used within DesignSystemProvider");return {theme:e.theme,setTheme:e.setTheme}}function Wr(){let e=M.useContext(Me);if(!e)throw new Error("useFontMode must be used within DesignSystemProvider");return {fontMode:e.fontMode,setFontMode:e.setFontMode}}function Or(){let e=M.useContext(Me);if(!e)throw new Error("useColorMode must be used within DesignSystemProvider");return {colorMode:e.colorMode,setColorMode:e.setColorMode}}function Ur(){let e=M.useContext(Me);if(!e)throw new Error("useSpacingMode must be used within DesignSystemProvider");return {spacingMode:e.spacingMode,setSpacingMode:e.setSpacingMode}}function $r(){let e=M.useContext(Me);if(!e)throw new Error("useFocusMode must be used within DesignSystemProvider");return {focusMode:e.focusMode,setFocusMode:e.setFocusMode}}function _r(){let e=M.useContext(Me);if(!e)throw new Error("useAccessibility must be used within DesignSystemProvider");return {fontMode:e.fontMode,setFontMode:e.setFontMode,colorMode:e.colorMode,setColorMode:e.setColorMode,spacingMode:e.spacingMode,setSpacingMode:e.setSpacingMode,focusMode:e.focusMode,setFocusMode:e.setFocusMode}}function qr(){let e=M.useContext(Me);if(!e)throw new Error("useDesignSystem must be used within DesignSystemProvider");return e}function Xr({children:e,defaultTheme:t="base",defaultFontMode:i="default",defaultColorMode:r="default",defaultSpacingMode:o="default",defaultFocusMode:s="default",storageKey:c="sourceful-a11y",disableStorage:C=false}){let[P,V]=M.useState(t),[H,Q]=M.useState(i),[Z,Y]=M.useState(r),[W,le]=M.useState(o),[ce,se]=M.useState(s),[K,Xe]=M.useState(false);M.useEffect(()=>{if(Xe(true),!(C||typeof window=="undefined"))try{let ve=localStorage.getItem(c);if(ve){let te=JSON.parse(ve);te.fontMode&&Q(te.fontMode),te.colorMode&&Y(te.colorMode),te.spacingMode&&le(te.spacingMode),te.focusMode&&se(te.focusMode);}}catch(ve){console.warn("Failed to load accessibility preferences:",ve);}},[c,C]),M.useEffect(()=>{K&&document.documentElement.setAttribute("data-theme",P);},[P,K]),M.useEffect(()=>{K&&(H==="default"?document.documentElement.removeAttribute("data-font-mode"):document.documentElement.setAttribute("data-font-mode",H));},[H,K]),M.useEffect(()=>{K&&(Z==="default"?document.documentElement.removeAttribute("data-color-mode"):document.documentElement.setAttribute("data-color-mode",Z));},[Z,K]),M.useEffect(()=>{K&&(W==="default"?document.documentElement.removeAttribute("data-spacing"):document.documentElement.setAttribute("data-spacing",W));},[W,K]),M.useEffect(()=>{K&&(ce==="default"?document.documentElement.removeAttribute("data-focus-mode"):document.documentElement.setAttribute("data-focus-mode",ce));},[ce,K]),M.useEffect(()=>{if(!(!K||C||typeof window=="undefined"))try{localStorage.setItem(c,JSON.stringify({fontMode:H,colorMode:Z,spacingMode:W,focusMode:ce}));}catch(ve){console.warn("Failed to save accessibility preferences:",ve);}},[H,Z,W,ce,c,K,C]);let Je=M.useMemo(()=>({theme:P,setTheme:V,fontMode:H,setFontMode:Q,colorMode:Z,setColorMode:Y,spacingMode:W,setSpacingMode:le,focusMode:ce,setFocusMode:se}),[P,H,Z,W,ce]);return jsx(Me.Provider,{value:Je,children:e})}var he=(e,t)=>t*3+e,p=he(0,0),D=he(1,0),b=he(2,0),y=he(0,1),d=he(1,1),h=he(2,1),x=he(0,2),k=he(1,2),v=he(2,2),Ue={"solo-center":{name:"Solo Center",description:"Center pixel pulses",frames:[{activePixels:[]},{activePixels:[d]},{activePixels:[d]},{activePixels:[]}]},"solo-tl":{name:"Solo Top-Left",description:"Top-left pixel pulses",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p]},{activePixels:[]}]},"solo-br":{name:"Solo Bottom-Right",description:"Bottom-right pixel pulses",frames:[{activePixels:[]},{activePixels:[v]},{activePixels:[v]},{activePixels:[]}]},"line-h-top":{name:"Horizontal Top",description:"Top row lights up left to right",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,D]},{activePixels:[p,D,b]},{activePixels:[D,b]},{activePixels:[b]},{activePixels:[]}]},"line-h-mid":{name:"Horizontal Middle",description:"Middle row lights up left to right",frames:[{activePixels:[]},{activePixels:[y]},{activePixels:[y,d]},{activePixels:[y,d,h]},{activePixels:[d,h]},{activePixels:[h]},{activePixels:[]}]},"line-h-bot":{name:"Horizontal Bottom",description:"Bottom row lights up left to right",frames:[{activePixels:[]},{activePixels:[x]},{activePixels:[x,k]},{activePixels:[x,k,v]},{activePixels:[k,v]},{activePixels:[v]},{activePixels:[]}]},"line-v-left":{name:"Vertical Left",description:"Left column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,y]},{activePixels:[p,y,x]},{activePixels:[y,x]},{activePixels:[x]},{activePixels:[]}]},"line-v-mid":{name:"Vertical Middle",description:"Middle column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[D]},{activePixels:[D,d]},{activePixels:[D,d,k]},{activePixels:[d,k]},{activePixels:[k]},{activePixels:[]}]},"line-v-right":{name:"Vertical Right",description:"Right column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,h]},{activePixels:[b,h,v]},{activePixels:[h,v]},{activePixels:[v]},{activePixels:[]}]},"line-diag-1":{name:"Diagonal TL-BR",description:"Diagonal from top-left to bottom-right",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,d]},{activePixels:[p,d,v]},{activePixels:[d,v]},{activePixels:[v]},{activePixels:[]}]},"line-diag-2":{name:"Diagonal TR-BL",description:"Diagonal from top-right to bottom-left",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,d]},{activePixels:[b,d,x]},{activePixels:[d,x]},{activePixels:[x]},{activePixels:[]}]},"corners-sync":{name:"Corners Sync",description:"All corners pulse together",frames:[{activePixels:[]},{activePixels:[p,b,x,v]},{activePixels:[p,b,x,v]},{activePixels:[]}]},"corners-only":{name:"Corners Clockwise",description:"Corners light up clockwise",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,b]},{activePixels:[b]},{activePixels:[b,v]},{activePixels:[v]},{activePixels:[v,x]},{activePixels:[x]},{activePixels:[x,p]},{activePixels:[]}],cycleDuration:2e3},"L-tl":{name:"L Top-Left",description:"L shape in top-left corner",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,y]},{activePixels:[p,y,d]},{activePixels:[p,y,d]},{activePixels:[y,d]},{activePixels:[d]},{activePixels:[]}]},"L-tr":{name:"L Top-Right",description:"L shape in top-right corner",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,h]},{activePixels:[b,h,d]},{activePixels:[b,h,d]},{activePixels:[h,d]},{activePixels:[d]},{activePixels:[]}]},"L-bl":{name:"L Bottom-Left",description:"L shape in bottom-left corner",frames:[{activePixels:[]},{activePixels:[x]},{activePixels:[x,y]},{activePixels:[x,y,d]},{activePixels:[x,y,d]},{activePixels:[y,d]},{activePixels:[d]},{activePixels:[]}]},"L-br":{name:"L Bottom-Right",description:"L shape in bottom-right corner",frames:[{activePixels:[]},{activePixels:[v]},{activePixels:[v,h]},{activePixels:[v,h,d]},{activePixels:[v,h,d]},{activePixels:[h,d]},{activePixels:[d]},{activePixels:[]}]},"T-top":{name:"T Top",description:"T shape pointing down",frames:[{activePixels:[]},{activePixels:[D]},{activePixels:[p,D,b]},{activePixels:[p,D,b,d]},{activePixels:[p,D,b,d]},{activePixels:[D,d]},{activePixels:[d]},{activePixels:[]}]},"T-bot":{name:"T Bottom",description:"T shape pointing up",frames:[{activePixels:[]},{activePixels:[k]},{activePixels:[x,k,v]},{activePixels:[x,k,v,d]},{activePixels:[x,k,v,d]},{activePixels:[k,d]},{activePixels:[d]},{activePixels:[]}]},"T-left":{name:"T Left",description:"T shape pointing right",frames:[{activePixels:[]},{activePixels:[y]},{activePixels:[p,y,x]},{activePixels:[p,y,x,d]},{activePixels:[p,y,x,d]},{activePixels:[y,d]},{activePixels:[d]},{activePixels:[]}]},"T-right":{name:"T Right",description:"T shape pointing left",frames:[{activePixels:[]},{activePixels:[h]},{activePixels:[b,h,v]},{activePixels:[b,h,v,d]},{activePixels:[b,h,v,d]},{activePixels:[h,d]},{activePixels:[d]},{activePixels:[]}]},"duo-h":{name:"Duo Horizontal",description:"Two horizontal pixels pulse",frames:[{activePixels:[]},{activePixels:[y]},{activePixels:[y,h]},{activePixels:[y,h]},{activePixels:[h]},{activePixels:[]}]},"duo-v":{name:"Duo Vertical",description:"Two vertical pixels pulse",frames:[{activePixels:[]},{activePixels:[D]},{activePixels:[D,k]},{activePixels:[D,k]},{activePixels:[k]},{activePixels:[]}]},"duo-diag":{name:"Duo Diagonal",description:"Diagonal pair pulses",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,v]},{activePixels:[p,v]},{activePixels:[v]},{activePixels:[]}]},frame:{name:"Frame",description:"Outer pixels light up clockwise",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,D]},{activePixels:[D,b]},{activePixels:[b,h]},{activePixels:[h,v]},{activePixels:[v,k]},{activePixels:[k,x]},{activePixels:[x,y]},{activePixels:[y,p]},{activePixels:[p]},{activePixels:[]}],cycleDuration:2e3},"frame-sync":{name:"Frame Sync",description:"All outer pixels pulse together",frames:[{activePixels:[]},{activePixels:[p,D,b,y,h,x,k,v]},{activePixels:[p,D,b,y,h,x,k,v]},{activePixels:[]}]},"plus-hollow":{name:"Plus",description:"Plus/cross shape lights up",frames:[{activePixels:[]},{activePixels:[d]},{activePixels:[D,d,k]},{activePixels:[D,y,d,h,k]},{activePixels:[D,y,d,h,k]},{activePixels:[D,d,k]},{activePixels:[d]},{activePixels:[]}]},"sparse-1":{name:"Sparse 1",description:"Scattered pattern variation 1",frames:[{activePixels:[]},{activePixels:[p]},{activePixels:[p,h]},{activePixels:[p,h,k]},{activePixels:[p,h,k]},{activePixels:[h,k]},{activePixels:[k]},{activePixels:[]}]},"sparse-2":{name:"Sparse 2",description:"Scattered pattern variation 2",frames:[{activePixels:[]},{activePixels:[D]},{activePixels:[D,x]},{activePixels:[D,x,v]},{activePixels:[D,x,v]},{activePixels:[x,v]},{activePixels:[v]},{activePixels:[]}]},"sparse-3":{name:"Sparse 3",description:"Scattered pattern variation 3",frames:[{activePixels:[]},{activePixels:[b]},{activePixels:[b,y]},{activePixels:[b,y,x]},{activePixels:[b,y,x]},{activePixels:[y,x]},{activePixels:[x]},{activePixels:[]}]}},ho=Object.keys(Ue),tt={Solo:["solo-center","solo-tl","solo-br"],"Horizontal Lines":["line-h-top","line-h-mid","line-h-bot"],"Vertical Lines":["line-v-left","line-v-mid","line-v-right"],"Diagonal Lines":["line-diag-1","line-diag-2"],Corners:["corners-sync","corners-only"],"L-Shapes":["L-tl","L-tr","L-bl","L-br"],"T-Shapes":["T-top","T-bot","T-left","T-right"],Duos:["duo-h","duo-v","duo-diag"],Frame:["frame","frame-sync"],Plus:["plus-hollow"],Sparse:["sparse-1","sparse-2","sparse-3"]};var ee=(e,t)=>t*4+e,N=ee(0,0),E=ee(1,0),G=ee(2,0),z=ee(3,0),O=ee(0,1),w=ee(1,1),T=ee(2,1),U=ee(3,1),$=ee(0,2),S=ee(1,2),R=ee(2,2),_=ee(3,2),B=ee(0,3),I=ee(1,3),F=ee(2,3),L=ee(3,3),Nt={"solo-center":{name:"Solo Center",description:"Center pixels pulse",frames:[{activePixels:[]},{activePixels:[w,T,S,R]},{activePixels:[w,T,S,R]},{activePixels:[]}]},"solo-tl":{name:"Solo Top-Left",description:"Top-left pixel pulses",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N]},{activePixels:[]}]},"solo-br":{name:"Solo Bottom-Right",description:"Bottom-right pixel pulses",frames:[{activePixels:[]},{activePixels:[L]},{activePixels:[L]},{activePixels:[]}]},"line-h-top":{name:"Horizontal Top",description:"Top row lights up left to right",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N,E]},{activePixels:[N,E,G]},{activePixels:[N,E,G,z]},{activePixels:[E,G,z]},{activePixels:[G,z]},{activePixels:[z]},{activePixels:[]}]},"line-h-mid":{name:"Horizontal Middle",description:"Middle rows light up left to right",frames:[{activePixels:[]},{activePixels:[O,$]},{activePixels:[O,$,w,S]},{activePixels:[O,$,w,S,T,R]},{activePixels:[O,$,w,S,T,R,U,_]},{activePixels:[w,S,T,R,U,_]},{activePixels:[T,R,U,_]},{activePixels:[U,_]},{activePixels:[]}]},"line-h-bot":{name:"Horizontal Bottom",description:"Bottom row lights up left to right",frames:[{activePixels:[]},{activePixels:[B]},{activePixels:[B,I]},{activePixels:[B,I,F]},{activePixels:[B,I,F,L]},{activePixels:[I,F,L]},{activePixels:[F,L]},{activePixels:[L]},{activePixels:[]}]},"line-v-left":{name:"Vertical Left",description:"Left column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N,O]},{activePixels:[N,O,$]},{activePixels:[N,O,$,B]},{activePixels:[O,$,B]},{activePixels:[$,B]},{activePixels:[B]},{activePixels:[]}]},"line-v-mid":{name:"Vertical Middle",description:"Middle columns light up top to bottom",frames:[{activePixels:[]},{activePixels:[E,G]},{activePixels:[E,G,w,T]},{activePixels:[E,G,w,T,S,R]},{activePixels:[E,G,w,T,S,R,I,F]},{activePixels:[w,T,S,R,I,F]},{activePixels:[S,R,I,F]},{activePixels:[I,F]},{activePixels:[]}]},"line-v-right":{name:"Vertical Right",description:"Right column lights up top to bottom",frames:[{activePixels:[]},{activePixels:[z]},{activePixels:[z,U]},{activePixels:[z,U,_]},{activePixels:[z,U,_,L]},{activePixels:[U,_,L]},{activePixels:[_,L]},{activePixels:[L]},{activePixels:[]}]},"line-diag-1":{name:"Diagonal TL-BR",description:"Diagonal from top-left to bottom-right",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N,w]},{activePixels:[N,w,R]},{activePixels:[N,w,R,L]},{activePixels:[w,R,L]},{activePixels:[R,L]},{activePixels:[L]},{activePixels:[]}]},"line-diag-2":{name:"Diagonal TR-BL",description:"Diagonal from top-right to bottom-left",frames:[{activePixels:[]},{activePixels:[z]},{activePixels:[z,T]},{activePixels:[z,T,S]},{activePixels:[z,T,S,B]},{activePixels:[T,S,B]},{activePixels:[S,B]},{activePixels:[B]},{activePixels:[]}]},"corners-sync":{name:"Corners Sync",description:"All corners pulse together",frames:[{activePixels:[]},{activePixels:[N,z,B,L]},{activePixels:[N,z,B,L]},{activePixels:[]}]},"corners-only":{name:"Corners Clockwise",description:"Corners light up clockwise",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N,z]},{activePixels:[z]},{activePixels:[z,L]},{activePixels:[L]},{activePixels:[L,B]},{activePixels:[B]},{activePixels:[B,N]},{activePixels:[]}],cycleDuration:2e3},frame:{name:"Frame",description:"Outer pixels light up clockwise",frames:[{activePixels:[]},{activePixels:[N]},{activePixels:[N,E]},{activePixels:[E,G]},{activePixels:[G,z]},{activePixels:[z,U]},{activePixels:[U,_]},{activePixels:[_,L]},{activePixels:[L,F]},{activePixels:[F,I]},{activePixels:[I,B]},{activePixels:[B,$]},{activePixels:[$,O]},{activePixels:[O,N]},{activePixels:[N]},{activePixels:[]}],cycleDuration:2500},"frame-sync":{name:"Frame Sync",description:"All outer pixels pulse together",frames:[{activePixels:[]},{activePixels:[N,E,G,z,O,U,$,_,B,I,F,L]},{activePixels:[N,E,G,z,O,U,$,_,B,I,F,L]},{activePixels:[]}]},"plus-hollow":{name:"Plus",description:"Plus/cross shape lights up",frames:[{activePixels:[]},{activePixels:[w,T,S,R]},{activePixels:[E,G,w,T,S,R,I,F]},{activePixels:[E,G,O,$,w,T,S,R,U,_,I,F]},{activePixels:[E,G,O,$,w,T,S,R,U,_,I,F]},{activePixels:[E,G,w,T,S,R,I,F]},{activePixels:[w,T,S,R]},{activePixels:[]}]},"square-inner":{name:"Inner Square",description:"Inner 2x2 square pulses",frames:[{activePixels:[]},{activePixels:[w]},{activePixels:[w,T]},{activePixels:[w,T,R]},{activePixels:[w,T,S,R]},{activePixels:[w,T,S,R]},{activePixels:[T,S,R]},{activePixels:[S,R]},{activePixels:[R]},{activePixels:[]}]},"square-outer":{name:"Outer Square",description:"Outer frame expands from center",frames:[{activePixels:[]},{activePixels:[w,T,S,R]},{activePixels:[E,G,O,w,T,U,$,S,R,_,I,F]},{activePixels:[N,E,G,z,O,U,$,_,B,I,F,L]},{activePixels:[N,E,G,z,O,U,$,_,B,I,F,L]},{activePixels:[E,G,O,w,T,U,$,S,R,_,I,F]},{activePixels:[w,T,S,R]},{activePixels:[]}]},"cross-full":{name:"Cross Full",description:"Full cross pattern",frames:[{activePixels:[]},{activePixels:[E,G,w,T,S,R,I,F,O,$,U,_]},{activePixels:[E,G,w,T,S,R,I,F,O,$,U,_]},{activePixels:[]}]},"cross-spin":{name:"Cross Spin",description:"Cross pattern rotates",frames:[{activePixels:[E,G,I,F]},{activePixels:[E,G,I,F,z,L]},{activePixels:[O,$,U,_]},{activePixels:[O,$,U,_,N,B]},{activePixels:[E,G,I,F]}],cycleDuration:2e3}},Ro={Solo:["solo-center","solo-tl","solo-br"],"Horizontal Lines":["line-h-top","line-h-mid","line-h-bot"],"Vertical Lines":["line-v-left","line-v-mid","line-v-right"],"Diagonal Lines":["line-diag-1","line-diag-2"],Corners:["corners-sync","corners-only"],Frame:["frame","frame-sync"],Plus:["plus-hollow"],Squares:["square-inner","square-outer"],Cross:["cross-full","cross-spin"]};var f=(e,t)=>t*6+e,He=f(0,0),$e=f(5,0),_e=f(0,5),Ae=f(5,5),wo=e=>Array.from({length:6},(t,i)=>f(i,e)),To=e=>Array.from({length:6},(t,i)=>f(e,i)),it=[...wo(0),...wo(5),...To(0).slice(1,5),...To(5).slice(1,5)],So=[f(1,1),f(2,1),f(3,1),f(4,1),f(1,4),f(2,4),f(3,4),f(4,4),f(1,2),f(1,3),f(4,2),f(4,3)],pe=[f(2,2),f(3,2),f(2,3),f(3,3)],Mt={"solo-center":{name:"Solo Center",description:"Center 2x2 pixels pulse",frames:[{activePixels:[]},{activePixels:pe},{activePixels:pe},{activePixels:[]}]},"solo-tl":{name:"Solo Top-Left",description:"Top-left pixel pulses",frames:[{activePixels:[]},{activePixels:[He]},{activePixels:[He]},{activePixels:[]}]},"solo-br":{name:"Solo Bottom-Right",description:"Bottom-right pixel pulses",frames:[{activePixels:[]},{activePixels:[Ae]},{activePixels:[Ae]},{activePixels:[]}]},"line-h-top":{name:"Horizontal Top",description:"Top row lights up left to right",frames:[{activePixels:[]},{activePixels:[0]},{activePixels:[0,1]},{activePixels:[0,1,2]},{activePixels:[0,1,2,3]},{activePixels:[0,1,2,3,4]},{activePixels:[0,1,2,3,4,5]},{activePixels:[1,2,3,4,5]},{activePixels:[2,3,4,5]},{activePixels:[3,4,5]},{activePixels:[4,5]},{activePixels:[5]},{activePixels:[]}]},"line-h-mid":{name:"Horizontal Middle",description:"Middle rows light up",frames:[{activePixels:[]},{activePixels:[12,18]},{activePixels:[12,13,18,19]},{activePixels:[12,13,14,18,19,20]},{activePixels:[12,13,14,15,18,19,20,21]},{activePixels:[12,13,14,15,16,18,19,20,21,22]},{activePixels:[12,13,14,15,16,17,18,19,20,21,22,23]},{activePixels:[13,14,15,16,17,19,20,21,22,23]},{activePixels:[14,15,16,17,20,21,22,23]},{activePixels:[15,16,17,21,22,23]},{activePixels:[16,17,22,23]},{activePixels:[17,23]},{activePixels:[]}]},"line-h-bot":{name:"Horizontal Bottom",description:"Bottom row lights up left to right",frames:[{activePixels:[]},{activePixels:[30]},{activePixels:[30,31]},{activePixels:[30,31,32]},{activePixels:[30,31,32,33]},{activePixels:[30,31,32,33,34]},{activePixels:[30,31,32,33,34,35]},{activePixels:[31,32,33,34,35]},{activePixels:[32,33,34,35]},{activePixels:[33,34,35]},{activePixels:[34,35]},{activePixels:[35]},{activePixels:[]}]},"line-v-left":{name:"Vertical Left",description:"Left column lights up",frames:[{activePixels:[]},{activePixels:[0]},{activePixels:[0,6]},{activePixels:[0,6,12]},{activePixels:[0,6,12,18]},{activePixels:[0,6,12,18,24]},{activePixels:[0,6,12,18,24,30]},{activePixels:[6,12,18,24,30]},{activePixels:[12,18,24,30]},{activePixels:[18,24,30]},{activePixels:[24,30]},{activePixels:[30]},{activePixels:[]}]},"line-v-mid":{name:"Vertical Middle",description:"Middle columns light up",frames:[{activePixels:[]},{activePixels:[2,3]},{activePixels:[2,3,8,9]},{activePixels:[2,3,8,9,14,15]},{activePixels:[2,3,8,9,14,15,20,21]},{activePixels:[2,3,8,9,14,15,20,21,26,27]},{activePixels:[2,3,8,9,14,15,20,21,26,27,32,33]},{activePixels:[8,9,14,15,20,21,26,27,32,33]},{activePixels:[14,15,20,21,26,27,32,33]},{activePixels:[20,21,26,27,32,33]},{activePixels:[26,27,32,33]},{activePixels:[32,33]},{activePixels:[]}]},"line-v-right":{name:"Vertical Right",description:"Right column lights up",frames:[{activePixels:[]},{activePixels:[5]},{activePixels:[5,11]},{activePixels:[5,11,17]},{activePixels:[5,11,17,23]},{activePixels:[5,11,17,23,29]},{activePixels:[5,11,17,23,29,35]},{activePixels:[11,17,23,29,35]},{activePixels:[17,23,29,35]},{activePixels:[23,29,35]},{activePixels:[29,35]},{activePixels:[35]},{activePixels:[]}]},"line-diag-1":{name:"Diagonal TL-BR",description:"Diagonal from top-left to bottom-right",frames:[{activePixels:[]},{activePixels:[0]},{activePixels:[0,7]},{activePixels:[0,7,14]},{activePixels:[0,7,14,21]},{activePixels:[0,7,14,21,28]},{activePixels:[0,7,14,21,28,35]},{activePixels:[7,14,21,28,35]},{activePixels:[14,21,28,35]},{activePixels:[21,28,35]},{activePixels:[28,35]},{activePixels:[35]},{activePixels:[]}]},"line-diag-2":{name:"Diagonal TR-BL",description:"Diagonal from top-right to bottom-left",frames:[{activePixels:[]},{activePixels:[5]},{activePixels:[5,10]},{activePixels:[5,10,15]},{activePixels:[5,10,15,20]},{activePixels:[5,10,15,20,25]},{activePixels:[5,10,15,20,25,30]},{activePixels:[10,15,20,25,30]},{activePixels:[15,20,25,30]},{activePixels:[20,25,30]},{activePixels:[25,30]},{activePixels:[30]},{activePixels:[]}]},"corners-sync":{name:"Corners Sync",description:"All corners pulse together",frames:[{activePixels:[]},{activePixels:[He,$e,_e,Ae]},{activePixels:[He,$e,_e,Ae]},{activePixels:[]}]},"corners-only":{name:"Corners Clockwise",description:"Corners light up clockwise",frames:[{activePixels:[]},{activePixels:[He]},{activePixels:[He,$e]},{activePixels:[$e]},{activePixels:[$e,Ae]},{activePixels:[Ae]},{activePixels:[Ae,_e]},{activePixels:[_e]},{activePixels:[_e,He]},{activePixels:[]}],cycleDuration:2e3},frame:{name:"Frame",description:"Outer pixels light up clockwise",frames:[{activePixels:[]},{activePixels:[0]},{activePixels:[0,1]},{activePixels:[1,2]},{activePixels:[2,3]},{activePixels:[3,4]},{activePixels:[4,5]},{activePixels:[5,11]},{activePixels:[11,17]},{activePixels:[17,23]},{activePixels:[23,29]},{activePixels:[29,35]},{activePixels:[35,34]},{activePixels:[34,33]},{activePixels:[33,32]},{activePixels:[32,31]},{activePixels:[31,30]},{activePixels:[30,24]},{activePixels:[24,18]},{activePixels:[18,12]},{activePixels:[12,6]},{activePixels:[6,0]},{activePixels:[]}],cycleDuration:3e3},"frame-sync":{name:"Frame Sync",description:"All outer pixels pulse together",frames:[{activePixels:[]},{activePixels:it},{activePixels:it},{activePixels:[]}]},"plus-hollow":{name:"Plus",description:"Plus/cross shape lights up",frames:[{activePixels:[]},{activePixels:pe},{activePixels:[...pe,8,9,26,27,13,16,19,22]},{activePixels:[...pe,2,3,8,9,26,27,32,33,12,17,13,16,19,22,18,23]},{activePixels:[...pe,2,3,8,9,26,27,32,33,12,17,13,16,19,22,18,23]},{activePixels:[...pe,8,9,26,27,13,16,19,22]},{activePixels:pe},{activePixels:[]}]},ripple:{name:"Ripple",description:"Expanding ripple from center",frames:[{activePixels:[]},{activePixels:pe},{activePixels:So},{activePixels:it},{activePixels:it},{activePixels:So},{activePixels:pe},{activePixels:[]}],cycleDuration:2e3},spiral:{name:"Spiral",description:"Spiral from outside to center",frames:[{activePixels:[]},{activePixels:[0]},{activePixels:[0,1,2,3,4,5]},{activePixels:[0,1,2,3,4,5,11,17,23,29,35]},{activePixels:[0,1,2,3,4,5,11,17,23,29,35,34,33,32,31,30]},{activePixels:[0,1,2,3,4,5,11,17,23,29,35,34,33,32,31,30,24,18,12,6]},{activePixels:[7,8,9,10,16,22,28,27,26,25,19,13]},{activePixels:[14,15,21,20]},{activePixels:[14,15,21,20]},{activePixels:[]}],cycleDuration:3e3},checkerboard:{name:"Checkerboard",description:"Alternating checkerboard pattern",frames:[{activePixels:[]},{activePixels:[0,2,4,7,9,11,12,14,16,19,21,23,24,26,28,31,33,35]},{activePixels:[0,2,4,7,9,11,12,14,16,19,21,23,24,26,28,31,33,35]},{activePixels:[1,3,5,6,8,10,13,15,17,18,20,22,25,27,29,30,32,34]},{activePixels:[1,3,5,6,8,10,13,15,17,18,20,22,25,27,29,30,32,34]},{activePixels:[]}],cycleDuration:2e3},diamond:{name:"Diamond",description:"Diamond shape expands",frames:[{activePixels:[]},{activePixels:pe},{activePixels:[8,9,13,16,19,22,26,27]},{activePixels:[2,3,7,10,12,17,18,23,25,28,32,33]},{activePixels:[2,3,7,10,12,17,18,23,25,28,32,33]},{activePixels:[8,9,13,16,19,22,26,27]},{activePixels:pe},{activePixels:[]}]},wave:{name:"Wave",description:"Wave moving across grid",frames:[{activePixels:[0,6,12,18,24,30]},{activePixels:[0,1,6,7,12,13,18,19,24,25,30,31]},{activePixels:[1,2,7,8,13,14,19,20,25,26,31,32]},{activePixels:[2,3,8,9,14,15,20,21,26,27,32,33]},{activePixels:[3,4,9,10,15,16,21,22,27,28,33,34]},{activePixels:[4,5,10,11,16,17,22,23,28,29,34,35]},{activePixels:[5,11,17,23,29,35]},{activePixels:[]}],cycleDuration:1500}},Co={Solo:["solo-center","solo-tl","solo-br"],"Horizontal Lines":["line-h-top","line-h-mid","line-h-bot"],"Vertical Lines":["line-v-left","line-v-mid","line-v-right"],"Diagonal Lines":["line-diag-1","line-diag-2"],Corners:["corners-sync","corners-only"],Frame:["frame","frame-sync"],Plus:["plus-hollow"],"6x6 Special":["ripple","spiral","checkerboard","diamond","wave"]};var Qr={slow:2e3,normal:1500,fast:1e3},Yr={sm:{pixel:6,gap:2},md:{pixel:10,gap:3},lg:{pixel:14,gap:4}};function Zr(e){switch(e){case 4:return Nt;case 6:return Mt;default:return Ue}}function Re({pattern:e,dimension:t=3,color:i="green",speed:r="normal",size:o="md",animated:s=true,paused:c=false,className:C,showLabel:P=false}){var ve;let[V,H]=M.useState(0),[Q,Z]=M.useState(new Set),W=Zr(t)[e];if(!W)return console.warn(`Pattern "${e}" not found for ${t}x${t} grid`),null;let ce=((ve=W.cycleDuration)!=null?ve:Qr[r])/W.frames.length,se=t*t;M.useEffect(()=>{if(!s||c)return;let te=setInterval(()=>{H(De=>(De+1)%W.frames.length);},ce);return ()=>clearInterval(te)},[s,c,ce,W.frames.length]),M.useEffect(()=>{if(s){let te=W.frames[V];Z(new Set(te.activePixels));}else {let te=W.frames.reduce((De,At)=>At.activePixels.length>De.activePixels.length?At:De);Z(new Set(te.activePixels));}},[s,V,W.frames]);let{pixel:K,gap:Xe}=Yr[o],Je=K*t+Xe*(t-1);return jsxs("div",{className:a("pixel-grid-wrapper",C),children:[jsx("div",{className:a("pixel-grid-container",`pixel-grid-${i}`,`pixel-grid-${t}x${t}`),style:{width:Je,height:Je,gap:Xe,gridTemplateColumns:`repeat(${t}, 1fr)`,"--pixel-size":`${K}px`},role:"img","aria-label":`${s?"Animated":"Static"} pixel grid: ${W.name}`,children:Array.from({length:se},(te,De)=>jsx("div",{className:a("pixel-grid-pixel",{"pixel-active":Q.has(De)}),style:{width:K,height:K}},De))}),P&&jsx("span",{className:"pixel-grid-label font-mono",children:e})]})}Re.displayName="PixelGrid";function jr(e){switch(e){case 4:return Ro;case 6:return Co;default:return tt}}function kt({dimension:e=3,color:t="green",size:i="md",animated:r=true,showCategories:o=true,categories:s,className:c}){let C=jr(e),P=s?Object.entries(C).filter(([V])=>s.includes(V)):Object.entries(C);return jsx("div",{className:a("pixel-grid-showcase",c),children:o?jsx("div",{className:"space-y-8",children:P.map(([V,H])=>jsxs("div",{children:[jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-4",children:V}),jsx("div",{className:"flex flex-wrap gap-6",children:H.map(Q=>jsx(Re,{pattern:Q,dimension:e,color:t,size:i,animated:r,showLabel:true},Q))})]},V))}):jsx("div",{className:"flex flex-wrap gap-6",children:P.flatMap(([V,H])=>H.map(Q=>jsx(Re,{pattern:Q,dimension:e,color:t,size:i,animated:r,showLabel:true},Q)))})})}kt.displayName="PixelGridShowcase";function Lt({pattern:e,dimension:t=3,size:i="md",animated:r=true,className:o}){let s=["blue","pink","green"];return jsx("div",{className:a("flex gap-6 items-center",o),children:s.map(c=>jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsx(Re,{pattern:e,dimension:t,color:c,size:i,animated:r}),jsx("span",{className:"text-xs text-muted-foreground font-mono",children:c})]},c))})}Lt.displayName="PixelGridColorComparison";function Ht({pattern:e,dimension:t=3,color:i="green",animated:r=true,className:o}){let s=["sm","md","lg"];return jsx("div",{className:a("flex gap-6 items-end",o),children:s.map(c=>jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsx(Re,{pattern:e,dimension:t,color:i,size:c,animated:r}),jsx("span",{className:"text-xs text-muted-foreground font-mono",children:c})]},c))})}Ht.displayName="PixelGridSizeComparison";export{Eo as Accordion,Bt as AccordionContent,Ft as AccordionItem,zt as AccordionTrigger,Vt as Alert,Ot as AlertDescription,Wt as AlertTitle,Bo as Badge,qt as Button,Xt as Card,Zt as CardContent,Yt as CardDescription,Kt as CardFooter,Jt as CardHeader,Qt as CardTitle,ei as Checkbox,Xr as DesignSystemProvider,qo as Dialog,Jo as DialogClose,ii as DialogContent,si as DialogDescription,ri as DialogFooter,oi as DialogHeader,st as DialogOverlay,ti as DialogPortal,ai as DialogTitle,Xo as DialogTrigger,Ko as DropdownMenu,mi as DropdownMenuCheckboxItem,ci as DropdownMenuContent,er as DropdownMenuGroup,di as DropdownMenuItem,fi as DropdownMenuLabel,tr as DropdownMenuPortal,or as DropdownMenuRadioGroup,pi as DropdownMenuRadioItem,ui as DropdownMenuSeparator,vi as DropdownMenuShortcut,ir as DropdownMenuSub,li as DropdownMenuSubContent,ni as DropdownMenuSubTrigger,jo as DropdownMenuTrigger,Pi as Input,bi as Label,Fr as LenisProvider,Re as PixelGrid,Lt as PixelGridColorComparison,kt as PixelGridShowcase,Ht as PixelGridSizeComparison,Ri as Progress,wi as RadioGroup,Ti as RadioGroupItem,Si as ScrollArea,mt as ScrollBar,pr as Select,Mi as SelectContent,fr as SelectGroup,ki as SelectItem,Di as SelectLabel,ft as SelectScrollDownButton,pt as SelectScrollUpButton,Li as SelectSeparator,Ni as SelectTrigger,ur as SelectValue,Ai as Separator,gr as Sheet,yr as SheetClose,Gi as SheetContent,Bi as SheetDescription,Fi as SheetFooter,Ii as SheetHeader,Pt as SheetOverlay,Ei as SheetPortal,zi as SheetTitle,br as SheetTrigger,co as SideMenu,vo as SimpleTabs,yo as SimpleTabsContent,go as SimpleTabsList,xo as SimpleTabsPanel,Po as SimpleTabsRoot,bo as SimpleTabsTrigger,Rr as Skeleton,Wi as Slider,$i as Switch,_i as Table,Xi as TableBody,Ki as TableCaption,Zi as TableCell,Ji as TableFooter,Yi as TableHead,qi as TableHeader,Qi as TableRow,Sr as Tabs,to as TabsContent,ji as TabsList,eo as TabsTrigger,oo as Textarea,ht as Tooltip,et as TooltipContent,yt as TooltipProvider,Rt as TooltipTrigger,mo as TopMenu,po as TopMenuUser,fo as TopMenuUserItem,uo as TopMenuUserSection,Ut as badgeVariants,_t as buttonVariants,a as cn,tt as patternCategories,ho as patternNames,Ue as patterns,_r as useAccessibility,Or as useColorMode,qr as useDesignSystem,Vr as useDesignSystemTheme,$r as useFocusMode,Wr as useFontMode,Ur as useSpacingMode};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map