@craftzbay/ui 0.1.0 → 0.2.0
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-lib/components/ui/Calendar.d.ts +9 -0
- package/dist-lib/components/ui/Carousel.d.ts +23 -0
- package/dist-lib/components/ui/Chart.d.ts +23 -0
- package/dist-lib/components/ui/Drawer.d.ts +15 -0
- package/dist-lib/components/ui/FileUpload.d.ts +23 -0
- package/dist-lib/components/ui/Snackbar.d.ts +21 -0
- package/dist-lib/components/ui/TagInput.d.ts +24 -0
- package/dist-lib/components/ui/Timeline.d.ts +23 -0
- package/dist-lib/components/ui/Tree.d.ts +24 -0
- package/dist-lib/index.cjs +4 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.d.ts +9 -0
- package/dist-lib/index.js +4753 -1936
- package/dist-lib/index.js.map +1 -1
- package/package.json +15 -14
package/dist-lib/index.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qr=require("clsx"),Yr=require("tailwind-merge"),i=require("react"),d=require("lucide-react"),e=require("react/jsx-runtime"),Jr=require("@radix-ui/react-accordion"),O=require("class-variance-authority"),Zr=require("@radix-ui/react-avatar"),ht=require("@radix-ui/react-slot"),es=require("@radix-ui/react-checkbox"),ts=require("@radix-ui/react-popover"),R=require("cmdk"),rs=require("@radix-ui/react-dialog"),ss=require("@radix-ui/react-context-menu"),as=require("@radix-ui/react-dropdown-menu"),bt=require("react-day-picker"),ns=require("@radix-ui/react-label"),Ee=require("react-hook-form"),os=require("@radix-ui/react-select"),is=require("@radix-ui/react-progress"),ls=require("@radix-ui/react-radio-group"),ds=require("@radix-ui/react-scroll-area"),cs=require("@radix-ui/react-separator"),us=require("@radix-ui/react-slider"),ms=require("@radix-ui/react-switch"),xs=require("@radix-ui/react-tabs"),fs=require("@radix-ui/react-toast"),gs=require("@radix-ui/react-tooltip");function T(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const fe=T(Jr),Le=T(Zr),ut=T(es),k=T(ts),C=T(rs),I=T(ss),D=T(as),ps=T(ns),z=T(os),mt=T(is),Be=T(ls),ue=T(ds),hs=T(cs),be=T(us),xt=T(ms),Ce=T(xs),oe=T(fs),ge=T(gs);function l(...a){return Yr.twMerge(Qr.clsx(a))}let ft=0;function bs(a="ds"){return ft+=1,`${a}-${ft}`}function vt(a){const[t,r]=i.useState(()=>typeof window>"u"?!1:window.matchMedia(a).matches);return i.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(a),n=o=>r(o.matches);return r(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[a]),t}function vs(){return vt("(prefers-reduced-motion: reduce)")}const re={toasts:[],listeners:new Set,emit(){for(const a of this.listeners)a(this.toasts)},push(a){const t=a.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...a,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(a){this.toasts=this.toasts.map(t=>t.id===a?{...t,open:!1}:t),this.emit()},remove(a){this.toasts=this.toasts.filter(t=>t.id!==a),this.emit()}};function js(){const[a,t]=i.useState(()=>[...re.toasts]);i.useEffect(()=>{const o=c=>t([...c]);return re.listeners.add(o),()=>{re.listeners.delete(o)}},[]);const r=i.useCallback(o=>re.push(o),[]),s=i.useCallback(o=>re.dismiss(o),[]),n=i.useCallback(o=>re.remove(o),[]);return{toasts:a,push:r,dismiss:s,remove:n}}const Ns=a=>re.push(a),ws=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:d.AlertCircle,AlertTriangle:d.AlertTriangle,ArrowDown:d.ArrowDown,ArrowLeft:d.ArrowLeft,ArrowRight:d.ArrowRight,ArrowUp:d.ArrowUp,ArrowUpDown:d.ArrowUpDown,Bell:d.Bell,Calendar:d.Calendar,Check:d.Check,CheckCircle2:d.CheckCircle2,ChevronDown:d.ChevronDown,ChevronLeft:d.ChevronLeft,ChevronRight:d.ChevronRight,ChevronUp:d.ChevronUp,ChevronsLeft:d.ChevronsLeft,ChevronsRight:d.ChevronsRight,ChevronsUpDown:d.ChevronsUpDown,Circle:d.Circle,Copy:d.Copy,CornerDownLeft:d.CornerDownLeft,CreditCard:d.CreditCard,Download:d.Download,Edit2:d.Edit2,Ellipsis:d.Ellipsis,ExternalLink:d.ExternalLink,Eye:d.Eye,EyeOff:d.EyeOff,Filter:d.Filter,Folder:d.Folder,GripVertical:d.GripVertical,HelpCircle:d.HelpCircle,Home:d.Home,Info:d.Info,Link2:d.Link2,Loader2:d.Loader2,Lock:d.Lock,Mail:d.Mail,Menu:d.Menu,Minus:d.Minus,Moon:d.Moon,MoreHorizontal:d.MoreHorizontal,Plus:d.Plus,Search:d.Search,Settings:d.Settings,Sun:d.Sun,Trash2:d.Trash2,Upload:d.Upload,User:d.User,Users:d.Users,X:d.X,XCircle:d.XCircle},Symbol.toStringTag,{value:"Module"})),ys=fe.Root,jt=i.forwardRef(function({className:t,...r},s){return e.jsx(fe.Item,{ref:s,className:l("border-b border-border",t),...r})});jt.displayName="AccordionItem";const Nt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(fe.Header,{className:"flex",children:e.jsxs(fe.Trigger,{ref:n,className:l("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(d.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});Nt.displayName="AccordionTrigger";const wt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsx(fe.Content,{ref:n,className:l("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:l("pb-4 pt-0",t),children:r})})});wt.displayName="AccordionContent";const Cs=O.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),ks={default:null,info:e.jsx(d.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(d.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},pe=i.forwardRef(function({className:t,variant:r="default",title:s,dismissible:n,onDismiss:o,icon:c,children:u,...m},x){const[g,h]=i.useState(!0);if(!g)return null;const f=()=>{h(!1),o==null||o()},p=c===!1?null:c??ks[r??"default"];return e.jsxs("div",{ref:x,role:"alert",className:l(Cs({variant:r}),t),...m,children:[p,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:u})]}),n&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:l("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(d.X,{className:"size-3.5","aria-hidden":!0})})]})});pe.displayName="Alert";const yt={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},Ss=O.cva(["relative inline-flex shrink-0 overflow-hidden rounded-full","bg-background-muted text-foreground-muted"],{variants:{size:yt},defaultVariants:{size:"md"}}),Ts={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},H=i.forwardRef(function({className:t,size:r,src:s,alt:n,fallback:o,status:c,...u},m){return e.jsxs(Le.Root,{ref:m,className:l(Ss({size:r}),t),...u,children:[s&&e.jsx(Le.Image,{src:s,alt:n??"",className:"aspect-square size-full object-cover"}),e.jsx(Le.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"}),c&&e.jsx("span",{"aria-label":`Status: ${c}`,className:l("absolute bottom-0 right-0 block size-1/4 rounded-full ring-2 ring-background",Ts[c])})]})});H.displayName="Avatar";const Ct=i.forwardRef(function({max:t=4,size:r="md",className:s,children:n,...o},c){const u=Array.isArray(n)?n:[n],m=u.slice(0,t),x=u.length-m.length;return e.jsxs("div",{ref:c,className:l("flex items-center -space-x-2",s),...o,children:[m.map((g,h)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},h)),x>0&&e.jsxs("div",{className:l("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",yt[r],"font-medium"),"aria-label":`${x} more`,children:["+",x]})]})});Ct.displayName="AvatarGroup";const Rs=O.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),zs={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},V=i.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:n,children:o,...c},u){return e.jsxs("span",{ref:u,className:l(Rs({variant:r,tone:s}),t),...c,children:[n&&e.jsx("span",{"aria-hidden":!0,className:l("inline-block size-1.5 rounded-full",zs[s??"neutral"])}),o]})});V.displayName="Badge";const Oe=i.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:n,...o},c){const m=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:c,"aria-label":"Breadcrumb",className:l("text-sm",n),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:m.map((x,g)=>{const h=g===m.length-1;if("collapsed"in x)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(d.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=x,p=h?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[p,!h&&e.jsx(d.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});Oe.displayName="Breadcrumbs";const Is=O.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),N=i.forwardRef(function({className:t,variant:r,size:s,asChild:n=!1,loading:o=!1,leadingIcon:c,trailingIcon:u,disabled:m,children:x,type:g="button",...h},f){const p=n?ht.Slot:"button",b=m||o;return e.jsxs(p,{ref:f,type:n?void 0:g,"aria-busy":o||void 0,disabled:n?void 0:b,"data-loading":o||void 0,className:l(Is({variant:r,size:s}),t),...h,children:[o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):c,x,!o&&u]})});N.displayName="Button";const Ds=O.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),A=i.forwardRef(function({className:t,variant:r,padding:s,...n},o){return e.jsx("div",{ref:o,className:l(Ds({variant:r,padding:s}),t),...n})});A.displayName="Card";const _=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex flex-col gap-1 pb-4",t),...r})});_.displayName="CardHeader";const L=i.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:l("text-base font-semibold text-foreground leading-tight",t),...r})});L.displayName="CardTitle";const q=i.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:l("text-sm text-foreground-muted",t),...r})});q.displayName="CardDescription";const F=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("text-sm text-foreground",t),...r})});F.displayName="CardContent";const kt=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:l("flex items-center gap-2 pt-4",t),...r})});kt.displayName="CardFooter";const me=i.forwardRef(function({className:t,label:r,description:s,error:n,hideLabel:o,id:c,disabled:u,...m},x){const g=i.useId(),h=c??g,f=s?`${h}-desc`:void 0,p=n?`${h}-error`:void 0;return e.jsxs("div",{className:l("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(ut.Root,{ref:x,id:h,disabled:u,"aria-describedby":p??f,"aria-invalid":!!n||void 0,className:l("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",n?"border-danger":"border-border-strong"),...m,children:e.jsx(ut.Indicator,{className:"flex items-center justify-center",children:m.checked==="indeterminate"?e.jsx(d.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(d.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:h,className:l("text-sm text-foreground select-none",u&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),n&&e.jsx("p",{id:p,role:"alert",className:"text-xs text-danger-text",children:n})]})});me.displayName="Checkbox";const St=i.forwardRef(function({value:t,onChange:r,options:s,loadOptions:n,label:o,helperText:c,error:u,placeholder:m="Select…",searchPlaceholder:x="Search…",emptyText:g="No results.",clearable:h=!0,disabled:f,size:p="md",className:b},w){const v=i.useId(),B=`${v}-helper`,U=`${v}-error`,[M,$]=i.useState(!1),[E,y]=i.useState(""),[W,X]=i.useState([]),[ee,ie]=i.useState(!1),G=n?W:s??[];i.useEffect(()=>{if(!n||!M)return;let P=!1;return ie(!0),n(E).then(Fe=>{P||X(Fe)}).finally(()=>{P||ie(!1)}),()=>{P=!0}},[E,M,n]);const K=i.useMemo(()=>G.find(P=>P.value===t)??null,[G,t]),te=p==="sm"?"h-8":p==="lg"?"h-10":"h-9",j=p==="sm"?"px-2.5":p==="lg"?"px-3.5":"px-3",Y=i.useCallback(P=>{P.stopPropagation(),r(null)},[r]),_e=!!u;return e.jsxs("div",{ref:w,className:l("flex flex-col gap-1.5",b),children:[o&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(k.Root,{open:M,onOpenChange:$,children:[e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("button",{id:v,type:"button",role:"combobox","aria-expanded":M,"aria-invalid":_e||void 0,"aria-describedby":_e?U:c?B:void 0,disabled:f,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",te,j,_e?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:l("truncate",!K&&"text-foreground-subtle"),children:K?K.label:m}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[h&&K&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:Y,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-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"),children:e.jsxs(R.Command,{shouldFilter:!n,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(R.Command.Input,{value:E,onValueChange:y,placeholder:x,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),ee&&e.jsx(d.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(R.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[G.map(P=>{const Fe=P.value===t;return e.jsxs(R.Command.Item,{value:P.value,disabled:P.disabled,onSelect:Kr=>{r(Kr),$(!1)},className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:P.label}),P.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:P.description}),Fe&&e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})]},P.value)}),!ee&&G.length===0&&e.jsx(R.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),u?e.jsx("p",{id:U,role:"alert",className:"text-xs text-danger-text",children:u}):c?e.jsx("p",{id:B,className:"text-xs text-foreground-subtle",children:c}):null]})});St.displayName="Combobox";const Tt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Command,{ref:s,className:l("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});Tt.displayName="Command";const Rt=i.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(d.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(R.Command.Input,{ref:s,className:l("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});Rt.displayName="CommandInput";const zt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Command.List,{ref:s,className:l("max-h-[320px] overflow-y-auto p-1",t),...r})});zt.displayName="CommandList";const It=i.forwardRef(function(t,r){return e.jsx(R.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});It.displayName="CommandEmpty";const Dt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Command.Group,{ref:s,className:l("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});Dt.displayName="CommandGroup";const Mt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Command.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Mt.displayName="CommandSeparator";const Pt=i.forwardRef(function({className:t,...r},s){return e.jsx(R.Command.Item,{ref:s,className:l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Pt.displayName="CommandItem";function Ms({children:a,className:t}){return e.jsx("span",{className:l("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:a})}function Ps({open:a,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(C.Root,{open:a,onOpenChange:t,children:e.jsxs(C.Portal,{children:[e.jsx(C.Overlay,{className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(C.Content,{className:l("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(C.Title,{className:"sr-only",children:s}),r]})]})})}function As(a){const[t,r]=i.useState(0);i.useEffect(()=>{const s=n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),a(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a])}const _s=I.Root,Fs=I.Trigger,Ls=I.Group,At=I.Portal,Bs=I.Sub,Es=I.RadioGroup,ke=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),_t=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(I.SubTrigger,{ref:n,className:l(ke,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});_t.displayName="ContextMenuSubTrigger";const Ft=i.forwardRef(function({className:t,...r},s){return e.jsx(I.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Ft.displayName="ContextMenuSubContent";const Lt=i.forwardRef(function({className:t,...r},s){return e.jsx(At,{children:e.jsx(I.Content,{ref:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-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",t),...r})})});Lt.displayName="ContextMenuContent";const Bt=i.forwardRef(function({className:t,destructive:r,...s},n){return e.jsx(I.Item,{ref:n,className:l(ke,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Bt.displayName="ContextMenuItem";const Et=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(I.CheckboxItem,{ref:n,className:l(ke,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(I.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Et.displayName="ContextMenuCheckboxItem";const Ot=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(I.RadioItem,{ref:n,className:l(ke,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(I.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Ot.displayName="ContextMenuRadioItem";const $t=i.forwardRef(function({className:t,...r},s){return e.jsx(I.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});$t.displayName="ContextMenuLabel";const Gt=i.forwardRef(function({className:t,...r},s){return e.jsx(I.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Gt.displayName="ContextMenuSeparator";function Ht({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}Ht.displayName="ContextMenuShortcut";const Ut=D.Root,qt=D.Trigger,Os=D.Group,Vt=D.Portal,$s=D.Sub,Gs=D.RadioGroup,Se=l("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),Wt=i.forwardRef(function({className:t,inset:r,children:s,...n},o){return e.jsxs(D.SubTrigger,{ref:o,className:l(Se,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...n,children:[s,e.jsx(d.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Wt.displayName="DropdownMenuSubTrigger";const Xt=i.forwardRef(function({className:t,...r},s){return e.jsx(D.SubContent,{ref:s,className:l("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-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",t),...r})});Xt.displayName="DropdownMenuSubContent";const $e=i.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...n},o){return e.jsx(Vt,{children:e.jsx(D.Content,{ref:o,sideOffset:r,align:s,className:l("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-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-1 data-[side=top]:slide-in-from-bottom-1",t),...n})})});$e.displayName="DropdownMenuContent";const Kt=i.forwardRef(function({className:t,inset:r,destructive:s,...n},o){return e.jsx(D.Item,{ref:o,className:l(Se,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...n})});Kt.displayName="DropdownMenuItem";const Ge=i.forwardRef(function({className:t,children:r,checked:s,...n},o){return e.jsxs(D.CheckboxItem,{ref:o,checked:s,className:l(Se,"pl-8",t),...n,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(D.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ge.displayName="DropdownMenuCheckboxItem";const Qt=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(D.RadioItem,{ref:n,className:l(Se,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(D.ItemIndicator,{children:e.jsx(d.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Qt.displayName="DropdownMenuRadioItem";const He=i.forwardRef(function({className:t,inset:r,...s},n){return e.jsx(D.Label,{ref:n,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});He.displayName="DropdownMenuLabel";const Ue=i.forwardRef(function({className:t,...r},s){return e.jsx(D.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Ue.displayName="DropdownMenuSeparator";function Yt({className:a,...t}){return e.jsx("span",{className:l("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",a),...t})}Yt.displayName="DropdownMenuShortcut";const Hs=O.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),Te=i.forwardRef(function({className:t,variant:r,size:s,icon:n,loading:o,disabled:c,type:u="button",...m},x){const g=c||o;return e.jsx("button",{ref:x,type:u,"aria-busy":o||void 0,disabled:g,className:l(Hs({variant:r,size:s}),t),...m,children:o?e.jsx(d.Loader2,{className:"animate-spin","aria-hidden":"true"}):n})});Te.displayName="IconButton";const Us=O.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),qs=O.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),S=i.forwardRef(function({className:t,type:r="text",size:s,tone:n,label:o,helperText:c,error:u,prefix:m,suffix:x,clearable:g,onClear:h,hideLabel:f,id:p,disabled:b,value:w,...v},B){const U=i.useId(),M=p??U,$=`${M}-helper`,E=`${M}-error`,[y,W]=i.useState(!1),X=r==="password"?y?"text":"password":r,ee=!!u,ie=ee?"error":n,G=m??(r==="search"?e.jsx(d.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),K=w!==void 0&&w!==""&&w!==null;return e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:M,className:l("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:l(Us({size:s,tone:ie})),children:[G&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:G}),e.jsx("input",{ref:B,id:M,type:X,disabled:b,value:w,"aria-invalid":ee||void 0,"aria-describedby":u?E:c?$:void 0,className:l(qs()),...v}),g&&K&&e.jsx("button",{type:"button",onClick:h,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>W(te=>!te),tabIndex:-1,"aria-label":y?"Hide password":"Show password","aria-pressed":y,className:"flex items-center text-foreground-subtle hover:text-foreground",children:y?e.jsx(d.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(d.Eye,{className:"size-4","aria-hidden":!0})}),x&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:x})]}),u?e.jsx("p",{id:E,role:"alert",className:"text-xs text-danger-text",children:u}):c?e.jsx("p",{id:$,className:"text-xs text-foreground-subtle",children:c}):null]})});S.displayName="Input";const Re=i.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:l("w-full caption-bottom text-sm border-collapse",t),...r})})});Re.displayName="Table";const ze=i.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:l("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});ze.displayName="TableHeader";const Ie=i.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:l("[&_tr:last-child]:border-0",t),...r})});Ie.displayName="TableBody";const Jt=i.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:l("border-t border-border bg-background-subtle font-medium",t),...r})});Jt.displayName="TableFooter";const J=i.forwardRef(function({className:t,selected:r,...s},n){return e.jsx("tr",{ref:n,"data-selected":r||void 0,className:l("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});J.displayName="TableRow";const Z=i.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:l("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});Z.displayName="TableHead";const Q=i.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:l("px-3 py-3 align-middle text-foreground",t),...r})});Q.displayName="TableCell";const Zt=i.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:l("mt-4 text-sm text-foreground-subtle",t),...r})});Zt.displayName="TableCaption";const qe=i.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:n,className:o,...c},u){const m=(r==null?void 0:r.key)===t,x=m?r==null?void 0:r.direction:void 0,g=()=>{s(t,m&&x==="asc"?"desc":"asc")};return e.jsx(Z,{ref:u,className:l("p-0",o),"aria-sort":m?x==="asc"?"ascending":"descending":"none",...c,children:e.jsxs("button",{type:"button",onClick:g,className:l("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",m&&"text-foreground"),children:[n,x==="asc"?e.jsx(d.ArrowUp,{className:"size-3.5","aria-hidden":!0}):x==="desc"?e.jsx(d.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(d.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});qe.displayName="TableSortHeader";const Ve=i.forwardRef(function({className:t,variant:r,...s},n){return e.jsx("div",{ref:n,"aria-hidden":!0,className:l("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Ve.displayName="Skeleton";function er({columns:a,rows:t,loading:r,sort:s,onSortChange:n,filter:o,emptyState:c,className:u}){const[m,x]=i.useState({}),g=i.useMemo(()=>a.filter(f=>!m[f.key]),[a,m]),h=()=>r?Array.from({length:5}).map((f,p)=>e.jsx(J,{children:g.map(b=>e.jsx(Q,{children:e.jsx(Ve,{variant:"text",className:"w-3/4"})},b.key))},`skel-${p}`)):t.length===0?e.jsx(J,{children:e.jsx(Q,{colSpan:g.length,className:"h-32 text-center",children:c??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(J,{children:g.map(p=>e.jsx(Q,{className:l(p.align==="right"&&"text-right tabular"),children:p.cell?p.cell(f):f[p.key]},p.key))},f.id));return e.jsxs("div",{className:l("flex flex-col gap-3",u),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(S,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Ut,{children:[e.jsx(qt,{asChild:!0,children:e.jsx(Te,{"aria-label":"Column visibility",icon:e.jsx(d.Settings,{}),variant:"outline"})}),e.jsxs($e,{children:[e.jsx(He,{children:"Columns"}),e.jsx(Ue,{}),a.map(f=>e.jsx(Ge,{checked:!m[f.key],onCheckedChange:p=>x(b=>({...b,[f.key]:!p})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Re,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(ze,{children:e.jsx(J,{children:g.map(f=>f.sortable&&n?e.jsx(qe,{sortKey:f.key,currentSort:s??null,onSortChange:(p,b)=>n({key:p,direction:b}),children:f.header},f.key):e.jsx(Z,{className:l(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Ie,{children:h()})]})})]})}const tr={root:"p-3",month:"space-y-2",caption:"flex items-center justify-between px-1 pb-2",caption_label:"text-sm font-medium text-foreground",nav:"flex items-center gap-1",nav_button:"inline-flex size-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-xs font-medium text-foreground-subtle",row:"flex w-full mt-1",cell:"relative size-9 p-0 text-center",day:"inline-flex size-9 items-center justify-center rounded-md text-sm text-foreground transition-colors outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring",day_selected:"bg-accent text-on-accent hover:bg-accent hover:text-on-accent",day_today:"font-semibold text-accent",day_outside:"text-foreground-subtle opacity-50",day_disabled:"text-foreground-subtle opacity-50 pointer-events-none",day_range_start:"rounded-l-md",day_range_end:"rounded-r-md",day_range_middle:"bg-accent-soft text-on-accent-soft rounded-none"},rr={IconLeft:()=>e.jsx(d.ChevronLeft,{className:"size-4","aria-hidden":!0}),IconRight:()=>e.jsx(d.ChevronRight,{className:"size-4","aria-hidden":!0})};function we(a){return a?a.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function sr({label:a,placeholder:t,hasValue:r,children:s,error:n,fieldId:o,disabled:c}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[a&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:a}),e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:c,"aria-invalid":!!n||void 0,className:l("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(d.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),n&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:n})]})}const ar=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a date",error:o,disabled:c,fromDate:u,toDate:m,className:x},g){const h=i.useId(),[f,p]=i.useState(!1);return e.jsx("div",{ref:g,className:l(x),children:e.jsxs(k.Root,{open:f,onOpenChange:p,children:[e.jsx(sr,{label:s,placeholder:n,hasValue:!!t,error:o,fieldId:h,disabled:c,children:we(t)}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(bt.DayPicker,{mode:"single",selected:t,onSelect:b=>{r(b??void 0),b&&p(!1)},fromDate:u,toDate:m,classNames:tr,components:rr})})})]})})});ar.displayName="DatePicker";const nr=i.forwardRef(function({value:t,onChange:r,label:s,placeholder:n="Pick a range",error:o,disabled:c,fromDate:u,toDate:m,className:x},g){const h=i.useId(),[f,p]=i.useState(!1),b=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:l(x),children:e.jsxs(k.Root,{open:f,onOpenChange:p,children:[e.jsx(sr,{label:s,placeholder:n,hasValue:b,error:o,fieldId:h,disabled:c,children:t!=null&&t.from&&t.to?`${we(t.from)} – ${we(t.to)}`:t!=null&&t.from?we(t.from):""}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(bt.DayPicker,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,fromDate:u,toDate:m,classNames:tr,components:rr})})})]})})});nr.displayName="DateRangePicker";const or=C.Root,Vs=C.Trigger,ir=C.Portal,lr=C.Close,We=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});We.displayName="DialogOverlay";const Xe=i.forwardRef(function({className:t,children:r,showClose:s=!0,size:n="md",...o},c){return e.jsxs(ir,{children:[e.jsx(We,{}),e.jsxs(C.Content,{ref:c,className:l("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","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",n==="sm"&&"max-w-[400px]",n==="md"&&"max-w-[520px]",n==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(C.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});Xe.displayName="DialogContent";function Ke({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1 pb-4",a),...t})}Ke.displayName="DialogHeader";function Qe({className:a,...t}){return e.jsx("div",{className:l("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",a),...t})}Qe.displayName="DialogFooter";const Ye=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});Ye.displayName="DialogTitle";const Je=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});Je.displayName="DialogDescription";function dr({open:a,onOpenChange:t,title:r,description:s,confirmLabel:n="Confirm",cancelLabel:o="Cancel",confirmVariant:c="primary",onConfirm:u,loading:m}){return e.jsx(or,{open:a,onOpenChange:t,children:e.jsxs(Xe,{size:"sm",children:[e.jsxs(Ke,{children:[e.jsx(Ye,{children:r}),s&&e.jsx(Je,{children:s})]}),e.jsxs(Qe,{children:[e.jsx(lr,{asChild:!0,children:e.jsx(N,{variant:"outline",children:o})}),e.jsx(N,{variant:c,loading:m,onClick:u,children:n})]})]})})}dr.displayName="ConfirmationDialog";const De=i.forwardRef(function({icon:t,title:r,description:s,action:n,secondaryAction:o,className:c,...u},m){return e.jsxs("div",{ref:m,className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",c),...u,children:[t&&e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r}),s&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s}),(n||o)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[n,o]})]})});De.displayName="EmptyState";const Ws={404:{icon:e.jsx(d.AlertTriangle,{}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{icon:e.jsx(d.XCircle,{}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{icon:e.jsx(d.AlertTriangle,{}),title:"Unexpected error",description:"Something interrupted this action."}},cr=i.forwardRef(function({variant:t="generic",title:r,description:s,action:n,onRetry:o,className:c,...u},m){const x=Ws[t];return e.jsxs("div",{ref:m,role:"alert",className:l("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",c),...u,children:[e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-danger-soft text-danger-text [&_svg]:size-6",children:x.icon}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??x.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??x.description}),(n||o)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:n??e.jsx(N,{onClick:o,variant:"outline",children:"Try again"})})]})});cr.displayName="ErrorState";const Xs=Ee.FormProvider,ur=i.createContext(null);function Ks(a){return e.jsx(ur.Provider,{value:{name:a.name},children:e.jsx(Ee.Controller,{...a})})}const mr=i.createContext(null);function he(){const a=i.useContext(ur),t=i.useContext(mr),{getFieldState:r,formState:s}=Ee.useFormContext();if(!a)throw new Error("useFormField must be used inside <FormField>");const n=r(a.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:a.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...n}}const xr=i.forwardRef(function({className:t,...r},s){const n=i.useId();return e.jsx(mr.Provider,{value:{id:n},children:e.jsx("div",{ref:s,className:l("flex flex-col gap-1.5",t),...r})})});xr.displayName="FormItem";const fr=i.forwardRef(function({className:t,...r},s){const{formItemId:n,error:o}=he();return e.jsx(ps.Root,{ref:s,htmlFor:n,className:l("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});fr.displayName="FormLabel";const gr=i.forwardRef(function(t,r){const{error:s,formItemId:n,formDescriptionId:o,formMessageId:c}=he();return e.jsx(ht.Slot,{ref:r,id:n,"aria-describedby":s?`${o} ${c}`:o,"aria-invalid":!!s,...t})});gr.displayName="FormControl";const pr=i.forwardRef(function({className:t,...r},s){const{formDescriptionId:n}=he();return e.jsx("p",{ref:s,id:n,className:l("text-xs text-foreground-subtle",t),...r})});pr.displayName="FormDescription";const hr=i.forwardRef(function({className:t,children:r,...s},n){const{error:o,formMessageId:c}=he(),u=o?String((o==null?void 0:o.message)??""):r;return u?e.jsx("p",{ref:n,id:c,role:"alert",className:l("text-xs text-danger-text",t),...s,children:u}):null});hr.displayName="FormError";const br=i.forwardRef(function({size:t="sm",className:r,...s},n){return e.jsx("kbd",{ref:n,className:l("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});br.displayName="Kbd";const vr=i.forwardRef(function({options:t,value:r,onChange:s,label:n,helperText:o,error:c,placeholder:u="Select…",emptyText:m="No results.",maxVisibleChips:x=4,clearable:g=!0,disabled:h,className:f},p){const b=i.useId(),w=b,v=`${b}-helper`,B=`${b}-error`,[U,M]=i.useState(!1),[$,E]=i.useState(""),y=i.useRef(null),W=i.useMemo(()=>t.filter(j=>r.includes(j.value)),[t,r]),X=i.useCallback(j=>{r.includes(j)?s(r.filter(Y=>Y!==j)):s([...r,j])},[r,s]),ee=i.useCallback(()=>s([]),[s]),ie=j=>{j.key==="Backspace"&&$===""&&r.length>0&&s(r.slice(0,-1))},G=W.slice(0,x),K=W.length-G.length,te=!!c;return e.jsxs("div",{ref:p,className:l("flex flex-col gap-1.5",f),children:[n&&e.jsx("label",{htmlFor:w,className:"text-sm font-medium text-foreground",children:n}),e.jsxs(k.Root,{open:U,onOpenChange:M,children:[e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":U,"aria-controls":`${w}-list`,"aria-haspopup":"listbox",id:w,tabIndex:h?-1:0,onKeyDown:ie,"aria-disabled":h||void 0,"aria-invalid":te||void 0,"aria-describedby":te?B:o?v:void 0,className:l("flex w-full min-h-9 cursor-text flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",te?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",h&&"opacity-50 pointer-events-none"),onClick:()=>{var j;return(j=y.current)==null?void 0:j.focus()},children:[G.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:u}),G.map(j=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[j.label,e.jsx("button",{type:"button","aria-label":`Remove ${j.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:Y=>{Y.stopPropagation(),X(j.value)},children:e.jsx(d.X,{className:"size-3","aria-hidden":!0})})]},j.value)),K>0&&e.jsxs("span",{className:"rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",K," more"]}),e.jsx("input",{ref:y,value:$,onChange:j=>E(j.target.value),onFocus:()=>M(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(W.length===0,""),disabled:h}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&W.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:j=>{j.stopPropagation(),ee()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})}),e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:l("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-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"),onOpenAutoFocus:j=>j.preventDefault(),children:e.jsx(R.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(R.Command.List,{id:`${w}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(j=>j.label.toLowerCase().includes($.toLowerCase())).map(j=>{const Y=r.includes(j.value);return e.jsxs(R.Command.Item,{value:j.value,disabled:j.disabled,onSelect:()=>X(j.value),className:l("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:l("flex size-4 items-center justify-center rounded-sm border",Y?"border-accent bg-accent text-on-accent":"border-border"),children:Y&&e.jsx(d.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:j.label}),j.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:j.description})]},j.value)}),e.jsx(R.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:m})]})})})})]}),c?e.jsx("p",{id:B,role:"alert",className:"text-xs text-danger-text",children:c}):o?e.jsx("p",{id:v,className:"text-xs text-foreground-subtle",children:o}):null]})});vr.displayName="MultiSelect";const Ze=z.Root,Qs=z.Value,Me=i.forwardRef(function({className:t,placeholder:r,size:s="md",tone:n="default",...o},c){return e.jsxs(z.Trigger,{ref:c,className:l("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",n==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(z.Value,{placeholder:r}),e.jsx(z.Icon,{asChild:!0,children:e.jsx(d.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});Me.displayName="SelectTrigger";const jr="flex h-6 cursor-default items-center justify-center text-foreground-subtle",et=i.forwardRef(function({className:t,...r},s){return e.jsx(z.ScrollUpButton,{ref:s,className:l(jr,t),...r,children:e.jsx(d.ChevronUp,{className:"size-4","aria-hidden":!0})})});et.displayName="SelectScrollUpButton";const tt=i.forwardRef(function({className:t,...r},s){return e.jsx(z.ScrollDownButton,{ref:s,className:l(jr,t),...r,children:e.jsx(d.ChevronDown,{className:"size-4","aria-hidden":!0})})});tt.displayName="SelectScrollDownButton";const Pe=i.forwardRef(function({className:t,children:r,position:s="popper",...n},o){return e.jsx(z.Portal,{children:e.jsxs(z.Content,{ref:o,position:s,className:l("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-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",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...n,children:[e.jsx(et,{}),e.jsx(z.Viewport,{className:"p-1",children:r}),e.jsx(tt,{})]})})});Pe.displayName="SelectContent";const rt=i.forwardRef(function({className:t,...r},s){return e.jsx(z.Label,{ref:s,className:l("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});rt.displayName="SelectLabel";const ae=i.forwardRef(function({className:t,children:r,leadingIcon:s,...n},o){return e.jsxs(z.Item,{ref:o,className:l("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(z.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(z.ItemIndicator,{children:e.jsx(d.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});ae.displayName="SelectItem";const Nr=i.forwardRef(function({className:t,...r},s){return e.jsx(z.Separator,{ref:s,className:l("-mx-1 my-1 h-px bg-border",t),...r})});Nr.displayName="SelectSeparator";const wr=i.forwardRef(function({label:t,children:r,...s},n){return e.jsxs(z.Group,{ref:n,...s,children:[t&&e.jsx(rt,{children:t}),r]})});wr.displayName="SelectGroup";function Ys(a,t,r=7){if(t<=r)return Array.from({length:t},(u,m)=>m+1);const s=1,n=[],o=Math.max(2,a-s),c=Math.min(t-1,a+s);n.push(1),o>2&&n.push("gap");for(let u=o;u<=c;u++)n.push(u);return c<t-1&&n.push("gap"),n.push(t),n}const st=i.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:n,pageSize:o,pageSizeOptions:c,onPageSizeChange:u,showJump:m=!0,className:x,...g},h){const f=i.useMemo(()=>Ys(t,r),[t,r]),p=o?(t-1)*o+1:void 0,b=o&&n?Math.min(t*o,n):void 0,w=v=>{v<1||v>r||v===t||s(v)};return e.jsxs("nav",{ref:h,"aria-label":"Pagination",className:l("flex flex-wrap items-center justify-between gap-3",x),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[n!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",p,"–",b," of ",n]}),c&&u&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(Ze,{value:String(o),onValueChange:v=>u(Number(v)),children:[e.jsx(Me,{size:"sm",className:"w-20"}),e.jsx(Pe,{children:c.map(v=>e.jsxs(ae,{value:String(v),children:[v," / page"]},v))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[m&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>w(1),className:ve,children:e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>w(t-1),className:ve,children:e.jsx(d.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((v,B)=>v==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${B}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${v}`,"aria-current":v===t?"page":void 0,onClick:()=>w(v),className:l("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",v===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:v})},v)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>w(t+1),className:ve,children:e.jsx(d.ChevronRight,{className:"size-4","aria-hidden":!0})})}),m&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>w(r),className:ve,children:e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});st.displayName="Pagination";const ve=l("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),Js=k.Root,Zs=k.Trigger,ea=k.Anchor,ta=k.Close,yr=i.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...n},o){return e.jsx(k.Portal,{children:e.jsx(k.Content,{ref:o,align:r,sideOffset:s,className:l("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","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-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...n})})});yr.displayName="PopoverContent";const ra={sm:"h-1",md:"h-1.5",lg:"h-2"},sa={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},Cr=i.forwardRef(function({className:t,value:r,size:s="md",tone:n="accent",...o},c){const u=r==null;return e.jsxs(mt.Root,{ref:c,value:u?void 0:r,className:l("relative w-full overflow-hidden rounded-full bg-background-muted",ra[s],t),...o,children:[e.jsx(mt.Indicator,{className:l("h-full w-full flex-1 transition-transform",sa[n],u&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:u?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const aa=require("clsx"),oa=require("tailwind-merge"),l=require("react"),p=require("lucide-react"),e=require("react/jsx-runtime"),ia=require("@radix-ui/react-accordion"),Se=require("class-variance-authority"),la=require("@radix-ui/react-avatar"),cr=require("@radix-ui/react-slot"),ca=require("@radix-ui/react-checkbox"),da=require("@radix-ui/react-popover"),de=require("cmdk"),ua=require("@radix-ui/react-dialog"),fa=require("@radix-ui/react-context-menu"),ma=require("@radix-ui/react-dropdown-menu"),gn=require("react-day-picker"),xa=require("@radix-ui/react-label"),pn=require("react-hook-form"),ga=require("@radix-ui/react-select"),pa=require("@radix-ui/react-progress"),ha=require("@radix-ui/react-radio-group"),ba=require("@radix-ui/react-scroll-area"),va=require("@radix-ui/react-separator"),wa=require("@radix-ui/react-slider"),ja=require("@radix-ui/react-switch"),ya=require("@radix-ui/react-tabs"),Na=require("@radix-ui/react-toast"),Ca=require("@radix-ui/react-tooltip");function ae(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const Sa=ae(l),vt=ae(ia),sn=ae(la),Kn=ae(ca),Z=ae(da),H=ae(ua),fe=ae(fa),me=ae(ma),ka=ae(xa),ue=ae(ga),Yn=ae(pa),dn=ae(ha),gt=ae(ba),Ta=ae(va),Mt=ae(wa),Qn=ae(ja),$t=ae(ya),nt=ae(Na),wt=ae(Ca);function x(...n){return oa.twMerge(aa.clsx(n))}let Jn=0;function Da(n="ds"){return Jn+=1,`${n}-${Jn}`}function dr(n){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(n).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(n),a=o=>r(o.matches);return r(s.matches),s.addEventListener("change",a),()=>s.removeEventListener("change",a)},[n]),t}function Ra(){return dr("(prefers-reduced-motion: reduce)")}const Qe={toasts:[],listeners:new Set,emit(){for(const n of this.listeners)n(this.toasts)},push(n){const t=n.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...n,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(n){this.toasts=this.toasts.map(t=>t.id===n?{...t,open:!1}:t),this.emit()},remove(n){this.toasts=this.toasts.filter(t=>t.id!==n),this.emit()}};function Ia(){const[n,t]=l.useState(()=>[...Qe.toasts]);l.useEffect(()=>{const o=i=>t([...i]);return Qe.listeners.add(o),()=>{Qe.listeners.delete(o)}},[]);const r=l.useCallback(o=>Qe.push(o),[]),s=l.useCallback(o=>Qe.dismiss(o),[]),a=l.useCallback(o=>Qe.remove(o),[]);return{toasts:n,push:r,dismiss:s,remove:a}}const Ma=n=>Qe.push(n),Pa=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:p.AlertCircle,AlertTriangle:p.AlertTriangle,ArrowDown:p.ArrowDown,ArrowLeft:p.ArrowLeft,ArrowRight:p.ArrowRight,ArrowUp:p.ArrowUp,ArrowUpDown:p.ArrowUpDown,Bell:p.Bell,Calendar:p.Calendar,Check:p.Check,CheckCircle2:p.CheckCircle2,ChevronDown:p.ChevronDown,ChevronLeft:p.ChevronLeft,ChevronRight:p.ChevronRight,ChevronUp:p.ChevronUp,ChevronsLeft:p.ChevronsLeft,ChevronsRight:p.ChevronsRight,ChevronsUpDown:p.ChevronsUpDown,Circle:p.Circle,Copy:p.Copy,CornerDownLeft:p.CornerDownLeft,CreditCard:p.CreditCard,Download:p.Download,Edit2:p.Edit2,Ellipsis:p.Ellipsis,ExternalLink:p.ExternalLink,Eye:p.Eye,EyeOff:p.EyeOff,Filter:p.Filter,Folder:p.Folder,GripVertical:p.GripVertical,HelpCircle:p.HelpCircle,Home:p.Home,Info:p.Info,Link2:p.Link2,Loader2:p.Loader2,Lock:p.Lock,Mail:p.Mail,Menu:p.Menu,Minus:p.Minus,Moon:p.Moon,MoreHorizontal:p.MoreHorizontal,Plus:p.Plus,Search:p.Search,Settings:p.Settings,Sun:p.Sun,Trash2:p.Trash2,Upload:p.Upload,User:p.User,Users:p.Users,X:p.X,XCircle:p.XCircle},Symbol.toStringTag,{value:"Module"})),za=vt.Root,ur=l.forwardRef(function({className:t,...r},s){return e.jsx(vt.Item,{ref:s,className:x("border-b border-border",t),...r})});ur.displayName="AccordionItem";const fr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(vt.Header,{className:"flex",children:e.jsxs(vt.Trigger,{ref:a,className:x("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...s,children:[r,e.jsx(p.ChevronDown,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});fr.displayName="AccordionTrigger";const mr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx(vt.Content,{ref:a,className:x("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...s,children:e.jsx("div",{className:x("pb-4 pt-0",t),children:r})})});mr.displayName="AccordionContent";const Ea=Se.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),Aa={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},Ct=l.forwardRef(function({className:t,variant:r="default",title:s,dismissible:a,onDismiss:o,icon:i,children:d,...u},c){const[g,m]=l.useState(!0);if(!g)return null;const f=()=>{m(!1),o==null||o()},b=i===!1?null:i??Aa[r??"default"];return e.jsxs("div",{ref:c,role:"alert",className:x(Ea({variant:r}),t),...u,children:[b,e.jsxs("div",{className:"flex-1 min-w-0",children:[s&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:s}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:d})]}),a&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:f,className:x("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(p.X,{className:"size-3.5","aria-hidden":!0})})]})});Ct.displayName="Alert";const xr={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},La=Se.cva(["relative inline-flex shrink-0 overflow-hidden rounded-full","bg-background-muted text-foreground-muted"],{variants:{size:xr},defaultVariants:{size:"md"}}),Oa={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Re=l.forwardRef(function({className:t,size:r,src:s,alt:a,fallback:o,status:i,...d},u){return e.jsxs(sn.Root,{ref:u,className:x(La({size:r}),t),...d,children:[s&&e.jsx(sn.Image,{src:s,alt:a??"",className:"aspect-square size-full object-cover"}),e.jsx(sn.Fallback,{delayMs:s?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:o??"?"}),i&&e.jsx("span",{"aria-label":`Status: ${i}`,className:x("absolute bottom-0 right-0 block size-1/4 rounded-full ring-2 ring-background",Oa[i])})]})});Re.displayName="Avatar";const gr=l.forwardRef(function({max:t=4,size:r="md",className:s,children:a,...o},i){const d=Array.isArray(a)?a:[a],u=d.slice(0,t),c=d.length-u.length;return e.jsxs("div",{ref:i,className:x("flex items-center -space-x-2",s),...o,children:[u.map((g,m)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:g},m)),c>0&&e.jsxs("div",{className:x("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",xr[r],"font-medium"),"aria-label":`${c} more`,children:["+",c]})]})});gr.displayName="AvatarGroup";const Fa=Se.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),_a={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},Ee=l.forwardRef(function({className:t,variant:r,tone:s="neutral",dot:a,children:o,...i},d){return e.jsxs("span",{ref:d,className:x(Fa({variant:r,tone:s}),t),...i,children:[a&&e.jsx("span",{"aria-hidden":!0,className:x("inline-block size-1.5 rounded-full",_a[s??"neutral"])}),o]})});Ee.displayName="Badge";const hn=l.forwardRef(function({items:t,maxItems:r=4,renderLink:s,className:a,...o},i){const u=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:i,"aria-label":"Breadcrumb",className:x("text-sm",a),...o,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:u.map((c,g)=>{const m=g===u.length-1;if("collapsed"in c)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(p.MoreHorizontal,{className:"size-4","aria-hidden":!0}),e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${g}`);const f=c,b=m?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:f.label}):f.href?s?s(f.href,f.label):e.jsx("a",{href:f.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:f.label}):e.jsx("span",{children:f.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[b,!m&&e.jsx(p.ChevronRight,{className:"size-3.5","aria-hidden":!0})]},g)})})})});hn.displayName="Breadcrumbs";const $a=Se.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),q=l.forwardRef(function({className:t,variant:r,size:s,asChild:a=!1,loading:o=!1,leadingIcon:i,trailingIcon:d,disabled:u,children:c,type:g="button",...m},f){const b=a?cr.Slot:"button",h=u||o;return e.jsxs(b,{ref:f,type:a?void 0:g,"aria-busy":o||void 0,disabled:a?void 0:h,"data-loading":o||void 0,className:x($a({variant:r,size:s}),t),...m,children:[o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):i,c,!o&&d]})});q.displayName="Button";const Ba=Se.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),xe=l.forwardRef(function({className:t,variant:r,padding:s,...a},o){return e.jsx("div",{ref:o,className:x(Ba({variant:r,padding:s}),t),...a})});xe.displayName="Card";const he=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:x("flex flex-col gap-1 pb-4",t),...r})});he.displayName="CardHeader";const Ce=l.forwardRef(function({className:t,...r},s){return e.jsx("h3",{ref:s,className:x("text-base font-semibold text-foreground leading-tight",t),...r})});Ce.displayName="CardTitle";const ze=l.forwardRef(function({className:t,...r},s){return e.jsx("p",{ref:s,className:x("text-sm text-foreground-muted",t),...r})});ze.displayName="CardDescription";const be=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:x("text-sm text-foreground",t),...r})});be.displayName="CardContent";const pr=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{ref:s,className:x("flex items-center gap-2 pt-4",t),...r})});pr.displayName="CardFooter";const pt=l.forwardRef(function({className:t,label:r,description:s,error:a,hideLabel:o,id:i,disabled:d,...u},c){const g=l.useId(),m=i??g,f=s?`${m}-desc`:void 0,b=a?`${m}-error`:void 0;return e.jsxs("div",{className:x("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(Kn.Root,{ref:c,id:m,disabled:d,"aria-describedby":b??f,"aria-invalid":!!a||void 0,className:x("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",a?"border-danger":"border-border-strong"),...u,children:e.jsx(Kn.Indicator,{className:"flex items-center justify-center",children:u.checked==="indeterminate"?e.jsx(p.Minus,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(p.Check,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:x("flex flex-col gap-0.5",o&&"sr-only"),children:[e.jsx("label",{htmlFor:m,className:x("text-sm text-foreground select-none",d&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:f,className:"text-xs text-foreground-subtle",children:s})]})]}),a&&e.jsx("p",{id:b,role:"alert",className:"text-xs text-danger-text",children:a})]})});pt.displayName="Checkbox";const hr=l.forwardRef(function({value:t,onChange:r,options:s,loadOptions:a,label:o,helperText:i,error:d,placeholder:u="Select…",searchPlaceholder:c="Search…",emptyText:g="No results.",clearable:m=!0,disabled:f,size:b="md",className:h},v){const j=l.useId(),w=`${j}-helper`,N=`${j}-error`,[S,y]=l.useState(!1),[k,D]=l.useState(""),[C,T]=l.useState([]),[R,L]=l.useState(!1),E=a?C:s??[];l.useEffect(()=>{if(!a||!S)return;let O=!1;return L(!0),a(k).then(K=>{O||T(K)}).finally(()=>{O||L(!1)}),()=>{O=!0}},[k,S,a]);const F=l.useMemo(()=>E.find(O=>O.value===t)??null,[E,t]),I=b==="sm"?"h-8":b==="lg"?"h-10":"h-9",P=b==="sm"?"px-2.5":b==="lg"?"px-3.5":"px-3",_=l.useCallback(O=>{O.stopPropagation(),r(null)},[r]),W=!!d;return e.jsxs("div",{ref:v,className:x("flex flex-col gap-1.5",h),children:[o&&e.jsx("label",{htmlFor:j,className:"text-sm font-medium text-foreground",children:o}),e.jsxs(Z.Root,{open:S,onOpenChange:y,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:j,type:"button",role:"combobox","aria-expanded":S,"aria-invalid":W||void 0,"aria-describedby":W?N:i?w:void 0,disabled:f,className:x("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",I,P,W?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:x("truncate",!F&&"text-foreground-subtle"),children:F?F.label:u}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[m&&F&&!f&&e.jsx("span",{role:"button",tabIndex:-1,onClick:_,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:x("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-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"),children:e.jsxs(de.Command,{shouldFilter:!a,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(de.Command.Input,{value:k,onValueChange:D,placeholder:c,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),R&&e.jsx(p.Loader2,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(de.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[E.map(O=>{const K=O.value===t;return e.jsxs(de.Command.Item,{value:O.value,disabled:O.disabled,onSelect:ee=>{r(ee),y(!1)},className:x("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:O.label}),O.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:O.description}),K&&e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})]},O.value)}),!R&&E.length===0&&e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:g})]})]})})})]}),d?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:w,className:"text-xs text-foreground-subtle",children:i}):null]})});hr.displayName="Combobox";const br=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command,{ref:s,className:x("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});br.displayName="Command";const vr=l.forwardRef(function({className:t,...r},s){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(p.Search,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(de.Command.Input,{ref:s,className:x("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});vr.displayName="CommandInput";const wr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.List,{ref:s,className:x("max-h-[320px] overflow-y-auto p-1",t),...r})});wr.displayName="CommandList";const jr=l.forwardRef(function(t,r){return e.jsx(de.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});jr.displayName="CommandEmpty";const yr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Group,{ref:s,className:x("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});yr.displayName="CommandGroup";const Nr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Separator,{ref:s,className:x("-mx-1 my-1 h-px bg-border",t),...r})});Nr.displayName="CommandSeparator";const Cr=l.forwardRef(function({className:t,...r},s){return e.jsx(de.Command.Item,{ref:s,className:x("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});Cr.displayName="CommandItem";function Ha({children:n,className:t}){return e.jsx("span",{className:x("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:n})}function Ua({open:n,onOpenChange:t,children:r,title:s="Command palette"}){return e.jsx(H.Root,{open:n,onOpenChange:t,children:e.jsxs(H.Portal,{children:[e.jsx(H.Overlay,{className:x("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(H.Content,{className:x("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(H.Title,{className:"sr-only",children:s}),r]})]})})}function Va(n){const[t,r]=l.useState(0);l.useEffect(()=>{const s=a=>{a.key==="k"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),n(!0),r(o=>o+1))};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[n])}const Ga=fe.Root,qa=fe.Trigger,Wa=fe.Group,Sr=fe.Portal,Xa=fe.Sub,Ka=fe.RadioGroup,Bt=x("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),kr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.SubTrigger,{ref:a,className:x(Bt,"data-[state=open]:bg-background-muted",t),...s,children:[r,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});kr.displayName="ContextMenuSubTrigger";const Tr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.SubContent,{ref:s,className:x("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});Tr.displayName="ContextMenuSubContent";const Dr=l.forwardRef(function({className:t,...r},s){return e.jsx(Sr,{children:e.jsx(fe.Content,{ref:s,className:x("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-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",t),...r})})});Dr.displayName="ContextMenuContent";const Rr=l.forwardRef(function({className:t,destructive:r,...s},a){return e.jsx(fe.Item,{ref:a,className:x(Bt,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Rr.displayName="ContextMenuItem";const Ir=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.CheckboxItem,{ref:a,className:x(Bt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});Ir.displayName="ContextMenuCheckboxItem";const Mr=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(fe.RadioItem,{ref:a,className:x(Bt,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(fe.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Mr.displayName="ContextMenuRadioItem";const Pr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Label,{ref:s,className:x("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Pr.displayName="ContextMenuLabel";const zr=l.forwardRef(function({className:t,...r},s){return e.jsx(fe.Separator,{ref:s,className:x("-mx-1 my-1 h-px bg-border",t),...r})});zr.displayName="ContextMenuSeparator";function Er({className:n,...t}){return e.jsx("span",{className:x("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}Er.displayName="ContextMenuShortcut";const Ar=me.Root,Lr=me.Trigger,Ya=me.Group,Or=me.Portal,Qa=me.Sub,Ja=me.RadioGroup,Ht=x("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),Fr=l.forwardRef(function({className:t,inset:r,children:s,...a},o){return e.jsxs(me.SubTrigger,{ref:o,className:x(Ht,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...a,children:[s,e.jsx(p.ChevronRight,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});Fr.displayName="DropdownMenuSubTrigger";const _r=l.forwardRef(function({className:t,...r},s){return e.jsx(me.SubContent,{ref:s,className:x("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-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",t),...r})});_r.displayName="DropdownMenuSubContent";const bn=l.forwardRef(function({className:t,sideOffset:r=4,align:s="end",...a},o){return e.jsx(Or,{children:e.jsx(me.Content,{ref:o,sideOffset:r,align:s,className:x("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-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-1 data-[side=top]:slide-in-from-bottom-1",t),...a})})});bn.displayName="DropdownMenuContent";const $r=l.forwardRef(function({className:t,inset:r,destructive:s,...a},o){return e.jsx(me.Item,{ref:o,className:x(Ht,r&&"pl-8",s&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...a})});$r.displayName="DropdownMenuItem";const vn=l.forwardRef(function({className:t,children:r,checked:s,...a},o){return e.jsxs(me.CheckboxItem,{ref:o,checked:s,className:x(Ht,"pl-8",t),...a,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});vn.displayName="DropdownMenuCheckboxItem";const Br=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(me.RadioItem,{ref:a,className:x(Ht,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(me.ItemIndicator,{children:e.jsx(p.Circle,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});Br.displayName="DropdownMenuRadioItem";const wn=l.forwardRef(function({className:t,inset:r,...s},a){return e.jsx(me.Label,{ref:a,className:x("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...s})});wn.displayName="DropdownMenuLabel";const jn=l.forwardRef(function({className:t,...r},s){return e.jsx(me.Separator,{ref:s,className:x("-mx-1 my-1 h-px bg-border",t),...r})});jn.displayName="DropdownMenuSeparator";function Hr({className:n,...t}){return e.jsx("span",{className:x("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}Hr.displayName="DropdownMenuShortcut";const Za=Se.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),it=l.forwardRef(function({className:t,variant:r,size:s,icon:a,loading:o,disabled:i,type:d="button",...u},c){const g=i||o;return e.jsx("button",{ref:c,type:d,"aria-busy":o||void 0,disabled:g,className:x(Za({variant:r,size:s}),t),...u,children:o?e.jsx(p.Loader2,{className:"animate-spin","aria-hidden":"true"}):a})});it.displayName="IconButton";const eo=Se.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),to=Se.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),se=l.forwardRef(function({className:t,type:r="text",size:s,tone:a,label:o,helperText:i,error:d,prefix:u,suffix:c,clearable:g,onClear:m,hideLabel:f,id:b,disabled:h,value:v,...j},w){const N=l.useId(),S=b??N,y=`${S}-helper`,k=`${S}-error`,[D,C]=l.useState(!1),T=r==="password"?D?"text":"password":r,R=!!d,L=R?"error":a,E=u??(r==="search"?e.jsx(p.Search,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),F=v!==void 0&&v!==""&&v!==null;return e.jsxs("div",{className:x("flex flex-col gap-1.5",t),children:[o&&e.jsx("label",{htmlFor:S,className:x("text-sm font-medium text-foreground",f&&"sr-only"),children:o}),e.jsxs("div",{className:x(eo({size:s,tone:L})),children:[E&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:E}),e.jsx("input",{ref:w,id:S,type:T,disabled:h,value:v,"aria-invalid":R||void 0,"aria-describedby":d?k:i?y:void 0,className:x(to()),...j}),g&&F&&e.jsx("button",{type:"button",onClick:m,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>C(I=>!I),tabIndex:-1,"aria-label":D?"Hide password":"Show password","aria-pressed":D,className:"flex items-center text-foreground-subtle hover:text-foreground",children:D?e.jsx(p.EyeOff,{className:"size-4","aria-hidden":!0}):e.jsx(p.Eye,{className:"size-4","aria-hidden":!0})}),c&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:c})]}),d?e.jsx("p",{id:k,role:"alert",className:"text-xs text-danger-text",children:d}):i?e.jsx("p",{id:y,className:"text-xs text-foreground-subtle",children:i}):null]})});se.displayName="Input";const Ut=l.forwardRef(function({className:t,...r},s){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:s,className:x("w-full caption-bottom text-sm border-collapse",t),...r})})});Ut.displayName="Table";const Vt=l.forwardRef(function({className:t,...r},s){return e.jsx("thead",{ref:s,className:x("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Vt.displayName="TableHeader";const Gt=l.forwardRef(function({className:t,...r},s){return e.jsx("tbody",{ref:s,className:x("[&_tr:last-child]:border-0",t),...r})});Gt.displayName="TableBody";const Ur=l.forwardRef(function({className:t,...r},s){return e.jsx("tfoot",{ref:s,className:x("border-t border-border bg-background-subtle font-medium",t),...r})});Ur.displayName="TableFooter";const Ge=l.forwardRef(function({className:t,selected:r,...s},a){return e.jsx("tr",{ref:a,"data-selected":r||void 0,className:x("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...s})});Ge.displayName="TableRow";const qe=l.forwardRef(function({className:t,...r},s){return e.jsx("th",{ref:s,className:x("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});qe.displayName="TableHead";const He=l.forwardRef(function({className:t,...r},s){return e.jsx("td",{ref:s,className:x("px-3 py-3 align-middle text-foreground",t),...r})});He.displayName="TableCell";const Vr=l.forwardRef(function({className:t,...r},s){return e.jsx("caption",{ref:s,className:x("mt-4 text-sm text-foreground-subtle",t),...r})});Vr.displayName="TableCaption";const yn=l.forwardRef(function({sortKey:t,currentSort:r,onSortChange:s,children:a,className:o,...i},d){const u=(r==null?void 0:r.key)===t,c=u?r==null?void 0:r.direction:void 0,g=()=>{s(t,u&&c==="asc"?"desc":"asc")};return e.jsx(qe,{ref:d,className:x("p-0",o),"aria-sort":u?c==="asc"?"ascending":"descending":"none",...i,children:e.jsxs("button",{type:"button",onClick:g,className:x("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",u&&"text-foreground"),children:[a,c==="asc"?e.jsx(p.ArrowUp,{className:"size-3.5","aria-hidden":!0}):c==="desc"?e.jsx(p.ArrowDown,{className:"size-3.5","aria-hidden":!0}):e.jsx(p.ArrowUpDown,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});yn.displayName="TableSortHeader";const Nn=l.forwardRef(function({className:t,variant:r,...s},a){return e.jsx("div",{ref:a,"aria-hidden":!0,className:x("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...s})});Nn.displayName="Skeleton";function Gr({columns:n,rows:t,loading:r,sort:s,onSortChange:a,filter:o,emptyState:i,className:d}){const[u,c]=l.useState({}),g=l.useMemo(()=>n.filter(f=>!u[f.key]),[n,u]),m=()=>r?Array.from({length:5}).map((f,b)=>e.jsx(Ge,{children:g.map(h=>e.jsx(He,{children:e.jsx(Nn,{variant:"text",className:"w-3/4"})},h.key))},`skel-${b}`)):t.length===0?e.jsx(Ge,{children:e.jsx(He,{colSpan:g.length,className:"h-32 text-center",children:i??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(f=>e.jsx(Ge,{children:g.map(b=>e.jsx(He,{className:x(b.align==="right"&&"text-right tabular"),children:b.cell?b.cell(f):f[b.key]},b.key))},f.id));return e.jsxs("div",{className:x("flex flex-col gap-3",d),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?e.jsx(se,{type:"search",placeholder:o.placeholder??"Filter…",value:o.value,onChange:f=>o.onChange(f.target.value),clearable:!0,onClear:()=>o.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(Ar,{children:[e.jsx(Lr,{asChild:!0,children:e.jsx(it,{"aria-label":"Column visibility",icon:e.jsx(p.Settings,{}),variant:"outline"})}),e.jsxs(bn,{children:[e.jsx(wn,{children:"Columns"}),e.jsx(jn,{}),n.map(f=>e.jsx(vn,{checked:!u[f.key],onCheckedChange:b=>c(h=>({...h,[f.key]:!b})),children:f.header},f.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Ut,{children:[e.jsx("colgroup",{children:g.map(f=>e.jsx("col",{style:f.width?{width:f.width}:void 0},f.key))}),e.jsx(Vt,{children:e.jsx(Ge,{children:g.map(f=>f.sortable&&a?e.jsx(yn,{sortKey:f.key,currentSort:s??null,onSortChange:(b,h)=>a({key:b,direction:h}),children:f.header},f.key):e.jsx(qe,{className:x(f.align==="right"&&"text-right"),children:f.header},f.key))})}),e.jsx(Gt,{children:m()})]})})]})}const qr={root:"p-3",month:"space-y-2",caption:"flex items-center justify-between px-1 pb-2",caption_label:"text-sm font-medium text-foreground",nav:"flex items-center gap-1",nav_button:"inline-flex size-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted hover:text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-xs font-medium text-foreground-subtle",row:"flex w-full mt-1",cell:"relative size-9 p-0 text-center",day:"inline-flex size-9 items-center justify-center rounded-md text-sm text-foreground transition-colors outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring",day_selected:"bg-accent text-on-accent hover:bg-accent hover:text-on-accent",day_today:"font-semibold text-accent",day_outside:"text-foreground-subtle opacity-50",day_disabled:"text-foreground-subtle opacity-50 pointer-events-none",day_range_start:"rounded-l-md",day_range_end:"rounded-r-md",day_range_middle:"bg-accent-soft text-on-accent-soft rounded-none"},Wr={IconLeft:()=>e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0}),IconRight:()=>e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})};function Ot(n){return n?n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function Xr({label:n,placeholder:t,hasValue:r,children:s,error:a,fieldId:o,disabled:i}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&e.jsx("label",{htmlFor:o,className:"text-sm font-medium text-foreground",children:n}),e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("button",{id:o,type:"button",disabled:i,"aria-invalid":!!a||void 0,className:x("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(p.Calendar,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?s:t})]})}),a&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:a})]})}const Kr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a date",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const m=l.useId(),[f,b]=l.useState(!1);return e.jsx("div",{ref:g,className:x(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Xr,{label:s,placeholder:a,hasValue:!!t,error:o,fieldId:m,disabled:i,children:Ot(t)}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(gn.DayPicker,{mode:"single",selected:t,onSelect:h=>{r(h??void 0),h&&b(!1)},fromDate:d,toDate:u,classNames:qr,components:Wr})})})]})})});Kr.displayName="DatePicker";const Yr=l.forwardRef(function({value:t,onChange:r,label:s,placeholder:a="Pick a range",error:o,disabled:i,fromDate:d,toDate:u,className:c},g){const m=l.useId(),[f,b]=l.useState(!1),h=!!(t!=null&&t.from);return e.jsx("div",{ref:g,className:x(c),children:e.jsxs(Z.Root,{open:f,onOpenChange:b,children:[e.jsx(Xr,{label:s,placeholder:a,hasValue:h,error:o,fieldId:m,disabled:i,children:t!=null&&t.from&&t.to?`${Ot(t.from)} – ${Ot(t.to)}`:t!=null&&t.from?Ot(t.from):""}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg border border-border bg-popover text-popover-foreground shadow-md",children:e.jsx(gn.DayPicker,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,fromDate:d,toDate:u,classNames:qr,components:Wr})})})]})})});Yr.displayName="DateRangePicker";const Qr=H.Root,no=H.Trigger,Jr=H.Portal,Zr=H.Close,Cn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:x("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});Cn.displayName="DialogOverlay";const Sn=l.forwardRef(function({className:t,children:r,showClose:s=!0,size:a="md",...o},i){return e.jsxs(Jr,{children:[e.jsx(Cn,{}),e.jsxs(H.Content,{ref:i,className:x("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","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",a==="sm"&&"max-w-[400px]",a==="md"&&"max-w-[520px]",a==="lg"&&"max-w-[720px]",t),...o,children:[r,s&&e.jsx(H.Close,{"aria-label":"Close",className:x("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});Sn.displayName="DialogContent";function kn({className:n,...t}){return e.jsx("div",{className:x("flex flex-col gap-1 pb-4",n),...t})}kn.displayName="DialogHeader";function Tn({className:n,...t}){return e.jsx("div",{className:x("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",n),...t})}Tn.displayName="DialogFooter";const Dn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:x("text-lg font-semibold text-foreground leading-tight",t),...r})});Dn.displayName="DialogTitle";const Rn=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:x("text-sm text-foreground-muted",t),...r})});Rn.displayName="DialogDescription";function es({open:n,onOpenChange:t,title:r,description:s,confirmLabel:a="Confirm",cancelLabel:o="Cancel",confirmVariant:i="primary",onConfirm:d,loading:u}){return e.jsx(Qr,{open:n,onOpenChange:t,children:e.jsxs(Sn,{size:"sm",children:[e.jsxs(kn,{children:[e.jsx(Dn,{children:r}),s&&e.jsx(Rn,{children:s})]}),e.jsxs(Tn,{children:[e.jsx(Zr,{asChild:!0,children:e.jsx(q,{variant:"outline",children:o})}),e.jsx(q,{variant:i,loading:u,onClick:d,children:a})]})]})})}es.displayName="ConfirmationDialog";const qt=l.forwardRef(function({icon:t,title:r,description:s,action:a,secondaryAction:o,className:i,...d},u){return e.jsxs("div",{ref:u,className:x("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",i),...d,children:[t&&e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r}),s&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s}),(a||o)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[a,o]})]})});qt.displayName="EmptyState";const ro={404:{icon:e.jsx(p.AlertTriangle,{}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{icon:e.jsx(p.XCircle,{}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{icon:e.jsx(p.AlertTriangle,{}),title:"Unexpected error",description:"Something interrupted this action."}},ts=l.forwardRef(function({variant:t="generic",title:r,description:s,action:a,onRetry:o,className:i,...d},u){const c=ro[t];return e.jsxs("div",{ref:u,role:"alert",className:x("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",i),...d,children:[e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-danger-soft text-danger-text [&_svg]:size-6",children:c.icon}),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??c.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s??c.description}),(a||o)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:a??e.jsx(q,{onClick:o,variant:"outline",children:"Try again"})})]})});ts.displayName="ErrorState";const so=pn.FormProvider,ns=l.createContext(null);function ao(n){return e.jsx(ns.Provider,{value:{name:n.name},children:e.jsx(pn.Controller,{...n})})}const rs=l.createContext(null);function St(){const n=l.useContext(ns),t=l.useContext(rs),{getFieldState:r,formState:s}=pn.useFormContext();if(!n)throw new Error("useFormField must be used inside <FormField>");const a=r(n.name,s),o=(t==null?void 0:t.id)??"";return{id:o,name:n.name,formItemId:`${o}-item`,formDescriptionId:`${o}-desc`,formMessageId:`${o}-error`,...a}}const ss=l.forwardRef(function({className:t,...r},s){const a=l.useId();return e.jsx(rs.Provider,{value:{id:a},children:e.jsx("div",{ref:s,className:x("flex flex-col gap-1.5",t),...r})})});ss.displayName="FormItem";const as=l.forwardRef(function({className:t,...r},s){const{formItemId:a,error:o}=St();return e.jsx(ka.Root,{ref:s,htmlFor:a,className:x("text-sm font-medium text-foreground",o&&"text-danger-text",t),...r})});as.displayName="FormLabel";const os=l.forwardRef(function(t,r){const{error:s,formItemId:a,formDescriptionId:o,formMessageId:i}=St();return e.jsx(cr.Slot,{ref:r,id:a,"aria-describedby":s?`${o} ${i}`:o,"aria-invalid":!!s,...t})});os.displayName="FormControl";const is=l.forwardRef(function({className:t,...r},s){const{formDescriptionId:a}=St();return e.jsx("p",{ref:s,id:a,className:x("text-xs text-foreground-subtle",t),...r})});is.displayName="FormDescription";const ls=l.forwardRef(function({className:t,children:r,...s},a){const{error:o,formMessageId:i}=St(),d=o?String((o==null?void 0:o.message)??""):r;return d?e.jsx("p",{ref:a,id:i,role:"alert",className:x("text-xs text-danger-text",t),...s,children:d}):null});ls.displayName="FormError";const cs=l.forwardRef(function({size:t="sm",className:r,...s},a){return e.jsx("kbd",{ref:a,className:x("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...s})});cs.displayName="Kbd";const ds=l.forwardRef(function({options:t,value:r,onChange:s,label:a,helperText:o,error:i,placeholder:d="Select…",emptyText:u="No results.",maxVisibleChips:c=4,clearable:g=!0,disabled:m,className:f},b){const h=l.useId(),v=h,j=`${h}-helper`,w=`${h}-error`,[N,S]=l.useState(!1),[y,k]=l.useState(""),D=l.useRef(null),C=l.useMemo(()=>t.filter(P=>r.includes(P.value)),[t,r]),T=l.useCallback(P=>{r.includes(P)?s(r.filter(_=>_!==P)):s([...r,P])},[r,s]),R=l.useCallback(()=>s([]),[s]),L=P=>{P.key==="Backspace"&&y===""&&r.length>0&&s(r.slice(0,-1))},E=C.slice(0,c),F=C.length-E.length,I=!!i;return e.jsxs("div",{ref:b,className:x("flex flex-col gap-1.5",f),children:[a&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:a}),e.jsxs(Z.Root,{open:N,onOpenChange:S,children:[e.jsx(Z.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":N,"aria-controls":`${v}-list`,"aria-haspopup":"listbox",id:v,tabIndex:m?-1:0,onKeyDown:L,"aria-disabled":m||void 0,"aria-invalid":I||void 0,"aria-describedby":I?w:o?j:void 0,className:x("flex w-full min-h-9 cursor-text flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",I?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",m&&"opacity-50 pointer-events-none"),onClick:()=>{var P;return(P=D.current)==null?void 0:P.focus()},children:[E.length===0&&e.jsx("span",{className:"text-foreground-subtle px-1",children:d}),E.map(P=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[P.label,e.jsx("button",{type:"button","aria-label":`Remove ${P.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:_=>{_.stopPropagation(),T(P.value)},children:e.jsx(p.X,{className:"size-3","aria-hidden":!0})})]},P.value)),F>0&&e.jsxs("span",{className:"rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",F," more"]}),e.jsx("input",{ref:D,value:y,onChange:P=>k(P.target.value),onFocus:()=>S(!0),className:"flex-1 min-w-[8ch] bg-transparent text-sm outline-none placeholder:text-foreground-subtle",placeholder:(C.length===0,""),disabled:m}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[g&&C.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:P=>{P.stopPropagation(),R()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})}),e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(Z.Portal,{children:e.jsx(Z.Content,{align:"start",sideOffset:4,className:x("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-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"),onOpenAutoFocus:P=>P.preventDefault(),children:e.jsx(de.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(de.Command.List,{id:`${v}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(P=>P.label.toLowerCase().includes(y.toLowerCase())).map(P=>{const _=r.includes(P.value);return e.jsxs(de.Command.Item,{value:P.value,disabled:P.disabled,onSelect:()=>T(P.value),className:x("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:x("flex size-4 items-center justify-center rounded-sm border",_?"border-accent bg-accent text-on-accent":"border-border"),children:_&&e.jsx(p.Check,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:P.label}),P.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:P.description})]},P.value)}),e.jsx(de.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:u})]})})})})]}),i?e.jsx("p",{id:w,role:"alert",className:"text-xs text-danger-text",children:i}):o?e.jsx("p",{id:j,className:"text-xs text-foreground-subtle",children:o}):null]})});ds.displayName="MultiSelect";const In=ue.Root,oo=ue.Value,Wt=l.forwardRef(function({className:t,placeholder:r,size:s="md",tone:a="default",...o},i){return e.jsxs(ue.Trigger,{ref:i,className:x("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",s==="sm"&&"h-8 px-2.5",s==="md"&&"h-9 px-3",s==="lg"&&"h-10 px-3.5",a==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...o,children:[e.jsx(ue.Value,{placeholder:r}),e.jsx(ue.Icon,{asChild:!0,children:e.jsx(p.ChevronsUpDown,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});Wt.displayName="SelectTrigger";const us="flex h-6 cursor-default items-center justify-center text-foreground-subtle",Mn=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollUpButton,{ref:s,className:x(us,t),...r,children:e.jsx(p.ChevronUp,{className:"size-4","aria-hidden":!0})})});Mn.displayName="SelectScrollUpButton";const Pn=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.ScrollDownButton,{ref:s,className:x(us,t),...r,children:e.jsx(p.ChevronDown,{className:"size-4","aria-hidden":!0})})});Pn.displayName="SelectScrollDownButton";const Xt=l.forwardRef(function({className:t,children:r,position:s="popper",...a},o){return e.jsx(ue.Portal,{children:e.jsxs(ue.Content,{ref:o,position:s,className:x("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-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",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...a,children:[e.jsx(Mn,{}),e.jsx(ue.Viewport,{className:"p-1",children:r}),e.jsx(Pn,{})]})})});Xt.displayName="SelectContent";const zn=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Label,{ref:s,className:x("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});zn.displayName="SelectLabel";const Ze=l.forwardRef(function({className:t,children:r,leadingIcon:s,...a},o){return e.jsxs(ue.Item,{ref:o,className:x("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...a,children:[s&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:s}),e.jsx(ue.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(ue.ItemIndicator,{children:e.jsx(p.Check,{className:"size-4 text-accent","aria-hidden":!0})})})]})});Ze.displayName="SelectItem";const fs=l.forwardRef(function({className:t,...r},s){return e.jsx(ue.Separator,{ref:s,className:x("-mx-1 my-1 h-px bg-border",t),...r})});fs.displayName="SelectSeparator";const ms=l.forwardRef(function({label:t,children:r,...s},a){return e.jsxs(ue.Group,{ref:a,...s,children:[t&&e.jsx(zn,{children:t}),r]})});ms.displayName="SelectGroup";function io(n,t,r=7){if(t<=r)return Array.from({length:t},(d,u)=>u+1);const s=1,a=[],o=Math.max(2,n-s),i=Math.min(t-1,n+s);a.push(1),o>2&&a.push("gap");for(let d=o;d<=i;d++)a.push(d);return i<t-1&&a.push("gap"),a.push(t),a}const En=l.forwardRef(function({page:t,pageCount:r,onPageChange:s,totalItems:a,pageSize:o,pageSizeOptions:i,onPageSizeChange:d,showJump:u=!0,className:c,...g},m){const f=l.useMemo(()=>io(t,r),[t,r]),b=o?(t-1)*o+1:void 0,h=o&&a?Math.min(t*o,a):void 0,v=j=>{j<1||j>r||j===t||s(j)};return e.jsxs("nav",{ref:m,"aria-label":"Pagination",className:x("flex flex-wrap items-center justify-between gap-3",c),...g,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[a!==void 0&&o!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",b,"–",h," of ",a]}),i&&d&&o!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(In,{value:String(o),onValueChange:j=>d(Number(j)),children:[e.jsx(Wt,{size:"sm",className:"w-20"}),e.jsx(Xt,{children:i.map(j=>e.jsxs(Ze,{value:String(j),children:[j," / page"]},j))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>v(1),className:Pt,children:e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>v(t-1),className:Pt,children:e.jsx(p.ChevronLeft,{className:"size-4","aria-hidden":!0})})}),f.map((j,w)=>j==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${w}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${j}`,"aria-current":j===t?"page":void 0,onClick:()=>v(j),className:x("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",j===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:j})},j)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>v(t+1),className:Pt,children:e.jsx(p.ChevronRight,{className:"size-4","aria-hidden":!0})})}),u&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>v(r),className:Pt,children:e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0})})})]})]})});En.displayName="Pagination";const Pt=x("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),lo=Z.Root,co=Z.Trigger,uo=Z.Anchor,fo=Z.Close,xs=l.forwardRef(function({className:t,align:r="center",sideOffset:s=4,...a},o){return e.jsx(Z.Portal,{children:e.jsx(Z.Content,{ref:o,align:r,sideOffset:s,className:x("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","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-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...a})})});xs.displayName="PopoverContent";const mo={sm:"h-1",md:"h-1.5",lg:"h-2"},xo={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},gs=l.forwardRef(function({className:t,value:r,size:s="md",tone:a="accent",...o},i){const d=r==null;return e.jsxs(Yn.Root,{ref:i,value:d?void 0:r,className:x("relative w-full overflow-hidden rounded-full bg-background-muted",mo[s],t),...o,children:[e.jsx(Yn.Indicator,{className:x("h-full w-full flex-1 transition-transform",xo[a],d&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:d?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
|
|
2
2
|
@keyframes progressIndeterminate {
|
|
3
3
|
0% { transform: translateX(-100%) scaleX(0.6); }
|
|
4
4
|
50% { transform: translateX(0%) scaleX(0.4); }
|
|
5
5
|
100% { transform: translateX(100%) scaleX(0.6); }
|
|
6
6
|
}
|
|
7
|
-
`})]})});Cr.displayName="Progress";const aa={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},kr=i.forwardRef(function({value:t,size:r=36,thickness:s=3,className:n,tone:o="accent",...c},u){const m=t===void 0,x=(r-s)/2,g=2*Math.PI*x,h=m?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:u,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m?void 0:t,className:l("shrink-0",m&&"animate-spin",n),...c,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:x,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:x,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:m?g*.7:h,className:l(aa[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});kr.displayName="ProgressCircle";const at=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(Be.Root,{ref:n,className:l("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});at.displayName="RadioGroup";const xe=i.forwardRef(function({className:t,label:r,description:s,hideLabel:n,id:o,disabled:c,...u},m){const x=i.useId(),g=o??x,h=s?`${g}-desc`:void 0;return e.jsxs("div",{className:l("flex items-start gap-2.5",t),children:[e.jsx(Be.Item,{ref:m,id:g,disabled:c,"aria-describedby":h,className:l("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...u,children:e.jsx(Be.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:l("flex flex-col gap-0.5",n&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:l("text-sm text-foreground select-none",c&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:h,className:"text-xs text-foreground-subtle",children:s})]})]})});xe.displayName="RadioItem";const Sr=i.forwardRef(function({className:t,children:r,...s},n){return e.jsxs(ue.Root,{ref:n,className:l("relative overflow-hidden",t),...s,children:[e.jsx(ue.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx(nt,{}),e.jsx(ue.Corner,{})]})});Sr.displayName="ScrollArea";const nt=i.forwardRef(function({className:t,orientation:r="vertical",...s},n){return e.jsx(ue.ScrollAreaScrollbar,{ref:n,orientation:r,className:l("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});nt.displayName="ScrollBar";const ne=i.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...n},o){return e.jsx(hs.Root,{ref:o,orientation:r,decorative:s,className:l("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...n})});ne.displayName="Separator";const na=C.Root,oa=C.Trigger,ia=C.Close,Tr=C.Portal,Rr=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Overlay,{ref:s,className:l("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});Rr.displayName="SheetOverlay";const la=O.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),zr=i.forwardRef(function({className:t,children:r,side:s="right",showClose:n=!0,...o},c){return e.jsxs(Tr,{children:[e.jsx(Rr,{}),e.jsxs(C.Content,{ref:c,className:l(la({side:s}),t),...o,children:[r,n&&e.jsx(C.Close,{"aria-label":"Close",className:l("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})]})]})});zr.displayName="SheetContent";function Ir({className:a,...t}){return e.jsx("div",{className:l("flex flex-col gap-1",a),...t})}Ir.displayName="SheetHeader";function Dr({className:a,...t}){return e.jsx("div",{className:l("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",a),...t})}Dr.displayName="SheetFooter";const Mr=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Title,{ref:s,className:l("text-lg font-semibold text-foreground leading-tight",t),...r})});Mr.displayName="SheetTitle";const Pr=i.forwardRef(function({className:t,...r},s){return e.jsx(C.Description,{ref:s,className:l("text-sm text-foreground-muted",t),...r})});Pr.displayName="SheetDescription";const Ae=i.createContext({collapsed:!1}),ot=i.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,footer:n,className:o,children:c,...u},m){const[x,g]=i.useState(t),h=r??x,f=p=>{r===void 0&&g(p),s==null||s(p)};return e.jsx(Ae.Provider,{value:{collapsed:h},children:e.jsxs("aside",{ref:m,"aria-label":"Primary",className:l("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",h?"w-14":"w-60",o),...u,children:[e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:c}),n&&e.jsx("div",{className:"border-t border-border p-2",children:n}),e.jsxs("button",{type:"button",onClick:()=>f(!h),"aria-label":h?"Expand sidebar":"Collapse sidebar","aria-expanded":!h,className:l("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[h?e.jsx(d.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(d.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!h&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});ot.displayName="Sidebar";function ye({label:a,className:t,children:r,...s}){const{collapsed:n}=i.useContext(Ae);return e.jsxs("div",{className:l("mb-3",t),...s,children:[a&&!n&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:a}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}ye.displayName="SidebarSection";function se({icon:a,active:t,href:r,trailing:s,sub:n,className:o,children:c,...u}){const{collapsed:m}=i.useContext(Ae),x=r?"a":"button";return e.jsx("li",{children:e.jsxs(x,{href:r,"aria-current":t?"page":void 0,className:l("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",n&&!m&&"ml-6",m&&"justify-center",o),...u,children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),!m&&e.jsx("span",{className:"flex-1 truncate text-left",children:c}),!m&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}se.displayName="SidebarItem";function Ar({icon:a,label:t,defaultOpen:r=!0,children:s}){const{collapsed:n}=i.useContext(Ae),[o,c]=i.useState(r);return n?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>c(u=>!u),"aria-expanded":o,className:l("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[a&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:a}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(d.ChevronDown,{className:l("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}Ar.displayName="SidebarGroup";const _r=i.forwardRef(function({className:t,label:r,showValue:s,formatValue:n=x=>String(x),value:o,defaultValue:c,...u},m){const x=o??c??[0],g=x.length>1;return e.jsxs("div",{className:l("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${n(x[0])} – ${n(x[1])}`:n(x[0])})]}),e.jsxs(be.Root,{ref:m,value:o,defaultValue:c,className:"relative flex w-full touch-none select-none items-center",...u,children:[e.jsx(be.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(be.Range,{className:"absolute h-full bg-accent"})}),x.map((h,f)=>e.jsx(be.Thumb,{className:l("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});_r.displayName="Slider";const da={sm:"size-3.5",md:"size-4",lg:"size-6"},ca={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},Fr=i.forwardRef(function({className:t,tone:r="accent",size:s="md",label:n,decorative:o,...c},u){return e.jsxs("svg",{ref:u,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:n??"Loading","aria-hidden":o||void 0,className:l("animate-spin",da[s],ca[r],t),...c,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});Fr.displayName="Spinner";const it=i.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:n,...o},c){return e.jsx("ol",{ref:c,"aria-label":"Progress",className:l(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",n),...o,children:t.map((u,m)=>{const x=m<r?"complete":m===r?"current":"upcoming",g=m===t.length-1;return e.jsxs("li",{"aria-current":x==="current"?"step":void 0,className:l(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:l(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:l("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",x==="complete"&&"bg-accent text-on-accent",x==="current"&&"bg-card border-2 border-accent text-accent",x==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:x==="complete"?e.jsx(d.Check,{className:"size-4"}):m+1}),s==="vertical"&&!g&&e.jsx("span",{className:l("mt-1 w-px flex-1 min-h-6",m<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:l("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:l("text-sm font-medium",x==="upcoming"?"text-foreground-subtle":"text-foreground"),children:u.title}),s==="vertical"&&u.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:u.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:l("h-px flex-1 mx-2",m<r?"bg-accent":"bg-border")})]},m)})})});it.displayName="Stepper";const ua={sm:"h-4 w-7",md:"h-5 w-9"},ma={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},le=i.forwardRef(function({className:t,label:r,description:s,labelPosition:n="after",size:o="md",hideLabel:c,id:u,disabled:m,...x},g){const h=i.useId(),f=u??h,p=s?`${f}-desc`:void 0,b=e.jsx(xt.Root,{ref:g,id:f,disabled:m,"aria-describedby":p,className:l("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","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-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",ua[o]),...x,children:e.jsx(xt.Thumb,{className:l("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",ma[o])})}),w=r&&e.jsxs("div",{className:l("flex flex-col gap-0.5 select-none",c&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:l("text-sm text-foreground",m&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:p,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:l("inline-flex items-center gap-2.5",t),children:[n==="before"&&w,b,n==="after"&&w]})});le.displayName="Switch";const Lr=Ce.Root,xa=O.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),lt=i.forwardRef(function({className:t,variant:r,size:s,...n},o){return e.jsx(Ce.List,{ref:o,"data-variant":r,className:l(xa({variant:r,size:s}),t),...n})});lt.displayName="TabsList";const de=i.forwardRef(function({className:t,...r},s){return e.jsx(Ce.Trigger,{ref:s,className:l("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});de.displayName="TabsTrigger";const ce=i.forwardRef(function({className:t,...r},s){return e.jsx(Ce.Content,{ref:s,className:l("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});ce.displayName="TabsContent";const Br=i.forwardRef(function({className:t,label:r,helperText:s,error:n,autoResize:o,minRows:c=3,maxRows:u=12,hideLabel:m,id:x,onChange:g,value:h,defaultValue:f,...p},b){const w=i.useId(),v=x??w,B=`${v}-helper`,U=`${v}-error`,M=i.useRef(null),$=y=>{M.current=y,typeof b=="function"?b(y):b&&(b.current=y)},E=i.useCallback(()=>{const y=M.current;if(!y||!o)return;y.style.height="auto";const X=(parseFloat(getComputedStyle(y).lineHeight)||20)*u;y.style.height=`${Math.min(y.scrollHeight,X)}px`,y.style.overflowY=y.scrollHeight>X?"auto":"hidden"},[o,u]);return i.useEffect(()=>{o&&E()},[o,E,h,f]),e.jsxs("div",{className:l("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:v,className:l("text-sm font-medium text-foreground",m&&"sr-only"),children:r}),e.jsx("textarea",{ref:$,id:v,rows:c,value:h,defaultValue:f,onChange:y=>{g==null||g(y),o&&E()},"aria-invalid":!!n||void 0,"aria-describedby":n?U:s?B:void 0,className:l("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",n?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...p}),n?e.jsx("p",{id:U,role:"alert",className:"text-xs text-danger-text",children:n}):s?e.jsx("p",{id:B,className:"text-xs text-foreground-subtle",children:s}):null]})});Br.displayName="Textarea";const fa=oe.Provider,Er=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Viewport,{ref:s,className:l("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Er.displayName="ToastViewport";const ga=O.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),pa={default:null,success:e.jsx(d.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(d.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(d.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(d.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Or=i.forwardRef(function({className:t,variant:r="default",children:s,...n},o){return e.jsxs(oe.Root,{ref:o,className:l(ga({variant:r}),t),...n,children:[pa[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Or.displayName="Toast";const $r=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Title,{ref:s,className:l("text-sm font-medium",t),...r})});$r.displayName="ToastTitle";const Gr=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Description,{ref:s,className:l("text-sm opacity-90",t),...r})});Gr.displayName="ToastDescription";const Hr=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Action,{ref:s,className:l("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});Hr.displayName="ToastAction";const Ur=i.forwardRef(function({className:t,...r},s){return e.jsx(oe.Close,{ref:s,"aria-label":"Close",className:l("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(d.X,{className:"size-4","aria-hidden":!0})})});Ur.displayName="ToastClose";const ha=({delayDuration:a=500,skipDelayDuration:t=200,...r})=>e.jsx(ge.Provider,{delayDuration:a,skipDelayDuration:t,...r}),qr=ge.Root,Vr=ge.Trigger,dt=i.forwardRef(function({className:t,sideOffset:r=4,...s},n){return e.jsx(ge.Portal,{children:e.jsx(ge.Content,{ref:n,sideOffset:r,className:l("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","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",t),...s})})});dt.displayName="TooltipContent";function Wr({children:a,label:t,side:r="top",align:s="center",disabled:n,delayDuration:o}){return n?e.jsx(e.Fragment,{children:a}):e.jsxs(qr,{delayDuration:o,children:[e.jsx(Vr,{asChild:!0,children:a}),e.jsx(dt,{side:r,align:s,children:t})]})}Wr.displayName="Tooltip";const ct=i.forwardRef(function({logo:t,nav:r,search:s,actions:n,className:o,...c},u){return e.jsxs("header",{ref:u,className:l("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...c,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),n&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:n})]})});ct.displayName="TopNav";const Xr=i.forwardRef(function({href:t,active:r,className:s,children:n,...o},c){return e.jsx("a",{ref:c,href:t,"aria-current":r?"page":void 0,className:l("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:n})});Xr.displayName="TopNavLink";function ba({brand:a,title:t,subtitle:r,children:s,footer:n}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[a&&e.jsx("div",{className:"flex justify-center",children:a}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),n&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:n})]})})}function va({onSubmit:a,loading:t,error:r,forgotHref:s="/forgot"}){const[n,o]=i.useState(""),[c,u]=i.useState(""),m=x=>{x.preventDefault(),a({email:n,password:c})};return e.jsxs("form",{onSubmit:m,className:"space-y-4",children:[r&&e.jsx(pe,{variant:"danger",children:r}),e.jsx(S,{type:"email",label:"Email",value:n,onChange:x=>o(x.target.value),autoComplete:"email",required:!0}),e.jsx(S,{type:"password",label:"Password",value:c,onChange:x=>u(x.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(N,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(d.ArrowRight,{}),children:"Sign in"})]})}function ja({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState(""),[o,c]=i.useState(""),[u,m]=i.useState("");return e.jsxs("form",{onSubmit:x=>{x.preventDefault(),a({name:s,email:o,password:u})},className:"space-y-4",children:[r&&e.jsx(pe,{variant:"danger",children:r}),e.jsx(S,{label:"Full name",value:s,onChange:x=>n(x.target.value),required:!0}),e.jsx(S,{type:"email",label:"Work email",value:o,onChange:x=>c(x.target.value),autoComplete:"email",required:!0}),e.jsx(S,{type:"password",label:"Password",helperText:"At least 8 characters.",value:u,onChange:x=>m(x.target.value),autoComplete:"new-password",required:!0}),e.jsx(N,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function Na({onSubmit:a,loading:t,error:r}){const[s,n]=i.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),a(s)},className:"space-y-4",children:[r&&e.jsx(pe,{variant:"danger",children:r}),e.jsx(S,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>n(o.target.value),autoComplete:"email",required:!0}),e.jsx(N,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(d.Mail,{}),children:"Send reset link"})]})}function wa({email:a,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(d.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:a}),". Open it on this device to continue."]}),e.jsx(ne,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function ya({children:a,brand:t}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsxs(ot,{defaultCollapsed:!1,footer:e.jsx(se,{icon:e.jsx(H,{fallback:"BO",size:"xs"}),className:"!h-10",children:"Bay Otgonbayar"}),children:[e.jsxs(ye,{label:"Workspace",children:[e.jsx(se,{icon:e.jsx(d.Home,{}),active:!0,children:"Home"}),e.jsx(se,{icon:e.jsx(d.Folder,{}),children:"Projects"}),e.jsx(se,{icon:e.jsx(d.Users,{}),trailing:e.jsx(V,{tone:"accent",children:"3"}),children:"Members"})]}),e.jsx(ye,{label:"Account",children:e.jsx(se,{icon:e.jsx(d.Settings,{}),children:"Settings"})})]}),e.jsxs("div",{className:"flex flex-1 flex-col min-w-0",children:[e.jsx(ct,{logo:t,search:e.jsx(S,{type:"search",placeholder:"Search…",hideLabel:!0,label:"Search",prefix:e.jsx(d.Search,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(Te,{"aria-label":"Notifications",icon:e.jsx(d.Bell,{}),variant:"ghost"}),e.jsx(H,{size:"sm",fallback:"BO"})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:a})]})]})}const Ca=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],ka=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function Sa(){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Overview"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"What's happening across your workspace today."})]}),e.jsx("div",{className:"hidden md:flex items-center gap-2",children:e.jsx(V,{tone:"neutral",variant:"outline",children:"Last 7 days"})})]}),e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:Ca.map(a=>e.jsxs(A,{children:[e.jsx(_,{className:"pb-2",children:e.jsx(q,{children:a.label})}),e.jsx(F,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-semibold tabular text-foreground",children:a.value}),a.delta&&e.jsx("span",{className:a.delta.positive?"text-xs font-medium text-success-text tabular":"text-xs font-medium text-danger-text tabular",children:a.delta.value})]})})]},a.label))}),e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Active users"}),e.jsx(q,{children:"Distinct sessions per day, last 30 days."})]}),e.jsx(F,{children:e.jsx("div",{role:"img","aria-label":"Active users sparkline",className:"h-48 w-full rounded-md border border-dashed border-border bg-background-subtle"})})]}),e.jsxs(A,{padding:"none",children:[e.jsx(_,{className:"px-5 pt-5",children:e.jsx(L,{children:"Recent activity"})}),e.jsxs(Re,{children:[e.jsx(ze,{children:e.jsxs(J,{children:[e.jsx(Z,{children:"Who"}),e.jsx(Z,{children:"Action"}),e.jsx(Z,{children:"Target"}),e.jsx(Z,{className:"text-right",children:"When"})]})}),e.jsx(Ie,{children:ka.map(a=>e.jsxs(J,{children:[e.jsx(Q,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(H,{size:"xs",fallback:a.who.initials}),e.jsx("span",{className:"text-foreground",children:a.who.name})]})}),e.jsx(Q,{className:"text-foreground-muted",children:a.action}),e.jsx(Q,{children:e.jsx(V,{tone:"neutral",variant:"outline",children:a.target})}),e.jsx(Q,{className:"text-right tabular text-foreground-subtle",children:a.when})]},a.id))})]})]})]})}const Ta=[{id:"profile",label:"Profile",icon:e.jsx(d.User,{})},{id:"security",label:"Security",icon:e.jsx(d.Lock,{})},{id:"notifications",label:"Notifications",icon:e.jsx(d.Bell,{})},{id:"billing",label:"Billing",icon:e.jsx(d.CreditCard,{})},{id:"team",label:"Team",icon:e.jsx(d.Users,{})}];function Ra(){const[a,t]=i.useState("profile");return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Settings"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"Manage your account, preferences, and billing."})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:Ta.map(r=>e.jsx("li",{children:e.jsxs("a",{href:`#${r.id}`,onClick:()=>t(r.id),className:l("flex h-9 items-center gap-2 rounded-md px-2 text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",a===r.id?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":a===r.id?"page":void 0,children:[e.jsx("span",{className:"[&_svg]:size-4",children:r.icon}),r.label]})},r.id))})}),e.jsxs("div",{className:"space-y-8",children:[e.jsx("section",{id:"profile",children:e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Profile"}),e.jsx(q,{children:"Visible to your teammates."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(H,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(N,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-2",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(ne,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(S,{label:"First name",defaultValue:"Bay"}),e.jsx(S,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(S,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(N,{children:"Save changes"})})]})]})}),e.jsx("section",{id:"security",children:e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Security"}),e.jsx(q,{children:"How you sign in and protect your account."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsx(S,{label:"Current password",type:"password"}),e.jsx(S,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(ne,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(le,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(N,{children:"Update password"})})]})]})}),e.jsx("section",{id:"notifications",children:e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Notifications"}),e.jsx(q,{children:"Choose what we email and ping you about."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsx(le,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(ne,{}),e.jsx(le,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(ne,{}),e.jsx(le,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})}),e.jsx("section",{id:"billing",children:e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Billing"}),e.jsx(q,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(N,{variant:"outline",children:"Manage seats"}),e.jsx(N,{children:"Upgrade plan"})]})]})]})}),e.jsx("section",{id:"team",children:e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:"Team"}),e.jsx(q,{children:"Invite teammates and manage roles."})]}),e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(S,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(N,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})})]})]})]})}const za=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],gt={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}};function Ia(){const[a,t]=i.useState(""),[r,s]=i.useState("all"),[n,o]=i.useState([]),[c,u]=i.useState(1),[m,x]=i.useState(10),g=i.useMemo(()=>za.filter(p=>{const b=p.name.toLowerCase().includes(a.toLowerCase()),w=r==="all"||p.status===r;return b&&w}),[a,r]),h=g.length>0&&n.length===g.length,f=n.length>0&&!h;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Projects"}),e.jsxs("p",{className:"text-sm text-foreground-muted mt-1",children:[g.length," project",g.length===1?"":"s"," match your filters."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"outline",leadingIcon:e.jsx(d.Upload,{}),children:"Import"}),e.jsx(N,{leadingIcon:e.jsx(d.Plus,{}),children:"New project"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(Ze,{value:r,onValueChange:s,children:[e.jsx(Me,{className:"w-36",placeholder:"Status"}),e.jsxs(Pe,{children:[e.jsx(ae,{value:"all",children:"All statuses"}),e.jsx(ae,{value:"active",children:"Active"}),e.jsx(ae,{value:"paused",children:"Paused"}),e.jsx(ae,{value:"archived",children:"Archived"})]})]}),e.jsx(N,{variant:"outline",size:"sm",leadingIcon:e.jsx(d.Filter,{}),children:"More filters"})]}),n.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(me,{checked:h?!0:f?"indeterminate":!1,onCheckedChange:p=>o(p?g.map(b=>b.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[n.length," selected"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"ghost",size:"sm",leadingIcon:e.jsx(d.Download,{}),children:"Export"}),e.jsx(N,{variant:"ghost",size:"sm",leadingIcon:e.jsx(d.Trash2,{}),children:"Delete"})]})]}),e.jsx(er,{rows:g.slice((c-1)*m,c*m),filter:{value:a,onChange:t,placeholder:"Search projects…"},emptyState:e.jsx(De,{title:"No projects match",description:"Try adjusting filters or creating a new project.",action:e.jsx(N,{leadingIcon:e.jsx(d.Plus,{}),children:"New project"}),className:"border-0 bg-transparent"}),columns:[{key:"select",header:e.jsx(me,{checked:h?!0:f?"indeterminate":!1,onCheckedChange:p=>o(p?g.map(b=>b.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:p=>e.jsx(me,{checked:n.includes(p.id),onCheckedChange:b=>o(w=>b?[...w,p.id]:w.filter(v=>v!==p.id)),"aria-label":`Select ${p.name}`})},{key:"name",header:"Name",sortable:!0,cell:p=>e.jsx("span",{className:"font-medium text-foreground",children:p.name})},{key:"status",header:"Status",cell:p=>e.jsx(V,{tone:gt[p.status].tone,dot:!0,children:gt[p.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}]}),e.jsx(st,{page:c,pageCount:Math.max(1,Math.ceil(g.length/m)),onPageChange:u,totalItems:g.length,pageSize:m,pageSizeOptions:[10,20,50],onPageSizeChange:p=>{x(p),u(1)}})]})}function Da(){return e.jsxs("div",{className:"space-y-6",children:[e.jsx(Oe,{items:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Pulse onboarding"}),e.jsx(V,{tone:"success",dot:!0,children:"Active"})]}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-2xl",children:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"outline",leadingIcon:e.jsx(d.Edit2,{}),children:"Edit"}),e.jsx(N,{variant:"outline",leadingIcon:e.jsx(d.Trash2,{}),children:"Archive"}),e.jsx(N,{trailingIcon:e.jsx(d.ExternalLink,{}),children:"Open in app"})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_320px]",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Lr,{defaultValue:"overview",children:[e.jsxs(lt,{children:[e.jsx(de,{value:"overview",children:"Overview"}),e.jsx(de,{value:"activity",children:"Activity"}),e.jsx(de,{value:"files",children:"Files"}),e.jsx(de,{value:"settings",children:"Settings"})]}),e.jsx(ce,{value:"overview",className:"space-y-4",children:e.jsxs(A,{children:[e.jsx(_,{children:e.jsx(L,{children:"Summary"})}),e.jsxs(F,{className:"space-y-2 text-foreground-muted leading-relaxed",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})}),e.jsx(ce,{value:"activity",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Activity feed appears here."})}),e.jsx(ce,{value:"files",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Linked documents appear here."})}),e.jsx(ce,{value:"settings",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Project settings appear here."})})]})}),e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(A,{children:[e.jsx(_,{children:e.jsx(L,{children:"Details"})}),e.jsxs(F,{className:"space-y-3 text-sm",children:[e.jsx(je,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(H,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx(je,{label:"Created",value:"12 Feb 2026"}),e.jsx(je,{label:"Updated",value:"2 hours ago"}),e.jsx(je,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(V,{tone:"accent",children:"growth"})," ",e.jsx(V,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(A,{children:[e.jsx(_,{children:e.jsx(L,{children:"Watchers"})}),e.jsx(F,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(H,{fallback:"AB"}),e.jsx(H,{fallback:"BE"}),e.jsx(H,{fallback:"TG"}),e.jsx(H,{fallback:"+2"})]})})]})]})]})]})}function je({label:a,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:a}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}const Ne=[{title:"Workspace"},{title:"Invite team"},{title:"Connect data"},{title:"Done"}];function Ma(){const[a,t]=i.useState(0),r=()=>t(n=>Math.min(n+1,Ne.length-1)),s=()=>t(n=>Math.max(n-1,0));return e.jsxs("div",{className:"mx-auto max-w-2xl space-y-8 py-12",children:[e.jsx(it,{steps:Ne,current:a}),e.jsxs(A,{children:[e.jsxs(_,{children:[e.jsx(L,{children:pt[a].title}),e.jsx(q,{children:pt[a].description})]}),e.jsxs(F,{className:"space-y-4",children:[a===0&&e.jsxs(e.Fragment,{children:[e.jsx(S,{label:"Workspace name",placeholder:"Acme Inc."}),e.jsx(S,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme"})]}),a===1&&e.jsxs(e.Fragment,{children:[e.jsx(S,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas."}),e.jsxs(at,{defaultValue:"member",children:[e.jsx(xe,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(xe,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(xe,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]}),a===2&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(n=>e.jsxs("button",{type:"button",className:"rounded-lg border border-border bg-card p-4 text-left hover:border-border-strong hover:bg-background-subtle transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx("p",{className:"font-medium text-foreground",children:n}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Quick setup with SSO"})]},n))})]}),a===3&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(d.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-sm",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(N,{variant:"ghost",leadingIcon:e.jsx(d.ArrowLeft,{}),onClick:s,disabled:a===0,children:"Back"}),a<Ne.length-1?e.jsx(N,{trailingIcon:e.jsx(d.ArrowRight,{}),onClick:r,children:a===Ne.length-2?"Finish":"Continue"}):e.jsx(N,{children:"Open workspace"})]})]})}const pt=[{title:"Create your workspace",description:"A workspace is where your team and projects live."},{title:"Invite your team",description:"You can always invite more people later."},{title:"Connect a data source",description:"Pick one — others can be added in settings."},{title:"Welcome aboard",description:"We've set up your starting dashboard."}],Pa=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function Aa(){return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 py-16",children:[e.jsxs("header",{className:"text-center space-y-3",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Plans that scale with your team"}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-xl mx-auto",children:"Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required."})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:Pa.map(a=>e.jsxs("div",{className:l("flex flex-col gap-6 rounded-lg border bg-card p-6",a.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:a.name}),a.highlighted&&e.jsx(V,{tone:"accent",children:"Most popular"})]}),e.jsx("p",{className:"text-sm text-foreground-muted",children:a.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-3xl font-semibold tabular text-foreground",children:a.price}),e.jsx("span",{className:"text-sm text-foreground-subtle",children:a.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:a.features.map(t=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(d.Check,{className:"size-4 text-accent shrink-0 mt-0.5","aria-hidden":!0}),t]},t))}),e.jsx(N,{variant:a.highlighted?"primary":"outline",className:"mt-auto w-full",children:a.cta})]},a.name))})]})}const _a=[{icon:e.jsx(d.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(d.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(d.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Fa(){return e.jsxs("div",{className:"mx-auto max-w-3xl space-y-8 py-12",children:[e.jsx(De,{icon:e.jsx(d.Folder,{className:"size-6"}),title:"Your workspace is ready",description:"Start with one of the steps below — you can always come back to the others.",action:e.jsx(N,{trailingIcon:e.jsx(d.ArrowRight,{}),children:"Open tutorial"})}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:_a.map(a=>e.jsx(A,{variant:"interactive",children:e.jsxs(F,{className:"space-y-3",children:[e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:a.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:a.description})]}),e.jsx(N,{variant:"ghost",size:"sm",trailingIcon:e.jsx(d.ArrowRight,{}),children:a.cta})]})},a.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>O.cva});exports.Accordion=ys;exports.AccordionContent=wt;exports.AccordionItem=jt;exports.AccordionTrigger=Nt;exports.Alert=pe;exports.AppShell=ya;exports.AuthLayout=ba;exports.Avatar=H;exports.AvatarGroup=Ct;exports.Badge=V;exports.Breadcrumbs=Oe;exports.Button=N;exports.Card=A;exports.CardContent=F;exports.CardDescription=q;exports.CardFooter=kt;exports.CardHeader=_;exports.CardTitle=L;exports.Checkbox=me;exports.Combobox=St;exports.Command=Tt;exports.CommandDialog=Ps;exports.CommandEmpty=It;exports.CommandGroup=Dt;exports.CommandInput=Rt;exports.CommandItem=Pt;exports.CommandList=zt;exports.CommandSeparator=Mt;exports.CommandShortcut=Ms;exports.ConfirmationDialog=dr;exports.ContextMenu=_s;exports.ContextMenuCheckboxItem=Et;exports.ContextMenuContent=Lt;exports.ContextMenuGroup=Ls;exports.ContextMenuItem=Bt;exports.ContextMenuLabel=$t;exports.ContextMenuPortal=At;exports.ContextMenuRadioGroup=Es;exports.ContextMenuRadioItem=Ot;exports.ContextMenuSeparator=Gt;exports.ContextMenuShortcut=Ht;exports.ContextMenuSub=Bs;exports.ContextMenuSubContent=Ft;exports.ContextMenuSubTrigger=_t;exports.ContextMenuTrigger=Fs;exports.Dashboard=Sa;exports.DataGrid=er;exports.DataTablePage=Ia;exports.DatePicker=ar;exports.DateRangePicker=nr;exports.Dialog=or;exports.DialogClose=lr;exports.DialogContent=Xe;exports.DialogDescription=Je;exports.DialogFooter=Qe;exports.DialogHeader=Ke;exports.DialogOverlay=We;exports.DialogPortal=ir;exports.DialogTitle=Ye;exports.DialogTrigger=Vs;exports.DropdownMenu=Ut;exports.DropdownMenuCheckboxItem=Ge;exports.DropdownMenuContent=$e;exports.DropdownMenuGroup=Os;exports.DropdownMenuItem=Kt;exports.DropdownMenuLabel=He;exports.DropdownMenuPortal=Vt;exports.DropdownMenuRadioGroup=Gs;exports.DropdownMenuRadioItem=Qt;exports.DropdownMenuSeparator=Ue;exports.DropdownMenuShortcut=Yt;exports.DropdownMenuSub=$s;exports.DropdownMenuSubContent=Xt;exports.DropdownMenuSubTrigger=Wt;exports.DropdownMenuTrigger=qt;exports.EmptyState=De;exports.ErrorState=cr;exports.FirstRunEmpty=Fa;exports.ForgotPasswordForm=Na;exports.Form=Xs;exports.FormControl=gr;exports.FormDescription=pr;exports.FormError=hr;exports.FormField=Ks;exports.FormItem=xr;exports.FormLabel=fr;exports.IconButton=Te;exports.Icons=ws;exports.Input=S;exports.Kbd=br;exports.MagicLinkSent=wa;exports.MultiSelect=vr;exports.Onboarding=Ma;exports.Pagination=st;exports.Popover=Js;exports.PopoverAnchor=ea;exports.PopoverClose=ta;exports.PopoverContent=yr;exports.PopoverTrigger=Zs;exports.Pricing=Aa;exports.Progress=Cr;exports.ProgressCircle=kr;exports.RadioGroup=at;exports.RadioItem=xe;exports.RecordDetail=Da;exports.ScrollArea=Sr;exports.ScrollBar=nt;exports.Select=Ze;exports.SelectContent=Pe;exports.SelectGroup=wr;exports.SelectItem=ae;exports.SelectLabel=rt;exports.SelectScrollDownButton=tt;exports.SelectScrollUpButton=et;exports.SelectSeparator=Nr;exports.SelectTrigger=Me;exports.SelectValue=Qs;exports.Separator=ne;exports.SettingsPage=Ra;exports.Sheet=na;exports.SheetClose=ia;exports.SheetContent=zr;exports.SheetDescription=Pr;exports.SheetFooter=Dr;exports.SheetHeader=Ir;exports.SheetPortal=Tr;exports.SheetTitle=Mr;exports.SheetTrigger=oa;exports.Sidebar=ot;exports.SidebarGroup=Ar;exports.SidebarItem=se;exports.SidebarSection=ye;exports.SignInForm=va;exports.SignUpForm=ja;exports.Skeleton=Ve;exports.Slider=_r;exports.Spinner=Fr;exports.Stepper=it;exports.Switch=le;exports.Table=Re;exports.TableBody=Ie;exports.TableCaption=Zt;exports.TableCell=Q;exports.TableFooter=Jt;exports.TableHead=Z;exports.TableHeader=ze;exports.TableRow=J;exports.TableSortHeader=qe;exports.Tabs=Lr;exports.TabsContent=ce;exports.TabsList=lt;exports.TabsTrigger=de;exports.Textarea=Br;exports.Toast=Or;exports.ToastAction=Hr;exports.ToastClose=Ur;exports.ToastDescription=Gr;exports.ToastProvider=fa;exports.ToastTitle=$r;exports.ToastViewport=Er;exports.Tooltip=Wr;exports.TooltipContent=dt;exports.TooltipProvider=ha;exports.TooltipRoot=qr;exports.TooltipTrigger=Vr;exports.TopNav=ct;exports.TopNavLink=Xr;exports.cn=l;exports.toast=Ns;exports.uid=bs;exports.useCommandPaletteShortcut=As;exports.useFormField=he;exports.useMediaQuery=vt;exports.usePrefersReducedMotion=vs;exports.useToast=js;
|
|
7
|
+
`})]})});gs.displayName="Progress";const go={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},ps=l.forwardRef(function({value:t,size:r=36,thickness:s=3,className:a,tone:o="accent",...i},d){const u=t===void 0,c=(r-s)/2,g=2*Math.PI*c,m=u?0:g-Math.min(100,Math.max(0,t))/100*g;return e.jsxs("svg",{ref:d,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u?void 0:t,className:x("shrink-0",u&&"animate-spin",a),...i,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:s,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:u?g*.7:m,className:x(go[o],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});ps.displayName="ProgressCircle";const An=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(dn.Root,{ref:a,className:x("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...s})});An.displayName="RadioGroup";const ht=l.forwardRef(function({className:t,label:r,description:s,hideLabel:a,id:o,disabled:i,...d},u){const c=l.useId(),g=o??c,m=s?`${g}-desc`:void 0;return e.jsxs("div",{className:x("flex items-start gap-2.5",t),children:[e.jsx(dn.Item,{ref:u,id:g,disabled:i,"aria-describedby":m,className:x("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...d,children:e.jsx(dn.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:x("flex flex-col gap-0.5",a&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:x("text-sm text-foreground select-none",i&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:m,className:"text-xs text-foreground-subtle",children:s})]})]})});ht.displayName="RadioItem";const hs=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(gt.Root,{ref:a,className:x("relative overflow-hidden",t),...s,children:[e.jsx(gt.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx(Ln,{}),e.jsx(gt.Corner,{})]})});hs.displayName="ScrollArea";const Ln=l.forwardRef(function({className:t,orientation:r="vertical",...s},a){return e.jsx(gt.ScrollAreaScrollbar,{ref:a,orientation:r,className:x("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...s,children:e.jsx(gt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});Ln.displayName="ScrollBar";const et=l.forwardRef(function({className:t,orientation:r="horizontal",decorative:s=!0,...a},o){return e.jsx(Ta.Root,{ref:o,orientation:r,decorative:s,className:x("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...a})});et.displayName="Separator";const po=H.Root,ho=H.Trigger,bo=H.Close,bs=H.Portal,vs=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Overlay,{ref:s,className:x("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});vs.displayName="SheetOverlay";const vo=Se.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),ws=l.forwardRef(function({className:t,children:r,side:s="right",showClose:a=!0,...o},i){return e.jsxs(bs,{children:[e.jsx(vs,{}),e.jsxs(H.Content,{ref:i,className:x(vo({side:s}),t),...o,children:[r,a&&e.jsx(H.Close,{"aria-label":"Close",className:x("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})]})]})});ws.displayName="SheetContent";function js({className:n,...t}){return e.jsx("div",{className:x("flex flex-col gap-1",n),...t})}js.displayName="SheetHeader";function ys({className:n,...t}){return e.jsx("div",{className:x("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",n),...t})}ys.displayName="SheetFooter";const Ns=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Title,{ref:s,className:x("text-lg font-semibold text-foreground leading-tight",t),...r})});Ns.displayName="SheetTitle";const Cs=l.forwardRef(function({className:t,...r},s){return e.jsx(H.Description,{ref:s,className:x("text-sm text-foreground-muted",t),...r})});Cs.displayName="SheetDescription";const Kt=l.createContext({collapsed:!1}),On=l.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:s,footer:a,className:o,children:i,...d},u){const[c,g]=l.useState(t),m=r??c,f=b=>{r===void 0&&g(b),s==null||s(b)};return e.jsx(Kt.Provider,{value:{collapsed:m},children:e.jsxs("aside",{ref:u,"aria-label":"Primary",className:x("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",m?"w-14":"w-60",o),...d,children:[e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:i}),a&&e.jsx("div",{className:"border-t border-border p-2",children:a}),e.jsxs("button",{type:"button",onClick:()=>f(!m),"aria-label":m?"Expand sidebar":"Collapse sidebar","aria-expanded":!m,className:x("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[m?e.jsx(p.ChevronsRight,{className:"size-4","aria-hidden":!0}):e.jsx(p.ChevronsLeft,{className:"size-4","aria-hidden":!0}),!m&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});On.displayName="Sidebar";function Ft({label:n,className:t,children:r,...s}){const{collapsed:a}=l.useContext(Kt);return e.jsxs("div",{className:x("mb-3",t),...s,children:[n&&!a&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:n}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}Ft.displayName="SidebarSection";function Je({icon:n,active:t,href:r,trailing:s,sub:a,className:o,children:i,...d}){const{collapsed:u}=l.useContext(Kt),c=r?"a":"button";return e.jsx("li",{children:e.jsxs(c,{href:r,"aria-current":t?"page":void 0,className:x("mx-2 flex h-8 items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",a&&!u&&"ml-6",u&&"justify-center",o),...d,children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),!u&&e.jsx("span",{className:"flex-1 truncate text-left",children:i}),!u&&s&&e.jsx("span",{className:"ml-auto",children:s})]})})}Je.displayName="SidebarItem";function Ss({icon:n,label:t,defaultOpen:r=!0,children:s}){const{collapsed:a}=l.useContext(Kt),[o,i]=l.useState(r);return a?e.jsx(e.Fragment,{children:s}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>i(d=>!d),"aria-expanded":o,className:x("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(p.ChevronDown,{className:x("size-3.5 transition-transform",o&&"rotate-180"),"aria-hidden":!0})]}),o&&e.jsx("ul",{className:"flex flex-col gap-px",children:s})]})}Ss.displayName="SidebarGroup";const ks=l.forwardRef(function({className:t,label:r,showValue:s,formatValue:a=c=>String(c),value:o,defaultValue:i,...d},u){const c=o??i??[0],g=c.length>1;return e.jsxs("div",{className:x("flex flex-col gap-2",t),children:[(r||s)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),s&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:g?`${a(c[0])} – ${a(c[1])}`:a(c[0])})]}),e.jsxs(Mt.Root,{ref:u,value:o,defaultValue:i,className:"relative flex w-full touch-none select-none items-center",...d,children:[e.jsx(Mt.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(Mt.Range,{className:"absolute h-full bg-accent"})}),c.map((m,f)=>e.jsx(Mt.Thumb,{className:x("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":g?f===0?"Minimum":"Maximum":r?String(r):"Value"},f))]})]})});ks.displayName="Slider";const wo={sm:"size-3.5",md:"size-4",lg:"size-6"},jo={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},Ts=l.forwardRef(function({className:t,tone:r="accent",size:s="md",label:a,decorative:o,...i},d){return e.jsxs("svg",{ref:d,viewBox:"0 0 24 24",role:o?void 0:"status","aria-label":o?void 0:a??"Loading","aria-hidden":o||void 0,className:x("animate-spin",wo[s],jo[r],t),...i,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});Ts.displayName="Spinner";const Fn=l.forwardRef(function({steps:t,current:r,orientation:s="horizontal",className:a,...o},i){return e.jsx("ol",{ref:i,"aria-label":"Progress",className:x(s==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",a),...o,children:t.map((d,u)=>{const c=u<r?"complete":u===r?"current":"upcoming",g=u===t.length-1;return e.jsxs("li",{"aria-current":c==="current"?"step":void 0,className:x(s==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:x(s==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:x("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",c==="complete"&&"bg-accent text-on-accent",c==="current"&&"bg-card border-2 border-accent text-accent",c==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:c==="complete"?e.jsx(p.Check,{className:"size-4"}):u+1}),s==="vertical"&&!g&&e.jsx("span",{className:x("mt-1 w-px flex-1 min-h-6",u<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:x("flex flex-col",s==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:x("text-sm font-medium",c==="upcoming"?"text-foreground-subtle":"text-foreground"),children:d.title}),s==="vertical"&&d.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:d.description})]}),s==="horizontal"&&!g&&e.jsx("span",{"aria-hidden":!0,className:x("h-px flex-1 mx-2",u<r?"bg-accent":"bg-border")})]},u)})})});Fn.displayName="Stepper";const yo={sm:"h-4 w-7",md:"h-5 w-9"},No={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},st=l.forwardRef(function({className:t,label:r,description:s,labelPosition:a="after",size:o="md",hideLabel:i,id:d,disabled:u,...c},g){const m=l.useId(),f=d??m,b=s?`${f}-desc`:void 0,h=e.jsx(Qn.Root,{ref:g,id:f,disabled:u,"aria-describedby":b,className:x("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","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-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",yo[o]),...c,children:e.jsx(Qn.Thumb,{className:x("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",No[o])})}),v=r&&e.jsxs("div",{className:x("flex flex-col gap-0.5 select-none",i&&"sr-only"),children:[e.jsx("label",{htmlFor:f,className:x("text-sm text-foreground",u&&"opacity-50 cursor-not-allowed"),children:r}),s&&e.jsx("p",{id:b,className:"text-xs text-foreground-subtle",children:s})]});return e.jsxs("div",{className:x("inline-flex items-center gap-2.5",t),children:[a==="before"&&v,h,a==="after"&&v]})});st.displayName="Switch";const Ds=$t.Root,Co=Se.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),_n=l.forwardRef(function({className:t,variant:r,size:s,...a},o){return e.jsx($t.List,{ref:o,"data-variant":r,className:x(Co({variant:r,size:s}),t),...a})});_n.displayName="TabsList";const at=l.forwardRef(function({className:t,...r},s){return e.jsx($t.Trigger,{ref:s,className:x("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});at.displayName="TabsTrigger";const ot=l.forwardRef(function({className:t,...r},s){return e.jsx($t.Content,{ref:s,className:x("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});ot.displayName="TabsContent";const Rs=l.forwardRef(function({className:t,label:r,helperText:s,error:a,autoResize:o,minRows:i=3,maxRows:d=12,hideLabel:u,id:c,onChange:g,value:m,defaultValue:f,...b},h){const v=l.useId(),j=c??v,w=`${j}-helper`,N=`${j}-error`,S=l.useRef(null),y=D=>{S.current=D,typeof h=="function"?h(D):h&&(h.current=D)},k=l.useCallback(()=>{const D=S.current;if(!D||!o)return;D.style.height="auto";const T=(parseFloat(getComputedStyle(D).lineHeight)||20)*d;D.style.height=`${Math.min(D.scrollHeight,T)}px`,D.style.overflowY=D.scrollHeight>T?"auto":"hidden"},[o,d]);return l.useEffect(()=>{o&&k()},[o,k,m,f]),e.jsxs("div",{className:x("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:j,className:x("text-sm font-medium text-foreground",u&&"sr-only"),children:r}),e.jsx("textarea",{ref:y,id:j,rows:i,value:m,defaultValue:f,onChange:D=>{g==null||g(D),o&&k()},"aria-invalid":!!a||void 0,"aria-describedby":a?N:s?w:void 0,className:x("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",a?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",o?"resize-none":"resize-y min-h-20"),...b}),a?e.jsx("p",{id:N,role:"alert",className:"text-xs text-danger-text",children:a}):s?e.jsx("p",{id:w,className:"text-xs text-foreground-subtle",children:s}):null]})});Rs.displayName="Textarea";const So=nt.Provider,Is=l.forwardRef(function({className:t,...r},s){return e.jsx(nt.Viewport,{ref:s,className:x("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});Is.displayName="ToastViewport";const ko=Se.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),To={default:null,success:e.jsx(p.CheckCircle2,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(p.Info,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},Ms=l.forwardRef(function({className:t,variant:r="default",children:s,...a},o){return e.jsxs(nt.Root,{ref:o,className:x(ko({variant:r}),t),...a,children:[To[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:s})]})});Ms.displayName="Toast";const Ps=l.forwardRef(function({className:t,...r},s){return e.jsx(nt.Title,{ref:s,className:x("text-sm font-medium",t),...r})});Ps.displayName="ToastTitle";const zs=l.forwardRef(function({className:t,...r},s){return e.jsx(nt.Description,{ref:s,className:x("text-sm opacity-90",t),...r})});zs.displayName="ToastDescription";const Es=l.forwardRef(function({className:t,...r},s){return e.jsx(nt.Action,{ref:s,className:x("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});Es.displayName="ToastAction";const As=l.forwardRef(function({className:t,...r},s){return e.jsx(nt.Close,{ref:s,"aria-label":"Close",className:x("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(p.X,{className:"size-4","aria-hidden":!0})})});As.displayName="ToastClose";const Do=({delayDuration:n=500,skipDelayDuration:t=200,...r})=>e.jsx(wt.Provider,{delayDuration:n,skipDelayDuration:t,...r}),Ls=wt.Root,Os=wt.Trigger,$n=l.forwardRef(function({className:t,sideOffset:r=4,...s},a){return e.jsx(wt.Portal,{children:e.jsx(wt.Content,{ref:a,sideOffset:r,className:x("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","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",t),...s})})});$n.displayName="TooltipContent";function Fs({children:n,label:t,side:r="top",align:s="center",disabled:a,delayDuration:o}){return a?e.jsx(e.Fragment,{children:n}):e.jsxs(Ls,{delayDuration:o,children:[e.jsx(Os,{asChild:!0,children:n}),e.jsx($n,{side:r,align:s,children:t})]})}Fs.displayName="Tooltip";const Bn=l.forwardRef(function({logo:t,nav:r,search:s,actions:a,className:o,...i},d){return e.jsxs("header",{ref:d,className:x("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",o),...i,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),s&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:s}),a&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:a})]})});Bn.displayName="TopNav";const _s=l.forwardRef(function({href:t,active:r,className:s,children:a,...o},i){return e.jsx("a",{ref:i,href:t,"aria-current":r?"page":void 0,className:x("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",s),...o,children:a})});_s.displayName="TopNavLink";const Ro=l.forwardRef(function({className:t,classNames:r,...s},a){return e.jsx(gn.DayPicker,{showOutsideDays:!0,className:x("p-3",t),classNames:{months:"flex flex-col gap-4",month:"flex flex-col gap-3",caption:"flex items-center justify-between px-1",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:"inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",table:"w-full border-collapse",head_row:"flex",head_cell:"w-9 text-[11px] font-medium text-foreground-subtle",row:"mt-1 flex",cell:"relative h-9 w-9 p-0 text-center",day:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none",day_selected:"bg-accent text-on-accent hover:bg-accent-700",day_today:"border border-border",day_outside:"text-foreground-subtle",day_disabled:"opacity-40 pointer-events-none",day_range_middle:"bg-accent-soft rounded-none",day_hidden:"invisible",...r},components:{Chevron:({orientation:o})=>o==="left"?e.jsx(p.ChevronLeft,{className:"size-4"}):e.jsx(p.ChevronRight,{className:"size-4"})},...s})});function Io(n){return Object.prototype.toString.call(n)==="[object Object]"}function Zn(n){return Io(n)||Array.isArray(n)}function Mo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Hn(n,t){const r=Object.keys(n),s=Object.keys(t);if(r.length!==s.length)return!1;const a=JSON.stringify(Object.keys(n.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==o?!1:r.every(i=>{const d=n[i],u=t[i];return typeof d=="function"?`${d}`==`${u}`:!Zn(d)||!Zn(u)?d===u:Hn(d,u)})}function er(n){return n.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function Po(n,t){if(n.length!==t.length)return!1;const r=er(n),s=er(t);return r.every((a,o)=>{const i=s[o];return Hn(a,i)})}function Un(n){return typeof n=="number"}function un(n){return typeof n=="string"}function Yt(n){return typeof n=="boolean"}function tr(n){return Object.prototype.toString.call(n)==="[object Object]"}function Q(n){return Math.abs(n)}function Vn(n){return Math.sign(n)}function bt(n,t){return Q(n-t)}function zo(n,t){if(n===0||t===0||Q(n)<=Q(t))return 0;const r=bt(Q(n),Q(t));return Q(r/n)}function Eo(n){return Math.round(n*100)/100}function jt(n){return yt(n).map(Number)}function Ie(n){return n[kt(n)]}function kt(n){return Math.max(0,n.length-1)}function Gn(n,t){return t===kt(n)}function nr(n,t=0){return Array.from(Array(n),(r,s)=>t+s)}function yt(n){return Object.keys(n)}function $s(n,t){return[n,t].reduce((r,s)=>(yt(s).forEach(a=>{const o=r[a],i=s[a],d=tr(o)&&tr(i);r[a]=d?$s(o,i):i}),r),{})}function fn(n,t){return typeof t.MouseEvent<"u"&&n instanceof t.MouseEvent}function Ao(n,t){const r={start:s,center:a,end:o};function s(){return 0}function a(u){return o(u)/2}function o(u){return t-u}function i(u,c){return un(n)?r[n](u):n(t,u,c)}return{measure:i}}function Nt(){let n=[];function t(a,o,i,d={passive:!0}){let u;if("addEventListener"in a)a.addEventListener(o,i,d),u=()=>a.removeEventListener(o,i,d);else{const c=a;c.addListener(i),u=()=>c.removeListener(i)}return n.push(u),s}function r(){n=n.filter(a=>a())}const s={add:t,clear:r};return s}function Lo(n,t,r,s){const a=Nt(),o=1e3/60;let i=null,d=0,u=0;function c(){a.add(n,"visibilitychange",()=>{n.hidden&&h()})}function g(){b(),a.clear()}function m(j){if(!u)return;i||(i=j,r(),r());const w=j-i;for(i=j,d+=w;d>=o;)r(),d-=o;const N=d/o;s(N),u&&(u=t.requestAnimationFrame(m))}function f(){u||(u=t.requestAnimationFrame(m))}function b(){t.cancelAnimationFrame(u),i=null,d=0,u=0}function h(){i=null,d=0}return{init:c,destroy:g,start:f,stop:b,update:r,render:s}}function Oo(n,t){const r=t==="rtl",s=n==="y",a=s?"y":"x",o=s?"x":"y",i=!s&&r?-1:1,d=g(),u=m();function c(h){const{height:v,width:j}=h;return s?v:j}function g(){return s?"top":r?"right":"left"}function m(){return s?"bottom":r?"left":"right"}function f(h){return h*i}return{scroll:a,cross:o,startEdge:d,endEdge:u,measureSize:c,direction:f}}function tt(n=0,t=0){const r=Q(n-t);function s(c){return c<n}function a(c){return c>t}function o(c){return s(c)||a(c)}function i(c){return o(c)?s(c)?n:t:c}function d(c){return r?c-r*Math.ceil((c-t)/r):c}return{length:r,max:t,min:n,constrain:i,reachedAny:o,reachedMax:a,reachedMin:s,removeOffset:d}}function Bs(n,t,r){const{constrain:s}=tt(0,n),a=n+1;let o=i(t);function i(f){return r?Q((a+f)%a):s(f)}function d(){return o}function u(f){return o=i(f),m}function c(f){return g().set(d()+f)}function g(){return Bs(n,d(),r)}const m={get:d,set:u,add:c,clone:g};return m}function Fo(n,t,r,s,a,o,i,d,u,c,g,m,f,b,h,v,j,w,N){const{cross:S,direction:y}=n,k=["INPUT","SELECT","TEXTAREA"],D={passive:!1},C=Nt(),T=Nt(),R=tt(50,225).constrain(b.measure(20)),L={mouse:300,touch:400},E={mouse:500,touch:600},F=h?43:25;let I=!1,P=0,_=0,W=!1,O=!1,K=!1,ee=!1;function Te(z){if(!N)return;function V(oe){(Yt(N)||N(z,oe))&&Oe(oe)}const M=t;C.add(M,"dragstart",oe=>oe.preventDefault(),D).add(M,"touchmove",()=>{},D).add(M,"touchend",()=>{}).add(M,"touchstart",V).add(M,"mousedown",V).add(M,"touchcancel",J).add(M,"contextmenu",J).add(M,"click",we,!0)}function ke(){C.clear(),T.clear()}function Ae(){const z=ee?r:t;T.add(z,"touchmove",ne,D).add(z,"touchend",J).add(z,"mousemove",ne,D).add(z,"mouseup",J)}function ve(z){const V=z.nodeName||"";return k.includes(V)}function ge(){return(h?E:L)[ee?"mouse":"touch"]}function Le(z,V){const M=m.add(Vn(z)*-1),oe=g.byDistance(z,!h).distance;return h||Q(z)<R?oe:j&&V?oe*.5:g.byIndex(M.get(),0).distance}function Oe(z){const V=fn(z,s);ee=V,K=h&&V&&!z.buttons&&I,I=bt(a.get(),i.get())>=2,!(V&&z.button!==0)&&(ve(z.target)||(W=!0,o.pointerDown(z),c.useFriction(0).useDuration(0),a.set(i),Ae(),P=o.readPoint(z),_=o.readPoint(z,S),f.emit("pointerDown")))}function ne(z){if(!fn(z,s)&&z.touches.length>=2)return J(z);const M=o.readPoint(z),oe=o.readPoint(z,S),je=bt(M,P),ye=bt(oe,_);if(!O&&!ee&&(!z.cancelable||(O=je>ye,!O)))return J(z);const Fe=o.pointerMove(z);je>v&&(K=!0),c.useFriction(.3).useDuration(.75),d.start(),a.add(y(Fe)),z.preventDefault()}function J(z){const M=g.byDistance(0,!1).index!==m.get(),oe=o.pointerUp(z)*ge(),je=Le(y(oe),M),ye=zo(oe,je),Fe=F-10*ye,Me=w+ye/50;O=!1,W=!1,T.clear(),c.useDuration(Fe).useFriction(Me),u.distance(je,!h),ee=!1,f.emit("pointerUp")}function we(z){K&&(z.stopPropagation(),z.preventDefault(),K=!1)}function le(){return W}return{init:Te,destroy:ke,pointerDown:le}}function _o(n,t){let s,a;function o(m){return m.timeStamp}function i(m,f){const h=`client${(f||n.scroll)==="x"?"X":"Y"}`;return(fn(m,t)?m:m.touches[0])[h]}function d(m){return s=m,a=m,i(m)}function u(m){const f=i(m)-i(a),b=o(m)-o(s)>170;return a=m,b&&(s=m),f}function c(m){if(!s||!a)return 0;const f=i(a)-i(s),b=o(m)-o(s),h=o(m)-o(a)>170,v=f/b;return b&&!h&&Q(v)>.1?v:0}return{pointerDown:d,pointerMove:u,pointerUp:c,readPoint:i}}function $o(){function n(r){const{offsetTop:s,offsetLeft:a,offsetWidth:o,offsetHeight:i}=r;return{top:s,right:a+o,bottom:s+i,left:a,width:o,height:i}}return{measure:n}}function Bo(n){function t(s){return n*(s/100)}return{measure:t}}function Ho(n,t,r,s,a,o,i){const d=[n].concat(s);let u,c,g=[],m=!1;function f(j){return a.measureSize(i.measure(j))}function b(j){if(!o)return;c=f(n),g=s.map(f);function w(N){for(const S of N){if(m)return;const y=S.target===n,k=s.indexOf(S.target),D=y?c:g[k],C=f(y?n:s[k]);if(Q(C-D)>=.5){j.reInit(),t.emit("resize");break}}}u=new ResizeObserver(N=>{(Yt(o)||o(j,N))&&w(N)}),r.requestAnimationFrame(()=>{d.forEach(N=>u.observe(N))})}function h(){m=!0,u&&u.disconnect()}return{init:b,destroy:h}}function Uo(n,t,r,s,a,o){let i=0,d=0,u=a,c=o,g=n.get(),m=0;function f(){const D=s.get()-n.get(),C=!u;let T=0;return C?(i=0,r.set(s),n.set(s),T=D):(r.set(n),i+=D/u,i*=c,g+=i,n.add(i),T=g-m),d=Vn(T),m=g,k}function b(){const D=s.get()-t.get();return Q(D)<.001}function h(){return u}function v(){return d}function j(){return i}function w(){return S(a)}function N(){return y(o)}function S(D){return u=D,k}function y(D){return c=D,k}const k={direction:v,duration:h,velocity:j,seek:f,settled:b,useBaseFriction:N,useBaseDuration:w,useFriction:y,useDuration:S};return k}function Vo(n,t,r,s,a){const o=a.measure(10),i=a.measure(50),d=tt(.1,.99);let u=!1;function c(){return!(u||!n.reachedAny(r.get())||!n.reachedAny(t.get()))}function g(b){if(!c())return;const h=n.reachedMin(t.get())?"min":"max",v=Q(n[h]-t.get()),j=r.get()-t.get(),w=d.constrain(v/i);r.subtract(j*w),!b&&Q(j)<o&&(r.set(n.constrain(r.get())),s.useDuration(25).useBaseFriction())}function m(b){u=!b}return{shouldConstrain:c,constrain:g,toggleActive:m}}function Go(n,t,r,s,a){const o=tt(-t+n,0),i=m(),d=g(),u=f();function c(h,v){return bt(h,v)<=1}function g(){const h=i[0],v=Ie(i),j=i.lastIndexOf(h),w=i.indexOf(v)+1;return tt(j,w)}function m(){return r.map((h,v)=>{const{min:j,max:w}=o,N=o.constrain(h),S=!v,y=Gn(r,v);return S?w:y||c(j,N)?j:c(w,N)?w:N}).map(h=>parseFloat(h.toFixed(3)))}function f(){if(t<=n+a)return[o.max];if(s==="keepSnaps")return i;const{min:h,max:v}=d;return i.slice(h,v)}return{snapsContained:u,scrollContainLimit:d}}function qo(n,t,r){const s=t[0],a=r?s-n:Ie(t);return{limit:tt(a,s)}}function Wo(n,t,r,s){const o=t.min+.1,i=t.max+.1,{reachedMin:d,reachedMax:u}=tt(o,i);function c(f){return f===1?u(r.get()):f===-1?d(r.get()):!1}function g(f){if(!c(f))return;const b=n*(f*-1);s.forEach(h=>h.add(b))}return{loop:g}}function Xo(n){const{max:t,length:r}=n;function s(o){const i=o-t;return r?i/-r:0}return{get:s}}function Ko(n,t,r,s,a){const{startEdge:o,endEdge:i}=n,{groupSlides:d}=a,u=m().map(t.measure),c=f(),g=b();function m(){return d(s).map(v=>Ie(v)[i]-v[0][o]).map(Q)}function f(){return s.map(v=>r[o]-v[o]).map(v=>-Q(v))}function b(){return d(c).map(v=>v[0]).map((v,j)=>v+u[j])}return{snaps:c,snapsAligned:g}}function Yo(n,t,r,s,a,o){const{groupSlides:i}=a,{min:d,max:u}=s,c=g();function g(){const f=i(o),b=!n||t==="keepSnaps";return r.length===1?[o]:b?f:f.slice(d,u).map((h,v,j)=>{const w=!v,N=Gn(j,v);if(w){const S=Ie(j[0])+1;return nr(S)}if(N){const S=kt(o)-Ie(j)[0]+1;return nr(S,Ie(j)[0])}return h})}return{slideRegistry:c}}function Qo(n,t,r,s,a){const{reachedAny:o,removeOffset:i,constrain:d}=s;function u(h){return h.concat().sort((v,j)=>Q(v)-Q(j))[0]}function c(h){const v=n?i(h):d(h),j=t.map((N,S)=>({diff:g(N-v,0),index:S})).sort((N,S)=>Q(N.diff)-Q(S.diff)),{index:w}=j[0];return{index:w,distance:v}}function g(h,v){const j=[h,h+r,h-r];if(!n)return h;if(!v)return u(j);const w=j.filter(N=>Vn(N)===v);return w.length?u(w):Ie(j)-r}function m(h,v){const j=t[h]-a.get(),w=g(j,v);return{index:h,distance:w}}function f(h,v){const j=a.get()+h,{index:w,distance:N}=c(j),S=!n&&o(j);if(!v||S)return{index:w,distance:h};const y=t[w]-N,k=h+g(y,0);return{index:w,distance:k}}return{byDistance:f,byIndex:m,shortcut:g}}function Jo(n,t,r,s,a,o,i){function d(m){const f=m.distance,b=m.index!==t.get();o.add(f),f&&(s.duration()?n.start():(n.update(),n.render(1),n.update())),b&&(r.set(t.get()),t.set(m.index),i.emit("select"))}function u(m,f){const b=a.byDistance(m,f);d(b)}function c(m,f){const b=t.clone().set(m),h=a.byIndex(b.get(),f);d(h)}return{distance:u,index:c}}function Zo(n,t,r,s,a,o,i,d){const u={passive:!0,capture:!0};let c=0;function g(b){if(!d)return;function h(v){if(new Date().getTime()-c>10)return;i.emit("slideFocusStart"),n.scrollLeft=0;const N=r.findIndex(S=>S.includes(v));Un(N)&&(a.useDuration(0),s.index(N,0),i.emit("slideFocus"))}o.add(document,"keydown",m,!1),t.forEach((v,j)=>{o.add(v,"focus",w=>{(Yt(d)||d(b,w))&&h(j)},u)})}function m(b){b.code==="Tab"&&(c=new Date().getTime())}return{init:g}}function xt(n){let t=n;function r(){return t}function s(u){t=i(u)}function a(u){t+=i(u)}function o(u){t-=i(u)}function i(u){return Un(u)?u:u.get()}return{get:r,set:s,add:a,subtract:o}}function Hs(n,t){const r=n.scroll==="x"?i:d,s=t.style;let a=null,o=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function d(f){return`translate3d(0px,${f}px,0px)`}function u(f){if(o)return;const b=Eo(n.direction(f));b!==a&&(s.transform=r(b),a=b)}function c(f){o=!f}function g(){o||(s.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:g,to:u,toggleActive:c}}function ei(n,t,r,s,a,o,i,d,u){const g=jt(a),m=jt(a).reverse(),f=w().concat(N());function b(C,T){return C.reduce((R,L)=>R-a[L],T)}function h(C,T){return C.reduce((R,L)=>b(R,T)>0?R.concat([L]):R,[])}function v(C){return o.map((T,R)=>({start:T-s[R]+.5+C,end:T+t-.5+C}))}function j(C,T,R){const L=v(T);return C.map(E=>{const F=R?0:-r,I=R?r:0,P=R?"end":"start",_=L[E][P];return{index:E,loopPoint:_,slideLocation:xt(-1),translate:Hs(n,u[E]),target:()=>d.get()>_?F:I}})}function w(){const C=i[0],T=h(m,C);return j(T,r,!1)}function N(){const C=t-i[0]-1,T=h(g,C);return j(T,-r,!0)}function S(){return f.every(({index:C})=>{const T=g.filter(R=>R!==C);return b(T,t)<=.1})}function y(){f.forEach(C=>{const{target:T,translate:R,slideLocation:L}=C,E=T();E!==L.get()&&(R.to(E),L.set(E))})}function k(){f.forEach(C=>C.translate.clear())}return{canLoop:S,clear:k,loop:y,loopPoints:f}}function ti(n,t,r){let s,a=!1;function o(u){if(!r)return;function c(g){for(const m of g)if(m.type==="childList"){u.reInit(),t.emit("slidesChanged");break}}s=new MutationObserver(g=>{a||(Yt(r)||r(u,g))&&c(g)}),s.observe(n,{childList:!0})}function i(){s&&s.disconnect(),a=!0}return{init:o,destroy:i}}function ni(n,t,r,s){const a={};let o=null,i=null,d,u=!1;function c(){d=new IntersectionObserver(h=>{u||(h.forEach(v=>{const j=t.indexOf(v.target);a[j]=v}),o=null,i=null,r.emit("slidesInView"))},{root:n.parentElement,threshold:s}),t.forEach(h=>d.observe(h))}function g(){d&&d.disconnect(),u=!0}function m(h){return yt(a).reduce((v,j)=>{const w=parseInt(j),{isIntersecting:N}=a[w];return(h&&N||!h&&!N)&&v.push(w),v},[])}function f(h=!0){if(h&&o)return o;if(!h&&i)return i;const v=m(h);return h&&(o=v),h||(i=v),v}return{init:c,destroy:g,get:f}}function ri(n,t,r,s,a,o){const{measureSize:i,startEdge:d,endEdge:u}=n,c=r[0]&&a,g=h(),m=v(),f=r.map(i),b=j();function h(){if(!c)return 0;const N=r[0];return Q(t[d]-N[d])}function v(){if(!c)return 0;const N=o.getComputedStyle(Ie(s));return parseFloat(N.getPropertyValue(`margin-${u}`))}function j(){return r.map((N,S,y)=>{const k=!S,D=Gn(y,S);return k?f[S]+g:D?f[S]+m:y[S+1][d]-N[d]}).map(Q)}return{slideSizes:f,slideSizesWithGaps:b,startGap:g,endGap:m}}function si(n,t,r,s,a,o,i,d,u){const{startEdge:c,endEdge:g,direction:m}=n,f=Un(r);function b(w,N){return jt(w).filter(S=>S%N===0).map(S=>w.slice(S,S+N))}function h(w){return w.length?jt(w).reduce((N,S,y)=>{const k=Ie(N)||0,D=k===0,C=S===kt(w),T=a[c]-o[k][c],R=a[c]-o[S][g],L=!s&&D?m(i):0,E=!s&&C?m(d):0,F=Q(R-E-(T+L));return y&&F>t+u&&N.push(S),C&&N.push(w.length),N},[]).map((N,S,y)=>{const k=Math.max(y[S-1]||0);return w.slice(k,N)}):[]}function v(w){return f?b(w,r):h(w)}return{groupSlides:v}}function ai(n,t,r,s,a,o,i){const{align:d,axis:u,direction:c,startIndex:g,loop:m,duration:f,dragFree:b,dragThreshold:h,inViewThreshold:v,slidesToScroll:j,skipSnaps:w,containScroll:N,watchResize:S,watchSlides:y,watchDrag:k,watchFocus:D}=o,C=2,T=$o(),R=T.measure(t),L=r.map(T.measure),E=Oo(u,c),F=E.measureSize(R),I=Bo(F),P=Ao(d,F),_=!m&&!!N,W=m||!!N,{slideSizes:O,slideSizesWithGaps:K,startGap:ee,endGap:Te}=ri(E,R,L,r,W,a),ke=si(E,F,j,m,R,L,ee,Te,C),{snaps:Ae,snapsAligned:ve}=Ko(E,P,R,L,ke),ge=-Ie(Ae)+Ie(K),{snapsContained:Le,scrollContainLimit:Oe}=Go(F,ge,ve,N,C),ne=_?Le:ve,{limit:J}=qo(ge,ne,m),we=Bs(kt(ne),g,m),le=we.clone(),U=jt(r),z=({dragHandler:$e,scrollBody:ut,scrollBounds:Be,options:{loop:Xe}})=>{Xe||Be.constrain($e.pointerDown()),ut.seek()},V=({scrollBody:$e,translate:ut,location:Be,offsetLocation:Xe,previousLocation:Zt,scrollLooper:en,slideLooper:tn,dragHandler:nn,animation:rn,eventHandler:A,scrollBounds:B,options:{loop:G}},$)=>{const X=$e.settled(),ce=!B.shouldConstrain(),ie=G?X:X&&ce,De=ie&&!nn.pointerDown();De&&rn.stop();const Ne=Be.get()*$+Zt.get()*(1-$);Xe.set(Ne),G&&(en.loop($e.direction()),tn.loop()),ut.to(Xe.get()),De&&A.emit("settle"),ie||A.emit("scroll")},M=Lo(s,a,()=>z(dt),$e=>V(dt,$e)),oe=.68,je=ne[we.get()],ye=xt(je),Fe=xt(je),Me=xt(je),pe=xt(je),Ue=Uo(ye,Me,Fe,pe,f,oe),lt=Qo(m,ne,ge,J,pe),_e=Jo(M,we,le,Ue,lt,pe,i),Dt=Xo(J),ct=Nt(),Jt=ni(t,r,i,v),{slideRegistry:Rt}=Yo(_,N,ne,Oe,ke,U),rt=Zo(n,r,Rt,_e,Ue,ct,i,D),dt={ownerDocument:s,ownerWindow:a,eventHandler:i,containerRect:R,slideRects:L,animation:M,axis:E,dragHandler:Fo(E,n,s,a,pe,_o(E,a),ye,M,_e,Ue,lt,we,i,I,b,h,w,oe,k),eventStore:ct,percentOfView:I,index:we,indexPrevious:le,limit:J,location:ye,offsetLocation:Me,previousLocation:Fe,options:o,resizeHandler:Ho(t,i,a,r,E,S,T),scrollBody:Ue,scrollBounds:Vo(J,Me,pe,Ue,I),scrollLooper:Wo(ge,J,Me,[ye,Me,Fe,pe]),scrollProgress:Dt,scrollSnapList:ne.map(Dt.get),scrollSnaps:ne,scrollTarget:lt,scrollTo:_e,slideLooper:ei(E,F,ge,O,K,Ae,ne,Me,r),slideFocus:rt,slidesHandler:ti(t,i,y),slidesInView:Jt,slideIndexes:U,slideRegistry:Rt,slidesToScroll:ke,target:pe,translate:Hs(E,t)};return dt}function oi(){let n={},t;function r(c){t=c}function s(c){return n[c]||[]}function a(c){return s(c).forEach(g=>g(t,c)),u}function o(c,g){return n[c]=s(c).concat([g]),u}function i(c,g){return n[c]=s(c).filter(m=>m!==g),u}function d(){n={}}const u={init:r,emit:a,off:i,on:o,clear:d};return u}const ii={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function li(n){function t(o,i){return $s(o,i||{})}function r(o){const i=o.breakpoints||{},d=yt(i).filter(u=>n.matchMedia(u).matches).map(u=>i[u]).reduce((u,c)=>t(u,c),{});return t(o,d)}function s(o){return o.map(i=>yt(i.breakpoints||{})).reduce((i,d)=>i.concat(d),[]).map(n.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:s}}function ci(n){let t=[];function r(o,i){return t=i.filter(({options:d})=>n.optionsAtMedia(d).active!==!1),t.forEach(d=>d.init(o,n)),i.reduce((d,u)=>Object.assign(d,{[u.name]:u}),{})}function s(){t=t.filter(o=>o.destroy())}return{init:r,destroy:s}}function _t(n,t,r){const s=n.ownerDocument,a=s.defaultView,o=li(a),i=ci(o),d=Nt(),u=oi(),{mergeOptions:c,optionsAtMedia:g,optionsMediaQueries:m}=o,{on:f,off:b,emit:h}=u,v=E;let j=!1,w,N=c(ii,_t.globalOptions),S=c(N),y=[],k,D,C;function T(){const{container:U,slides:z}=S;D=(un(U)?n.querySelector(U):U)||n.children[0];const M=un(z)?D.querySelectorAll(z):z;C=[].slice.call(M||D.children)}function R(U){const z=ai(n,D,C,s,a,U,u);if(U.loop&&!z.slideLooper.canLoop()){const V=Object.assign({},U,{loop:!1});return R(V)}return z}function L(U,z){j||(N=c(N,U),S=g(N),y=z||y,T(),w=R(S),m([N,...y.map(({options:V})=>V)]).forEach(V=>d.add(V,"change",E)),S.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(le),w.eventHandler.init(le),w.resizeHandler.init(le),w.slidesHandler.init(le),w.options.loop&&w.slideLooper.loop(),D.offsetParent&&C.length&&w.dragHandler.init(le),k=i.init(le,y)))}function E(U,z){const V=ke();F(),L(c({startIndex:V},U),z),u.emit("reInit")}function F(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),i.destroy(),d.clear()}function I(){j||(j=!0,d.clear(),F(),u.emit("destroy"),u.clear())}function P(U,z,V){!S.active||j||(w.scrollBody.useBaseFriction().useDuration(z===!0?0:S.duration),w.scrollTo.index(U,V||0))}function _(U){const z=w.index.add(1).get();P(z,U,-1)}function W(U){const z=w.index.add(-1).get();P(z,U,1)}function O(){return w.index.add(1).get()!==ke()}function K(){return w.index.add(-1).get()!==ke()}function ee(){return w.scrollSnapList}function Te(){return w.scrollProgress.get(w.offsetLocation.get())}function ke(){return w.index.get()}function Ae(){return w.indexPrevious.get()}function ve(){return w.slidesInView.get()}function ge(){return w.slidesInView.get(!1)}function Le(){return k}function Oe(){return w}function ne(){return n}function J(){return D}function we(){return C}const le={canScrollNext:O,canScrollPrev:K,containerNode:J,internalEngine:Oe,destroy:I,off:b,on:f,emit:h,plugins:Le,previousScrollSnap:Ae,reInit:v,rootNode:ne,scrollNext:_,scrollPrev:W,scrollProgress:Te,scrollSnapList:ee,scrollTo:P,selectedScrollSnap:ke,slideNodes:we,slidesInView:ve,slidesNotInView:ge};return L(t,r),setTimeout(()=>u.emit("init"),0),le}_t.globalOptions=void 0;function qn(n={},t=[]){const r=l.useRef(n),s=l.useRef(t),[a,o]=l.useState(),[i,d]=l.useState(),u=l.useCallback(()=>{a&&a.reInit(r.current,s.current)},[a]);return l.useEffect(()=>{Hn(r.current,n)||(r.current=n,u())},[n,u]),l.useEffect(()=>{Po(s.current,t)||(s.current=t,u())},[t,u]),l.useEffect(()=>{if(Mo()&&i){_t.globalOptions=qn.globalOptions;const c=_t(i,r.current,s.current);return o(c),()=>c.destroy()}else o(void 0)},[i,o]),[d,a]}qn.globalOptions=void 0;const Us=l.createContext(null);function Qt(){const n=l.useContext(Us);if(!n)throw new Error("Carousel components must be used inside <Carousel>");return n}const di=l.forwardRef(function({opts:t,orientation:r="horizontal",setApi:s,className:a,children:o,...i},d){const[u,c]=qn({...t,axis:r==="horizontal"?"x":"y"}),[g,m]=l.useState(!1),[f,b]=l.useState(!1),h=l.useCallback(v=>{v&&(m(v.canScrollPrev()),b(v.canScrollNext()))},[]);return l.useEffect(()=>{if(c)return s==null||s(c),h(c),c.on("reInit",h).on("select",h),()=>{c.off("reInit",h).off("select",h)}},[c,h,s]),e.jsx(Us.Provider,{value:{carouselRef:u,api:c,canPrev:g,canNext:f,scrollPrev:()=>c==null?void 0:c.scrollPrev(),scrollNext:()=>c==null?void 0:c.scrollNext(),orientation:r},children:e.jsx("div",{ref:d,className:x("relative",a),role:"region","aria-roledescription":"carousel",...i,children:o})})}),ui=l.forwardRef(function({className:t,...r},s){const{carouselRef:a,orientation:o}=Qt();return e.jsx("div",{ref:a,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:x("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),fi=l.forwardRef(function({className:t,...r},s){const{orientation:a}=Qt();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:x("min-w-0 shrink-0 grow-0 basis-full",a==="horizontal"?"pl-4":"pt-4",t),...r})});function mi({className:n}){const{canPrev:t,scrollPrev:r,orientation:s}=Qt();return e.jsx(it,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronLeft,{}),className:x("absolute z-10",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function xi({className:n}){const{canNext:t,scrollNext:r,orientation:s}=Qt();return e.jsx(it,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(p.ChevronRight,{}),className:x("absolute z-10",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function Vs(n,t,r,s=8){const a=n.map(f=>f.y),o=Math.min(0,...a),i=Math.max(...a,1),d=i-o||1,u=t-s*2,c=r-s*2;return{sx:f=>n.length<=1?s+u/2:s+f/(n.length-1)*u,sy:f=>s+c-(f-o)/d*c,min:o,max:i}}function gi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=Vs(n,o,t),u=n.map((c,g)=>`${g===0?"M":"L"}${i(g).toFixed(1)},${d(c.y).toFixed(1)}`).join(" ");return e.jsxs("figure",{className:x("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"}),n.map((c,g)=>e.jsx("circle",{cx:i(g),cy:d(c.y),r:2,fill:"var(--color-accent)"},g))]})]})}function pi({data:n,height:t=80,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,{sx:i,sy:d}=Vs(n,o,t),u=n.map((g,m)=>`${m===0?"M":"L"}${i(m).toFixed(1)},${d(g.y).toFixed(1)}`).join(" "),c=`${u} L${i(n.length-1).toFixed(1)},${t} L${i(0).toFixed(1)},${t} Z`;return e.jsxs("figure",{className:x("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsxs("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:[e.jsx("path",{d:c,fill:"var(--color-accent-soft)"}),e.jsx("path",{d:u,fill:"none",stroke:"var(--color-accent)",strokeWidth:1.5})]})]})}function hi({data:n,height:t=100,width:r="100%",caption:s,className:a}){const o=typeof r=="number"?r:320,i=8,d=2,u=o-i*2,c=Math.max(2,u/n.length-d),g=n.map(f=>f.y),m=Math.max(...g,1);return e.jsxs("figure",{className:x("flex flex-col gap-1.5",a),children:[s&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:s}),e.jsx("svg",{viewBox:`0 0 ${o} ${t}`,width:r,height:t,role:"img",children:n.map((f,b)=>{const h=f.y/m*(t-i*2);return e.jsx("rect",{x:i+b*(c+d),y:t-i-h,width:c,height:h,fill:"var(--color-accent)",rx:1.5,children:e.jsx("title",{children:`${f.x}: ${f.y}`})},b)})})]})}function bi(n){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const Gs=l.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Tt=()=>{const n=l.useContext(Gs);if(!n)throw new Error("useDrawerContext must be used within a Drawer.Root");return n};bi(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
8
|
+
[data-state=closed]
|
|
9
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function vi(){const n=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(n)&&/Mobile/.test(n)||/FxiOS/.test(n))}function wi(){return Wn(/^Mac/)}function ji(){return Wn(/^iPhone/)}function rr(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function yi(){return Wn(/^iPad/)||wi()&&navigator.maxTouchPoints>1}function qs(){return ji()||yi()}function Wn(n){return typeof window<"u"&&window.navigator!=null?n.test(window.navigator.platform):void 0}const Ni=24,Ci=typeof window<"u"?l.useLayoutEffect:l.useEffect;function sr(...n){return(...t)=>{for(let r of n)typeof r=="function"&&r(...t)}}const an=typeof document<"u"&&window.visualViewport;function ar(n){let t=window.getComputedStyle(n);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Ws(n){for(ar(n)&&(n=n.parentElement);n&&!ar(n);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}const Si=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let zt=0,on;function ki(n={}){let{isDisabled:t}=n;Ci(()=>{if(!t)return zt++,zt===1&&qs()&&(on=Ti()),()=>{zt--,zt===0&&(on==null||on())}},[t])}function Ti(){let n,t=0,r=m=>{n=Ws(m.target),!(n===document.documentElement&&n===document.body)&&(t=m.changedTouches[0].pageY)},s=m=>{if(!n||n===document.documentElement||n===document.body){m.preventDefault();return}let f=m.changedTouches[0].pageY,b=n.scrollTop,h=n.scrollHeight-n.clientHeight;h!==0&&((b<=0&&f>t||b>=h&&f<t)&&m.preventDefault(),t=f)},a=m=>{let f=m.target;mn(f)&&f!==document.activeElement&&(m.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},o=m=>{let f=m.target;mn(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",an&&(an.height<window.innerHeight?requestAnimationFrame(()=>{or(f)}):an.addEventListener("resize",()=>or(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},d=window.pageXOffset,u=window.pageYOffset,c=sr(Di(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let g=sr(ft(document,"touchstart",r,{passive:!1,capture:!0}),ft(document,"touchmove",s,{passive:!1,capture:!0}),ft(document,"touchend",a,{passive:!1,capture:!0}),ft(document,"focus",o,!0),ft(window,"scroll",i));return()=>{c(),g(),window.scrollTo(d,u)}}function Di(n,t,r){let s=n.style[t];return n.style[t]=r,()=>{n.style[t]=s}}function ft(n,t,r,s){return n.addEventListener(t,r,s),()=>{n.removeEventListener(t,r,s)}}function or(n){let t=document.scrollingElement||document.documentElement;for(;n&&n!==t;){let r=Ws(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let s=r.getBoundingClientRect().top,a=n.getBoundingClientRect().top,o=n.getBoundingClientRect().bottom;const i=r.getBoundingClientRect().bottom+Ni;o>i&&(r.scrollTop+=a-s)}n=r.parentElement}}function mn(n){return n instanceof HTMLInputElement&&!Si.has(n.type)||n instanceof HTMLTextAreaElement||n instanceof HTMLElement&&n.isContentEditable}function Ri(n,t){typeof n=="function"?n(t):n!=null&&(n.current=t)}function Ii(...n){return t=>n.forEach(r=>Ri(r,t))}function Xs(...n){return Sa.useCallback(Ii(...n),n)}const Ks=new WeakMap;function re(n,t,r=!1){if(!n||!(n instanceof HTMLElement))return;let s={};Object.entries(t).forEach(([a,o])=>{if(a.startsWith("--")){n.style.setProperty(a,o);return}s[a]=n.style[a],n.style[a]=o}),!r&&Ks.set(n,s)}function Mi(n,t){if(!n||!(n instanceof HTMLElement))return;let r=Ks.get(n);r&&(n.style[t]=r[t])}const te=n=>{switch(n){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return n}};function Et(n,t){if(!n)return null;const r=window.getComputedStyle(n),s=r.transform||r.webkitTransform||r.mozTransform;let a=s.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[te(t)?13:12]):(a=s.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[te(t)?5:4]):null)}function Pi(n){return 8*(Math.log(n+1)-2)}function ln(n,t){if(!n)return()=>{};const r=n.style.cssText;return Object.assign(n.style,t),()=>{n.style.cssText=r}}function zi(...n){return(...t)=>{for(const r of n)typeof r=="function"&&r(...t)}}const Y={DURATION:.5,EASE:[.32,.72,0,1]},Ys=.4,Ei=.25,Ai=100,Qs=8,Ye=16,xn=26,cn="vaul-dragging";function Js(n){const t=l.useRef(n);return l.useEffect(()=>{t.current=n}),l.useMemo(()=>(...r)=>t.current==null?void 0:t.current.call(t,...r),[])}function Li({defaultProp:n,onChange:t}){const r=l.useState(n),[s]=r,a=l.useRef(s),o=Js(t);return l.useEffect(()=>{a.current!==s&&(o(s),a.current=s)},[s,a,o]),r}function Zs({prop:n,defaultProp:t,onChange:r=()=>{}}){const[s,a]=Li({defaultProp:t,onChange:r}),o=n!==void 0,i=o?n:s,d=Js(r),u=l.useCallback(c=>{if(o){const m=typeof c=="function"?c(n):c;m!==n&&d(m)}else a(c)},[o,n,a,d]);return[i,u]}function Oi({activeSnapPointProp:n,setActiveSnapPointProp:t,snapPoints:r,drawerRef:s,overlayRef:a,fadeFromIndex:o,onSnapPointChange:i,direction:d="bottom",container:u,snapToSequentialPoint:c}){const[g,m]=Zs({prop:n,defaultProp:r==null?void 0:r[0],onChange:t}),[f,b]=l.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);l.useEffect(()=>{function C(){b({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const h=l.useMemo(()=>g===(r==null?void 0:r[r.length-1])||null,[r,g]),v=l.useMemo(()=>{var C;return(C=r==null?void 0:r.findIndex(T=>T===g))!=null?C:null},[r,g]),j=r&&r.length>0&&(o||o===0)&&!Number.isNaN(o)&&r[o]===g||!r,w=l.useMemo(()=>{const C=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var T;return(T=r==null?void 0:r.map(R=>{const L=typeof R=="string";let E=0;if(L&&(E=parseInt(R,10)),te(d)){const I=L?E:f?R*C.height:0;return f?d==="bottom"?C.height-I:-C.height+I:I}const F=L?E:f?R*C.width:0;return f?d==="right"?C.width-F:-C.width+F:F}))!=null?T:[]},[r,f,u]),N=l.useMemo(()=>v!==null?w==null?void 0:w[v]:null,[w,v]),S=l.useCallback(C=>{var T;const R=(T=w==null?void 0:w.findIndex(L=>L===C))!=null?T:null;i(R),re(s.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(d)?`translate3d(0, ${C}px, 0)`:`translate3d(${C}px, 0, 0)`}),w&&R!==w.length-1&&o!==void 0&&R!==o&&R<o?re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"0"}):re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),m(r==null?void 0:r[Math.max(R,0)])},[s.current,r,w,o,a,m]);l.useEffect(()=>{if(g||n){var C;const T=(C=r==null?void 0:r.findIndex(R=>R===n||R===g))!=null?C:-1;w&&T!==-1&&typeof w[T]=="number"&&S(w[T])}},[g,n,r,w,S]);function y({draggedDistance:C,closeDrawer:T,velocity:R,dismissible:L}){if(o===void 0)return;const E=d==="bottom"||d==="right"?(N??0)-C:(N??0)+C,F=v===o-1,I=v===0,P=C>0;if(F&&re(a.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),!c&&R>2&&!P){L?T():S(w[0]);return}if(!c&&R>2&&P&&w&&r){S(w[r.length-1]);return}const _=w==null?void 0:w.reduce((O,K)=>typeof O!="number"||typeof K!="number"?O:Math.abs(K-E)<Math.abs(O-E)?K:O),W=te(d)?window.innerHeight:window.innerWidth;if(R>Ys&&Math.abs(C)<W*.4){const O=P?1:-1;if(O>0&&h&&r){S(w[r.length-1]);return}if(I&&O<0&&L&&T(),v===null)return;S(w[v+O]);return}S(_)}function k({draggedDistance:C}){if(N===null)return;const T=d==="bottom"||d==="right"?N-C:N+C;(d==="bottom"||d==="right")&&T<w[w.length-1]||(d==="top"||d==="left")&&T>w[w.length-1]||re(s.current,{transform:te(d)?`translate3d(0, ${T}px, 0)`:`translate3d(${T}px, 0, 0)`})}function D(C,T){if(!r||typeof v!="number"||!w||o===void 0)return null;const R=v===o-1;if(v>=o&&T)return 0;if(R&&!T)return 1;if(!j&&!R)return null;const E=R?v+1:v-1,F=R?w[E]-w[E-1]:w[E+1]-w[E],I=C/Math.abs(F);return R?1-I:I}return{isLastSnapPoint:h,activeSnapPoint:g,shouldFade:j,getPercentageDragged:D,setActiveSnapPoint:m,activeSnapPointIndex:v,onRelease:y,onDrag:k,snapPointsOffset:w}}const Fi=()=>()=>{};function _i(){const{direction:n,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:s,noBodyStyles:a}=Tt(),o=l.useRef(null),i=l.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-xn)/window.innerWidth}l.useEffect(()=>{if(t&&r){o.current&&clearTimeout(o.current);const u=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!u)return;zi(s&&!a?ln(document.body,{background:"black"}):Fi,ln(u,{transformOrigin:te(n)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`}));const c=ln(u,{borderRadius:`${Qs}px`,overflow:"hidden",...te(n)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),o.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Y.DURATION*1e3)}}},[t,r,i])}let mt=null;function $i({isOpen:n,modal:t,nested:r,hasBeenOpened:s,preventScrollRestoration:a,noBodyStyles:o}){const[i,d]=l.useState(()=>typeof window<"u"?window.location.href:""),u=l.useRef(0),c=l.useCallback(()=>{if(rr()&&mt===null&&n&&!o){mt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-u.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const b=f-window.innerHeight;b&&u.current>=f&&(document.body.style.top=`${-(u.current+b)}px`)}),300)}},[n]),g=l.useCallback(()=>{if(rr()&&mt!==null&&!o){const m=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,mt),window.requestAnimationFrame(()=>{if(a&&i!==window.location.href){d(window.location.href);return}window.scrollTo(f,m)}),mt=null}},[i]);return l.useEffect(()=>{function m(){u.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),l.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||g()}},[t,g]),l.useEffect(()=>{r||!s||(n?(!window.matchMedia("(display-mode: standalone)").matches&&c(),t||window.setTimeout(()=>{g()},500)):g())},[n,s,i,t,r,c,g]),{restorePositionSetting:g}}function Bi({open:n,onOpenChange:t,children:r,onDrag:s,onRelease:a,snapPoints:o,shouldScaleBackground:i=!1,setBackgroundColorOnScale:d=!0,closeThreshold:u=Ei,scrollLockTimeout:c=Ai,dismissible:g=!0,handleOnly:m=!1,fadeFromIndex:f=o&&o.length-1,activeSnapPoint:b,setActiveSnapPoint:h,fixed:v,modal:j=!0,onClose:w,nested:N,noBodyStyles:S=!1,direction:y="bottom",defaultOpen:k=!1,disablePreventScroll:D=!0,snapToSequentialPoint:C=!1,preventScrollRestoration:T=!1,repositionInputs:R=!0,onAnimationEnd:L,container:E,autoFocus:F=!1}){var I,P;const[_=!1,W]=Zs({defaultProp:k,prop:n,onChange:A=>{t==null||t(A),!A&&!N&&Rt(),setTimeout(()=>{L==null||L(A)},Y.DURATION*1e3),A&&!j&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),A||(document.body.style.pointerEvents="auto")}}),[O,K]=l.useState(!1),[ee,Te]=l.useState(!1),[ke,Ae]=l.useState(!1),ve=l.useRef(null),ge=l.useRef(null),Le=l.useRef(null),Oe=l.useRef(null),ne=l.useRef(null),J=l.useRef(!1),we=l.useRef(null),le=l.useRef(0),U=l.useRef(!1),z=l.useRef(!k),V=l.useRef(0),M=l.useRef(null),oe=l.useRef(((I=M.current)==null?void 0:I.getBoundingClientRect().height)||0),je=l.useRef(((P=M.current)==null?void 0:P.getBoundingClientRect().width)||0),ye=l.useRef(0),Fe=l.useCallback(A=>{o&&A===_e.length-1&&(ge.current=new Date)},[]),{activeSnapPoint:Me,activeSnapPointIndex:pe,setActiveSnapPoint:Ue,onRelease:lt,snapPointsOffset:_e,onDrag:Dt,shouldFade:ct,getPercentageDragged:Jt}=Oi({snapPoints:o,activeSnapPointProp:b,setActiveSnapPointProp:h,drawerRef:M,fadeFromIndex:f,overlayRef:ve,onSnapPointChange:Fe,direction:y,container:E,snapToSequentialPoint:C});ki({isDisabled:!_||ee||!j||ke||!O||!R||!D});const{restorePositionSetting:Rt}=$i({isOpen:_,modal:j,nested:N??!1,hasBeenOpened:O,preventScrollRestoration:T,noBodyStyles:S});function rt(){return(window.innerWidth-xn)/window.innerWidth}function dt(A){var B,G;!g&&!o||M.current&&!M.current.contains(A.target)||(oe.current=((B=M.current)==null?void 0:B.getBoundingClientRect().height)||0,je.current=((G=M.current)==null?void 0:G.getBoundingClientRect().width)||0,Te(!0),Le.current=new Date,qs()&&window.addEventListener("touchend",()=>J.current=!1,{once:!0}),A.target.setPointerCapture(A.pointerId),le.current=te(y)?A.pageY:A.pageX)}function $e(A,B){var G;let $=A;const X=(G=window.getSelection())==null?void 0:G.toString(),ce=M.current?Et(M.current,y):null,ie=new Date;if($.tagName==="SELECT"||$.hasAttribute("data-vaul-no-drag")||$.closest("[data-vaul-no-drag]"))return!1;if(y==="right"||y==="left")return!0;if(ge.current&&ie.getTime()-ge.current.getTime()<500)return!1;if(ce!==null&&(y==="bottom"?ce>0:ce<0))return!0;if(X&&X.length>0)return!1;if(ne.current&&ie.getTime()-ne.current.getTime()<c&&ce===0||B)return ne.current=ie,!1;for(;$;){if($.scrollHeight>$.clientHeight){if($.scrollTop!==0)return ne.current=new Date,!1;if($.getAttribute("role")==="dialog")return!0}$=$.parentNode}return!0}function ut(A){if(M.current&&ee){const B=y==="bottom"||y==="right"?1:-1,G=(le.current-(te(y)?A.pageY:A.pageX))*B,$=G>0,X=o&&!g&&!$;if(X&&pe===0)return;const ce=Math.abs(G),ie=document.querySelector("[data-vaul-drawer-wrapper]"),De=y==="bottom"||y==="top"?oe.current:je.current;let Ne=ce/De;const Ke=Jt(ce,$);if(Ke!==null&&(Ne=Ke),X&&Ne>=1||!J.current&&!$e(A.target,$))return;if(M.current.classList.add(cn),J.current=!0,re(M.current,{transition:"none"}),re(ve.current,{transition:"none"}),o&&Dt({draggedDistance:G}),$&&!o){const Pe=Pi(G),It=Math.min(Pe*-1,0)*B;re(M.current,{transform:te(y)?`translate3d(0, ${It}px, 0)`:`translate3d(${It}px, 0, 0)`});return}const Ve=1-Ne;if((ct||f&&pe===f-1)&&(s==null||s(A,Ne),re(ve.current,{opacity:`${Ve}`,transition:"none"},!0)),ie&&ve.current&&i){const Pe=Math.min(rt()+Ne*(1-rt()),1),It=8-Ne*8,Xn=Math.max(0,14-Ne*14);re(ie,{borderRadius:`${It}px`,transform:te(y)?`scale(${Pe}) translate3d(0, ${Xn}px, 0)`:`scale(${Pe}) translate3d(${Xn}px, 0, 0)`,transition:"none"},!0)}if(!o){const Pe=ce*B;re(M.current,{transform:te(y)?`translate3d(0, ${Pe}px, 0)`:`translate3d(${Pe}px, 0, 0)`})}}}l.useEffect(()=>{window.requestAnimationFrame(()=>{z.current=!0})},[]),l.useEffect(()=>{var A;function B(){if(!M.current||!R)return;const G=document.activeElement;if(mn(G)||U.current){var $;const X=(($=window.visualViewport)==null?void 0:$.height)||0,ce=window.innerHeight;let ie=ce-X;const De=M.current.getBoundingClientRect().height||0,Ne=De>ce*.8;ye.current||(ye.current=De);const Ke=M.current.getBoundingClientRect().top;if(Math.abs(V.current-ie)>60&&(U.current=!U.current),o&&o.length>0&&_e&&pe){const Ve=_e[pe]||0;ie+=Ve}if(V.current=ie,De>X||U.current){const Ve=M.current.getBoundingClientRect().height;let Pe=Ve;Ve>X&&(Pe=X-(Ne?Ke:xn)),v?M.current.style.height=`${Ve-Math.max(ie,0)}px`:M.current.style.height=`${Math.max(Pe,X-Ke)}px`}else vi()||(M.current.style.height=`${ye.current}px`);o&&o.length>0&&!U.current?M.current.style.bottom="0px":M.current.style.bottom=`${Math.max(ie,0)}px`}}return(A=window.visualViewport)==null||A.addEventListener("resize",B),()=>{var G;return(G=window.visualViewport)==null?void 0:G.removeEventListener("resize",B)}},[pe,o,_e]);function Be(A){Zt(),w==null||w(),A||W(!1),setTimeout(()=>{o&&Ue(o[0])},Y.DURATION*1e3)}function Xe(){if(!M.current)return;const A=document.querySelector("[data-vaul-drawer-wrapper]"),B=Et(M.current,y);re(M.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`}),re(ve.current,{transition:`opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,opacity:"1"}),i&&B&&B>0&&_&&re(A,{borderRadius:`${Qs}px`,overflow:"hidden",...te(y)?{transform:`scale(${rt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${rt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Y.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Y.EASE.join(",")})`},!0)}function Zt(){!ee||!M.current||(M.current.classList.remove(cn),J.current=!1,Te(!1),Oe.current=new Date)}function en(A){if(!ee||!M.current)return;M.current.classList.remove(cn),J.current=!1,Te(!1),Oe.current=new Date;const B=Et(M.current,y);if(!A||!$e(A.target,!1)||!B||Number.isNaN(B)||Le.current===null)return;const G=Oe.current.getTime()-Le.current.getTime(),$=le.current-(te(y)?A.pageY:A.pageX),X=Math.abs($)/G;if(X>.05&&(Ae(!0),setTimeout(()=>{Ae(!1)},200)),o){lt({draggedDistance:$*(y==="bottom"||y==="right"?1:-1),closeDrawer:Be,velocity:X,dismissible:g}),a==null||a(A,!0);return}if(y==="bottom"||y==="right"?$>0:$<0){Xe(),a==null||a(A,!0);return}if(X>Ys){Be(),a==null||a(A,!1);return}var ce;const ie=Math.min((ce=M.current.getBoundingClientRect().height)!=null?ce:0,window.innerHeight);var De;const Ne=Math.min((De=M.current.getBoundingClientRect().width)!=null?De:0,window.innerWidth),Ke=y==="left"||y==="right";if(Math.abs(B)>=(Ke?Ne:ie)*u){Be(),a==null||a(A,!1);return}a==null||a(A,!0),Xe()}l.useEffect(()=>(_&&(re(document.documentElement,{scrollBehavior:"auto"}),ge.current=new Date),()=>{Mi(document.documentElement,"scrollBehavior")}),[_]);function tn(A){const B=A?(window.innerWidth-Ye)/window.innerWidth:1,G=A?-Ye:0;we.current&&window.clearTimeout(we.current),re(M.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${B}) translate3d(0, ${G}px, 0)`:`scale(${B}) translate3d(${G}px, 0, 0)`}),!A&&M.current&&(we.current=setTimeout(()=>{const $=Et(M.current,y);re(M.current,{transition:"none",transform:te(y)?`translate3d(0, ${$}px, 0)`:`translate3d(${$}px, 0, 0)`})},500))}function nn(A,B){if(B<0)return;const G=(window.innerWidth-Ye)/window.innerWidth,$=G+B*(1-G),X=-Ye+B*Ye;re(M.current,{transform:te(y)?`scale(${$}) translate3d(0, ${X}px, 0)`:`scale(${$}) translate3d(${X}px, 0, 0)`,transition:"none"})}function rn(A,B){const G=te(y)?window.innerHeight:window.innerWidth,$=B?(G-Ye)/G:1,X=B?-Ye:0;B&&re(M.current,{transition:`transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,transform:te(y)?`scale(${$}) translate3d(0, ${X}px, 0)`:`scale(${$}) translate3d(${X}px, 0, 0)`})}return l.useEffect(()=>{j||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[j]),l.createElement(H.Root,{defaultOpen:k,onOpenChange:A=>{!g&&!A||(A?K(!0):Be(!0),W(A))},open:_},l.createElement(Gs.Provider,{value:{activeSnapPoint:Me,snapPoints:o,setActiveSnapPoint:Ue,drawerRef:M,overlayRef:ve,onOpenChange:t,onPress:dt,onRelease:en,onDrag:ut,dismissible:g,shouldAnimate:z,handleOnly:m,isOpen:_,isDragging:ee,shouldFade:ct,closeDrawer:Be,onNestedDrag:nn,onNestedOpenChange:tn,onNestedRelease:rn,keyboardIsOpen:U,modal:j,snapPointsOffset:_e,activeSnapPointIndex:pe,direction:y,shouldScaleBackground:i,setBackgroundColorOnScale:d,noBodyStyles:S,container:E,autoFocus:F}},r))}const ea=l.forwardRef(function({...n},t){const{overlayRef:r,snapPoints:s,onRelease:a,shouldFade:o,isOpen:i,modal:d,shouldAnimate:u}=Tt(),c=Xs(t,r),g=s&&s.length>0;if(!d)return null;const m=l.useCallback(f=>a(f),[a]);return l.createElement(H.Overlay,{onMouseUp:m,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&g?"true":"false","data-vaul-snap-points-overlay":i&&o?"true":"false","data-vaul-animate":u!=null&&u.current?"true":"false",...n})});ea.displayName="Drawer.Overlay";const ta=l.forwardRef(function({onPointerDownOutside:n,style:t,onOpenAutoFocus:r,...s},a){const{drawerRef:o,onPress:i,onRelease:d,onDrag:u,keyboardIsOpen:c,snapPointsOffset:g,activeSnapPointIndex:m,modal:f,isOpen:b,direction:h,snapPoints:v,container:j,handleOnly:w,shouldAnimate:N,autoFocus:S}=Tt(),[y,k]=l.useState(!1),D=Xs(a,o),C=l.useRef(null),T=l.useRef(null),R=l.useRef(!1),L=v&&v.length>0;_i();const E=(I,P,_=0)=>{if(R.current)return!0;const W=Math.abs(I.y),O=Math.abs(I.x),K=O>W,ee=["bottom","right"].includes(P)?1:-1;if(P==="left"||P==="right"){if(!(I.x*ee<0)&&O>=0&&O<=_)return K}else if(!(I.y*ee<0)&&W>=0&&W<=_)return!K;return R.current=!0,!0};l.useEffect(()=>{L&&window.requestAnimationFrame(()=>{k(!0)})},[]);function F(I){C.current=null,R.current=!1,d(I)}return l.createElement(H.Content,{"data-vaul-drawer-direction":h,"data-vaul-drawer":"","data-vaul-delayed-snap-points":y?"true":"false","data-vaul-snap-points":b&&L?"true":"false","data-vaul-custom-container":j?"true":"false","data-vaul-animate":N!=null&&N.current?"true":"false",...s,ref:D,style:g&&g.length>0?{"--snap-point-height":`${g[m??0]}px`,...t}:t,onPointerDown:I=>{w||(s.onPointerDown==null||s.onPointerDown.call(s,I),C.current={x:I.pageX,y:I.pageY},i(I))},onOpenAutoFocus:I=>{r==null||r(I),S||I.preventDefault()},onPointerDownOutside:I=>{if(n==null||n(I),!f||I.defaultPrevented){I.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:I=>{if(!f){I.preventDefault();return}},onPointerMove:I=>{if(T.current=I,w||(s.onPointerMove==null||s.onPointerMove.call(s,I),!C.current))return;const P=I.pageY-C.current.y,_=I.pageX-C.current.x,W=I.pointerType==="touch"?10:2;E({x:_,y:P},h,W)?u(I):(Math.abs(_)>W||Math.abs(P)>W)&&(C.current=null)},onPointerUp:I=>{s.onPointerUp==null||s.onPointerUp.call(s,I),C.current=null,R.current=!1,d(I)},onPointerOut:I=>{s.onPointerOut==null||s.onPointerOut.call(s,I),F(T.current)},onContextMenu:I=>{s.onContextMenu==null||s.onContextMenu.call(s,I),T.current&&F(T.current)}})});ta.displayName="Drawer.Content";const Hi=250,Ui=120,Vi=l.forwardRef(function({preventCycle:n=!1,children:t,...r},s){const{closeDrawer:a,isDragging:o,snapPoints:i,activeSnapPoint:d,setActiveSnapPoint:u,dismissible:c,handleOnly:g,isOpen:m,onPress:f,onDrag:b}=Tt(),h=l.useRef(null),v=l.useRef(!1);function j(){if(v.current){S();return}window.setTimeout(()=>{w()},Ui)}function w(){if(o||n||v.current){S();return}if(S(),!i||i.length===0){c||a();return}if(d===i[i.length-1]&&c){a();return}const k=i.findIndex(C=>C===d);if(k===-1)return;const D=i[k+1];u(D)}function N(){h.current=window.setTimeout(()=>{v.current=!0},Hi)}function S(){h.current&&window.clearTimeout(h.current),v.current=!1}return l.createElement("div",{onClick:j,onPointerCancel:S,onPointerDown:y=>{g&&f(y),N()},onPointerMove:y=>{g&&b(y)},ref:s,"data-vaul-drawer-visible":m?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},l.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Vi.displayName="Drawer.Handle";function Gi(n){const t=Tt(),{container:r=t.container,...s}=n;return l.createElement(H.Portal,{container:r,...s})}const We={Root:Bi,Content:ta,Overlay:ea,Trigger:H.Trigger,Portal:Gi,Close:H.Close,Title:H.Title,Description:H.Description},na=({shouldScaleBackground:n=!0,...t})=>e.jsx(We.Root,{shouldScaleBackground:n,...t});na.displayName="Drawer";const qi=We.Trigger,ra=We.Portal,Wi=We.Close,sa=l.forwardRef(function({className:t,...r},s){return e.jsx(We.Overlay,{ref:s,className:x("fixed inset-0 z-50 bg-black/40",t),...r})}),Xi=l.forwardRef(function({className:t,children:r,...s},a){return e.jsxs(ra,{children:[e.jsx(sa,{}),e.jsxs(We.Content,{ref:a,className:x("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl","border-t border-border bg-card",t),...s,children:[e.jsx("div",{className:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border"}),r]})]})});function Ki({className:n,...t}){return e.jsx("div",{className:x("grid gap-1 p-4 text-center sm:text-left",n),...t})}function Yi({className:n,...t}){return e.jsx("div",{className:x("mt-auto flex flex-col gap-2 p-4",n),...t})}const Qi=l.forwardRef(function({className:t,...r},s){return e.jsx(We.Title,{ref:s,className:x("text-lg font-semibold",t),...r})}),Ji=l.forwardRef(function({className:t,...r},s){return e.jsx(We.Description,{ref:s,className:x("text-sm text-foreground-muted",t),...r})});function Zi(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}const el=l.forwardRef(function({accept:t,multiple:r,maxSize:s,value:a,onChange:o,hint:i,disabled:d,className:u},c){const g=l.useRef(null),m=l.useId(),[f,b]=l.useState([]),[h,v]=l.useState(!1),j=a??f,w=l.useCallback(k=>{a===void 0&&b(k),o==null||o(k)},[o,a]),N=l.useCallback(k=>{const D=Array.from(k).filter(C=>!s||C.size<=s);w(r?[...j,...D]:D.slice(0,1))},[j,s,r,w]),S=k=>w(j.filter((D,C)=>C!==k)),y=k=>{k.preventDefault(),v(!1),!d&&N(k.dataTransfer.files)};return e.jsxs("div",{ref:c,className:x("flex flex-col gap-3",u),children:[e.jsxs("label",{htmlFor:m,onDragOver:k=>{k.preventDefault(),d||v(!0)},onDragLeave:()=>v(!1),onDrop:y,className:x("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",h&&"border-accent bg-accent-soft",d&&"pointer-events-none opacity-50"),children:[e.jsx(p.Upload,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),i&&e.jsx("p",{className:"text-xs text-foreground-muted",children:i})]}),e.jsx("input",{ref:g,id:m,type:"file",accept:t,multiple:r,disabled:d,className:"sr-only",onChange:k=>k.target.files&&N(k.target.files)})]}),j.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:j.map((k,D)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(p.File,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:k.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:Zi(k.size)})]}),e.jsx("button",{type:"button",onClick:()=>S(D),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${k.name}`,children:e.jsx(p.X,{className:"size-4"})})]},`${k.name}-${D}`))})]})}),tl=Se.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),nl={default:null,info:e.jsx(p.Info,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(p.CheckCircle2,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(p.AlertTriangle,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(p.XCircle,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},rl=l.forwardRef(function({className:t,variant:r="default",title:s,action:a,onClose:o,icon:i,children:d,...u},c){const g=i===!1?null:i??nl[r??"default"];return e.jsxs("div",{ref:c,role:"status",className:x(tl({variant:r}),t),...u,children:[g,e.jsxs("div",{className:"min-w-0 flex-1",children:[s&&e.jsx("p",{className:"font-medium",children:s}),d&&e.jsx("p",{className:"text-foreground-muted",children:d})]}),a,o&&e.jsx("button",{type:"button",onClick:o,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(p.X,{className:"size-4"})})]})}),sl=l.forwardRef(function({value:t,defaultValue:r=[],onChange:s,placeholder:a="Add and press Enter",max:o,disabled:i,error:d,separators:u=["Enter",","],className:c},g){const[m,f]=l.useState(r),[b,h]=l.useState(""),v=t??m,j=l.useCallback(y=>{t===void 0&&f(y),s==null||s(y)},[s,t]),w=y=>{const k=y.trim();!k||v.includes(k)||o!==void 0&&v.length>=o||j([...v,k])},N=y=>j(v.filter((k,D)=>D!==y)),S=y=>{u.includes(y.key)?(y.preventDefault(),w(b),h("")):y.key==="Backspace"&&!b&&v.length&&N(v.length-1)};return e.jsxs("div",{ref:g,className:x("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",d?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",i&&"pointer-events-none opacity-50",c),children:[v.map((y,k)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[y,e.jsx("button",{type:"button",onClick:()=>N(k),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${y}`,children:e.jsx(p.X,{className:"size-3"})})]},`${y}-${k}`)),e.jsx("input",{value:b,disabled:i,onChange:y=>h(y.target.value),onKeyDown:S,onBlur:()=>{b&&(w(b),h(""))},placeholder:v.length===0?a:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),al=l.forwardRef(function({className:t,children:r,...s},a){return e.jsx("ol",{ref:a,className:x("relative flex flex-col gap-6",t),...s,children:r})}),ol=l.forwardRef(function({bullet:t,isLast:r,className:s,children:a,...o},i){return e.jsxs("li",{ref:i,className:x("relative flex gap-4 pb-1",s),...o,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:a})]})});function il({className:n,children:t}){return e.jsx("p",{className:x("text-xs text-foreground-subtle",n),children:t})}function ll({className:n,children:t}){return e.jsx("p",{className:x("text-sm font-medium",n),children:t})}function cl({className:n,children:t}){return e.jsx("p",{className:x("mt-0.5 text-sm text-foreground-muted",n),children:t})}function dl({data:n,defaultExpanded:t=[],selectedId:r,onSelect:s,className:a}){const[o,i]=l.useState(new Set(t)),d=c=>i(g=>{const m=new Set(g);return m.has(c)?m.delete(c):m.add(c),m});function u(c,g){const m=!!c.children,f=o.has(c.id),b=r===c.id,h=m?f?p.FolderOpen:p.Folder:p.File;return e.jsxs("li",{role:"treeitem","aria-expanded":m?f:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{s==null||s(c.id),m&&d(c.id)},onKeyDown:v=>{(v.key==="ArrowRight"&&m&&!f||v.key==="ArrowLeft"&&m&&f)&&d(c.id)},style:{paddingLeft:g*16+8},className:x("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",b&&"bg-accent-soft text-foreground"),children:[m?e.jsx(p.ChevronRight,{className:x("size-3.5 shrink-0 text-foreground-subtle transition-transform",f&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),c.icon??e.jsx(h,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:c.label})]}),m&&f&&e.jsx("ul",{role:"group",className:"mt-0.5",children:c.children.map(v=>u(v,g+1))})]},c.id)}return e.jsx("ul",{role:"tree",className:x("flex flex-col gap-0.5",a),children:n.map(c=>u(c,0))})}function ul({brand:n,title:t,subtitle:r,children:s,footer:a}){return e.jsx("main",{className:"grid min-h-screen place-items-center bg-background-subtle px-4 py-12",children:e.jsxs("div",{className:"w-full max-w-[400px] space-y-6",children:[n&&e.jsx("div",{className:"flex justify-center",children:n}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:t}),r&&e.jsx("p",{className:"text-sm text-foreground-muted",children:r})]}),e.jsx("div",{className:"rounded-lg border border-border bg-card p-6",children:s}),a&&e.jsx("p",{className:"text-center text-sm text-foreground-muted",children:a})]})})}function fl({onSubmit:n,loading:t,error:r,forgotHref:s="/forgot"}){const[a,o]=l.useState(""),[i,d]=l.useState(""),u=c=>{c.preventDefault(),n({email:a,password:i})};return e.jsxs("form",{onSubmit:u,className:"space-y-4",children:[r&&e.jsx(Ct,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",value:a,onChange:c=>o(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",value:i,onChange:c=>d(c.target.value),autoComplete:"current-password",required:!0}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsx("a",{href:s,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Forgot password?"})}),e.jsx(q,{type:"submit",loading:t,className:"w-full",trailingIcon:e.jsx(p.ArrowRight,{}),children:"Sign in"})]})}function ml({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState(""),[o,i]=l.useState(""),[d,u]=l.useState("");return e.jsxs("form",{onSubmit:c=>{c.preventDefault(),n({name:s,email:o,password:d})},className:"space-y-4",children:[r&&e.jsx(Ct,{variant:"danger",children:r}),e.jsx(se,{label:"Full name",value:s,onChange:c=>a(c.target.value),required:!0}),e.jsx(se,{type:"email",label:"Work email",value:o,onChange:c=>i(c.target.value),autoComplete:"email",required:!0}),e.jsx(se,{type:"password",label:"Password",helperText:"At least 8 characters.",value:d,onChange:c=>u(c.target.value),autoComplete:"new-password",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",children:"Create account"}),e.jsx("p",{className:"text-xs text-foreground-subtle text-center",children:"By signing up you agree to our Terms of Service and Privacy Policy."})]})}function xl({onSubmit:n,loading:t,error:r}){const[s,a]=l.useState("");return e.jsxs("form",{onSubmit:o=>{o.preventDefault(),n(s)},className:"space-y-4",children:[r&&e.jsx(Ct,{variant:"danger",children:r}),e.jsx(se,{type:"email",label:"Email",helperText:"We'll send a reset link if an account exists.",value:s,onChange:o=>a(o.target.value),autoComplete:"email",required:!0}),e.jsx(q,{type:"submit",loading:t,className:"w-full",leadingIcon:e.jsx(p.Mail,{}),children:"Send reset link"})]})}function gl({email:n,onResend:t}){return e.jsxs("div",{className:"space-y-4 text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full bg-success-soft text-success-text",children:e.jsx(p.CheckCircle2,{className:"size-6","aria-hidden":!0})}),e.jsxs("p",{className:"text-sm text-foreground-muted",children:["We sent a sign-in link to"," ",e.jsx("span",{className:"font-medium text-foreground",children:n}),". Open it on this device to continue."]}),e.jsx(et,{}),e.jsxs("p",{className:"text-xs text-foreground-subtle",children:["Didn't get it?"," ",e.jsx("button",{type:"button",onClick:t,className:"font-medium text-accent hover:underline outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm",children:"Resend"})]})]})}function pl({children:n,brand:t}){return e.jsxs("div",{className:"flex min-h-screen w-full bg-background",children:[e.jsxs(On,{defaultCollapsed:!1,footer:e.jsx(Je,{icon:e.jsx(Re,{fallback:"BO",size:"xs"}),className:"!h-10",children:"Bay Otgonbayar"}),children:[e.jsxs(Ft,{label:"Workspace",children:[e.jsx(Je,{icon:e.jsx(p.Home,{}),active:!0,children:"Home"}),e.jsx(Je,{icon:e.jsx(p.Folder,{}),children:"Projects"}),e.jsx(Je,{icon:e.jsx(p.Users,{}),trailing:e.jsx(Ee,{tone:"accent",children:"3"}),children:"Members"})]}),e.jsx(Ft,{label:"Account",children:e.jsx(Je,{icon:e.jsx(p.Settings,{}),children:"Settings"})})]}),e.jsxs("div",{className:"flex flex-1 flex-col min-w-0",children:[e.jsx(Bn,{logo:t,search:e.jsx(se,{type:"search",placeholder:"Search…",hideLabel:!0,label:"Search",prefix:e.jsx(p.Search,{})}),actions:e.jsxs(e.Fragment,{children:[e.jsx(it,{"aria-label":"Notifications",icon:e.jsx(p.Bell,{}),variant:"ghost"}),e.jsx(Re,{size:"sm",fallback:"BO"})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6 md:p-8",children:n})]})]})}const hl=[{label:"Active users",value:"2,840",delta:{value:"+12%",positive:!0}},{label:"Sessions today",value:"8,402",delta:{value:"+4%",positive:!0}},{label:"Open issues",value:"14",delta:{value:"−6%",positive:!0}},{label:"Error rate",value:"0.32%",delta:{value:"+0.05%",positive:!1}}],bl=[{id:"1",who:{name:"Anu B.",initials:"AB"},action:"merged",target:"feat/segments",when:"12m ago"},{id:"2",who:{name:"Bat E.",initials:"BE"},action:"opened",target:"fix/login-flow",when:"34m ago"},{id:"3",who:{name:"Tuya G.",initials:"TG"},action:"commented on",target:"Q2 OKRs",when:"1h ago"},{id:"4",who:{name:"Khulan O.",initials:"KO"},action:"archived",target:"old-billing-spike",when:"3h ago"}];function vl(){return e.jsxs("div",{className:"space-y-8",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Overview"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"What's happening across your workspace today."})]}),e.jsx("div",{className:"hidden md:flex items-center gap-2",children:e.jsx(Ee,{tone:"neutral",variant:"outline",children:"Last 7 days"})})]}),e.jsx("section",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:hl.map(n=>e.jsxs(xe,{children:[e.jsx(he,{className:"pb-2",children:e.jsx(ze,{children:n.label})}),e.jsx(be,{children:e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-semibold tabular text-foreground",children:n.value}),n.delta&&e.jsx("span",{className:n.delta.positive?"text-xs font-medium text-success-text tabular":"text-xs font-medium text-danger-text tabular",children:n.delta.value})]})})]},n.label))}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Active users"}),e.jsx(ze,{children:"Distinct sessions per day, last 30 days."})]}),e.jsx(be,{children:e.jsx("div",{role:"img","aria-label":"Active users sparkline",className:"h-48 w-full rounded-md border border-dashed border-border bg-background-subtle"})})]}),e.jsxs(xe,{padding:"none",children:[e.jsx(he,{className:"px-5 pt-5",children:e.jsx(Ce,{children:"Recent activity"})}),e.jsxs(Ut,{children:[e.jsx(Vt,{children:e.jsxs(Ge,{children:[e.jsx(qe,{children:"Who"}),e.jsx(qe,{children:"Action"}),e.jsx(qe,{children:"Target"}),e.jsx(qe,{className:"text-right",children:"When"})]})}),e.jsx(Gt,{children:bl.map(n=>e.jsxs(Ge,{children:[e.jsx(He,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Re,{size:"xs",fallback:n.who.initials}),e.jsx("span",{className:"text-foreground",children:n.who.name})]})}),e.jsx(He,{className:"text-foreground-muted",children:n.action}),e.jsx(He,{children:e.jsx(Ee,{tone:"neutral",variant:"outline",children:n.target})}),e.jsx(He,{className:"text-right tabular text-foreground-subtle",children:n.when})]},n.id))})]})]})]})}const wl=[{id:"profile",label:"Profile",icon:e.jsx(p.User,{})},{id:"security",label:"Security",icon:e.jsx(p.Lock,{})},{id:"notifications",label:"Notifications",icon:e.jsx(p.Bell,{})},{id:"billing",label:"Billing",icon:e.jsx(p.CreditCard,{})},{id:"team",label:"Team",icon:e.jsx(p.Users,{})}];function jl(){const[n,t]=l.useState("profile");return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Settings"}),e.jsx("p",{className:"text-sm text-foreground-muted mt-1",children:"Manage your account, preferences, and billing."})]}),e.jsxs("div",{className:"grid gap-8 md:grid-cols-[200px_1fr]",children:[e.jsx("nav",{"aria-label":"Settings sections",className:"md:sticky md:top-20 md:self-start",children:e.jsx("ul",{className:"flex flex-col gap-px",children:wl.map(r=>e.jsx("li",{children:e.jsxs("a",{href:`#${r.id}`,onClick:()=>t(r.id),className:x("flex h-9 items-center gap-2 rounded-md px-2 text-sm transition-colors duration-[var(--duration-fast)] outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",n===r.id?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),"aria-current":n===r.id?"page":void 0,children:[e.jsx("span",{className:"[&_svg]:size-4",children:r.icon}),r.label]})},r.id))})}),e.jsxs("div",{className:"space-y-8",children:[e.jsx("section",{id:"profile",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Profile"}),e.jsx(ze,{children:"Visible to your teammates."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Re,{size:"xl",fallback:"BO"}),e.jsxs("div",{children:[e.jsx(q,{variant:"outline",size:"sm",children:"Change photo"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-2",children:"JPG or PNG, max 2 MB."})]})]}),e.jsx(et,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(se,{label:"First name",defaultValue:"Bay"}),e.jsx(se,{label:"Last name",defaultValue:"Otgonbayar"})]}),e.jsx(se,{label:"Display email",type:"email",defaultValue:"bay@company.com"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Save changes"})})]})]})}),e.jsx("section",{id:"security",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Security"}),e.jsx(ze,{children:"How you sign in and protect your account."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(se,{label:"Current password",type:"password"}),e.jsx(se,{label:"New password",type:"password",helperText:"At least 8 characters."}),e.jsx(et,{}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Two-factor authentication"}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Required for admin accounts on production."})]}),e.jsx(st,{defaultChecked:!0})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(q,{children:"Update password"})})]})]})}),e.jsx("section",{id:"notifications",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Notifications"}),e.jsx(ze,{children:"Choose what we email and ping you about."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsx(st,{label:"Product updates",description:"A short note when we ship something.",defaultChecked:!0}),e.jsx(et,{}),e.jsx(st,{label:"Mentions",description:"When a teammate @ mentions you in a comment.",defaultChecked:!0}),e.jsx(et,{}),e.jsx(st,{label:"Weekly digest",description:"A Monday-morning summary of last week's activity."})]})]})}),e.jsx("section",{id:"billing",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Billing"}),e.jsx(ze,{children:"Your plan, invoices, and payment method."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-background-subtle p-4",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Team — $20/user/month"}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Renews on 1 June 2026 · 12 seats"})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(q,{variant:"outline",children:"Manage seats"}),e.jsx(q,{children:"Upgrade plan"})]})]})]})}),e.jsx("section",{id:"team",children:e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:"Team"}),e.jsx(ze,{children:"Invite teammates and manage roles."})]}),e.jsxs(be,{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(se,{type:"email",placeholder:"teammate@company.com",hideLabel:!0,label:"Invite email",className:"flex-1"}),e.jsx(q,{children:"Send invite"})]}),e.jsx("p",{className:"text-xs text-foreground-subtle",children:"Invited members will receive a sign-up link by email."})]})]})})]})]})]})}const yl=[{id:"p1",name:"Pulse onboarding",status:"active",owner:"Anu B.",updatedAt:"2 hours ago"},{id:"p2",name:"Q2 OKRs rollout",status:"active",owner:"Bat E.",updatedAt:"Yesterday"},{id:"p3",name:"Legacy export",status:"paused",owner:"Tuya G.",updatedAt:"3 days ago"},{id:"p4",name:"Billing spike",status:"archived",owner:"Khulan O.",updatedAt:"Last week"},{id:"p5",name:"Marketing refresh",status:"active",owner:"Anu B.",updatedAt:"Last week"}],ir={active:{tone:"success",label:"Active"},paused:{tone:"warning",label:"Paused"},archived:{tone:"neutral",label:"Archived"}};function Nl(){const[n,t]=l.useState(""),[r,s]=l.useState("all"),[a,o]=l.useState([]),[i,d]=l.useState(1),[u,c]=l.useState(10),g=l.useMemo(()=>yl.filter(b=>{const h=b.name.toLowerCase().includes(n.toLowerCase()),v=r==="all"||b.status===r;return h&&v}),[n,r]),m=g.length>0&&a.length===g.length,f=a.length>0&&!m;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-end justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Projects"}),e.jsxs("p",{className:"text-sm text-foreground-muted mt-1",children:[g.length," project",g.length===1?"":"s"," match your filters."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Upload,{}),children:"Import"}),e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(In,{value:r,onValueChange:s,children:[e.jsx(Wt,{className:"w-36",placeholder:"Status"}),e.jsxs(Xt,{children:[e.jsx(Ze,{value:"all",children:"All statuses"}),e.jsx(Ze,{value:"active",children:"Active"}),e.jsx(Ze,{value:"paused",children:"Paused"}),e.jsx(Ze,{value:"archived",children:"Archived"})]})]}),e.jsx(q,{variant:"outline",size:"sm",leadingIcon:e.jsx(p.Filter,{}),children:"More filters"})]}),a.length>0&&e.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border bg-background-subtle px-4 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(pt,{checked:m?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all"}),e.jsxs("span",{className:"text-sm text-foreground",children:[a.length," selected"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Download,{}),children:"Export"}),e.jsx(q,{variant:"ghost",size:"sm",leadingIcon:e.jsx(p.Trash2,{}),children:"Delete"})]})]}),e.jsx(Gr,{rows:g.slice((i-1)*u,i*u),filter:{value:n,onChange:t,placeholder:"Search projects…"},emptyState:e.jsx(qt,{title:"No projects match",description:"Try adjusting filters or creating a new project.",action:e.jsx(q,{leadingIcon:e.jsx(p.Plus,{}),children:"New project"}),className:"border-0 bg-transparent"}),columns:[{key:"select",header:e.jsx(pt,{checked:m?!0:f?"indeterminate":!1,onCheckedChange:b=>o(b?g.map(h=>h.id):[]),"aria-label":"Select all rows"}),width:"32px",cell:b=>e.jsx(pt,{checked:a.includes(b.id),onCheckedChange:h=>o(v=>h?[...v,b.id]:v.filter(j=>j!==b.id)),"aria-label":`Select ${b.name}`})},{key:"name",header:"Name",sortable:!0,cell:b=>e.jsx("span",{className:"font-medium text-foreground",children:b.name})},{key:"status",header:"Status",cell:b=>e.jsx(Ee,{tone:ir[b.status].tone,dot:!0,children:ir[b.status].label})},{key:"owner",header:"Owner"},{key:"updatedAt",header:"Updated",align:"right"}]}),e.jsx(En,{page:i,pageCount:Math.max(1,Math.ceil(g.length/u)),onPageChange:d,totalItems:g.length,pageSize:u,pageSizeOptions:[10,20,50],onPageSizeChange:b=>{c(b),d(1)}})]})}function Cl(){return e.jsxs("div",{className:"space-y-6",children:[e.jsx(hn,{items:[{label:"Projects",href:"/projects"},{label:"Pulse onboarding"}]}),e.jsxs("header",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Pulse onboarding"}),e.jsx(Ee,{tone:"success",dot:!0,children:"Active"})]}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-2xl",children:"Self-serve onboarding flow for new admins. Owns the first 5 minutes of every workspace."})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Edit2,{}),children:"Edit"}),e.jsx(q,{variant:"outline",leadingIcon:e.jsx(p.Trash2,{}),children:"Archive"}),e.jsx(q,{trailingIcon:e.jsx(p.ExternalLink,{}),children:"Open in app"})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_320px]",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs(Ds,{defaultValue:"overview",children:[e.jsxs(_n,{children:[e.jsx(at,{value:"overview",children:"Overview"}),e.jsx(at,{value:"activity",children:"Activity"}),e.jsx(at,{value:"files",children:"Files"}),e.jsx(at,{value:"settings",children:"Settings"})]}),e.jsx(ot,{value:"overview",className:"space-y-4",children:e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Ce,{children:"Summary"})}),e.jsxs(be,{className:"space-y-2 text-foreground-muted leading-relaxed",children:[e.jsx("p",{children:"The Pulse onboarding flow walks new admins through workspace creation, teammate invites, and first-data import in under five minutes."}),e.jsx("p",{children:"Completion rate sits at 71% (week-over-week +4 pts) and median time to finish is 4 m 22 s."})]})]})}),e.jsx(ot,{value:"activity",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Activity feed appears here."})}),e.jsx(ot,{value:"files",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Linked documents appear here."})}),e.jsx(ot,{value:"settings",children:e.jsx("p",{className:"text-sm text-foreground-muted",children:"Project settings appear here."})})]})}),e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Ce,{children:"Details"})}),e.jsxs(be,{className:"space-y-3 text-sm",children:[e.jsx(At,{label:"Owner",value:e.jsxs(e.Fragment,{children:[e.jsx(Re,{size:"xs",fallback:"AB"})," Anu B."]})}),e.jsx(At,{label:"Created",value:"12 Feb 2026"}),e.jsx(At,{label:"Updated",value:"2 hours ago"}),e.jsx(At,{label:"Tags",value:e.jsxs(e.Fragment,{children:[e.jsx(Ee,{tone:"accent",children:"growth"})," ",e.jsx(Ee,{tone:"neutral",variant:"outline",children:"v2"})]})})]})]}),e.jsxs(xe,{children:[e.jsx(he,{children:e.jsx(Ce,{children:"Watchers"})}),e.jsx(be,{children:e.jsxs("div",{className:"flex -space-x-2",children:[e.jsx(Re,{fallback:"AB"}),e.jsx(Re,{fallback:"BE"}),e.jsx(Re,{fallback:"TG"}),e.jsx(Re,{fallback:"+2"})]})})]})]})]})]})}function At({label:n,value:t}){return e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"text-foreground-subtle",children:n}),e.jsx("span",{className:"flex items-center gap-1.5 text-foreground",children:t})]})}const Lt=[{title:"Workspace"},{title:"Invite team"},{title:"Connect data"},{title:"Done"}];function Sl(){const[n,t]=l.useState(0),r=()=>t(a=>Math.min(a+1,Lt.length-1)),s=()=>t(a=>Math.max(a-1,0));return e.jsxs("div",{className:"mx-auto max-w-2xl space-y-8 py-12",children:[e.jsx(Fn,{steps:Lt,current:n}),e.jsxs(xe,{children:[e.jsxs(he,{children:[e.jsx(Ce,{children:lr[n].title}),e.jsx(ze,{children:lr[n].description})]}),e.jsxs(be,{className:"space-y-4",children:[n===0&&e.jsxs(e.Fragment,{children:[e.jsx(se,{label:"Workspace name",placeholder:"Acme Inc."}),e.jsx(se,{label:"URL slug",prefix:e.jsx("span",{children:"acme.app/"}),placeholder:"acme"})]}),n===1&&e.jsxs(e.Fragment,{children:[e.jsx(se,{type:"email",label:"Invite by email",placeholder:"teammate@company.com",helperText:"Separate multiple emails with commas."}),e.jsxs(An,{defaultValue:"member",children:[e.jsx(ht,{value:"admin",label:"Admin",description:"Can manage workspace and billing."}),e.jsx(ht,{value:"member",label:"Member",description:"Can create and edit projects."}),e.jsx(ht,{value:"viewer",label:"Viewer",description:"Read-only access."})]})]}),n===2&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-foreground-muted",children:"Connect your data source so we can populate your first dashboard."}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:["Postgres","BigQuery","Snowflake","CSV upload"].map(a=>e.jsxs("button",{type:"button",className:"rounded-lg border border-border bg-card p-4 text-left hover:border-border-strong hover:bg-background-subtle transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:[e.jsx("p",{className:"font-medium text-foreground",children:a}),e.jsx("p",{className:"text-xs text-foreground-subtle mt-1",children:"Quick setup with SSO"})]},a))})]}),n===3&&e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[e.jsx(p.CheckCircle2,{className:"size-10 text-success-text","aria-hidden":!0}),e.jsx("p",{className:"text-base font-medium text-foreground",children:"You're all set."}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-sm",children:"Your workspace is ready. We've sent invites and your first dashboard is loading."})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(q,{variant:"ghost",leadingIcon:e.jsx(p.ArrowLeft,{}),onClick:s,disabled:n===0,children:"Back"}),n<Lt.length-1?e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),onClick:r,children:n===Lt.length-2?"Finish":"Continue"}):e.jsx(q,{children:"Open workspace"})]})]})}const lr=[{title:"Create your workspace",description:"A workspace is where your team and projects live."},{title:"Invite your team",description:"You can always invite more people later."},{title:"Connect a data source",description:"Pick one — others can be added in settings."},{title:"Welcome aboard",description:"We've set up your starting dashboard."}],kl=[{name:"Starter",price:"$0",cadence:"forever",description:"For individuals exploring the product.",features:["Up to 3 projects","Community support","Single workspace"],cta:"Start free"},{name:"Team",price:"$20",cadence:"per user / month",description:"For small teams running real workloads.",features:["Unlimited projects","Email support, 24h response","SSO via Google & Microsoft","Audit log (30 days)"],cta:"Start 14-day trial",highlighted:!0},{name:"Enterprise",price:"Custom",cadence:"annual",description:"For organisations with custom requirements.",features:["Everything in Team","SAML SSO + SCIM","Dedicated CSM","SOC 2 report + DPA","Audit log (unlimited)"],cta:"Talk to sales"}];function Tl(){return e.jsxs("div",{className:"mx-auto max-w-5xl space-y-8 py-16",children:[e.jsxs("header",{className:"text-center space-y-3",children:[e.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:"Plans that scale with your team"}),e.jsx("p",{className:"text-sm text-foreground-muted max-w-xl mx-auto",children:"Start free, upgrade when you need more. All paid plans include a 14-day trial — no credit card required."})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:kl.map(n=>e.jsxs("div",{className:x("flex flex-col gap-6 rounded-lg border bg-card p-6",n.highlighted?"border-accent shadow-sm":"border-border"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-base font-semibold text-foreground",children:n.name}),n.highlighted&&e.jsx(Ee,{tone:"accent",children:"Most popular"})]}),e.jsx("p",{className:"text-sm text-foreground-muted",children:n.description})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-3xl font-semibold tabular text-foreground",children:n.price}),e.jsx("span",{className:"text-sm text-foreground-subtle",children:n.cadence})]}),e.jsx("ul",{className:"space-y-2 text-sm",children:n.features.map(t=>e.jsxs("li",{className:"flex items-start gap-2 text-foreground",children:[e.jsx(p.Check,{className:"size-4 text-accent shrink-0 mt-0.5","aria-hidden":!0}),t]},t))}),e.jsx(q,{variant:n.highlighted?"primary":"outline",className:"mt-auto w-full",children:n.cta})]},n.name))})]})}const Dl=[{icon:e.jsx(p.Plus,{}),title:"Create a project",description:"Track a real piece of work end-to-end.",cta:"New project"},{icon:e.jsx(p.Upload,{}),title:"Import existing data",description:"CSV, Postgres, BigQuery, or Snowflake — connect in a minute.",cta:"Connect source"},{icon:e.jsx(p.Users,{}),title:"Invite your team",description:"Workspaces are better with teammates. We'll send the invites.",cta:"Invite people"}];function Rl(){return e.jsxs("div",{className:"mx-auto max-w-3xl space-y-8 py-12",children:[e.jsx(qt,{icon:e.jsx(p.Folder,{className:"size-6"}),title:"Your workspace is ready",description:"Start with one of the steps below — you can always come back to the others.",action:e.jsx(q,{trailingIcon:e.jsx(p.ArrowRight,{}),children:"Open tutorial"})}),e.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Dl.map(n=>e.jsx(xe,{variant:"interactive",children:e.jsxs(be,{className:"space-y-3",children:[e.jsx("div",{className:"inline-flex size-9 items-center justify-center rounded-md bg-accent-soft text-on-accent-soft [&_svg]:size-4",children:n.icon}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold text-foreground",children:n.title}),e.jsx("p",{className:"text-xs text-foreground-muted leading-relaxed",children:n.description})]}),e.jsx(q,{variant:"ghost",size:"sm",trailingIcon:e.jsx(p.ArrowRight,{}),children:n.cta})]})},n.title))})]})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>Se.cva});exports.Accordion=za;exports.AccordionContent=mr;exports.AccordionItem=ur;exports.AccordionTrigger=fr;exports.Alert=Ct;exports.AppShell=pl;exports.AreaChart=pi;exports.AuthLayout=ul;exports.Avatar=Re;exports.AvatarGroup=gr;exports.Badge=Ee;exports.BarChart=hi;exports.Breadcrumbs=hn;exports.Button=q;exports.Calendar=Ro;exports.Card=xe;exports.CardContent=be;exports.CardDescription=ze;exports.CardFooter=pr;exports.CardHeader=he;exports.CardTitle=Ce;exports.Carousel=di;exports.CarouselContent=ui;exports.CarouselItem=fi;exports.CarouselNext=xi;exports.CarouselPrevious=mi;exports.Checkbox=pt;exports.Combobox=hr;exports.Command=br;exports.CommandDialog=Ua;exports.CommandEmpty=jr;exports.CommandGroup=yr;exports.CommandInput=vr;exports.CommandItem=Cr;exports.CommandList=wr;exports.CommandSeparator=Nr;exports.CommandShortcut=Ha;exports.ConfirmationDialog=es;exports.ContextMenu=Ga;exports.ContextMenuCheckboxItem=Ir;exports.ContextMenuContent=Dr;exports.ContextMenuGroup=Wa;exports.ContextMenuItem=Rr;exports.ContextMenuLabel=Pr;exports.ContextMenuPortal=Sr;exports.ContextMenuRadioGroup=Ka;exports.ContextMenuRadioItem=Mr;exports.ContextMenuSeparator=zr;exports.ContextMenuShortcut=Er;exports.ContextMenuSub=Xa;exports.ContextMenuSubContent=Tr;exports.ContextMenuSubTrigger=kr;exports.ContextMenuTrigger=qa;exports.Dashboard=vl;exports.DataGrid=Gr;exports.DataTablePage=Nl;exports.DatePicker=Kr;exports.DateRangePicker=Yr;exports.Dialog=Qr;exports.DialogClose=Zr;exports.DialogContent=Sn;exports.DialogDescription=Rn;exports.DialogFooter=Tn;exports.DialogHeader=kn;exports.DialogOverlay=Cn;exports.DialogPortal=Jr;exports.DialogTitle=Dn;exports.DialogTrigger=no;exports.Drawer=na;exports.DrawerClose=Wi;exports.DrawerContent=Xi;exports.DrawerDescription=Ji;exports.DrawerFooter=Yi;exports.DrawerHeader=Ki;exports.DrawerOverlay=sa;exports.DrawerPortal=ra;exports.DrawerTitle=Qi;exports.DrawerTrigger=qi;exports.DropdownMenu=Ar;exports.DropdownMenuCheckboxItem=vn;exports.DropdownMenuContent=bn;exports.DropdownMenuGroup=Ya;exports.DropdownMenuItem=$r;exports.DropdownMenuLabel=wn;exports.DropdownMenuPortal=Or;exports.DropdownMenuRadioGroup=Ja;exports.DropdownMenuRadioItem=Br;exports.DropdownMenuSeparator=jn;exports.DropdownMenuShortcut=Hr;exports.DropdownMenuSub=Qa;exports.DropdownMenuSubContent=_r;exports.DropdownMenuSubTrigger=Fr;exports.DropdownMenuTrigger=Lr;exports.EmptyState=qt;exports.ErrorState=ts;exports.FileUpload=el;exports.FirstRunEmpty=Rl;exports.ForgotPasswordForm=xl;exports.Form=so;exports.FormControl=os;exports.FormDescription=is;exports.FormError=ls;exports.FormField=ao;exports.FormItem=ss;exports.FormLabel=as;exports.IconButton=it;exports.Icons=Pa;exports.Input=se;exports.Kbd=cs;exports.LineChart=gi;exports.MagicLinkSent=gl;exports.MultiSelect=ds;exports.Onboarding=Sl;exports.Pagination=En;exports.Popover=lo;exports.PopoverAnchor=uo;exports.PopoverClose=fo;exports.PopoverContent=xs;exports.PopoverTrigger=co;exports.Pricing=Tl;exports.Progress=gs;exports.ProgressCircle=ps;exports.RadioGroup=An;exports.RadioItem=ht;exports.RecordDetail=Cl;exports.ScrollArea=hs;exports.ScrollBar=Ln;exports.Select=In;exports.SelectContent=Xt;exports.SelectGroup=ms;exports.SelectItem=Ze;exports.SelectLabel=zn;exports.SelectScrollDownButton=Pn;exports.SelectScrollUpButton=Mn;exports.SelectSeparator=fs;exports.SelectTrigger=Wt;exports.SelectValue=oo;exports.Separator=et;exports.SettingsPage=jl;exports.Sheet=po;exports.SheetClose=bo;exports.SheetContent=ws;exports.SheetDescription=Cs;exports.SheetFooter=ys;exports.SheetHeader=js;exports.SheetPortal=bs;exports.SheetTitle=Ns;exports.SheetTrigger=ho;exports.Sidebar=On;exports.SidebarGroup=Ss;exports.SidebarItem=Je;exports.SidebarSection=Ft;exports.SignInForm=fl;exports.SignUpForm=ml;exports.Skeleton=Nn;exports.Slider=ks;exports.Snackbar=rl;exports.Spinner=Ts;exports.Stepper=Fn;exports.Switch=st;exports.Table=Ut;exports.TableBody=Gt;exports.TableCaption=Vr;exports.TableCell=He;exports.TableFooter=Ur;exports.TableHead=qe;exports.TableHeader=Vt;exports.TableRow=Ge;exports.TableSortHeader=yn;exports.Tabs=Ds;exports.TabsContent=ot;exports.TabsList=_n;exports.TabsTrigger=at;exports.TagInput=sl;exports.Textarea=Rs;exports.Timeline=al;exports.TimelineDescription=cl;exports.TimelineItem=ol;exports.TimelineTime=il;exports.TimelineTitle=ll;exports.Toast=Ms;exports.ToastAction=Es;exports.ToastClose=As;exports.ToastDescription=zs;exports.ToastProvider=So;exports.ToastTitle=Ps;exports.ToastViewport=Is;exports.Tooltip=Fs;exports.TooltipContent=$n;exports.TooltipProvider=Do;exports.TooltipRoot=Ls;exports.TooltipTrigger=Os;exports.TopNav=Bn;exports.TopNavLink=_s;exports.Tree=dl;exports.cn=x;exports.toast=Ma;exports.uid=Da;exports.useCommandPaletteShortcut=Va;exports.useFormField=St;exports.useMediaQuery=dr;exports.usePrefersReducedMotion=Ra;exports.useToast=Ia;
|
|
8
10
|
//# sourceMappingURL=index.cjs.map
|