@fabio.caffarello/react-design-system 3.13.0 → 4.0.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/granular/ui/components/Autocomplete/Autocomplete.js +103 -86
- package/dist/granular/ui/components/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js +57 -47
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js.map +1 -1
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js +21 -20
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js.map +1 -1
- package/dist/granular/ui/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/granular/ui/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js +187 -149
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/granular/ui/components/DataGrid/DataGrid.js +92 -92
- package/dist/granular/ui/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js +154 -139
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js.map +1 -1
- package/dist/granular/ui/components/Dialog/AlertDialog.js +73 -40
- package/dist/granular/ui/components/Dialog/AlertDialog.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogContent.js +54 -48
- package/dist/granular/ui/components/Dialog/DialogContent.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogDescription.js +31 -31
- package/dist/granular/ui/components/Dialog/DialogDescription.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogTitle.js +30 -30
- package/dist/granular/ui/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/granular/ui/components/Drawer/Drawer.js.map +1 -1
- package/dist/granular/ui/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/granular/ui/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/granular/ui/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/granular/ui/components/Form/Form.js +38 -37
- package/dist/granular/ui/components/Form/Form.js.map +1 -1
- package/dist/granular/ui/components/Form/FormField.js +28 -26
- package/dist/granular/ui/components/Form/FormField.js.map +1 -1
- package/dist/granular/ui/components/Header/Header.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderActions.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderHamburger.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderLogo.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderMobileMenu.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderNavigation.js.map +1 -1
- package/dist/granular/ui/components/Header/contexts/HeaderContext.js.map +1 -1
- package/dist/granular/ui/components/Menu/Menu.js.map +1 -1
- package/dist/granular/ui/components/Modal/Modal.js +98 -86
- package/dist/granular/ui/components/Modal/Modal.js.map +1 -1
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js +122 -106
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/granular/ui/components/Navigation/Navigation.js.map +1 -1
- package/dist/granular/ui/components/PageHeader/PageHeader.js.map +1 -1
- package/dist/granular/ui/components/Pagination/Pagination.js.map +1 -1
- package/dist/granular/ui/components/Popover/Popover.js.map +1 -1
- package/dist/granular/ui/components/Rating/Rating.js.map +1 -1
- package/dist/granular/ui/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js +82 -64
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js +30 -29
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js +37 -35
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js +57 -57
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js.map +1 -1
- package/dist/granular/ui/components/Stepper/Stepper.js +102 -94
- package/dist/granular/ui/components/Stepper/Stepper.js.map +1 -1
- package/dist/granular/ui/components/Table/Table.js +41 -35
- package/dist/granular/ui/components/Table/Table.js.map +1 -1
- package/dist/granular/ui/components/Table/TableActions/TableActions.js.map +1 -1
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js +49 -46
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js.map +1 -1
- package/dist/granular/ui/components/Table/TablePagination/TablePagination.js.map +1 -1
- package/dist/granular/ui/components/Table/TableProvider.js +82 -80
- package/dist/granular/ui/components/Table/TableProvider.js.map +1 -1
- package/dist/granular/ui/components/Table/TableRow.js +57 -53
- package/dist/granular/ui/components/Table/TableRow.js.map +1 -1
- package/dist/granular/ui/components/Table/useColumnResizing.js +53 -53
- package/dist/granular/ui/components/Table/useColumnResizing.js.map +1 -1
- package/dist/granular/ui/components/TimePicker/TimePicker.js +149 -103
- package/dist/granular/ui/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/granular/ui/components/Timeline/Timeline.js.map +1 -1
- package/dist/granular/ui/hooks/useFocusRestore.js +14 -15
- package/dist/granular/ui/hooks/useFocusRestore.js.map +1 -1
- package/dist/granular/ui/primitives/Badge/Badge.js.map +1 -1
- package/dist/granular/ui/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/granular/ui/primitives/Chip/Chip.js +91 -71
- package/dist/granular/ui/primitives/Chip/Chip.js.map +1 -1
- package/dist/granular/ui/primitives/ErrorMessage/ErrorMessage.js.map +1 -1
- package/dist/granular/ui/primitives/Input/Input.js.map +1 -1
- package/dist/granular/ui/primitives/Label/Label.js.map +1 -1
- package/dist/granular/ui/primitives/NavLink/NavLink.js.map +1 -1
- package/dist/granular/ui/primitives/Radio/Radio.js.map +1 -1
- package/dist/granular/ui/primitives/Select/Select.js.map +1 -1
- package/dist/granular/ui/primitives/Separator/Separator.js.map +1 -1
- package/dist/granular/ui/primitives/Skeleton/Skeleton.js.map +1 -1
- package/dist/granular/ui/primitives/Slider/Slider.js.map +1 -1
- package/dist/granular/ui/primitives/Spinner/Spinner.js.map +1 -1
- package/dist/granular/ui/primitives/Switch/Switch.js.map +1 -1
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/granular/ui/providers/DialogContext.js.map +1 -1
- package/dist/granular/ui/providers/DialogProvider.js +24 -20
- package/dist/granular/ui/providers/DialogProvider.js.map +1 -1
- package/dist/index.cjs +144 -144
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5780 -5486
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/server/index.cjs +7 -7
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +404 -384
- package/dist/server/index.js.map +1 -1
- package/dist/ui/components/Autocomplete/AutocompleteList.d.ts +4 -0
- package/dist/ui/components/Autocomplete/AutocompleteOption.d.ts +8 -0
- package/dist/ui/components/Breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/ui/components/ColorPicker/ColorPicker.d.ts +0 -1
- package/dist/ui/components/CommandPalette/CommandPalette.d.ts +0 -1
- package/dist/ui/components/DataGrid/DataGrid.d.ts +0 -1
- package/dist/ui/components/Dialog/DialogContent.d.ts +20 -1
- package/dist/ui/components/Drawer/Drawer.d.ts +0 -1
- package/dist/ui/components/Dropdown/Dropdown.d.ts +0 -1
- package/dist/ui/components/EmptyState/EmptyState.d.ts +0 -1
- package/dist/ui/components/FileUpload/FileUpload.d.ts +0 -1
- package/dist/ui/components/Form/FormField.d.ts +7 -0
- package/dist/ui/components/Header/Header.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderActions.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderHamburger.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderLogo.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderMobileMenu.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderNavigation.d.ts +1 -1
- package/dist/ui/components/Header/contexts/HeaderContext.d.ts +1 -1
- package/dist/ui/components/Menu/Menu.d.ts +0 -1
- package/dist/ui/components/Modal/Modal.d.ts +1 -2
- package/dist/ui/components/Navigation/Navigation.d.ts +1 -1
- package/dist/ui/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/ui/components/Pagination/Pagination.d.ts +0 -1
- package/dist/ui/components/Popover/Popover.d.ts +0 -1
- package/dist/ui/components/Rating/Rating.d.ts +0 -1
- package/dist/ui/components/SearchInput/SearchInput.d.ts +0 -1
- package/dist/ui/components/Stepper/Stepper.d.ts +0 -1
- package/dist/ui/components/Table/TableActions/TableActions.d.ts +0 -1
- package/dist/ui/components/Table/TableFilters/TableFilters.d.ts +0 -1
- package/dist/ui/components/Table/TablePagination/TablePagination.d.ts +0 -1
- package/dist/ui/components/TimePicker/TimePicker.d.ts +0 -1
- package/dist/ui/components/Timeline/Timeline.d.ts +0 -1
- package/dist/ui/primitives/Checkbox/Checkbox.d.ts +0 -1
- package/dist/ui/primitives/Chip/Chip.d.ts +21 -0
- package/dist/ui/primitives/ErrorMessage/ErrorMessage.d.ts +0 -1
- package/dist/ui/primitives/Input/Input.d.ts +0 -1
- package/dist/ui/primitives/Label/Label.d.ts +0 -1
- package/dist/ui/primitives/NavLink/NavLink.d.ts +1 -1
- package/dist/ui/primitives/Radio/Radio.d.ts +0 -1
- package/dist/ui/primitives/Select/Select.d.ts +0 -1
- package/dist/ui/primitives/Skeleton/Skeleton.d.ts +0 -1
- package/dist/ui/primitives/Slider/Slider.d.ts +0 -1
- package/dist/ui/primitives/Switch/Switch.d.ts +0 -1
- package/dist/ui/primitives/Tooltip/Tooltip.d.ts +0 -1
- package/dist/ui/providers/DialogContext.d.ts +8 -0
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use client";"use strict";var oi=Object.defineProperty,ii=Object.defineProperties;var li=Object.getOwnPropertyDescriptors;var rr=Object.getOwnPropertySymbols;var vn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var Xr=(e,t,r)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))vn.call(t,r)&&Xr(e,r,t[r]);if(rr)for(var r of rr(t))yn.call(t,r)&&Xr(e,r,t[r]);return e},F=(e,t)=>ii(e,li(t));var z=(e,t)=>{var r={};for(var s in e)vn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&rr)for(var s of rr(e))t.indexOf(s)<0&&yn.call(e,s)&&(r[s]=e[s]);return r};var wn=(e,t,r)=>Xr(e,typeof t!="symbol"?t+"":t,r);var sr=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Ye=require("react-dom");function ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Se=ci(l),rt={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function di(e){return e<=0?rt.spacing.itemPaddingX:e===1?rt.spacing.nestedIndent:e===2?rt.spacing.nestedIndentLevel2:e===3?rt.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class ve{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}wn(ve,"BASE_UNIT",4);const yr={none:ve.create(0),"0.5":ve.create(.5),xs:ve.create(1),"1.5":ve.create(1.5),sm:ve.create(2),"2.5":ve.create(2.5),md:ve.create(3),"3.5":ve.create(3.5),base:ve.create(4),lg:ve.create(6),xl:ve.create(8),"2xl":ve.create(10),"3xl":ve.create(12),"4xl":ve.create(16),"5xl":ve.create(20),"6xl":ve.create(24)};function ui(e){return yr[e]}function m(e,t="p"){const s=yr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-x":"space-x","space-y":"space-y"}[t]}-${s}`}class ge{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const fi={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},mi={light:ge.createFontWeight("light"),normal:ge.createFontWeight("normal"),medium:ge.createFontWeight("medium"),semibold:ge.createFontWeight("semibold"),bold:ge.createFontWeight("bold")},wt={h1:ge.create("4xl","tight","bold"),h2:ge.create("3xl","tight","bold"),h3:ge.create("2xl","snug","semibold"),h4:ge.create("xl","snug","semibold"),h5:ge.create("lg","normal","medium"),h6:ge.create("base","normal","medium"),body:ge.create("base","relaxed","normal"),bodySmall:ge.create("sm","relaxed","normal"),bodyLarge:ge.create("lg","relaxed","normal"),label:ge.create("sm","normal","medium"),caption:ge.create("xs","normal","normal"),button:ge.create("base","normal","medium")};function pi(e){return wt[e]}function ue(e){const t=wt[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function re(e){return wt[e].fontSize.tailwind}function je(e){return ge.createFontSize(e).tailwind}function ze(e){return wt[e].fontWeight.tailwind}function It(e){return ge.createFontWeight(e).tailwind}function bi(e){return wt[e].lineHeight.tailwind}const gi=[50,100,200,300,400,500,600,700,800,900,950];function de(e,t,r){const s=hi(e),a=xi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function hi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function xi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const st={50:de("#f0f4f8","brand-primary",50),100:de("#d9e2ec","brand-primary",100),200:de("#bcccdc","brand-primary",200),300:de("#9fb3c8","brand-primary",300),400:de("#7390ad","brand-primary",400),500:de("#486581","brand-primary",500),600:de("#334e68","brand-primary",600),700:de("#243b53","brand-primary",700),800:de("#1a2a3a","brand-primary",800),900:de("#102a43","brand-primary",900),950:de("#061a35","brand-primary",950)},nt={50:de("#f7f5ff","brand-secondary",50),100:de("#eee9ff","brand-secondary",100),200:de("#e0d6ff","brand-secondary",200),300:de("#cbb8ff","brand-secondary",300),400:de("#aa89fc","brand-secondary",400),500:de("#8e58f2","brand-secondary",500),600:de("#703bc8","brand-secondary",600),700:de("#582aa2","brand-secondary",700),800:de("#44227e","brand-secondary",800),900:de("#32185d","brand-secondary",900),950:de("#180635","brand-secondary",950)};function E(e,t,r){const s=vi(e),a=yi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function vi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function yi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Un={50:E("#eef2ff","indigo",50),100:E("#e0e7ff","indigo",100),200:E("#c7d2fe","indigo",200),300:E("#a5b4fc","indigo",300),400:E("#818cf8","indigo",400),500:E("#6366f1","indigo",500),600:E("#4f46e5","indigo",600),700:E("#4338ca","indigo",700),800:E("#3730a3","indigo",800),900:E("#312e81","indigo",900),950:E("#1e1b4b","indigo",950)},Gn={50:E("#f5f3ff","violet",50),100:E("#ede9fe","violet",100),200:E("#ddd6fe","violet",200),300:E("#c4b5fd","violet",300),400:E("#a78bfa","violet",400),500:E("#8b5cf6","violet",500),600:E("#7c3aed","violet",600),700:E("#6d28d9","violet",700),800:E("#5b21b6","violet",800),900:E("#4c1d95","violet",900),950:E("#2e1065","violet",950)},at={50:E("#ecfeff","cyan",50),100:E("#cffafe","cyan",100),200:E("#a5f3fc","cyan",200),300:E("#67e8f9","cyan",300),400:E("#22d3ee","cyan",400),500:E("#06b6d4","cyan",500),600:E("#0891b2","cyan",600),700:E("#0e7490","cyan",700),800:E("#155e75","cyan",800),900:E("#164e63","cyan",900),950:E("#083344","cyan",950)},ot={50:E("#f8fafc","slate",50),100:E("#f1f5f9","slate",100),200:E("#e2e8f0","slate",200),300:E("#cbd5e1","slate",300),400:E("#94a3b8","slate",400),500:E("#64748b","slate",500),600:E("#475569","slate",600),700:E("#334155","slate",700),800:E("#1e293b","slate",800),900:E("#0f172a","slate",900),950:E("#020617","slate",950)},Kn={50:E("#f9fafb","gray",50),100:E("#f3f4f6","gray",100),200:E("#e5e7eb","gray",200),300:E("#d1d5db","gray",300),400:E("#9ca3af","gray",400),500:E("#6b7280","gray",500),600:E("#4b5563","gray",600),700:E("#374151","gray",700),800:E("#1f2937","gray",800),900:E("#111827","gray",900),950:E("#030712","gray",950)},it={50:E("#ecfdf5","emerald",50),100:E("#d1fae5","emerald",100),200:E("#a7f3d0","emerald",200),300:E("#6ee7b7","emerald",300),400:E("#34d399","emerald",400),500:E("#10b981","emerald",500),600:E("#059669","emerald",600),700:E("#047857","emerald",700),800:E("#065f46","emerald",800),900:E("#064e3b","emerald",900),950:E("#022c22","emerald",950)},Yn={50:E("#f0fdf4","green",50),100:E("#dcfce7","green",100),200:E("#bbf7d0","green",200),300:E("#86efac","green",300),400:E("#4ade80","green",400),500:E("#22c55e","green",500),600:E("#16a34a","green",600),700:E("#15803d","green",700),800:E("#166534","green",800),900:E("#14532d","green",900),950:E("#052e16","green",950)},lt={50:E("#fffbeb","amber",50),100:E("#fef3c7","amber",100),200:E("#fde68a","amber",200),300:E("#fcd34d","amber",300),400:E("#fbbf24","amber",400),500:E("#f59e0b","amber",500),600:E("#d97706","amber",600),700:E("#b45309","amber",700),800:E("#92400e","amber",800),900:E("#78350f","amber",900),950:E("#451a03","amber",950)},qn={50:E("#fefce8","yellow",50),100:E("#fef9c3","yellow",100),200:E("#fef08a","yellow",200),300:E("#fde047","yellow",300),400:E("#facc15","yellow",400),500:E("#eab308","yellow",500),600:E("#ca8a04","yellow",600),700:E("#a16207","yellow",700),800:E("#854d0e","yellow",800),900:E("#713f12","yellow",900),950:E("#422006","yellow",950)},Xn={50:E("#fff7ed","orange",50),100:E("#ffedd5","orange",100),200:E("#fed7aa","orange",200),300:E("#fdba74","orange",300),400:E("#fb923c","orange",400),500:E("#f97316","orange",500),600:E("#ea580c","orange",600),700:E("#c2410c","orange",700),800:E("#9a3412","orange",800),900:E("#7c2d12","orange",900),950:E("#431407","orange",950)},ct={50:E("#fff1f2","rose",50),100:E("#ffe4e6","rose",100),200:E("#fecdd3","rose",200),300:E("#fda4af","rose",300),400:E("#fb7185","rose",400),500:E("#f43f5e","rose",500),600:E("#e11d48","rose",600),700:E("#be123c","rose",700),800:E("#9f1239","rose",800),900:E("#881337","rose",900),950:E("#4c0519","rose",950)},Jn={50:E("#fef2f2","red",50),100:E("#fee2e2","red",100),200:E("#fecaca","red",200),300:E("#fca5a5","red",300),400:E("#f87171","red",400),500:E("#ef4444","red",500),600:E("#dc2626","red",600),700:E("#b91c1c","red",700),800:E("#991b1b","red",800),900:E("#7f1d1d","red",900),950:E("#450a0a","red",950)},dt={50:E("#f0f9ff","sky",50),100:E("#e0f2fe","sky",100),200:E("#bae6fd","sky",200),300:E("#7dd3fc","sky",300),400:E("#38bdf8","sky",400),500:E("#0ea5e9","sky",500),600:E("#0284c7","sky",600),700:E("#0369a1","sky",700),800:E("#075985","sky",800),900:E("#0c4a6e","sky",900),950:E("#082f49","sky",950)},Zn={50:E("#eff6ff","blue",50),100:E("#dbeafe","blue",100),200:E("#bfdbfe","blue",200),300:E("#93c5fd","blue",300),400:E("#60a5fa","blue",400),500:E("#3b82f6","blue",500),600:E("#2563eb","blue",600),700:E("#1d4ed8","blue",700),800:E("#1e40af","blue",800),900:E("#1e3a8a","blue",900),950:E("#172554","blue",950)},Qn={50:E("#fdf4ff","fuchsia",50),100:E("#fae8ff","fuchsia",100),200:E("#f5d0fe","fuchsia",200),300:E("#f0abfc","fuchsia",300),400:E("#e879f9","fuchsia",400),500:E("#d946ef","fuchsia",500),600:E("#c026d3","fuchsia",600),700:E("#a21caf","fuchsia",700),800:E("#86198f","fuchsia",800),900:E("#701a75","fuchsia",900),950:E("#4a044e","fuchsia",950)},ea={50:E("#fdf2f8","pink",50),100:E("#fce7f3","pink",100),200:E("#fbcfe8","pink",200),300:E("#f9a8d4","pink",300),400:E("#f472b6","pink",400),500:E("#ec4899","pink",500),600:E("#db2777","pink",600),700:E("#be185d","pink",700),800:E("#9d174d","pink",800),900:E("#831843","pink",900),950:E("#500724","pink",950)},ta={50:E("#faf5ff","purple",50),100:E("#f3e8ff","purple",100),200:E("#e9d5ff","purple",200),300:E("#d8b4fe","purple",300),400:E("#c084fc","purple",400),500:E("#a855f7","purple",500),600:E("#9333ea","purple",600),700:E("#7e22ce","purple",700),800:E("#6b21a8","purple",800),900:E("#581c87","purple",900),950:E("#3b0764","purple",950)},ra={50:E("#f0fdfa","teal",50),100:E("#ccfbf1","teal",100),200:E("#99f6e4","teal",200),300:E("#5eead4","teal",300),400:E("#2dd4bf","teal",400),500:E("#14b8a6","teal",500),600:E("#0d9488","teal",600),700:E("#0f766e","teal",700),800:E("#115e59","teal",800),900:E("#134e4a","teal",900),950:E("#042f2e","teal",950)},sa={50:E("#f7fee7","lime",50),100:E("#ecfccb","lime",100),200:E("#d9f99d","lime",200),300:E("#bef264","lime",300),400:E("#a3e635","lime",400),500:E("#84cc16","lime",500),600:E("#65a30d","lime",600),700:E("#4d7c0f","lime",700),800:E("#3f6212","lime",800),900:E("#365314","lime",900),950:E("#1a2e05","lime",950)},bs={"brand-primary":st,"brand-secondary":nt,indigo:Un,violet:Gn,cyan:at,slate:ot,gray:Kn,emerald:it,green:Yn,amber:lt,yellow:qn,orange:Xn,rose:ct,red:Jn,sky:dt,blue:Zn,fuchsia:Qn,pink:ea,purple:ta,teal:ra,lime:sa};function Ft(e,t){return bs[e][t]}function wi(e){return bs[e]}const Kt={primary:{light:st[400],DEFAULT:st[500],dark:st[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:nt[400],DEFAULT:nt[500],dark:nt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:at[400],DEFAULT:at[500],dark:at[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:it[400],DEFAULT:it[500],dark:it[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:lt[400],DEFAULT:lt[500],dark:lt[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[400],DEFAULT:ct[500],dark:ct[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[400],DEFAULT:dt[500],dark:dt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[100],DEFAULT:ot[500],dark:ot[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},wr={primary:{light:st[500],DEFAULT:st[400],dark:st[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:nt[500],DEFAULT:nt[400],dark:nt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:at[500],DEFAULT:at[400],dark:at[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:it[500],DEFAULT:it[400],dark:it[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:lt[500],DEFAULT:lt[400],dark:lt[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:ct[500],DEFAULT:ct[400],dark:ct[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:dt[500],DEFAULT:dt[400],dark:dt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:ot[700],DEFAULT:ot[400],dark:ot[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},ki=Kt;function Ut(e,t="DEFAULT",r="light"){return(r==="dark"?wr:Kt)[e][t]}function ji(e,t="light"){return(t==="dark"?wr:Kt)[e]}function Ni(e,t,r={}){const{format:s="hex",opacity:a}=r,o=Ft(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function Si(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Ut(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function $i(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ft(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function Ci(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Ut(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Ut(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Ut(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function Ei(e,t,r="bg"){const s=Ft(e,t);return`hover:${r}-${s.tailwind}`}function Mi(e,t,r="border"){const s=Ft(e,t);return`focus:${r}-${s.tailwind}`}function Ti(e,t){return`focus:ring-${Ft(e,t).tailwind}`}function Ai(e,t){return`rgba(${e.rgb}, ${t})`}function na(e){const t=is(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function Ri(e){return na(e)?"#000000":"#ffffff"}function is(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function gs(e,t,r=.5){const s=is(e),a=is(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function Ii(e,t){return gs(e,"#ffffff",t/100)}function Di(e,t){return gs(e,"#000000",t/100)}const _i={primary:{name:"brand-primary",light:400,default:500,dark:600},secondary:{name:"brand-secondary",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Tt{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const kr={sm:Tt.create("sm"),md:Tt.create("md"),lg:Tt.create("lg"),xl:Tt.create("xl"),"2xl":Tt.create("2xl")};function Li(e){return kr[e]}function Fi(e,t="min"){const r=kr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function aa(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=aa(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function oa(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=aa(e))&&(s&&(s+=" "),s+=t);return s}const Pi=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},Oi=(e,t)=>({classGroupId:e,validator:t}),ia=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),fr="-",kn=[],zi="arbitrary..",Vi=e=>{const t=Hi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Wi(i);const c=i.split(fr),u=c[0]===""&&c.length>1?1:0;return la(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?Pi(d,u):u:d||kn}return r[i]||kn}}},la=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=la(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(fr):e.slice(t).join(fr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},Wi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?zi+s:void 0})(),Hi=e=>{const{theme:t,classGroups:r}=e;return Bi(r,t)},Bi=(e,t)=>{const r=ia();for(const s in e){const a=e[s];hs(a,r,s,t)}return r},hs=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Ui(i,t,r,s)}},Ui=(e,t,r,s)=>{if(typeof e=="string"){Gi(e,t,r);return}if(typeof e=="function"){Ki(e,t,r,s);return}Yi(e,t,r,s)},Gi=(e,t,r)=>{const s=e===""?t:ca(t,e);s.classGroupId=r},Ki=(e,t,r,s)=>{if(qi(e)){hs(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Oi(r,e))},Yi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];hs(u,ca(t,c),r,s)}},ca=(e,t)=>{let r=e;const s=t.split(fr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=ia(),r.nextPart.set(i,c)),r=c}return r},qi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},ls="!",jn=":",Ji=[],Nn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Zi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let w=0;w<f;w++){const y=a[w];if(i===0&&c===0){if(y===jn){o.push(a.slice(u,w)),u=w+1;continue}if(y==="/"){d=w;continue}}y==="["?i++:y==="]"?i--:y==="("?c++:y===")"&&c--}const p=o.length===0?a:a.slice(u);let b=p,g=!1;p.endsWith(ls)?(b=p.slice(0,-1),g=!0):p.startsWith(ls)&&(b=p.slice(1),g=!0);const x=d&&d>u?d-u:void 0;return Nn(o,g,b,x)};if(t){const a=t+jn,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Nn(Ji,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},Qi=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},el=e=>M({cache:Xi(e.cacheSize),parseClassName:Zi(e),sortModifiers:Qi(e),postfixLookupClassGroupIds:tl(e)},Vi(e)),tl=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},rl=/\s+/,sl=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(rl);let d="";for(let f=u.length-1;f>=0;f-=1){const p=u[f],{isExternal:b,modifiers:g,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:y}=r(p);if(b){d=p+(d.length>0?" "+d:d);continue}let h=!!y,j;if(h){const I=w.substring(0,y);j=s(I);const C=j&&i[j]?s(w):void 0;C&&C!==j&&(j=C,h=!1)}else j=s(w);if(!j){if(!h){d=p+(d.length>0?" "+d:d);continue}if(j=s(w),!j){d=p+(d.length>0?" "+d:d);continue}h=!1}const N=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=x?N+ls:N,$=k+j;if(c.indexOf($)>-1)continue;c.push($);const S=a(j,h);for(let I=0;I<S.length;++I){const C=S[I];c.push(k+C)}d=p+(d.length>0?" "+d:d)}return d},nl=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=da(r))&&(a&&(a+=" "),a+=s);return a},da=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=da(e[s]))&&(r&&(r+=" "),r+=t);return r},al=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,p)=>p(f),e());return r=el(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=sl(u,r);return a(u,f),f};return o=i,(...u)=>o(nl(...u))},ol=[],xe=e=>{const t=r=>r[e]||ol;return t.isThemeGetter=!0,t},ua=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,il=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ll=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cl=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ul=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ze=e=>il.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),Le=e=>!!e&&Number.isInteger(Number(e)),Jr=e=>e.endsWith("%")&&ne(e.slice(0,-1)),He=e=>ll.test(e),ma=()=>!0,ml=e=>cl.test(e)&&!dl.test(e),xs=()=>!1,pl=e=>ul.test(e),bl=e=>fl.test(e),gl=e=>!G(e)&&!K(e),hl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),xl=e=>mt(e,ga,xs),G=e=>ua.test(e),ht=e=>mt(e,ha,ml),Sn=e=>mt(e,$l,ne),vl=e=>mt(e,va,ma),yl=e=>mt(e,xa,xs),$n=e=>mt(e,pa,xs),wl=e=>mt(e,ba,bl),nr=e=>mt(e,ya,pl),K=e=>fa.test(e),Ot=e=>kt(e,ha),kl=e=>kt(e,xa),Cn=e=>kt(e,pa),jl=e=>kt(e,ga),Nl=e=>kt(e,ba),ar=e=>kt(e,ya,!0),Sl=e=>kt(e,va,!0),mt=(e,t,r)=>{const s=ua.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},kt=(e,t,r=!1)=>{const s=fa.exec(e);return s?s[1]?t(s[1]):r:!1},pa=e=>e==="position"||e==="percentage",ba=e=>e==="image"||e==="url",ga=e=>e==="length"||e==="size"||e==="bg-size",ha=e=>e==="length",$l=e=>e==="number",xa=e=>e==="family-name",va=e=>e==="number"||e==="weight",ya=e=>e==="shadow",Cl=()=>{const e=xe("color"),t=xe("font"),r=xe("text"),s=xe("font-weight"),a=xe("tracking"),o=xe("leading"),i=xe("breakpoint"),c=xe("container"),u=xe("spacing"),d=xe("radius"),f=xe("shadow"),p=xe("inset-shadow"),b=xe("text-shadow"),g=xe("drop-shadow"),x=xe("blur"),w=xe("perspective"),y=xe("aspect"),h=xe("ease"),j=xe("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...k(),K,G],S=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[K,G,u],A=()=>[Ze,"full","auto",...C()],L=()=>[Le,"none","subgrid",K,G],D=()=>["auto",{span:["full",Le,K,G]},Le,K,G],T=()=>[Le,"auto",K,G],R=()=>["auto","min","max","fr",K,G],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...C()],X=()=>[Ze,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Z=()=>[Ze,"screen","full","dvw","lvw","svw","min","max","fit",...C()],oe=()=>[Ze,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],H=()=>[e,K,G],P=()=>[...k(),Cn,$n,{position:[K,G]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",jl,xl,{size:[K,G]}],J=()=>[Jr,Ot,ht],te=()=>["","none","full",d,K,G],ae=()=>["",ne,Ot,ht],O=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ne,Jr,Cn,$n],ce=()=>["","none",x,K,G],ie=()=>["none",ne,K,G],be=()=>["none",ne,K,G],we=()=>[ne,K,G],Ae=()=>[Ze,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[He],breakpoint:[He],color:[ma],container:[He],"drop-shadow":[He],ease:["in","out","in-out"],font:[gl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[He],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[He],shadow:[He],spacing:["px",ne],text:[He],"text-shadow":[He],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ze,G,K,y]}],container:["container"],"container-type":[{"@container":["","normal","size",K,G]}],"container-named":[hl],columns:[{columns:[ne,G,K,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Le,"auto",K,G]}],basis:[{basis:[Ze,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Ze,"auto","initial","none",G]}],grow:[{grow:["",ne,K,G]}],shrink:[{shrink:["",ne,K,G]}],order:[{order:[Le,"first","last","none",K,G]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...X()]}],"min-w":[{"min-w":[c,"screen","none",...X()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Ot,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Sl,vl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jr,G]}],"font-family":[{font:[kl,yl,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,K,G]}],"line-clamp":[{"line-clamp":[ne,"none",K,Sn]}],leading:[{leading:[o,...C()]}],"list-image":[{"list-image":["none",K,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",K,ht]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ne,"auto",K,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Le,K,G]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Le,K,G],radial:["",K,G],conic:[Le,K,G]},Nl,wl]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...O(),"hidden","none"]}],"divide-style":[{divide:[...O(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...O(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,K,G]}],"outline-w":[{outline:["",ne,Ot,ht]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,ar,nr]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,ar,nr]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ne,ht]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",b,ar,nr]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ne,K,G]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,G]}],filter:[{filter:["","none",K,G]}],blur:[{blur:ce()}],brightness:[{brightness:[ne,K,G]}],contrast:[{contrast:[ne,K,G]}],"drop-shadow":[{"drop-shadow":["","none",g,ar,nr]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ne,K,G]}],"hue-rotate":[{"hue-rotate":[ne,K,G]}],invert:[{invert:["",ne,K,G]}],saturate:[{saturate:[ne,K,G]}],sepia:[{sepia:["",ne,K,G]}],"backdrop-filter":[{"backdrop-filter":["","none",K,G]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[ne,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[ne,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,K,G]}],"backdrop-invert":[{"backdrop-invert":["",ne,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[ne,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[ne,K,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,K,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",K,G]}],ease:[{ease:["linear","initial",h,K,G]}],delay:[{delay:[ne,K,G]}],animate:[{animate:["none",j,K,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,K,G]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[K,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[Le,K,G]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K,G]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ne,Ot,ht,Sn]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},El=al(Cl);function v(...e){return El(oa(e))}const En=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mn=oa,Ml=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return Mn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],p=o==null?void 0:o[d];if(f===null)return null;const b=En(f)||En(p);return a[d][b]}),c=r&&Object.entries(r).reduce((d,f)=>{let[p,b]=f;return b===void 0||(d[p]=b),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let x=f,{class:p,className:b}=x,g=z(x,["class","className"]);return Object.entries(g).every(w=>{let[y,h]=w;return Array.isArray(h)?h.includes(M(M({},o),c)[y]):M(M({},o),c)[y]===h})?[...d,p,b]:d},[]);return Mn(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},pe=(e,t)=>{const r=Ml(e,t);return(s=>{const a=r(s);return v(a)})};function wa(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}class Ie{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const Tl={fast:Ie.create("fast"),base:Ie.create("base"),slow:Ie.create("slow"),slower:Ie.create("slower"),colors:Ie.createTransition(["color","background-color","border-color"],"base"),opacity:Ie.createTransition("opacity","fast"),transform:Ie.createTransition("transform","base"),all:Ie.createTransition("all","base")};function Al(e,t){return Ie.create(e,t)}function ye(e,t="ease-in-out"){const r=Ie.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function Rl(e,t="base",r="ease-in-out"){return Ie.createTransition(e,t,r).tailwind}class Re{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const Tn={base:Re.create("base"),dropdown:Re.create("dropdown"),sticky:Re.create("sticky"),fixed:Re.create("fixed"),"modal-backdrop":Re.create("modal-backdrop"),modal:Re.create("modal"),popover:Re.create("popover"),tooltip:Re.create("tooltip"),toast:Re.create("toast")};function Il(e){return Re.create(e)}function he(e){return Re.create(e).tailwind}class ka{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}function Dl(e){return ka.create(e)}function _l(e){return ka.create(e).tailwind}var or={exports:{}},zt={};var An;function Ll(){if(An)return zt;An=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return zt.Fragment=t,zt.jsx=r,zt.jsxs=r,zt}var Vt={};var Rn;function Fl(){return Rn||(Rn=1,process.env.NODE_ENV!=="production"&&(function(){function e(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===D?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case y:return"Fragment";case j:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case I:return"SuspenseList";case L:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case w:return"Portal";case k:return P.displayName||"Context";case N:return(P._context.displayName||"Context")+".Consumer";case $:var Y=P.render;return P=P.displayName,P||(P=Y.displayName||Y.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case C:return Y=P.displayName||null,Y!==null?Y:e(P.type)||"Memo";case A:Y=P._payload,P=P._init;try{return e(P(Y))}catch(ee){}}return null}function t(P){return""+P}function r(P){try{var Y=!1}catch(te){Y=!0}if(Y){Y=console;var ee=Y.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return ee.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),t(P)}}function s(P){if(P===y)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===A)return"<...>";try{var Y=e(P);return Y?"<"+Y+">":"<...>"}catch(ee){return"<...>"}}function a(){var P=T.A;return P===null?null:P.getOwner()}function o(){return Error("react-stack-top-frame")}function i(P){if(R.call(P,"key")){var Y=Object.getOwnPropertyDescriptor(P,"key").get;if(Y&&Y.isReactWarning)return!1}return P.key!==void 0}function c(P,Y){function ee(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}ee.isReactWarning=!0,Object.defineProperty(P,"key",{get:ee,configurable:!0})}function u(){var P=e(this.type);return X[P]||(X[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function d(P,Y,ee,J,te,ae){var O=ee.ref;return P={$$typeof:x,type:P,key:Y,props:ee,_owner:J},(O!==void 0?O:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:u}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function f(P,Y,ee,J,te,ae){var O=Y.children;if(O!==void 0)if(J)if(_(O)){for(J=0;J<O.length;J++)p(O[J]);Object.freeze&&Object.freeze(O)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(O);if(R.call(Y,"key")){O=e(P);var W=Object.keys(Y).filter(function(ce){return ce!=="key"});J=0<W.length?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}",H[O+J]||(W=0<W.length?"{"+W.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
1
|
+
"use client";"use strict";var ii=Object.defineProperty,li=Object.defineProperties;var ci=Object.getOwnPropertyDescriptors;var nr=Object.getOwnPropertySymbols;var kn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable;var Qr=(e,t,r)=>t in e?ii(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t)=>{for(var r in t||(t={}))kn.call(t,r)&&Qr(e,r,t[r]);if(nr)for(var r of nr(t))jn.call(t,r)&&Qr(e,r,t[r]);return e},L=(e,t)=>li(e,ci(t));var W=(e,t)=>{var r={};for(var s in e)kn.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&nr)for(var s of nr(e))t.indexOf(s)<0&&jn.call(e,s)&&(r[s]=e[s]);return r};var Nn=(e,t,r)=>Qr(e,typeof t!="symbol"?t+"":t,r);var ar=(e,t,r)=>new Promise((s,a)=>{var o=u=>{try{c(r.next(u))}catch(d){a(d)}},i=u=>{try{c(r.throw(u))}catch(d){a(d)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(o,i);c((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Xe=require("react-dom");function di(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ce=di(l),ot={icon:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},text:{xs:"text-xs",sm:"text-sm",base:"text-base"},spacing:{itemPaddingX:"px-4",itemPaddingY:"py-2",nestedIndent:"pl-6",nestedIndentLevel2:"pl-10",nestedIndentLevel3:"pl-14",groupTitlePadding:"px-4 py-2",iconMargin:"mr-3"},colors:{active:{bg:"bg-surface-brand-muted",text:"text-fg-brand-emphasis",border:"border-line-brand"},inactive:{text:"text-fg-secondary",hover:"hover:bg-surface-hover hover:text-fg-primary"},groupTitle:"text-fg-tertiary"},chevron:{size:"h-3 w-3",color:"text-fg-quaternary"},navigation:{width:{default:"56px",compact:"48px",expanded:"200px"},background:{default:"#fafafa",hover:"#f5f5f5"}},split:{transition:"transition-all duration-300",collapsedWidth:"0px"},content:{scrollbar:{width:"thin",color:{thumb:"#cbd5e1",track:"#f1f5f9"}}}};function ui(e){return e<=0?ot.spacing.itemPaddingX:e===1?ot.spacing.nestedIndent:e===2?ot.spacing.nestedIndentLevel2:e===3?ot.spacing.nestedIndentLevel3:`pl-${4+e*4}`}class ke{static create(t){const r=t*this.BASE_UNIT,s=r/16;return{value:r,rem:`${s}rem`,px:`${r}px`,tailwind:this.getTailwindClass(t)}}static getTailwindClass(t){return{0:"0",.5:"0.5",1:"1",1.5:"1.5",2:"2",2.5:"2.5",3:"3",3.5:"3.5",4:"4",5:"5",6:"6",8:"8",10:"10",12:"12",16:"16",20:"20",24:"24",32:"32",40:"40",48:"48",64:"64",80:"80",96:"96"}[t]||String(t)}}Nn(ke,"BASE_UNIT",4);const kr={none:ke.create(0),"0.5":ke.create(.5),xs:ke.create(1),"1.5":ke.create(1.5),sm:ke.create(2),"2.5":ke.create(2.5),md:ke.create(3),"3.5":ke.create(3.5),base:ke.create(4),lg:ke.create(6),xl:ke.create(8),"2xl":ke.create(10),"3xl":ke.create(12),"4xl":ke.create(16),"5xl":ke.create(20),"6xl":ke.create(24)};function fi(e){return kr[e]}function m(e,t="p"){const s=kr[e].tailwind;return`${{p:"p",m:"m",px:"px",mx:"mx",py:"py",my:"my",pt:"pt",mt:"mt",pr:"pr",mr:"mr",pb:"pb",mb:"mb",pl:"pl",ml:"ml",gap:"gap","gap-x":"gap-x","gap-y":"gap-y","space-x":"space-x","space-y":"space-y"}[t]}-${s}`}class he{static createFontSize(t){const s={"2xs":{px:10,tailwind:"text-2xs"},xs:{px:12,tailwind:"text-xs"},sm:{px:14,tailwind:"text-sm"},base:{px:16,tailwind:"text-base"},lg:{px:18,tailwind:"text-lg"},xl:{px:20,tailwind:"text-xl"},"2xl":{px:24,tailwind:"text-2xl"},"3xl":{px:30,tailwind:"text-3xl"},"4xl":{px:36,tailwind:"text-4xl"},"5xl":{px:48,tailwind:"text-5xl"},"6xl":{px:60,tailwind:"text-6xl"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind}}static createLineHeight(t){const s={none:{value:1,tailwind:"leading-none"},tight:{value:1.25,tailwind:"leading-tight"},snug:{value:1.375,tailwind:"leading-snug"},normal:{value:1.5,tailwind:"leading-normal"},relaxed:{value:1.625,tailwind:"leading-relaxed"},loose:{value:2,tailwind:"leading-loose"}}[t];return{value:s.value,tailwind:s.tailwind}}static createFontWeight(t){const s={light:{value:300,tailwind:"font-light"},normal:{value:400,tailwind:"font-normal"},medium:{value:500,tailwind:"font-medium"},semibold:{value:600,tailwind:"font-semibold"},bold:{value:700,tailwind:"font-bold"}}[t];return{value:s.value,tailwind:s.tailwind}}static create(t,r="normal",s="normal"){return{fontSize:this.createFontSize(t),lineHeight:this.createLineHeight(r),fontWeight:this.createFontWeight(s)}}}const mi={sans:{name:"sans",stack:'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',tailwind:"font-sans"},serif:{name:"serif",stack:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',tailwind:"font-serif"},mono:{name:"mono",stack:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',tailwind:"font-mono"}},pi={light:he.createFontWeight("light"),normal:he.createFontWeight("normal"),medium:he.createFontWeight("medium"),semibold:he.createFontWeight("semibold"),bold:he.createFontWeight("bold")},St={h1:he.create("4xl","tight","bold"),h2:he.create("3xl","tight","bold"),h3:he.create("2xl","snug","semibold"),h4:he.create("xl","snug","semibold"),h5:he.create("lg","normal","medium"),h6:he.create("base","normal","medium"),body:he.create("base","relaxed","normal"),bodySmall:he.create("sm","relaxed","normal"),bodyLarge:he.create("lg","relaxed","normal"),label:he.create("sm","normal","medium"),caption:he.create("xs","normal","normal"),button:he.create("base","normal","medium")};function bi(e){return St[e]}function pe(e){const t=St[e];return`${t.fontSize.tailwind} ${t.lineHeight.tailwind} ${t.fontWeight.tailwind}`}function ae(e){return St[e].fontSize.tailwind}function Ne(e){return he.createFontSize(e).tailwind}function Le(e){return St[e].fontWeight.tailwind}function _t(e){return he.createFontWeight(e).tailwind}function gi(e){return St[e].lineHeight.tailwind}const hi=[50,100,200,300,400,500,600,700,800,900,950];function me(e,t,r){const s=xi(e),a=vi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function xi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function vi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const it={50:me("#f0f4f8","brand-primary",50),100:me("#d9e2ec","brand-primary",100),200:me("#bcccdc","brand-primary",200),300:me("#9fb3c8","brand-primary",300),400:me("#7390ad","brand-primary",400),500:me("#486581","brand-primary",500),600:me("#334e68","brand-primary",600),700:me("#243b53","brand-primary",700),800:me("#1a2a3a","brand-primary",800),900:me("#102a43","brand-primary",900),950:me("#061a35","brand-primary",950)},lt={50:me("#f7f5ff","brand-secondary",50),100:me("#eee9ff","brand-secondary",100),200:me("#e0d6ff","brand-secondary",200),300:me("#cbb8ff","brand-secondary",300),400:me("#aa89fc","brand-secondary",400),500:me("#8e58f2","brand-secondary",500),600:me("#703bc8","brand-secondary",600),700:me("#582aa2","brand-secondary",700),800:me("#44227e","brand-secondary",800),900:me("#32185d","brand-secondary",900),950:me("#180635","brand-secondary",950)};function T(e,t,r){const s=yi(e),a=wi(e);return{hex:e,rgb:s,hsl:a,cssVar:`var(--color-${t}-${r})`,tailwind:`${t}-${r}`}}function yi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)}, ${parseInt(t[2],16)}, ${parseInt(t[3],16)}`:"0, 0, 0"}function wi(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return"0, 0%, 0%";const r=parseInt(t[1],16)/255,s=parseInt(t[2],16)/255,a=parseInt(t[3],16)/255,o=Math.max(r,s,a),i=Math.min(r,s,a);let c=0,u=0;const d=(o+i)/2;if(o!==i){const f=o-i;switch(u=d>.5?f/(2-o-i):f/(o+i),o){case r:c=((s-a)/f+(s<a?6:0))/6;break;case s:c=((a-r)/f+2)/6;break;case a:c=((r-s)/f+4)/6;break}}return`${Math.round(c*360)}, ${Math.round(u*100)}%, ${Math.round(d*100)}%`}const Yn={50:T("#eef2ff","indigo",50),100:T("#e0e7ff","indigo",100),200:T("#c7d2fe","indigo",200),300:T("#a5b4fc","indigo",300),400:T("#818cf8","indigo",400),500:T("#6366f1","indigo",500),600:T("#4f46e5","indigo",600),700:T("#4338ca","indigo",700),800:T("#3730a3","indigo",800),900:T("#312e81","indigo",900),950:T("#1e1b4b","indigo",950)},qn={50:T("#f5f3ff","violet",50),100:T("#ede9fe","violet",100),200:T("#ddd6fe","violet",200),300:T("#c4b5fd","violet",300),400:T("#a78bfa","violet",400),500:T("#8b5cf6","violet",500),600:T("#7c3aed","violet",600),700:T("#6d28d9","violet",700),800:T("#5b21b6","violet",800),900:T("#4c1d95","violet",900),950:T("#2e1065","violet",950)},ct={50:T("#ecfeff","cyan",50),100:T("#cffafe","cyan",100),200:T("#a5f3fc","cyan",200),300:T("#67e8f9","cyan",300),400:T("#22d3ee","cyan",400),500:T("#06b6d4","cyan",500),600:T("#0891b2","cyan",600),700:T("#0e7490","cyan",700),800:T("#155e75","cyan",800),900:T("#164e63","cyan",900),950:T("#083344","cyan",950)},dt={50:T("#f8fafc","slate",50),100:T("#f1f5f9","slate",100),200:T("#e2e8f0","slate",200),300:T("#cbd5e1","slate",300),400:T("#94a3b8","slate",400),500:T("#64748b","slate",500),600:T("#475569","slate",600),700:T("#334155","slate",700),800:T("#1e293b","slate",800),900:T("#0f172a","slate",900),950:T("#020617","slate",950)},Xn={50:T("#f9fafb","gray",50),100:T("#f3f4f6","gray",100),200:T("#e5e7eb","gray",200),300:T("#d1d5db","gray",300),400:T("#9ca3af","gray",400),500:T("#6b7280","gray",500),600:T("#4b5563","gray",600),700:T("#374151","gray",700),800:T("#1f2937","gray",800),900:T("#111827","gray",900),950:T("#030712","gray",950)},ut={50:T("#ecfdf5","emerald",50),100:T("#d1fae5","emerald",100),200:T("#a7f3d0","emerald",200),300:T("#6ee7b7","emerald",300),400:T("#34d399","emerald",400),500:T("#10b981","emerald",500),600:T("#059669","emerald",600),700:T("#047857","emerald",700),800:T("#065f46","emerald",800),900:T("#064e3b","emerald",900),950:T("#022c22","emerald",950)},Jn={50:T("#f0fdf4","green",50),100:T("#dcfce7","green",100),200:T("#bbf7d0","green",200),300:T("#86efac","green",300),400:T("#4ade80","green",400),500:T("#22c55e","green",500),600:T("#16a34a","green",600),700:T("#15803d","green",700),800:T("#166534","green",800),900:T("#14532d","green",900),950:T("#052e16","green",950)},ft={50:T("#fffbeb","amber",50),100:T("#fef3c7","amber",100),200:T("#fde68a","amber",200),300:T("#fcd34d","amber",300),400:T("#fbbf24","amber",400),500:T("#f59e0b","amber",500),600:T("#d97706","amber",600),700:T("#b45309","amber",700),800:T("#92400e","amber",800),900:T("#78350f","amber",900),950:T("#451a03","amber",950)},Zn={50:T("#fefce8","yellow",50),100:T("#fef9c3","yellow",100),200:T("#fef08a","yellow",200),300:T("#fde047","yellow",300),400:T("#facc15","yellow",400),500:T("#eab308","yellow",500),600:T("#ca8a04","yellow",600),700:T("#a16207","yellow",700),800:T("#854d0e","yellow",800),900:T("#713f12","yellow",900),950:T("#422006","yellow",950)},Qn={50:T("#fff7ed","orange",50),100:T("#ffedd5","orange",100),200:T("#fed7aa","orange",200),300:T("#fdba74","orange",300),400:T("#fb923c","orange",400),500:T("#f97316","orange",500),600:T("#ea580c","orange",600),700:T("#c2410c","orange",700),800:T("#9a3412","orange",800),900:T("#7c2d12","orange",900),950:T("#431407","orange",950)},mt={50:T("#fff1f2","rose",50),100:T("#ffe4e6","rose",100),200:T("#fecdd3","rose",200),300:T("#fda4af","rose",300),400:T("#fb7185","rose",400),500:T("#f43f5e","rose",500),600:T("#e11d48","rose",600),700:T("#be123c","rose",700),800:T("#9f1239","rose",800),900:T("#881337","rose",900),950:T("#4c0519","rose",950)},ea={50:T("#fef2f2","red",50),100:T("#fee2e2","red",100),200:T("#fecaca","red",200),300:T("#fca5a5","red",300),400:T("#f87171","red",400),500:T("#ef4444","red",500),600:T("#dc2626","red",600),700:T("#b91c1c","red",700),800:T("#991b1b","red",800),900:T("#7f1d1d","red",900),950:T("#450a0a","red",950)},pt={50:T("#f0f9ff","sky",50),100:T("#e0f2fe","sky",100),200:T("#bae6fd","sky",200),300:T("#7dd3fc","sky",300),400:T("#38bdf8","sky",400),500:T("#0ea5e9","sky",500),600:T("#0284c7","sky",600),700:T("#0369a1","sky",700),800:T("#075985","sky",800),900:T("#0c4a6e","sky",900),950:T("#082f49","sky",950)},ta={50:T("#eff6ff","blue",50),100:T("#dbeafe","blue",100),200:T("#bfdbfe","blue",200),300:T("#93c5fd","blue",300),400:T("#60a5fa","blue",400),500:T("#3b82f6","blue",500),600:T("#2563eb","blue",600),700:T("#1d4ed8","blue",700),800:T("#1e40af","blue",800),900:T("#1e3a8a","blue",900),950:T("#172554","blue",950)},ra={50:T("#fdf4ff","fuchsia",50),100:T("#fae8ff","fuchsia",100),200:T("#f5d0fe","fuchsia",200),300:T("#f0abfc","fuchsia",300),400:T("#e879f9","fuchsia",400),500:T("#d946ef","fuchsia",500),600:T("#c026d3","fuchsia",600),700:T("#a21caf","fuchsia",700),800:T("#86198f","fuchsia",800),900:T("#701a75","fuchsia",900),950:T("#4a044e","fuchsia",950)},sa={50:T("#fdf2f8","pink",50),100:T("#fce7f3","pink",100),200:T("#fbcfe8","pink",200),300:T("#f9a8d4","pink",300),400:T("#f472b6","pink",400),500:T("#ec4899","pink",500),600:T("#db2777","pink",600),700:T("#be185d","pink",700),800:T("#9d174d","pink",800),900:T("#831843","pink",900),950:T("#500724","pink",950)},na={50:T("#faf5ff","purple",50),100:T("#f3e8ff","purple",100),200:T("#e9d5ff","purple",200),300:T("#d8b4fe","purple",300),400:T("#c084fc","purple",400),500:T("#a855f7","purple",500),600:T("#9333ea","purple",600),700:T("#7e22ce","purple",700),800:T("#6b21a8","purple",800),900:T("#581c87","purple",900),950:T("#3b0764","purple",950)},aa={50:T("#f0fdfa","teal",50),100:T("#ccfbf1","teal",100),200:T("#99f6e4","teal",200),300:T("#5eead4","teal",300),400:T("#2dd4bf","teal",400),500:T("#14b8a6","teal",500),600:T("#0d9488","teal",600),700:T("#0f766e","teal",700),800:T("#115e59","teal",800),900:T("#134e4a","teal",900),950:T("#042f2e","teal",950)},oa={50:T("#f7fee7","lime",50),100:T("#ecfccb","lime",100),200:T("#d9f99d","lime",200),300:T("#bef264","lime",300),400:T("#a3e635","lime",400),500:T("#84cc16","lime",500),600:T("#65a30d","lime",600),700:T("#4d7c0f","lime",700),800:T("#3f6212","lime",800),900:T("#365314","lime",900),950:T("#1a2e05","lime",950)},xs={"brand-primary":it,"brand-secondary":lt,indigo:Yn,violet:qn,cyan:ct,slate:dt,gray:Xn,emerald:ut,green:Jn,amber:ft,yellow:Zn,orange:Qn,rose:mt,red:ea,sky:pt,blue:ta,fuchsia:ra,pink:sa,purple:na,teal:aa,lime:oa};function zt(e,t){return xs[e][t]}function ki(e){return xs[e]}const qt={primary:{light:it[400],DEFAULT:it[500],dark:it[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:lt[400],DEFAULT:lt[500],dark:lt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:ct[400],DEFAULT:ct[500],dark:ct[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},success:{light:ut[400],DEFAULT:ut[500],dark:ut[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},warning:{light:ft[400],DEFAULT:ft[500],dark:ft[600],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:mt[400],DEFAULT:mt[500],dark:mt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:pt[400],DEFAULT:pt[500],dark:pt[600],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:dt[100],DEFAULT:dt[500],dark:dt[700],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},jr={primary:{light:it[500],DEFAULT:it[400],dark:it[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},secondary:{light:lt[500],DEFAULT:lt[400],dark:lt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},accent:{light:ct[500],DEFAULT:ct[400],dark:ct[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},success:{light:ut[500],DEFAULT:ut[400],dark:ut[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},warning:{light:ft[500],DEFAULT:ft[400],dark:ft[300],contrast:{hex:"#000000",rgb:"0, 0, 0",hsl:"0, 0%, 0%",cssVar:"var(--color-black)",tailwind:"black"}},error:{light:mt[500],DEFAULT:mt[400],dark:mt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},info:{light:pt[500],DEFAULT:pt[400],dark:pt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}},neutral:{light:dt[700],DEFAULT:dt[400],dark:dt[300],contrast:{hex:"#ffffff",rgb:"255, 255, 255",hsl:"0, 0%, 100%",cssVar:"var(--color-white)",tailwind:"white"}}},ji=qt;function Kt(e,t="DEFAULT",r="light"){return(r==="dark"?jr:qt)[e][t]}function Ni(e,t="light"){return(t==="dark"?jr:qt)[e]}function Si(e,t,r={}){const{format:s="hex",opacity:a}=r,o=zt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function $i(e,t="DEFAULT",r={}){const{format:s="hex",opacity:a}=r,o=Kt(e,t);let i;switch(s){case"rgb":i=a!==void 0?`rgba(${o.rgb}, ${a})`:`rgb(${o.rgb})`;break;case"hsl":i=a!==void 0?`hsla(${o.hsl}, ${a})`:`hsl(${o.hsl})`;break;case"cssVar":i=o.cssVar;break;case"tailwind":i=o.tailwind;break;default:i=o.hex}return i}function Ci(e,t,r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=zt(e,t),d=[`${s}-${c.tailwind}`];return a&&d.push(`hover:${s}-${c.tailwind}`),o&&d.push(`focus:${s}-${c.tailwind}`),i&&d.push(`active:${s}-${c.tailwind}`),d.join(" ")}function Ei(e,t="DEFAULT",r={}){const{type:s="text",hover:a=!1,focus:o=!1,active:i=!1}=r,c=Kt(e,t),d=[`${s}-${c.tailwind}`];if(a){const f=Kt(e,t==="DEFAULT"?"dark":"DEFAULT");d.push(`hover:${s}-${f.tailwind}`)}if(o&&d.push(`focus:${s}-${c.tailwind}`),i){const f=Kt(e,"dark");d.push(`active:${s}-${f.tailwind}`)}return d.join(" ")}function Ti(e,t,r="bg"){const s=zt(e,t);return`hover:${r}-${s.tailwind}`}function Mi(e,t,r="border"){const s=zt(e,t);return`focus:${r}-${s.tailwind}`}function Ai(e,t){return`focus:ring-${zt(e,t).tailwind}`}function Ii(e,t){return`rgba(${e.rgb}, ${t})`}function ia(e){const t=us(e);return t?.299*t[0]+.587*t[1]+.114*t[2]>128:!0}function Ri(e){return ia(e)?"#000000":"#ffffff"}function us(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:null}function vs(e,t,r=.5){const s=us(e),a=us(t);if(!s||!a)return e;const o=Math.round(s[0]*(1-r)+a[0]*r),i=Math.round(s[1]*(1-r)+a[1]*r),c=Math.round(s[2]*(1-r)+a[2]*r);return`#${((1<<24)+(o<<16)+(i<<8)+c).toString(16).slice(1)}`}function Di(e,t){return vs(e,"#ffffff",t/100)}function Fi(e,t){return vs(e,"#000000",t/100)}const _i={primary:{name:"brand-primary",light:400,default:500,dark:600},secondary:{name:"brand-secondary",light:400,default:500,dark:600},accent:{name:"cyan",light:400,default:500,dark:600}};class Rt{static create(t){const s={sm:{minWidth:640,tailwind:"sm"},md:{minWidth:768,tailwind:"md"},lg:{minWidth:1024,tailwind:"lg"},xl:{minWidth:1280,tailwind:"xl"},"2xl":{minWidth:1536,tailwind:"2xl"}}[t];return{name:t,minWidth:s.minWidth,px:`${s.minWidth}px`,rem:`${s.minWidth/16}rem`,tailwind:s.tailwind}}}const Nr={sm:Rt.create("sm"),md:Rt.create("md"),lg:Rt.create("lg"),xl:Rt.create("xl"),"2xl":Rt.create("2xl")};function Li(e){return Nr[e]}function Pi(e,t="min"){const r=Nr[e];return`@media (${t==="min"?"min-width":"max-width"}: ${r.px})`}function la(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=la(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function ca(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=la(e))&&(s&&(s+=" "),s+=t);return s}const Oi=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},zi=(e,t)=>({classGroupId:e,validator:t}),da=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),pr="-",Sn=[],Vi="arbitrary..",Wi=e=>{const t=Bi(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Hi(i);const c=i.split(pr),u=c[0]===""&&c.length>1?1:0;return ua(c,u,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const u=s[i],d=r[i];return u?d?Oi(d,u):u:d||Sn}return r[i]||Sn}}},ua=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],o=r.nextPart.get(a);if(o){const d=ua(e,t+1,o);if(d)return d}const i=r.validators;if(i===null)return;const c=t===0?e.join(pr):e.slice(t).join(pr),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(c))return f.classGroupId}},Hi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?Vi+s:void 0})(),Bi=e=>{const{theme:t,classGroups:r}=e;return Ui(r,t)},Ui=(e,t)=>{const r=da();for(const s in e){const a=e[s];ys(a,r,s,t)}return r},ys=(e,t,r,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Gi(i,t,r,s)}},Gi=(e,t,r,s)=>{if(typeof e=="string"){Ki(e,t,r);return}if(typeof e=="function"){Yi(e,t,r,s);return}qi(e,t,r,s)},Ki=(e,t,r)=>{const s=e===""?t:fa(t,e);s.classGroupId=r},Yi=(e,t,r,s)=>{if(Xi(e)){ys(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(zi(r,e))},qi=(e,t,r,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[c,u]=a[i];ys(u,fa(t,c),r,s)}},fa=(e,t)=>{let r=e;const s=t.split(pr),a=s.length;for(let o=0;o<a;o++){const i=s[o];let c=r.nextPart.get(i);c||(c=da(),r.nextPart.set(i,c)),r=c}return r},Xi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ji=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(o,i)=>{r[o]=i,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(o){let i=r[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in r?r[o]=i:a(o,i)}}},fs="!",$n=":",Zi=[],Cn=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),Qi=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const o=[];let i=0,c=0,u=0,d;const f=a.length;for(let k=0;k<f;k++){const w=a[k];if(i===0&&c===0){if(w===$n){o.push(a.slice(u,k)),u=k+1;continue}if(w==="/"){d=k;continue}}w==="["?i++:w==="]"?i--:w==="("?c++:w===")"&&c--}const b=o.length===0?a:a.slice(u);let p=b,g=!1;b.endsWith(fs)?(p=b.slice(0,-1),g=!0):b.startsWith(fs)&&(p=b.slice(1),g=!0);const h=d&&d>u?d-u:void 0;return Cn(o,g,p,h)};if(t){const a=t+$n,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Cn(Zi,!1,i,void 0,!0)}if(r){const a=s;s=o=>r({className:o,parseClassName:a})}return s},el=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let o=0;o<r.length;o++){const i=r[o],c=i[0]==="[",u=t.has(i);c||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},tl=e=>M({cache:Ji(e.cacheSize),parseClassName:Qi(e),sortModifiers:el(e),postfixLookupClassGroupIds:rl(e)},Wi(e)),rl=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let s=0;s<r.length;s++)t[r[s]]=!0;return t},sl=/\s+/,nl=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,c=[],u=e.trim().split(sl);let d="";for(let f=u.length-1;f>=0;f-=1){const b=u[f],{isExternal:p,modifiers:g,hasImportantModifier:h,baseClassName:k,maybePostfixModifierPosition:w}=r(b);if(p){d=b+(d.length>0?" "+d:d);continue}let x=!!w,v;if(x){const E=k.substring(0,w);v=s(E);const S=v&&i[v]?s(k):void 0;S&&S!==v&&(v=S,x=!1)}else v=s(k);if(!v){if(!x){d=b+(d.length>0?" "+d:d);continue}if(v=s(k),!v){d=b+(d.length>0?" "+d:d);continue}x=!1}const N=g.length===0?"":g.length===1?g[0]:o(g).join(":"),$=h?N+fs:N,C=$+v;if(c.indexOf(C)>-1)continue;c.push(C);const j=a(v,x);for(let E=0;E<j.length;++E){const S=j[E];c.push($+S)}d=b+(d.length>0?" "+d:d)}return d},al=(...e)=>{let t=0,r,s,a="";for(;t<e.length;)(r=e[t++])&&(s=ma(r))&&(a&&(a+=" "),a+=s);return a},ma=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=ma(e[s]))&&(r&&(r+=" "),r+=t);return r},ol=(e,...t)=>{let r,s,a,o;const i=u=>{const d=t.reduce((f,b)=>b(f),e());return r=tl(d),s=r.cache.get,a=r.cache.set,o=c,c(u)},c=u=>{const d=s(u);if(d)return d;const f=nl(u,r);return a(u,f),f};return o=i,(...u)=>o(al(...u))},il=[],ye=e=>{const t=r=>r[e]||il;return t.isThemeGetter=!0,t},pa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ba=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ll=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dl=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ul=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ml=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>ll.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),Ve=e=>!!e&&Number.isInteger(Number(e)),es=e=>e.endsWith("%")&&le(e.slice(0,-1)),Ue=e=>cl.test(e),ga=()=>!0,pl=e=>dl.test(e)&&!ul.test(e),ws=()=>!1,bl=e=>fl.test(e),gl=e=>ml.test(e),hl=e=>!q(e)&&!X(e),xl=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),vl=e=>ht(e,va,ws),q=e=>pa.test(e),wt=e=>ht(e,ya,pl),En=e=>ht(e,Cl,le),yl=e=>ht(e,ka,ga),wl=e=>ht(e,wa,ws),Tn=e=>ht(e,ha,ws),kl=e=>ht(e,xa,gl),or=e=>ht(e,ja,bl),X=e=>ba.test(e),Vt=e=>$t(e,ya),jl=e=>$t(e,wa),Mn=e=>$t(e,ha),Nl=e=>$t(e,va),Sl=e=>$t(e,xa),ir=e=>$t(e,ja,!0),$l=e=>$t(e,ka,!0),ht=(e,t,r)=>{const s=pa.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},$t=(e,t,r=!1)=>{const s=ba.exec(e);return s?s[1]?t(s[1]):r:!1},ha=e=>e==="position"||e==="percentage",xa=e=>e==="image"||e==="url",va=e=>e==="length"||e==="size"||e==="bg-size",ya=e=>e==="length",Cl=e=>e==="number",wa=e=>e==="family-name",ka=e=>e==="number"||e==="weight",ja=e=>e==="shadow",El=()=>{const e=ye("color"),t=ye("font"),r=ye("text"),s=ye("font-weight"),a=ye("tracking"),o=ye("leading"),i=ye("breakpoint"),c=ye("container"),u=ye("spacing"),d=ye("radius"),f=ye("shadow"),b=ye("inset-shadow"),p=ye("text-shadow"),g=ye("drop-shadow"),h=ye("blur"),k=ye("perspective"),w=ye("aspect"),x=ye("ease"),v=ye("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...$(),X,q],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[X,q,u],A=()=>[rt,"full","auto",...S()],_=()=>[Ve,"none","subgrid",X,q],R=()=>["auto",{span:["full",Ve,X,q]},Ve,X,q],I=()=>[Ve,"auto",X,q],D=()=>["auto","min","max","fr",X,q],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...S()],B=()=>[rt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],U=()=>[rt,"screen","full","dvw","lvw","svw","min","max","fit",...S()],oe=()=>[rt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],H=()=>[e,X,q],O=()=>[...$(),Mn,Tn,{position:[X,q]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",Nl,vl,{size:[X,q]}],se=()=>[es,Vt,wt],ce=()=>["","none","full",d,X,q],Z=()=>["",le,Vt,wt],ee=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[le,es,Mn,Tn],V=()=>["","none",h,X,q],Y=()=>["none",le,X,q],ne=()=>["none",le,X,q],de=()=>[le,X,q],$e=()=>[rt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ue],breakpoint:[Ue],color:[ga],container:[Ue],"drop-shadow":[Ue],ease:["in","out","in-out"],font:[hl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ue],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ue],shadow:[Ue],spacing:["px",le],text:[Ue],"text-shadow":[Ue],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",rt,q,X,w]}],container:["container"],"container-type":[{"@container":["","normal","size",X,q]}],"container-named":[xl],columns:[{columns:[le,q,X,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{"inset-s":A(),start:A()}],end:[{"inset-e":A(),end:A()}],"inset-bs":[{"inset-bs":A()}],"inset-be":[{"inset-be":A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Ve,"auto",X,q]}],basis:[{basis:[rt,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,rt,"auto","initial","none",q]}],grow:[{grow:["",le,X,q]}],shrink:[{shrink:["",le,X,q]}],order:[{order:[Ve,"first","last","none",X,q]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[c,"screen",...B()]}],"min-w":[{"min-w":[c,"screen","none",...B()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",r,Vt,wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,$l,yl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",es,q]}],"font-family":[{font:[jl,wl,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,X,q]}],"line-clamp":[{"line-clamp":[le,"none",X,En]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",X,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",X,wt]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[le,"auto",X,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Ve,X,q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ve,X,q],radial:["",X,q],conic:[Ve,X,q]},Sl,kl]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,X,q]}],"outline-w":[{outline:["",le,Vt,wt]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,ir,or]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",b,ir,or]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[le,wt]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",p,ir,or]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[le,X,q]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[X,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":$()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,q]}],filter:[{filter:["","none",X,q]}],blur:[{blur:V()}],brightness:[{brightness:[le,X,q]}],contrast:[{contrast:[le,X,q]}],"drop-shadow":[{"drop-shadow":["","none",g,ir,or]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",le,X,q]}],"hue-rotate":[{"hue-rotate":[le,X,q]}],invert:[{invert:["",le,X,q]}],saturate:[{saturate:[le,X,q]}],sepia:[{sepia:["",le,X,q]}],"backdrop-filter":[{"backdrop-filter":["","none",X,q]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[le,X,q]}],"backdrop-contrast":[{"backdrop-contrast":[le,X,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,X,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,X,q]}],"backdrop-invert":[{"backdrop-invert":["",le,X,q]}],"backdrop-opacity":[{"backdrop-opacity":[le,X,q]}],"backdrop-saturate":[{"backdrop-saturate":[le,X,q]}],"backdrop-sepia":[{"backdrop-sepia":["",le,X,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",X,q]}],ease:[{ease:["linear","initial",x,X,q]}],delay:[{delay:[le,X,q]}],animate:[{animate:["none",v,X,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,X,q]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[X,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],zoom:[{zoom:[Ve,X,q]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X,q]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[le,Vt,wt,En]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Tl=ol(El);function y(...e){return Tl(ca(e))}const An=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,In=ca,Ml=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return In(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(d=>{const f=r==null?void 0:r[d],b=o==null?void 0:o[d];if(f===null)return null;const p=An(f)||An(b);return a[d][p]}),c=r&&Object.entries(r).reduce((d,f)=>{let[b,p]=f;return p===void 0||(d[b]=p),d},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,f)=>{let h=f,{class:b,className:p}=h,g=W(h,["class","className"]);return Object.entries(g).every(k=>{let[w,x]=k;return Array.isArray(x)?x.includes(M(M({},o),c)[w]):M(M({},o),c)[w]===x})?[...d,b,p]:d},[]);return In(e,i,u,r==null?void 0:r.class,r==null?void 0:r.className)},ge=(e,t)=>{const r=Ml(e,t);return(s=>{const a=r(s);return y(a)})};function ks(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}class Fe{static create(t,r="ease-in-out"){const s={fast:{value:"150ms",ms:150,tailwind:"duration-150"},base:{value:"200ms",ms:200,tailwind:"duration-200"},slow:{value:"300ms",ms:300,tailwind:"duration-300"},slower:{value:"500ms",ms:500,tailwind:"duration-500"}},a={"ease-in":{value:"cubic-bezier(0.4, 0, 1, 1)",tailwind:"ease-in",description:"Slow start, fast end"},"ease-out":{value:"cubic-bezier(0, 0, 0.2, 1)",tailwind:"ease-out",description:"Fast start, slow end"},"ease-in-out":{value:"cubic-bezier(0.4, 0, 0.2, 1)",tailwind:"ease-in-out",description:"Slow start and end, fast middle"},spring:{value:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",tailwind:"ease-[cubic-bezier(0.68,-0.55,0.265,1.55)]",description:"Spring-like bounce effect"}};return{duration:s[t],easing:a[r]}}static createTransition(t,r="base",s="ease-in-out"){const a=this.create(r,s),o=Array.isArray(t)?t.join(", "):t,i=[a.duration.tailwind,a.easing.tailwind].join(" ");return{property:o,duration:a.duration.value,timingFunction:a.easing.value,tailwind:i}}}const Al={fast:Fe.create("fast"),base:Fe.create("base"),slow:Fe.create("slow"),slower:Fe.create("slower"),colors:Fe.createTransition(["color","background-color","border-color"],"base"),opacity:Fe.createTransition("opacity","fast"),transform:Fe.createTransition("transform","base"),all:Fe.createTransition("all","base")};function Il(e,t){return Fe.create(e,t)}function je(e,t="ease-in-out"){const r=Fe.create(e,t);return`${r.duration.tailwind} ${r.easing.tailwind}`}function Rl(e,t="base",r="ease-in-out"){return Fe.createTransition(e,t,r).tailwind}class De{static create(t){return{base:{value:0,tailwind:"z-0",description:"Base layer for normal content"},dropdown:{value:1e3,tailwind:"z-[1000]",description:"Dropdown menus and select options"},sticky:{value:1020,tailwind:"z-[1020]",description:"Sticky headers and navigation"},fixed:{value:1030,tailwind:"z-[1030]",description:"Fixed position elements"},"modal-backdrop":{value:1040,tailwind:"z-[1040]",description:"Modal backdrop/overlay"},modal:{value:1050,tailwind:"z-[1050]",description:"Modal dialogs and drawers"},popover:{value:1060,tailwind:"z-[1060]",description:"Popovers and tooltips"},tooltip:{value:1070,tailwind:"z-[1070]",description:"Tooltips (highest priority)"},toast:{value:1080,tailwind:"z-[1080]",description:"Toast notifications (highest priority)"}}[t]}}const Rn={base:De.create("base"),dropdown:De.create("dropdown"),sticky:De.create("sticky"),fixed:De.create("fixed"),"modal-backdrop":De.create("modal-backdrop"),modal:De.create("modal"),popover:De.create("popover"),tooltip:De.create("tooltip"),toast:De.create("toast")};function Dl(e){return De.create(e)}function xe(e){return De.create(e).tailwind}class Na{static create(t){const r=t/100,s={0:"Fully transparent",5:"Very light overlay",10:"Light overlay",20:"Subtle overlay",25:"Quarter opacity",30:"Light background",40:"Semi-transparent",50:"Half opacity",60:"Semi-opaque",70:"Mostly opaque",75:"Three-quarter opacity",80:"High opacity",90:"Very high opacity",95:"Nearly opaque",100:"Fully opaque"};return{value:t,decimal:r,tailwind:{0:"opacity-0",5:"opacity-5",10:"opacity-10",20:"opacity-20",25:"opacity-25",30:"opacity-30",40:"opacity-40",50:"opacity-50",60:"opacity-60",70:"opacity-70",75:"opacity-75",80:"opacity-80",90:"opacity-90",95:"opacity-95",100:"opacity-100"}[t],description:s[t]}}}function Fl(e){return Na.create(e)}function _l(e){return Na.create(e).tailwind}var lr={exports:{}},Wt={};var Dn;function Ll(){if(Dn)return Wt;Dn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var c in a)c!=="key"&&(o[c]=a[c])}else o=a;return a=o.ref,{$$typeof:e,type:s,key:i,ref:a!==void 0?a:null,props:o}}return Wt.Fragment=t,Wt.jsx=r,Wt.jsxs=r,Wt}var Ht={};var Fn;function Pl(){return Fn||(Fn=1,process.env.NODE_ENV!=="production"&&(function(){function e(O){if(O==null)return null;if(typeof O=="function")return O.$$typeof===R?null:O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case w:return"Fragment";case v:return"Profiler";case x:return"StrictMode";case j:return"Suspense";case E:return"SuspenseList";case _:return"Activity"}if(typeof O=="object")switch(typeof O.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),O.$$typeof){case k:return"Portal";case $:return O.displayName||"Context";case N:return(O._context.displayName||"Context")+".Consumer";case C:var K=O.render;return O=O.displayName,O||(O=K.displayName||K.name||"",O=O!==""?"ForwardRef("+O+")":"ForwardRef"),O;case S:return K=O.displayName||null,K!==null?K:e(O.type)||"Memo";case A:K=O._payload,O=O._init;try{return e(O(K))}catch(re){}}return null}function t(O){return""+O}function r(O){try{var K=!1}catch(ce){K=!0}if(K){K=console;var re=K.error,se=typeof Symbol=="function"&&Symbol.toStringTag&&O[Symbol.toStringTag]||O.constructor.name||"Object";return re.call(K,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",se),t(O)}}function s(O){if(O===w)return"<>";if(typeof O=="object"&&O!==null&&O.$$typeof===A)return"<...>";try{var K=e(O);return K?"<"+K+">":"<...>"}catch(re){return"<...>"}}function a(){var O=I.A;return O===null?null:O.getOwner()}function o(){return Error("react-stack-top-frame")}function i(O){if(D.call(O,"key")){var K=Object.getOwnPropertyDescriptor(O,"key").get;if(K&&K.isReactWarning)return!1}return O.key!==void 0}function c(O,K){function re(){z||(z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",K))}re.isReactWarning=!0,Object.defineProperty(O,"key",{get:re,configurable:!0})}function u(){var O=e(this.type);return B[O]||(B[O]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),O=this.props.ref,O!==void 0?O:null}function d(O,K,re,se,ce,Z){var ee=re.ref;return O={$$typeof:h,type:O,key:K,props:re,_owner:se},(ee!==void 0?ee:null)!==null?Object.defineProperty(O,"ref",{enumerable:!1,get:u}):Object.defineProperty(O,"ref",{enumerable:!1,value:null}),O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(O,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(O,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ce}),Object.defineProperty(O,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O}function f(O,K,re,se,ce,Z){var ee=K.children;if(ee!==void 0)if(se)if(F(ee)){for(se=0;se<ee.length;se++)b(ee[se]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(ee);if(D.call(K,"key")){ee=e(O);var J=Object.keys(K).filter(function(V){return V!=="key"});se=0<J.length?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}",H[ee+se]||(J=0<J.length?"{"+J.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,J,O,W,O),H[O+J]=!0)}if(O=null,ee!==void 0&&(r(ee),O=""+ee),i(Y)&&(r(Y.key),O=""+Y.key),"key"in Y){ee={};for(var q in Y)q!=="key"&&(ee[q]=Y[q])}else ee=Y;return O&&c(ee,typeof P=="function"?P.displayName||P.name||"Unknown":P),d(P,O,ee,a(),te,ae)}function p(P){b(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===A&&(P._payload.status==="fulfilled"?b(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function b(P){return typeof P=="object"&&P!==null&&P.$$typeof===x}var g=l,x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),k=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),T=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,_=Array.isArray,V=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(P){return P()}};var B,X={},Z=g.react_stack_bottom_frame.bind(g,o)(),oe=V(s(o)),H={};Vt.Fragment=y,Vt.jsx=function(P,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(P,Y,ee,!1,J?Error("react-stack-top-frame"):Z,J?V(s(P)):oe)},Vt.jsxs=function(P,Y,ee){var J=1e4>T.recentlyCreatedOwnerStacks++;return f(P,Y,ee,!0,J?Error("react-stack-top-frame"):Z,J?V(s(P)):oe)}})()),Vt}var In;function Pl(){return In||(In=1,process.env.NODE_ENV==="production"?or.exports=Ll():or.exports=Fl()),or.exports}var n=Pl();const ja=l.createContext(void 0);function Na({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?Kt:wr,isDark:s==="dark"};return n.jsx(ja.Provider,{value:u,children:e})}function Ol(){const e=l.useContext(ja);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const zl={breakpoints:kr,spacing:yr,typography:wt,animations:Tl,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},Sa=l.createContext(void 0);function $a({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=M({},zl);return t?F(M(M({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:M(M({},d.features),t.features),behavior:M(M({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(Sa.Provider,{value:u,children:e})}function Vl(){const e=l.useContext(Sa);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const jr=l.createContext(void 0);function vs(){const e=l.useContext(jr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function Wl(){return l.useContext(jr)}function Ca({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var b;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,p=F(M({},d),{id:f,duration:(b=d.duration)!=null?b:t});return a(g=>[p,...g].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(p=>p.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(jr.Provider,{value:u,children:e})}const Nr=l.createContext(void 0);function Pt(){const e=l.useContext(Nr);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function Hl(){return l.useContext(Nr)}function Sr(e){const t=l.useRef(null);l.useEffect(()=>{var r;if(e)t.current=(r=document.activeElement)!=null?r:null;else{const s=t.current,a=setTimeout(()=>{s==null||s.focus()},0);return()=>clearTimeout(a)}},[e])}function ys({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),u=t!==void 0?t:i,d=p=>{t===void 0&&c(p),s==null||s(p)};Sr(u),l.useEffect(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]);const f={isOpen:u,onOpenChange:d,onClose:()=>d(!1),titleId:a,descriptionId:o};return n.jsx(Nr.Provider,{value:f,children:e})}const Bl={ThemeProvider:Na,ConfigProvider:$a,ToastProvider:Ca,DialogProvider:ys},ir=Bl;function Ul(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(ir.DialogProvider,F(M({},o),{children:c}))),i.toast&&(c=n.jsx(ir.ToastProvider,F(M({},a),{children:c}))),i.config&&(c=n.jsx(ir.ConfigProvider,F(M({},s),{children:c}))),i.theme&&(c=n.jsx(ir.ThemeProvider,F(M({},r),{children:c}))),c}function Gl({children:e,config:t}){const r=l.useMemo(()=>Ul(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function Kl(){return{}}class Qe{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const Yl={none:Qe.create("none"),sm:Qe.create("sm"),md:Qe.create("md"),lg:Qe.create("lg"),xl:Qe.create("xl"),"2xl":Qe.create("2xl"),"3xl":Qe.create("3xl"),full:Qe.create("full")};function U(e){return Yl[e].tailwind}function ql(s){var a=s,{variant:e="info",className:t}=a,r=z(a,["variant","className"]);const o={warning:v("bg-warning-bg","text-warning-dark","border-warning"),error:v("bg-error-bg","text-error-dark","border-error"),info:v("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",M({role:"alert",className:v("border",m("base","px"),m("sm","py"),U("lg"),o[e],t)},r))}const Xl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function Jl(d,u){var f=d,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,colorRole:o="neutral",colorShade:i="dark"}=f,c=z(f,["variant","bold","italic","className","as","colorRole","colorShade"]);const p=[];let b;if(a)b=a;else switch(e){case"heading":b="h2";break;case"list":b="li";break;default:b="p";break}return e==="heading"?p.push(ue("h2")):e==="body"||e==="paragraph"?p.push(ue("body")):e==="bodySmall"?p.push(ue("bodySmall")):e==="bodyLarge"?p.push(ue("bodyLarge")):e==="caption"?p.push(ue("caption")):e==="label"?p.push(ue("label")):p.push(ue("body")),t&&p.push("font-bold"),r&&p.push("italic"),p.push(Xl[o][i]),n.jsx(b,M({ref:u,className:v(...p,s)},c))}const $e=l.forwardRef(Jl);const Ea=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Zl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Ql=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const Dn=e=>{const t=Ql(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ec=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},tc=l.createContext({}),rc=()=>l.useContext(tc),sc=l.forwardRef((d,u)=>{var f=d,{color:e,size:t,strokeWidth:r,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=z(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);var h,j,N;const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:g=!1,color:x="currentColor",className:w=""}=(h=rc())!=null?h:{},y=(s!=null?s:g)?Number(r!=null?r:b)*24/Number(t!=null?t:p):r!=null?r:b;return l.createElement("svg",M(M(F(M({ref:u},Zr),{width:(j=t!=null?t:p)!=null?j:Zr.width,height:(N=t!=null?t:p)!=null?N:Zr.height,stroke:e!=null?e:x,strokeWidth:y,className:Ea("lucide",w,a)}),!o&&!ec(c)&&{"aria-hidden":"true"}),c),[...i.map(([k,$])=>l.createElement(k,$)),...Array.isArray(o)?o:[o]])});const le=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=z(c,["className"]);return l.createElement(sc,M({ref:o,iconNode:t,className:Ea(`lucide-${Zl(Dn(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Dn(e),r};const nc=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],ac=le("calendar",nc);const oc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cs=le("check",oc);const ic=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$r=le("chevron-down",ic);const lc=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Gt=le("chevron-left",lc);const cc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yt=le("chevron-right",cc);const dc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ws=le("circle-alert",dc);const uc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],mr=le("circle-check",uc);const fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],mc=le("clock",fc);const pc=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],bc=le("command",pc);const gc=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],hc=le("download",gc);const xc=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],vc=le("ellipsis-vertical",xc);const yc=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],wc=le("eye-off",yc);const kc=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jc=le("eye",kc);const Nc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Sc=le("file",Nc);const $c=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Cc=le("funnel",$c);const Ec=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Mc=le("grip-vertical",Ec);const Tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ac=le("info",Tc);const Rc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ma=le("loader-circle",Rc);const Ic=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Dc=le("menu",Ic);const _c=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Lc=le("panel-left-close",_c);const Fc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Pc=le("panel-left-open",Fc);const Oc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ds=le("search",Oc);const zc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Et=le("star",zc);const Vc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wc=le("triangle-alert",Vc);const Hc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Bc=le("upload",Hc);const Uc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ce=le("x",Uc);function _n(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gc(...e){return t=>{let r=!1;const s=e.map(a=>{const o=_n(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():_n(e[a],null)}}}}function Kc(...e){return Se.useCallback(Gc(...e),e)}function Yc(e){const t=Se.forwardRef((r,s)=>{var g;let b=r,{children:a}=b,o=z(b,["children"]),i=null,c=!1;const u=[];Ln(a)&&typeof lr=="function"&&(a=lr(a._payload)),Se.Children.forEach(a,x=>{var w;if(ed(x)){c=!0;const y=x;let h="child"in y.props?y.props.child:y.props.children;Ln(h)&&typeof lr=="function"&&(h=lr(h._payload)),i=Jc(y,h),u.push((w=i==null?void 0:i.props)==null?void 0:w.children)}else u.push(x)}),i?i=Se.cloneElement(i,void 0,u):!c&&Se.Children.count(a)===1&&Se.isValidElement(a)&&(i=a);const d=i?Qc(i):void 0,f=Kc(s,d);if(!i){if(a||a===0)throw new Error(c?nd(e):sd(e));return a}const p=Zc(o,(g=i.props)!=null?g:{});return i.type!==Se.Fragment&&(p.ref=s?f:d),Se.cloneElement(i,p)});return t.displayName=`${e}.Slot`,t}var Ta=Yc("Slot"),Aa=Symbol.for("radix.slottable");function qc(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=Aa,t}var Xc=qc("Slottable"),Jc=(e,t)=>{if("child"in e.props){const r=e.props.child;return Se.isValidElement(r)?Se.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Se.isValidElement(t)?t:null};function Zc(e,t){const r=M({},t);for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...c)=>{const u=o(...c);return a(...c),u}:a&&(r[s]=a):s==="style"?r[s]=M(M({},a),o):s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return M(M({},e),r)}function Qc(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ed(e){return Se.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Aa}var td=Symbol.for("react.lazy");function Ln(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===td&&"_payload"in e&&rd(e._payload)}function rd(e){return typeof e=="object"&&e!==null&&"then"in e}var sd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,nd=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,lr=Se[" use ".trim().toString()];const ad=pe("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),ks=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=z(c,["size","variant","label","className"]);return n.jsxs("div",F(M({className:v("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(Ma,{className:v(ad({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:v(m("sm","ml"),re("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});ks.displayName="Spinner";const od=pe(v("inline-flex","items-center","justify-center",ue("button").split(" ")[2]||"font-medium",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:v("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:v("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:v("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:v("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:v("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:v("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus",m("none","p")),link:v("bg-transparent","text-fg-brand","underline-offset-4","hover:underline","focus:ring-line-focus")},size:{sm:v(m("md","px"),m("1.5","py"),re("bodySmall"),m("1.5","gap")),md:v(m("base","px"),m("sm","py"),re("body"),m("sm","gap")),lg:v(m("lg","px"),m("md","py"),re("bodyLarge"),m("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:v("h-8","w-8",m("none","p"))},{variant:"iconOnly",size:"md",class:v("h-10","w-10",m("none","p"))},{variant:"iconOnly",size:"lg",class:v("h-12","w-12",m("none","p"))},{variant:"link",size:"sm",class:v(m("none","px"),m("none","py"))},{variant:"link",size:"md",class:v(m("none","px"),m("none","py"))},{variant:"link",size:"lg",class:v(m("none","px"),m("none","py"))}],defaultVariants:{variant:"primary",size:"md"}});function cr({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?m("none","mr"):m("none","ml")}`,children:e}):null}const Q=l.memo(l.forwardRef(function(h,y){var j=h,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,asChild:d=!1,as:f,className:p="",disabled:b=!1,children:g,"aria-label":x}=j,w=z(j,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","className","disabled","children","aria-label"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&d&&f!==void 0&&f!=="button"&&console.warn("[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.");const N=d?Ta:f!=null?f:"button",k=l.useMemo(()=>v(od({variant:t,size:r}),u&&"w-full",p),[t,r,u,p]),$=l.useMemo(()=>t==="iconOnly"||!g&&(i||c),[t,g,i,c]),S=l.useMemo(()=>$&&!x&&!g?"Button":x,[$,x,g]),I=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),C=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),A=l.useMemo(()=>o||n.jsx(ks,{size:C,variant:I}),[o,C,I]),L=!d&&(f===void 0||f==="button")&&!w.type?"button":void 0,D=M(M({className:k,disabled:b||s,"aria-busy":s,"aria-label":S,"aria-disabled":b||s},L?{type:L}:{}),w);return d?n.jsxs(N,F(M({ref:y},D),{children:[i&&n.jsx(cr,{position:"left",children:i}),n.jsx(Xc,{children:g}),c&&n.jsx(cr,{position:"right",children:c})]})):n.jsx(N,F(M({ref:y},D),{children:s?n.jsxs(n.Fragment,{children:[A,a&&n.jsx("span",{className:m("sm","ml"),children:a}),!a&&g&&n.jsx("span",{className:`${m("sm","ml")} opacity-0`,children:g})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(cr,{position:"left",children:i}),g,c&&n.jsx(cr,{position:"right",children:c})]})}))}));Q.displayName="Button";const id=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>v(m("xs","mt"),ue("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Ee=l.memo(l.forwardRef(function(N,j){var k=N,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:p,className:b="",disabled:g=!1,type:x="text",value:w,onChange:y}=k,h=z(k,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const $=l.useId(),S=t||`input-${$}`,I=l.useMemo(()=>s?`${S}-error`:void 0,[s,S]),C=l.useMemo(()=>o?`${S}-helper`:void 0,[o,S]),[A,L]=l.useState(!1),D=l.useMemo(()=>x==="password",[x]),T=l.useMemo(()=>D&&A?"text":x,[D,A,x]),R=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),_=l.useMemo(()=>w!=null&&w!=="",[w]),V=l.useMemo(()=>f&&_&&!g,[f,_,g]),B=l.useMemo(()=>"focus:border-line-focus",[]),X=l.useMemo(()=>"focus:border-error",[]),Z=l.useMemo(()=>"focus:border-success",[]),oe=l.useMemo(()=>B.replace("focus:border-","focus:ring-"),[B]),H=l.useCallback(W=>W==="error"?X.replace("focus:border-","focus:ring-"):Z.replace("focus:border-","focus:ring-"),[X,Z]),P=l.useMemo(()=>pe(v("w-full",U("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:v("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:v("border","border-line-default","focus:border-line-focus"),filled:v("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",oe)},size:{sm:v("h-8",re("bodySmall"),m("md","px")),md:v("h-10",re("body"),m("base","px")),lg:v("h-12",re("bodyLarge"),m("lg","px"))},state:{default:"",error:v("border-error","focus:border-error",H("error")),success:v("border-success","focus:border-success",H("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),[oe,H]),Y=l.useMemo(()=>v(P({variant:c,size:i,state:R}),u&&(i==="sm"?"pl-9":m(i==="lg"?"3xl":"2xl","pl")),(d||V||D)&&(i==="sm"?"pr-9":m(i==="lg"?"3xl":"2xl","pr")),b),[P,c,i,R,u,d,V,D,b]),ee=l.useMemo(()=>v("block",ue("label"),m("xs","mb"),g&&"opacity-50"),[g]),J=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),te=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),ae=l.useCallback(W=>{var q;if(W.stopPropagation(),p)p();else if(y){const ce=(q=W.currentTarget.closest(".relative"))==null?void 0:q.querySelector("input");if(ce){const ie={target:ce,currentTarget:ce,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(ie.target,"value",{value:"",writable:!0}),Object.defineProperty(ie.currentTarget,"value",{value:"",writable:!0}),y(ie)}}},[p,y]),O=l.useCallback(()=>{L(W=>!W)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:S,className:ee,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${te} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:J,children:u})}),n.jsx("input",M({id:S,ref:j,type:T,className:Y,disabled:g,value:w,onChange:y,"aria-invalid":s,"aria-required":h.required,"aria-describedby":I||C,suppressHydrationWarning:!0},h)),n.jsxs("div",{className:`absolute right-3 top-0 bottom-0 flex items-center ${m("xs","gap")}`,children:[V&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:ae,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear input",children:n.jsx(Ce,{className:J})}),D&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:O,className:`h-auto ${m("xs","p")}`,"aria-label":A?"Hide password":"Show password",children:A?n.jsx(wc,{className:J}):n.jsx(jc,{className:J})}),d&&!V&&!D&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${J}`,children:d})]})]}),(s||a||o)&&n.jsx(id,{error:s,success:a,helperText:o,errorId:I,helperId:C})]})}));Ee.displayName="Input";function Ra({href:e,active:t}){return{isActive:l.useMemo(()=>t!==void 0?t:!1,[t]),NextLink:void 0}}const ld=pe(v("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:v("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:v("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:v("text-fg-primary","hover:bg-surface-hover",U("md"),"focus:ring-line-brand")},size:{sm:v(m("sm","px"),m("xs","py"),re("bodySmall")),md:v(m("base","px"),m("sm","py"),re("body")),lg:v(m("lg","px"),m("md","py"),re("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:m("0.5","pb")},{variant:"underline",size:"md",class:m("xs","pb")},{variant:"underline",size:"lg",class:m("1.5","pb")},{variant:"background",size:"sm",class:m("xs","px")},{variant:"background",size:"md",class:m("sm","px")},{variant:"background",size:"lg",class:m("base","px")}]}),Cr=l.forwardRef(function(x,g){var w=x,{href:t,children:r,active:s,disabled:a=!1,variant:o="default",size:i="md",as:c,className:u,"aria-label":d,onClick:f,onKeyDown:p}=w,b=z(w,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const y=l.useMemo(()=>s!==void 0?s:!1,[s]),{NextLink:h}=Ra({href:t,active:y}),j=c||h||"a",N=l.useMemo(()=>{if(!y)return"";switch(o){case"underline":return v("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return v("bg-surface-brand-muted","text-fg-brand-emphasis");default:return v("text-fg-brand-emphasis","font-semibold")}},[y,o]),k=l.useCallback(I=>{if(a){I.preventDefault(),I.stopPropagation();return}f==null||f(I)},[a,f]),$=l.useCallback(I=>{if(a){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),I.stopPropagation());return}p==null||p(I)},[a,p]),S=l.useMemo(()=>{const I=M({className:v(ld({variant:o,size:i}),N,a&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":y?"page":void 0,"aria-disabled":a?!0:void 0,"aria-label":d,tabIndex:a?-1:void 0,onClick:k,onKeyDown:$,"data-active":y,"data-disabled":a},b);return h&&!c?F(M({},I),{href:a?void 0:t}):F(M({},I),{href:a?void 0:t})},[o,i,N,a,u,y,d,k,$,t,h,c,b]);return n.jsx(j,F(M({ref:g},S),{children:r}))});Cr.displayName="NavLink";const cd=pe(v("inline-flex","items-center","justify-center",ze("label"),U("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:v(m("1.5","px"),m("0.5","py"),re("caption")),md:v(m("sm","px"),m("xs","py"),re("caption")),lg:v(m("sm","px"),m("xs","py"),re("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:v("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:v("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:v("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:v("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:v("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:v("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:v("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:v("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:v("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:v("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:v("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:v("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:v("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:v("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),Ia=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=z(f,["variant","size","style","className","children","aria-label"]);const p=v(cd({variant:t,size:r,style:s}),a);let b;if(i)b=i;else if(typeof o=="string")b=o;else if(typeof o=="object"&&o!==null&&"props"in o){const g=o.props;g!=null&&g.children&&typeof g.children=="string"&&(b=g.children)}return n.jsx("span",F(M({ref:u,role:"status","aria-label":b,className:p},c),{children:o}))}));Ia.displayName="Badge";const dd=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>v(m("xs","mt"),ue("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Er=l.memo(l.forwardRef(function(x,g){var w=x,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:p}=w,b=z(w,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const y=l.useId(),h=p||`select-${y}`,j=l.useMemo(()=>o?`${h}-error`:void 0,[o,h]),N=l.useMemo(()=>c?`${h}-helper`:void 0,[c,h]),k=l.useMemo(()=>"focus:border-line-focus",[]),$=l.useMemo(()=>"focus:border-error",[]),S=l.useMemo(()=>"focus:border-success",[]),I=l.useCallback(T=>T==="error"?$.replace("focus:border-","focus:ring-"):T==="success"?S.replace("focus:border-","focus:ring-"):k.replace("focus:border-","focus:ring-"),[$,S,k]),C=l.useMemo(()=>pe(v("block","w-full",U("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:v("h-8",re("bodySmall"),m("md","px")),md:v("h-10",re("body"),m("base","px")),lg:v("h-12",re("bodyLarge"),m("lg","px"))},state:{default:v("border-line-default",I()),error:v("border-error",I("error")),success:v("border-success",I("success"))}},defaultVariants:{size:"md",state:"default"}}),[I]),A=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),L=l.useMemo(()=>v(C({size:u,state:A}),d),[C,u,A,d]),D=l.useMemo(()=>v("block",ue("label"),m("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:h,className:D,children:a}),n.jsxs("select",F(M({id:h,ref:g,className:L,disabled:f,"aria-invalid":o,"aria-required":b.required,"aria-describedby":j||N},b),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((T,R)=>n.jsx("optgroup",{label:T.label,children:(T.options||[]).map(_=>n.jsx("option",{value:_.value,disabled:_.disabled,children:_.label},_.value))},R)):(t||[]).map(T=>n.jsx("option",{value:T.value,disabled:T.disabled,children:T.label},T.value))]})),(o||i||c)&&n.jsx(dd,{error:o,success:i,helperText:c,errorId:j,helperId:N})]})}));Er.displayName="Select";const Da=l.memo(l.forwardRef(function(f,d){var p=f,{error:t=!1,success:r=!1,resize:s="vertical",className:a="",label:o,helperText:i,id:c}=p,u=z(p,["error","success","resize","className","label","helperText","id"]);const b=l.useId(),g=c!=null?c:b,x=l.useMemo(()=>"focus:border-line-focus",[]),w=l.useMemo(()=>"focus:border-error",[]),y=l.useMemo(()=>t?w.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[t,w,x]),h=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),j=l.useMemo(()=>v("block","w-full",U("md"),m("base","px"),m("md","py"),"border",re("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",h[s],v(t?"border-error":r?"border-success":"border-line-default",y),a),[s,h,t,r,y,a]),N=l.useMemo(()=>i?`${g}-helper`:void 0,[i,g]),k=l.useMemo(()=>N!=null?N:t?`${g}-error`:void 0,[N,t,g]),$=u["aria-label"],S=u["aria-labelledby"];l.useEffect(()=>{},[o,$,S,g]);const I=n.jsx("textarea",M({ref:d,id:g,className:j,"aria-invalid":t,"aria-describedby":k},u)),C=i?n.jsx("p",{id:N,className:v(m("xs","mt"),re("bodySmall"),t?"text-fg-error":r?"text-fg-success":"text-fg-secondary"),children:i}):null;return!o&&!C?I:n.jsxs("div",{className:"block w-full",children:[o&&n.jsx("label",{htmlFor:g,className:v("block",m("xs","mb"),re("label"),"font-medium","text-fg-primary"),children:o}),I,C]})}));Da.displayName="Textarea";const ud=v("block",re("label"),ze("label"),"text-fg-primary"),fd={default:"",required:v("after:content-['*']",`after:${m("0.5","ml")}`,"after:text-fg-error"),optional:v("after:content-['(optional)']",`after:${m("xs","ml")}`,"after:text-fg-tertiary","after:font-normal")},Dt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=z(c,["variant","className","children"]);const u=v(ud,fd[t],r);return n.jsx("label",F(M({ref:o,className:u},a),{children:s}))}));Dt.displayName="Label";function _a(a){var o=a,{message:e,id:t,className:r=""}=o,s=z(o,["message","id","className"]);const i=[m("xs","mt"),re("bodySmall"),"text-fg-error","flex","items-center",m("xs","gap")],c=v(...i,r);return n.jsxs("div",F(M({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(ws,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class Fe{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}Fe.create("none"),Fe.create("thin"),Fe.create("base"),Fe.create("medium"),Fe.create("thick"),Fe.create("thin","dashed"),Fe.create("base","dashed"),Fe.create("thin","dotted"),Fe.create("base","dotted");function md(e){return Fe.createWidth(e).tailwind}class xt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const pd={none:xt.create("none"),sm:xt.create("sm"),md:xt.create("md"),lg:xt.create("lg"),xl:xt.create("xl"),"2xl":xt.create("2xl"),inner:xt.create("inner")};function fe(e){return pd[e].tailwind}const _t=l.forwardRef(function(f,d){var p=f,{content:t,children:r,position:s="top",delay:a=200,className:o="","aria-label":i,preservePositioning:c=!1}=p,u=z(p,["content","children","position","delay","className","aria-label","preservePositioning"]);const[b,g]=l.useState(!1),x=l.useRef(null),w=l.useRef(null),y=l.useRef(null),h=`tooltip-${l.useId()}`,j=()=>{const T=setTimeout(()=>{g(!0)},a);x.current=T},N=()=>{x.current&&(clearTimeout(x.current),x.current=null),g(!1)},k=()=>{g(!0)},$=()=>{g(!1)},S=T=>{var R;T.key==="Escape"&&(g(!1),(R=y.current)==null||R.blur())};l.useEffect(()=>()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]),l.useEffect(()=>{if(!b)return;const T=R=>{w.current&&!w.current.contains(R.target)&&y.current&&!y.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[b]);const I=T=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[T],C=pe(v("absolute",he("tooltip"),m("sm","px"),m("xs","py"),re("caption"),"text-fg-inverse","bg-surface-inverse",U("md"),fe("lg"),"whitespace-nowrap"),{variants:{position:{top:v("bottom-full","left-1/2","transform","-translate-x-1/2",m("sm","mb")),bottom:v("top-full","left-1/2","transform","-translate-x-1/2",m("sm","mt")),left:v("right-full","top-1/2","transform","-translate-y-1/2",m("sm","mr")),right:v("left-full","top-1/2","transform","-translate-y-1/2",m("sm","ml"))}},defaultVariants:{position:"top"}}),A=pe(v("absolute","w-0","h-0",md("thick"),"border-transparent"),{variants:{position:{top:v("top-full","left-1/2","transform","-translate-x-1/2",I("top")),bottom:v("bottom-full","left-1/2","transform","-translate-x-1/2",I("bottom")),left:v("left-full","top-1/2","transform","-translate-y-1/2",I("left")),right:v("right-full","top-1/2","transform","-translate-y-1/2",I("right"))}},defaultVariants:{position:"top"}}),L=l.isValidElement(r)?(()=>{const T=r,R=T.props,_=R.ref;return l.cloneElement(T,{ref:wa(y,_),"aria-describedby":b?h:R["aria-describedby"],onMouseEnter:V=>{var B;j(),(B=R.onMouseEnter)==null||B.call(R,V)},onMouseLeave:V=>{var B;N(),(B=R.onMouseLeave)==null||B.call(R,V)},onFocus:V=>{var B;k(),(B=R.onFocus)==null||B.call(R,V)},onBlur:V=>{var B;$(),(B=R.onBlur)==null||B.call(R,V)},onKeyDown:V=>{var B;S(V),(B=R.onKeyDown)==null||B.call(R,V)}})})():r,D=v(c?"static":"relative","inline-block",o);return n.jsxs("div",F(M({ref:d,className:D},u),{children:[L,b&&n.jsxs("div",{ref:w,id:h,className:v(C({position:s})),role:"tooltip","aria-live":"polite",children:[t,n.jsx("div",{className:v(A({position:s})),"aria-hidden":"true"})]})]}))});_t.displayName="Tooltip";function La(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=z(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",U("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:U("full")},p=v(...d,f[e],a),b={};t&&(b.width=t),r&&(b.height=r);const g=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",F(M({className:m("sm","space-y"),role:"status","aria-busy":"true","aria-label":g},i),{children:Array.from({length:s}).map((x,w)=>n.jsx("div",{className:p,style:w===s-1?{width:"75%"}:b,"aria-hidden":"true"},w))})):n.jsx("div",M({className:p,style:b,role:"status","aria-busy":"true","aria-label":g},i))}function bd({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}const js=l.forwardRef(function(b,p){var g=b,{children:t,trigger:r,defaultOpen:s=!0,open:a,onOpenChange:o,disabled:i=!1,duration:c=200,storageKey:u,className:d=""}=g,f=z(g,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:x,toggle:w}=bd({defaultOpen:s,open:a,onOpenChange:o,storageKey:u}),y=l.useRef(null),[h,j]=l.useState(x?"auto":0);l.useEffect(()=>{y.current&&j(x?y.current.scrollHeight:0)},[x,t]),l.useEffect(()=>{if(!x||!y.current)return;const k=new ResizeObserver(()=>{y.current&&x&&j(y.current.scrollHeight)});return k.observe(y.current),()=>{k.disconnect()}},[x]);const N=`collapsible-content-${l.useId()}`;return n.jsxs("div",F(M({ref:p,className:d},f),{children:[r!==void 0&&n.jsx("button",{type:"button",onClick:w,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),i||w())},disabled:i,"aria-expanded":x,"aria-controls":N,"aria-disabled":i,className:v("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",U("md")),children:r}),n.jsx("div",{id:N,ref:y,style:{height:typeof h=="number"?`${h}px`:h,overflow:"hidden",transition:`height ${c}ms ease-in-out`},"aria-hidden":!x,children:n.jsx("div",{children:t})})]}))});js.displayName="Collapsible";const Mr=l.memo(l.forwardRef(function(p,f){var b=p,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1,indeterminate:u=!1}=b,d=z(b,["id","label","error","success","helperText","className","disabled","indeterminate"]);const g=l.useId(),x=t||`checkbox-${g}`,w=l.useMemo(()=>s?`${x}-error`:void 0,[s,x]),y=l.useMemo(()=>o?`${x}-helper`:void 0,[o,x]),h=l.useMemo(()=>"focus:border-line-focus",[]),j=l.useMemo(()=>"focus:border-error",[]),N=l.useMemo(()=>s?j.replace("focus:border-","focus:ring-"):h.replace("focus:border-","focus:ring-"),[s,j,h]),k=l.useMemo(()=>v("h-4","w-4",U("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",N,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[N,s,a,i]),$=l.useMemo(()=>v(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]),S=l.useRef(null),I=l.useCallback(C=>{S.current=C,typeof f=="function"?f(C):f&&(f.current=C),C&&(C.indeterminate=u)},[f,u]);return l.useEffect(()=>{S.current&&(S.current.indeterminate=u)},[u]),n.jsxs("div",{className:v("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"checkbox",id:x,ref:I,className:k,disabled:c,"aria-invalid":s,"aria-describedby":w||y||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:x,className:$,children:r})]}),(s||a||o)&&n.jsx("div",{id:w||y,className:v(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Mr.displayName="Checkbox";const Fa=l.memo(l.forwardRef(function(f,d){var p=f,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1}=p,u=z(p,["id","label","error","success","helperText","className","disabled"]);const b=l.useId(),g=t||`radio-${b}`,x=l.useMemo(()=>s?`${g}-error`:void 0,[s,g]),w=l.useMemo(()=>o?`${g}-helper`:void 0,[o,g]),y=l.useMemo(()=>"focus:border-line-focus",[]),h=l.useMemo(()=>"focus:border-error",[]),j=l.useMemo(()=>s?h.replace("focus:border-","focus:ring-"):y.replace("focus:border-","focus:ring-"),[s,h,y]),N=l.useMemo(()=>v("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",j,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[j,s,a,i]),k=l.useMemo(()=>v(ue("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]);return n.jsxs("div",{className:v("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"radio",id:g,ref:d,className:N,disabled:c,"aria-invalid":s,"aria-describedby":x||w||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:g,className:k,children:r})]}),(s||a||o)&&n.jsx("div",{id:x||w,className:v(m("xs","mt"),ue("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Fa.displayName="Radio";const Wt={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function gd(e){return{track:`${Wt.track[e].w} ${Wt.track[e].h}`,thumb:`${Wt.thumb[e].w} ${Wt.thumb[e].h}`,translate:Wt.translate[e]}}const hd=pe("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),Fn=pe("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),Ns=l.forwardRef(function(p,f){var b=p,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=b,d=z(b,["value","max","variant","size","showLabel","label","aria-label","className"]);const g=t===void 0,x=g?void 0:Math.min(Math.max(t/r*100,0),100),w=c||(g?"Loading in progress":`Progress: ${x==null?void 0:x.toFixed(0)}%`);return n.jsxs("div",F(M({ref:f,className:v("w-full",u)},d),{children:[o&&(i||!g)&&n.jsxs("div",{className:v("flex","items-center","justify-between",m("xs","mb")),children:[i&&n.jsx("span",{className:v(re("bodySmall"),ze("label"),"text-fg-primary"),children:i}),!g&&x!==void 0&&n.jsxs("span",{className:v(re("bodySmall"),"text-fg-secondary"),children:[x.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":g?void 0:0,"aria-valuemax":g?void 0:r,"aria-valuenow":g?void 0:t,"aria-label":w,"aria-busy":g,className:v("relative","w-full","overflow-hidden",hd({size:a,variant:s}),U("full")),children:g?n.jsx("div",{className:v("absolute","top-0","left-0","bottom-0",Fn({variant:s}),U("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:v("h-full",Fn({variant:s}),U("full"),"transition-all","duration-300","ease-out"),style:{width:`${x}%`},"aria-hidden":"true"})})]}))});Ns.displayName="Progress";const Pa=l.memo(l.forwardRef(function(x,g){var w=x,{size:t="md",label:r,helperText:s,error:a=!1,success:o=!1,className:i="",disabled:c=!1,checked:u,defaultChecked:d,onChange:f,id:p}=w,b=z(w,["size","label","helperText","error","success","className","disabled","checked","defaultChecked","onChange","id"]);const y=u!==void 0,[h,j]=l.useState(d!=null?d:!1),N=y?!!u:h,k=l.useId(),$=p||`switch-${k}`,S=l.useMemo(()=>r?`${$}-label`:void 0,[r,$]),I=l.useMemo(()=>s?`${$}-helper`:void 0,[s,$]),C=l.useMemo(()=>gd(t),[t]),A=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),L=l.useMemo(()=>v("relative","inline-flex","shrink-0","cursor-pointer",U("full"),"border-2","border-transparent",ye("base"),"focus:outline-none","focus:ring-2",A,"focus:ring-offset-2",C.track,N?"bg-surface-brand":"bg-surface-muted",a&&!N&&"border-error",!a&&o&&!N&&"border-success",c&&"opacity-50 cursor-not-allowed",i),[A,C.track,N,a,o,c,i]),D=l.useMemo(()=>v("pointer-events-none","inline-block",U("full"),"bg-surface-base","shadow","transform",ye("base"),C.thumb,N?C.translate:"translate-x-0"),[C.thumb,C.translate,N]);return n.jsxs("div",{className:v("flex","items-start",m("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:L,role:"switch","aria-checked":N,"aria-labelledby":S,"aria-describedby":I,disabled:c,onClick:l.useCallback(T=>{if(c)return;const R=!N;if(y||j(R),f){const _=F(M({},T),{target:F(M({},T.target),{checked:R}),currentTarget:F(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,y]),onKeyDown:l.useCallback(T=>{if(c||T.key!=="Enter"&&T.key!==" ")return;T.preventDefault();const R=!N;if(y||j(R),f){const _=F(M({},T),{target:F(M({},T.target),{checked:R}),currentTarget:F(M({},T.currentTarget),{checked:R})});f(_)}},[c,f,N,y]),children:n.jsx("span",{className:D})}),n.jsx("input",M({ref:g,type:"checkbox",id:$,checked:N,onChange:f!=null?f:(()=>{}),disabled:c,className:"sr-only","aria-hidden":"true",tabIndex:-1},b))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:S,htmlFor:$,className:v("block",re("bodySmall"),ze("label"),a?"text-fg-error":"text-fg-primary",c?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:I,className:v(m("xs","mt"),re("bodySmall"),a?"text-fg-error":o?"text-fg-success":"text-fg-secondary"),children:s})]})]})}));Pa.displayName="Switch";const xd={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},vd={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"},Ss=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=z(i,["orientation","variant","className"]);const c=v("border-0","border-line-default",xd[t],vd[r],s);return t==="vertical"?n.jsx("div",M({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",M({className:c,role:"separator","aria-orientation":"horizontal"},a))});Ss.displayName="Separator";const Oa=l.forwardRef(function(h,y){var j=h,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:p,onValueChange:b,label:g,className:x=""}=j,w=z(j,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const N=l.useRef(null),k=l.useId(),$=l.useId(),S=l.useId(),[I,C]=l.useState(r||(i==="range"?[s,a]:s)),[A,L]=l.useState(!1),[D,T]=l.useState(null),R=t!==void 0,_=R?t:I,V=W=>(W-s)/(a-s)*100,B=W=>{if(!N.current)return s;const q=N.current.getBoundingClientRect(),ce=Math.max(0,Math.min(1,(W-q.left)/q.width)),ie=s+ce*(a-s);return Math.round(ie/o)*o},X=(W,q="min")=>{if(u)return;W.preventDefault(),L(!0),T(q);const ce=be=>{if(!N.current)return;const we=B(be.clientX);Z(we,q)},ie=()=>{L(!1),T(null),document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",ie)};document.addEventListener("mousemove",ce),document.addEventListener("mouseup",ie)},Z=(W,q="min")=>{const ce=Math.max(s,Math.min(a,W));if(i==="range"){const[ie,be]=Array.isArray(_)?_:[s,a];let we;q==="min"?we=[Math.min(ce,be),be]:we=[ie,Math.max(ce,ie)],R||C(we),p==null||p(we),b==null||b(we)}else R||C(ce),p==null||p(ce),b==null||b(ce)},oe=W=>{if(u||A)return;const q=B(W.clientX);Z(q)},H=()=>"focus:ring-line-brand ring-offset-2",P=pe(v("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),Y=pe(v("absolute","bg-surface-brand",U("full"),"border-2","border-white",fe("md"),"cursor-grab","active:cursor-grabbing",ye("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:H(),false:""}},defaultVariants:{size:"md",active:!1}}),ee=typeof _=="number"?_:_[0],J=Array.isArray(_)?_[0]:s,te=Array.isArray(_)?_[1]:ee,ae=V(J),O=V(te);return n.jsxs("div",F(M({ref:y,className:v("w-full",x)},w),{children:[n.jsxs("label",{id:k,className:v("block",re("bodySmall"),ze("label"),"text-fg-primary",m("sm","mb")),children:[g,d&&n.jsx("span",{className:v(m("sm","ml"),"text-fg-secondary"),children:i==="range"?`${J} - ${te}`:ee})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:$,className:"sr-only",children:"minimum"}),n.jsx("span",{id:S,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:N,className:v(P({size:c,disabled:u}),"bg-surface-muted",U("full")),onClick:oe,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:ee,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:k,children:[n.jsx("div",{className:v("absolute",P({size:c}),"bg-surface-brand",U("full"),ye("base")),style:{left:`${ae}%`,width:`${O-ae}%`}}),f.map(W=>{const q=V(W);return n.jsx("div",{className:v("absolute","w-1","h-1","bg-line-strong",U("full"),"-translate-x-1/2"),style:{left:`${q}%`,top:"50%",transform:"translate(-50%, -50%)"}},W)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:v(Y({size:c,active:D==="min"})),style:{left:`${ae}%`},onMouseDown:W=>X(W,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":te,"aria-valuenow":J,"aria-labelledby":`${k} ${$}`}),n.jsx("div",{className:v(Y({size:c,active:D==="max"})),style:{left:`${O}%`},onMouseDown:W=>X(W,"max"),role:"slider","aria-valuemin":J,"aria-valuemax":a,"aria-valuenow":te,"aria-labelledby":`${k} ${S}`})]}):n.jsx("div",{className:v(Y({size:c,active:A})),style:{left:`${O}%`},onMouseDown:W=>X(W)}),d&&!g&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:v(re("caption"),"text-fg-secondary","bg-surface-overlay",m("sm","px"),m("xs","py"),U("md"),"shadow"),children:i==="range"?`${J} - ${te}`:ee})})]})]}))});Oa.displayName="Slider";const Pn=pe(v("inline-flex","items-center","font-medium",U("full"),m("xs","gap")),{variants:{variant:{default:v("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:v("bg-transparent","text-fg-primary","border","border-line-default"),filled:v("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:v(m("xs","px"),m("xs","py"),re("caption")),md:v(m("sm","px"),m("xs","py"),re("bodySmall")),lg:v(m("md","px"),m("sm","py"),re("body"))},selected:{true:v("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),$s=l.forwardRef(function(t,r){const{children:s,variant:a="default",size:o="md",selected:i=!1,disabled:c=!1,className:u="","aria-label":d,tabIndex:f,asChild:p=!1}=t,g=(()=>{if(d)return d;if(typeof s=="string")return s;if(typeof s=="object"&&s!==null&&"props"in s){const N=s.props;if(N!=null&&N.children&&typeof N.children=="string")return N.children}})();if(p)return n.jsx(Ta,{ref:r,className:v(Pn({variant:a,size:o,selected:i,disabled:c}),u),"aria-label":d,"aria-disabled":c||void 0,tabIndex:f,children:s});const{onRemove:x,onClick:w}=t,y=w!==void 0,h=y&&!c,j=N=>{c||(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),w==null||w())};return n.jsxs("div",{ref:r,className:v(Pn({variant:a,size:o,selected:i,disabled:c}),x&&m("xs","pr"),u),"aria-disabled":c,children:[y?n.jsx("button",{type:"button",onClick:c?void 0:w,onKeyDown:j,disabled:c,"aria-pressed":i?!0:void 0,"aria-label":d||g,tabIndex:f!==void 0?f:h?0:void 0,className:v("flex-1","bg-transparent","border-0",m("none","p"),"text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",U("full")),children:s}):n.jsx("span",{children:s}),x&&!c&&n.jsx("button",{type:"button",onClick:N=>{N.stopPropagation(),x()},className:v(m("xs","ml"),"hover:bg-tint-hover",U("full"),m("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${g||"chip"}`,children:n.jsx(Ce,{className:"h-3 w-3","aria-hidden":"true"})})]})});$s.displayName="Chip";const pr=l.forwardRef(function(f,d){var p=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=p,u=z(p,["src","alt","fallback","size","variant","aria-label","className"]);const[b,g]=l.useState(!1),[x,w]=l.useState(!1),y={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},h={circle:U("full"),square:U("none"),rounded:U("md")},j=!t||b,N=typeof s=="string"?s.toUpperCase().slice(0,2):s,k=i||r||"User avatar";return n.jsxs("div",F(M({ref:d,className:v("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",y[a],h[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":k},u),{children:[!j&&t&&n.jsx("img",{src:t,alt:r||"",className:v("w-full","h-full","object-cover",h[o],x?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>w(!0),onError:()=>{g(!0),w(!1)},"aria-hidden":"true"}),j&&n.jsx("span",{className:v("flex","items-center","justify-center","w-full","h-full",h[o]),"aria-hidden":"true",children:N||"?"})]}))});pr.displayName="Avatar";function yd(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=z(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),p=f.slice(0,t),b=f.length-t;return n.jsxs("div",F(M({className:v("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[p.map((g,x)=>{let w=g;if(l.isValidElement(g)&&g.type===pr){const y=g.props;w=l.cloneElement(g,{size:y.size||r,variant:y.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-x},children:w},x)}),b>0&&n.jsx(pr,{size:r,variant:s,fallback:`+${b}`,"aria-label":`${b} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const wd=pe(v("inline-block",U("full")),{variants:{variant:{online:"",offline:"",pending:"",warning:"",error:"",info:""},size:{sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"}},compoundVariants:[{variant:"online",class:"bg-success"},{variant:"offline",class:"bg-status-neutral"},{variant:"pending",class:"bg-warning"},{variant:"warning",class:"bg-warning"},{variant:"error",class:"bg-error"},{variant:"info",class:"bg-info"}],defaultVariants:{variant:"offline",size:"md"}}),za=l.memo(l.forwardRef(function(c,i){var u=c,{variant:t="offline",size:r="md",className:s="","aria-label":a}=u,o=z(u,["variant","size","className","aria-label"]);const d=l.useMemo(()=>v(wd({variant:t,size:r}),s),[t,r,s]),f=l.useMemo(()=>a||{online:"Online",offline:"Offline",pending:"Pending",warning:"Warning",error:"Error",info:"Info"}[t],[a,t]);return n.jsx("span",M({ref:i,role:"status","aria-label":f,className:d},o))}));za.displayName="Dot";function kd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:v("grid items-start",m("1.5","gap"),m("base","mb"),"[&:has([data-card-actions])]:grid-cols-[1fr_auto]","[&:has([data-card-actions])>[data-card-actions]]:row-span-full",t)},r),{children:e}))}function jd(i){var c=i,{children:e,icon:t,badge:r,as:s="h2",className:a}=c,o=z(c,["children","icon","badge","as","className"]);return n.jsxs(s,F(M({className:v("text-base font-semibold text-fg-primary","flex items-center",m("sm","gap"),a)},o),{children:[t?n.jsx("span",{className:"shrink-0 inline-flex",children:t}):null,n.jsx("span",{children:e}),r?n.jsx("span",{className:"inline-flex",children:r}):null]}))}function Nd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("p",F(M({className:v("text-sm text-fg-secondary",t)},r),{children:e}))}function Sd(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({"data-card-actions":"",className:v("flex items-center self-start",m("sm","gap"),t)},r),{children:e}))}function $d(s){var a=s,{children:e,className:t}=a,r=z(a,["children","className"]);return n.jsx("div",F(M({className:v(t)},r),{children:e}))}function Cd(d){var f=d,{variant:e="default",padding:t="medium",className:r="",onClick:s,"aria-label":a,"aria-labelledby":o,asSection:i=!1,children:c}=f,u=z(f,["variant","padding","className","onClick","aria-label","aria-labelledby","asSection","children"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&i&&!a&&!o&&console.warn("[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.");const p=pe(v("bg-surface-base",U("lg"),"border","border-line-default",fe("sm")),{variants:{variant:{default:"",hover:v(`hover:${fe("md")}`,"transition-shadow","cursor-pointer"),selected:v("border-line-brand",fe("md"))},padding:{none:"",small:m("xs","p"),medium:m("base","p"),large:m("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),b=s!==void 0,g=b?"button":void 0,x=b?0:void 0,w=v(p({variant:e,padding:t}),r),h=M({className:w,role:g,tabIndex:x,onClick:s,onKeyDown:b?j=>{b&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),s==null||s())}:void 0,"aria-label":a,"aria-labelledby":o},u);return i?n.jsx("section",F(M({},h),{children:c})):n.jsx("div",F(M({},h),{children:c}))}const Va=l.memo(Cd);Va.displayName="Card";const ft=Va;ft.Header=kd;ft.Title=jd;ft.Subtitle=Nd;ft.Actions=Sd;ft.Body=$d;const Ed={start:"items-start text-left",center:"items-center text-center"},Md={neutral:"text-fg-tertiary",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};function Td(u){var d=u,{value:e,label:t,hint:r,icon:s,align:a="start",tone:o="neutral",className:i}=d,c=z(d,["value","label","hint","icon","align","tone","className"]);const f=e==null;return n.jsxs("div",F(M({className:v("bg-surface-base flex-1 flex flex-col",m("base","p"),m("xs","gap-y"),Ed[a],i)},c),{children:[s?n.jsx("span",{className:"text-icon-default inline-flex",children:s}):null,f?n.jsx("span",{"aria-label":"No data",className:"text-fg-tertiary text-2xl font-semibold leading-tight",children:"—"}):n.jsx("span",{className:"text-fg-primary text-2xl font-semibold leading-tight",children:e}),n.jsx("span",{className:"text-fg-secondary text-sm",children:t}),r?n.jsx("span",{className:v("text-xs",Md[o]),children:r}):null]}))}const Ad={2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"};function Rd(o){var i=o,{layout:e="grid",cols:t=4,className:r,children:s}=i,a=z(i,["layout","cols","className","children"]);const c=e==="grid";return n.jsx("div",F(M({className:v("bg-line-default border border-line-default overflow-hidden gap-px",U("lg"),c?`grid grid-cols-2 ${Ad[t]}`:"flex",r)},a),{children:s}))}function Id(o){var i=o,{label:e,children:t,wrap:r=!0,className:s}=i,a=z(i,["label","children","wrap","className"]);const u=!(a["aria-label"]!=null||a["aria-labelledby"]!=null)&&typeof e=="string"&&e!==""?e:void 0;return n.jsxs("div",F(M({role:"group","aria-label":u,className:v("flex items-center",r?"flex-wrap":"flex-nowrap",m("sm","gap"),s)},a),{children:[e?n.jsx("span",{className:"shrink-0 text-fg-secondary text-sm",children:e}):null,t]}))}function Wa(e){const t=l.createContext(void 0);t.displayName=e.displayName;function r({value:o,children:i}){return n.jsx(t.Provider,{value:o,children:i})}function s(){const o=l.useContext(t);if(o===void 0)throw new Error(e.errorMessage);return o}function a(){return l.useContext(t)}return{Context:t,Provider:r,useContextRequired:s,useContextOptional:a}}const Tr=Wa({displayName:"FormContext",errorMessage:"useFormContext must be used within a Form component with react-hook-form integration"}),Dd=Tr.Context,_d=Tr.Provider;function Cs(){return Tr.useContextRequired()}function Ld(){return Tr.useContextOptional()}function Ha({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(_d,{value:s,children:r})}function Fd(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=z(u,["children","onSubmit","loading","error","success","className"]);const d=v(m("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const w=i,{form:h,onSubmit:j,onSubmitError:N}=w,k=z(w,["form","onSubmit","onSubmitError"]),$=h.handleSubmit(S=>sr(null,null,function*(){try{yield j(S)}catch(I){N==null||N(I)}}),S=>{N==null||N(S)});return n.jsx(Ha,{form:h,loading:r,children:n.jsxs("form",F(M({className:d,onSubmit:$,noValidate:!0},k),{children:[e,s&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))})}const p=i.onSubmit||t,y=i,{onSubmit:b}=y,g=z(y,["onSubmit"]),x=h=>{h.preventDefault(),p&&!r&&(p==null||p(h))};return n.jsxs("form",F(M({className:d,onSubmit:x,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-error-dark","bg-error-bg","border","border-error",U("md")),children:s}),a&&n.jsx("div",{role:"alert",className:v(m("md","p"),je("sm"),"text-success-dark","bg-success-bg","border","border-success",U("md")),children:a})]}))}function Pd({name:e,label:t,children:r,rules:s,className:a=""}){var b;const{form:o}=Cs();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(b=c[e])==null?void 0:b.message,p=u(e);return n.jsxs("div",{className:v("flex","flex-col",m("sm","gap"),a),children:[t&&n.jsx(Dt,{htmlFor:e,className:v("block",je("sm"),It("medium"),"text-fg-primary"),children:t}),r({name:e,register:g=>i(g,s),error:f,value:p,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(_a,{message:f})]})}var Od=e=>e.type==="checkbox",zd=e=>e instanceof Date,Pe=e=>e==null;const Vd=e=>typeof e=="object";var qe=e=>!Pe(e)&&!Array.isArray(e)&&Vd(e)&&!zd(e),Wd=e=>{const t=e.constructor&&e.constructor.prototype;return qe(t)&&t.hasOwnProperty("isPrototypeOf")},Es=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function tt(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(Es&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(qe(e)&&Wd(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=tt(e[a]));return s}const At={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Be={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hd="root",Ba=["__proto__","constructor","prototype"];var Ms=e=>/^\w*$/.test(e),Ke=e=>e===void 0,Ts=e=>e.split(/[.[\]'"]/g).filter(Boolean),Oe=(e,t,r)=>{if(!t||!qe(e))return r;const s=Ms(t)?[t]:Ts(t);if(s.some(o=>Ba.includes(o)))return r;const a=s.reduce((o,i)=>Pe(o)?void 0:o[i],e);return Ke(a)||a===e?Ke(e[t])?r:e[t]:a},Ua=e=>typeof e=="boolean",Bd=e=>typeof e=="function",br=(e,t,r)=>{let s=-1;const a=Ms(t)?[t]:Ts(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=qe(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(Ba.includes(c))return;e[c]=u,e=e[c]}};const Ga=l.createContext(null);Ga.displayName="HookFormControlContext";const Ud=()=>l.useContext(Ga),Gd=Es?l.useLayoutEffect:l.useEffect;var Ue=e=>typeof e=="string";const Kd=l.createContext(null);Kd.displayName="HookFormContext";var Yd=(e,t,r,s,a)=>t?F(M({},r[e]),{types:F(M({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},qd=e=>Array.isArray(e)?e.filter(Boolean):[],Ge=e=>Array.isArray(e)?e:[e],gr=e=>qe(e)&&!Object.keys(e).length,Xd=e=>e.type==="file",Jd=e=>{if(!Es)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zd=e=>e.type==="radio";function Qd(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(Pe(e)){e=void 0;break}e=e[t[s]],s++}return e}function eu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ke(e[t]))return!1;return!0}function Ka(e,t){if(Ue(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:Ms(t)?[t]:Ts(t),s=r.length===1?e:Qd(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(qe(s)&&gr(s)||Array.isArray(s)&&eu(s))&&Ka(e,r.slice(0,-1)),e}var Ya=e=>e instanceof RegExp,dr=e=>({isOnSubmit:!e||e===At.onSubmit,isOnBlur:e===At.onBlur,isOnChange:e===At.onChange,isOnAll:e===At.all,isOnTouch:e===At.onTouched}),tu=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(`${s}.`));const us=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=Oe(e,o);if(i){const a=i,{_f:c}=a,u=z(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(us(u,t))break}else if(qe(u)&&us(u,t))break}}};var ru=(e,t,r)=>{const s=Oe(e,r),a=Array.isArray(s)?s:[];return br(a,Hd,t[r]),br(e,r,a),e};function On(e,t,r="validate"){if(Ue(e)||Array.isArray(e)&&e.every(Ue)||Ua(e)&&!e)return{type:r,message:Ue(e)?e:"",ref:t}}var Mt=e=>qe(e)&&!Ya(e)?e:{value:e,message:""},su=(e,t,r,s,a,o)=>sr(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:p,max:b,pattern:g,validate:x,name:w,valueAsNumber:y,mount:h}=e._f,j=Oe(r,w);if(!h||t.has(w))return{};const N=c?c[0]:i,k=A=>{a&&N.reportValidity&&(N.setCustomValidity(Ua(A)?"":A||""),N.reportValidity())},$={};Zd(i),Od(i);const S=(y||Xd(i))&&Ke(i.value)&&Ke(j)||Jd(i)&&i.value===""||j===""||Array.isArray(j)&&!j.length,I=Yd.bind(null,w,s,$),C=(A,L,D,T=Be.maxLength,R=Be.minLength)=>{const _=A?L:D;$[w]=M({type:A?T:R,message:_,ref:i},I(A?T:R,_))};if(!Array.isArray(j)||!j.length){const{value:A,message:L}=Ue(u)?{value:!!u,message:u}:Mt(u);if(A&&($[w]=M({type:Be.required,message:L,ref:N},I(Be.required,L)),!s))return k(L),$}if(!S&&(!Pe(p)||!Pe(b))){let A,L;const D=Mt(b),T=Mt(p);if(!Pe(j)&&!isNaN(j)){const R=i.valueAsNumber||j&&+j;Pe(D.value)||(A=R>D.value),Pe(T.value)||(L=R<T.value)}else{const R=i.valueAsDate||new Date(j),_=X=>new Date(new Date().toDateString()+" "+X),V=i.type=="time",B=i.type=="week";Ue(D.value)&&j&&(A=V?_(j)>_(D.value):B?j>D.value:R>new Date(D.value)),Ue(T.value)&&j&&(L=V?_(j)<_(T.value):B?j<T.value:R<new Date(T.value))}if((A||L)&&(C(!!A,D.message,T.message,Be.max,Be.min),!s))return k($[w].message),$}if((d||f)&&!S&&(Ue(j)||Array.isArray(j))){const A=Mt(d),L=Mt(f),D=!Pe(A.value)&&j.length>+A.value,T=!Pe(L.value)&&j.length<+L.value;if((D||T)&&(C(D,A.message,L.message),!s))return k($[w].message),$}if(g&&!S&&Ue(j)){const{value:A,message:L}=Mt(g);if(Ya(A)&&!j.match(A)&&($[w]=M({type:Be.pattern,message:L,ref:i},I(Be.pattern,L)),!s))return k(L),$}if(x){if(Bd(x)){const A=yield x(j,r),L=On(A,N);if(L&&($[w]=M(M({},L),I(Be.validate,L.message)),!s))return k(L.message),$}else if(qe(x)){let A={};for(const L in x){if(!gr(A)&&!s)break;const D=On(yield x[L](j,r),N,L);D&&(A=M(M({},D),I(L,D.message)),k(D.message),s&&($[w]=A))}if(!gr(A)&&($[w]=M({ref:N},A),!s))return $}}return k(!0),$}),et=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Qr=(e,t,r={})=>r.shouldFocus||Ke(r.shouldFocus)?r.focusName||`${e}.${Ke(r.focusIndex)?t:r.focusIndex}.`:"",es=(e,t)=>[...e,...Ge(t)],ts=e=>Array.isArray(e)?e.map(()=>{}):void 0;function rs(e,t,r){return[...e.slice(0,t),...Ge(r),...e.slice(t)]}var ss=(e,t,r)=>Array.isArray(e)?(Ke(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],ns=(e,t)=>[...Ge(t),...Ge(e)];function nu(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return qd(s).length?s:[]}var as=(e,t)=>Ke(t)?[]:nu(e,Ge(t).sort((r,s)=>r-s)),os=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},zn=(e,t,r)=>(e[t]=r,e);function au(e){const t=Ud(),{control:r=t,name:s,keyName:a="id",shouldUnregister:o,rules:i}=e,[c,u]=l.useState(r._getFieldArray(s)),d=l.useRef(r._getFieldArray(s).map(et)),f=l.useRef(!1);r._names.array.add(s),l.useMemo(()=>i&&c.length>=0&&r.register(s,i),[r,s,c.length,i]),Gd(()=>r._subjects.array.subscribe({next:({values:k,name:$})=>{if($===s||!$){const S=Oe(k,s);Array.isArray(S)?(u(S),d.current=S.map(et)):$||(u([]),d.current=[])}}}).unsubscribe,[r,s]);const p=l.useCallback(k=>{f.current=!0,r._setFieldArray(s,k)},[r,s]),b=(k,$)=>{const S=Ge(tt(k)),I=es(r._getFieldArray(s),S);r._names.focus=Qr(s,I.length-1,$),d.current=es(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,es,{argA:ts(k)})},g=(k,$)=>{const S=Ge(tt(k)),I=ns(r._getFieldArray(s),S);r._names.focus=Qr(s,0,$),d.current=ns(d.current,S.map(et)),p(I),u(I),r._setFieldArray(s,I,ns,{argA:ts(k)})},x=k=>{const $=as(r._getFieldArray(s),k);d.current=as(d.current,k),p($),u($),!Array.isArray(Oe(r._fields,s))&&br(r._fields,s,void 0),r._setFieldArray(s,$,as,{argA:k})},w=(k,$,S)=>{const I=Ge(tt($)),C=rs(r._getFieldArray(s),k,I);r._names.focus=Qr(s,k,S),d.current=rs(d.current,k,I.map(et)),p(C),u(C),r._setFieldArray(s,C,rs,{argA:k,argB:ts($)})},y=(k,$)=>{const S=r._getFieldArray(s);os(S,k,$),os(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,os,{argA:k,argB:$},!1)},h=(k,$)=>{const S=r._getFieldArray(s);ss(S,k,$),ss(d.current,k,$),p(S),u(S),r._setFieldArray(s,S,ss,{argA:k,argB:$},!1)},j=(k,$)=>{const S=tt($),I=zn(r._getFieldArray(s),k,S);d.current=[...I].map((C,A)=>!C||A===k?et():d.current[A]),p(I),u([...I]),r._setFieldArray(s,I,zn,{argA:k,argB:S},!0,!1)},N=k=>{const $=Ge(tt(k));d.current=$.map(et),p([...$]),u([...$]),r._setFieldArray(s,[...$],S=>S,{},!0,!1)};return l.useEffect(()=>{r._state.action=!1,tu(s,r._names)&&r._subjects.state.next(M({},r._formState));const k=dr(r._options.mode);if(f.current&&(!k.isOnSubmit||r._formState.isSubmitted)&&!dr(r._options.reValidateMode).isOnSubmit&&!k.isOnBlur)if(r._options.resolver)r._runSchema([s]).then($=>{r._updateIsValidating([s]);const S=Oe($.errors,s),I=Oe(r._formState.errors,s);(I?!S&&I.type||S&&(I.type!==S.type||I.message!==S.message):S&&S.type)&&(S?br(r._formState.errors,s,S):Ka(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const $=Oe(r._fields,s);$&&$._f&&!(dr(r._options.reValidateMode).isOnSubmit&&dr(r._options.mode).isOnSubmit)&&su($,r._names.disabled,r._formValues,r._options.criteriaMode===At.all,r._options.shouldUseNativeValidation).then(S=>!gr(S)&&r._subjects.state.next({errors:ru(r._formState.errors,S,s)}))}r._subjects.state.next({name:s,values:tt(r._formValues)}),r._names.focus&&us(r._fields,($,S)=>{if(r._names.focus&&S.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[c,s,r]),l.useEffect(()=>(!Oe(r._formValues,s)&&r._setFieldArray(s),()=>{const k=!(r._options.shouldUnregister||o),$=(S,I)=>{const C=Oe(r._fields,S);C&&C._f&&(C._f.mount=I)};f.current&&k&&r._subjects.state.next({name:s,values:tt(r._formValues)}),k?$(s,!1):r.unregister(s)}),[s,r,a,o]),{swap:l.useCallback(y,[p,s,r]),move:l.useCallback(h,[p,s,r]),prepend:l.useCallback(g,[p,s,r]),append:l.useCallback(b,[p,s,r]),remove:l.useCallback(x,[p,s,r]),insert:l.useCallback(w,[p,s,r]),update:l.useCallback(j,[p,s,r]),replace:l.useCallback(N,[p,s,r]),fields:l.useMemo(()=>c.map((k,$)=>F(M({},k),{[a]:d.current[$]||et()})),[c,a])}}function ou(e){const{form:t}=Cs();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return au(F(M({},e),{control:t.control}))}function qa(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=z(o,["items","separator","className"]);const i=["flex","items-center",m("sm","space-x"),re("bodySmall")],c=v(...i,r);return n.jsx("nav",F(M({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:v("flex","items-center",m("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:v(m("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:v("text-fg-primary",ze("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:v("inline-flex","items-center",m("xs","px"),m("xs","pt"),"border-b-2","border-transparent",re("bodySmall"),ze("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Xa(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=z(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},p=()=>{e<t&&r(e+1)},b=h=>{h>=1&&h<=t&&h!==e&&r(h)},g=()=>{const h=[];if(t<=5)for(let N=1;N<=t;N++)h.push(N);else if(e<=3){for(let N=1;N<=4;N++)h.push(N);h.push("ellipsis"),h.push(t)}else if(e>=t-2){h.push(1),h.push("ellipsis");for(let N=t-3;N<=t;N++)h.push(N)}else{h.push(1),h.push("ellipsis");for(let N=e-1;N<=e+1;N++)h.push(N);h.push("ellipsis"),h.push(t)}return h},x=s&&a?(e-1)*a+1:void 0,w=s&&a?Math.min(e*a,s):void 0,y=v("flex","items-center","justify-between",m("base","px"),m("md","py"),i);return n.jsxs("nav",F(M({className:y,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:v("flex","items-center",m("sm","gap")),children:[n.jsx(Q,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:v("flex","items-center",m("xs","gap")),children:g().map((h,j)=>{if(h==="ellipsis")return n.jsx("span",{className:v(m("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${j}`);const N=h,k=N===e;return n.jsx(Q,{variant:k?"primary":"ghost",onClick:()=>b(N),size:"sm","aria-current":k?"page":void 0,"aria-label":`Go to page ${N}`,children:N},N)})}),n.jsx(Q,{variant:"secondary",onClick:p,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:v(je("sm"),"text-fg-primary"),children:["Showing ",x," to ",w," of ",s," results"]})]}))}function Ja(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=z(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=v("flex","flex-col","items-center","justify-center","text-center",m("xl","py"),m("base","px"),i),p=o==="withAction"||r&&s,b=o==="withIllustration"||a;return n.jsxs("div",F(M({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[b&&a&&n.jsx("div",{className:v(m("base","mb")),"aria-hidden":"true",children:a}),n.jsx($e,{as:"h3",className:v(re("h4"),It("semibold"),"text-fg-primary",m("sm","mb")),children:e}),n.jsx($e,{as:"p",className:v(re("bodySmall"),"text-fg-secondary",m("md","mb"),"max-w-sm"),children:t}),p&&r&&s&&n.jsx(Q,{variant:"primary",onClick:s,children:r})]}))}function Za(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=z(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[p,b]=l.useState(-1),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=l.useRef([]),h=l.useId(),j=`dropdown-menu-${h}`,N=`dropdown-trigger-${h}`;l.useEffect(()=>{const A=L=>{g.current&&!g.current.contains(L.target)&&(f(!1),b(-1))};return d&&(document.addEventListener("mousedown",A),setTimeout(()=>{var D;const L=t.findIndex(T=>!T.disabled);L>=0&&(b(L),(D=y.current[L])==null||D.focus())},0)),()=>{document.removeEventListener("mousedown",A)}},[d,t]),l.useEffect(()=>{if(!d)return;const A=D=>{var _,V,B,X;const T=t.map((Z,oe)=>({item:Z,index:oe})).filter(({item:Z})=>!Z.disabled),R=T.findIndex(({index:Z})=>Z===p);switch(D.key){case"ArrowDown":{D.preventDefault();const Z=R<T.length-1?T[R+1].index:T[0].index;b(Z),(_=y.current[Z])==null||_.focus();break}case"ArrowUp":{D.preventDefault();const Z=R>0?T[R-1].index:T[T.length-1].index;b(Z),(V=y.current[Z])==null||V.focus();break}case"Home":{D.preventDefault();const Z=T[0].index;b(Z),(B=y.current[Z])==null||B.focus();break}case"End":{D.preventDefault();const Z=T[T.length-1].index;b(Z),(X=y.current[Z])==null||X.focus();break}case"Enter":case" ":D.preventDefault(),p>=0&&!t[p].disabled&&k(t[p]);break;case"Escape":D.preventDefault(),f(!1),b(-1),setTimeout(()=>{var Z;(Z=x.current)==null||Z.focus()},0);break}},L=w.current;if(L){const D=A;return L.addEventListener("keydown",D),()=>{L.removeEventListener("keydown",D)}}},[d,p,t]);const k=A=>{A.disabled||(A.onClick(),f(!1),b(-1),setTimeout(()=>{var L;(L=x.current)==null||L.focus()},0))},$=()=>{f(!d),b(-1)},S=A=>{(A.key==="Enter"||A.key===" "||A.key==="ArrowDown")&&(A.preventDefault(),f(!0))},I=r==="right"?"right-0":"left-0",C=l.isValidElement(e)?l.cloneElement(e,{onClick:A=>{var L,D;$(),(D=(L=e.props).onClick)==null||D.call(L,A)},onKeyDown:A=>{var L,D;S(A),(D=(L=e.props).onKeyDown)==null||D.call(L,A)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||e.props["aria-label"]||"Open menu",id:N,ref:wa(x,e.props.ref)}):n.jsx("div",{ref:A=>{x.current=A},onClick:$,onKeyDown:S,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":j,"aria-label":o||"Open menu",id:N,children:e});return n.jsxs("div",F(M({className:v("relative","inline-block",a),ref:g},i),{children:[C,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:v("fixed","inset-0","z-10"),onClick:()=>{f(!1),b(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:w,id:j,className:v("absolute","z-20",m("sm","mt"),"w-48",U("md"),fe("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",I),role:"menu","aria-orientation":"vertical","aria-labelledby":N,"aria-activedescendant":p>=0?`${j}-item-${p}`:void 0,children:n.jsx("div",{className:v(m("xs","py")),role:"none",children:t.map((A,L)=>{const D=v("block",m("base","px"),m("xs","py"),re("bodySmall"),"w-full","text-left","focus:outline-none",A.disabled?v("text-fg-disabled","cursor-not-allowed","opacity-50"):A.variant==="danger"?v("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):v("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${j}-item-${L}`,ref:T=>{y.current[L]=T},type:"button",className:D,onClick:()=>k(A),disabled:A.disabled,role:"menuitem","aria-disabled":A.disabled,tabIndex:A.disabled?-1:p===L?0:-1,children:A.label},L)})})})]})]}))}const Qa=l.createContext(void 0);function eo(){const e=l.useContext(Qa);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function fs({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r===void 0&&s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[p,b]=l.useState(d()),[g,x]=l.useState(f()),w=t==="single"?r instanceof Date?r:p:null,y=t==="range"?r&&typeof r=="object"&&"start"in r?r:g:null,N={selectedDate:w,selectedRange:y,mode:t,onDateChange:k=>{t==="single"&&(r===void 0&&b(k),a==null||a(k))},onRangeChange:k=>{t==="range"&&(r===void 0&&x(k),a==null||a(k))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(Qa.Provider,{value:N,children:e})}function Ht(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function Vn(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function As(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=z(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:p,onDateChange:b}=eo(),[g,x]=l.useState(""),[w,y]=l.useState(!1),h=l.useRef(null);l.useEffect(()=>{p==="single"&&d?x(Ht(d,t)):p==="range"&&f?f.start&&f.end?x(`${Ht(f.start,t)} - ${Ht(f.end,t)}`):f.start?x(Ht(f.start,t)):x(""):x("")},[d,f,p,t]);const j=$=>{const S=$.target.value;if(x(S),p==="single"){const I=Vn(S);b(I)}},N=()=>{if(y(!1),g&&p==="single"){const $=Vn(g);$&&x(Ht($,t))}},k=()=>{var $;($=h.current)==null||$.focus()};return n.jsx("div",F(M({className:`relative ${o}`},i),{children:n.jsx(Ee,{ref:h,type:"text",value:g,onChange:j,onFocus:()=>{y(!0),a==null||a()},onBlur:N,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:k,"aria-label":"Open calendar",type:"button",children:n.jsx(ac,{className:"h-4 w-4"})}):void 0})}))}function iu(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function lu(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function vt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Bt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function cu(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function Wn(e,t,r,s){return!!(t&&e<t||r&&e>r||s!=null&&s.some(a=>vt(e,a)))}const du=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],uu=["January","February","March","April","May","June","July","August","September","October","November","December"];function Rs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=z(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:p,maxDate:b,disabledDates:g}=eo(),[x,w]=l.useState(e||i||(c==null?void 0:c.start)||new Date),y=l.useRef(null),[h,j]=l.useState(()=>{const T=new Date,R=e||i||(c==null?void 0:c.start)||T;return i&&Bt(i,R)?i:Bt(T,R)?T:new Date(R.getFullYear(),R.getMonth(),1)});l.useEffect(()=>{e&&w(e)},[e]),l.useEffect(()=>{if(!y.current)return;const T=y.current.querySelector(`[data-date="${h.toISOString()}"]`);T&&T.focus()},[h]);const N=(()=>{if(Bt(h,x))return h;const T=new Date;return Bt(T,x)?T:new Date(x.getFullYear(),x.getMonth(),1)})(),k=iu(x),$=lu(x),S=[];for(let T=0;T<$;T++)S.push(null);for(let T=1;T<=k;T++)S.push(new Date(x.getFullYear(),x.getMonth(),T));const I=T=>{if(!Wn(T,p,b,g)){if(u==="single")d(T);else if(u==="range"){const R=c||{start:null,end:null};!R.start||R.start&&R.end?f({start:T,end:null}):R.start&&!R.end&&(T<R.start?f({start:T,end:R.start}):f({start:R.start,end:T}))}}},C=()=>{const T=new Date(x.getFullYear(),x.getMonth()-1,1);w(T),t==null||t(T)},A=()=>{const T=new Date(x.getFullYear(),x.getMonth()+1,1);w(T),t==null||t(T)},L=(T,R)=>{let _=null;switch(T.key){case"ArrowLeft":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-1);break;case"ArrowRight":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+1);break;case"ArrowUp":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()-7);break;case"ArrowDown":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),R.getDate()+7);break;case"Home":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth(),1);break;case"End":T.preventDefault(),_=new Date(R.getFullYear(),R.getMonth()+1,0);break;case"Enter":case" ":T.preventDefault(),I(R);return}_&&(Bt(_,x)||w(new Date(_.getFullYear(),_.getMonth(),1)),j(_))},D=[];for(let T=0;T<S.length;T+=7)D.push(S.slice(T,T+7));return n.jsxs("div",F(M({ref:y,className:`${m("base","p")} ${r}`},s),{children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","mb")}`,children:[n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:C,"aria-label":"Previous month",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[uu[x.getMonth()]," ",x.getFullYear()]}),n.jsx(Q,{variant:"iconOnly",size:"sm",onClick:A,"aria-label":"Next month",children:n.jsx(yt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")} ${m("sm","mb")}`,children:du.map(T=>n.jsx("div",{role:"columnheader",className:`text-center text-xs font-medium text-fg-tertiary ${m("xs","py")}`,children:T},T))}),D.map((T,R)=>n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")}`,children:T.map((_,V)=>{if(!_)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${R}-${V}`);const B=u==="single"?vt(_,i):vt(_,(c==null?void 0:c.start)||null)||vt(_,(c==null?void 0:c.end)||null),X=u==="range"&&c?cu(_,c.start,c.end):!1,Z=Wn(_,p,b,g),oe=vt(_,new Date),H=vt(_,h),P=vt(_,N);return n.jsx("button",{role:"gridcell",type:"button","data-date":_.toISOString(),tabIndex:P?0:-1,onClick:()=>I(_),onKeyDown:Y=>L(Y,_),className:`
|
|
6
|
+
<%s key={someKey} {...props} />`,se,ee,J,ee),H[ee+se]=!0)}if(ee=null,re!==void 0&&(r(re),ee=""+re),i(K)&&(r(K.key),ee=""+K.key),"key"in K){re={};for(var Q in K)Q!=="key"&&(re[Q]=K[Q])}else re=K;return ee&&c(re,typeof O=="function"?O.displayName||O.name||"Unknown":O),d(O,ee,re,a(),ce,Z)}function b(O){p(O)?O._store&&(O._store.validated=1):typeof O=="object"&&O!==null&&O.$$typeof===A&&(O._payload.status==="fulfilled"?p(O._payload.value)&&O._payload.value._store&&(O._payload.value._store.validated=1):O._store&&(O._store.validated=1))}function p(O){return typeof O=="object"&&O!==null&&O.$$typeof===h}var g=l,h=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),$=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),I=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,F=Array.isArray,P=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(O){return O()}};var z,B={},U=g.react_stack_bottom_frame.bind(g,o)(),oe=P(s(o)),H={};Ht.Fragment=w,Ht.jsx=function(O,K,re){var se=1e4>I.recentlyCreatedOwnerStacks++;return f(O,K,re,!1,se?Error("react-stack-top-frame"):U,se?P(s(O)):oe)},Ht.jsxs=function(O,K,re){var se=1e4>I.recentlyCreatedOwnerStacks++;return f(O,K,re,!0,se?Error("react-stack-top-frame"):U,se?P(s(O)):oe)}})()),Ht}var _n;function Ol(){return _n||(_n=1,process.env.NODE_ENV==="production"?lr.exports=Ll():lr.exports=Pl()),lr.exports}var n=Ol();const Sa=l.createContext(void 0);function $a({children:e,defaultTheme:t="light",storageKey:r="theme"}){const[s,a]=l.useState(()=>{if(typeof window=="undefined")return t;try{const d=localStorage.getItem(r);if(d==="light"||d==="dark")return d}catch(d){console.warn("Failed to read theme from localStorage:",d)}return t});l.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(r,s)}catch(d){console.warn("Failed to save theme to localStorage:",d)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,r]);const u={theme:s,toggleTheme:()=>{a(d=>d==="light"?"dark":"light")},setTheme:d=>{a(d)},colors:s==="light"?qt:jr,isDark:s==="dark"};return n.jsx(Sa.Provider,{value:u,children:e})}function zl(){const e=l.useContext(Sa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}const Vl={breakpoints:Nr,spacing:kr,typography:St,animations:Al,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},Ca=l.createContext(void 0);function Ea({children:e,config:t,strategy:r="default"}){const s=l.useMemo(()=>{const d=M({},Vl);return t?L(M(M({},d),t),{breakpoints:t.breakpoints||d.breakpoints,spacing:t.spacing||d.spacing,typography:t.typography||d.typography,animations:t.animations||d.animations,features:M(M({},d.features),t.features),behavior:M(M({},d.behavior),t.behavior)}):d},[t]);l.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),l.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const a=l.useMemo(()=>d=>s.spacing[d],[s.spacing]),o=l.useMemo(()=>d=>s.breakpoints[d],[s.breakpoints]),i=l.useMemo(()=>d=>{var f;return(f=s.features[d])!=null?f:!1},[s.features]),c=l.useMemo(()=>d=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),u={config:s,getSpacing:a,getBreakpoint:o,isFeatureEnabled:i,updateConfig:c};return n.jsx(Ca.Provider,{value:u,children:e})}function Wl(){const e=l.useContext(Ca);if(e===void 0)throw new Error("useConfig must be used within a ConfigProvider");return e}const Sr=l.createContext(void 0);function js(){const e=l.useContext(Sr);if(!e)throw new Error("Toast components must be used within a ToastProvider");return e}function Hl(){return l.useContext(Sr)}function Ta({children:e,defaultDuration:t=5e3,maxToasts:r=5}){const[s,a]=l.useState([]),o=l.useCallback(d=>{var p;const f=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,b=L(M({},d),{id:f,duration:(p=d.duration)!=null?p:t});return a(g=>[b,...g].slice(0,r)),f},[t,r]),i=l.useCallback(d=>{a(f=>f.filter(b=>b.id!==d))},[]),c=l.useCallback(()=>{a([])},[]),u={toasts:s,addToast:o,removeToast:i,clearAll:c};return n.jsx(Sr.Provider,{value:u,children:e})}const $r=l.createContext(void 0);function Ct(){const e=l.useContext($r);if(!e)throw new Error("Dialog components must be used within a Dialog component");return e}function Bl(){return l.useContext($r)}function Xt(e){const t=l.useRef(null),r=l.useRef(null);l.useEffect(()=>{var s;if(e)return r.current!==null&&(clearTimeout(r.current),r.current=null),t.current=(s=document.activeElement)!=null?s:null,()=>{const a=t.current;r.current=setTimeout(()=>{a==null||a.focus(),r.current=null},0)}},[e])}function Ns({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,titleId:a,descriptionId:o}){const[i,c]=l.useState(r),[u,d]=l.useState(0),[f,b]=l.useState(0),p=l.useCallback(()=>(d(x=>x+1),()=>d(x=>x-1)),[]),g=l.useCallback(()=>(b(x=>x+1),()=>b(x=>x-1)),[]),h=t!==void 0?t:i,k=x=>{t===void 0&&c(x),s==null||s(x)};Xt(h),l.useEffect(()=>(h?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[h]);const w={isOpen:h,onOpenChange:k,onClose:()=>k(!1),titleId:a,descriptionId:o,hasTitle:u>0,hasDescription:f>0,registerTitle:p,registerDescription:g};return n.jsx($r.Provider,{value:w,children:e})}const Ul={ThemeProvider:$a,ConfigProvider:Ea,ToastProvider:Ta,DialogProvider:Ns},cr=Ul;function Gl(e,t){const{theme:r,config:s,toast:a,dialog:o,providers:i={theme:!0,config:!0,toast:!0,dialog:!0}}=t||{};let c=e;return i.dialog&&(c=n.jsx(cr.DialogProvider,L(M({},o),{children:c}))),i.toast&&(c=n.jsx(cr.ToastProvider,L(M({},a),{children:c}))),i.config&&(c=n.jsx(cr.ConfigProvider,L(M({},s),{children:c}))),i.theme&&(c=n.jsx(cr.ThemeProvider,L(M({},r),{children:c}))),c}function Kl({children:e,config:t}){const r=l.useMemo(()=>Gl(e,t),[e,t]);return n.jsx(n.Fragment,{children:r})}function Yl(){return{}}class st{static create(t){const s={none:{px:0,tailwind:"rounded-none",description:"No border radius"},sm:{px:2,tailwind:"rounded-sm",description:"Small radius (2px) for subtle rounding"},md:{px:6,tailwind:"rounded-md",description:"Medium radius (6px) for buttons and inputs"},lg:{px:8,tailwind:"rounded-lg",description:"Large radius (8px) for cards and containers"},xl:{px:12,tailwind:"rounded-xl",description:"Extra large radius (12px) for prominent elements"},"2xl":{px:16,tailwind:"rounded-2xl",description:"2X large radius (16px) for large containers"},"3xl":{px:24,tailwind:"rounded-3xl",description:"3X large radius (24px) for very large containers"},full:{px:9999,tailwind:"rounded-full",description:"Full radius for circular elements"}}[t];return{value:s.px,rem:`${s.px/16}rem`,px:`${s.px}px`,tailwind:s.tailwind,description:s.description}}}const ql={none:st.create("none"),sm:st.create("sm"),md:st.create("md"),lg:st.create("lg"),xl:st.create("xl"),"2xl":st.create("2xl"),"3xl":st.create("3xl"),full:st.create("full")};function G(e){return ql[e].tailwind}function Xl(s){var a=s,{variant:e="info",className:t}=a,r=W(a,["variant","className"]);const o={warning:y("bg-warning-bg","text-warning-dark","border-warning"),error:y("bg-error-bg","text-error-dark","border-error"),info:y("bg-info-bg","text-info-dark","border-info")};return n.jsx("div",M({role:"alert",className:y("border",m("base","px"),m("sm","py"),G("lg"),o[e],t)},r))}const Jl={primary:{light:"text-indigo-400",DEFAULT:"text-fg-brand",dark:"text-indigo-600",contrast:"text-fg-inverse"},secondary:{light:"text-pink-300",DEFAULT:"text-fg-brand-secondary",dark:"text-pink-600",contrast:"text-fg-inverse"},success:{light:"text-green-300",DEFAULT:"text-fg-success",dark:"text-success-dark",contrast:"text-fg-inverse"},warning:{light:"text-yellow-300",DEFAULT:"text-fg-warning",dark:"text-warning-dark",contrast:"text-fg-inverse"},error:{light:"text-red-300",DEFAULT:"text-fg-error",dark:"text-error-dark",contrast:"text-fg-inverse"},info:{light:"text-blue-300",DEFAULT:"text-fg-info",dark:"text-info-dark",contrast:"text-fg-inverse"},neutral:{light:"text-fg-tertiary",DEFAULT:"text-fg-secondary",dark:"text-fg-primary",contrast:"text-fg-inverse"}};function Zl(d,u){var f=d,{variant:e="paragraph",bold:t,italic:r,className:s,as:a,colorRole:o="neutral",colorShade:i="dark"}=f,c=W(f,["variant","bold","italic","className","as","colorRole","colorShade"]);const b=[];let p;if(a)p=a;else switch(e){case"heading":p="h2";break;case"list":p="li";break;default:p="p";break}return e==="heading"?b.push(pe("h2")):e==="body"||e==="paragraph"?b.push(pe("body")):e==="bodySmall"?b.push(pe("bodySmall")):e==="bodyLarge"?b.push(pe("bodyLarge")):e==="caption"?b.push(pe("caption")):e==="label"?b.push(pe("label")):b.push(pe("body")),t&&b.push("font-bold"),r&&b.push("italic"),b.push(Jl[o][i]),n.jsx(p,M({ref:u,className:y(...b,s)},c))}const Ee=l.forwardRef(Zl);const Ma=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Ql=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const ec=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const Ln=e=>{const t=ec(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ts={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const tc=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},rc=l.createContext({}),sc=()=>l.useContext(rc),nc=l.forwardRef((d,u)=>{var f=d,{color:e,size:t,strokeWidth:r,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i}=f,c=W(f,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);var x,v,N;const{size:b=24,strokeWidth:p=2,absoluteStrokeWidth:g=!1,color:h="currentColor",className:k=""}=(x=sc())!=null?x:{},w=(s!=null?s:g)?Number(r!=null?r:p)*24/Number(t!=null?t:b):r!=null?r:p;return l.createElement("svg",M(M(L(M({ref:u},ts),{width:(v=t!=null?t:b)!=null?v:ts.width,height:(N=t!=null?t:b)!=null?N:ts.height,stroke:e!=null?e:h,strokeWidth:w,className:Ma("lucide",k,a)}),!o&&!tc(c)&&{"aria-hidden":"true"}),c),[...i.map(([$,C])=>l.createElement($,C)),...Array.isArray(o)?o:[o]])});const ue=(e,t)=>{const r=l.forwardRef((i,o)=>{var c=i,{className:s}=c,a=W(c,["className"]);return l.createElement(nc,M({ref:o,iconNode:t,className:Ma(`lucide-${Ql(Ln(e))}`,`lucide-${e}`,s)},a))});return r.displayName=Ln(e),r};const ac=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],oc=ue("calendar",ac);const ic=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Aa=ue("check",ic);const lc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Cr=ue("chevron-down",lc);const cc=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Yt=ue("chevron-left",cc);const dc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Nt=ue("chevron-right",dc);const uc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Er=ue("circle-alert",uc);const fc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],br=ue("circle-check",fc);const mc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],pc=ue("clock",mc);const bc=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],gc=ue("command",bc);const hc=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],xc=ue("download",hc);const vc=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],yc=ue("ellipsis-vertical",vc);const wc=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],kc=ue("eye-off",wc);const jc=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Nc=ue("eye",jc);const Sc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],$c=ue("file",Sc);const Cc=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Ec=ue("funnel",Cc);const Tc=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Mc=ue("grip-vertical",Tc);const Ac=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ic=ue("info",Ac);const Rc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ia=ue("loader-circle",Rc);const Dc=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Fc=ue("menu",Dc);const _c=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Lc=ue("panel-left-close",_c);const Pc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Oc=ue("panel-left-open",Pc);const zc=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ms=ue("search",zc);const Vc=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],At=ue("star",Vc);const Wc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Hc=ue("triangle-alert",Wc);const Bc=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Uc=ue("upload",Bc);const Gc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Te=ue("x",Gc);function Pn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kc(...e){return t=>{let r=!1;const s=e.map(a=>{const o=Pn(a,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let a=0;a<s.length;a++){const o=s[a];typeof o=="function"?o():Pn(e[a],null)}}}}function Yc(...e){return Ce.useCallback(Kc(...e),e)}function qc(e){const t=Ce.forwardRef((r,s)=>{var g;let p=r,{children:a}=p,o=W(p,["children"]),i=null,c=!1;const u=[];On(a)&&typeof dr=="function"&&(a=dr(a._payload)),Ce.Children.forEach(a,h=>{var k;if(td(h)){c=!0;const w=h;let x="child"in w.props?w.props.child:w.props.children;On(x)&&typeof dr=="function"&&(x=dr(x._payload)),i=Zc(w,x),u.push((k=i==null?void 0:i.props)==null?void 0:k.children)}else u.push(h)}),i?i=Ce.cloneElement(i,void 0,u):!c&&Ce.Children.count(a)===1&&Ce.isValidElement(a)&&(i=a);const d=i?ed(i):void 0,f=Yc(s,d);if(!i){if(a||a===0)throw new Error(c?ad(e):nd(e));return a}const b=Qc(o,(g=i.props)!=null?g:{});return i.type!==Ce.Fragment&&(b.ref=s?f:d),Ce.cloneElement(i,b)});return t.displayName=`${e}.Slot`,t}var Ra=qc("Slot"),Da=Symbol.for("radix.slottable");function Xc(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=Da,t}var Jc=Xc("Slottable"),Zc=(e,t)=>{if("child"in e.props){const r=e.props.child;return Ce.isValidElement(r)?Ce.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Ce.isValidElement(t)?t:null};function Qc(e,t){const r=M({},t);for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?r[s]=(...c)=>{const u=o(...c);return a(...c),u}:a&&(r[s]=a):s==="style"?r[s]=M(M({},a),o):s==="className"&&(r[s]=[a,o].filter(Boolean).join(" "))}return M(M({},e),r)}function ed(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function td(e){return Ce.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Da}var rd=Symbol.for("react.lazy");function On(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rd&&"_payload"in e&&sd(e._payload)}function sd(e){return typeof e=="object"&&e!==null&&"then"in e}var nd=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,ad=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,dr=Ce[" use ".trim().toString()];const od=ge("motion-safe:animate-spin",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-8 w-8"},variant:{primary:"text-fg-brand",secondary:"text-fg-brand-secondary",neutral:"text-fg-secondary"}},defaultVariants:{size:"md",variant:"primary"}}),Ss=l.memo(function(i){var c=i,{size:t="md",variant:r="primary",label:s,className:a=""}=c,o=W(c,["size","variant","label","className"]);return n.jsxs("div",L(M({className:y("inline-flex","items-center",a),role:"status","aria-label":s||"Loading","aria-live":"polite"},o),{children:[n.jsx(Ia,{className:y(od({size:t,variant:r})),"aria-hidden":"true"}),s&&n.jsx("span",{className:y(m("sm","ml"),ae("bodySmall"),"text-fg-secondary","sr-only"),children:s})]}))});Ss.displayName="Spinner";const id=ge(y("inline-flex","items-center","justify-center",pe("button").split(" ")[2]||"font-medium",G("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{primary:y("bg-surface-brand-strong","text-fg-inverse","hover:opacity-90","focus:ring-line-brand"),secondary:y("bg-surface-secondary","text-fg-inverse","hover:opacity-90","focus:ring-line-secondary"),error:y("bg-error","text-fg-inverse","hover:opacity-90","focus:ring-error"),outline:y("border-2","border-line-default","bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),ghost:y("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus"),iconOnly:y("bg-transparent","text-fg-primary","hover:bg-surface-hover","focus:ring-line-focus",m("none","p")),link:y("bg-transparent","text-fg-brand","underline-offset-4","hover:underline","focus:ring-line-focus")},size:{sm:y(m("md","px"),m("1.5","py"),ae("bodySmall"),m("1.5","gap")),md:y(m("base","px"),m("sm","py"),ae("body"),m("sm","gap")),lg:y(m("lg","px"),m("md","py"),ae("bodyLarge"),m("2.5","gap"))}},compoundVariants:[{variant:"iconOnly",size:"sm",class:y("h-8","w-8",m("none","p"))},{variant:"iconOnly",size:"md",class:y("h-10","w-10",m("none","p"))},{variant:"iconOnly",size:"lg",class:y("h-12","w-12",m("none","p"))},{variant:"link",size:"sm",class:y(m("none","px"),m("none","py"))},{variant:"link",size:"md",class:y(m("none","px"),m("none","py"))},{variant:"link",size:"lg",class:y(m("none","px"),m("none","py"))}],defaultVariants:{variant:"primary",size:"md"}});function ur({children:e,position:t}){return e?n.jsx("span",{className:`inline-flex items-center ${t==="left"?m("none","mr"):m("none","ml")}`,children:e}):null}const te=l.memo(l.forwardRef(function(x,w){var v=x,{variant:t="primary",size:r="md",isLoading:s=!1,loadingText:a,loadingIcon:o,leftIcon:i,rightIcon:c,fullWidth:u=!1,asChild:d=!1,as:f,className:b="",disabled:p=!1,children:g,"aria-label":h}=v,k=W(v,["variant","size","isLoading","loadingText","loadingIcon","leftIcon","rightIcon","fullWidth","asChild","as","className","disabled","children","aria-label"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&d&&f!==void 0&&f!=="button"&&console.warn("[Button] `as` is ignored when `asChild` is true; the child element is used as the root. Drop one of the two props to silence this warning.");const N=d?Ra:f!=null?f:"button",$=l.useMemo(()=>y(id({variant:t,size:r}),u&&"w-full",b),[t,r,u,b]),C=l.useMemo(()=>t==="iconOnly"||!g&&(i||c),[t,g,i,c]),j=l.useMemo(()=>C&&!h&&!g?"Button":h,[C,h,g]),E=l.useMemo(()=>t==="error"?"primary":t==="primary"||t==="secondary"?"neutral":"primary",[t]),S=l.useMemo(()=>r==="sm"?"sm":r==="lg"?"lg":"md",[r]),A=l.useMemo(()=>o||n.jsx(Ss,{size:S,variant:E}),[o,S,E]),_=!d&&(f===void 0||f==="button")&&!k.type?"button":void 0,R=M(M({className:$,disabled:p||s,"aria-busy":s,"aria-label":j,"aria-disabled":p||s},_?{type:_}:{}),k);return d?n.jsxs(N,L(M({ref:w},R),{children:[i&&n.jsx(ur,{position:"left",children:i}),n.jsx(Jc,{children:g}),c&&n.jsx(ur,{position:"right",children:c})]})):n.jsx(N,L(M({ref:w},R),{children:s?n.jsxs(n.Fragment,{children:[A,a&&n.jsx("span",{className:m("sm","ml"),children:a}),!a&&g&&n.jsx("span",{className:`${m("sm","ml")} opacity-0`,children:g})]}):n.jsxs(n.Fragment,{children:[i&&n.jsx(ur,{position:"left",children:i}),g,c&&n.jsx(ur,{position:"right",children:c})]})}))}));te.displayName="Button";const ld=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>y(m("xs","mt"),pe("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Me=l.memo(l.forwardRef(function(N,v){var $=N,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,size:i="md",variant:c="outlined",leftIcon:u,rightIcon:d,showClearButton:f=!1,onClear:b,className:p="",disabled:g=!1,type:h="text",value:k,onChange:w}=$,x=W($,["id","label","error","success","helperText","size","variant","leftIcon","rightIcon","showClearButton","onClear","className","disabled","type","value","onChange"]);const C=l.useId(),j=t||`input-${C}`,E=l.useMemo(()=>s?`${j}-error`:void 0,[s,j]),S=l.useMemo(()=>o?`${j}-helper`:void 0,[o,j]),[A,_]=l.useState(!1),R=l.useMemo(()=>h==="password",[h]),I=l.useMemo(()=>R&&A?"text":h,[R,A,h]),D=l.useMemo(()=>s?"error":a?"success":"default",[s,a]),F=l.useMemo(()=>k!=null&&k!=="",[k]),P=l.useMemo(()=>f&&F&&!g,[f,F,g]),z=l.useMemo(()=>"focus:border-line-focus",[]),B=l.useMemo(()=>"focus:border-error",[]),U=l.useMemo(()=>"focus:border-success",[]),oe=l.useMemo(()=>z.replace("focus:border-","focus:ring-"),[z]),H=l.useCallback(J=>J==="error"?B.replace("focus:border-","focus:ring-"):U.replace("focus:border-","focus:ring-"),[B,U]),O=l.useMemo(()=>ge(y("w-full",G("md"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{variant:{default:y("border-0","border-b-2","border-line-default","focus:border-line-focus"),outlined:y("border","border-line-default","focus:border-line-focus"),filled:y("bg-surface-muted","border-0","focus:bg-surface-base","focus:ring-2",oe)},size:{sm:y("h-8",ae("bodySmall"),m("md","px")),md:y("h-10",ae("body"),m("base","px")),lg:y("h-12",ae("bodyLarge"),m("lg","px"))},state:{default:"",error:y("border-error","focus:border-error",H("error")),success:y("border-success","focus:border-success",H("success"))}},defaultVariants:{variant:"outlined",size:"md",state:"default"}}),[oe,H]),K=l.useMemo(()=>y(O({variant:c,size:i,state:D}),u&&(i==="sm"?"pl-9":m(i==="lg"?"3xl":"2xl","pl")),(d||P||R)&&(i==="sm"?"pr-9":m(i==="lg"?"3xl":"2xl","pr")),p),[O,c,i,D,u,d,P,R,p]),re=l.useMemo(()=>y("block",pe("label"),m("xs","mb"),g&&"opacity-50"),[g]),se=l.useMemo(()=>i==="sm"?"h-4 w-4":i==="lg"?"h-5 w-5":"h-4 w-4",[i]),ce=l.useMemo(()=>i==="sm"?"top-2":i==="lg"?"top-3.5":"top-2.5",[i]),Z=l.useCallback(J=>{var Q;if(J.stopPropagation(),b)b();else if(w){const V=(Q=J.currentTarget.closest(".relative"))==null?void 0:Q.querySelector("input");if(V){const Y={target:V,currentTarget:V,bubbles:!0,cancelable:!0,defaultPrevented:!1,eventPhase:2,isTrusted:!1,nativeEvent:new Event("change"),preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},timeStamp:Date.now()};Object.defineProperty(Y.target,"value",{value:"",writable:!0}),Object.defineProperty(Y.currentTarget,"value",{value:"",writable:!0}),w(Y)}}},[b,w]),ee=l.useCallback(()=>{_(J=>!J)},[]);return n.jsxs("div",{className:"w-full",children:[r&&n.jsx("label",{htmlFor:j,className:re,children:r}),n.jsxs("div",{className:"relative",children:[u&&n.jsx("div",{className:`absolute left-3 ${ce} text-fg-secondary opacity-60 pointer-events-none`,children:n.jsx("div",{className:se,children:u})}),n.jsx("input",M({id:j,ref:v,type:I,className:K,disabled:g,value:k,onChange:w,"aria-invalid":s,"aria-required":x.required,"aria-describedby":E||S,suppressHydrationWarning:!0},x)),n.jsxs("div",{className:`absolute right-3 top-0 bottom-0 flex items-center ${m("xs","gap")}`,children:[P&&n.jsx(te,{variant:"ghost",size:"sm",onClick:Z,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear input",children:n.jsx(Te,{className:se})}),R&&n.jsx(te,{variant:"ghost",size:"sm",onClick:ee,className:`h-auto ${m("xs","p")}`,"aria-label":A?"Hide password":"Show password",children:A?n.jsx(kc,{className:se}):n.jsx(Nc,{className:se})}),d&&!P&&!R&&n.jsx("div",{className:`text-fg-secondary opacity-60 pointer-events-none ${se}`,children:d})]})]}),(s||a||o)&&n.jsx(ld,{error:s,success:a,helperText:o,errorId:E,helperId:S})]})}));Me.displayName="Input";function Fa({href:e,active:t}){return{isActive:l.useMemo(()=>t!==void 0?t:!1,[t]),NextLink:void 0}}const cd=ge(y("inline-flex","items-center","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","disabled:pointer-events-none","no-underline"),{variants:{variant:{default:y("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","focus:ring-line-brand"),underline:y("text-fg-primary","hover:opacity-80","focus-visible:opacity-100","border-b-2","border-transparent","hover:border-current","focus:ring-line-brand"),background:y("text-fg-primary","hover:bg-surface-hover",G("md"),"focus:ring-line-brand")},size:{sm:y(m("sm","px"),m("xs","py"),ae("bodySmall")),md:y(m("base","px"),m("sm","py"),ae("body")),lg:y(m("lg","px"),m("md","py"),ae("bodyLarge"))}},defaultVariants:{variant:"default",size:"md"},compoundVariants:[{variant:"underline",size:"sm",class:m("0.5","pb")},{variant:"underline",size:"md",class:m("xs","pb")},{variant:"underline",size:"lg",class:m("1.5","pb")},{variant:"background",size:"sm",class:m("xs","px")},{variant:"background",size:"md",class:m("sm","px")},{variant:"background",size:"lg",class:m("base","px")}]}),Tr=l.forwardRef(function(h,g){var k=h,{href:t,children:r,active:s,disabled:a=!1,variant:o="default",size:i="md",as:c,className:u,"aria-label":d,onClick:f,onKeyDown:b}=k,p=W(k,["href","children","active","disabled","variant","size","as","className","aria-label","onClick","onKeyDown"]);const w=l.useMemo(()=>s!==void 0?s:!1,[s]),{NextLink:x}=Fa({href:t,active:w}),v=c||x||"a",N=l.useMemo(()=>{if(!w)return"";switch(o){case"underline":return y("border-b-2","border-line-brand","text-fg-brand-emphasis");case"background":return y("bg-surface-brand-muted","text-fg-brand-emphasis");default:return y("text-fg-brand-emphasis","font-semibold")}},[w,o]),$=l.useCallback(E=>{if(a){E.preventDefault(),E.stopPropagation();return}f==null||f(E)},[a,f]),C=l.useCallback(E=>{if(a){(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation());return}b==null||b(E)},[a,b]),j=l.useMemo(()=>{const E=M({className:y(cd({variant:o,size:i}),N,a&&"opacity-50 cursor-not-allowed pointer-events-none",u),"aria-current":w?"page":void 0,"aria-disabled":a?!0:void 0,"aria-label":d,tabIndex:a?-1:void 0,onClick:$,onKeyDown:C,"data-active":w,"data-disabled":a},p);return x&&!c?L(M({},E),{href:a?void 0:t}):L(M({},E),{href:a?void 0:t})},[o,i,N,a,u,w,d,$,C,t,x,c,p]);return n.jsx(v,L(M({ref:g},j),{children:r}))});Tr.displayName="NavLink";const dd=ge(y("inline-flex","items-center","justify-center",Le("label"),G("md"),"border"),{variants:{variant:{success:"",warning:"",error:"",info:"",neutral:"",primary:"",secondary:""},size:{sm:y(m("1.5","px"),m("0.5","py"),ae("caption")),md:y(m("sm","px"),m("xs","py"),ae("caption")),lg:y(m("sm","px"),m("xs","py"),ae("bodySmall"))},style:{solid:"",outline:""}},compoundVariants:[{variant:"success",style:"solid",class:y("bg-success-bg","text-success-dark","border-success")},{variant:"warning",style:"solid",class:y("bg-warning-bg","text-warning-dark","border-warning")},{variant:"error",style:"solid",class:y("bg-error-bg","text-error-dark","border-error")},{variant:"info",style:"solid",class:y("bg-info-bg","text-info-dark","border-info")},{variant:"neutral",style:"solid",class:y("bg-surface-muted","text-fg-primary","border-line-default")},{variant:"primary",style:"solid",class:y("bg-surface-brand-subtle","text-fg-brand-emphasis","border-line-brand")},{variant:"secondary",style:"solid",class:y("bg-pink-300","text-fg-brand-secondary-emphasis","border-line-secondary")},{variant:"success",style:"outline",class:y("bg-transparent","border-success","text-fg-success")},{variant:"warning",style:"outline",class:y("bg-transparent","border-warning","text-fg-warning")},{variant:"error",style:"outline",class:y("bg-transparent","border-error","text-fg-error")},{variant:"info",style:"outline",class:y("bg-transparent","border-info","text-fg-info")},{variant:"neutral",style:"outline",class:y("bg-transparent","border-line-default","text-fg-secondary")},{variant:"primary",style:"outline",class:y("bg-transparent","border-line-brand","text-fg-brand")},{variant:"secondary",style:"outline",class:y("bg-transparent","border-line-secondary","text-fg-brand-secondary")}],defaultVariants:{variant:"neutral",size:"md",style:"solid"}}),_a=l.memo(l.forwardRef(function(d,u){var f=d,{variant:t="neutral",size:r="md",style:s="solid",className:a="",children:o,"aria-label":i}=f,c=W(f,["variant","size","style","className","children","aria-label"]);const b=y(dd({variant:t,size:r,style:s}),a);let p;if(i)p=i;else if(typeof o=="string")p=o;else if(typeof o=="object"&&o!==null&&"props"in o){const g=o.props;g!=null&&g.children&&typeof g.children=="string"&&(p=g.children)}return n.jsx("span",L(M({ref:u,role:"status","aria-label":p,className:b},c),{children:o}))}));_a.displayName="Badge";const ud=l.memo(function({error:t,success:r,helperText:s,errorId:a,helperId:o}){const i=l.useMemo(()=>y(m("xs","mt"),pe("caption"),t&&"text-fg-error",r&&"text-fg-success",!t&&!r&&"text-fg-secondary"),[t,r]),c=l.useMemo(()=>s||(t?"Error":r?"Success":""),[s,t,r]);return n.jsx("div",{id:a||o,className:i,role:t||r?"alert":void 0,children:c})}),Mr=l.memo(l.forwardRef(function(h,g){var k=h,{options:t=[],optionGroups:r,placeholder:s,label:a,error:o=!1,success:i=!1,helperText:c,size:u="md",className:d="",disabled:f=!1,id:b}=k,p=W(k,["options","optionGroups","placeholder","label","error","success","helperText","size","className","disabled","id"]);const w=l.useId(),x=b||`select-${w}`,v=l.useMemo(()=>o?`${x}-error`:void 0,[o,x]),N=l.useMemo(()=>c?`${x}-helper`:void 0,[c,x]),$=l.useMemo(()=>"focus:border-line-focus",[]),C=l.useMemo(()=>"focus:border-error",[]),j=l.useMemo(()=>"focus:border-success",[]),E=l.useCallback(I=>I==="error"?C.replace("focus:border-","focus:ring-"):I==="success"?j.replace("focus:border-","focus:ring-"):$.replace("focus:border-","focus:ring-"),[C,j,$]),S=l.useMemo(()=>ge(y("block","w-full",G("md"),"border","bg-surface-base","transition-colors","focus:outline-none","focus:ring-2","focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed"),{variants:{size:{sm:y("h-8",ae("bodySmall"),m("md","px")),md:y("h-10",ae("body"),m("base","px")),lg:y("h-12",ae("bodyLarge"),m("lg","px"))},state:{default:y("border-line-default",E()),error:y("border-error",E("error")),success:y("border-success",E("success"))}},defaultVariants:{size:"md",state:"default"}}),[E]),A=l.useMemo(()=>o?"error":i?"success":"default",[o,i]),_=l.useMemo(()=>y(S({size:u,state:A}),d),[S,u,A,d]),R=l.useMemo(()=>y("block",pe("label"),m("xs","mb"),f&&"opacity-50"),[f]);return n.jsxs("div",{className:"w-full",children:[a&&n.jsx("label",{htmlFor:x,className:R,children:a}),n.jsxs("select",L(M({id:x,ref:g,className:_,disabled:f,"aria-invalid":o,"aria-required":p.required,"aria-describedby":v||N},p),{children:[s&&n.jsx("option",{value:"",disabled:!0,children:s}),r&&r.length>0?r.map((I,D)=>n.jsx("optgroup",{label:I.label,children:(I.options||[]).map(F=>n.jsx("option",{value:F.value,disabled:F.disabled,children:F.label},F.value))},D)):(t||[]).map(I=>n.jsx("option",{value:I.value,disabled:I.disabled,children:I.label},I.value))]})),(o||i||c)&&n.jsx(ud,{error:o,success:i,helperText:c,errorId:v,helperId:N})]})}));Mr.displayName="Select";const La=l.memo(l.forwardRef(function(f,d){var b=f,{error:t=!1,success:r=!1,resize:s="vertical",className:a="",label:o,helperText:i,id:c}=b,u=W(b,["error","success","resize","className","label","helperText","id"]);const p=l.useId(),g=c!=null?c:p,h=l.useMemo(()=>"focus:border-line-focus",[]),k=l.useMemo(()=>"focus:border-error",[]),w=l.useMemo(()=>t?k.replace("focus:border-","focus:ring-"):h.replace("focus:border-","focus:ring-"),[t,k,h]),x=l.useMemo(()=>({none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"}),[]),v=l.useMemo(()=>y("block","w-full",G("md"),m("base","px"),m("md","py"),"border",ae("body"),"focus:outline-none","focus:ring-2","focus:ring-offset-2",x[s],y(t?"border-error":r?"border-success":"border-line-default",w),a),[s,x,t,r,w,a]),N=l.useMemo(()=>i?`${g}-helper`:void 0,[i,g]),$=l.useMemo(()=>N!=null?N:t?`${g}-error`:void 0,[N,t,g]),C=u["aria-label"],j=u["aria-labelledby"];l.useEffect(()=>{},[o,C,j,g]);const E=n.jsx("textarea",M({ref:d,id:g,className:v,"aria-invalid":t,"aria-describedby":$},u)),S=i?n.jsx("p",{id:N,className:y(m("xs","mt"),ae("bodySmall"),t?"text-fg-error":r?"text-fg-success":"text-fg-secondary"),children:i}):null;return!o&&!S?E:n.jsxs("div",{className:"block w-full",children:[o&&n.jsx("label",{htmlFor:g,className:y("block",m("xs","mb"),ae("label"),"font-medium","text-fg-primary"),children:o}),E,S]})}));La.displayName="Textarea";const fd=y("block",ae("label"),Le("label"),"text-fg-primary"),md={default:"",required:y("after:content-['*']",`after:${m("0.5","ml")}`,"after:text-fg-error"),optional:y("after:content-['(optional)']",`after:${m("xs","ml")}`,"after:text-fg-tertiary","after:font-normal")},Lt=l.memo(l.forwardRef(function(i,o){var c=i,{variant:t="default",className:r="",children:s}=c,a=W(c,["variant","className","children"]);const u=y(fd,md[t],r);return n.jsx("label",L(M({ref:o,className:u},a),{children:s}))}));Lt.displayName="Label";function Pa(a){var o=a,{message:e,id:t,className:r=""}=o,s=W(o,["message","id","className"]);const i=[m("xs","mt"),ae("bodySmall"),"text-fg-error","flex","items-center",m("xs","gap")],c=y(...i,r);return n.jsxs("div",L(M({role:"alert",id:t,className:c,"aria-live":"polite"},s),{children:[n.jsx(Er,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:e})]}))}class We{static createWidth(t){const s={none:{px:0,tailwind:"border-0"},thin:{px:1,tailwind:"border"},base:{px:1,tailwind:"border"},medium:{px:2,tailwind:"border-2"},thick:{px:4,tailwind:"border-4"}}[t];return{value:s.px,px:`${s.px}px`,tailwind:s.tailwind}}static create(t,r="solid"){return{width:this.createWidth(t),style:r,description:`${t} ${r} border`}}}We.create("none"),We.create("thin"),We.create("base"),We.create("medium"),We.create("thick"),We.create("thin","dashed"),We.create("base","dashed"),We.create("thin","dotted"),We.create("base","dotted");function pd(e){return We.createWidth(e).tailwind}class kt{static create(t){return{none:{value:"none",tailwind:"shadow-none",description:"No shadow"},sm:{value:"0 1px 2px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-sm",description:"Small shadow for subtle elevation"},md:{value:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",tailwind:"shadow-md",description:"Medium shadow for cards and elevated elements"},lg:{value:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",tailwind:"shadow-lg",description:"Large shadow for modals and dropdowns"},xl:{value:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",tailwind:"shadow-xl",description:"Extra large shadow for prominent modals"},"2xl":{value:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",tailwind:"shadow-2xl",description:"2X large shadow for maximum elevation"},inner:{value:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",tailwind:"shadow-inner",description:"Inner shadow for inset elements"}}[t]}}const bd={none:kt.create("none"),sm:kt.create("sm"),md:kt.create("md"),lg:kt.create("lg"),xl:kt.create("xl"),"2xl":kt.create("2xl"),inner:kt.create("inner")};function be(e){return bd[e].tailwind}const Pt=l.forwardRef(function(f,d){var b=f,{content:t,children:r,position:s="top",delay:a=200,className:o="","aria-label":i,preservePositioning:c=!1}=b,u=W(b,["content","children","position","delay","className","aria-label","preservePositioning"]);const[p,g]=l.useState(!1),h=l.useRef(null),k=l.useRef(null),w=l.useRef(null),x=`tooltip-${l.useId()}`,v=()=>{const I=setTimeout(()=>{g(!0)},a);h.current=I},N=()=>{h.current&&(clearTimeout(h.current),h.current=null),g(!1)},$=()=>{g(!0)},C=()=>{g(!1)},j=I=>{var D;I.key==="Escape"&&(g(!1),(D=w.current)==null||D.blur())};l.useEffect(()=>()=>{h.current&&(clearTimeout(h.current),h.current=null)},[]),l.useEffect(()=>{if(!p)return;const I=D=>{k.current&&!k.current.contains(D.target)&&w.current&&!w.current.contains(D.target)&&g(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[p]);const E=I=>({top:"border-t-surface-inverse",bottom:"border-b-surface-inverse",left:"border-l-surface-inverse",right:"border-r-surface-inverse"})[I],S=ge(y("absolute",xe("tooltip"),m("sm","px"),m("xs","py"),ae("caption"),"text-fg-inverse","bg-surface-inverse",G("md"),be("lg"),"whitespace-nowrap"),{variants:{position:{top:y("bottom-full","left-1/2","transform","-translate-x-1/2",m("sm","mb")),bottom:y("top-full","left-1/2","transform","-translate-x-1/2",m("sm","mt")),left:y("right-full","top-1/2","transform","-translate-y-1/2",m("sm","mr")),right:y("left-full","top-1/2","transform","-translate-y-1/2",m("sm","ml"))}},defaultVariants:{position:"top"}}),A=ge(y("absolute","w-0","h-0",pd("thick"),"border-transparent"),{variants:{position:{top:y("top-full","left-1/2","transform","-translate-x-1/2",E("top")),bottom:y("bottom-full","left-1/2","transform","-translate-x-1/2",E("bottom")),left:y("left-full","top-1/2","transform","-translate-y-1/2",E("left")),right:y("right-full","top-1/2","transform","-translate-y-1/2",E("right"))}},defaultVariants:{position:"top"}}),_=l.isValidElement(r)?(()=>{const I=r,D=I.props,F=D.ref;return l.cloneElement(I,{ref:ks(w,F),"aria-describedby":p?x:D["aria-describedby"],onMouseEnter:P=>{var z;v(),(z=D.onMouseEnter)==null||z.call(D,P)},onMouseLeave:P=>{var z;N(),(z=D.onMouseLeave)==null||z.call(D,P)},onFocus:P=>{var z;$(),(z=D.onFocus)==null||z.call(D,P)},onBlur:P=>{var z;C(),(z=D.onBlur)==null||z.call(D,P)},onKeyDown:P=>{var z;j(P),(z=D.onKeyDown)==null||z.call(D,P)}})})():r,R=y(c?"static":"relative","inline-block",o);return n.jsxs("div",L(M({ref:d,className:R},u),{children:[_,p&&n.jsxs("div",{ref:k,id:x,className:y(S({position:s})),role:"tooltip","aria-live":"polite",children:[t,n.jsx("div",{className:y(A({position:s})),"aria-hidden":"true"})]})]}))});Pt.displayName="Tooltip";function Oa(c){var u=c,{variant:e="text",width:t,height:r,lines:s=1,className:a="","aria-label":o}=u,i=W(u,["variant","width","height","lines","className","aria-label"]);const d=["motion-safe:animate-pulse","bg-surface-muted",G("sm")],f={text:"h-4",card:"h-32",list:"h-12",circle:G("full")},b=y(...d,f[e],a),p={};t&&(p.width=t),r&&(p.height=r);const g=o||`Loading ${e} content`;return e==="text"&&s>1?n.jsx("div",L(M({className:m("sm","space-y"),role:"status","aria-busy":"true","aria-label":g},i),{children:Array.from({length:s}).map((h,k)=>n.jsx("div",{className:b,style:k===s-1?{width:"75%"}:p,"aria-hidden":"true"},k))})):n.jsx("div",M({className:b,style:p,role:"status","aria-busy":"true","aria-label":g},i))}function gd({defaultOpen:e=!0,open:t,onOpenChange:r,storageKey:s}){const a=l.useCallback(()=>{if(s&&typeof window!="undefined"){const f=localStorage.getItem(s);if(f!==null)return f==="true"}return e},[e,s]),[o,i]=l.useState(a),c=t!==void 0?t:o;l.useEffect(()=>{s&&typeof window!="undefined"&&t===void 0&&localStorage.setItem(s,String(o))},[o,s,t]);const u=l.useCallback(f=>{t===void 0&&i(f),r==null||r(f)},[t,r]),d=l.useCallback(()=>{u(!c)},[c,u]);return{isOpen:c,toggle:d,setOpen:u}}const $s=l.forwardRef(function(p,b){var g=p,{children:t,trigger:r,defaultOpen:s=!0,open:a,onOpenChange:o,disabled:i=!1,duration:c=200,storageKey:u,className:d=""}=g,f=W(g,["children","trigger","defaultOpen","open","onOpenChange","disabled","duration","storageKey","className"]);const{isOpen:h,toggle:k}=gd({defaultOpen:s,open:a,onOpenChange:o,storageKey:u}),w=l.useRef(null),[x,v]=l.useState(h?"auto":0);l.useEffect(()=>{w.current&&v(h?w.current.scrollHeight:0)},[h,t]),l.useEffect(()=>{if(!h||!w.current)return;const $=new ResizeObserver(()=>{w.current&&h&&v(w.current.scrollHeight)});return $.observe(w.current),()=>{$.disconnect()}},[h]);const N=`collapsible-content-${l.useId()}`;return n.jsxs("div",L(M({ref:b,className:d},f),{children:[r!==void 0&&n.jsx("button",{type:"button",onClick:k,onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),i||k())},disabled:i,"aria-expanded":h,"aria-controls":N,"aria-disabled":i,className:y("w-full","text-left","focus:outline-none","focus:ring-2","focus:ring-line-brand","focus:ring-offset-2",G("md")),children:r}),n.jsx("div",{id:N,ref:w,style:{height:typeof x=="number"?`${x}px`:x,overflow:"hidden",transition:`height ${c}ms ease-in-out`},"aria-hidden":!h,children:n.jsx("div",{children:t})})]}))});$s.displayName="Collapsible";const Ar=l.memo(l.forwardRef(function(b,f){var p=b,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1,indeterminate:u=!1}=p,d=W(p,["id","label","error","success","helperText","className","disabled","indeterminate"]);const g=l.useId(),h=t||`checkbox-${g}`,k=l.useMemo(()=>s?`${h}-error`:void 0,[s,h]),w=l.useMemo(()=>o?`${h}-helper`:void 0,[o,h]),x=l.useMemo(()=>"focus:border-line-focus",[]),v=l.useMemo(()=>"focus:border-error",[]),N=l.useMemo(()=>s?v.replace("focus:border-","focus:ring-"):x.replace("focus:border-","focus:ring-"),[s,v,x]),$=l.useMemo(()=>y("h-4","w-4",G("sm"),"border","border-line-default","text-fg-brand","focus:ring-2",N,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[N,s,a,i]),C=l.useMemo(()=>y(pe("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]),j=l.useRef(null),E=l.useCallback(S=>{j.current=S,typeof f=="function"?f(S):f&&(f.current=S),S&&(S.indeterminate=u)},[f,u]);return l.useEffect(()=>{j.current&&(j.current.indeterminate=u)},[u]),n.jsxs("div",{className:y("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"checkbox",id:h,ref:E,className:$,disabled:c,"aria-invalid":s,"aria-describedby":k||w||void 0,"aria-label":r?void 0:"Checkbox"},d)),r&&n.jsx("label",{htmlFor:h,className:C,children:r})]}),(s||a||o)&&n.jsx("div",{id:k||w,className:y(m("xs","mt"),pe("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));Ar.displayName="Checkbox";const za=l.memo(l.forwardRef(function(f,d){var b=f,{id:t,label:r,error:s=!1,success:a=!1,helperText:o,className:i="",disabled:c=!1}=b,u=W(b,["id","label","error","success","helperText","className","disabled"]);const p=l.useId(),g=t||`radio-${p}`,h=l.useMemo(()=>s?`${g}-error`:void 0,[s,g]),k=l.useMemo(()=>o?`${g}-helper`:void 0,[o,g]),w=l.useMemo(()=>"focus:border-line-focus",[]),x=l.useMemo(()=>"focus:border-error",[]),v=l.useMemo(()=>s?x.replace("focus:border-","focus:ring-"):w.replace("focus:border-","focus:ring-"),[s,x,w]),N=l.useMemo(()=>y("h-4","w-4","border","border-line-default","text-fg-brand","focus:ring-2",v,"focus:ring-offset-2","disabled:opacity-50","disabled:cursor-not-allowed","cursor-pointer",s&&"border-error",!s&&a&&"border-success",i),[v,s,a,i]),$=l.useMemo(()=>y(pe("label"),m("sm","ml"),c?"opacity-50 cursor-not-allowed":"cursor-pointer"),[c]);return n.jsxs("div",{className:y("flex","flex-col",m("sm","my")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("input",M({type:"radio",id:g,ref:d,className:N,disabled:c,"aria-invalid":s,"aria-describedby":h||k||void 0,"aria-label":r?void 0:"Radio button"},u)),r&&n.jsx("label",{htmlFor:g,className:$,children:r})]}),(s||a||o)&&n.jsx("div",{id:h||k,className:y(m("xs","mt"),pe("caption"),s?"text-fg-error":a?"text-fg-success":"text-fg-secondary"),role:s||a?"alert":void 0,children:s?o||"This field has an error":o})]})}));za.displayName="Radio";const Bt={track:{sm:{w:"w-9",h:"h-5"},md:{w:"w-11",h:"h-6"},lg:{w:"w-14",h:"h-7"}},thumb:{sm:{w:"w-4",h:"h-4"},md:{w:"w-5",h:"h-5"},lg:{w:"w-6",h:"h-6"}},translate:{sm:"translate-x-4",md:"translate-x-5",lg:"translate-x-7"}};function hd(e){return{track:`${Bt.track[e].w} ${Bt.track[e].h}`,thumb:`${Bt.thumb[e].w} ${Bt.thumb[e].h}`,translate:Bt.translate[e]}}const xd=ge("w-full",{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},variant:{primary:"bg-surface-muted",secondary:"bg-surface-muted",success:"bg-success-bg-emphasis",error:"bg-error-bg-emphasis",warning:"bg-warning-bg-emphasis",info:"bg-info-bg-emphasis"}},defaultVariants:{size:"md",variant:"primary"}}),zn=ge("transition-all",{variants:{variant:{primary:"bg-surface-brand",secondary:"bg-surface-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info"}},defaultVariants:{variant:"primary"}}),Cs=l.forwardRef(function(b,f){var p=b,{value:t,max:r=100,variant:s="primary",size:a="md",showLabel:o=!1,label:i,"aria-label":c,className:u=""}=p,d=W(p,["value","max","variant","size","showLabel","label","aria-label","className"]);const g=t===void 0,h=g?void 0:Math.min(Math.max(t/r*100,0),100),k=c||(g?"Loading in progress":`Progress: ${h==null?void 0:h.toFixed(0)}%`);return n.jsxs("div",L(M({ref:f,className:y("w-full",u)},d),{children:[o&&(i||!g)&&n.jsxs("div",{className:y("flex","items-center","justify-between",m("xs","mb")),children:[i&&n.jsx("span",{className:y(ae("bodySmall"),Le("label"),"text-fg-primary"),children:i}),!g&&h!==void 0&&n.jsxs("span",{className:y(ae("bodySmall"),"text-fg-secondary"),children:[h.toFixed(0),"%"]})]}),n.jsx("div",{role:"progressbar","aria-valuemin":g?void 0:0,"aria-valuemax":g?void 0:r,"aria-valuenow":g?void 0:t,"aria-label":k,"aria-busy":g,className:y("relative","w-full","overflow-hidden",xd({size:a,variant:s}),G("full")),children:g?n.jsx("div",{className:y("absolute","top-0","left-0","bottom-0",zn({variant:s}),G("full"),"motion-reduce:animate-none"),style:{width:"30%",animation:"progress-indeterminate 1.5s ease-in-out infinite"}}):n.jsx("div",{className:y("h-full",zn({variant:s}),G("full"),"transition-all","duration-300","ease-out"),style:{width:`${h}%`},"aria-hidden":"true"})})]}))});Cs.displayName="Progress";const Va=l.memo(l.forwardRef(function(h,g){var k=h,{size:t="md",label:r,helperText:s,error:a=!1,success:o=!1,className:i="",disabled:c=!1,checked:u,defaultChecked:d,onChange:f,id:b}=k,p=W(k,["size","label","helperText","error","success","className","disabled","checked","defaultChecked","onChange","id"]);const w=u!==void 0,[x,v]=l.useState(d!=null?d:!1),N=w?!!u:x,$=l.useId(),C=b||`switch-${$}`,j=l.useMemo(()=>r?`${C}-label`:void 0,[r,C]),E=l.useMemo(()=>s?`${C}-helper`:void 0,[s,C]),S=l.useMemo(()=>hd(t),[t]),A=l.useMemo(()=>"focus:border-line-focus".replace("focus:border-","focus:ring-"),[]),_=l.useMemo(()=>y("relative","inline-flex","shrink-0","cursor-pointer",G("full"),"border-2","border-transparent",je("base"),"focus:outline-none","focus:ring-2",A,"focus:ring-offset-2",S.track,N?"bg-surface-brand":"bg-surface-muted",a&&!N&&"border-error",!a&&o&&!N&&"border-success",c&&"opacity-50 cursor-not-allowed",i),[A,S.track,N,a,o,c,i]),R=l.useMemo(()=>y("pointer-events-none","inline-block",G("full"),"bg-surface-base","shadow","transform",je("base"),S.thumb,N?S.translate:"translate-x-0"),[S.thumb,S.translate,N]);return n.jsxs("div",{className:y("flex","items-start",m("md","gap")),children:[n.jsxs("div",{className:"flex items-center",children:[n.jsx("button",{type:"button",className:_,role:"switch","aria-checked":N,"aria-labelledby":j,"aria-describedby":E,disabled:c,onClick:l.useCallback(I=>{if(c)return;const D=!N;if(w||v(D),f){const F=L(M({},I),{target:L(M({},I.target),{checked:D}),currentTarget:L(M({},I.currentTarget),{checked:D})});f(F)}},[c,f,N,w]),onKeyDown:l.useCallback(I=>{if(c||I.key!=="Enter"&&I.key!==" ")return;I.preventDefault();const D=!N;if(w||v(D),f){const F=L(M({},I),{target:L(M({},I.target),{checked:D}),currentTarget:L(M({},I.currentTarget),{checked:D})});f(F)}},[c,f,N,w]),children:n.jsx("span",{className:R})}),n.jsx("input",M({ref:g,type:"checkbox",id:C,checked:N,onChange:f!=null?f:(()=>{}),disabled:c,className:"sr-only","aria-hidden":"true",tabIndex:-1},p))]}),(r||s)&&n.jsxs("div",{className:"flex-1",children:[r&&n.jsx("label",{id:j,htmlFor:C,className:y("block",ae("bodySmall"),Le("label"),a?"text-fg-error":"text-fg-primary",c?"opacity-50":"cursor-pointer"),children:r}),s&&n.jsx("p",{id:E,className:y(m("xs","mt"),ae("bodySmall"),a?"text-fg-error":o?"text-fg-success":"text-fg-secondary"),children:s})]})]})}));Va.displayName="Switch";const vd={horizontal:"w-full border-t",vertical:"h-full border-l self-stretch"},yd={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted"},Es=l.memo(function(o){var i=o,{orientation:t="horizontal",variant:r="solid",className:s=""}=i,a=W(i,["orientation","variant","className"]);const c=y("border-0","border-line-default",vd[t],yd[r],s);return t==="vertical"?n.jsx("div",M({className:c,role:"separator","aria-orientation":"vertical"},a)):n.jsx("hr",M({className:c,role:"separator","aria-orientation":"horizontal"},a))});Es.displayName="Separator";const Wa=l.forwardRef(function(x,w){var v=x,{value:t,defaultValue:r,min:s=0,max:a=100,step:o=1,variant:i="single",size:c="md",disabled:u=!1,showValue:d=!1,marks:f=[],onChange:b,onValueChange:p,label:g,className:h=""}=v,k=W(v,["value","defaultValue","min","max","step","variant","size","disabled","showValue","marks","onChange","onValueChange","label","className"]);const N=l.useRef(null),$=l.useId(),C=l.useId(),j=l.useId(),[E,S]=l.useState(r||(i==="range"?[s,a]:s)),[A,_]=l.useState(!1),[R,I]=l.useState(null),D=t!==void 0,F=D?t:E,P=J=>(J-s)/(a-s)*100,z=J=>{if(!N.current)return s;const Q=N.current.getBoundingClientRect(),V=Math.max(0,Math.min(1,(J-Q.left)/Q.width)),Y=s+V*(a-s);return Math.round(Y/o)*o},B=(J,Q="min")=>{if(u)return;J.preventDefault(),_(!0),I(Q);const V=ne=>{if(!N.current)return;const de=z(ne.clientX);U(de,Q)},Y=()=>{_(!1),I(null),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",Y)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",Y)},U=(J,Q="min")=>{const V=Math.max(s,Math.min(a,J));if(i==="range"){const[Y,ne]=Array.isArray(F)?F:[s,a];let de;Q==="min"?de=[Math.min(V,ne),ne]:de=[Y,Math.max(V,Y)],D||S(de),b==null||b(de),p==null||p(de)}else D||S(V),b==null||b(V),p==null||p(V)},oe=J=>{if(u||A)return;const Q=z(J.clientX);U(Q)},H=()=>"focus:ring-line-brand ring-offset-2",O=ge(y("relative","cursor-pointer"),{variants:{size:{sm:"h-1",md:"h-2",lg:"h-3"},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),K=ge(y("absolute","bg-surface-brand",G("full"),"border-2","border-white",be("md"),"cursor-grab","active:cursor-grabbing",je("base"),"-translate-x-1/2","-translate-y-1/2","top-1/2"),{variants:{size:{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},active:{true:H(),false:""}},defaultVariants:{size:"md",active:!1}}),re=typeof F=="number"?F:F[0],se=Array.isArray(F)?F[0]:s,ce=Array.isArray(F)?F[1]:re,Z=P(se),ee=P(ce);return n.jsxs("div",L(M({ref:w,className:y("w-full",h)},k),{children:[n.jsxs("label",{id:$,className:y("block",ae("bodySmall"),Le("label"),"text-fg-primary",m("sm","mb")),children:[g,d&&n.jsx("span",{className:y(m("sm","ml"),"text-fg-secondary"),children:i==="range"?`${se} - ${ce}`:re})]}),i==="range"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{id:C,className:"sr-only",children:"minimum"}),n.jsx("span",{id:j,className:"sr-only",children:"maximum"})]}),n.jsxs("div",{ref:N,className:y(O({size:c,disabled:u}),"bg-surface-muted",G("full")),onClick:oe,role:i==="range"?void 0:"slider","aria-valuemin":i==="range"?void 0:s,"aria-valuemax":i==="range"?void 0:a,"aria-valuenow":i==="range"?void 0:re,"aria-disabled":i==="range"?void 0:u,"aria-labelledby":i==="range"?void 0:$,children:[n.jsx("div",{className:y("absolute",O({size:c}),"bg-surface-brand",G("full"),je("base")),style:{left:`${Z}%`,width:`${ee-Z}%`}}),f.map(J=>{const Q=P(J);return n.jsx("div",{className:y("absolute","w-1","h-1","bg-line-strong",G("full"),"-translate-x-1/2"),style:{left:`${Q}%`,top:"50%",transform:"translate(-50%, -50%)"}},J)}),i==="range"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:y(K({size:c,active:R==="min"})),style:{left:`${Z}%`},onMouseDown:J=>B(J,"min"),role:"slider","aria-valuemin":s,"aria-valuemax":ce,"aria-valuenow":se,"aria-labelledby":`${$} ${C}`}),n.jsx("div",{className:y(K({size:c,active:R==="max"})),style:{left:`${ee}%`},onMouseDown:J=>B(J,"max"),role:"slider","aria-valuemin":se,"aria-valuemax":a,"aria-valuenow":ce,"aria-labelledby":`${$} ${j}`})]}):n.jsx("div",{className:y(K({size:c,active:A})),style:{left:`${ee}%`},onMouseDown:J=>B(J)}),d&&!g&&n.jsx("div",{className:"absolute -top-6 left-0 right-0 flex justify-center",children:n.jsx("span",{className:y(ae("caption"),"text-fg-secondary","bg-surface-overlay",m("sm","px"),m("xs","py"),G("md"),"shadow"),children:i==="range"?`${se} - ${ce}`:re})})]})]}))});Wa.displayName="Slider";const Vn=ge(y("inline-flex","items-center","font-medium",G("full"),m("xs","gap")),{variants:{variant:{default:y("bg-surface-muted","text-fg-primary","border","border-line-default"),outlined:y("bg-transparent","text-fg-primary","border","border-line-default"),filled:y("bg-surface-brand-strong","text-fg-inverse","border","border-transparent")},size:{sm:y(m("xs","px"),m("xs","py"),ae("caption")),md:y(m("sm","px"),m("xs","py"),ae("bodySmall")),lg:y(m("md","px"),m("sm","py"),ae("body"))},selected:{true:y("bg-surface-brand-strong","text-fg-inverse","border","border-line-brand"),false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},compoundVariants:[{selected:!0,variant:"default",class:""},{selected:!0,variant:"outlined",class:""},{selected:!0,variant:"filled",class:""}],defaultVariants:{variant:"default",size:"md",selected:!1,disabled:!1}}),Ts=l.forwardRef(function(t,r){const{children:s,variant:a="default",size:o="md",selected:i=!1,disabled:c=!1,className:u="","aria-label":d,tabIndex:f,asChild:b=!1}=t,g=(()=>{if(d)return d;if(typeof s=="string")return s;if(typeof s=="object"&&s!==null&&"props"in s){const S=s.props;if(S!=null&&S.children&&typeof S.children=="string")return S.children}})();if(b)return n.jsx(Ra,{ref:r,className:y(Vn({variant:a,size:o,selected:i,disabled:c}),u),"aria-label":d,"aria-disabled":c||void 0,tabIndex:f,children:s});const{onRemove:h,onClick:k,count:w}=t,x=k!==void 0,v=x&&!c,N=S=>{c||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),k==null||k())},$=w!==void 0,C=i||a==="filled",j=$?n.jsx("span",{"aria-hidden":x||void 0,className:y("inline-flex","items-center","justify-center","tabular-nums","leading-none",G("full"),m("xs","px"),m("0.5","py"),ae("caption"),Le("label"),C?y("bg-surface-base","text-fg-brand-emphasis"):y("bg-surface-brand-strong","text-fg-inverse")),children:w}):null,E=$&&g!==void 0?`${g}, ${w}`:g;return n.jsxs("div",{ref:r,className:y(Vn({variant:a,size:o,selected:i,disabled:c}),h&&m("xs","pr"),u),"aria-disabled":c,children:[x?n.jsx("button",{type:"button",onClick:c?void 0:k,onKeyDown:N,disabled:c,"aria-pressed":i?!0:void 0,"aria-label":d||E,tabIndex:f!==void 0?f:v?0:void 0,className:y("flex-1","bg-transparent","border-0",m("none","p"),"text-inherit","text-left","cursor-pointer","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",G("full")),children:s}):n.jsx("span",{children:s}),j,h&&!c&&n.jsx("button",{type:"button",onClick:S=>{S.stopPropagation(),h()},className:y(m("xs","ml"),"hover:bg-tint-hover",G("full"),m("xs","p"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1"),"aria-label":`Remove ${g||"chip"}`,children:n.jsx(Te,{className:"h-3 w-3","aria-hidden":"true"})})]})});Ts.displayName="Chip";const gr=l.forwardRef(function(f,d){var b=f,{src:t,alt:r,fallback:s,size:a="md",variant:o="circle","aria-label":i,className:c=""}=b,u=W(b,["src","alt","fallback","size","variant","aria-label","className"]);const[p,g]=l.useState(!1),[h,k]=l.useState(!1),w={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},x={circle:G("full"),square:G("none"),rounded:G("md")},v=!t||p,N=typeof s=="string"?s.toUpperCase().slice(0,2):s,$=i||r||"User avatar";return n.jsxs("div",L(M({ref:d,className:y("relative","inline-flex","items-center","justify-center","shrink-0","font-medium","overflow-hidden",w[a],x[o],"bg-surface-muted","text-fg-primary",c),role:"img","aria-label":$},u),{children:[!v&&t&&n.jsx("img",{src:t,alt:r||"",className:y("w-full","h-full","object-cover",x[o],h?"opacity-100":"opacity-0","transition-opacity","duration-200"),onLoad:()=>k(!0),onError:()=>{g(!0),k(!1)},"aria-hidden":"true"}),v&&n.jsx("span",{className:y("flex","items-center","justify-center","w-full","h-full",x[o]),"aria-hidden":"true",children:N||"?"})]}))});gr.displayName="Avatar";function wd(c){var u=c,{children:e,max:t=3,size:r="md",variant:s="circle",spacing:a="md",className:o=""}=u,i=W(u,["children","max","size","variant","spacing","className"]);const d={none:"",sm:"-space-x-1",md:"-space-x-2",lg:"-space-x-3"},f=l.Children.toArray(e).filter(Boolean),b=f.slice(0,t),p=f.length-t;return n.jsxs("div",L(M({className:y("flex","items-center",d[a],o),role:"group","aria-label":`${f.length} avatars`},i),{children:[b.map((g,h)=>{let k=g;if(l.isValidElement(g)&&g.type===gr){const w=g.props;k=l.cloneElement(g,{size:w.size||r,variant:w.variant||s})}return n.jsx("div",{className:"ring-2 ring-surface-base",style:{zIndex:f.length-h},children:k},h)}),p>0&&n.jsx(gr,{size:r,variant:s,fallback:`+${p}`,"aria-label":`${p} more avatars`,className:"ring-2 ring-surface-base",style:{zIndex:0}})]}))}const kd=ge(y("inline-block",G("full")),{variants:{variant:{online:"",offline:"",pending:"",warning:"",error:"",info:""},size:{sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"}},compoundVariants:[{variant:"online",class:"bg-success"},{variant:"offline",class:"bg-status-neutral"},{variant:"pending",class:"bg-warning"},{variant:"warning",class:"bg-warning"},{variant:"error",class:"bg-error"},{variant:"info",class:"bg-info"}],defaultVariants:{variant:"offline",size:"md"}}),Ha=l.memo(l.forwardRef(function(c,i){var u=c,{variant:t="offline",size:r="md",className:s="","aria-label":a}=u,o=W(u,["variant","size","className","aria-label"]);const d=l.useMemo(()=>y(kd({variant:t,size:r}),s),[t,r,s]),f=l.useMemo(()=>a||{online:"Online",offline:"Offline",pending:"Pending",warning:"Warning",error:"Error",info:"Info"}[t],[a,t]);return n.jsx("span",M({ref:i,role:"status","aria-label":f,className:d},o))}));Ha.displayName="Dot";function jd(s){var a=s,{children:e,className:t}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:y("grid items-start",m("1.5","gap"),m("base","mb"),"[&:has([data-card-actions])]:grid-cols-[1fr_auto]","[&:has([data-card-actions])>[data-card-actions]]:row-span-full",t)},r),{children:e}))}function Nd(i){var c=i,{children:e,icon:t,badge:r,as:s="h2",className:a}=c,o=W(c,["children","icon","badge","as","className"]);return n.jsxs(s,L(M({className:y("text-base font-semibold text-fg-primary","flex items-center",m("sm","gap"),a)},o),{children:[t?n.jsx("span",{className:"shrink-0 inline-flex",children:t}):null,n.jsx("span",{children:e}),r?n.jsx("span",{className:"inline-flex",children:r}):null]}))}function Sd(s){var a=s,{children:e,className:t}=a,r=W(a,["children","className"]);return n.jsx("p",L(M({className:y("text-sm text-fg-secondary",t)},r),{children:e}))}function $d(s){var a=s,{children:e,className:t}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({"data-card-actions":"",className:y("flex items-center self-start",m("sm","gap"),t)},r),{children:e}))}function Cd(s){var a=s,{children:e,className:t}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:y(t)},r),{children:e}))}function Ed(d){var f=d,{variant:e="default",padding:t="medium",className:r="",onClick:s,"aria-label":a,"aria-labelledby":o,asSection:i=!1,children:c}=f,u=W(f,["variant","padding","className","onClick","aria-label","aria-labelledby","asSection","children"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&i&&!a&&!o&&console.warn("[Card] `asSection={true}` requires an accessible name. Pass `aria-labelledby` pointing to your Card.Title `id`, or `aria-label`. A <section> without a name is an anonymous landmark that hurts screen-reader navigation.");const b=ge(y("bg-surface-base",G("lg"),"border","border-line-default",be("sm")),{variants:{variant:{default:"",hover:y(`hover:${be("md")}`,"transition-shadow","cursor-pointer"),selected:y("border-line-brand",be("md"))},padding:{none:"",small:m("xs","p"),medium:m("base","p"),large:m("lg","p")}},defaultVariants:{variant:"default",padding:"medium"}}),p=s!==void 0,g=p?"button":void 0,h=p?0:void 0,k=y(b({variant:e,padding:t}),r),x=M({className:k,role:g,tabIndex:h,onClick:s,onKeyDown:p?v=>{p&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s==null||s())}:void 0,"aria-label":a,"aria-labelledby":o},u);return i?n.jsx("section",L(M({},x),{children:c})):n.jsx("div",L(M({},x),{children:c}))}const Ba=l.memo(Ed);Ba.displayName="Card";const gt=Ba;gt.Header=jd;gt.Title=Nd;gt.Subtitle=Sd;gt.Actions=$d;gt.Body=Cd;const Td={start:"items-start text-left",center:"items-center text-center"},Md={neutral:"text-fg-tertiary",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};function Ad(u){var d=u,{value:e,label:t,hint:r,icon:s,align:a="start",tone:o="neutral",className:i}=d,c=W(d,["value","label","hint","icon","align","tone","className"]);const f=e==null;return n.jsxs("div",L(M({className:y("bg-surface-base flex-1 flex flex-col",m("base","p"),m("xs","gap-y"),Td[a],i)},c),{children:[s?n.jsx("span",{className:"text-icon-default inline-flex",children:s}):null,f?n.jsx("span",{"aria-label":"No data",className:"text-fg-tertiary text-2xl font-semibold leading-tight",children:"—"}):n.jsx("span",{className:"text-fg-primary text-2xl font-semibold leading-tight",children:e}),n.jsx("span",{className:"text-fg-secondary text-sm",children:t}),r?n.jsx("span",{className:y("text-xs",Md[o]),children:r}):null]}))}const Id={2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4"};function Rd(o){var i=o,{layout:e="grid",cols:t=4,className:r,children:s}=i,a=W(i,["layout","cols","className","children"]);const c=e==="grid";return n.jsx("div",L(M({className:y("bg-line-default border border-line-default overflow-hidden gap-px",G("lg"),c?`grid grid-cols-2 ${Id[t]}`:"flex",r)},a),{children:s}))}function Dd(o){var i=o,{label:e,children:t,wrap:r=!0,className:s}=i,a=W(i,["label","children","wrap","className"]);const u=!(a["aria-label"]!=null||a["aria-labelledby"]!=null)&&typeof e=="string"&&e!==""?e:void 0;return n.jsxs("div",L(M({role:"group","aria-label":u,className:y("flex items-center",r?"flex-wrap":"flex-nowrap",m("sm","gap"),s)},a),{children:[e?n.jsx("span",{className:"shrink-0 text-fg-secondary text-sm",children:e}):null,t]}))}function Ua(e){const t=l.createContext(void 0);t.displayName=e.displayName;function r({value:o,children:i}){return n.jsx(t.Provider,{value:o,children:i})}function s(){const o=l.useContext(t);if(o===void 0)throw new Error(e.errorMessage);return o}function a(){return l.useContext(t)}return{Context:t,Provider:r,useContextRequired:s,useContextOptional:a}}const Ir=Ua({displayName:"FormContext",errorMessage:"useFormContext must be used within a Form component with react-hook-form integration"}),Fd=Ir.Context,_d=Ir.Provider;function Ms(){return Ir.useContextRequired()}function Ld(){return Ir.useContextOptional()}function Ga({form:e,loading:t=!1,children:r}){const s={form:e,loading:t};return n.jsx(_d,{value:s,children:r})}function Pd(c){var u=c,{children:e,onSubmit:t,loading:r=!1,error:s=null,success:a=null,className:o=""}=u,i=W(u,["children","onSubmit","loading","error","success","className"]);const d=y(m("lg","gap"),"flex","flex-col",o);if("form"in i&&i.form!==void 0){const k=i,{form:x,onSubmit:v,onSubmitError:N}=k,$=W(k,["form","onSubmit","onSubmitError"]),C=x.handleSubmit(j=>ar(null,null,function*(){if(!r)try{yield v(j)}catch(E){N==null||N(E)}}),j=>{N==null||N(j)});return n.jsx(Ga,{form:x,loading:r,children:n.jsxs("form",L(M({className:d,onSubmit:C,noValidate:!0},$),{children:[e,s&&n.jsx("div",{role:"alert",className:y(m("md","p"),Ne("sm"),"text-error-dark","bg-error-bg","border","border-error",G("md")),children:s}),a&&n.jsx("div",{role:"alert",className:y(m("md","p"),Ne("sm"),"text-success-dark","bg-success-bg","border","border-success",G("md")),children:a})]}))})}const b=i.onSubmit||t,w=i,{onSubmit:p}=w,g=W(w,["onSubmit"]),h=x=>{x.preventDefault(),b&&!r&&(b==null||b(x))};return n.jsxs("form",L(M({className:d,onSubmit:h,noValidate:!0},g),{children:[e,s&&n.jsx("div",{role:"alert",className:y(m("md","p"),Ne("sm"),"text-error-dark","bg-error-bg","border","border-error",G("md")),children:s}),a&&n.jsx("div",{role:"alert",className:y(m("md","p"),Ne("sm"),"text-success-dark","bg-success-bg","border","border-success",G("md")),children:a})]}))}var Od=e=>e.type==="checkbox",zd=e=>e instanceof Date,He=e=>e==null;const Vd=e=>typeof e=="object";var Je=e=>!He(e)&&!Array.isArray(e)&&Vd(e)&&!zd(e),Wd=e=>{const t=e.constructor&&e.constructor.prototype;return Je(t)&&t.hasOwnProperty("isPrototypeOf")},As=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function at(e){if(e instanceof Date)return new Date(e);const t=typeof FileList!="undefined"&&e instanceof FileList;if(As&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Je(e)&&Wd(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=at(e[a]));return s}const Dt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ge={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Hd="root",Ka=["__proto__","constructor","prototype"];var Is=e=>/^\w*$/.test(e),qe=e=>e===void 0,Rs=e=>e.split(/[.[\]'"]/g).filter(Boolean),_e=(e,t,r)=>{if(!t||!Je(e))return r;const s=Is(t)?[t]:Rs(t);if(s.some(o=>Ka.includes(o)))return r;const a=s.reduce((o,i)=>He(o)?void 0:o[i],e);return qe(a)||a===e?qe(e[t])?r:e[t]:a},Ya=e=>typeof e=="boolean",Bd=e=>typeof e=="function",hr=(e,t,r)=>{let s=-1;const a=Is(t)?[t]:Rs(t),o=a.length,i=o-1;for(;++s<o;){const c=a[s];let u=r;if(s!==i){const d=e[c];u=Je(d)||Array.isArray(d)?d:isNaN(+a[s+1])?{}:[]}if(Ka.includes(c))return;e[c]=u,e=e[c]}};const qa=l.createContext(null);qa.displayName="HookFormControlContext";const Ud=()=>l.useContext(qa),Gd=As?l.useLayoutEffect:l.useEffect;var Ke=e=>typeof e=="string";const Kd=l.createContext(null);Kd.displayName="HookFormContext";var Yd=(e,t,r,s,a)=>t?L(M({},r[e]),{types:L(M({},r[e]&&r[e].types?r[e].types:{}),{[s]:a||!0})}):{},qd=e=>Array.isArray(e)?e.filter(Boolean):[],Ye=e=>Array.isArray(e)?e:[e],xr=e=>Je(e)&&!Object.keys(e).length,Xd=e=>e.type==="file",Jd=e=>{if(!As)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zd=e=>e.type==="radio";function Qd(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(He(e)){e=void 0;break}e=e[t[s]],s++}return e}function eu(e){for(const t in e)if(e.hasOwnProperty(t)&&!qe(e[t]))return!1;return!0}function Xa(e,t){if(Ke(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:Is(t)?[t]:Rs(t),s=r.length===1?e:Qd(e,r),a=r.length-1,o=r[a];return s&&delete s[o],a!==0&&(Je(s)&&xr(s)||Array.isArray(s)&&eu(s))&&Xa(e,r.slice(0,-1)),e}var Ja=e=>e instanceof RegExp,fr=e=>({isOnSubmit:!e||e===Dt.onSubmit,isOnBlur:e===Dt.onBlur,isOnChange:e===Dt.onChange,isOnAll:e===Dt.all,isOnTouch:e===Dt.onTouched}),tu=(e,t,r)=>t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(`${s}.`));const ps=(e,t,r,s)=>{for(const o of Object.keys(e)){const i=_e(e,o);if(i){const a=i,{_f:c}=a,u=W(a,["_f"]);if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],o))return!0;if(c.ref&&t(c.ref,c.name))return!0;if(ps(u,t))break}else if(Je(u)&&ps(u,t))break}}};var ru=(e,t,r)=>{const s=_e(e,r),a=Array.isArray(s)?s:[];return hr(a,Hd,t[r]),hr(e,r,a),e};function Wn(e,t,r="validate"){if(Ke(e)||Array.isArray(e)&&e.every(Ke)||Ya(e)&&!e)return{type:r,message:Ke(e)?e:"",ref:t}}var It=e=>Je(e)&&!Ja(e)?e:{value:e,message:""},su=(e,t,r,s,a,o)=>ar(null,null,function*(){const{ref:i,refs:c,required:u,maxLength:d,minLength:f,min:b,max:p,pattern:g,validate:h,name:k,valueAsNumber:w,mount:x}=e._f,v=_e(r,k);if(!x||t.has(k))return{};const N=c?c[0]:i,$=A=>{if(a&&N.reportValidity){const _=Ya(A)?"":A||"";c?c.forEach(R=>R.setCustomValidity(_)):N.setCustomValidity(_),N.reportValidity()}},C={};Zd(i),Od(i);const j=(w||Xd(i))&&qe(i.value)&&qe(v)||Jd(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,E=Yd.bind(null,k,s,C),S=(A,_,R,I=Ge.maxLength,D=Ge.minLength)=>{const F=A?_:R;C[k]=M({type:A?I:D,message:F,ref:i},E(A?I:D,F))};if(!Array.isArray(v)||!v.length){const{value:A,message:_}=Ke(u)?{value:!!u,message:u}:It(u);if(A&&(C[k]=M({type:Ge.required,message:_,ref:N},E(Ge.required,_)),!s))return $(_),C}if(!j&&(!He(b)||!He(p))){let A,_;const R=It(p),I=It(b);if(!He(v)&&!isNaN(v)){const D=i.valueAsNumber||v&&+v;He(R.value)||(A=D>R.value),He(I.value)||(_=D<I.value)}else{const D=i.valueAsDate||new Date(v),F=B=>new Date(new Date().toDateString()+" "+B),P=i.type=="time",z=i.type=="week";Ke(R.value)&&v&&(A=P?F(v)>F(R.value):z?v>R.value:D>new Date(R.value)),Ke(I.value)&&v&&(_=P?F(v)<F(I.value):z?v<I.value:D<new Date(I.value))}if((A||_)&&(S(!!A,R.message,I.message,Ge.max,Ge.min),!s))return $(C[k].message),C}if((d||f)&&!j&&(Ke(v)||Array.isArray(v))){const A=It(d),_=It(f),R=!He(A.value)&&v.length>+A.value,I=!He(_.value)&&v.length<+_.value;if((R||I)&&(S(R,A.message,_.message),!s))return $(C[k].message),C}if(g&&!j&&Ke(v)){const{value:A,message:_}=It(g);if(Ja(A)&&!v.match(A)&&(C[k]=M({type:Ge.pattern,message:_,ref:i},E(Ge.pattern,_)),!s))return $(_),C}if(h){if(Bd(h)){const A=yield h(v,r),_=Wn(A,N);if(_&&(C[k]=M(M({},_),E(Ge.validate,_.message)),!s))return $(_.message),C}else if(Je(h)){let A={};for(const _ in h){if(!xr(A)&&!s)break;const R=Wn(yield h[_](v,r),N,_);R&&(A=M(M({},R),E(_,R.message)),$(R.message),s&&(C[k]=A))}if(!xr(A)&&(C[k]=M({ref:N},A),!s))return C}}return $(!0),C}),nt=()=>{if(typeof crypto!="undefined"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},rs=(e,t,r={})=>r.shouldFocus||qe(r.shouldFocus)?r.focusName||`${e}.${qe(r.focusIndex)?t:r.focusIndex}.`:"",ss=(e,t)=>[...e,...Ye(t)],ns=e=>Array.isArray(e)?e.map(()=>{}):void 0;function as(e,t,r){return[...e.slice(0,t),...Ye(r),...e.slice(t)]}var os=(e,t,r)=>Array.isArray(e)?(qe(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],is=(e,t)=>[...Ye(t),...Ye(e)];function nu(e,t){let r=0;const s=[...e];for(const a of t)s.splice(a-r,1),r++;return qd(s).length?s:[]}var ls=(e,t)=>qe(t)?[]:nu(e,Ye(t).sort((r,s)=>r-s)),cs=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Hn=(e,t,r)=>(e[t]=r,e);function au(e){const t=Ud(),{control:r=t,name:s,keyName:a="id",disabled:o,shouldUnregister:i,rules:c}=e,[u,d]=l.useState(o?[]:r._getFieldArray(s)),f=l.useRef(o?[]:r._getFieldArray(s).map(nt)),b=l.useRef(!1);o||r._names.array.add(s),l.useMemo(()=>!o&&c&&u.length>=0&&r.register(s,c),[r,s,u.length,c,o]),Gd(()=>{if(!o)return r._subjects.array.subscribe({next:({values:C,name:j})=>{if(j===s||!j){const E=_e(C,s);Array.isArray(E)?(d(E),f.current=E.map(nt)):j||(d([]),f.current=[])}}}).unsubscribe},[r,s,o]);const p=l.useCallback(C=>{b.current=!0,r._setFieldArray(s,C)},[r,s]),g=(C,j)=>{if(o)return;const E=Ye(at(C)),S=ss(r._getFieldArray(s),E);r._names.focus=rs(s,S.length-1,j),f.current=ss(f.current,E.map(nt)),p(S),d(S),r._setFieldArray(s,S,ss,{argA:ns(C)})},h=(C,j)=>{if(o)return;const E=Ye(at(C)),S=is(r._getFieldArray(s),E);r._names.focus=rs(s,0,j),f.current=is(f.current,E.map(nt)),p(S),d(S),r._setFieldArray(s,S,is,{argA:ns(C)})},k=C=>{if(o)return;const j=ls(r._getFieldArray(s),C);f.current=ls(f.current,C),p(j),d(j),!Array.isArray(_e(r._fields,s))&&hr(r._fields,s,void 0),r._setFieldArray(s,j,ls,{argA:C})},w=(C,j,E)=>{if(o)return;const S=Ye(at(j)),A=as(r._getFieldArray(s),C,S);r._names.focus=rs(s,C,E),f.current=as(f.current,C,S.map(nt)),p(A),d(A),r._setFieldArray(s,A,as,{argA:C,argB:ns(j)})},x=(C,j)=>{if(o)return;const E=r._getFieldArray(s);cs(E,C,j),cs(f.current,C,j),p(E),d(E),r._setFieldArray(s,E,cs,{argA:C,argB:j},!1)},v=(C,j)=>{if(o)return;const E=r._getFieldArray(s);os(E,C,j),os(f.current,C,j),p(E),d(E),r._setFieldArray(s,E,os,{argA:C,argB:j},!1)},N=(C,j)=>{if(o)return;const E=at(j),S=Hn(r._getFieldArray(s),C,E);f.current=[...S].map((A,_)=>!A||_===C?nt():f.current[_]),p(S),d([...S]),r._setFieldArray(s,S,Hn,{argA:C,argB:E},!0,!1)},$=C=>{if(o)return;const j=Ye(at(C));f.current=j.map(nt),p([...j]),d([...j]),r._setFieldArray(s,[...j],E=>E,{},!0,!1)};return l.useEffect(()=>{if(o)return;r._state.action=!1,tu(s,r._names)&&r._subjects.state.next(M({},r._formState));const C=fr(r._options.mode);if(b.current&&(!C.isOnSubmit||r._formState.isSubmitted)&&!fr(r._options.reValidateMode).isOnSubmit&&!C.isOnBlur)if(r._options.resolver)r._runSchema([s]).then(j=>{r._updateIsValidating([s]);const E=_e(j.errors,s),S=_e(r._formState.errors,s);(S?!E&&S.type||E&&(S.type!==E.type||S.message!==E.message):E&&E.type)&&(E?hr(r._formState.errors,s,E):Xa(r._formState.errors,s),r._subjects.state.next({errors:r._formState.errors}))});else{const j=_e(r._fields,s);j&&j._f&&!(fr(r._options.reValidateMode).isOnSubmit&&fr(r._options.mode).isOnSubmit)&&su(j,r._names.disabled,r._formValues,r._options.criteriaMode===Dt.all,r._options.shouldUseNativeValidation).then(E=>!xr(E)&&r._subjects.state.next({errors:ru(r._formState.errors,E,s)}))}r._subjects.state.next({name:s,values:at(r._formValues)}),r._names.focus&&ps(r._fields,(j,E)=>{if(r._names.focus&&E.startsWith(r._names.focus)&&j.focus)return j.focus(),1}),r._names.focus="",r._setValid(),b.current=!1},[u,s,r,o]),l.useEffect(()=>(o||!_e(r._formValues,s)&&r._setFieldArray(s),()=>{if(o)return;const C=!(r._options.shouldUnregister||i),j=(E,S)=>{const A=_e(r._fields,E);A&&A._f&&(A._f.mount=S)};b.current&&C&&r._subjects.state.next({name:s,values:at(r._formValues)}),C?j(s,!1):r.unregister(s)}),[s,r,a,i,o]),{swap:l.useCallback(x,[p,s,r,o]),move:l.useCallback(v,[p,s,r,o]),prepend:l.useCallback(h,[p,s,r,o]),append:l.useCallback(g,[p,s,r,o]),remove:l.useCallback(k,[p,s,r,o]),insert:l.useCallback(w,[p,s,r,o]),update:l.useCallback(N,[p,s,r,o]),replace:l.useCallback($,[p,s,r,o]),fields:l.useMemo(()=>u.map((C,j)=>L(M({},C),{[a]:f.current[j]||nt()})),[u,a])}}function ou({name:e,label:t,children:r,rules:s,className:a=""}){var p;const{form:o}=Ms();if(!o)throw new Error("FormField must be used within a Form component with react-hook-form integration");const{register:i,formState:{errors:c},watch:u}=o,d=i(e,s),f=(p=_e(c,e))==null?void 0:p.message,b=u(e);return n.jsxs("div",{className:y("flex","flex-col",m("sm","gap"),a),children:[t&&n.jsx(Lt,{htmlFor:e,className:y("block",Ne("sm"),_t("medium"),"text-fg-primary"),children:t}),r({name:e,id:e,register:g=>i(g,s),error:f,value:b,onChange:d.onChange,onBlur:d.onBlur}),f&&n.jsx(Pa,{message:f})]})}function iu(e){const{form:t}=Ms();if(!t)throw new Error("useFormFieldArray must be used within a Form component with react-hook-form integration");return au(L(M({},e),{control:t.control}))}function Za(a){var o=a,{items:e,separator:t="/",className:r=""}=o,s=W(o,["items","separator","className"]);const i=["flex","items-center",m("sm","space-x"),ae("bodySmall")],c=y(...i,r);return n.jsx("nav",L(M({"aria-label":"Breadcrumb",className:c},s),{children:n.jsx("ol",{className:y("flex","items-center",m("sm","space-x")),children:e.map((u,d)=>{const f=d===e.length-1;return n.jsxs("li",{className:"flex items-center",children:[d>0&&n.jsx("span",{className:y(m("sm","mx"),"text-fg-tertiary"),"aria-hidden":"true",children:t}),f?n.jsx("span",{className:y("text-fg-primary",Le("label")),"aria-current":"page",children:u.label}):u.href?n.jsx("a",{href:u.href,className:y("inline-flex","items-center",m("xs","px"),m("xs","pt"),"border-b-2","border-transparent",ae("bodySmall"),Le("label"),"transition-colors","text-fg-secondary","hover:border-line-emphasis","hover:text-fg-primary"),children:u.label}):n.jsx("span",{className:"text-fg-secondary",children:u.label})]},d)})})}))}function Qa(u){var d=u,{currentPage:e,totalPages:t,onPageChange:r,totalItems:s,itemsPerPage:a,showPageInfo:o=!0,className:i=""}=d,c=W(d,["currentPage","totalPages","onPageChange","totalItems","itemsPerPage","showPageInfo","className"]);const f=()=>{e>1&&r(e-1)},b=()=>{e<t&&r(e+1)},p=x=>{x>=1&&x<=t&&x!==e&&r(x)},g=()=>{const x=[];if(t<=5)for(let N=1;N<=t;N++)x.push(N);else if(e<=3){for(let N=1;N<=4;N++)x.push(N);x.push("ellipsis"),x.push(t)}else if(e>=t-2){x.push(1),x.push("ellipsis");for(let N=t-3;N<=t;N++)x.push(N)}else{x.push(1),x.push("ellipsis");for(let N=e-1;N<=e+1;N++)x.push(N);x.push("ellipsis"),x.push(t)}return x},h=s&&a?(e-1)*a+1:void 0,k=s&&a?Math.min(e*a,s):void 0,w=y("flex","items-center","justify-between",m("base","px"),m("md","py"),i);return n.jsxs("nav",L(M({className:w,"aria-label":"Pagination"},c),{children:[n.jsxs("div",{className:y("flex","items-center",m("sm","gap")),children:[n.jsx(te,{variant:"secondary",onClick:f,disabled:e===1,size:"sm",children:"Previous"}),n.jsx("div",{className:y("flex","items-center",m("xs","gap")),children:g().map((x,v)=>{if(x==="ellipsis")return n.jsx("span",{className:y(m("sm","px"),"text-fg-tertiary"),children:"..."},`ellipsis-${v}`);const N=x,$=N===e;return n.jsx(te,{variant:$?"primary":"ghost",onClick:()=>p(N),size:"sm","aria-current":$?"page":void 0,"aria-label":`Go to page ${N}`,children:N},N)})}),n.jsx(te,{variant:"secondary",onClick:b,disabled:e===t,size:"sm",children:"Next"})]}),o&&s&&a&&n.jsxs("div",{className:y(Ne("sm"),"text-fg-primary"),children:["Showing ",h," to ",k," of ",s," results"]})]}))}function eo(u){var d=u,{title:e,message:t,actionLabel:r,onAction:s,illustration:a,variant:o="default",className:i=""}=d,c=W(d,["title","message","actionLabel","onAction","illustration","variant","className"]);const f=y("flex","flex-col","items-center","justify-center","text-center",m("xl","py"),m("base","px"),i),b=o==="withAction"||r&&s,p=o==="withIllustration"||a;return n.jsxs("div",L(M({className:f,role:"status","aria-live":"polite","aria-label":`${e}. ${t}`},c),{children:[p&&a&&n.jsx("div",{className:y(m("base","mb")),"aria-hidden":"true",children:a}),n.jsx(Ee,{as:"h3",className:y(ae("h4"),_t("semibold"),"text-fg-primary",m("sm","mb")),children:e}),n.jsx(Ee,{as:"p",className:y(ae("bodySmall"),"text-fg-secondary",m("md","mb"),"max-w-sm"),children:t}),b&&r&&s&&n.jsx(te,{variant:"primary",onClick:s,children:r})]}))}function to(c){var u=c,{trigger:e,items:t,align:r="right",variant:s="default",className:a="","aria-label":o}=u,i=W(u,["trigger","items","align","variant","className","aria-label"]);const[d,f]=l.useState(!1),[b,p]=l.useState(-1),g=l.useRef(null),h=l.useRef(null),k=l.useRef(null),w=l.useRef([]),x=l.useId(),v=`dropdown-menu-${x}`,N=`dropdown-trigger-${x}`;l.useEffect(()=>{const A=_=>{g.current&&!g.current.contains(_.target)&&(f(!1),p(-1))};return d&&(document.addEventListener("mousedown",A),setTimeout(()=>{var R;const _=t.findIndex(I=>!I.disabled);_>=0&&(p(_),(R=w.current[_])==null||R.focus())},0)),()=>{document.removeEventListener("mousedown",A)}},[d,t]),l.useEffect(()=>{if(!d)return;const A=R=>{var F,P,z,B;const I=t.map((U,oe)=>({item:U,index:oe})).filter(({item:U})=>!U.disabled),D=I.findIndex(({index:U})=>U===b);switch(R.key){case"ArrowDown":{R.preventDefault();const U=D<I.length-1?I[D+1].index:I[0].index;p(U),(F=w.current[U])==null||F.focus();break}case"ArrowUp":{R.preventDefault();const U=D>0?I[D-1].index:I[I.length-1].index;p(U),(P=w.current[U])==null||P.focus();break}case"Home":{R.preventDefault();const U=I[0].index;p(U),(z=w.current[U])==null||z.focus();break}case"End":{R.preventDefault();const U=I[I.length-1].index;p(U),(B=w.current[U])==null||B.focus();break}case"Enter":case" ":R.preventDefault(),b>=0&&!t[b].disabled&&$(t[b]);break;case"Escape":R.preventDefault(),f(!1),p(-1),setTimeout(()=>{var U;(U=h.current)==null||U.focus()},0);break}},_=k.current;if(_){const R=A;return _.addEventListener("keydown",R),()=>{_.removeEventListener("keydown",R)}}},[d,b,t]);const $=A=>{A.disabled||(A.onClick(),f(!1),p(-1),setTimeout(()=>{var _;(_=h.current)==null||_.focus()},0))},C=()=>{f(!d),p(-1)},j=A=>{(A.key==="Enter"||A.key===" "||A.key==="ArrowDown")&&(A.preventDefault(),f(!0))},E=r==="right"?"right-0":"left-0",S=l.isValidElement(e)?l.cloneElement(e,{onClick:A=>{var _,R;C(),(R=(_=e.props).onClick)==null||R.call(_,A)},onKeyDown:A=>{var _,R;j(A),(R=(_=e.props).onKeyDown)==null||R.call(_,A)},"aria-haspopup":"menu","aria-expanded":d,"aria-controls":v,"aria-label":o||e.props["aria-label"]||"Open menu",id:N,ref:ks(h,e.props.ref)}):n.jsx("div",{ref:A=>{h.current=A},onClick:C,onKeyDown:j,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":d,"aria-controls":v,"aria-label":o||"Open menu",id:N,children:e});return n.jsxs("div",L(M({className:y("relative","inline-block",a),ref:g},i),{children:[S,d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:y("fixed","inset-0","z-10"),onClick:()=>{f(!1),p(-1)},"aria-hidden":"true"}),n.jsx("div",{ref:k,id:v,className:y("absolute","z-20",m("sm","mt"),"w-48",G("md"),be("lg"),"bg-surface-overlay","ring-1","ring-line-strong","ring-opacity-5",E),role:"menu","aria-orientation":"vertical","aria-labelledby":N,"aria-activedescendant":b>=0?`${v}-item-${b}`:void 0,children:n.jsx("div",{className:y(m("xs","py")),role:"none",children:t.map((A,_)=>{const R=y("block",m("base","px"),m("xs","py"),ae("bodySmall"),"w-full","text-left","focus:outline-none",A.disabled?y("text-fg-disabled","cursor-not-allowed","opacity-50"):A.variant==="danger"?y("text-error-dark","hover:bg-error-bg-emphasis","focus:bg-error-bg-emphasis"):y("text-fg-primary","hover:bg-surface-hover","focus:bg-surface-hover"));return n.jsx("button",{id:`${v}-item-${_}`,ref:I=>{w.current[_]=I},type:"button",className:R,onClick:()=>$(A),disabled:A.disabled,role:"menuitem","aria-disabled":A.disabled,tabIndex:A.disabled?-1:b===_?0:-1,children:A.label},_)})})})]})]}))}const ro=l.createContext(void 0);function so(){const e=l.useContext(ro);if(!e)throw new Error("DatePicker components must be used within a DatePicker component");return e}function bs({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,locale:u}){const d=()=>{if(r!==void 0)return null;if(s){if(t==="single"&&s instanceof Date)return s;if(t==="range"&&typeof s=="object"&&"start"in s)return null}return null},f=()=>r===void 0&&s&&t==="range"&&typeof s=="object"&&"start"in s?s:{start:null,end:null},[b,p]=l.useState(d()),[g,h]=l.useState(f()),k=t==="single"?r instanceof Date?r:b:null,w=t==="range"?r&&typeof r=="object"&&"start"in r?r:g:null,N={selectedDate:k,selectedRange:w,mode:t,onDateChange:$=>{t==="single"&&(r===void 0&&p($),a==null||a($))},onRangeChange:$=>{t==="range"&&(r===void 0&&h($),a==null||a($))},minDate:o,maxDate:i,disabledDates:c,locale:u};return n.jsx(ro.Provider,{value:N,children:e})}function Ut(e,t="yyyy-MM-dd"){const r=e.getFullYear(),s=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return t.replace("yyyy",String(r)).replace("MM",s).replace("dd",a).replace("MM/dd/yyyy",`${s}/${a}/${r}`).replace("dd/MM/yyyy",`${a}/${s}/${r}`)}function Bn(e){if(!e)return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(t){const[,a,o,i]=t,c=new Date(parseInt(a),parseInt(o)-1,parseInt(i));if(!isNaN(c.getTime()))return c}const r=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(r){const[,a,o,i]=r,c=new Date(parseInt(i),parseInt(a)-1,parseInt(o));if(!isNaN(c.getTime()))return c}const s=e.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(s){const[,a,o,i]=s,c=new Date(parseInt(i),parseInt(o)-1,parseInt(a));if(!isNaN(c.getTime()))return c}return null}function Ds(c){var u=c,{placeholder:e="Select date",format:t="yyyy-MM-dd",showCalendarButton:r=!0,"aria-label":s,onFocus:a,className:o=""}=u,i=W(u,["placeholder","format","showCalendarButton","aria-label","onFocus","className"]);const{selectedDate:d,selectedRange:f,mode:b,onDateChange:p}=so(),[g,h]=l.useState(""),[k,w]=l.useState(!1),x=l.useRef(null);l.useEffect(()=>{b==="single"&&d?h(Ut(d,t)):b==="range"&&f?f.start&&f.end?h(`${Ut(f.start,t)} - ${Ut(f.end,t)}`):f.start?h(Ut(f.start,t)):h(""):h("")},[d,f,b,t]);const v=C=>{const j=C.target.value;if(h(j),b==="single"){const E=Bn(j);p(E)}},N=()=>{if(w(!1),g&&b==="single"){const C=Bn(g);C&&h(Ut(C,t))}},$=()=>{var C;(C=x.current)==null||C.focus()};return n.jsx("div",L(M({className:`relative ${o}`},i),{children:n.jsx(Me,{ref:x,type:"text",value:g,onChange:v,onFocus:()=>{w(!0),a==null||a()},onBlur:N,placeholder:e,"aria-label":s||e,rightIcon:r?n.jsx(te,{variant:"iconOnly",size:"sm",onClick:$,"aria-label":"Open calendar",type:"button",children:n.jsx(oc,{className:"h-4 w-4"})}):void 0})}))}function lu(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function cu(e){return new Date(e.getFullYear(),e.getMonth(),1).getDay()}function jt(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Gt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function du(e,t,r){if(!t||!r)return!1;const s=e.getTime();return s>=t.getTime()&&s<=r.getTime()}function ds(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function Un(e,t,r,s){const a=ds(e);return!!(t&&a<ds(t)||r&&a>ds(r)||s!=null&&s.some(o=>jt(e,o)))}const uu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fu=["January","February","March","April","May","June","July","August","September","October","November","December"];function Fs(a){var o=a,{month:e,onMonthChange:t,className:r=""}=o,s=W(o,["month","onMonthChange","className"]);const{selectedDate:i,selectedRange:c,mode:u,onDateChange:d,onRangeChange:f,minDate:b,maxDate:p,disabledDates:g}=so(),[h,k]=l.useState(e||i||(c==null?void 0:c.start)||new Date),w=l.useRef(null),[x,v]=l.useState(()=>{const D=new Date,F=e||i||(c==null?void 0:c.start)||D;return i&&Gt(i,F)?i:Gt(D,F)?D:new Date(F.getFullYear(),F.getMonth(),1)});l.useEffect(()=>{e&&k(e)},[e]);const N=l.useRef(!0);l.useEffect(()=>{if(N.current){N.current=!1;return}if(!w.current)return;const D=new Date(x.getFullYear(),x.getMonth(),x.getDate()).toISOString(),F=w.current.querySelector(`[data-date="${D}"]`);F&&F.focus()},[x]);const $=(()=>{if(Gt(x,h))return x;const D=new Date;return Gt(D,h)?D:new Date(h.getFullYear(),h.getMonth(),1)})(),C=lu(h),j=cu(h),E=[];for(let D=0;D<j;D++)E.push(null);for(let D=1;D<=C;D++)E.push(new Date(h.getFullYear(),h.getMonth(),D));const S=D=>{if(!Un(D,b,p,g)){if(u==="single")d(D);else if(u==="range"){const F=c||{start:null,end:null};!F.start||F.start&&F.end?f({start:D,end:null}):F.start&&!F.end&&(D<F.start?f({start:D,end:F.start}):f({start:F.start,end:D}))}}},A=()=>{const D=new Date(h.getFullYear(),h.getMonth()-1,1);k(D),t==null||t(D)},_=()=>{const D=new Date(h.getFullYear(),h.getMonth()+1,1);k(D),t==null||t(D)},R=(D,F)=>{let P=null;switch(D.key){case"ArrowLeft":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth(),F.getDate()-1);break;case"ArrowRight":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth(),F.getDate()+1);break;case"ArrowUp":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth(),F.getDate()-7);break;case"ArrowDown":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth(),F.getDate()+7);break;case"Home":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth(),1);break;case"End":D.preventDefault(),P=new Date(F.getFullYear(),F.getMonth()+1,0);break;case"Enter":case" ":D.preventDefault(),S(F);return}P&&(Gt(P,h)||k(new Date(P.getFullYear(),P.getMonth(),1)),v(P))},I=[];for(let D=0;D<E.length;D+=7)I.push(E.slice(D,D+7));return n.jsxs("div",L(M({ref:w,className:`${m("base","p")} ${r}`},s),{children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","mb")}`,children:[n.jsx(te,{variant:"iconOnly",size:"sm",onClick:A,"aria-label":"Previous month",children:n.jsx(Yt,{className:"h-4 w-4"})}),n.jsxs("div",{className:"text-sm font-semibold",children:[fu[h.getMonth()]," ",h.getFullYear()]}),n.jsx(te,{variant:"iconOnly",size:"sm",onClick:_,"aria-label":"Next month",children:n.jsx(Nt,{className:"h-4 w-4"})})]}),n.jsxs("div",{role:"grid","aria-label":"Calendar",children:[n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")} ${m("sm","mb")}`,children:uu.map(D=>n.jsx("div",{role:"columnheader",className:`text-center text-xs font-medium text-fg-tertiary ${m("xs","py")}`,children:D},D))}),I.map((D,F)=>n.jsx("div",{role:"row",className:`grid grid-cols-7 ${m("xs","gap")}`,children:D.map((P,z)=>{if(!P)return n.jsx("div",{role:"gridcell",className:"aspect-square"},`empty-${F}-${z}`);const B=u==="single"?jt(P,i):jt(P,(c==null?void 0:c.start)||null)||jt(P,(c==null?void 0:c.end)||null),U=u==="range"&&c?du(P,c.start,c.end):!1,oe=Un(P,b,p,g),H=jt(P,new Date),O=jt(P,x),K=jt(P,$);return n.jsx("button",{role:"gridcell",type:"button","data-date":P.toISOString(),tabIndex:K?0:-1,onClick:()=>S(P),onKeyDown:re=>R(re,P),className:`
|
|
7
7
|
aspect-square
|
|
8
8
|
text-sm
|
|
9
|
-
${
|
|
9
|
+
${G("md")}
|
|
10
10
|
transition-colors
|
|
11
11
|
focus:outline-none
|
|
12
12
|
focus:ring-2
|
|
13
13
|
focus:ring-offset-1
|
|
14
|
-
${
|
|
15
|
-
`,"aria-label":
|
|
16
|
-
fixed ${
|
|
14
|
+
${oe?"text-fg-disabled cursor-not-allowed opacity-50":B?"bg-surface-brand-strong text-fg-inverse font-semibold":U?"bg-surface-brand-muted text-fg-brand-emphasis":H?"border-2 border-line-brand font-semibold":O?"bg-surface-brand-muted":"hover:bg-surface-active"}
|
|
15
|
+
`,"aria-label":P.toDateString(),"aria-selected":B,"aria-disabled":oe,"aria-current":H?"date":void 0,children:P.getDate()},P.toISOString())})},`week-${F}`))]})]}))}function Rr({children:e,mode:t="single",value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,placeholder:u,format:d,showCalendarButton:f=!0,"aria-label":b,className:p=""}){const[g,h]=l.useState(!1),k=l.useRef(null),w=l.useRef(null);return l.useEffect(()=>{if(!g)return;const x=v=>{var j,E,S,A;const N=v.target,$=(E=(j=k.current)==null?void 0:j.contains(N))!=null?E:!1,C=(A=(S=w.current)==null?void 0:S.contains(N))!=null?A:!1;!$&&!C&&h(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[g]),l.useEffect(()=>{if(!g)return;const x=v=>{v.key==="Escape"&&h(!1)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[g]),e?n.jsx(bs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:e}):n.jsx("div",{ref:k,className:`relative ${p}`,children:n.jsxs(bs,{mode:t,value:r,defaultValue:s,onValueChange:a,minDate:o,maxDate:i,disabledDates:c,children:[n.jsx(Ds,{placeholder:u,format:d,showCalendarButton:f,"aria-label":b,onFocus:()=>h(!0)}),g&&n.jsx(no,{containerRef:k,popupRef:w,children:n.jsx(Fs,{})})]})})}function no({children:e,containerRef:t,popupRef:r}){const s=l.useRef(null),a=r||s,[o,i]=l.useState(null);if(l.useEffect(()=>{if(t!=null&&t.current){const u=t.current.getBoundingClientRect();i({top:u.bottom+window.scrollY+8,left:u.left+window.scrollX})}},[t]),!o)return null;const c=n.jsx("div",{ref:a,className:`
|
|
16
|
+
fixed ${xe("popover")}
|
|
17
17
|
bg-surface-overlay
|
|
18
|
-
${
|
|
19
|
-
${
|
|
18
|
+
${G("lg")}
|
|
19
|
+
${be("xl")}
|
|
20
20
|
border border-line-default
|
|
21
|
-
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?
|
|
21
|
+
`,role:"dialog","aria-modal":"false","aria-label":"Date picker calendar",style:{top:`${o.top}px`,left:`${o.left}px`},children:e});return typeof window!="undefined"?Xe.createPortal(c,document.body):c}Rr.Input=Ds;Rr.Calendar=Fs;Rr.Popup=no;const mu=Rr,Dr=l.createContext(void 0);function Fr(){const e=l.useContext(Dr);if(e===void 0)throw new Error("useTabsContext must be used within a Tabs component");return e}function pu(){return l.useContext(Dr)}function ao({defaultValue:e,value:t,onValueChange:r,orientation:s="horizontal",activationMode:a="automatic",children:o}){const[i,c]=l.useState(e||""),u=t!==void 0,d=u?t:i,f=l.useCallback(p=>{u||c(p),r==null||r(p)},[u,r]),b={value:d,onValueChange:f,orientation:s,activationMode:a};return n.jsx(Dr.Provider,{value:b,children:o})}function oo(o){var i=o,{children:e,className:t="",variant:r="default",orientation:s}=i,a=W(i,["children","className","variant","orientation"]);var p;const{orientation:c}=Fr(),u=(p=s!=null?s:c)!=null?p:"horizontal",d=l.useRef(null);l.useEffect(()=>{const g=d.current;if(!g)return;const h=k=>{var N;const w=Array.from(g.querySelectorAll('[role="tab"]:not([disabled])')),x=w.findIndex($=>$===document.activeElement);if(x===-1)return;let v=x;u==="horizontal"?k.key==="ArrowRight"?(k.preventDefault(),v=(x+1)%w.length):k.key==="ArrowLeft"&&(k.preventDefault(),v=(x-1+w.length)%w.length):k.key==="ArrowDown"?(k.preventDefault(),v=(x+1)%w.length):k.key==="ArrowUp"&&(k.preventDefault(),v=(x-1+w.length)%w.length),k.key==="Home"?(k.preventDefault(),v=0):k.key==="End"&&(k.preventDefault(),v=w.length-1),v!==x&&((N=w[v])==null||N.focus())};return g.addEventListener("keydown",h),()=>g.removeEventListener("keydown",h)},[u]);const f=r==="compact"&&u==="vertical"?"flex":"inline-flex",b=y(u==="vertical"?"flex-col":"flex-row",m("xs","gap"));return n.jsx("div",L(M({ref:d,role:"tablist","aria-orientation":u,className:y(f,b,m("xs","p"),"bg-surface-muted",G("md"),t)},a),{children:e}))}function io(c){var u=c,{value:e,children:t,disabled:r=!1,className:s="",onClick:a,onKeyDown:o}=u,i=W(u,["value","children","disabled","className","onClick","onKeyDown"]);const{value:d,onValueChange:f,orientation:b,activationMode:p}=Fr(),g=d===e,h=x=>{r||((p==="automatic"||g)&&f(e),a==null||a(x))},k=x=>{var v;p==="automatic"&&!r&&!g&&f(e),(v=i.onFocus)==null||v.call(i,x)},w=x=>{if(!r&&!(x.key==="ArrowRight"||x.key==="ArrowLeft"||x.key==="ArrowDown"||x.key==="ArrowUp"||x.key==="Home"||x.key==="End")){if(p==="manual"&&(x.key==="Enter"||x.key===" ")){x.preventDefault(),f(e);return}o==null||o(x)}};return n.jsx("button",L(M({type:"button",role:"tab","aria-selected":g,"aria-controls":`tabpanel-${e}`,id:`tab-${e}`,tabIndex:r?-1:g?0:-1,disabled:r,onClick:h,onFocus:k,onKeyDown:w,className:y("inline-flex","items-center","justify-center",m("sm","px"),m("xs","py"),ae("bodySmall"),Le("label"),"transition-colors","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-2",G("sm"),g?y("bg-surface-brand-strong","text-fg-inverse"):y("text-fg-secondary","hover:bg-surface-active"),r?"opacity-50 cursor-not-allowed":"cursor-pointer",s)},i),{children:t}))}function lo(o){var i=o,{value:e,children:t,forceMount:r=!1,className:s=""}=i,a=W(i,["value","children","forceMount","className"]);const{value:c}=Fr(),u=c===e;return!u&&!r?null:n.jsx("div",L(M({role:"tabpanel",id:`tabpanel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!u,className:`
|
|
22
22
|
${m("sm","mt")}
|
|
23
23
|
focus:outline-none
|
|
24
24
|
${s}
|
|
25
|
-
`},a),{children:t}))}function
|
|
25
|
+
`},a),{children:t}))}function _r(r){var s=r,{children:e}=s,t=W(s,["children"]);return n.jsx(ao,L(M({},t),{children:e}))}_r.List=oo;_r.Trigger=io;_r.Content=lo;const bu=_r,Lr=l.forwardRef(function(p,b){var g=p,{onSearch:t,onClear:r,loading:s=!1,showClearButton:a=!0,debounceMs:o=300,value:i,defaultValue:c,onChange:u,className:d=""}=g,f=W(g,["onSearch","onClear","loading","showClearButton","debounceMs","value","defaultValue","onChange","className"]);const[h,k]=l.useState(typeof c=="string"?c:""),[w,x]=l.useState(null),v=i!==void 0,N=v?i:h,$=N!=null&&String(N).length>0,C=S=>{const A=S.target.value;v||k(A),u==null||u(S),w&&clearTimeout(w);const _=setTimeout(()=>{t==null||t(A)},o);x(_)},j=()=>{v||k("");const S={target:{value:""},currentTarget:{value:""}};u==null||u(S),r==null||r(),t==null||t("")},E=S=>{var A;S.key==="Enter"&&t&&t(String(N||"")),(A=f.onKeyDown)==null||A.call(f,S)};return n.jsx("div",{className:y("relative",d),children:n.jsx(Me,L(M({ref:b},f),{type:"search",value:N,onChange:C,onKeyDown:E,leftIcon:s?n.jsx("div",{className:"animate-spin",children:n.jsx(ms,{className:"h-4 w-4"})}):n.jsx(ms,{className:"h-4 w-4"}),rightIcon:a&&$&&!s?n.jsx(te,{variant:"ghost",size:"sm",onClick:j,className:`h-auto ${m("xs","p")}`,"aria-label":"Clear search",children:n.jsx(Te,{className:"h-4 w-4"})}):void 0,className:y(m("lg","pr"))}))})});Lr.displayName="SearchInput";const _s=l.forwardRef(function({option:t,isHighlighted:r,onSelect:s,id:a,selected:o},i){const c=()=>{t.disabled||s(t)};return n.jsxs("div",{ref:i,id:a,role:"option","aria-selected":o!=null?o:r,"aria-disabled":t.disabled,onClick:c,className:`
|
|
26
26
|
flex
|
|
27
27
|
items-center
|
|
28
28
|
${m("sm","gap")}
|
|
@@ -33,23 +33,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
33
33
|
transition-colors
|
|
34
34
|
${r?"bg-surface-active":""}
|
|
35
35
|
${t.disabled?"opacity-50 cursor-not-allowed":"hover:bg-surface-hover"}
|
|
36
|
-
`,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});
|
|
36
|
+
`,children:[t.icon&&n.jsx("span",{className:"flex-shrink-0",children:t.icon}),n.jsx("span",{className:"flex-1",children:t.label})]})});_s.displayName="AutocompleteOption";const Pr=l.forwardRef(function({options:t,highlightedIndex:r,onSelect:s,loading:a=!1,emptyMessage:o="No options found",containerRef:i,showSelectAll:c=!1,allSelected:u=!1,onSelectAll:d,onDeselectAll:f,id:b,selectedValues:p,"aria-label":g,"aria-labelledby":h},k){const[w,x]=l.useState({top:0,left:0,width:0});l.useEffect(()=>{if(i.current){const N=i.current.getBoundingClientRect();x({top:N.bottom+window.scrollY+4,left:N.left+window.scrollX,width:N.width})}},[i]);const v=n.jsx("div",{ref:k,id:b,role:"listbox","aria-multiselectable":p?!0:void 0,"aria-label":h?void 0:g,"aria-labelledby":h,className:`
|
|
37
37
|
absolute
|
|
38
|
-
${
|
|
38
|
+
${xe("popover")}
|
|
39
39
|
bg-surface-overlay
|
|
40
|
-
${
|
|
41
|
-
${
|
|
40
|
+
${G("md")}
|
|
41
|
+
${be("lg")}
|
|
42
42
|
border
|
|
43
43
|
border-line-default
|
|
44
44
|
max-h-60
|
|
45
45
|
overflow-y-auto
|
|
46
46
|
${m("xs","py")}
|
|
47
|
-
`,style:{top:`${
|
|
47
|
+
`,style:{top:`${w.top}px`,left:`${w.left}px`,width:`${w.width}px`},children:a?n.jsx("div",{role:"status","aria-live":"polite",className:`
|
|
48
48
|
${m("md","p")}
|
|
49
49
|
text-sm
|
|
50
50
|
text-fg-tertiary
|
|
51
51
|
text-center
|
|
52
|
-
`,children:"Loading..."}):t.length===0?n.jsx("div",{className:`
|
|
52
|
+
`,children:"Loading..."}):t.length===0?n.jsx("div",{role:"status","aria-live":"polite",className:`
|
|
53
53
|
${m("md","p")}
|
|
54
54
|
text-sm
|
|
55
55
|
text-fg-tertiary
|
|
@@ -63,19 +63,19 @@ React keys must be passed directly to JSX without using spread:
|
|
|
63
63
|
hover:bg-surface-hover
|
|
64
64
|
border-b
|
|
65
65
|
border-line-default
|
|
66
|
-
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((h,j)=>n.jsx(Is,{option:h,isHighlighted:j===r,onSelect:s},h.value))]})});return typeof window!="undefined"?Ye.createPortal(y,document.body):null});Lr.displayName="AutocompleteList";const oo=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:p,className:b="",inputClassName:g="",size:x="md",label:w,"aria-label":y,"aria-labelledby":h,id:j},N){const k=l.useId(),$=j!=null?j:k,[S,I]=l.useState(typeof s=="string"?s:""),[C,A]=l.useState(!1),[L,D]=l.useState(-1),[T,R]=l.useState(""),_=l.useRef(null),V=l.useRef(null),B=l.useRef(null),X=l.useRef(null),Z=r!==void 0,oe=Z?r:S,P=T.trim()?p?p(t,T):t.filter(O=>O.label.toLowerCase().includes(T.toLowerCase())):t,Y=P.length>0,ee=O=>{const W=O.target.value;R(W),Z||I(W),a==null||a(W),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{A(!0),D(-1)},f)},J=O=>{var W;O.disabled||(Z||I(O.value),R(O.label),A(!1),D(-1),a==null||a(O.value),o==null||o(O),(W=V.current)==null||W.focus())},te=O=>{if(!C||P.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&A(!0);return}switch(O.key){case"ArrowDown":O.preventDefault(),D(W=>W<P.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),D(W=>W>0?W-1:P.length-1);break;case"Enter":O.preventDefault(),L>=0&&L<P.length&&J(P[L]);break;case"Escape":O.preventDefault(),A(!1),D(-1);break}};l.useEffect(()=>{if(!C)return;const O=W=>{_.current&&!_.current.contains(W.target)&&(A(!1),D(-1))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[C]),l.useEffect(()=>{if(L>=0&&B.current){const O=B.current.querySelectorAll('[role="option"]');O[L]&&typeof O[L].scrollIntoView=="function"&&O[L].scrollIntoView({block:"nearest",behavior:"smooth"})}},[L]),l.useEffect(()=>{if(oe){const O=t.find(W=>W.value===oe);R(O?O.label:oe)}else R("")},[oe,t]),l.useEffect(()=>{},[w,y,h,$]);const ae=C&&(Y||c||d);return n.jsxs("div",{ref:_,className:`relative ${b}`,children:[n.jsx(Ee,{ref:V||N,id:$,label:w,"aria-label":y,"aria-labelledby":h,value:T,onChange:ee,onKeyDown:te,onFocus:()=>A(!0),placeholder:i,disabled:u,size:x,rightIcon:c?n.jsx(Ma,{className:"h-4 w-4 animate-spin"}):n.jsx($r,{className:`h-4 w-4 transition-transform ${C?"rotate-180":""}`}),className:g}),ae&&n.jsx(Lr,{ref:B,options:P,highlightedIndex:L,onSelect:J,loading:c,emptyMessage:d,containerRef:_,"aria-labelledby":h,"aria-label":h?void 0:y||w})]})});oo.displayName="Autocomplete";const io=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:p=!1,className:b="",inputClassName:g="",size:x="md",label:w},y){const h=l.useId(),[j,N]=l.useState(s),[k,$]=l.useState(!1),[S,I]=l.useState(-1),[C,A]=l.useState(""),L=l.useRef(null),D=l.useRef(null),T=l.useRef(null),R=r!==void 0,_=R?r:j,V=t.filter(O=>_.includes(O.value)),X=(()=>{let O=t;return C.trim()&&(O=t.filter(W=>W.label.toLowerCase().includes(C.toLowerCase()))),O})(),Z=X.length>0,oe=O=>{const W=O.target.value;A(W),$(!0),I(-1)},H=O=>{if(O.disabled||f&&_.length>=f&&!_.includes(O.value))return;const W=_.includes(O.value)?_.filter(q=>q!==O.value):[..._,O.value];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value))),A("")},P=()=>{const O=X.filter(q=>!q.disabled).map(q=>q.value),W=[...new Set([..._,...O])];R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},Y=()=>{const O=X.map(q=>q.value),W=_.filter(q=>!O.includes(q));R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},ee=O=>{const W=_.filter(q=>q!==O);R||N(W),a==null||a(W),o==null||o(t.filter(q=>W.includes(q.value)))},J=O=>{if(!k||X.length===0){(O.key==="ArrowDown"||O.key==="Enter")&&$(!0),O.key==="Backspace"&&C===""&&_.length>0&&ee(_[_.length-1]);return}switch(O.key){case"ArrowDown":O.preventDefault(),I(W=>W<X.length-1?W+1:0);break;case"ArrowUp":O.preventDefault(),I(W=>W>0?W-1:X.length-1);break;case"Enter":O.preventDefault(),S>=0&&S<X.length&&H(X[S]);break;case"Escape":O.preventDefault(),$(!1),I(-1);break}};l.useEffect(()=>{if(!k)return;const O=W=>{L.current&&!L.current.contains(W.target)&&($(!1),I(-1),A(""))};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[k]);const te=X.filter(O=>!O.disabled).every(O=>_.includes(O.value)),ae=k&&(Z||c||d);return n.jsxs("div",{ref:L,className:v("relative",b),children:[n.jsx("label",{htmlFor:h,className:v("block",m("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:w}),n.jsxs("div",{className:v("flex","flex-wrap",m("sm","gap"),m("sm","p"),"border","border-line-default",U("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[V.map(O=>n.jsx($s,{onRemove:()=>ee(O.value),size:x==="sm"?"sm":x==="lg"?"lg":"md",children:O.label},O.value)),n.jsx("input",{id:h,ref:O=>{typeof y=="function"?y(O):y&&(y.current=O),D.current=O},type:"text",value:C,onChange:oe,onKeyDown:J,onFocus:()=>$(!0),placeholder:_.length===0?i:"",disabled:u,className:v("flex-1","min-w-32","outline-none","bg-transparent",g)})]}),ae&&n.jsx(Lr,{ref:T,"aria-label":w,options:X.map(O=>F(M({},O),{icon:_.includes(O.value)?n.jsx(cs,{className:v("h-4","w-4","text-fg-brand")}):O.icon})),highlightedIndex:S,onSelect:H,loading:c,emptyMessage:d,containerRef:L,showSelectAll:p&&X.length>0,allSelected:te,onSelectAll:P,onDeselectAll:Y})]})});io.displayName="MultiSelect";function bu({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:p,emptyIcon:b}){const[g,x]=l.useState(t),[w,y]=l.useState(null),h=e!==void 0,j=w!=null?w:h?e:g,N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},k=C=>{o||(h||x(C),u==null||u(C))},$=C=>{o||(y(C),d==null||d(C))},S=()=>{o||y(null)},I=C=>{const A=C+1,L=i&&j>=A-.5&&j<A,D=j>=A,T=v(N[s],ye("base"),!o&&"cursor-pointer",D||L?"text-fg-warning":"text-fg-disabled"),R=p||n.jsx(Et,{className:T,fill:D?"currentColor":"none"}),_=b||n.jsx(Et,{className:T,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>k(A),onMouseEnter:()=>$(A),onMouseLeave:S,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${A} out of ${r}`,onKeyDown:V=>{!o&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),k(A))},children:L?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(Et,{className:T,fill:"currentColor"}):R}),a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_]}):D?a==="filled"?n.jsx(Et,{className:T,fill:"currentColor"}):R:a==="filled"?n.jsx(Et,{className:T,fill:"none"}):_},C)};return n.jsxs("div",{className:v("inline-flex","items-center",m("xs","gap"),f),children:[n.jsx("div",{className:v("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${j} out of ${r}`:void 0,children:Array.from({length:r},(C,A)=>I(A))}),c&&n.jsxs("span",{className:v(m("sm","ml"),je("sm"),"text-fg-secondary"),children:[j.toFixed(i?1:0),"/",r]})]})}function gu({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:p}){const[b,g]=l.useState([]),[x,w]=l.useState(!1),y=l.useRef(null),h=D=>{if(D===0)return"0 Bytes";const T=1024,R=["Bytes","KB","MB","GB"],_=Math.floor(Math.log(D)/Math.log(T));return Math.round(D/Math.pow(T,_)*100)/100+" "+R[_]},j=D=>r&&D.size>r?`File size exceeds ${h(r)}`:null,N=D=>{const T=Array.from(D),R=[];return T.forEach(_=>{const V=j(_),B=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,X={file:_,id:B,error:V!=null?V:void 0,progress:c?0:void 0};if(i&&_.type.startsWith("image/")){const Z=new FileReader;Z.onload=oe=>{g(H=>H.map(P=>{var Y;return P.id===B?F(M({},P),{preview:(Y=oe.target)==null?void 0:Y.result}):P}))},Z.readAsDataURL(_)}R.push(X)}),R},k=D=>{const T=t?[...b,...D]:D,R=s?T.slice(0,s):T;g(R),a==null||a(R)},$=D=>{if(D.preventDefault(),w(!1),u)return;const T=D.dataTransfer.files;if(T.length>0){const R=N(T);k(R)}},S=D=>{D.preventDefault(),u||w(!0)},I=D=>{D.preventDefault(),w(!1)},C=D=>{if(D.target.files&&D.target.files.length>0){const T=N(D.target.files);k(T)}y.current&&(y.current.value="")},A=D=>{const T=b.filter(R=>R.id!==D);g(T),a==null||a(T),o==null||o(D)},L=()=>{var D;u||(D=y.current)==null||D.click()};return n.jsxs("div",{className:v(m("lg","gap"),"flex","flex-col",d),children:[(f||p)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:v("block",je("sm"),It("medium"),"text-fg-primary",m("xs","mb")),children:f}),p&&n.jsx("p",{className:v(je("sm"),"text-fg-secondary"),children:p})]}),n.jsxs("div",{onDrop:$,onDragOver:S,onDragLeave:I,onClick:L,className:v("relative","border-2","border-dashed",x?"border-line-brand":"border-line-default",U("lg"),m("lg","p"),"text-center","cursor-pointer",ye("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":v("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:y,type:"file",accept:e,multiple:t,onChange:C,disabled:u,className:"hidden"}),n.jsxs("div",{className:v("flex","flex-col","items-center",m("sm","gap")),children:[n.jsx(Bc,{className:v("h-8","w-8",x?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:v(je("sm"),It("medium"),"text-fg-primary"),children:x?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:v(je("xs"),"text-fg-secondary",m("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:v(je("xs"),"text-fg-secondary"),children:["Max size: ",h(r)]})]})]})]}),b.length>0&&n.jsx("div",{className:v("flex","flex-col",m("sm","gap")),children:b.map(D=>n.jsxs("div",{className:v("flex","items-center",m("md","gap"),m("base","p"),"border","border-line-default",U("md"),D.error?"bg-error-bg":"bg-surface-muted"),children:[i&&D.preview?n.jsx("img",{src:D.preview,alt:D.file.name,className:v("w-12","h-12","object-cover",U("md"))}):n.jsx(Sc,{className:v("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:v("flex-1","min-w-0"),children:[n.jsx("p",{className:v(je("sm"),It("medium"),"text-fg-primary","truncate"),children:D.file.name}),n.jsx("p",{className:v(je("xs"),"text-fg-secondary"),children:h(D.file.size)}),D.error&&n.jsxs("div",{className:v("flex","items-center",m("xs","gap"),m("xs","mt")),children:[n.jsx(ws,{className:v("h-3","w-3","text-fg-error")}),n.jsx("span",{className:v(je("xs"),"text-fg-error"),children:D.error})]}),c&&D.progress!==void 0&&n.jsx("div",{className:v(m("sm","mt")),children:n.jsx(Ns,{value:D.progress,size:"sm"})})]}),!D.error&&!c&&n.jsx(mr,{className:v("h-5","w-5","text-fg-success")}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:T=>{T.stopPropagation(),A(D.id)},className:`h-auto ${m("xs","p")}`,"aria-label":`Remove ${D.file.name}`,children:n.jsx(Ce,{className:"h-4 w-4"})})]},D.id))})]})}function Ds({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:p="",contentClassName:b=""}){const[g,x]=l.useState(s),w=l.useRef(null),y=l.useRef(null),[h,j]=l.useState({top:0,left:0}),N=l.useId(),k=r!==void 0,$=k?r:g;Sr($);const S=l.useCallback(()=>{if(!w.current||!y.current)return;const L=w.current.getBoundingClientRect(),D=y.current.getBoundingClientRect(),T=window.scrollY,R=window.scrollX;let _=0,V=0;o.startsWith("top")?(_=L.top+T-D.height-8,o==="top-start"?V=L.left+R:o==="top-end"?V=L.right+R-D.width:V=L.left+R+(L.width-D.width)/2):o.startsWith("bottom")?(_=L.bottom+T+8,o==="bottom-start"?V=L.left+R:o==="bottom-end"?V=L.right+R-D.width:V=L.left+R+(L.width-D.width)/2):o.startsWith("left")?(V=L.left+R-D.width-8,o==="left-start"?_=L.top+T:o==="left-end"?_=L.bottom+T-D.height:_=L.top+T+(L.height-D.height)/2):o.startsWith("right")&&(V=L.right+R+8,o==="right-start"?_=L.top+T:o==="right-end"?_=L.bottom+T-D.height:_=L.top+T+(L.height-D.height)/2);const B=8;_=Math.max(B,Math.min(_,window.innerHeight+T-D.height-B)),V=Math.max(B,Math.min(V,window.innerWidth+R-D.width-B)),j({top:_,left:V})},[o]);l.useEffect(()=>{if($){S();const L=()=>S(),D=()=>S();return window.addEventListener("resize",L),window.addEventListener("scroll",D,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",D,!0)}}},[$,o,S]),l.useEffect(()=>{$&&y.current&&setTimeout(S,0)},[$,S]);const I=l.useCallback(L=>{k||x(L),a==null||a(L)},[k,a]),C=l.useCallback(()=>{I(!1)},[I]);l.useEffect(()=>{if($&&d){const L=D=>{D.key==="Escape"&&C()};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)}},[$,d,C]),l.useEffect(()=>{if($&&u){const L=D=>{y.current&&w.current&&!y.current.contains(D.target)&&!w.current.contains(D.target)&&C()};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)}},[$,u,C]);const A=$?n.jsxs("div",{ref:y,className:`
|
|
66
|
+
`,onClick:u?f:d,children:u?"Deselect All":"Select All"}),t.map((N,$)=>n.jsx(_s,{id:b?`${b}-option-${$}`:void 0,option:N,isHighlighted:$===r,selected:p?p.includes(N.value):void 0,onSelect:s},N.value))]})});return typeof window!="undefined"?Xe.createPortal(v,document.body):null});Pr.displayName="AutocompleteList";const co=l.forwardRef(function({options:t,value:r,defaultValue:s,onChange:a,onSelect:o,placeholder:i="Type to search...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",debounceMs:f=300,filterOptions:b,className:p="",inputClassName:g="",size:h="md",label:k,"aria-label":w,"aria-labelledby":x,id:v},N){const $=l.useId(),C=v!=null?v:$,j=`${C}-listbox`,[E,S]=l.useState(typeof s=="string"?s:""),[A,_]=l.useState(!1),[R,I]=l.useState(-1),[D,F]=l.useState(""),P=l.useRef(null),z=l.useRef(null),B=l.useRef(null),U=l.useRef(null),oe=r!==void 0,H=oe?r:E,K=D.trim()?b?b(t,D):t.filter(V=>V.label.toLowerCase().includes(D.toLowerCase())):t,re=K.length>0,se=V=>{const Y=V.target.value;F(Y),oe||S(Y),a==null||a(Y),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{_(!0),I(-1)},f)},ce=V=>{var Y;V.disabled||(oe||S(V.value),F(V.label),_(!1),I(-1),a==null||a(V.value),o==null||o(V),(Y=z.current)==null||Y.focus())},Z=(V,Y)=>{const ne=K.length;if(ne===0)return-1;const de=V<0?Y===1?-1:0:V;for(let $e=1;$e<=ne;$e++){const et=((de+Y*$e)%ne+ne)%ne;if(!K[et].disabled)return et}return V},ee=V=>{if(!A||K.length===0){(V.key==="ArrowDown"||V.key==="Enter")&&_(!0);return}switch(V.key){case"ArrowDown":V.preventDefault(),I(Y=>Z(Y,1));break;case"ArrowUp":V.preventDefault(),I(Y=>Z(Y,-1));break;case"Enter":V.preventDefault(),R>=0&&R<K.length&&ce(K[R]);break;case"Escape":V.preventDefault(),_(!1),I(-1);break}};l.useEffect(()=>{if(!A)return;const V=Y=>{var de;const ne=Y.target;P.current&&!P.current.contains(ne)&&!((de=B.current)!=null&&de.contains(ne))&&(_(!1),I(-1))};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[A]),l.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]),l.useEffect(()=>{if(R>=0&&B.current){const V=B.current.querySelectorAll('[role="option"]');V[R]&&typeof V[R].scrollIntoView=="function"&&V[R].scrollIntoView({block:"nearest",behavior:"smooth"})}},[R]),l.useEffect(()=>{if(H){const V=t.find(Y=>Y.value===H);F(V?V.label:H)}else F("")},[H,t]),l.useEffect(()=>{},[k,w,x,C]);const J=A&&(re||c||!!d),Q=J&&R>=0&&R<K.length?`${j}-option-${R}`:void 0;return n.jsxs("div",{ref:P,className:`relative ${p}`,children:[n.jsx(Me,{ref:ks(z,N),id:C,label:k,"aria-label":w,"aria-labelledby":x,role:"combobox","aria-expanded":J,"aria-controls":J?j:void 0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":Q,value:D,onChange:se,onKeyDown:ee,onFocus:()=>_(!0),placeholder:i,disabled:u,size:h,rightIcon:c?n.jsx(Ia,{className:"h-4 w-4 animate-spin"}):n.jsx(Cr,{className:`h-4 w-4 transition-transform ${A?"rotate-180":""}`}),className:g}),J&&n.jsx(Pr,{ref:B,id:j,options:K,highlightedIndex:R,onSelect:ce,loading:c,emptyMessage:d,containerRef:P,"aria-labelledby":x,"aria-label":x?void 0:w||k})]})});co.displayName="Autocomplete";const uo=l.forwardRef(function({options:t,value:r,defaultValue:s=[],onChange:a,onSelect:o,placeholder:i="Select options...",loading:c=!1,disabled:u=!1,emptyMessage:d="No options found",maxSelected:f,showSelectAll:b=!1,className:p="",inputClassName:g="",size:h="md",label:k},w){const x=l.useId(),v=`${x}-list`,[N,$]=l.useState(s),[C,j]=l.useState(!1),[E,S]=l.useState(-1),[A,_]=l.useState(""),R=l.useRef(null),I=l.useRef(null),D=l.useRef(null),F=r!==void 0,P=F?r:N,z=t.filter(V=>P.includes(V.value)),U=(()=>{let V=t;return A.trim()&&(V=t.filter(Y=>Y.label.toLowerCase().includes(A.toLowerCase()))),V})(),oe=U.length>0,H=V=>{const Y=V.target.value;_(Y),j(!0),S(-1)},O=V=>{if(V.disabled||f&&P.length>=f&&!P.includes(V.value))return;const Y=P.includes(V.value)?P.filter(ne=>ne!==V.value):[...P,V.value];F||$(Y),a==null||a(Y),o==null||o(t.filter(ne=>Y.includes(ne.value))),_(""),S(-1)},K=()=>{const V=U.filter(de=>!de.disabled).map(de=>de.value),Y=[...new Set([...P,...V])],ne=f?Y.slice(0,f):Y;F||$(ne),a==null||a(ne),o==null||o(t.filter(de=>ne.includes(de.value)))},re=()=>{const V=U.map(ne=>ne.value),Y=P.filter(ne=>!V.includes(ne));F||$(Y),a==null||a(Y),o==null||o(t.filter(ne=>Y.includes(ne.value)))},se=V=>{if(u)return;const Y=P.filter(ne=>ne!==V);F||$(Y),a==null||a(Y),o==null||o(t.filter(ne=>Y.includes(ne.value)))},ce=V=>{if(!C||U.length===0){(V.key==="ArrowDown"||V.key==="Enter")&&j(!0),V.key==="Backspace"&&A===""&&z.length>0&&se(z[z.length-1].value);return}switch(V.key){case"ArrowDown":V.preventDefault(),S(Y=>Y<U.length-1?Y+1:0);break;case"ArrowUp":V.preventDefault(),S(Y=>Y>0?Y-1:U.length-1);break;case"Enter":V.preventDefault(),E>=0&&E<U.length&&O(U[E]);break;case"Escape":V.preventDefault(),j(!1),S(-1);break}};l.useEffect(()=>{if(!C)return;const V=Y=>{var de;const ne=Y.target;R.current&&!R.current.contains(ne)&&!((de=D.current)!=null&&de.contains(ne))&&(j(!1),S(-1),_(""))};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[C]);const Z=U.filter(V=>!V.disabled).every(V=>P.includes(V.value)),ee=C&&(oe||c||!!d),J=f!=null&&P.length>=f,Q=ee&&E>=0&&E<U.length?`${v}-option-${E}`:void 0;return n.jsxs("div",{ref:R,className:y("relative",p),children:[n.jsx("label",{htmlFor:x,className:y("block",m("sm","mb"),"text-sm","font-medium","text-fg-primary"),children:k}),n.jsxs("div",{className:y("flex","flex-wrap",m("sm","gap"),m("sm","p"),"border","border-line-default",G("md"),"min-h-10","focus-within:outline-none","focus-within:ring-2","focus-within:ring-offset-2","focus-within:border-line-brand","focus-within:ring-line-brand"),children:[z.map(V=>n.jsx(Ts,{disabled:u,onRemove:()=>se(V.value),size:h==="sm"?"sm":h==="lg"?"lg":"md",children:V.label},V.value)),n.jsx("input",{id:x,ref:V=>{typeof w=="function"?w(V):w&&(w.current=V),I.current=V},type:"text",role:"combobox","aria-expanded":ee,"aria-haspopup":"listbox","aria-controls":ee?v:void 0,"aria-autocomplete":"list","aria-activedescendant":Q,value:A,onChange:H,onKeyDown:ce,onFocus:()=>j(!0),placeholder:P.length===0?i:"",disabled:u,className:y("flex-1","min-w-32","outline-none","bg-transparent",g)})]}),ee&&n.jsx(Pr,{ref:D,id:v,selectedValues:P,"aria-label":k,options:U.map(V=>L(M({},V),{disabled:V.disabled||J&&!P.includes(V.value),icon:P.includes(V.value)?n.jsx(Aa,{className:y("h-4","w-4","text-fg-brand")}):V.icon})),highlightedIndex:E,onSelect:O,loading:c,emptyMessage:d,containerRef:R,showSelectAll:b&&U.length>0,allSelected:Z,onSelectAll:K,onDeselectAll:re})]})});uo.displayName="MultiSelect";function gu({value:e,defaultValue:t=0,max:r=5,size:s="md",variant:a="filled",readOnly:o=!1,allowHalf:i=!1,showValue:c=!1,onChange:u,onHover:d,className:f="",icon:b,emptyIcon:p}){const[g,h]=l.useState(t),[k,w]=l.useState(null),x=e!==void 0,v=k!=null?k:x?e:g,N={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},$=S=>{o||(x||h(S),u==null||u(S))},C=S=>{o||(w(S),d==null||d(S))},j=()=>{o||w(null)},E=S=>{const A=S+1,_=i&&v>=A-.5&&v<A,R=v>=A,I=y(N[s],je("base"),!o&&"cursor-pointer",R||_?"text-fg-warning":"text-fg-disabled"),D=b||n.jsx(At,{className:I,fill:R?"currentColor":"none"}),F=p||n.jsx(At,{className:I,fill:"none"});return n.jsx("span",{className:"relative inline-block",onClick:()=>$(A),onMouseEnter:()=>C(A),onMouseLeave:j,role:o?void 0:"button",tabIndex:o?void 0:0,"aria-label":o?void 0:`Rate ${A} out of ${r}`,onKeyDown:P=>{!o&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),$(A))},children:_?n.jsxs("span",{className:"relative inline-block",children:[n.jsx("span",{className:"absolute inset-0 overflow-hidden",style:{width:"50%"},children:a==="filled"?n.jsx(At,{className:I,fill:"currentColor"}):D}),a==="filled"?n.jsx(At,{className:I,fill:"none"}):F]}):R?a==="filled"?n.jsx(At,{className:I,fill:"currentColor"}):D:a==="filled"?n.jsx(At,{className:I,fill:"none"}):F},S)};return n.jsxs("div",{className:y("inline-flex","items-center",m("xs","gap"),f),children:[n.jsx("div",{className:y("flex","items-center"),role:o?"img":void 0,"aria-label":o?`Rating: ${v} out of ${r}`:void 0,children:Array.from({length:r},(S,A)=>E(A))}),c&&n.jsxs("span",{className:y(m("sm","ml"),Ne("sm"),"text-fg-secondary"),children:[v.toFixed(i?1:0),"/",r]})]})}function hu({accept:e,multiple:t=!1,maxSize:r,maxFiles:s,onFilesChange:a,onFileRemove:o,showPreview:i=!0,showProgress:c=!1,disabled:u=!1,className:d="",label:f,description:b}){const[p,g]=l.useState([]),[h,k]=l.useState(!1),w=l.useRef(null),x=R=>{if(R===0)return"0 Bytes";const I=1024,D=["Bytes","KB","MB","GB"],F=Math.floor(Math.log(R)/Math.log(I));return Math.round(R/Math.pow(I,F)*100)/100+" "+D[F]},v=R=>r&&R.size>r?`File size exceeds ${x(r)}`:null,N=R=>{const I=Array.from(R),D=[];return I.forEach(F=>{const P=v(F),z=`${Date.now()}-${Math.random().toString(36).slice(2,11)}`,B={file:F,id:z,error:P!=null?P:void 0,progress:c?0:void 0};if(i&&F.type.startsWith("image/")){const U=new FileReader;U.onload=oe=>{g(H=>H.map(O=>{var K;return O.id===z?L(M({},O),{preview:(K=oe.target)==null?void 0:K.result}):O}))},U.readAsDataURL(F)}D.push(B)}),D},$=R=>{const I=t?[...p,...R]:R,D=s?I.slice(0,s):I;g(D),a==null||a(D)},C=R=>{if(R.preventDefault(),k(!1),u)return;const I=R.dataTransfer.files;if(I.length>0){const D=N(I);$(D)}},j=R=>{R.preventDefault(),u||k(!0)},E=R=>{R.preventDefault(),k(!1)},S=R=>{if(R.target.files&&R.target.files.length>0){const I=N(R.target.files);$(I)}w.current&&(w.current.value="")},A=R=>{const I=p.filter(D=>D.id!==R);g(I),a==null||a(I),o==null||o(R)},_=()=>{var R;u||(R=w.current)==null||R.click()};return n.jsxs("div",{className:y(m("lg","gap"),"flex","flex-col",d),children:[(f||b)&&n.jsxs("div",{children:[f&&n.jsx("label",{className:y("block",Ne("sm"),_t("medium"),"text-fg-primary",m("xs","mb")),children:f}),b&&n.jsx("p",{className:y(Ne("sm"),"text-fg-secondary"),children:b})]}),n.jsxs("div",{onDrop:C,onDragOver:j,onDragLeave:E,onClick:_,className:y("relative","border-2","border-dashed",h?"border-line-brand":"border-line-default",G("lg"),m("lg","p"),"text-center","cursor-pointer",je("base"),"focus:border-line-focus",u?"opacity-50 cursor-not-allowed":y("hover:border-line-strong","focus:outline-none","focus:ring-2","focus:ring-offset-2")),role:"button",tabIndex:u?-1:0,"aria-label":"Upload files","aria-disabled":u,children:[n.jsx("input",{ref:w,type:"file",accept:e,multiple:t,onChange:S,disabled:u,className:"hidden"}),n.jsxs("div",{className:y("flex","flex-col","items-center",m("sm","gap")),children:[n.jsx(Uc,{className:y("h-8","w-8",h?"text-fg-brand":"text-fg-secondary")}),n.jsxs("div",{children:[n.jsx("span",{className:y(Ne("sm"),_t("medium"),"text-fg-primary"),children:h?"Drop files here":"Click to upload or drag and drop"}),e&&n.jsxs("p",{className:y(Ne("xs"),"text-fg-secondary",m("xs","mt")),children:["Accepted: ",e]}),r&&n.jsxs("p",{className:y(Ne("xs"),"text-fg-secondary"),children:["Max size: ",x(r)]})]})]})]}),p.length>0&&n.jsx("div",{className:y("flex","flex-col",m("sm","gap")),children:p.map(R=>n.jsxs("div",{className:y("flex","items-center",m("md","gap"),m("base","p"),"border","border-line-default",G("md"),R.error?"bg-error-bg":"bg-surface-muted"),children:[i&&R.preview?n.jsx("img",{src:R.preview,alt:R.file.name,className:y("w-12","h-12","object-cover",G("md"))}):n.jsx($c,{className:y("h-8","w-8","text-fg-secondary")}),n.jsxs("div",{className:y("flex-1","min-w-0"),children:[n.jsx("p",{className:y(Ne("sm"),_t("medium"),"text-fg-primary","truncate"),children:R.file.name}),n.jsx("p",{className:y(Ne("xs"),"text-fg-secondary"),children:x(R.file.size)}),R.error&&n.jsxs("div",{className:y("flex","items-center",m("xs","gap"),m("xs","mt")),children:[n.jsx(Er,{className:y("h-3","w-3","text-fg-error")}),n.jsx("span",{className:y(Ne("xs"),"text-fg-error"),children:R.error})]}),c&&R.progress!==void 0&&n.jsx("div",{className:y(m("sm","mt")),children:n.jsx(Cs,{value:R.progress,size:"sm"})})]}),!R.error&&!c&&n.jsx(br,{className:y("h-5","w-5","text-fg-success")}),n.jsx(te,{variant:"ghost",size:"sm",onClick:I=>{I.stopPropagation(),A(R.id)},className:`h-auto ${m("xs","p")}`,"aria-label":`Remove ${R.file.name}`,children:n.jsx(Te,{className:"h-4 w-4"})})]},R.id))})]})}function Ls({trigger:e,children:t,open:r,defaultOpen:s=!1,onOpenChange:a,placement:o="bottom",showCloseButton:i=!1,title:c,closeOnClickOutside:u=!0,closeOnEscape:d=!0,className:f="",triggerClassName:b="",contentClassName:p=""}){const[g,h]=l.useState(s),k=l.useRef(null),w=l.useRef(null),[x,v]=l.useState({top:0,left:0}),N=l.useId(),$=r!==void 0,C=$?r:g;Xt(C);const j=l.useCallback(()=>{if(!k.current||!w.current)return;const _=k.current.getBoundingClientRect(),R=w.current.getBoundingClientRect(),I=window.scrollY,D=window.scrollX;let F=0,P=0;o.startsWith("top")?(F=_.top+I-R.height-8,o==="top-start"?P=_.left+D:o==="top-end"?P=_.right+D-R.width:P=_.left+D+(_.width-R.width)/2):o.startsWith("bottom")?(F=_.bottom+I+8,o==="bottom-start"?P=_.left+D:o==="bottom-end"?P=_.right+D-R.width:P=_.left+D+(_.width-R.width)/2):o.startsWith("left")?(P=_.left+D-R.width-8,o==="left-start"?F=_.top+I:o==="left-end"?F=_.bottom+I-R.height:F=_.top+I+(_.height-R.height)/2):o.startsWith("right")&&(P=_.right+D+8,o==="right-start"?F=_.top+I:o==="right-end"?F=_.bottom+I-R.height:F=_.top+I+(_.height-R.height)/2);const z=8;F=Math.max(z,Math.min(F,window.innerHeight+I-R.height-z)),P=Math.max(z,Math.min(P,window.innerWidth+D-R.width-z)),v({top:F,left:P})},[o]);l.useEffect(()=>{if(C){j();const _=()=>j(),R=()=>j();return window.addEventListener("resize",_),window.addEventListener("scroll",R,!0),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",R,!0)}}},[C,o,j]),l.useEffect(()=>{C&&w.current&&setTimeout(j,0)},[C,j]);const E=l.useCallback(_=>{$||h(_),a==null||a(_)},[$,a]),S=l.useCallback(()=>{E(!1)},[E]);l.useEffect(()=>{if(C&&d){const _=R=>{R.key==="Escape"&&S()};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)}},[C,d,S]),l.useEffect(()=>{if(C&&u){const _=R=>{w.current&&k.current&&!w.current.contains(R.target)&&!k.current.contains(R.target)&&S()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)}},[C,u,S]);const A=C?n.jsxs("div",{ref:w,className:`
|
|
67
67
|
absolute
|
|
68
|
-
${
|
|
68
|
+
${xe("popover")}
|
|
69
69
|
bg-surface-overlay
|
|
70
|
-
${
|
|
71
|
-
${
|
|
70
|
+
${G("lg")}
|
|
71
|
+
${be("lg")}
|
|
72
72
|
border
|
|
73
73
|
border-line-default
|
|
74
74
|
min-w-48
|
|
75
75
|
max-w-96
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
`,style:{top:`${
|
|
76
|
+
${je("base")}
|
|
77
|
+
${p}
|
|
78
|
+
`,style:{top:`${x.top}px`,left:`${x.left}px`},role:"dialog","aria-modal":"false","aria-labelledby":c?N:void 0,children:[(c||i)&&n.jsxs("div",{className:`
|
|
79
79
|
flex
|
|
80
80
|
items-center
|
|
81
81
|
justify-between
|
|
@@ -83,55 +83,55 @@ React keys must be passed directly to JSX without using spread:
|
|
|
83
83
|
${m("md","py")}
|
|
84
84
|
border-b
|
|
85
85
|
border-line-default
|
|
86
|
-
`,children:[c&&n.jsx("h3",{id:N,className:`${
|
|
86
|
+
`,children:[c&&n.jsx("h3",{id:N,className:`${ae("bodySmall")} ${Le("h5")} text-fg-primary`,children:c}),i&&n.jsx(te,{variant:"ghost",size:"sm",onClick:S,className:`h-auto ${m("xs","p")}`,"aria-label":"Close popover",children:n.jsx(Te,{className:"h-4 w-4"})})]}),n.jsx("div",{className:`
|
|
87
87
|
${m("base","p")}
|
|
88
88
|
${c||i?"":m("md","p")}
|
|
89
|
-
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:
|
|
89
|
+
`,children:t})]}):null;return n.jsxs("div",{className:`inline-block ${f}`,children:[n.jsx("div",{ref:k,className:b,onClick:()=>E(!C),children:e}),typeof window!="undefined"&&Xe.createPortal(A,document.body)]})}function xu({value:e,defaultValue:t,format:r="24h",onChange:s,disabled:a=!1,label:o,error:i=!1,helperText:c,className:u=""}){const[d,f]=l.useState(t||""),[b,p]=l.useState(12),[g,h]=l.useState(0),[k,w]=l.useState("AM"),[x,v]=l.useState(!1),N=e!==void 0,$=N?e:d,C=l.useCallback(z=>{if(!z)return{hours:12,minutes:0,amPm:"AM"};if(r==="24h"){const[B,U]=z.split(":").map(Number);return{hours:Number.isFinite(B)?B:12,minutes:Number.isFinite(U)?U:0,amPm:"AM"}}else{const B=z.match(/(\d+):(\d+)\s*(AM|PM)/i);return B?{hours:parseInt(B[1]),minutes:parseInt(B[2]),amPm:B[3].toUpperCase()}:{hours:12,minutes:0,amPm:"AM"}}},[r]),j=(z,B,U)=>{if(r==="24h")return`${String(z).padStart(2,"0")}:${String(B).padStart(2,"0")}`;{const oe=U==="PM"&&z!==12?z+12:U==="AM"&&z===12?0:z;return`${String(oe===0?12:oe>12?oe-12:oe).padStart(2,"0")}:${String(B).padStart(2,"0")} ${U||"AM"}`}};l.useEffect(()=>{if($){const z=C($);p(z.hours),h(z.minutes),w(z.amPm)}},[$,C]);const E=z=>{const B=r==="24h"?Math.max(0,Math.min(23,z)):Math.max(1,Math.min(12,z));p(B);const U=j(B,g,r==="12h"?k:void 0);N||f(U),s==null||s(U)},S=z=>{const B=Math.max(0,Math.min(59,z));h(B);const U=j(b,B,r==="12h"?k:void 0);N||f(U),s==null||s(U)},A=()=>{const z=k==="AM"?"PM":"AM";w(z);const B=j(b,g,z);N||f(B),s==null||s(B)},_=()=>{if(r==="24h")E((b+1)%24);else{const z=b===12?1:b+1;E(z)}},R=()=>{if(r==="24h")E(b===0?23:b-1);else{const z=b===1?12:b-1;E(z)}},I=()=>{S((g+1)%60)},D=()=>{S(g===0?59:g-1)},F=z=>{a||(z.key==="Enter"||z.key===" "?(z.preventDefault(),v(B=>!B)):(z.key==="ArrowDown"||z.key==="ArrowUp")&&(z.preventDefault(),v(!0)))},P=n.jsx("div",{className:`${m("base","p")} min-w-48`,children:n.jsxs("div",{className:`flex items-center justify-center ${m("base","gap")}`,children:[n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(te,{variant:"ghost",size:"sm",onClick:_,disabled:a,"aria-label":"Increment hours",children:"↑"}),n.jsx("div",{role:"spinbutton",tabIndex:a?-1:0,"aria-label":"Hours","aria-valuenow":b,"aria-valuemin":r==="24h"?0:1,"aria-valuemax":r==="24h"?23:12,"aria-valuetext":String(b).padStart(2,"0"),onKeyDown:z=>{z.key==="ArrowUp"?(z.preventDefault(),_()):z.key==="ArrowDown"&&(z.preventDefault(),R())},className:"text-2xl font-mono font-semibold w-12 text-center",children:String(b).padStart(2,"0")}),n.jsx(te,{variant:"ghost",size:"sm",onClick:R,disabled:a,"aria-label":"Decrement hours",children:"↓"})]}),n.jsx("div",{className:"text-2xl font-semibold",children:":"}),n.jsxs("div",{className:`flex flex-col items-center ${m("sm","gap")}`,children:[n.jsx(te,{variant:"ghost",size:"sm",onClick:I,disabled:a,"aria-label":"Increment minutes",children:"↑"}),n.jsx("div",{role:"spinbutton",tabIndex:a?-1:0,"aria-label":"Minutes","aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":59,"aria-valuetext":String(g).padStart(2,"0"),onKeyDown:z=>{z.key==="ArrowUp"?(z.preventDefault(),I()):z.key==="ArrowDown"&&(z.preventDefault(),D())},className:"text-2xl font-mono font-semibold w-12 text-center",children:String(g).padStart(2,"0")}),n.jsx(te,{variant:"ghost",size:"sm",onClick:D,disabled:a,"aria-label":"Decrement minutes",children:"↓"})]}),r==="12h"&&n.jsxs("div",{className:`flex flex-col ${m("sm","gap")} ${m("sm","ml")}`,children:[n.jsx(te,{variant:k==="AM"?"primary":"outline",size:"sm",onClick:()=>A(),disabled:a,children:"AM"}),n.jsx(te,{variant:k==="PM"?"primary":"outline",size:"sm",onClick:()=>A(),disabled:a,children:"PM"})]})]})});return n.jsx("div",{className:u,children:n.jsx(Ls,{open:a?!1:x,onOpenChange:z=>{a||v(z)},trigger:n.jsx(Me,{label:o,value:$||j(b,g,r==="12h"?k:void 0),readOnly:!0,disabled:a,error:i,helperText:c,leftIcon:n.jsx(pc,{className:"h-4 w-4"}),className:"cursor-pointer",role:"combobox","aria-haspopup":"dialog","aria-expanded":!a&&x,onKeyDown:F}),placement:"bottom-start",showCloseButton:!0,title:"Select Time",children:P})})}function vu({value:e,defaultValue:t="#000000",format:r="hex",onChange:s,presets:a,showInput:o=!0,disabled:i=!1,label:c,className:u=""}){const[d,f]=l.useState(t),[b,p]=l.useState({r:0,g:0,b:0}),g=e!==void 0,h=g?e:d,k=j=>{const E=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(j);return E?{r:parseInt(E[1],16),g:parseInt(E[2],16),b:parseInt(E[3],16)}:{r:0,g:0,b:0}},w=(j,E,S)=>"#"+[j,E,S].map(A=>{const _=A.toString(16);return _.length===1?"0"+_:_}).join("");l.useEffect(()=>{if(h){const j=k(h);p(j)}},[h]);const x=j=>{const E=j.target.value;(/^#[0-9A-F]{6}$/i.test(E)||E==="")&&(g||f(E),s==null||s(E),E&&p(k(E)))},v=(j,E)=>{const S=L(M({},b),{[j]:Math.max(0,Math.min(255,E))});p(S);const A=w(S.r,S.g,S.b);g||f(A),s==null||s(A)},$=a||["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#808080","#ffa500"],C=n.jsxs("div",{className:`${m("base","p")} min-w-[280px]`,children:[n.jsx("div",{className:`
|
|
90
90
|
w-full
|
|
91
91
|
h-32
|
|
92
|
-
${
|
|
93
|
-
${
|
|
92
|
+
${G("md")}
|
|
93
|
+
${be("sm")}
|
|
94
94
|
${m("base","mb")}
|
|
95
95
|
border
|
|
96
96
|
border-line-default
|
|
97
|
-
`,style:{backgroundColor:
|
|
97
|
+
`,style:{backgroundColor:h}}),n.jsxs("div",{className:`${m("md","space-y")} ${m("base","mb")}`,children:[n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Red: ",b.r]}),n.jsx("input",{type:"range",min:"0",max:"255",value:b.r,onChange:j=>v("r",parseInt(j.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Green: ",b.g]}),n.jsx("input",{type:"range",min:"0",max:"255",value:b.g,onChange:j=>v("g",parseInt(j.target.value)),disabled:i,className:"w-full"})]}),n.jsxs("div",{children:[n.jsxs("label",{className:`block text-xs font-medium text-fg-secondary ${m("xs","mb")}`,children:["Blue: ",b.b]}),n.jsx("input",{type:"range",min:"0",max:"255",value:b.b,onChange:j=>v("b",parseInt(j.target.value)),disabled:i,className:"w-full"})]})]}),o&&n.jsx("div",{className:m("base","mb"),children:n.jsx(Me,{label:"Hex",value:h,onChange:x,disabled:i,placeholder:"#000000",className:"font-mono"})}),$.length>0&&n.jsxs("div",{children:[n.jsx("label",{className:`block text-xs font-medium text-fg-secondary ${m("sm","mb")}`,children:"Presets"}),n.jsx("div",{className:`grid grid-cols-10 ${m("xs","gap")}`,children:$.map((j,E)=>n.jsx("button",{type:"button",onClick:()=>{i||(g||f(j),s==null||s(j),p(k(j)))},disabled:i,className:`
|
|
98
98
|
w-6
|
|
99
99
|
h-6
|
|
100
|
-
${
|
|
100
|
+
${G("sm")}
|
|
101
101
|
border
|
|
102
102
|
border-line-emphasis
|
|
103
103
|
hover:scale-110
|
|
104
|
-
${
|
|
105
|
-
${
|
|
106
|
-
`,style:{backgroundColor:
|
|
104
|
+
${be("sm")}
|
|
105
|
+
${h.toLowerCase()===j.toLowerCase()?"ring-2 ring-offset-1 ring-line-brand":""}
|
|
106
|
+
`,style:{backgroundColor:j},"aria-label":`Select color ${j}`},E))})]})]});return n.jsx("div",{className:u,children:n.jsx(Ls,{trigger:n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[c&&n.jsx("label",{className:"text-sm font-medium text-fg-secondary",children:c}),n.jsx("div",{className:`
|
|
107
107
|
w-10
|
|
108
108
|
h-10
|
|
109
|
-
${
|
|
109
|
+
${G("md")}
|
|
110
110
|
border
|
|
111
111
|
border-line-emphasis
|
|
112
|
-
${
|
|
112
|
+
${be("sm")}
|
|
113
113
|
cursor-pointer
|
|
114
114
|
${i?"opacity-50 cursor-not-allowed":""}
|
|
115
|
-
`,style:{backgroundColor:
|
|
115
|
+
`,style:{backgroundColor:h}}),o&&n.jsx(Me,{value:h,onChange:x,disabled:i,placeholder:"#000000",className:"w-24 font-mono"})]}),placement:"bottom-start",showCloseButton:!0,title:"Pick a Color",children:C})})}const fo=l.createContext(void 0);function yu({children:e,value:t}){return n.jsx(fo.Provider,{value:t,children:e})}function wu(){const e=l.useContext(fo);if(!e)throw new Error("Drawer components must be used within Drawer");return e}const ku='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function mo(e){return Array.from(e.querySelectorAll(ku)).filter(t=>!t.disabled&&t.offsetParent!==null)}function Or(e,t){l.useEffect(()=>{if(!t)return;function r(s){if(s.key!=="Tab")return;const a=e.current;if(!a)return;const o=mo(a);if(o.length===0){s.preventDefault();return}const i=o[0],c=o[o.length-1],u=document.activeElement;if(!a.contains(u)){s.preventDefault(),(s.shiftKey?c:i).focus();return}s.shiftKey?u===i&&(s.preventDefault(),c.focus()):u===c&&(s.preventDefault(),i.focus())}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,e])}function Ps(e,t){l.useEffect(()=>{if(!t)return;const r=setTimeout(()=>{const s=e.current;if(!s)return;const a=mo(s);if(a.length>0){a[0].focus();return}s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus()},0);return()=>clearTimeout(r)},[t,e])}function Os({children:e,className:t="",showCloseButton:r=!1,title:s,"aria-label":a,"aria-labelledby":o}){const i=l.useId(),c=o!=null?o:s?i:void 0,{isOpen:u,closeDrawer:d,position:f,size:b,closeOnOverlayClick:p,closeOnEscape:g}=wu(),h=l.useRef(null);if(Xt(u),Or(h,u),Ps(h,u),l.useEffect(()=>{if(u&&g){const v=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}},[u,g,d]),l.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),l.useEffect(()=>{},[u,s,a,c]),!u)return null;const k={sm:f==="left"||f==="right"?"w-64":"h-64",md:f==="left"||f==="right"?"w-96":"h-96",lg:f==="left"||f==="right"?"w-[32rem]":"h-[32rem]",xl:f==="left"||f==="right"?"w-[42rem]":"h-[42rem]",full:f==="left"||f==="right"?"w-full":"h-full"},w={left:"left-0 top-0 bottom-0",right:"right-0 top-0 bottom-0",top:"top-0 left-0 right-0",bottom:"bottom-0 left-0 right-0"},x=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`
|
|
116
116
|
fixed
|
|
117
117
|
inset-0
|
|
118
118
|
bg-scrim
|
|
119
|
-
${
|
|
120
|
-
${
|
|
119
|
+
${xe("modal")}
|
|
120
|
+
${je("base")}
|
|
121
121
|
${u?"opacity-100":"opacity-0"}
|
|
122
|
-
`,onClick:
|
|
122
|
+
`,onClick:p?d:void 0,"aria-hidden":"true"}),n.jsxs("div",{ref:h,className:`
|
|
123
123
|
fixed
|
|
124
|
-
${
|
|
125
|
-
${
|
|
124
|
+
${w[f]}
|
|
125
|
+
${k[b]}
|
|
126
126
|
${f==="left"||f==="right"?"max-w-[90vw]":"max-h-[90vh]"}
|
|
127
127
|
bg-surface-overlay
|
|
128
|
-
${
|
|
129
|
-
${
|
|
130
|
-
${
|
|
128
|
+
${be("xl")}
|
|
129
|
+
${xe("modal")}
|
|
130
|
+
${je("base")}
|
|
131
131
|
flex
|
|
132
132
|
flex-col
|
|
133
133
|
${t}
|
|
134
|
-
`,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-label":c?void 0:a,onClick:
|
|
134
|
+
`,role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-label":c?void 0:a,onClick:v=>v.stopPropagation(),children:[(s||r)&&n.jsxs("div",{className:`
|
|
135
135
|
flex
|
|
136
136
|
items-center
|
|
137
137
|
justify-between
|
|
@@ -139,12 +139,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
139
139
|
${m("md","py")}
|
|
140
140
|
border-b
|
|
141
141
|
border-line-default
|
|
142
|
-
`,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(
|
|
142
|
+
`,children:[s?n.jsx("h2",{id:i,className:"text-lg font-semibold text-fg-primary",children:s}):n.jsx("span",{}),r&&n.jsx(te,{variant:"ghost",size:"sm",onClick:d,className:`h-auto ${m("xs","p")}`,"aria-label":"Close drawer",children:n.jsx(Te,{className:"h-4 w-4"})})]}),e]})]});return typeof window!="undefined"?Xe.createPortal(x,document.body):null}function po(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:`
|
|
143
143
|
${m("lg","p")}
|
|
144
144
|
border-b
|
|
145
145
|
border-line-default
|
|
146
146
|
${t}
|
|
147
|
-
`},r),{children:e}))}function
|
|
147
|
+
`},r),{children:e}))}function bo(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:`
|
|
148
148
|
${m("lg","p")}
|
|
149
149
|
border-t
|
|
150
150
|
border-line-default
|
|
@@ -152,24 +152,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
152
152
|
justify-end
|
|
153
153
|
${m("sm","gap")}
|
|
154
154
|
${t}
|
|
155
|
-
`},r),{children:e}))}function
|
|
155
|
+
`},r),{children:e}))}function Jt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,position:a="right",size:o="md",closeOnOverlayClick:i=!0,closeOnEscape:c=!0}){const[u,d]=l.useState(r),f=t!==void 0,b=f?t:u,p=h=>{f||d(h),s==null||s(h)},g=()=>{p(!1)};return n.jsx(yu,{value:{isOpen:b,closeDrawer:g,position:a,size:o,closeOnOverlayClick:i,closeOnEscape:c},children:e})}Jt.Content=Os;Jt.Header=po;Jt.Footer=bo;const go=l.createContext(void 0);function ju({children:e,value:t}){return n.jsx(go.Provider,{value:t,children:e})}function zs(){const e=l.useContext(go);if(!e)throw new Error("Menu components must be used within Menu");return e}function Nu(...e){return t=>{for(const r of e)r&&(typeof r=="function"?r(t):r.current=t)}}const Vs=l.forwardRef(function(i,o){var c=i,{children:t,asChild:r,onClick:s}=c,a=W(c,["children","asChild","onClick"]);var g,h;const{isOpen:u,setIsOpen:d}=zs(),f=k=>{s==null||s(k),d(!u)},b=l.Children.count(t)===1&&l.isValidElement(t);if(r===!0||r===void 0&&b){const k=l.Children.only(t),w=k.props.onClick,x=v=>{w==null||w(v),v.defaultPrevented||f(v)};return l.cloneElement(k,L(M({},a),{role:(g=k.props.role)!=null?g:"button",tabIndex:(h=k.props.tabIndex)!=null?h:0,"aria-haspopup":"menu","aria-expanded":u,onClick:x,ref:Nu(o,k.props.ref)}))}return n.jsx("div",L(M({ref:o,onClick:f,role:"button",tabIndex:0,"aria-haspopup":"menu","aria-expanded":u},a),{children:t}))});Vs.displayName="MenuTrigger";function ho({children:e,className:t="",align:r="start"}){const{isOpen:s,closeMenu:a,placement:o}=zs(),i=l.useRef(null),c=l.useRef(null),[u,d]=l.useState({top:0,left:0});if(l.useEffect(()=>{if(s){const b=document.querySelector('[aria-haspopup="menu"]');c.current=b}},[s]),l.useEffect(()=>{if(s&&i.current&&c.current){const b=()=>{const h=c.current.getBoundingClientRect(),k=i.current.getBoundingClientRect(),w=window.scrollY,x=window.scrollX;let v=0,N=0;o==="bottom"?(v=h.bottom+w+4,r==="start"?N=h.left+x:r==="end"?N=h.right+x-k.width:N=h.left+x+(h.width-k.width)/2):o==="top"?(v=h.top+w-k.height-4,r==="start"?N=h.left+x:r==="end"?N=h.right+x-k.width:N=h.left+x+(h.width-k.width)/2):o==="right"?(N=h.right+x+4,r==="start"?v=h.top+w:r==="end"?v=h.bottom+w-k.height:v=h.top+w+(h.height-k.height)/2):o==="left"&&(N=h.left+x-k.width-4,r==="start"?v=h.top+w:r==="end"?v=h.bottom+w-k.height:v=h.top+w+(h.height-k.height)/2);const $=8;v=Math.max($,Math.min(v,window.innerHeight+w-k.height-$)),N=Math.max($,Math.min(N,window.innerWidth+x-k.width-$)),d({top:v,left:N})};b();const p=()=>b(),g=()=>b();return window.addEventListener("resize",p),window.addEventListener("scroll",g,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",g,!0)}}},[s,o,r]),l.useEffect(()=>{if(s){const b=p=>{p.key==="Escape"&&a()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)}},[s,a]),l.useEffect(()=>{if(s){const b=p=>{i.current&&c.current&&!i.current.contains(p.target)&&!c.current.contains(p.target)&&a()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)}},[s,a]),!s)return null;const f=n.jsx("div",{ref:i,role:"menu",className:`
|
|
156
156
|
absolute
|
|
157
|
-
${
|
|
157
|
+
${xe("popover")}
|
|
158
158
|
bg-surface-overlay
|
|
159
|
-
${
|
|
160
|
-
${
|
|
159
|
+
${G("md")}
|
|
160
|
+
${be("lg")}
|
|
161
161
|
border
|
|
162
162
|
border-line-default
|
|
163
163
|
min-w-40
|
|
164
164
|
${m("xs","py")}
|
|
165
165
|
${t}
|
|
166
|
-
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?
|
|
166
|
+
`,style:{top:`${u.top}px`,left:`${u.left}px`},children:e});return typeof window!="undefined"?Xe.createPortal(f,document.body):null}const Ws=l.forwardRef(function(b,f){var p=b,{children:t,icon:r,rightIcon:s,disabled:a=!1,onClick:o,onSelect:i,hasSubmenu:c=!1,className:u=""}=p,d=W(p,["children","icon","rightIcon","disabled","onClick","onSelect","hasSubmenu","className"]);const{closeMenu:g}=zs(),h=w=>{a||(o==null||o(w),i==null||i(w),!c&&!w.defaultPrevented&&g())},k=w=>{a||(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),h(w))};return n.jsxs("div",L(M({ref:f,role:"menuitem",tabIndex:a?-1:0,"aria-disabled":a,onClick:h,onKeyDown:k,className:`
|
|
167
167
|
flex
|
|
168
168
|
items-center
|
|
169
169
|
${m("sm","gap")}
|
|
170
170
|
${m("sm","px")}
|
|
171
171
|
${m("sm","py")}
|
|
172
|
-
${
|
|
172
|
+
${ae("bodySmall")}
|
|
173
173
|
text-fg-primary
|
|
174
174
|
cursor-pointer
|
|
175
175
|
transition-colors
|
|
@@ -178,17 +178,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
178
178
|
focus:outline-none
|
|
179
179
|
${a?"opacity-50 cursor-not-allowed":""}
|
|
180
180
|
${u}
|
|
181
|
-
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(
|
|
181
|
+
`},d),{children:[r&&n.jsx("span",{className:"shrink-0",children:r}),n.jsx("span",{className:"flex-1",children:t}),c&&n.jsx(Nt,{className:"h-4 w-4 text-fg-secondary shrink-0"}),s&&!c&&n.jsx("span",{className:"shrink-0",children:s})]}))});Ws.displayName="MenuItem";function xo(r){var s=r,{className:e=""}=s,t=W(s,["className"]);return n.jsx("div",M({role:"separator",className:`
|
|
182
182
|
h-px
|
|
183
183
|
bg-line-default
|
|
184
184
|
${m("sm","my")}
|
|
185
185
|
${e}
|
|
186
|
-
`},t))}function
|
|
186
|
+
`},t))}function Zt({children:e,open:t,defaultOpen:r=!1,onOpenChange:s,placement:a="bottom"}){const[o,i]=l.useState(r),c=t!==void 0,u=c?t:o,d=b=>{c||i(b),s==null||s(b)},f=()=>{d(!1)};return n.jsx(ju,{value:{isOpen:u,setIsOpen:d,closeMenu:f,placement:a},children:e})}Zt.Trigger=Vs;Zt.Content=ho;Zt.Item=Ws;Zt.Separator=xo;function Su({items:e,type:t="single",defaultOpen:r,onValueChange:s,className:a=""}){const o=()=>r===void 0?[]:Array.isArray(r)?r:[r],[i,c]=l.useState(o),u=d=>{var b;if((b=e.find(p=>p.id===d))!=null&&b.disabled)return;let f;t==="single"?f=i.includes(d)?[]:[d]:f=i.includes(d)?i.filter(p=>p!==d):[...i,d],c(f),s==null||s(t==="single"?f[0]||"":f)};return n.jsx("div",{className:`${m("xs","space-y")} ${a}`,children:e.map(d=>{const f=i.includes(d.id),b=d.disabled;return n.jsxs("div",{className:y("border border-line-default",G("md"),"overflow-hidden",d.className),children:[n.jsxs("button",{type:"button",onClick:()=>u(d.id),disabled:b,className:y("w-full flex items-center justify-between",m("base","px"),m("md","py"),pe("label"),"text-left text-fg-primary bg-surface-base hover:bg-surface-hover","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-line-focus",je("base"),b?"opacity-50 cursor-not-allowed":"cursor-pointer",d.triggerClassName),"aria-expanded":f,"aria-controls":`accordion-content-${d.id}`,"aria-disabled":b,children:[n.jsx("span",{children:d.title}),n.jsx(Cr,{className:`
|
|
187
187
|
${m("sm","ml")}
|
|
188
|
-
${
|
|
188
|
+
${je("base")}
|
|
189
189
|
${f?"transform rotate-180":""}
|
|
190
|
-
${
|
|
191
|
-
`,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:v("grid",ye("base"),f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),"aria-hidden":!f,children:n.jsx("div",{className:"min-h-0 overflow-hidden",children:n.jsx("div",{className:v(m("base","px"),m("md","py"),"text-fg-secondary",d.contentClassName),children:d.content})})})]},d.id)})})}const go=l.createContext(void 0);function ms({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(b=>{i||o(b),r==null||r(b)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),p=l.useCallback(()=>{u(!1)},[u]);return n.jsx(go.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:p},children:e})}function Vs(){const e=l.useContext(go);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function ho(a){var o=a,{children:e,className:t,href:r}=o,s=z(o,["children","className","href"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Cr,F(M({href:r||"/",variant:"default",className:v("flex items-center font-semibold text-lg",t)},s),{children:e}))})}function xo({children:e,className:t}){return n.jsx("nav",{className:v("flex-1 flex items-center justify-center",m("base","gap"),"hidden md:flex",t),"aria-label":"Main navigation",children:e})}function vo({children:e,className:t}){return n.jsx("div",{className:v("flex-shrink-0 flex items-center",m("sm","gap"),t),children:e})}function yo({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Vs(),c=t||n.jsx(Dc,{className:"h-5 w-5"}),u=r||n.jsx(Ce,{className:"h-5 w-5"});return n.jsx(Q,{variant:s,size:a,onClick:i,className:v("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function wo({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Vs();return n.jsx(Yt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Fs,{className:v(m("base","p"),t),children:n.jsx("nav",{className:`flex flex-col ${m("sm","gap")}`,"aria-label":"Mobile navigation",children:e})})})}const Su={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},ut=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=z(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",F(M({ref:c,className:v("w-full",Su[t],m(r,"px"),m(s,"py"),a&&"mx-auto",e)},i),{children:o}))});ut.displayName="Container";const Lt=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=z(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?m(t,"gap-y"):m(t,"gap-x"),p={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},b={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",F(M({ref:c,className:v("flex",a==="column"?"flex-col":"flex-row",f,p[r],b[s],e)},i),{children:o}))});Lt.displayName="Stack";const $u=pe(v("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:fe("sm"),bordered:v("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function jt(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=z(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:e});return a?n.jsx(ms,{children:n.jsx("div",F(M({className:v(o)},i),{children:d}))}):n.jsx(ms,{children:n.jsx("header",F(M({className:v($u({variant:t}),r&&`sticky top-0 ${he("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(ut,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}jt.Logo=ho;jt.Navigation=xo;jt.Actions=vo;jt.Hamburger=yo;jt.MobileMenu=wo;const Hn=pe(v("flex","items-center",m("sm","gap")),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function Cu(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=z(d,["items","orientation","variant","className","aria-label","bare","pathname"]);const f=i!=null?i:typeof window!="undefined"?window.location.pathname:void 0,p=l.useMemo(()=>e.map(g=>{if(g.active!==void 0)return g;if(f){const x=f===g.href||g.href!=="/"&&f.startsWith(`${g.href}/`);return F(M({},g),{active:x})}return F(M({},g),{active:!1})}),[e,f]),b=n.jsx(n.Fragment,{children:p.map((g,x)=>{const w=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(Cr,{href:g.href,active:g.active,disabled:g.disabled,variant:w,className:v("flex items-center",m("sm","gap"),t==="vertical"&&"w-full justify-start",g.className),children:[g.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:g.icon}),n.jsx("span",{children:g.label}),g.badge&&n.jsx("span",{className:"ml-auto",children:g.badge})]},g.href||x)})});return o?n.jsx("div",F(M({className:v(Hn({orientation:t,variant:r}),s)},c),{children:b})):n.jsx("nav",F(M({className:v(Hn({orientation:t,variant:r}),s),"aria-label":a},c),{children:b}))}function ko(e){return n.jsx(Cu,F(M({},e),{pathname:e.pathname}))}const Eu=pe(v("w-full","flex","flex-col",m("sm","gap")),{variants:{variant:{default:v(m("base","mb")),compact:v(m("sm","mb"))}},defaultVariants:{variant:"default"}});function jo(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=z(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",F(M({className:v(Eu({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(qa,{items:r}),n.jsxs("div",{className:`flex items-start justify-between ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx($e,{variant:"heading",as:"h1",className:`${m("sm","mb")} text-2xl font-bold`,children:e}),t&&n.jsx($e,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:`flex items-center ${m("sm","gap")} flex-shrink-0`,children:s})]})]}))}function Mu(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=z(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:v(m("base","p"),"bg-surface-muted",U("md"),t),children:n.jsxs("form",F(M({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:m("base","space-y"),children:[n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Ee,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Dt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Ee,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(Q,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(Q,{variant:"primary",type:"submit",children:"Sign in"})]})]}))})}function Tu(d){var f=d,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c=""}=f,u=z(f,["isOpen","onClose","title","children","variant","showCloseButton","footer","className"]);const p=l.useRef(null);if(Sr(e),_s(p,e),Ls(p,e),l.useEffect(()=>{if(!e)return;const h=j=>{j.key==="Escape"&&t()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const b=["fixed","inset-0",he("modal"),"overflow-y-auto"],g=["fixed","inset-0","bg-scrim","transition-opacity"],x={default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"},w=["relative","bg-surface-overlay",U("lg"),fe("xl"),m("xl","my"),"mx-auto",x[a],m("lg","p"),c].filter(Boolean).join(" "),y=n.jsxs("div",{className:b.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":r?"modal-title":void 0,onClick:h=>{h.target===h.currentTarget&&t()},children:[n.jsx("div",{className:g.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",F(M({ref:p,tabIndex:-1,className:w,onClick:h=>h.stopPropagation()},u),{children:[r&&n.jsxs("div",{className:`flex justify-between items-center ${m("base","mb")}`,children:[n.jsx("h2",{id:"modal-title",className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ce,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:`flex justify-end ${m("base","mb")}`,children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Ce,{className:"h-6 w-6"})})}),n.jsx("div",{className:m("base","mb"),children:s}),i&&n.jsx("div",{className:`flex justify-end ${m("sm","gap")} ${m("base","mt")}`,children:i})]}))})]});return typeof window!="undefined"?Ye.createPortal(y,document.body):y}const Fr=Wa({displayName:"TableContext",errorMessage:"useTableContext must be used within a Table component"}),Au=Fr.Context,Ru=Fr.Provider;function Ve(){return Fr.useContextRequired()}function Iu(){return Fr.useContextOptional()}function ps({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:p,sortDirection:b,onSort:g,defaultSortColumn:x,defaultSortDirection:w="asc",filters:y,filterValues:h,onFilter:j,initialFilterValues:N={},selectable:k=!1,selectedRows:$,onSelectionChange:S,rowId:I,actions:C,emptyMessage:A="No data available",emptyStateTitle:L,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,onRowClick:_,resizable:V=!1,columnWidths:B,onColumnResize:X,virtualScrolling:Z,virtualScrollingOptions:oe,children:H}){const P=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),Y=a!==void 0,[ee,J]=l.useState(1),[te,ae]=l.useState(d),O=Y?a:ee,W=o!=null?o:te,q=l.useMemo(()=>P==="server"?i!=null?i:0:t.length,[P,i,t.length]),ce=l.useMemo(()=>Math.ceil(q/W),[q,W]),ie=p!==void 0,[be,we]=l.useState(x||""),[Ae,Jo]=l.useState(w),St=ie?p:be,Jt=ie?b||"asc":Ae,Gr=h!==void 0,[Zo,Qo]=l.useState(N),Zt=Gr?h:Zo,Kr=$!==void 0,[ei,ti]=l.useState([]),_e=Kr?$:ei,Qt=l.useMemo(()=>!y||y.length===0?t:t.filter(se=>y.every(me=>{const ke=Zt[me.key];if(!ke||ke==="")return!0;const tr=se[me.key];return me.type==="text"?String(tr||"").toLowerCase().includes(String(ke).toLowerCase()):String(tr)===String(ke)})),[t,y,Zt]),Yr=l.useMemo(()=>{if(ie&&g||!St)return Qt;const se=[...Qt];return se.sort((me,ke)=>{const tr=me[St],ai=ke[St],xn=String(tr||"").localeCompare(String(ai||""));return Jt==="asc"?xn:-xn}),se},[Qt,St,Jt,g,ie]),We=l.useMemo(()=>{if(P==="server")return Yr;const se=(O-1)*W,me=se+W;return Yr.slice(se,me)},[Yr,P,O,W]),$t=l.useCallback((se,me)=>{var ke;return I?I(se):((ke=se==null?void 0:se.id)==null?void 0:ke.toString())||me.toString()},[I]),er=l.useMemo(()=>!k||We.length===0?!1:We.every((se,me)=>{const ke=$t(se,me);return _e.includes(ke)}),[k,We,_e,$t]),dn=l.useMemo(()=>{if(!k)return!1;const se=_e.length;return se>0&&se<We.length},[k,_e.length,We.length]),Ct=l.useCallback(se=>{Y?c==null||c(se):J(se)},[Y,c]),un=l.useCallback(se=>{u?u(se):ae(se),Ct(1)},[u,Ct]),fn=l.useCallback((se,me)=>{ie?g==null||g(se,me):(we(se),Jo(me))},[ie,g]),mn=l.useCallback(se=>{Gr?j==null||j(se):Qo(se),Ct(1)},[Gr,j,Ct]),gt=l.useCallback(se=>{Kr?S==null||S(se):ti(se)},[Kr,S]),pn=l.useCallback(se=>{const me=_e.includes(se)?_e.filter(ke=>ke!==se):[..._e,se];gt(me)},[_e,gt]),bn=l.useCallback(()=>{if(er)gt([]);else{const se=We.map((me,ke)=>$t(me,ke));gt(se)}},[er,We,$t,gt]),[ri,si]=l.useState({}),qr=B!==void 0,gn=qr?B:ri,hn=l.useCallback((se,me)=>{qr?X==null||X(se,me):si(ke=>F(M({},ke),{[se]:me}))},[qr,X]),ni=l.useMemo(()=>({columns:e,data:t,paginatedData:We,loading:r,paginationState:{page:O,pageSize:W,total:q,totalPages:ce},sortState:{column:St,direction:Jt},filterState:{values:Zt,config:y||[]},selectionState:{selectedRows:_e,isAllSelected:er,isIndeterminate:dn},paginationMode:P,selectable:k,rowId:I,actions:C,resizable:V,columnWidths:gn,virtualScrolling:Z,virtualScrollingOptions:oe,emptyMessage:A,emptyStateTitle:L,emptyStateMessage:D,emptyStateIllustration:T,emptyStateAction:R,setPage:Ct,setPageSize:un,setSorting:fn,setFilters:mn,setSelection:gt,toggleRowSelection:pn,toggleSelectAll:bn,getRowId:$t,setColumnWidth:hn,onPageChange:c,onPageSizeChange:u,onSort:g,onFilter:j,onSelectionChange:S,onRowClick:_,onColumnResize:X}),[e,t,We,r,O,W,q,ce,St,Jt,Zt,y,_e,er,dn,P,k,I,C,A,L,D,T,R,Ct,un,fn,mn,gt,pn,bn,$t,hn,c,u,g,j,S,_,X,V,gn,Z,oe]);return n.jsx(Ru,{value:ni,children:H})}function Ws(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=z(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:p,onSort:b}=Ve(),g=l.useRef(null),x=l.useRef(null),w=l.useRef(null),y=()=>{if(!e.sortable||!b&&!p)return;const S=f.column===e.key&&f.direction==="asc"?"desc":"asc";b?b(e.key,S):p(e.key,S)},h=S=>{k&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),y())},j=S=>{if(S.preventDefault(),S.stopPropagation(),!x.current||!s)return;const I=r||x.current.offsetWidth;w.current={x:S.clientX,width:I};const C=L=>{if(!w.current)return;const D=L.clientX-w.current.x,T=w.current.width+D,R=Math.max(a,o?Math.min(T,o):T);s(e.key,R)},A=()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A),w.current=null};document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)},N=f.column===e.key,k=e.sortable&&(b||p),$=N?f.direction:void 0;return n.jsx("th",F(M({ref:x,scope:"col",role:"columnheader","aria-sort":N?$==="asc"?"ascending":"descending":k?"none":void 0,className:`${m("lg","px")} ${m("md","py")} text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${k?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:k?y:void 0,onKeyDown:k?h:void 0,tabIndex:k?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:`flex items-center ${m("sm","gap")} relative`,children:[n.jsx("span",{children:e.label}),N&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:g,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:j,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Hs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:p}=Ve();return n.jsxs("tr",F(M({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} w-12`,"aria-label":"Select all",children:n.jsx(Mr,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:m("none","my"),indeterminate:i.isIndeterminate})}),a.map(b=>n.jsx(Ws,{column:b,resizable:d,width:f==null?void 0:f[b.key],onResize:p},b.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12`,"aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Bs(r){var s=r,{className:e=""}=s,t=z(s,["className"]);return Ve(),n.jsx("thead",F(M({className:`bg-surface-subtle sticky top-0 ${he("sticky")} ${e}`},t),{children:n.jsx(Hs,{})}))}function Us(a){var o=a,{column:e,row:t,className:r=""}=o,s=z(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",F(M({className:`${m("lg","px")} ${m("base","py")} whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function Du(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=z(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",F(M({className:`inline-flex ${s}`},a),{children:n.jsx(Za,{trigger:n.jsx(Q,{variant:"ghost",size:"sm","aria-label":"Row actions",className:`h-8 w-8 ${m("none","p")}`,children:n.jsx(vc,{className:"h-4 w-4"})}),items:c,align:r})}))}function Gs(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=z(o,["row","align","className"]);const{actions:i}=Ve();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(Du,M({row:e,actions:c,align:t,className:r},s))}function hr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=z(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:p,getRowId:b,actions:g,onRowClick:x}=Ve(),w=b(e,t),y=f.selectedRows.includes(w),h=j=>{s&&s(j),x&&x(e)};return n.jsxs("tr",F(M({role:"row","aria-selected":d?y:void 0,"aria-rowindex":t+1,className:`hover:bg-surface-hover ${y?"bg-surface-selected":""} ${r}`,onClick:h,style:a},o),{children:[d&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Mr,{checked:y,onChange:()=>p(w),"aria-label":`Select row ${w}`,className:m("none","my")})}),u.map(j=>n.jsx(Us,{column:j,row:e},String(j.key))),g&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")} text-right`,children:n.jsx(Gs,{row:e})})]}))}function Ks(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Ve();return o||i||c?n.jsxs("div",F(M({className:e},t),{children:[n.jsx(Ja,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:`${m("base","mt")} flex justify-center`,children:u})]})):n.jsx("div",F(M({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function No(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((w,y)=>({index:y,start:y*r,end:(y+1)*r,size:r}));const b=Math.max(0,Math.floor(i/r)-a),g=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,x=[];for(let w=b;w<g;w++)x.push({index:w,start:w*r,end:(w+1)*r,size:r});return x},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const b=u.current,g=()=>{c(b.scrollTop)};return b.addEventListener("scroll",g,{passive:!0}),()=>b.removeEventListener("scroll",g)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:b=>{if(!u.current)return;const g=b*r;u.current.scrollTop=g,c(g)},containerRef:u}}function Ys(s){var a=s,{children:e,className:t=""}=a,r=z(a,["children","className"]);var w,y;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:p}=Ve(),b=c.length+(u?1:0)+(d?1:0),g=No(o,{itemHeight:(p==null?void 0:p.itemHeight)||50,containerHeight:p==null?void 0:p.containerHeight,overscan:(p==null?void 0:p.overscan)||5,enabled:f||!1}),x=l.useMemo(()=>f&&g.virtualItems.length>0?g.virtualItems.map(h=>({row:o[h.index],index:h.index})).filter(h=>h.row!==void 0):o.map((h,j)=>({row:h,index:j})),[f,g.virtualItems,o]);return i?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((h,j)=>n.jsx("tr",{children:Array.from({length:b}).map((N,k)=>n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(La,{className:"h-4 w-full"})},k))},j))})):o.length===0?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:b,className:`${m("lg","px")} ${m("3xl","py")}`,children:n.jsx(Ks,{})})})})):typeof e=="function"?n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((h,j)=>e(h,j))})):n.jsx("tbody",F(M({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&g.virtualItems.length>0&&x.length>0?n.jsxs(n.Fragment,{children:[((w=g.virtualItems[0])==null?void 0:w.start)>0&&n.jsx("tr",{style:{height:g.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})}),x.map(({row:h,index:j})=>n.jsx(hr,{row:h,rowIndex:j},j)),g.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,g.totalHeight-(((y=g.virtualItems[g.virtualItems.length-1])==null?void 0:y.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:b})})]}):x.map(({row:h,index:j})=>n.jsx(hr,{row:h,rowIndex:j},j))}))}function _u(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=z(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,p]=l.useState(!1),b=Object.values(u).some(h=>h!==""&&h!==null&&h!==void 0),g=(h,j)=>{const N=F(M({},u),{[h]:j});d(N),t(N)},x=()=>{const h={};e.forEach(j=>{h[j.key]=""}),d(h),t(h)},w=h=>{const j=F(M({},u),{[h]:""});d(j),t(j)},y=Object.values(u).filter(h=>h!==""&&h!==null&&h!==void 0).length;return n.jsx("div",F(M({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:`${m("base","px")} ${m("md","py")} sm:${m("lg","px")}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>p(!f),className:`flex items-center ${m("sm","gap")} text-sm font-medium text-fg-secondary hover:text-fg-primary`,children:[n.jsx(Cc,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),y>0&&n.jsx("span",{className:`inline-flex items-center ${m("sm","px")} ${m("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:y})]}),b&&s&&n.jsx(Q,{variant:"ghost",size:"sm",onClick:x,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{className:`${m("base","mt")} grid grid-cols-1 ${m("base","gap")} sm:grid-cols-2 lg:grid-cols-3`,children:e.map(h=>{const j=u[h.key],N=j==null?"":String(j);return n.jsxs("div",{className:m("xs","space-y"),children:[n.jsx(Dt,{htmlFor:`filter-${h.key}`,variant:"optional",children:h.label}),n.jsxs("div",{className:"relative",children:[h.type==="text"&&n.jsx(Ee,{id:`filter-${h.key}`,type:"text",value:N,onChange:k=>g(h.key,k.target.value),placeholder:h.placeholder||`Filter by ${h.label.toLowerCase()}`,size:"sm",variant:"outlined"}),h.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(Er,{id:`filter-${h.key}`,options:[{value:"",label:`All ${h.label}`},...h.options||[]],value:N,onChange:k=>g(h.key,k.target.value)}),N&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]}),h.type==="date"&&n.jsx(Ee,{id:`filter-${h.key}`,type:"date",value:N,onChange:k=>g(h.key,k.target.value),size:"sm",variant:"outlined"}),N&&h.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>w(h.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${h.label} filter`,children:n.jsx(Ce,{className:"h-4 w-4"})})]})]},h.key)})})]})}))}function qs(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=z(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Ve();return o.config.length===0?null:n.jsx(_u,M({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Lu(f){var p=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=p,d=z(p,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const b=Math.ceil(r/t),g=r===0?0:(e-1)*t+1,x=Math.min(e*t,r),w=()=>{e>1&&s(e-1)},y=()=>{e<b&&s(e+1)},h=()=>{e>1&&s(1)},j=()=>{e<b&&s(b)};return n.jsxs("div",F(M({className:`flex items-center justify-between ${m("base","px")} ${m("md","py")} bg-surface-base border-t border-line-default sm:${m("lg","px")} ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(Q,{variant:"outline",size:"sm",onClick:w,disabled:e===1,children:"Previous"}),n.jsx(Q,{variant:"outline",size:"sm",onClick:y,disabled:e>=b,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs($e,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:g})," to"," ",n.jsx("span",{className:"font-medium",children:x})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:`flex items-center ${m("base","gap")}`,children:[i&&n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsx($e,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(Er,{"aria-label":"Items per page",options:o.map(N=>({value:N.toString(),label:N.toString()})),value:t.toString(),onChange:N=>{const k=parseInt(N.target.value);a(k),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:`flex items-center ${m("xs","gap")}`,"aria-label":"Pagination",children:[n.jsxs(Q,{variant:"ghost",size:"sm",onClick:h,disabled:e===1,"aria-label":"First page",children:[n.jsx(Gt,{className:"h-4 w-4"}),n.jsx(Gt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:w,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Gt,{className:"h-4 w-4"})}),n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:Array.from({length:Math.min(5,b)},(N,k)=>{let $;return b<=5||e<=3?$=k+1:e>=b-2?$=b-4+k:$=e-2+k,n.jsx(Q,{variant:e===$?"primary":"ghost",size:"sm",onClick:()=>s($),className:"min-w-10","aria-label":`Page ${$}`,"aria-current":e===$?"page":void 0,children:$},$)})}),n.jsx(Q,{variant:"ghost",size:"sm",onClick:y,disabled:e>=b,"aria-label":"Next page",children:n.jsx(yt,{className:"h-4 w-4"})}),n.jsxs(Q,{variant:"ghost",size:"sm",onClick:j,disabled:e>=b,"aria-label":"Last page",children:[n.jsx(yt,{className:"h-4 w-4"}),n.jsx(yt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Xs(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=z(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Ve();return f==="client"&&c.totalPages<=1?null:n.jsx(Lu,M({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Me(e){const c=e,{className:t="","aria-label":r,"aria-labelledby":s}=c,a=z(c,["className","aria-label","aria-labelledby"]),o="children"in e&&e.children!==void 0,i=o?a:Fu(a);return o?n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsx(ps,F(M({},i),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow ${U("lg")} overflow-hidden ${t}`,children:n.jsxs(ps,F(M({},i),{children:[i.filters&&i.filters.length>0&&n.jsx(qs,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":r,"aria-labelledby":s,"aria-rowcount":i.total||i.data.length,"aria-colcount":i.columns.length+(i.selectable?1:0)+(i.actions?1:0),children:[n.jsx(Bs,{}),n.jsx(Ys,{})]})}),n.jsx(Xs,{})]}))})}function Fu(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,pagination:b,filters:g,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:j,onRowClick:N,paginationMode:k,defaultPageSize:$,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:L}=e;let D=k||"auto";return D==="auto"&&(D=b&&b.total!==void 0?"server":"client"),{columns:t,data:r,loading:s,paginationMode:D,page:b==null?void 0:b.page,pageSize:b==null?void 0:b.pageSize,total:b==null?void 0:b.total,onPageChange:b==null?void 0:b.onPageChange,onPageSizeChange:b==null?void 0:b.onPageSizeChange,defaultPageSize:$||(b==null?void 0:b.pageSize)||10,pageSizeOptions:b==null?void 0:b.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:g==null?void 0:g.config,filterValues:g==null?void 0:g.initialValues,onFilter:g==null?void 0:g.onFilter,initialFilterValues:g==null?void 0:g.initialValues,selectable:x,selectedRows:w,onSelectionChange:y,rowId:h,actions:j,onRowClick:N,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:p,resizable:S,columnWidths:I,onColumnResize:C,virtualScrolling:A,virtualScrollingOptions:L,children:n.jsx(n.Fragment,{})}}Me.Header=Bs;Me.HeaderRow=Hs;Me.HeaderCell=Ws;Me.Body=Ys;Me.Row=hr;Me.Cell=Us;Me.Filters=qs;Me.Pagination=Xs;Me.EmptyState=Ks;Me.Actions=Gs;function Pu(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),p=l.useRef(null),b=l.useCallback((N,k)=>{const $=Math.max(r,s?Math.min(k,s):k);i(S=>F(M({},S),{[N]:$}))},[r,s]),g=l.useCallback(()=>{i(t)},[t]),x=l.useCallback((N,k,$)=>{a&&(u(!0),f(N),p.current={startX:k,startWidth:$})},[a]),w=l.useCallback(N=>{if(!c||!d||!p.current)return;const k=N-p.current.startX,$=p.current.startWidth+k;b(d,$)},[c,d,b]),y=l.useCallback(()=>{u(!1),f(null),p.current=null},[]),h=l.useRef(void 0),j=l.useRef(void 0);return typeof window!="undefined"&&(h.current=N=>{c&&w(N.clientX)},j.current=()=>{c&&y()},c?(document.addEventListener("mousemove",h.current),document.addEventListener("mouseup",j.current)):(h.current&&document.removeEventListener("mousemove",h.current),j.current&&document.removeEventListener("mouseup",j.current))),{columnWidths:o,setColumnWidth:b,resetColumnWidths:g,isResizing:c,resizingColumn:d,startResize:x,handleResize:w,endResize:y}}const Pr=l.createContext(null);function Ou(){return l.useContext(Pr)}function Xe(){const e=l.useContext(Pr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Rt={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Js({children:e,variant:t=Rt.variant,navigationWidth:r=Rt.navigationWidth,contentWidth:s=Rt.contentWidth,animationDuration:a=Rt.animationDuration,animationEasing:o=Rt.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Pr.Provider,{value:i,children:e})}const Or=l.createContext(null);function zu(){return l.useContext(Or)}function Nt(){const e=l.useContext(Or);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const Ne={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function Zs({children:e,mode:t=Ne.mode,resizable:r=Ne.resizable,minWidth:s=Ne.minWidth,maxWidth:a=Ne.maxWidth,snapPoints:o=Ne.snapPoints,responsive:i=Ne.responsive,mobileBreakpoint:c=Ne.mobileBreakpoint,mobileVariant:u=Ne.mobileVariant,overlayBackdrop:d=Ne.overlayBackdrop,persistState:f=Ne.persistState,persistWidth:p=Ne.persistWidth,storageKey:b=Ne.storageKey,keyboardShortcut:g=Ne.keyboardShortcut,enableKeyboardShortcut:x=Ne.enableKeyboardShortcut}){const w=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:p,storageKey:b,keyboardShortcut:g,enableKeyboardShortcut:x}),[t,r,s,a,o,i,c,u,d,f,p,b,g,x]);return n.jsx(Or.Provider,{value:w,children:e})}const zr=l.createContext(null);function Vu(){return l.useContext(zr)}function Je(){const e=l.useContext(zr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function xr(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function Wu(e,t){return e===void 0||t===void 0?!0:e<t}function ur(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Hu=["ctrl","cmd","control","shift","alt","meta","option"];function So(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Hu.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Bu(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function $o({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){const c=ur(e,t,r),[u,d]=l.useState(c),[f,p]=l.useState(!1),b=l.useRef(0),g=l.useRef(c),x=l.useCallback(j=>{let N=ur(j,t,r);if(s&&s.length>0){const k=s.reduce(($,S)=>{const I=Math.abs(N-S),C=Math.abs(N-$);return I<C?S:$},s[0]);Math.abs(N-k)<=a&&(N=k)}d(N),o==null||o(N)},[t,r,s,a,o]),w=l.useCallback(j=>{if(!i||!f)return;const N=j.clientX-b.current,k=g.current+N;x(k)},[i,f,x]),y=l.useCallback(()=>{i&&(p(!1),b.current=0,g.current=u)},[i,u]),h=l.useCallback(j=>{i&&(j.preventDefault(),j.stopPropagation(),p(!0),b.current=j.clientX,g.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.body.style.userSelect="",document.body.style.cursor=""}},[f,w,y]),l.useEffect(()=>{f||d(ur(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:h,setWidth:x}}function Co({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function Eo({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function Mo({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const b=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,g=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,x=r?d.shiftKey:!d.shiftKey,w=s?d.altKey:!d.altKey,y=a?d.metaKey:!d.metaKey,h=t?(d.ctrlKey||d.metaKey)&&!a:g&&y;b&&h&&x&&w&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function Qs({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=Xe(),u=Nt(),d=l.useRef(null),f=r!==void 0,p=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-collapsed`);if(_!==null)return _==="true"}return t},b=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const _=localStorage.getItem(`${u.storageKey}-width`);if(_!==null){const V=parseInt(_,10);if(!isNaN(V))return V}}return xr(c.contentWidth)},[g,x]=l.useState(p),[w,y]=l.useState({}),{isMobile:h}=Co({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:_=>{o==null||o(_),_&&u.mobileVariant==="collapse"&&!f&&x(!0)},enabled:u.responsive}),{width:j,isResizing:N,startResize:k,setWidth:$}=$o({initialWidth:b(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:_=>{a==null||a(_),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(_))},enabled:u.resizable&&!h});Eo({isActive:h&&u.mobileVariant==="overlay"&&!g,containerRef:d,restoreFocus:!0});const S=f?r:g,I=l.useCallback(_=>{f||x(_),s==null||s(_)},[f,s]),C=l.useCallback(()=>{I(!S)},[S,I]),A=So(u.keyboardShortcut);Mo({key:A.key,ctrl:A.ctrl,shift:A.shift,alt:A.alt,meta:A.meta,onTrigger:C,enabled:u.enableKeyboardShortcut});const L=l.useCallback(_=>{$(_)},[$]),D=l.useCallback(_=>{y(i?V=>{const X=V[_]===!1,Z={},oe=new Set([...Object.keys(V),_]);return X?oe.forEach(H=>{Z[H]=!0}):oe.forEach(H=>{Z[H]=H!==_}),Z}:V=>F(M({},V),{[_]:!V[_]}))},[i]),T=l.useCallback((_,V)=>{y(B=>F(M({},B),{[_]:V}))},[]);l.useEffect(()=>{f&&r!==g&&x(r)},[f,r,g]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(g))},[u.storageKey,u.persistState,g,f]);const R=l.useMemo(()=>({collapsed:S,toggle:C,setCollapsed:I,currentWidth:j,setWidth:L,isMobile:h,isResizing:N,startResize:k,groupStates:w,toggleGroup:D,setGroupCollapsed:T,sidebarRef:d}),[S,C,I,j,L,h,N,k,w,D,T]);return n.jsx(zr.Provider,{value:R,children:e})}function en({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:j,enableKeyboardShortcut:N,defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A}){return n.jsx(Js,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(Zs,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:p,mobileBreakpoint:b,mobileVariant:g,overlayBackdrop:x,persistState:w,persistWidth:y,storageKey:h,keyboardShortcut:j,enableKeyboardShortcut:N,children:n.jsx(Qs,{defaultCollapsed:k,collapsed:$,onCollapseChange:S,onWidthChange:I,onMobileChange:C,exclusiveGroups:A,children:e})})})}const Vr=l.createContext(null);function tn(){return l.useContext(Vr)}function rn(){const e=l.useContext(Vr);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function To({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Vr.Provider,{value:c,children:e})}const Wr=l.createContext(null);function Uu(){return l.useContext(Wr)}function Ao(){const e=l.useContext(Wr);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function sn(r){var s=r,{className:e=""}=s,t=z(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=Je(),{resizable:u}=Nt();return u?n.jsxs("div",F(M({className:`
|
|
190
|
+
${b?"opacity-50":""}
|
|
191
|
+
`,"aria-hidden":"true"})]}),n.jsx("div",{id:`accordion-content-${d.id}`,className:y("grid",je("base"),f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),"aria-hidden":!f,children:n.jsx("div",{className:"min-h-0 overflow-hidden",children:n.jsx("div",{className:y(m("base","px"),m("md","py"),"text-fg-secondary",d.contentClassName),children:d.content})})})]},d.id)})})}const vo=l.createContext(void 0);function gs({children:e,mobileMenuOpen:t,onMobileMenuChange:r,defaultMobileMenuOpen:s=!1}){const[a,o]=l.useState(s),i=t!==void 0,c=i?t:a,u=l.useCallback(p=>{i||o(p),r==null||r(p)},[i,r]),d=l.useCallback(()=>{u(!c)},[c,u]),f=l.useCallback(()=>{u(!0)},[u]),b=l.useCallback(()=>{u(!1)},[u]);return n.jsx(vo.Provider,{value:{isMobileMenuOpen:c,toggleMobileMenu:d,setMobileMenuOpen:u,openMobileMenu:f,closeMobileMenu:b},children:e})}function Hs(){const e=l.useContext(vo);if(!e)throw new Error("useHeaderContext must be used within HeaderProvider");return e}function yo(a){var o=a,{children:e,className:t,href:r}=o,s=W(o,["children","className","href"]);return n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Tr,L(M({href:r||"/",variant:"default",className:y("flex items-center font-semibold text-lg",t)},s),{children:e}))})}function wo({children:e,className:t}){return n.jsx("nav",{className:y("flex-1 flex items-center justify-center",m("base","gap"),"hidden md:flex",t),"aria-label":"Main navigation",children:e})}function ko({children:e,className:t}){return n.jsx("div",{className:y("flex-shrink-0 flex items-center",m("sm","gap"),t),children:e})}function jo({className:e,icon:t,closeIcon:r,variant:s="ghost",size:a="md"}){const{isMobileMenuOpen:o,toggleMobileMenu:i}=Hs(),c=t||n.jsx(Fc,{className:"h-5 w-5"}),u=r||n.jsx(Te,{className:"h-5 w-5"});return n.jsx(te,{variant:s,size:a,onClick:i,className:y("md:hidden",e),"aria-label":o?"Close menu":"Open menu","aria-expanded":o,children:o?u:c})}function No({children:e,className:t}){const{isMobileMenuOpen:r,closeMobileMenu:s}=Hs();return n.jsx(Jt,{open:r,onOpenChange:a=>{a||s()},position:"left",size:"sm",closeOnOverlayClick:!0,closeOnEscape:!0,children:n.jsx(Os,{className:y(m("base","p"),t),children:n.jsx("nav",{className:`flex flex-col ${m("sm","gap")}`,"aria-label":"Mobile navigation",children:e})})})}const $u={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},bt=l.forwardRef((u,c)=>{var d=u,{className:e,maxWidth:t="lg",paddingX:r="base",paddingY:s="base",center:a=!0,children:o}=d,i=W(d,["className","maxWidth","paddingX","paddingY","center","children"]);return n.jsx("div",L(M({ref:c,className:y("w-full",$u[t],m(r,"px"),m(s,"py"),a&&"mx-auto",e)},i),{children:o}))});bt.displayName="Container";const Ot=l.forwardRef((u,c)=>{var d=u,{className:e,spacing:t="base",align:r="stretch",justify:s="start",direction:a="column",children:o}=d,i=W(d,["className","spacing","align","justify","direction","children"]);const f=a==="column"?m(t,"gap-y"):m(t,"gap-x"),b={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},p={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};return n.jsx("div",L(M({ref:c,className:y("flex",a==="column"?"flex-col":"flex-row",f,b[r],p[s],e)},i),{children:o}))});Ot.displayName="Stack";const Cu=ge(y("w-full","bg-surface-base","transition-shadow","transition-colors"),{variants:{variant:{default:"",elevated:be("sm"),bordered:y("border-b","border-line-muted")}},defaultVariants:{variant:"default"}});function Et(c){var u=c,{children:e,variant:t="default",sticky:r=!1,maxWidth:s="full",bare:a=!1,className:o}=u,i=W(u,["children","variant","sticky","maxWidth","bare","className"]);const d=n.jsx("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:e});return a?n.jsx(gs,{children:n.jsx("div",L(M({className:y(o)},i),{children:d}))}):n.jsx(gs,{children:n.jsx("header",L(M({className:y(Cu({variant:t}),r&&`sticky top-0 ${xe("sticky")}`,r&&"backdrop-blur-sm bg-surface-base/95",o)},i),{children:n.jsx(bt,{maxWidth:s,paddingX:"base",paddingY:"sm",children:d})}))})}Et.Logo=yo;Et.Navigation=wo;Et.Actions=ko;Et.Hamburger=jo;Et.MobileMenu=No;const Gn=ge(y("flex","items-center",m("sm","gap")),{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},variant:{default:"",pills:"",tabs:""}},defaultVariants:{orientation:"horizontal",variant:"default"},compoundVariants:[{orientation:"vertical",variant:"default",class:"items-stretch"},{orientation:"vertical",variant:"pills",class:"items-stretch"},{orientation:"vertical",variant:"tabs",class:"items-stretch"}]});function Eu(u){var d=u,{items:e,orientation:t="horizontal",variant:r="default",className:s,"aria-label":a="Main navigation",bare:o=!1,pathname:i}=d,c=W(d,["items","orientation","variant","className","aria-label","bare","pathname"]);const f=i!=null?i:typeof window!="undefined"?window.location.pathname:void 0,b=l.useMemo(()=>e.map(g=>{if(g.active!==void 0)return g;if(f){const h=f===g.href||g.href!=="/"&&f.startsWith(`${g.href}/`);return L(M({},g),{active:h})}return L(M({},g),{active:!1})}),[e,f]),p=n.jsx(n.Fragment,{children:b.map((g,h)=>{const k=r==="pills"?"background":r==="tabs"?"underline":"default";return n.jsxs(Tr,{href:g.href,active:g.active,disabled:g.disabled,variant:k,className:y("flex items-center",m("sm","gap"),t==="vertical"&&"w-full justify-start",g.className),children:[g.icon&&n.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:g.icon}),n.jsx("span",{children:g.label}),g.badge&&n.jsx("span",{className:"ml-auto",children:g.badge})]},g.href||h)})});return o?n.jsx("div",L(M({className:y(Gn({orientation:t,variant:r}),s)},c),{children:p})):n.jsx("nav",L(M({className:y(Gn({orientation:t,variant:r}),s),"aria-label":a},c),{children:p}))}function So(e){return n.jsx(Eu,L(M({},e),{pathname:e.pathname}))}const Tu=ge(y("w-full","flex","flex-col",m("sm","gap")),{variants:{variant:{default:y(m("base","mb")),compact:y(m("sm","mb"))}},defaultVariants:{variant:"default"}});function $o(c){var u=c,{title:e,description:t,breadcrumb:r,actions:s,variant:a="default",className:o}=u,i=W(u,["title","description","breadcrumb","actions","variant","className"]);return n.jsxs("div",L(M({className:y(Tu({variant:a}),o)},i),{children:[r&&r.length>0&&n.jsx(Za,{items:r}),n.jsxs("div",{className:`flex items-start justify-between ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx(Ee,{variant:"heading",as:"h1",className:`${m("sm","mb")} text-2xl font-bold`,children:e}),t&&n.jsx(Ee,{variant:"body",className:"text-fg-secondary",children:t})]}),s&&n.jsx("div",{className:`flex items-center ${m("sm","gap")} flex-shrink-0`,children:s})]})]}))}function Mu(s){var a=s,{onForgotPasswordClick:e,className:t}=a,r=W(a,["onForgotPasswordClick","className"]);return n.jsx("div",{className:y(m("base","p"),"bg-surface-muted",G("md"),t),children:n.jsxs("form",L(M({},r),{onSubmit:o=>{o.preventDefault(),r.onSubmit&&r.onSubmit(o)},className:m("base","space-y"),children:[n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Lt,{htmlFor:"login-email",variant:"required",children:"Your email"}),n.jsx(Me,{id:"login-email",placeholder:"myname@email.com",type:"email"})]}),n.jsxs("div",{className:m("sm","space-y"),children:[n.jsx(Lt,{htmlFor:"login-password",variant:"required",children:"Your password"}),n.jsx(Me,{id:"login-password",placeholder:"••••••••",type:"password"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx(te,{variant:"secondary",type:"button",onClick:e,children:"Forgot password?"}),n.jsx(te,{variant:"primary",type:"submit",children:"Sign in"})]})]}))})}function Au(b){var p=b,{isOpen:e,onClose:t,title:r,children:s,variant:a="default",showCloseButton:o=!0,footer:i,className:c="","aria-label":u,"aria-labelledby":d}=p,f=W(p,["isOpen","onClose","title","children","variant","showCloseButton","footer","className","aria-label","aria-labelledby"]);const g=l.useRef(null),h=l.useRef(null),k=l.useId(),w=d!=null?d:r?k:void 0;if(Xt(e),Or(g,e),Ps(g,e),l.useEffect(()=>{if(!e)return;const j=E=>{E.key==="Escape"&&t()};return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[e,t]),l.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const x=["fixed","inset-0",xe("modal"),"overflow-y-auto"],v=["fixed","inset-0","bg-scrim","transition-opacity"],N={default:"max-w-md",large:"max-w-2xl",fullscreen:"max-w-full h-full"},$=["relative","bg-surface-overlay",G("lg"),be("xl"),m("xl","my"),"mx-auto",N[a],m("lg","p"),c].filter(Boolean).join(" "),C=n.jsxs("div",{className:x.join(" "),role:"dialog","aria-modal":"true","aria-labelledby":w,"aria-label":w?void 0:u,onClick:j=>{(j.target===j.currentTarget||j.target===h.current)&&t()},children:[n.jsx("div",{ref:h,className:v.join(" "),"aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",L(M({ref:g,tabIndex:-1,className:$,onClick:j=>j.stopPropagation()},f),{children:[r&&n.jsxs("div",{className:`flex justify-between items-center ${m("base","mb")}`,children:[n.jsx("h2",{id:k,className:"text-xl font-semibold text-fg-primary",children:r}),o&&n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Te,{className:"h-6 w-6"})})]}),!r&&o&&n.jsx("div",{className:`flex justify-end ${m("base","mb")}`,children:n.jsx("button",{onClick:t,className:"text-fg-tertiary hover:text-fg-secondary focus:outline-none","aria-label":"Close modal",children:n.jsx(Te,{className:"h-6 w-6"})})}),n.jsx("div",{className:m("base","mb"),children:s}),i&&n.jsx("div",{className:`flex justify-end ${m("sm","gap")} ${m("base","mt")}`,children:i})]}))})]});return typeof window!="undefined"?Xe.createPortal(C,document.body):C}const zr=Ua({displayName:"TableContext",errorMessage:"useTableContext must be used within a Table component"}),Iu=zr.Context,Ru=zr.Provider;function Be(){return zr.useContextRequired()}function Du(){return zr.useContextOptional()}function hs({columns:e,data:t,loading:r=!1,paginationMode:s,page:a,pageSize:o,total:i,onPageChange:c,onPageSizeChange:u,defaultPageSize:d=10,pageSizeOptions:f,sortColumn:b,sortDirection:p,onSort:g,defaultSortColumn:h,defaultSortDirection:k="asc",filters:w,filterValues:x,onFilter:v,initialFilterValues:N={},selectable:$=!1,selectedRows:C,onSelectionChange:j,rowId:E,actions:S,emptyMessage:A="No data available",emptyStateTitle:_,emptyStateMessage:R,emptyStateIllustration:I,emptyStateAction:D,onRowClick:F,resizable:P=!1,columnWidths:z,onColumnResize:B,virtualScrolling:U,virtualScrollingOptions:oe,children:H}){const O=l.useMemo(()=>s||(i!==void 0&&c?"server":"client"),[s,i,c]),K=a!==void 0,[re,se]=l.useState(1),[ce,Z]=l.useState(d),ee=K?a:re,J=o!=null?o:ce,Q=l.useMemo(()=>O==="server"?i!=null?i:0:t.length,[O,i,t.length]),V=l.useMemo(()=>Math.ceil(Q/J),[Q,J]),Y=b!==void 0,[ne,de]=l.useState(h||""),[$e,et]=l.useState(k),we=Y?b:ne,Oe=Y?p||"asc":$e,qr=x!==void 0,[Qo,ei]=l.useState(N),er=qr?x:Qo,Xr=C!==void 0,[ti,ri]=l.useState([]),ze=Xr?C:ti,tr=l.useMemo(()=>!w||w.length===0?t:t.filter(ie=>w.every(fe=>{const ve=er[fe.key];if(!ve||ve==="")return!0;const sr=ie[fe.key];return fe.type==="text"?String(sr||"").toLowerCase().includes(String(ve).toLowerCase()):String(sr)===String(ve)})),[t,w,er]),Jr=l.useMemo(()=>{if(Y&&g||!we)return tr;const ie=[...tr];return ie.sort((fe,ve)=>{const sr=fe[we],oi=ve[we],wn=String(sr||"").localeCompare(String(oi||""));return Oe==="asc"?wn:-wn}),ie},[tr,we,Oe,g,Y]),Re=l.useMemo(()=>{if(O==="server")return Jr;const ie=(ee-1)*J,fe=ie+J;return Jr.slice(ie,fe)},[Jr,O,ee,J]),tt=l.useCallback((ie,fe)=>{var ve;return E?E(ie):((ve=ie==null?void 0:ie.id)==null?void 0:ve.toString())||fe.toString()},[E]),rr=l.useMemo(()=>!$||Re.length===0?!1:Re.every((ie,fe)=>{const ve=tt(ie,fe);return ze.includes(ve)}),[$,Re,ze,tt]),mn=l.useMemo(()=>{if(!$||Re.length===0)return!1;const ie=Re.filter((fe,ve)=>ze.includes(tt(fe,ve))).length;return ie>0&&ie<Re.length},[$,Re,ze,tt]),Mt=l.useCallback(ie=>{K?c==null||c(ie):se(ie)},[K,c]),pn=l.useCallback(ie=>{u?u(ie):Z(ie),Mt(1)},[u,Mt]),bn=l.useCallback((ie,fe)=>{Y?g==null||g(ie,fe):(de(ie),et(fe))},[Y,g]),gn=l.useCallback(ie=>{qr?v==null||v(ie):ei(ie),Mt(1)},[qr,v,Mt]),yt=l.useCallback(ie=>{Xr?j==null||j(ie):ri(ie)},[Xr,j]),hn=l.useCallback(ie=>{const fe=ze.includes(ie)?ze.filter(ve=>ve!==ie):[...ze,ie];yt(fe)},[ze,yt]),xn=l.useCallback(()=>{if(rr)yt([]);else{const ie=Re.map((fe,ve)=>tt(fe,ve));yt(ie)}},[rr,Re,tt,yt]),[si,ni]=l.useState({}),Zr=z!==void 0,vn=Zr?z:si,yn=l.useCallback((ie,fe)=>{Zr?B==null||B(ie,fe):ni(ve=>L(M({},ve),{[ie]:fe}))},[Zr,B]),ai=l.useMemo(()=>({columns:e,data:t,paginatedData:Re,loading:r,paginationState:{page:ee,pageSize:J,total:Q,totalPages:V},sortState:{column:we,direction:Oe},filterState:{values:er,config:w||[]},selectionState:{selectedRows:ze,isAllSelected:rr,isIndeterminate:mn},paginationMode:O,selectable:$,rowId:E,actions:S,resizable:P,columnWidths:vn,virtualScrolling:U,virtualScrollingOptions:oe,emptyMessage:A,emptyStateTitle:_,emptyStateMessage:R,emptyStateIllustration:I,emptyStateAction:D,setPage:Mt,setPageSize:pn,setSorting:bn,setFilters:gn,setSelection:yt,toggleRowSelection:hn,toggleSelectAll:xn,getRowId:tt,setColumnWidth:yn,onPageChange:c,onPageSizeChange:u,onSort:g,onFilter:v,onSelectionChange:j,onRowClick:F,onColumnResize:B}),[e,t,Re,r,ee,J,Q,V,we,Oe,er,w,ze,rr,mn,O,$,E,S,A,_,R,I,D,Mt,pn,bn,gn,yt,hn,xn,tt,yn,c,u,g,v,j,F,B,P,vn,U,oe]);return n.jsx(Ru,{value:ai,children:H})}function Bs(u){var d=u,{column:e,resizable:t=!1,width:r,onResize:s,minWidth:a=50,maxWidth:o,className:i=""}=d,c=W(d,["column","resizable","width","onResize","minWidth","maxWidth","className"]);const{sortState:f,setSorting:b,onSort:p}=Be(),g=l.useRef(null),h=l.useRef(null),k=l.useRef(null),w=()=>{if(!e.sortable||!p&&!b)return;const j=f.column===e.key&&f.direction==="asc"?"desc":"asc";p?p(e.key,j):b(e.key,j)},x=j=>{$&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),w())},v=j=>{if(j.preventDefault(),j.stopPropagation(),!h.current||!s)return;const E=r||h.current.offsetWidth;k.current={x:j.clientX,width:E};const S=_=>{if(!k.current)return;const R=_.clientX-k.current.x,I=k.current.width+R,D=Math.max(a,o?Math.min(I,o):I);s(e.key,D)},A=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",A),k.current=null};document.addEventListener("mousemove",S),document.addEventListener("mouseup",A)},N=f.column===e.key,$=e.sortable&&(p||b),C=N?f.direction:void 0;return n.jsx("th",L(M({ref:h,scope:"col",role:"columnheader","aria-sort":N?C==="asc"?"ascending":"descending":$?"none":void 0,className:`${m("lg","px")} ${m("md","py")} text-left text-xs font-medium text-fg-tertiary uppercase tracking-wider ${$?"cursor-pointer hover:bg-surface-active focus:bg-surface-active focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2 select-none":""} ${e.hiddenOnMobile?"hidden md:table-cell":""} ${i}`,onClick:$?w:void 0,onKeyDown:$?x:void 0,tabIndex:$?0:void 0,style:r?{width:`${r}px`,minWidth:`${r}px`}:void 0},c),{children:n.jsxs("div",{className:`flex items-center ${m("sm","gap")} relative`,children:[n.jsx("span",{children:e.label}),N&&n.jsx("span",{className:"text-fg-tertiary","aria-hidden":"true",children:f.direction==="asc"?"↑":"↓"}),t&&s&&n.jsx("div",{ref:g,className:"absolute right-0 top-0 bottom-0 w-1 cursor-col-resize hover:bg-surface-brand transition-colors",onMouseDown:v,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e.label} column`,style:{touchAction:"none"}})]})}))}function Us(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{columns:a,selectable:o,selectionState:i,toggleSelectAll:c,actions:u,resizable:d,columnWidths:f,setColumnWidth:b}=Be();return n.jsxs("tr",L(M({role:"row",className:e},t),{children:[o&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} w-12`,"aria-label":"Select all",children:n.jsx(Ar,{checked:i.isAllSelected,onChange:c,"aria-label":"Select all rows",className:m("none","my"),indeterminate:i.isIndeterminate})}),a.map(p=>n.jsx(Bs,{column:p,resizable:d,width:f==null?void 0:f[p.key],onResize:b},p.key)),u&&n.jsx("th",{scope:"col",role:"columnheader",className:`${m("lg","px")} ${m("md","py")} text-right text-xs font-medium text-fg-tertiary uppercase tracking-wider w-12`,"aria-label":"Actions",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]}))}function Gs(r){var s=r,{className:e=""}=s,t=W(s,["className"]);return Be(),n.jsx("thead",L(M({className:`bg-surface-subtle sticky top-0 ${xe("sticky")} ${e}`},t),{children:n.jsx(Us,{})}))}function Ks(a){var o=a,{column:e,row:t,className:r=""}=o,s=W(o,["column","row","className"]);const i=e.key in t?t[e.key]:void 0;return n.jsx("td",L(M({className:`${m("lg","px")} ${m("base","py")} whitespace-nowrap text-sm text-fg-primary ${e.hiddenOnMobile?"hidden md:table-cell":""} ${r}`},s),{children:e.render?e.render(i,t):String(i!=null?i:"")}))}function Fu(o){var i=o,{actions:e,row:t,align:r="right",className:s=""}=i,a=W(i,["actions","row","align","className"]);const c=e.map(u=>({label:u.label,onClick:()=>u.onClick(t),variant:u.variant,disabled:u.disabled}));return n.jsx("div",L(M({className:`inline-flex ${s}`},a),{children:n.jsx(to,{trigger:n.jsx(te,{variant:"ghost",size:"sm","aria-label":"Row actions",className:`h-8 w-8 ${m("none","p")}`,children:n.jsx(yc,{className:"h-4 w-4"})}),items:c,align:r})}))}function Ys(a){var o=a,{row:e,align:t="right",className:r=""}=o,s=W(o,["row","align","className"]);const{actions:i}=Be();if(!i)return null;const c=i(e);return c.length===0?null:n.jsx(Fu,M({row:e,actions:c,align:t,className:r},s))}function vr(i){var c=i,{row:e,rowIndex:t,className:r="",onClick:s,style:a}=c,o=W(c,["row","rowIndex","className","onClick","style"]);const{columns:u,selectable:d,selectionState:f,toggleRowSelection:b,getRowId:p,actions:g,onRowClick:h}=Be(),k=p(e,t),w=f.selectedRows.includes(k),x=!!h,v=$=>{s&&s($),h&&h(e)},N=$=>{h&&($.key==="Enter"||$.key===" ")&&($.key===" "&&$.preventDefault(),h(e))};return n.jsxs("tr",L(M({role:"row","aria-selected":d?w:void 0,"aria-rowindex":t+1,tabIndex:x?0:void 0,onKeyDown:x?N:void 0,className:`hover:bg-surface-hover ${x?"cursor-pointer":""} ${w?"bg-surface-selected":""} ${r}`,onClick:v,style:a},o),{children:[d&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Ar,{checked:w,onChange:()=>b(k),"aria-label":`Select row ${k}`,className:m("none","my")})}),u.map($=>n.jsx(Ks,{column:$,row:e},String($.key))),g&&n.jsx("td",{className:`${m("lg","px")} ${m("base","py")} text-right`,children:n.jsx(Ys,{row:e})})]}))}function qs(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{emptyMessage:a,emptyStateTitle:o,emptyStateMessage:i,emptyStateIllustration:c,emptyStateAction:u}=Be();return o||i||c?n.jsxs("div",L(M({className:e},t),{children:[n.jsx(eo,{title:o||"No data available",message:i||a||"No data available",variant:c?"withIllustration":"default",illustration:c}),u&&n.jsx("div",{className:`${m("base","mt")} flex justify-center`,children:u})]})):n.jsx("div",L(M({className:`text-center text-fg-secondary ${e}`},t),{children:a||"No data available"}))}function Co(e,t){const{itemHeight:r,containerHeight:s,overscan:a=5,enabled:o=!0}=t,[i,c]=l.useState(0),u=l.useRef(null),d=l.useMemo(()=>{if(!o||e.length===0)return e.map((k,w)=>({index:w,start:w*r,end:(w+1)*r,size:r}));const p=Math.max(0,Math.floor(i/r)-a),g=s?Math.min(e.length,Math.ceil((i+s)/r)+a):e.length,h=[];for(let k=p;k<g;k++)h.push({index:k,start:k*r,end:(k+1)*r,size:r});return h},[e,r,i,s,a,o]),f=e.length*r;return l.useEffect(()=>{if(!o||!u.current)return;const p=u.current,g=()=>{c(p.scrollTop)};return p.addEventListener("scroll",g,{passive:!0}),()=>p.removeEventListener("scroll",g)},[o]),{virtualItems:d,totalHeight:f,scrollOffset:i,setScrollOffset:c,scrollToIndex:p=>{if(!u.current)return;const g=p*r;u.current.scrollTop=g,c(g)},containerRef:u}}function Xs(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);var k,w;const{paginatedData:o,loading:i,columns:c,selectable:u,actions:d,virtualScrolling:f,virtualScrollingOptions:b}=Be(),p=c.length+(u?1:0)+(d?1:0),g=Co(o,{itemHeight:(b==null?void 0:b.itemHeight)||50,containerHeight:b==null?void 0:b.containerHeight,overscan:(b==null?void 0:b.overscan)||5,enabled:f||!1}),h=l.useMemo(()=>f&&g.virtualItems.length>0?g.virtualItems.map(x=>({row:o[x.index],index:x.index})).filter(x=>x.row!==void 0):o.map((x,v)=>({row:x,index:v})),[f,g.virtualItems,o]);return i?n.jsx("tbody",L(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:Array.from({length:5}).map((x,v)=>n.jsx("tr",{children:Array.from({length:p}).map((N,$)=>n.jsx("td",{className:`${m("lg","px")} ${m("base","py")}`,children:n.jsx(Oa,{className:"h-4 w-full"})},$))},v))})):o.length===0?n.jsx("tbody",L(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:n.jsx("tr",{children:n.jsx("td",{colSpan:p,className:`${m("lg","px")} ${m("3xl","py")}`,children:n.jsx(qs,{})})})})):typeof e=="function"?n.jsx("tbody",L(M({className:`bg-surface-base divide-y divide-line-default ${t}`},r),{children:o.map((x,v)=>e(x,v))})):n.jsx("tbody",L(M({className:`bg-surface-base divide-y divide-line-default ${t}`,role:"rowgroup"},r),{children:f&&g.virtualItems.length>0&&h.length>0?n.jsxs(n.Fragment,{children:[((k=g.virtualItems[0])==null?void 0:k.start)>0&&n.jsx("tr",{style:{height:g.virtualItems[0].start},"aria-hidden":"true",children:n.jsx("td",{colSpan:p})}),h.map(({row:x,index:v})=>n.jsx(vr,{row:x,rowIndex:v},v)),g.virtualItems.length>0&&n.jsx("tr",{style:{height:Math.max(0,g.totalHeight-(((w=g.virtualItems[g.virtualItems.length-1])==null?void 0:w.end)||0))},"aria-hidden":"true",children:n.jsx("td",{colSpan:p})})]}):h.map(({row:x,index:v})=>n.jsx(vr,{row:x,rowIndex:v},v))}))}function _u(i){var c=i,{filters:e,onFilter:t,initialValues:r={},showClearAll:s=!0,className:a=""}=c,o=W(c,["filters","onFilter","initialValues","showClearAll","className"]);const[u,d]=l.useState(r),[f,b]=l.useState(!1),p=`table-filters-panel-${l.useId()}`,g=Object.values(u).some(v=>v!==""&&v!==null&&v!==void 0),h=(v,N)=>{const $=L(M({},u),{[v]:N});d($),t($)},k=()=>{const v={};e.forEach(N=>{v[N.key]=""}),d(v),t(v)},w=v=>{const N=L(M({},u),{[v]:""});d(N),t(N)},x=Object.values(u).filter(v=>v!==""&&v!==null&&v!==void 0).length;return n.jsx("div",L(M({className:`bg-surface-base border-b border-line-default ${a}`},o),{children:n.jsxs("div",{className:`${m("base","px")} ${m("md","py")} sm:${m("lg","px")}`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("button",{type:"button",onClick:()=>b(!f),"aria-expanded":f,"aria-controls":p,className:`flex items-center ${m("sm","gap")} text-sm font-medium text-fg-secondary hover:text-fg-primary`,children:[n.jsx(Ec,{className:"h-4 w-4"}),n.jsx("span",{children:"Filters"}),x>0&&n.jsx("span",{className:`inline-flex items-center ${m("sm","px")} ${m("0.5","py")} rounded text-xs font-medium bg-surface-brand-muted text-fg-brand-emphasis`,children:x})]}),g&&s&&n.jsx(te,{variant:"ghost",size:"sm",onClick:k,className:"text-sm",children:"Clear all"})]}),f&&n.jsx("div",{id:p,className:`${m("base","mt")} grid grid-cols-1 ${m("base","gap")} sm:grid-cols-2 lg:grid-cols-3`,children:e.map(v=>{const N=u[v.key],$=N==null?"":String(N);return n.jsxs("div",{className:m("xs","space-y"),children:[n.jsx(Lt,{htmlFor:`filter-${v.key}`,variant:"optional",children:v.label}),n.jsxs("div",{className:"relative",children:[v.type==="text"&&n.jsx(Me,{id:`filter-${v.key}`,type:"text",value:$,onChange:C=>h(v.key,C.target.value),placeholder:v.placeholder||`Filter by ${v.label.toLowerCase()}`,size:"sm",variant:"outlined"}),v.type==="select"&&n.jsxs("div",{className:"relative",children:[n.jsx(Mr,{id:`filter-${v.key}`,options:[{value:"",label:`All ${v.label}`},...v.options||[]],value:$,onChange:C=>h(v.key,C.target.value)}),$&&n.jsx("button",{type:"button",onClick:()=>w(v.key),className:"absolute right-8 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${v.label} filter`,children:n.jsx(Te,{className:"h-4 w-4"})})]}),v.type==="date"&&n.jsx(Me,{id:`filter-${v.key}`,type:"date",value:$,onChange:C=>h(v.key,C.target.value),size:"sm",variant:"outlined"}),$&&v.type!=="select"&&n.jsx("button",{type:"button",onClick:()=>w(v.key),className:"absolute right-2 top-1/2 -translate-y-1/2 text-fg-tertiary hover:text-fg-secondary","aria-label":`Clear ${v.label} filter`,children:n.jsx(Te,{className:"h-4 w-4"})})]})]},v.key)})})]})}))}function Js(s){var a=s,{showClearAll:e=!0,className:t=""}=a,r=W(a,["showClearAll","className"]);const{filterState:o,setFilters:i}=Be();return o.config.length===0?null:n.jsx(_u,M({filters:o.config,onFilter:i,initialValues:o.values,showClearAll:e,className:t},r))}function Lu(f){var b=f,{page:e,pageSize:t,total:r,onPageChange:s,onPageSizeChange:a,pageSizeOptions:o=[10,25,50,100],showPageSizeSelector:i=!0,showPageInfo:c=!0,className:u=""}=b,d=W(b,["page","pageSize","total","onPageChange","onPageSizeChange","pageSizeOptions","showPageSizeSelector","showPageInfo","className"]);const p=Math.ceil(r/t),g=r===0?0:(e-1)*t+1,h=Math.min(e*t,r),k=()=>{e>1&&s(e-1)},w=()=>{e<p&&s(e+1)},x=()=>{e>1&&s(1)},v=()=>{e<p&&s(p)};return n.jsxs("div",L(M({className:`flex items-center justify-between ${m("base","px")} ${m("md","py")} bg-surface-base border-t border-line-default sm:${m("lg","px")} ${u}`},d),{children:[n.jsxs("div",{className:"flex flex-1 justify-between sm:hidden",children:[n.jsx(te,{variant:"outline",size:"sm",onClick:k,disabled:e===1,children:"Previous"}),n.jsx(te,{variant:"outline",size:"sm",onClick:w,disabled:e>=p,children:"Next"})]}),n.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[c&&n.jsx("div",{children:n.jsxs(Ee,{as:"p",className:"text-sm text-fg-secondary",children:["Showing ",n.jsx("span",{className:"font-medium",children:g})," to"," ",n.jsx("span",{className:"font-medium",children:h})," of"," ",n.jsx("span",{className:"font-medium",children:r})," results"]})}),n.jsxs("div",{className:`flex items-center ${m("base","gap")}`,children:[i&&n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsx(Ee,{as:"span",className:"text-sm text-fg-secondary",children:"Show:"}),n.jsx(Mr,{"aria-label":"Items per page",options:o.map(N=>({value:N.toString(),label:N.toString()})),value:t.toString(),onChange:N=>{const $=parseInt(N.target.value);a($),s(1)},className:"w-20"})]}),n.jsxs("nav",{className:`flex items-center ${m("xs","gap")}`,"aria-label":"Pagination",children:[n.jsxs(te,{variant:"ghost",size:"sm",onClick:x,disabled:e===1,"aria-label":"First page",children:[n.jsx(Yt,{className:"h-4 w-4"}),n.jsx(Yt,{className:"h-4 w-4 -ml-2"})]}),n.jsx(te,{variant:"ghost",size:"sm",onClick:k,disabled:e===1,"aria-label":"Previous page",children:n.jsx(Yt,{className:"h-4 w-4"})}),n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:Array.from({length:Math.min(5,p)},(N,$)=>{let C;return p<=5||e<=3?C=$+1:e>=p-2?C=p-4+$:C=e-2+$,n.jsx(te,{variant:e===C?"primary":"ghost",size:"sm",onClick:()=>s(C),className:"min-w-10","aria-label":`Page ${C}`,"aria-current":e===C?"page":void 0,children:C},C)})}),n.jsx(te,{variant:"ghost",size:"sm",onClick:w,disabled:e>=p,"aria-label":"Next page",children:n.jsx(Nt,{className:"h-4 w-4"})}),n.jsxs(te,{variant:"ghost",size:"sm",onClick:v,disabled:e>=p,"aria-label":"Last page",children:[n.jsx(Nt,{className:"h-4 w-4"}),n.jsx(Nt,{className:"h-4 w-4 -ml-2"})]})]})]})]})]}))}function Zs(o){var i=o,{showPageSizeSelector:e=!0,showPageInfo:t=!0,pageSizeOptions:r,className:s=""}=i,a=W(i,["showPageSizeSelector","showPageInfo","pageSizeOptions","className"]);const{paginationState:c,setPage:u,setPageSize:d,paginationMode:f}=Be();return f==="client"&&c.totalPages<=1?null:n.jsx(Lu,M({page:c.page,pageSize:c.pageSize,total:c.total,onPageChange:u,onPageSizeChange:d,pageSizeOptions:r,showPageSizeSelector:e,showPageInfo:t,className:s},a))}function Ae(e){const c=e,{className:t="","aria-label":r,"aria-labelledby":s}=c,a=W(c,["className","aria-label","aria-labelledby"]),o="children"in e&&e.children!==void 0,i=o?a:Pu(a);return o?n.jsx("div",{className:`bg-surface-base shadow ${G("lg")} overflow-hidden ${t}`,children:n.jsx(hs,L(M({},i),{children:e.children}))}):n.jsx("div",{className:`bg-surface-base shadow ${G("lg")} overflow-hidden ${t}`,children:n.jsxs(hs,L(M({},i),{children:[i.filters&&i.filters.length>0&&n.jsx(Js,{}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"min-w-full divide-y divide-line-default",role:"table","aria-label":r,"aria-labelledby":s,"aria-rowcount":i.total||i.data.length,"aria-colcount":i.columns.length+(i.selectable?1:0)+(i.actions?1:0),children:[n.jsx(Gs,{}),n.jsx(Xs,{})]})}),n.jsx(Zs,{})]}))})}function Pu(e){const{columns:t,data:r,loading:s,onSort:a,sortColumn:o,sortDirection:i,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:b,pagination:p,filters:g,selectable:h,selectedRows:k,onSelectionChange:w,rowId:x,actions:v,onRowClick:N,paginationMode:$,defaultPageSize:C,resizable:j,columnWidths:E,onColumnResize:S,virtualScrolling:A,virtualScrollingOptions:_}=e;let R=$||"auto";return R==="auto"&&(R=p&&p.total!==void 0?"server":"client"),{columns:t,data:r,loading:s,paginationMode:R,page:p==null?void 0:p.page,pageSize:p==null?void 0:p.pageSize,total:p==null?void 0:p.total,onPageChange:p==null?void 0:p.onPageChange,onPageSizeChange:p==null?void 0:p.onPageSizeChange,defaultPageSize:C||(p==null?void 0:p.pageSize)||10,pageSizeOptions:p==null?void 0:p.pageSizeOptions,sortColumn:o,sortDirection:i,onSort:a,filters:g==null?void 0:g.config,filterValues:void 0,onFilter:g==null?void 0:g.onFilter,initialFilterValues:g==null?void 0:g.initialValues,selectable:h,selectedRows:k,onSelectionChange:w,rowId:x,actions:v,onRowClick:N,emptyMessage:c,emptyStateTitle:u,emptyStateMessage:d,emptyStateIllustration:f,emptyStateAction:b,resizable:j,columnWidths:E,onColumnResize:S,virtualScrolling:A,virtualScrollingOptions:_,children:n.jsx(n.Fragment,{})}}Ae.Header=Gs;Ae.HeaderRow=Us;Ae.HeaderCell=Bs;Ae.Body=Xs;Ae.Row=vr;Ae.Cell=Ks;Ae.Filters=Js;Ae.Pagination=Zs;Ae.EmptyState=qs;Ae.Actions=Ys;function Ou(e={}){const{defaultWidths:t={},minWidth:r=50,maxWidth:s,resizable:a=!0}=e,[o,i]=l.useState(t),[c,u]=l.useState(!1),[d,f]=l.useState(null),b=l.useRef(null),p=l.useCallback((x,v)=>{const N=Math.max(r,s?Math.min(v,s):v);i($=>L(M({},$),{[x]:N}))},[r,s]),g=l.useCallback(()=>{i(t)},[t]),h=l.useCallback((x,v,N)=>{a&&(u(!0),f(x),b.current={startX:v,startWidth:N})},[a]),k=l.useCallback(x=>{if(!c||!d||!b.current)return;const v=x-b.current.startX,N=b.current.startWidth+v;p(d,N)},[c,d,p]),w=l.useCallback(()=>{u(!1),f(null),b.current=null},[]);return l.useEffect(()=>{if(!c||typeof window=="undefined")return;const x=N=>k(N.clientX),v=()=>w();return document.addEventListener("mousemove",x),document.addEventListener("mouseup",v),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",v)}},[c,k,w]),{columnWidths:o,setColumnWidth:p,resetColumnWidths:g,isResizing:c,resizingColumn:d,startResize:h,handleResize:k,endResize:w}}const Vr=l.createContext(null);function zu(){return l.useContext(Vr)}function Ze(){const e=l.useContext(Vr);if(!e)throw new Error("useSideNavbarThemeRequired must be used within SideNavbarThemeProvider");return e}const Ft={variant:"default",navigationWidth:"56px",contentWidth:"320px",animationDuration:300,animationEasing:"ease-in-out"};function Qs({children:e,variant:t=Ft.variant,navigationWidth:r=Ft.navigationWidth,contentWidth:s=Ft.contentWidth,animationDuration:a=Ft.animationDuration,animationEasing:o=Ft.animationEasing}){const i=l.useMemo(()=>({variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o}),[t,r,s,a,o]);return n.jsx(Vr.Provider,{value:i,children:e})}const Wr=l.createContext(null);function Vu(){return l.useContext(Wr)}function Tt(){const e=l.useContext(Wr);if(!e)throw new Error("useSideNavbarConfigRequired must be used within SideNavbarConfigProvider");return e}const Se={mode:"full",resizable:!1,minWidth:void 0,maxWidth:void 0,snapPoints:void 0,responsive:!1,mobileBreakpoint:768,mobileVariant:"collapse",overlayBackdrop:!0,persistState:!0,persistWidth:!1,storageKey:void 0,keyboardShortcut:"Ctrl+B",enableKeyboardShortcut:!0};function en({children:e,mode:t=Se.mode,resizable:r=Se.resizable,minWidth:s=Se.minWidth,maxWidth:a=Se.maxWidth,snapPoints:o=Se.snapPoints,responsive:i=Se.responsive,mobileBreakpoint:c=Se.mobileBreakpoint,mobileVariant:u=Se.mobileVariant,overlayBackdrop:d=Se.overlayBackdrop,persistState:f=Se.persistState,persistWidth:b=Se.persistWidth,storageKey:p=Se.storageKey,keyboardShortcut:g=Se.keyboardShortcut,enableKeyboardShortcut:h=Se.enableKeyboardShortcut}){const k=l.useMemo(()=>({mode:t,resizable:r,minWidth:s,maxWidth:a,snapPoints:o,responsive:i,mobileBreakpoint:c,mobileVariant:u,overlayBackdrop:d,persistState:f,persistWidth:b,storageKey:p,keyboardShortcut:g,enableKeyboardShortcut:h}),[t,r,s,a,o,i,c,u,d,f,b,p,g,h]);return n.jsx(Wr.Provider,{value:k,children:e})}const Hr=l.createContext(null);function Wu(){return l.useContext(Hr)}function Qe(){const e=l.useContext(Hr);if(!e)throw new Error("useSideNavbarStateRequired must be used within SideNavbarStateProvider");return e}function yr(e){if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?0:e.endsWith("rem")||e.endsWith("em")?t*16:(e.endsWith("px"),t)}function Hu(e,t){return e===void 0||t===void 0?!0:e<t}function mr(e,t,r){let s=e;return t!==void 0&&(s=Math.max(s,t)),r!==void 0&&(s=Math.min(s,r)),s}const Bu=["ctrl","cmd","control","shift","alt","meta","option"];function Eo(e){const t={key:"",ctrl:!1,shift:!1,alt:!1,meta:!1,isValid:!1};if(!e||typeof e!="string")return t;const r=e.trim();if(!r)return t;const s=r.split("+").map(u=>u.trim().toLowerCase()).filter(u=>u.length>0);if(s.length===0)return t;const a=new Set;let o="";for(let u=0;u<s.length;u++){const d=s[u];if(Bu.includes(d))a.add(d);else if(u===s.length-1)o=d;else return t}if(!o)return t;const i=a.has("ctrl")||a.has("cmd")||a.has("control"),c=a.has("alt")||a.has("option");return{key:o,ctrl:i,shift:a.has("shift"),alt:c,meta:a.has("meta"),isValid:!0}}function Uu(e,t="windows"){if(!e.isValid)return"";const r=[];return t==="mac"?(e.ctrl&&r.push("⌘"),e.shift&&r.push("⇧"),e.alt&&r.push("⌥"),e.meta&&r.push("⌃"),r.push(e.key.toUpperCase()),r.join("")):(e.ctrl&&r.push("Ctrl"),e.shift&&r.push("Shift"),e.alt&&r.push("Alt"),e.meta&&r.push("Meta"),r.push(e.key.toUpperCase()),r.join("+"))}function To({initialWidth:e,minWidth:t,maxWidth:r,snapPoints:s,snapThreshold:a=20,onWidthChange:o,enabled:i=!0}){const c=mr(e,t,r),[u,d]=l.useState(c),[f,b]=l.useState(!1),p=l.useRef(0),g=l.useRef(c),h=l.useCallback(v=>{let N=mr(v,t,r);if(s&&s.length>0){const $=s.reduce((C,j)=>{const E=Math.abs(N-j),S=Math.abs(N-C);return E<S?j:C},s[0]);Math.abs(N-$)<=a&&(N=$)}d(N),o==null||o(N)},[t,r,s,a,o]),k=l.useCallback(v=>{if(!i||!f)return;const N=v.clientX-p.current,$=g.current+N;h($)},[i,f,h]),w=l.useCallback(()=>{i&&(b(!1),p.current=0,g.current=u)},[i,u]),x=l.useCallback(v=>{i&&(v.preventDefault(),v.stopPropagation(),b(!0),p.current=v.clientX,g.current=u)},[i,u]);return l.useEffect(()=>{if(f)return document.addEventListener("mousemove",k),document.addEventListener("mouseup",w),document.body.style.userSelect="none",document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",w),document.body.style.userSelect="",document.body.style.cursor=""}},[f,k,w]),l.useEffect(()=>{f||d(mr(e,t,r))},[e,t,r,f]),{width:u,isResizing:f,startResize:x,setWidth:h}}function Mo({mobileBreakpoint:e=768,onMobileChange:t,enabled:r=!0}={}){const[s,a]=l.useState(typeof window!="undefined"?window.innerWidth:1024),[o,i]=l.useState(typeof window!="undefined"?window.innerWidth<e:!1),c=l.useCallback(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),d!==o&&(i(d),t==null||t(d))},[r,e,o,t]);return l.useEffect(()=>{if(!r||typeof window=="undefined")return;const u=window.innerWidth,d=u<e;a(u),i(d),window.addEventListener("resize",c);let f=null;return window.ResizeObserver&&(f=new ResizeObserver(()=>{c()}),f.observe(document.body)),()=>{window.removeEventListener("resize",c),f==null||f.disconnect()}},[r,e,c]),{isMobile:o,viewportWidth:s}}function Ao({isActive:e,containerRef:t,restoreFocus:r=!0,initialFocusRef:s}){const a=l.useRef(null);l.useEffect(()=>{if(e){if(a.current=document.activeElement,s!=null&&s.current)s.current.focus();else if(t.current){const i=t.current.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');i==null||i.focus()}}else r&&a.current&&(a.current.focus(),a.current=null)},[e,t,s,r]);const o=l.useCallback(i=>{if(!(!e||!t.current)&&i.key==="Tab"){const c=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),u=c[0],d=c[c.length-1];i.shiftKey?document.activeElement===u&&(i.preventDefault(),d==null||d.focus()):document.activeElement===d&&(i.preventDefault(),u==null||u.focus())}},[e,t]);l.useEffect(()=>{if(e)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[e,o])}function Io({key:e,ctrl:t=!1,shift:r=!1,alt:s=!1,meta:a=!1,onTrigger:o,enabled:i=!0,preventDefault:c=!0}){const u=l.useCallback(d=>{if(!i)return;const f=d.target;if((f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable)&&!t&&!a)return;const p=e.length===1?d.key.toLowerCase()===e.toLowerCase():d.key===e,g=t?d.ctrlKey||d.metaKey:!d.ctrlKey&&!d.metaKey,h=r?d.shiftKey:!d.shiftKey,k=s?d.altKey:!d.altKey,w=a?d.metaKey:!d.metaKey,x=t?(d.ctrlKey||d.metaKey)&&!a:g&&w;p&&x&&h&&k&&(c&&(d.preventDefault(),d.stopPropagation()),o())},[i,e,t,r,s,a,o,c]);l.useEffect(()=>{if(i)return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[i,u])}function tn({children:e,defaultCollapsed:t=!1,collapsed:r,onCollapseChange:s,onWidthChange:a,onMobileChange:o,exclusiveGroups:i=!1}){const c=Ze(),u=Tt(),d=l.useRef(null),f=r!==void 0,b=()=>{if(f)return r;if(u.storageKey&&u.persistState&&typeof window!="undefined"){const F=localStorage.getItem(`${u.storageKey}-collapsed`);if(F!==null)return F==="true"}return t},p=()=>{if(u.storageKey&&u.persistWidth&&typeof window!="undefined"){const F=localStorage.getItem(`${u.storageKey}-width`);if(F!==null){const P=parseInt(F,10);if(!isNaN(P))return P}}return yr(c.contentWidth)},[g,h]=l.useState(b),[k,w]=l.useState({}),{isMobile:x}=Mo({mobileBreakpoint:u.mobileBreakpoint,onMobileChange:F=>{o==null||o(F),F&&u.mobileVariant==="collapse"&&!f&&(h(!0),s==null||s(!0))},enabled:u.responsive}),{width:v,isResizing:N,startResize:$,setWidth:C}=To({initialWidth:p(),minWidth:u.minWidth,maxWidth:u.maxWidth,snapPoints:u.snapPoints,onWidthChange:F=>{a==null||a(F),u.storageKey&&u.persistWidth&&typeof window!="undefined"&&localStorage.setItem(`${u.storageKey}-width`,String(F))},enabled:u.resizable&&!x});Ao({isActive:x&&u.mobileVariant==="overlay"&&!g,containerRef:d,restoreFocus:!0});const j=f?r:g,E=l.useCallback(F=>{f||h(F),s==null||s(F)},[f,s]),S=l.useCallback(()=>{E(!j)},[j,E]),A=Eo(u.keyboardShortcut);Io({key:A.key,ctrl:A.ctrl,shift:A.shift,alt:A.alt,meta:A.meta,onTrigger:S,enabled:u.enableKeyboardShortcut});const _=l.useCallback(F=>{C(F)},[C]),R=l.useCallback(F=>{w(i?P=>{const B=P[F]===!1,U={},oe=new Set([...Object.keys(P),F]);return B?oe.forEach(H=>{U[H]=!0}):oe.forEach(H=>{U[H]=H!==F}),U}:P=>L(M({},P),{[F]:!P[F]}))},[i]),I=l.useCallback((F,P)=>{w(z=>L(M({},z),{[F]:P}))},[]);l.useEffect(()=>{f&&r!==g&&h(r)},[f,r,g]),l.useEffect(()=>{u.storageKey&&u.persistState&&typeof window!="undefined"&&!f&&localStorage.setItem(`${u.storageKey}-collapsed`,String(g))},[u.storageKey,u.persistState,g,f]);const D=l.useMemo(()=>({collapsed:j,toggle:S,setCollapsed:E,currentWidth:v,setWidth:_,isMobile:x,isResizing:N,startResize:$,groupStates:k,toggleGroup:R,setGroupCollapsed:I,sidebarRef:d}),[j,S,E,v,_,x,N,$,k,R,I]);return n.jsx(Hr.Provider,{value:D,children:e})}function rn({children:e,variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:b,mobileBreakpoint:p,mobileVariant:g,overlayBackdrop:h,persistState:k,persistWidth:w,storageKey:x,keyboardShortcut:v,enableKeyboardShortcut:N,defaultCollapsed:$,collapsed:C,onCollapseChange:j,onWidthChange:E,onMobileChange:S,exclusiveGroups:A}){return n.jsx(Qs,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,animationEasing:o,children:n.jsx(en,{mode:i,resizable:c,minWidth:u,maxWidth:d,snapPoints:f,responsive:b,mobileBreakpoint:p,mobileVariant:g,overlayBackdrop:h,persistState:k,persistWidth:w,storageKey:x,keyboardShortcut:v,enableKeyboardShortcut:N,children:n.jsx(tn,{defaultCollapsed:$,collapsed:C,onCollapseChange:j,onWidthChange:E,onMobileChange:S,exclusiveGroups:A,children:e})})})}const Br=l.createContext(null);function sn(){return l.useContext(Br)}function nn(){const e=l.useContext(Br);if(!e)throw new Error("useSidebarSlotRequired must be used within SidebarSlotProvider");return e}function Ro({children:e,defaultSlot:t=null}){const[r,s]=l.useState(t),a=l.useRef(new Map),o=l.useCallback((u,d)=>{a.current.set(u,d)},[]),i=l.useCallback(u=>{a.current.delete(u)},[]),c=l.useMemo(()=>({activeSlot:r,setActiveSlot:s,slots:a.current,registerSlot:o,unregisterSlot:i}),[r,o,i]);return n.jsx(Br.Provider,{value:c,children:e})}const Ur=l.createContext(null);function Gu(){return l.useContext(Ur)}function Do(){const e=l.useContext(Ur);return e||{showMainToggle:!0,mainTogglePosition:"floating"}}function an(r){var s=r,{className:e=""}=s,t=W(s,["className"]);const{currentWidth:a,setWidth:o,isResizing:i,startResize:c}=Qe(),{resizable:u,minWidth:d,maxWidth:f}=Tt();return u?n.jsxs("div",L(M({className:`
|
|
192
192
|
group
|
|
193
193
|
absolute
|
|
194
194
|
top-0
|
|
@@ -206,11 +206,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
206
206
|
justify-center
|
|
207
207
|
${i?"bg-surface-brand-emphasis":""}
|
|
208
208
|
${e}
|
|
209
|
-
`,onMouseDown:c,role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":a,tabIndex:0,onKeyDown:
|
|
209
|
+
`,onMouseDown:c,role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar","aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":f,tabIndex:0,onKeyDown:b=>{if(b.key==="ArrowLeft"||b.key==="ArrowRight"){b.preventDefault();const p=b.key==="ArrowLeft"?-10:10;o(a+p)}}},t),{children:[n.jsx("div",{className:`
|
|
210
210
|
w-0.5
|
|
211
211
|
h-8
|
|
212
212
|
bg-line-strong
|
|
213
|
-
${
|
|
213
|
+
${G("full")}
|
|
214
214
|
opacity-0
|
|
215
215
|
group-hover:opacity-100
|
|
216
216
|
transition-opacity
|
|
@@ -224,25 +224,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
224
224
|
transition-opacity
|
|
225
225
|
absolute
|
|
226
226
|
${i?"opacity-100":""}
|
|
227
|
-
`,"aria-hidden":"true"})]})):null}function
|
|
227
|
+
`,"aria-hidden":"true"})]})):null}function on(o){var i=o,{visible:e,onBackdropClick:t,className:r="",style:s}=i,a=W(i,["visible","onBackdropClick","className","style"]);const{collapsed:c,setCollapsed:u,isMobile:d}=Qe(),{animationDuration:f}=Ze(),{mobileVariant:b,overlayBackdrop:p}=Tt(),g=d&&b==="overlay",h=e!=null?e:g&&p&&!c,k=()=>{t?t():u(!0)};return h?n.jsx("div",M({className:`
|
|
228
228
|
fixed inset-0
|
|
229
229
|
bg-scrim
|
|
230
|
-
${
|
|
230
|
+
${xe("modal-backdrop")}
|
|
231
231
|
${r}
|
|
232
|
-
`,style:M({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:
|
|
233
|
-
${
|
|
234
|
-
${
|
|
235
|
-
${
|
|
232
|
+
`,style:M({animation:`fadeIn ${f}ms ease-in-out`},s),onClick:k,"aria-hidden":"true","data-testid":"side-navbar-backdrop"},a)):null}const Ku={xs:"w-5 h-5",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},Yu={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},qu={floating:`absolute ${xe("fixed")}`,top:"absolute top-2 right-2 z-10",bottom:"absolute bottom-2 right-2 z-10",inside:"relative z-10","navigation-top":`relative ${m("sm","mt")} mx-auto z-10`,"navigation-bottom":`relative mt-auto ${m("sm","mb")} mx-auto z-10`},Xu={default:`bg-surface-raised border border-line-default ${be("sm")} hover:bg-surface-hover hover:shadow`,ghost:"bg-transparent hover:bg-surface-hover border-0",outline:"bg-transparent border border-line-default hover:bg-surface-hover"},Ju={floating:"right",top:"bottom",bottom:"top",inside:"right","navigation-top":"right","navigation-bottom":"right"};function ln(k){var w=k,{position:e="floating",offset:t,icon:r,expandIcon:s,collapseIcon:a,size:o="sm",variant:i="default",showTooltip:c=!0,tooltipPosition:u,keyboardShortcut:d,enableKeyboardShortcut:f,className:b="",style:p,"aria-label":g}=w,h=W(w,["position","offset","icon","expandIcon","collapseIcon","size","variant","showTooltip","tooltipPosition","keyboardShortcut","enableKeyboardShortcut","className","style","aria-label"]);var P,z;const{collapsed:x,toggle:v}=Qe(),{animationDuration:N,animationEasing:$}=Ze(),C=Tt(),j=d!=null?d:C.keyboardShortcut,E=f!=null?f:C.enableKeyboardShortcut,S=()=>{if(typeof r=="function")return r(x);if(r)return r;if(x&&s)return s;if(!x&&a)return a;const B=x?Oc:Lc;return n.jsx(B,{className:Yu[o],style:{transition:"none",transform:"none",willChange:"auto"}})},A=x?"Expand sidebar":"Collapse sidebar",_=u!=null?u:Ju[e],R=c?`${x?"Expand":"Collapse"} sidebar${E?` (${j})`:""}`:void 0,I=t?{transform:`translate(${(P=t.x)!=null?P:0}px, ${(z=t.y)!=null?z:0}px)`}:{},D=e==="floating"?M({right:"-12px",top:"1rem",transform:"translateY(-50%)",transition:`right ${N}ms ${$}`},I):I,F=n.jsx("button",L(M({type:"button",onClick:v,className:`
|
|
233
|
+
${Ku[o]}
|
|
234
|
+
${Xu[i]}
|
|
235
|
+
${G("full")}
|
|
236
236
|
flex items-center justify-center
|
|
237
237
|
text-fg-secondary hover:text-fg-primary
|
|
238
238
|
focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-1
|
|
239
|
-
${e==="floating"?"":
|
|
240
|
-
${
|
|
241
|
-
`,style:M(M(M(M({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?
|
|
239
|
+
${e==="floating"?"":qu[e]}
|
|
240
|
+
${b}
|
|
241
|
+
`,style:M(M(M(M({},e==="floating"?{position:"absolute",right:"-11px",left:"auto"}:{}),e!=="floating"?D:{}),e==="floating"?{zIndex:Rn.fixed.value}:{}),p),"aria-label":g||A,"aria-expanded":!x,"aria-controls":"side-navbar-sidebar","data-position":e},h),{children:S()}));if(e==="floating"){const B=c&&R?n.jsx(Pt,{content:R,position:_,preservePositioning:!0,children:F}):F;return n.jsx("div",{style:{position:"absolute",right:"0",top:"1rem",transform:"translateY(-50%)",zIndex:Rn.fixed.value},children:B})}return c&&R?n.jsx(Pt,{content:R,position:_,children:F}):F}function Kn(e){return!l.isValidElement(e)||typeof e.type=="string"?!1:e.type.__SIDENAVBAR_KIND__==="navbar"}function Zu(e){let t,r,s=0,a=!1;for(const o of l.Children.toArray(e)){if(Kn(o)){const{showMainToggle:c,mainTogglePosition:u}=o.props;if(!(c!==void 0||u!==void 0))continue;s++,s===1&&(t=c,r=u);continue}if(!l.isValidElement(o))continue;const i=o.props;if(i.children!==void 0)for(const c of l.Children.toArray(i.children)){if(!Kn(c))continue;const{showMainToggle:u,mainTogglePosition:d}=c.props;if(u!==void 0||d!==void 0){a=!0;break}}}return{show:t,position:r,overrideCount:s,wrappedNavbarWithOverride:a}}const Qu={default:"",compact:"text-sm",elevated:be("lg"),minimal:"border-0",bordered:"border-2"};function Fo(o){var i=o,{children:e,className:t="",style:r,"aria-label":s}=i,a=W(i,["children","className","style","aria-label"]);var K,re;const c=Qe(),u=Ze(),d=Tt(),f=Do(),b=Zu(e),p=(K=b.show)!=null?K:f.showMainToggle,g=(re=b.position)!=null?re:f.mainTogglePosition,{collapsed:h,setCollapsed:k,currentWidth:w,isResizing:x,sidebarRef:v,isMobile:N}=c,{variant:$,navigationWidth:C,contentWidth:j,animationDuration:E,animationEasing:S}=u,{mode:A,resizable:_,mobileVariant:R,overlayBackdrop:I}=d,D=typeof C=="number"?`${C}px`:C,F=typeof j=="number"?`${j}px`:j,z=A==="navigation"||h?D:_?`${w}px`:F,[B,U]=l.useState(!1);l.useEffect(()=>{U(!0)},[]);const oe=N&&R==="overlay",H=B&&oe,O=H?`fixed left-0 top-0 ${xe("fixed")}`:"relative";return n.jsxs(n.Fragment,{children:[B&&oe&&I&&!h&&n.jsx(on,{}),n.jsxs("aside",L(M({ref:v,id:"side-navbar-sidebar",className:y(O,"flex","h-full","overflow-visible",Qu[$],H&&h?"-translate-x-full":"translate-x-0",t),style:M({position:H?"fixed":"relative",backgroundColor:"var(--color-surface-subtle)",borderRight:"1px solid var(--color-line-default)",width:z,minWidth:z,transitionProperty:x?"none":"width, min-width, transform",transitionDuration:`${E}ms`,transitionTimingFunction:S},r),role:"complementary","aria-label":s||"Sidebar navigation","aria-expanded":A!=="navigation"?!h:void 0,"data-mode":A,"data-collapsed":h},a),{children:[_&&A!=="navigation"&&!h&&n.jsx(an,{}),p&&A!=="navigation"&&n.jsx(ln,{position:g}),n.jsx("div",{className:"flex h-full w-full overflow-visible",children:e})]}))]})}const Gr=l.createContext(null);function ef(){return l.useContext(Gr)}function Kr(){const e=l.useContext(Gr);if(!e)throw new Error("useNavbarRequired must be used within a SideNavbar.Navbar component");return e}function wr(o){var i=o,{icon:e,size:t="sm",variant:r="ghost",className:s=""}=i,a=W(i,["icon","size","variant","className"]);const{collapsed:c,toggle:u}=Kr(),d=()=>{if(e)return typeof e=="function"?e(c):e;const g=c?Nt:Yt;return n.jsx(g,{className:b[t],style:{transition:"none",transform:"none",willChange:"auto"}})},f={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10"},b={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5"},p={default:`bg-surface-base border border-line-default ${be("sm")} hover:bg-surface-hover`,ghost:"hover:bg-surface-active",outline:"border border-line-emphasis hover:bg-surface-hover"};return n.jsx(Pt,{content:c?"Expand sidebar":"Collapse sidebar",position:"right",children:n.jsx("button",L(M({type:"button",onClick:u,className:`
|
|
242
242
|
flex
|
|
243
243
|
items-center
|
|
244
244
|
justify-center
|
|
245
|
-
${
|
|
245
|
+
${G("md")}
|
|
246
246
|
text-fg-secondary
|
|
247
247
|
hover:text-fg-primary
|
|
248
248
|
focus:outline-none
|
|
@@ -250,10 +250,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
focus:ring-line-focus
|
|
251
251
|
focus:ring-offset-1
|
|
252
252
|
${f[t]}
|
|
253
|
-
${
|
|
253
|
+
${p[r]}
|
|
254
254
|
[&:hover]:!transform-none
|
|
255
255
|
${s}
|
|
256
|
-
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const
|
|
256
|
+
`,style:{willChange:"auto",transform:"none",transition:"none"},"aria-label":c?"Expand sidebar":"Collapse sidebar","aria-expanded":!c},a),{children:d()}))})}const tf={sm:{container:"w-8 h-8",icon:"w-4 h-4",badge:"min-w-3.5 h-3.5 text-2xs"},md:{container:"w-10 h-10",icon:"w-5 h-5",badge:"min-w-5 h-5 text-xs"},lg:{container:"w-12 h-12",icon:"w-6 h-6",badge:"min-w-5 h-5 text-xs"}},rf={default:"bg-error",success:"bg-success",warning:"bg-warning",danger:"bg-error-dark"},sf={tooltip:"",inline:`flex-row ${m("sm","gap")} w-full ${m("md","px")}`,below:`flex-col ${m("1.5","gap")}`};function _o(x){var v=x,{id:e,icon:t,label:r,labelMode:s,showLabel:a=!0,active:o=!1,showTooltip:i=!0,badge:c,badgeVariant:u="default",variant:d="default",size:f="md",href:b,target:p,onClick:g,disabled:h=!1,className:k=""}=v,w=W(v,["id","icon","label","labelMode","showLabel","active","showTooltip","badge","badgeVariant","variant","size","href","target","onClick","disabled","className"]);var z;const{activeItem:N,setActiveItem:$,labelMode:C}=Kr(),j=(z=s!=null?s:C)!=null?z:"tooltip",E=o||e&&N===e,S=tf[f],A=B=>{if(h){B.preventDefault();return}e&&$(e),g==null||g()},_=j!=="tooltip"&&a&&r&&n.jsx("span",{className:y("text-xs","flex-shrink-0","relative z-10",j==="below"&&"text-center",j==="inline"&&"truncate"),style:{willChange:"auto",transform:"none"},children:r}),R=y("relative","flex","items-center",j==="inline"?"justify-start":"justify-center",j==="below"&&"flex-col",G("lg"),"box-border","focus:outline-none","focus:ring-2","focus:ring-line-focus","focus:ring-offset-1","w-full","flex-shrink-0","min-w-0","[&>*]:!transition-none","[&>*]:!transform-none",j==="tooltip"?S.container:y(m("sm","px"),m("1.5","py")),j!=="tooltip"&&sf[j],h?"opacity-50 cursor-not-allowed":"cursor-pointer",k),I={default:E?"bg-surface-brand-muted text-fg-brand-emphasis":h?"text-fg-disabled":"text-fg-secondary hover:bg-surface-active hover:text-fg-primary [&:hover]:!transform-none",ghost:E?"text-fg-brand-emphasis":h?"text-fg-disabled":"text-fg-secondary hover:text-fg-primary [&:hover]:!transform-none",subtle:E?"bg-surface-active text-fg-primary":h?"text-fg-disabled":"text-fg-tertiary hover:bg-surface-hover hover:text-fg-primary [&:hover]:!transform-none"},D=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:y("flex-shrink-0",S.icon,"[&>svg]:transition-none","[&>svg]:!transform-none","[&>svg]:!will-change-auto","box-border","flex items-center justify-center",`relative ${xe("base")}`),style:{minWidth:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",minHeight:S.icon==="w-4 h-4"?"1rem":S.icon==="w-5 h-5"?"1.25rem":"1.5rem",willChange:"auto",transform:"none",transition:"none",zIndex:j!=="tooltip"?0:"auto"},children:t}),_,c!=null&&n.jsx("span",{className:y("absolute","-top-1","-right-1","flex","items-center","justify-center",m("xs","px"),"font-medium","text-fg-inverse",G("full"),S.badge,rf[u]),children:c})]}),F={willChange:"auto",transform:"none",transition:"none"},P=b?n.jsx("a",{href:h?void 0:b,target:p,rel:p==="_blank"?"noopener noreferrer":void 0,onClick:A,className:y(R,I[d]),style:F,"aria-label":r,"aria-current":E?"page":void 0,"aria-disabled":h,tabIndex:h?-1:void 0,children:D}):n.jsx("button",L(M({type:"button",onClick:A,disabled:h,className:y(R,I[d]),style:F,"aria-label":r,"aria-current":E?"page":void 0},w),{children:D}));return j==="tooltip"&&i&&r&&!h?n.jsx(Pt,{content:r,position:"right",children:P}):P}function Lo(s){var a=s,{orientation:e="horizontal",className:t=""}=a,r=W(a,["orientation","className"]);return e==="vertical"?n.jsx("div",M({className:y("w-px","h-6","bg-line-default","mx-auto",t),role:"separator","aria-orientation":"vertical"},r)):n.jsx("div",M({className:y("w-full","h-px","bg-line-default",m("sm","my"),"flex-shrink-0",t),role:"separator","aria-orientation":"horizontal",style:{willChange:"auto",transform:"none"}},r))}function Po(c){var u=c,{id:e,label:t,collapsible:r=!1,defaultCollapsed:s=!1,children:a,className:o}=u,i=W(u,["id","label","collapsible","defaultCollapsed","children","className"]);const[d,f]=l.useState(s),b=`navbar-group-${l.useId()}`,p=n.jsxs("span",{className:y("flex items-center",m("1.5","gap")),children:[r&&n.jsx("span",{className:"shrink-0",children:d?n.jsx(Nt,{className:"w-3 h-3",style:{transition:"none",transform:"none"}}):n.jsx(Cr,{className:"w-3 h-3",style:{transition:"none",transform:"none"}})}),n.jsx("span",{children:t})]});return n.jsxs("div",L(M({id:e,className:y("flex flex-col",o)},i),{children:[t&&(r?n.jsx("button",{type:"button",onClick:()=>f(!d),"aria-expanded":!d,"aria-controls":d?void 0:b,className:y(m("sm","px"),m("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider","w-full text-left cursor-pointer hover:text-fg-secondary"),children:p}):n.jsx("div",{className:y(m("sm","px"),m("1.5","py"),"text-xs text-fg-tertiary uppercase tracking-wider"),children:p})),!d&&n.jsx("div",{id:b,className:`flex flex-col ${m("sm","gap")}`,children:a})]}))}function xt(f){var b=f,{children:e,showMainToggle:t,mainTogglePosition:r,showToggle:s=!1,togglePosition:a="bottom",labelMode:o="tooltip",expandedWidth:i=200,className:c="",style:u}=b,d=W(b,["children","showMainToggle","mainTogglePosition","showToggle","togglePosition","labelMode","expandedWidth","className","style"]);const p=Qe(),g=Ze(),h=l.useRef(null),[k,w]=l.useState(null),[x,v]=l.useState(!1),N=o==="inline"&&!p.collapsed,$=N?typeof i=="number"?`${i}px`:i:g.navigationWidth,C=l.useMemo(()=>({collapsed:p.collapsed,toggle:p.toggle,navbarRef:h,activeItem:k,setActiveItem:w,isHovered:x,showInternalToggle:s,togglePosition:a,labelMode:o}),[p.collapsed,p.toggle,k,x,s,a,o]);return n.jsx(Gr.Provider,{value:C,children:n.jsxs("nav",L(M({ref:h,className:y("relative","flex-shrink-0","flex","flex-col","h-full",N?"items-stretch":"items-center",c),style:M({position:"relative",backgroundColor:"var(--color-surface-raised)",borderRight:"1px solid var(--color-line-default)",width:$,transitionProperty:"width",transitionDuration:`${g.animationDuration}ms`,transitionTimingFunction:g.animationEasing},u),onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),"aria-label":"Side navigation"},d),{children:[s&&a==="top"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderBottom:"1px solid var(--color-line-default)"},children:n.jsx(wr,{})}),n.jsx("div",{className:y("relative","flex-1","flex","flex-col","overflow-y-auto","overflow-x-hidden",m("sm","p"),m("sm","gap"),"w-full","min-w-0",N?"items-stretch":"items-center","justify-start"),style:{zIndex:1},children:e}),s&&a==="bottom"&&n.jsx("div",{className:`flex-shrink-0 ${m("sm","p")}`,style:{borderTop:"1px solid var(--color-line-default)"},children:n.jsx(wr,{})})]}))})}xt.Toggle=wr;xt.Item=_o;xt.Separator=Lo;xt.Group=Po;xt.displayName="Navbar";xt.__SIDENAVBAR_KIND__="navbar";const Yr=l.createContext(null);function Oo(){return l.useContext(Yr)}function Qt(){const e=l.useContext(Yr);if(!e)throw new Error("useSidebarRequired must be used within a SideNavbar.Sidebar component");return e}function zo(c){var u=c,{title:e,subtitle:t,showBorder:r=!0,children:s,className:a="",style:o}=u,i=W(u,["title","subtitle","showBorder","children","className","style"]);const{collapsed:d,registerHeader:f,unregisterHeader:b}=Qt();return l.useEffect(()=>(f(),()=>b()),[f,b]),d?null:n.jsx("div",L(M({className:`
|
|
257
257
|
flex-shrink-0
|
|
258
258
|
${m("md","px")}
|
|
259
259
|
${m("sm","py")}
|
|
@@ -261,33 +261,33 @@ React keys must be passed directly to JSX without using spread:
|
|
|
261
261
|
bg-surface-subtle
|
|
262
262
|
${a}
|
|
263
263
|
`,style:o},i),{children:s||n.jsxs(n.Fragment,{children:[e&&n.jsx("h2",{className:`
|
|
264
|
-
${
|
|
264
|
+
${pe("h4")}
|
|
265
265
|
text-fg-primary
|
|
266
266
|
${m("none","m")}
|
|
267
267
|
font-semibold
|
|
268
268
|
`,children:e}),t&&n.jsx("p",{className:`
|
|
269
|
-
${
|
|
269
|
+
${pe("bodySmall")}
|
|
270
270
|
text-fg-secondary
|
|
271
271
|
${m("none","m")}
|
|
272
272
|
${m("xs","mt")}
|
|
273
|
-
`,children:t})]})}))}function
|
|
273
|
+
`,children:t})]})}))}function Vo(i){var c=i,{scrollable:e=!0,padding:t="md",children:r,className:s="",style:a}=c,o=W(c,["scrollable","padding","children","className","style"]);const{collapsed:u,setScrollPosition:d}=Qt();if(u)return null;const f=t!=="none"?m(t,"p"):"",b=e?"overflow-y-auto overflow-x-hidden":"overflow-hidden",p=e?{scrollbarWidth:ot.content.scrollbar.width,scrollbarColor:`${ot.content.scrollbar.color.thumb} ${ot.content.scrollbar.color.track}`}:{},g=h=>{e&&d(h.currentTarget.scrollTop)};return n.jsx("div",L(M({className:`
|
|
274
274
|
flex-1
|
|
275
275
|
min-h-0
|
|
276
|
-
${
|
|
276
|
+
${b}
|
|
277
277
|
${f}
|
|
278
278
|
${s}
|
|
279
|
-
`,style:M(M({},
|
|
279
|
+
`,style:M(M({},p),a),onScroll:g,tabIndex:e?0:void 0},o),{children:r}))}function Wo(i){var c=i,{padding:e="md",showBorder:t=!0,children:r,className:s="",style:a}=c,o=W(c,["padding","showBorder","children","className","style"]);const{collapsed:u,registerFooter:d,unregisterFooter:f}=Qt();if(l.useEffect(()=>(d(),()=>f()),[d,f]),u)return null;const b=e!=="none"?m(e,"p"):"";return n.jsx("div",L(M({className:`
|
|
280
280
|
flex-shrink-0
|
|
281
|
-
${
|
|
281
|
+
${b}
|
|
282
282
|
${t?"border-t border-line-default":""}
|
|
283
283
|
bg-surface-subtle
|
|
284
284
|
${s}
|
|
285
|
-
`,style:a},o),{children:r}))}function
|
|
285
|
+
`,style:a},o),{children:r}))}function Ho(d){var f=d,{id:e,title:t,icon:r,actions:s,collapsible:a=!0,defaultCollapsed:o=!1,children:i,className:c=""}=f,u=W(f,["id","title","icon","actions","collapsible","defaultCollapsed","children","className"]);var j;const{collapsed:b,activeGroup:p,setActiveGroup:g}=Qt(),{groupStates:h,toggleGroup:k,setGroupCollapsed:w}=Qe(),{animationDuration:x}=Ze(),v=l.useRef(!1);if(l.useEffect(()=>{!v.current&&h[e]===void 0&&(v.current=!0,w(e,o))},[e,o,h,w]),b)return null;const N=(j=h[e])!=null?j:o,$=p===e,C=()=>{g(e),a&&k(e)};return n.jsxs("div",L(M({className:`
|
|
286
286
|
border-b
|
|
287
287
|
border-line-default
|
|
288
288
|
last:border-b-0
|
|
289
289
|
${c}
|
|
290
|
-
`},u),{children:[t&&n.jsxs("button",{type:"button",onClick
|
|
290
|
+
`},u),{children:[t&&n.jsxs("button",{type:"button",onClick:C,className:`
|
|
291
291
|
flex
|
|
292
292
|
items-center
|
|
293
293
|
justify-between
|
|
@@ -297,23 +297,23 @@ React keys must be passed directly to JSX without using spread:
|
|
|
297
297
|
text-left
|
|
298
298
|
transition-colors
|
|
299
299
|
duration-150
|
|
300
|
-
${
|
|
300
|
+
${$?"bg-surface-active":"hover:bg-surface-active"}
|
|
301
301
|
${a?"cursor-pointer":"cursor-default"}
|
|
302
|
-
`,"aria-expanded":a?!N:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[s,a&&n.jsx(
|
|
302
|
+
`,"aria-expanded":a?!N:void 0,"aria-controls":a?`sidebar-group-${e}`:void 0,children:[n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[r&&n.jsx("span",{className:"w-4 h-4 text-fg-tertiary",children:r}),n.jsx("span",{className:"text-sm font-medium text-fg-secondary",children:t})]}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[s,a&&n.jsx(Cr,{className:`
|
|
303
303
|
w-4
|
|
304
304
|
h-4
|
|
305
305
|
text-fg-tertiary
|
|
306
306
|
transition-transform
|
|
307
307
|
${N?"-rotate-90":"rotate-0"}
|
|
308
|
-
`,style:{transitionDuration:`${
|
|
308
|
+
`,style:{transitionDuration:`${x}ms`},"aria-hidden":"true"})]})]}),a?n.jsx($s,{open:!N,duration:x,children:n.jsx("div",{id:`sidebar-group-${e}`,className:`${m("md","px")} ${m("sm","py")}`,children:i})}):n.jsx("div",{className:`${m("md","px")} ${m("sm","py")}`,children:i})]}))}function Bo({id:e,children:t}){const{activeSlot:r,registerSlot:s,unregisterSlot:a}=nn();return l.useEffect(()=>(s(e,t),()=>a(e)),[e,t,s,a]),r!==e?null:n.jsx(n.Fragment,{children:t})}function Uo({fallback:e=null}){const{activeSlot:t,slots:r}=nn();return!t||!r.has(t)?n.jsx(n.Fragment,{children:e}):n.jsx(n.Fragment,{children:r.get(t)})}function vt(a){var o=a,{children:e,className:t="",style:r}=o,s=W(o,["children","className","style"]);const i=Qe(),c=Ze(),u=l.useRef(null),[d,f]=l.useState(0),[b,p]=l.useState(!1),[g,h]=l.useState(!1),[k,w]=l.useState(null),x=l.useCallback(()=>p(!0),[]),v=l.useCallback(()=>p(!1),[]),N=l.useCallback(()=>h(!0),[]),$=l.useCallback(()=>h(!1),[]),C=l.useMemo(()=>({collapsed:i.collapsed,currentWidth:i.currentWidth,isMobile:i.isMobile,sidebarRef:u,scrollPosition:d,setScrollPosition:f,hasHeader:b,hasFooter:g,registerHeader:x,unregisterHeader:v,registerFooter:N,unregisterFooter:$,activeGroup:k,setActiveGroup:w}),[i.collapsed,i.currentWidth,i.isMobile,d,b,g,x,v,N,$,k]),j=yr(c.contentWidth),E=yr(c.navigationWidth),S=j-E;return n.jsx(Yr.Provider,{value:C,children:n.jsx("div",L(M({ref:u,className:y("flex","flex-col","h-full","bg-surface-subtle","border-r","border-line-default","overflow-hidden",t),style:M({width:i.collapsed?0:S,opacity:i.collapsed?0:1,visibility:i.collapsed?"hidden":"visible",transitionProperty:"width, opacity, visibility",transitionDuration:`${c.animationDuration}ms`,transitionTimingFunction:c.animationEasing},r),"aria-hidden":i.collapsed},s),{children:e}))})}vt.Header=zo;vt.Content=Vo;vt.Footer=Wo;vt.Group=Ho;vt.Slot=Bo;vt.SlotContent=Uo;function Ie(A){var _=A,{mode:e="full",variant:t="default",navigationWidth:r="56px",width:s="320px",animationDuration:a=300,resizable:o=!1,minWidth:i,maxWidth:c,snapPoints:u,responsive:d=!1,mobileBreakpoint:f=768,mobileVariant:b="collapse",overlayBackdrop:p=!0,storageKey:g,persistWidth:h=!1,defaultCollapsed:k=!1,collapsed:w,onCollapseChange:x,onWidthChange:v,onMobileChange:N,exclusiveGroups:$=!1,showToggle:C=!0,togglePosition:j="floating",children:E}=_,S=W(_,["mode","variant","navigationWidth","width","animationDuration","resizable","minWidth","maxWidth","snapPoints","responsive","mobileBreakpoint","mobileVariant","overlayBackdrop","storageKey","persistWidth","defaultCollapsed","collapsed","onCollapseChange","onWidthChange","onMobileChange","exclusiveGroups","showToggle","togglePosition","children"]);const R=l.useMemo(()=>({showMainToggle:C,mainTogglePosition:j}),[C,j]);return n.jsx(Ur.Provider,{value:R,children:n.jsx(rn,{variant:t,navigationWidth:r,contentWidth:s,animationDuration:a,mode:e,resizable:o,minWidth:i,maxWidth:c,snapPoints:u,responsive:d,mobileBreakpoint:f,mobileVariant:b,overlayBackdrop:p,storageKey:g,persistWidth:h,defaultCollapsed:k,collapsed:w,onCollapseChange:x,onWidthChange:v,onMobileChange:N,exclusiveGroups:$,children:n.jsx(Fo,L(M({},S),{children:E}))})})}Ie.Navbar=xt;Ie.Sidebar=vt;Ie.Toggle=ln;Ie.ResizeHandle=an;Ie.Backdrop=on;Ie.Provider=rn;Ie.ThemeProvider=Qs;Ie.ConfigProvider=en;Ie.StateProvider=tn;Ie.SlotProvider=Ro;function nf({defaultStates:e={},persist:t=!1,storageKey:r}={}){const s=()=>{if(t&&r&&typeof window!="undefined"){const d=localStorage.getItem(`${r}-groups`);if(d)try{const f=JSON.parse(d);return M(M({},e),f)}catch(f){}}return e},[a,o]=l.useState(s);l.useEffect(()=>{t&&r&&typeof window!="undefined"&&localStorage.setItem(`${r}-groups`,JSON.stringify(a))},[t,r,a]);const i=l.useCallback(d=>{o(f=>L(M({},f),{[d]:!f[d]}))},[]),c=l.useCallback((d,f)=>{o(b=>L(M({},b),{[d]:f}))},[]),u=l.useCallback(()=>{o(e)},[e]);return{groupStates:a,toggleGroup:i,setGroupCollapsed:c,resetGroups:u}}function af(){const{activeItem:e,setActiveItem:t}=Kr(),r=sn(),s=l.useCallback((a,o)=>{t(a),o&&(r!=null&&r.setActiveSlot)&&r.setActiveSlot(o)},[t,r]);return{activeItem:e,setActiveItem:t,navigate:s}}function of(){var r,s,a,o;const e=sn(),t=Oo();return{activeSlot:(r=e==null?void 0:e.activeSlot)!=null?r:null,setActiveSlot:(s=e==null?void 0:e.setActiveSlot)!=null?s:(()=>{}),scrollPosition:(a=t==null?void 0:t.scrollPosition)!=null?a:0,setScrollPosition:(o=t==null?void 0:t.setScrollPosition)!=null?o:(()=>{})}}function lf(){const e=Ze(),t=Tt(),r=Qe();return{theme:e,config:t,state:r}}function Go({children:e,asChild:t=!1}){const{onOpenChange:r}=Ct();return t&&l.isValidElement(e)?l.cloneElement(e,{onClick:s=>{var a,o;r(!0),(o=(a=e.props).onClick)==null||o.call(a,s)}}):n.jsx("button",{type:"button",onClick:()=>r(!0),"aria-haspopup":"dialog",children:e})}function cn({"aria-label":e="Close dialog",className:t="",asChild:r=!1,children:s}){const{onClose:a}=Ct();return r&&l.isValidElement(s)?l.cloneElement(s,{onClick:o=>{var i,c;a(),(c=(i=s.props).onClick)==null||c.call(i,o)}}):n.jsx(te,{variant:"iconOnly",size:"sm",onClick:a,className:`absolute right-4 top-4 ${t}`,"aria-label":e,children:n.jsx(Te,{className:"h-4 w-4"})})}function dn(c){var u=c,{children:e,size:t="md",closeOnOverlayClick:r=!0,closeOnEscape:s=!0,showCloseButton:a=!0,className:o=""}=u,i=W(u,["children","size","closeOnOverlayClick","closeOnEscape","showCloseButton","className"]);const{isOpen:d,onClose:f,titleId:b,descriptionId:p,hasTitle:g,hasDescription:h}=Ct(),k=l.useRef(null),w=l.useRef(null);if(Or(k,d),Ps(k,d),l.useEffect(()=>{if(!d||!s)return;const $=C=>{C.key==="Escape"&&f()};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[d,f,s]),!d)return null;const x={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-2xl",fullscreen:`max-w-full h-full ${m("none","m")} ${G("none")}`},v=$=>{r&&$.target===w.current&&f()},N=n.jsxs("div",{className:`fixed inset-0 ${xe("modal")} overflow-y-auto`,onClick:v,children:[n.jsx("div",{ref:w,className:"fixed inset-0 bg-scrim transition-opacity","aria-hidden":"true"}),n.jsx("div",{className:`flex min-h-full items-center justify-center ${m("base","p")}`,children:n.jsxs("div",L(M({ref:k,role:"dialog","aria-modal":"true","aria-labelledby":g?b:void 0,"aria-describedby":h?p:void 0,className:`
|
|
309
309
|
relative w-full
|
|
310
310
|
${x[t]}
|
|
311
311
|
bg-surface-overlay
|
|
312
|
-
${
|
|
313
|
-
${
|
|
314
|
-
${
|
|
315
|
-
`,tabIndex:-1},
|
|
316
|
-
fixed ${g[r]} ${
|
|
312
|
+
${G("lg")}
|
|
313
|
+
${be("xl")}
|
|
314
|
+
${o}
|
|
315
|
+
`,tabIndex:-1},i),{children:[e,a&&n.jsx(cn,{})]}))})]});return typeof window!="undefined"?Xe.createPortal(N,document.body):N}function un(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:`flex flex-col ${m("1.5","space-y")} ${m("lg","p")} ${m("base","pb")} ${t}`},r),{children:e}))}function Ko(o){var i=o,{as:e="h2",children:t,className:r="",id:s}=i,a=W(i,["as","children","className","id"]);const c=Ct(),u=l.useId(),d=s||c.titleId||u,{registerTitle:f}=c;return l.useEffect(()=>f(),[f]),n.jsx(e,L(M({id:d,className:`${pe("h3")} font-semibold leading-none tracking-tight ${r}`},a),{children:t}))}function Yo(a){var o=a,{children:e,className:t="",id:r}=o,s=W(o,["children","className","id"]);const i=Ct(),c=l.useId(),u=r||i.descriptionId||c,{registerDescription:d}=i;return l.useEffect(()=>d(),[d]),n.jsx("p",L(M({id:u,className:`${pe("bodySmall")} text-fg-secondary ${t}`},s),{children:e}))}function fn(s){var a=s,{children:e,className:t=""}=a,r=W(a,["children","className"]);return n.jsx("div",L(M({className:`flex flex-col-reverse sm:flex-row sm:justify-end sm:${m("sm","space-x")} ${m("lg","p")} ${m("base","pt")} ${t}`},r),{children:e}))}function Pe({children:e,open:t,defaultOpen:r,onOpenChange:s}){const a=l.useId(),o=l.useId();return n.jsx(Ns,{open:t,defaultOpen:r,onOpenChange:s,titleId:a,descriptionId:o,children:e})}Pe.Trigger=Go;Pe.Content=dn;Pe.Header=un;Pe.Title=Ko;Pe.Description=Yo;Pe.Footer=fn;Pe.Close=cn;function cf({title:e,description:t,confirmLabel:r="Confirm",cancelLabel:s="Cancel",variant:a="default",onConfirm:o,onCancel:i,children:c}){const{onClose:u}=Ct(),d=()=>{o==null||o(),u()},f=()=>{i==null||i(),u()};return n.jsx(dn,{size:"sm",closeOnOverlayClick:!1,showCloseButton:!1,children:c||n.jsxs(n.Fragment,{children:[n.jsxs(un,{children:[n.jsx(Pe.Title,{children:e}),t&&n.jsx(Pe.Description,{children:t})]}),n.jsxs(fn,{children:[n.jsx(te,{variant:"outline",onClick:f,children:s}),n.jsx(te,{variant:a==="destructive"?"error":"primary",onClick:d,children:r})]})]})})}function df({open:e,defaultOpen:t,onOpenChange:r,title:s,description:a,confirmLabel:o,cancelLabel:i,variant:c,onConfirm:u,onCancel:d,children:f}){return n.jsx(Pe,{open:e,defaultOpen:t,onOpenChange:r,children:n.jsx(cf,{title:s,description:a,confirmLabel:o,cancelLabel:i,variant:c,onConfirm:u,onCancel:d,children:f})})}const uf={success:br,error:Er,warning:Hc,info:Ic},ff={success:"border-success",error:"border-error",warning:"border-warning",info:"border-info"},mf={success:"text-fg-success",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info"};function qo(i){var c=i,{toast:e,onDismiss:t,position:r="top-right",className:s="",style:a}=c,o=W(c,["toast","onDismiss","position","className","style"]);const[u,d]=l.useState(!1),[f,b]=l.useState(!1),p=uf[e.variant];l.useEffect(()=>{if(e.duration===void 0)return;d(!0);const k=setTimeout(()=>{b(!0),setTimeout(()=>{t(e.id)},300)},e.duration);return()=>clearTimeout(k)},[e.duration,e.id,t]),l.useEffect(()=>{const k=setTimeout(()=>d(!0),10);return()=>clearTimeout(k)},[]);const g={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"},h=()=>{b(!0),setTimeout(()=>{t(e.id)},300)};return n.jsx("div",L(M({className:`
|
|
316
|
+
fixed ${g[r]} ${xe("toast")}
|
|
317
317
|
w-full max-w-sm
|
|
318
318
|
transition-all duration-300 ease-in-out
|
|
319
319
|
${u&&!f?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"}
|
|
@@ -323,84 +323,84 @@ React keys must be passed directly to JSX without using spread:
|
|
|
323
323
|
flex items-start ${m("md","gap")}
|
|
324
324
|
${m("base","p")}
|
|
325
325
|
bg-surface-overlay
|
|
326
|
-
${
|
|
327
|
-
${
|
|
326
|
+
${G("lg")}
|
|
327
|
+
${be("lg")}
|
|
328
328
|
border
|
|
329
|
-
${
|
|
330
|
-
`,children:[n.jsx("div",{className:`flex-shrink-0 ${
|
|
329
|
+
${ff[e.variant]}
|
|
330
|
+
`,children:[n.jsx("div",{className:`flex-shrink-0 ${mf[e.variant]}`,children:n.jsx(p,{className:"h-5 w-5","aria-hidden":"true"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium text-fg-primary",children:e.title}),e.description&&n.jsx("div",{className:`${m("xs","mt")} text-sm text-fg-secondary`,children:e.description}),e.action&&n.jsx("div",{className:m("md","mt"),children:n.jsx(te,{variant:"outline",size:"sm",onClick:()=>{var k;(k=e.action)==null||k.onClick(),h()},children:e.action.label})})]}),n.jsx(te,{variant:"iconOnly",size:"sm",onClick:h,className:"flex-shrink-0","aria-label":"Dismiss notification",children:n.jsx(Te,{className:"h-4 w-4"})})]})}))}function pf({position:e="top-right",maxToasts:t}){const{toasts:r,removeToast:s}=js(),a=t?r.slice(0,t):r;if(a.length===0)return null;const o=n.jsx("div",{className:`fixed inset-0 pointer-events-none ${xe("toast")}`,"aria-live":"polite","aria-label":"Notifications",children:a.map((i,c)=>{const u=e.includes("top"),d=1+c*5;return n.jsx(qo,{toast:i,onDismiss:s,position:e,style:{[u?"top":"bottom"]:`${d}rem`}},i.id)})});return typeof window!="undefined"?Xe.createPortal(o,document.body):o}function bf(){const{addToast:e,removeToast:t,clearAll:r}=js(),s=l.useCallback(d=>e({title:d.title,description:d.description,variant:d.variant||"info",duration:d.duration,action:d.action}),[e]),a=l.useCallback((d,f,b)=>s(M({title:d,description:f,variant:"success"},b)),[s]),o=l.useCallback((d,f,b)=>s(M({title:d,description:f,variant:"error"},b)),[s]),i=l.useCallback((d,f,b)=>s(M({title:d,description:f,variant:"warning"},b)),[s]),c=l.useCallback((d,f,b)=>s(M({title:d,description:f,variant:"info"},b)),[s]),u=l.useCallback((d,f,b,p="info",g)=>s({title:d,description:f,variant:p,duration:g,action:{label:"Undo",onClick:b}}),[s]);return{show:s,success:a,error:o,warning:i,info:c,withUndo:u,dismiss:t,clearAll:r}}function Xo({steps:e,currentStep:t,defaultCurrentStep:r=0,onStepChange:s,onComplete:a,allowNavigation:o=!0,showStepNumbers:i=!0,orientation:c="horizontal",className:u=""}){const[d,f]=l.useState(r),b=t!==void 0,p=b?t:d,g=j=>j<p?"completed":j===p?"active":"pending",h=()=>{if(p<e.length-1){const j=p+1;b||f(j),s==null||s(j)}else a==null||a()},k=()=>{if(p>0){const j=p-1;b||f(j),s==null||s(j)}},w=j=>{o&&(e[j].disabled||(b||f(j),s==null||s(j)))},x=e[p],v=p===0,N=p===e.length-1,$=(j,E,S)=>`Step ${E+1}${j.title?`: ${j.title}`:""}${S==="error"?" (error)":""}`,C=(j,E)=>j==="completed"?n.jsx(Aa,{className:"h-5 w-5"}):j==="error"?n.jsx(Er,{className:"h-5 w-5","aria-hidden":"true"}):i?E+1:null;return c==="vertical"?n.jsxs("div",{className:`flex ${m("base","gap")} ${u}`,children:[n.jsx("div",{className:"flex flex-col",children:e.map((j,E)=>{const S=j.status||g(E),A=E===p;return n.jsxs("div",{className:`flex items-start ${m("md","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("button",L(M({type:"button",onClick:()=>w(E),disabled:!o||j.disabled,"aria-current":A?"step":void 0,"aria-label":$(j,E,S)},S==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
331
331
|
flex
|
|
332
332
|
items-center
|
|
333
333
|
justify-center
|
|
334
334
|
w-10
|
|
335
335
|
h-10
|
|
336
|
-
${
|
|
336
|
+
${G("full")}
|
|
337
337
|
border-2
|
|
338
|
-
${
|
|
338
|
+
${je("base")}
|
|
339
339
|
${S==="completed"?"bg-success border-success text-fg-inverse":S==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":S==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
340
|
-
${!o||
|
|
341
|
-
`,children:S
|
|
340
|
+
${!o||j.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
341
|
+
`,children:C(S,E)})),E<e.length-1&&n.jsx("div",{className:`
|
|
342
342
|
w-0.5
|
|
343
343
|
h-12
|
|
344
344
|
${m("sm","mt")}
|
|
345
345
|
${S==="completed"?"bg-success":"bg-line-emphasis"}
|
|
346
|
-
`})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[n.jsx("button",{type:"button",onClick:()=>
|
|
346
|
+
`})]}),n.jsxs("div",{className:`flex-1 ${m("xl","pb")}`,children:[n.jsx("button",{type:"button",onClick:()=>w(E),disabled:!o||j.disabled,id:`${j.id}-title`,className:`
|
|
347
347
|
text-left
|
|
348
|
-
${
|
|
348
|
+
${A?"font-semibold":"font-medium"}
|
|
349
349
|
${S==="active"?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
350
|
-
${!o||
|
|
351
|
-
`,children:
|
|
350
|
+
${!o||j.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
351
|
+
`,children:j.title}),j.description&&n.jsx("p",{className:`text-sm text-fg-tertiary ${m("xs","mt")}`,children:j.description})]})]},j.id)})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{role:"region","aria-labelledby":x?`${x.id}-title`:void 0,className:`
|
|
352
352
|
${m("lg","p")}
|
|
353
353
|
border
|
|
354
354
|
border-line-default
|
|
355
|
-
${
|
|
355
|
+
${G("lg")}
|
|
356
356
|
bg-surface-base
|
|
357
|
-
`,children:
|
|
357
|
+
`,children:x==null?void 0:x.content}),n.jsxs("div",{className:`flex justify-between ${m("base","mt")} ${m("base","gap")}`,children:[n.jsx(te,{variant:"outline",onClick:k,disabled:v,children:"Previous"}),n.jsx(te,{variant:"primary",onClick:h,children:N?"Complete":"Next"})]})]})]}):n.jsxs("div",{className:`${m("lg","space-y")} ${u}`,children:[n.jsx("div",{className:"flex items-center",children:e.map((j,E)=>{const S=j.status||g(E),A=E===p;return n.jsxs("div",{className:"flex items-center flex-1",children:[n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("button",L(M({type:"button",onClick:()=>w(E),disabled:!o||j.disabled,"aria-current":A?"step":void 0,"aria-label":$(j,E,S)},S==="pending"?{"data-marker":"pending"}:{}),{className:`
|
|
358
358
|
flex
|
|
359
359
|
items-center
|
|
360
360
|
justify-center
|
|
361
361
|
w-10
|
|
362
362
|
h-10
|
|
363
|
-
${
|
|
363
|
+
${G("full")}
|
|
364
364
|
border-2
|
|
365
|
-
${
|
|
365
|
+
${je("base")}
|
|
366
366
|
${S==="completed"?"bg-success border-success text-fg-inverse":S==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":S==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
367
|
-
${!o||
|
|
368
|
-
`,children:S
|
|
367
|
+
${!o||j.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
368
|
+
`,children:C(S,E)})),n.jsxs("div",{className:`${m("sm","mt")} text-center ${m("sm","px")}`,children:[n.jsx("p",{id:`${j.id}-title`,className:`
|
|
369
369
|
text-sm
|
|
370
370
|
font-medium
|
|
371
|
-
${
|
|
372
|
-
`,children:
|
|
371
|
+
${A?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
372
|
+
`,children:j.title}),j.description&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mt")}`,children:j.description})]})]}),E<e.length-1&&n.jsx("div",{className:`flex-1 ${m("base","mx")}`,children:n.jsx(Es,{className:`
|
|
373
373
|
${S==="completed"?"border-success":"border-line-emphasis"}
|
|
374
|
-
`})})]},
|
|
374
|
+
`})})]},j.id)})}),n.jsx("div",{role:"region","aria-labelledby":x?`${x.id}-title`:void 0,className:`
|
|
375
375
|
${m("lg","p")}
|
|
376
376
|
border
|
|
377
377
|
border-line-default
|
|
378
|
-
${
|
|
378
|
+
${G("lg")}
|
|
379
379
|
bg-surface-base
|
|
380
|
-
`,children:
|
|
380
|
+
`,children:x==null?void 0:x.content}),n.jsxs("div",{className:`flex justify-between ${m("base","gap")}`,children:[n.jsx(te,{variant:"outline",onClick:k,disabled:v,children:"Previous"}),n.jsx(te,{variant:"primary",onClick:h,children:N?"Complete":"Next"})]})]})}function gf({items:e,orientation:t="vertical",className:r=""}){return t==="horizontal"?n.jsx("div",{className:`flex items-start ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsx("div",{className:"flex items-start flex-1",children:n.jsxs("div",{className:"flex flex-col items-center flex-1",children:[n.jsx("div",L(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
|
|
381
381
|
flex
|
|
382
382
|
items-center
|
|
383
383
|
justify-center
|
|
384
384
|
w-10
|
|
385
385
|
h-10
|
|
386
|
-
${
|
|
386
|
+
${G("full")}
|
|
387
387
|
border-2
|
|
388
388
|
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
389
|
-
`,children:s.icon||(o==="completed"?n.jsx(
|
|
389
|
+
`,children:s.icon||(o==="completed"?n.jsx(br,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
|
|
390
390
|
w-full
|
|
391
391
|
h-0.5
|
|
392
392
|
${m("sm","mt")}
|
|
393
393
|
${o==="completed"?"bg-success":"bg-line-emphasis"}
|
|
394
|
-
`}),n.jsxs("div",{className:`${m("base","mt")} text-center ${m("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:`text-xs text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("sm","mt"),children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`${m("none","space-y")} ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:`flex items-start ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",
|
|
394
|
+
`}),n.jsxs("div",{className:`${m("base","mt")} text-center ${m("base","px")}`,children:[s.timestamp&&n.jsx("p",{className:`text-xs text-fg-tertiary ${m("xs","mb")}`,children:s.timestamp}),n.jsx("h3",{className:"text-sm font-semibold text-fg-primary",children:s.title}),s.description&&n.jsx("p",{className:`text-xs text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("sm","mt"),children:s.content})]})]})},s.id)})}):n.jsx("div",{className:`${m("none","space-y")} ${r}`,children:e.map((s,a)=>{const o=s.status||(a===0?"active":a<e.findIndex(c=>c.status==="active")?"completed":"default"),i=a===e.length-1;return n.jsxs("div",{className:`flex items-start ${m("base","gap")}`,children:[n.jsxs("div",{className:"flex flex-col items-center",children:[n.jsx("div",L(M({},o==="default"?{"data-marker":"pending"}:{}),{className:`
|
|
395
395
|
flex
|
|
396
396
|
items-center
|
|
397
397
|
justify-center
|
|
398
398
|
w-10
|
|
399
399
|
h-10
|
|
400
|
-
${
|
|
400
|
+
${G("full")}
|
|
401
401
|
border-2
|
|
402
402
|
${o==="completed"?"bg-success border-success text-fg-inverse":o==="active"?"bg-surface-brand-strong border-line-brand text-fg-inverse":o==="error"?"bg-error border-error text-fg-inverse":"bg-surface-base border-line-emphasis text-fg-quaternary"}
|
|
403
|
-
`,children:s.icon||(o==="completed"?n.jsx(
|
|
403
|
+
`,children:s.icon||(o==="completed"?n.jsx(br,{className:"h-4 w-4"}):a+1)})),!i&&n.jsx("div",{className:`
|
|
404
404
|
w-0.5
|
|
405
405
|
flex-1
|
|
406
406
|
min-h-16
|
|
@@ -410,53 +410,48 @@ React keys must be passed directly to JSX without using spread:
|
|
|
410
410
|
text-base
|
|
411
411
|
font-semibold
|
|
412
412
|
${o==="active"?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
413
|
-
`,children:s.title}),s.description&&n.jsx("p",{className:`text-sm text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("md","mt"),children:s.content})]})]},s.id)})})}function
|
|
413
|
+
`,children:s.title}),s.description&&n.jsx("p",{className:`text-sm text-fg-secondary ${m("xs","mt")}`,children:s.description}),s.content&&n.jsx("div",{className:m("md","mt"),children:s.content})]})]},s.id)})})}function hf({items:e,open:t,defaultOpen:r=!1,onOpenChange:s,trigger:a,placeholder:o="Type a command or search...",emptyMessage:i="No commands found",className:c=""}){const[u,d]=l.useState(r),[f,b]=l.useState(""),[p,g]=l.useState(0),h=l.useRef(null),k=l.useRef(null),w=l.useRef(null),x=l.useId(),v=t!==void 0,N=v?t:u;Xt(N),Or(w,N);const C=e.filter(I=>{var B,U;if(!f)return!0;const D=f.toLowerCase(),F=I.label.toLowerCase().includes(D),P=(B=I.description)==null?void 0:B.toLowerCase().includes(D),z=(U=I.keywords)==null?void 0:U.some(oe=>oe.toLowerCase().includes(D));return F||P||z}).reduce((I,D)=>{const F=D.group||"Other";return I[F]||(I[F]=[]),I[F].push(D),I},{}),j=Object.values(C).flat(),E=N&&j[p]?`${x}-option-${p}`:void 0,S=l.useCallback(I=>{v||d(I),s==null||s(I),I&&(b(""),g(0))},[v,s]);l.useEffect(()=>{if(!N)return;const I=setTimeout(()=>{var D;return(D=h.current)==null?void 0:D.focus()},0);return()=>clearTimeout(I)},[N]);const A=I=>{I.action(),S(!1)},_=I=>{if(I.key==="Escape"){S(!1);return}if(I.key==="ArrowDown"){I.preventDefault(),g(D=>Math.min(D+1,j.length-1));return}if(I.key==="ArrowUp"){I.preventDefault(),g(D=>Math.max(D-1,0));return}if(I.key==="Enter"){I.preventDefault(),j[p]&&A(j[p]);return}};l.useEffect(()=>{if(k.current&&p>=0){const I=k.current.querySelector(`[data-index="${p}"]`);I&&typeof I.scrollIntoView=="function"&&I.scrollIntoView({block:"nearest",behavior:"smooth"})}},[p]),l.useEffect(()=>{g(0)},[f]),l.useEffect(()=>{const I=D=>{(D.metaKey||D.ctrlKey)&&D.key==="k"&&(D.preventDefault(),S(!N))};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[N,S]);const R=N?n.jsx("div",{className:`
|
|
414
414
|
fixed
|
|
415
415
|
inset-0
|
|
416
|
-
${
|
|
416
|
+
${xe("modal-backdrop")}
|
|
417
417
|
bg-scrim
|
|
418
418
|
flex
|
|
419
419
|
items-start
|
|
420
420
|
justify-center
|
|
421
421
|
pt-[20vh]
|
|
422
|
-
${
|
|
423
|
-
`,onClick:()=>
|
|
422
|
+
${je("base")}
|
|
423
|
+
`,onClick:()=>S(!1),children:n.jsxs("div",{ref:w,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:`
|
|
424
424
|
w-full
|
|
425
425
|
max-w-2xl
|
|
426
426
|
${m("base","mx")}
|
|
427
427
|
bg-surface-overlay
|
|
428
|
-
${
|
|
429
|
-
${
|
|
430
|
-
${
|
|
431
|
-
${
|
|
428
|
+
${G("lg")}
|
|
429
|
+
${be("xl")}
|
|
430
|
+
${xe("modal")}
|
|
431
|
+
${je("base")}
|
|
432
432
|
${c}
|
|
433
|
-
`,onClick:
|
|
433
|
+
`,onClick:I=>I.stopPropagation(),children:[n.jsxs("div",{className:`
|
|
434
434
|
flex
|
|
435
435
|
items-center
|
|
436
436
|
${m("md","gap")}
|
|
437
437
|
${m("base","p")}
|
|
438
438
|
border-b
|
|
439
439
|
border-line-default
|
|
440
|
-
`,children:[n.jsx(
|
|
440
|
+
`,children:[n.jsx(ms,{className:"h-5 w-5 text-fg-secondary"}),n.jsx(Me,{ref:h,value:f,onChange:I=>b(I.target.value),onKeyDown:_,placeholder:o,className:"flex-1 border-0 focus:ring-0",role:"combobox","aria-expanded":N,"aria-controls":x,"aria-activedescendant":E,"aria-autocomplete":"list","aria-label":o}),n.jsxs("div",{className:`
|
|
441
441
|
flex
|
|
442
442
|
items-center
|
|
443
443
|
${m("xs","gap")}
|
|
444
444
|
${m("sm","px")}
|
|
445
445
|
${m("xs","py")}
|
|
446
|
-
${
|
|
446
|
+
${G("sm")}
|
|
447
447
|
bg-surface-muted
|
|
448
448
|
text-xs
|
|
449
449
|
text-fg-tertiary
|
|
450
|
-
`,children:[n.jsx(
|
|
450
|
+
`,children:[n.jsx(gc,{className:"h-3 w-3"}),n.jsx("span",{children:"K"})]})]}),n.jsx("div",{ref:k,id:x,role:"listbox","aria-label":"Commands",className:`
|
|
451
451
|
max-h-96
|
|
452
452
|
overflow-y-auto
|
|
453
453
|
${m("sm","py")}
|
|
454
|
-
`,children:Object.
|
|
455
|
-
${m("lg","p")}
|
|
456
|
-
text-center
|
|
457
|
-
text-sm
|
|
458
|
-
text-fg-secondary
|
|
459
|
-
`,children:i}):Object.entries(N).map(([C,A])=>n.jsxs("div",{children:[C!=="Other"&&n.jsx("div",{className:`
|
|
454
|
+
`,children:Object.entries(C).map(([I,D])=>n.jsxs("div",{role:"group","aria-label":I!=="Other"?I:void 0,children:[I!=="Other"&&n.jsx("div",{"aria-hidden":"true",className:`
|
|
460
455
|
${m("sm","px")}
|
|
461
456
|
${m("xs","py")}
|
|
462
457
|
text-xs
|
|
@@ -464,7 +459,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
464
459
|
text-fg-tertiary
|
|
465
460
|
uppercase
|
|
466
461
|
tracking-wider
|
|
467
|
-
`,children:
|
|
462
|
+
`,children:I}),D.map((F,P)=>{const z=j.indexOf(F),B=z===p;return n.jsxs("button",{type:"button",id:`${x}-option-${z}`,role:"option","aria-selected":B,tabIndex:-1,"data-index":z,onClick:()=>A(F),className:`
|
|
468
463
|
w-full
|
|
469
464
|
flex
|
|
470
465
|
items-center
|
|
@@ -472,16 +467,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
472
467
|
${m("base","px")}
|
|
473
468
|
${m("md","py")}
|
|
474
469
|
text-left
|
|
475
|
-
${
|
|
476
|
-
${
|
|
477
|
-
`,children:[
|
|
478
|
-
${
|
|
479
|
-
`,children:
|
|
470
|
+
${je("base")}
|
|
471
|
+
${B?"bg-surface-brand-muted":"hover:bg-surface-hover"}
|
|
472
|
+
`,children:[F.icon&&n.jsx("div",{className:`
|
|
473
|
+
${B?"text-fg-brand-emphasis":"text-fg-secondary"}
|
|
474
|
+
`,children:F.icon}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:`
|
|
480
475
|
text-sm
|
|
481
476
|
font-medium
|
|
482
|
-
${
|
|
483
|
-
`,children:
|
|
484
|
-
|
|
477
|
+
${B?"text-fg-brand-emphasis":"text-fg-primary"}
|
|
478
|
+
`,children:F.label}),F.description&&n.jsx("div",{className:`text-xs ${B?"text-fg-secondary":"text-fg-tertiary"} ${m("0.5","mt")}`,children:F.description})]})]},F.id)})]},I))}),Object.keys(C).length===0&&n.jsx("div",{role:"status","aria-live":"polite",className:`
|
|
479
|
+
${m("lg","p")}
|
|
480
|
+
text-center
|
|
481
|
+
text-sm
|
|
482
|
+
text-fg-secondary
|
|
483
|
+
`,children:i})]})}):null;return n.jsxs(n.Fragment,{children:[a?n.jsx("div",{onClick:()=>S(!0),children:a}):null,typeof window!="undefined"&&Xe.createPortal(R,document.body)]})}function xf({columns:e,data:t,loading:r=!1,onSort:s,sortColumn:a,sortDirection:o,multiSort:i=!1,groups:c,onGroupChange:u,groupable:d=!1,resizable:f=!0,reorderable:b=!1,onColumnReorder:p,columnWidths:g,onColumnResize:h,selectable:k=!1,selectedRows:w,onSelectionChange:x,rowId:v,exportable:N=!1,onExport:$,exportFormats:C=["csv","xlsx","json"],pagination:j,filters:E,actions:S,toolbarActions:A,virtualScrolling:_=!1,virtualScrollingOptions:R,emptyMessage:I,emptyStateTitle:D,emptyStateMessage:F,emptyStateIllustration:P,emptyStateAction:z,className:B=""}){const[U,oe]=l.useState({}),H=g!==void 0,O=H?g:U,K=l.useMemo(()=>e.map(Z=>L(M({},Z),{width:O[Z.key]||Z.defaultWidth})),[e,O]),re=Z=>{$?$(Z):Z==="csv"?se(t,e):Z==="json"&&ce(t)},se=(Z,ee)=>{const J=we=>{const Oe=we==null?"":String(we);return/[",\n\r]/.test(Oe)?`"${Oe.replace(/"/g,'""')}"`:Oe},Q=ee.filter(we=>we.exportable!==!1),V=Q.map(we=>J(we.label||we.key)),Y=Z.map(we=>Q.map(Oe=>J(we[Oe.key]))),ne=[V.join(","),...Y.map(we=>we.join(","))].join(`\r
|
|
484
|
+
`),de=new Blob([ne],{type:"text/csv"}),$e=URL.createObjectURL(de),et=document.createElement("a");et.href=$e,et.download=`export-${Date.now()}.csv`,et.click(),URL.revokeObjectURL($e)},ce=Z=>{const ee=JSON.stringify(Z,null,2),J=new Blob([ee],{type:"application/json"}),Q=URL.createObjectURL(J),V=document.createElement("a");V.href=Q,V.download=`export-${Date.now()}.json`,V.click(),URL.revokeObjectURL(Q)};return n.jsxs("div",{className:`${m("base","space-y")} ${B}`,children:[(N||A)&&n.jsxs("div",{className:`
|
|
485
485
|
flex
|
|
486
486
|
items-center
|
|
487
487
|
justify-between
|
|
@@ -489,6 +489,6 @@ React keys must be passed directly to JSX without using spread:
|
|
|
489
489
|
bg-surface-base
|
|
490
490
|
border
|
|
491
491
|
border-line-default
|
|
492
|
-
${
|
|
493
|
-
`,children:[n.jsx("div",{className:`flex items-center ${m("sm","gap")}`}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[A,N&&n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:$.map(J=>n.jsx(Q,{variant:"outline",size:"sm",leftIcon:n.jsx(hc,{className:"h-4 w-4"}),onClick:()=>P(J),children:J.toUpperCase()},J))})]})]}),n.jsx(Me,{columns:H,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:S,filters:I,selectable:w,selectedRows:y,onSelectionChange:h,rowId:j,actions:C,resizable:f,columnWidths:Z,onColumnResize:(J,te)=>{oe(ae=>F(M({},ae),{[J]:te})),x==null||x(J,te)},virtualScrolling:L,virtualScrollingOptions:D,emptyMessage:T,emptyStateTitle:R,emptyStateMessage:_,emptyStateIllustration:V,emptyStateAction:B})]})}function hf({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,p]=l.useState(""),[b,g]=l.useState(1),x=l.useMemo(()=>e.map(k=>{if(k.accessor||k.header){const $=k.key||(typeof k.accessor=="string"?k.accessor:String(k.accessor)),S=k.label||k.header||"";return F(M({},k),{key:$,label:S})}return k}),[e]),w=l.useMemo(()=>{if(!f.trim())return t;const k=f.toLowerCase();return t.filter($=>x.some(S=>{const I=$[String(S.key)];return String(I).toLowerCase().includes(k)}))},[t,f,x]),y=l.useMemo(()=>{if(!o)return w;const k=(b-1)*a,$=k+a;return w.slice(k,$)},[w,b,a,o]),h=o?Math.ceil(w.length/a):1,j=k=>{g(k)},N=k=>{p(k),g(1)};return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Lt,{spacing:"md",children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(_r,{placeholder:r,value:f,onSearch:N})}),i&&n.jsx("div",{className:`flex ${m("sm","gap")}`,children:i})]}),n.jsx(Me,{columns:x,data:y,loading:u,emptyMessage:d,onRowClick:c?k=>{const $=w.findIndex(S=>S===k);c(k,$>=0?$:y.findIndex(S=>S===k))}:void 0}),o&&h>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Xa,{currentPage:b,totalPages:h,onPageChange:j})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",y.length," of ",w.length," results"]})]})})}function xf({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>sr(null,null,function*(){const y=e[a];if(y.validate&&!(yield y.validate())){d(F(M({},u),{[a]:!0}));return}d(F(M({},u),{[a]:!1})),y.onSubmit&&(yield y.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),p=()=>{a>0&&r&&(o(a-1),d(F(M({},u),{[a-1]:!1})))},b=y=>{r&&y<a&&o(y)},g=e[a],x=a===e.length-1,w=u[a]===!0;return n.jsx(ut,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Lt,{spacing:"lg",children:[n.jsx(Yo,{steps:e.map((y,h)=>({id:y.id,title:y.title,content:y.content,description:y.description,status:h<a?"completed":h===a?w?"error":"active":"pending"})),currentStep:a,onStepChange:b,allowNavigation:r}),n.jsx("div",{className:`bg-surface-base ${U("lg")} border ${m("lg","p")}`,children:n.jsxs(Lt,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:g.title}),g.description&&n.jsx("p",{className:`text-fg-secondary ${m("xs","mt")}`,children:g.description})]}),w&&n.jsx("div",{className:`bg-error-bg border border-error-border rounded ${m("md","p")}`,children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:g.fields}),n.jsxs("div",{className:`flex justify-between ${m("base","pt")} border-t`,children:[n.jsx(Q,{variant:"outline",onClick:p,disabled:a===0,children:"Back"}),n.jsx(Q,{variant:"primary",onClick:f,children:x?"Complete":"Next"})]})]})})]})})}function vf({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,p]=l.useState({}),b=l.useMemo(()=>{let y=e;if(u.trim()&&t){const h=u.toLowerCase();y=y.filter(j=>t(h,j))}return r&&Object.keys(f).length>0&&(y=y.filter(h=>r(f,h))),y},[e,u,f,t,r]),g=(y,h)=>{p(j=>F(M({},j),{[y]:h}))},x=()=>{p({}),d("")},w=u.trim().length>0||Object.keys(f).length>0;return n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Lt,{spacing:"md",children:[n.jsx(ft,{padding:"medium",children:n.jsxs(Lt,{spacing:"md",children:[n.jsx("div",{children:n.jsx(_r,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:`flex flex-wrap ${m("sm","gap")}`,children:a.map(y=>{var h;return n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsxs($e,{className:"text-fg-secondary text-sm",children:[y.label,":"]}),n.jsxs("select",{className:`${m("md","px")} ${m("xs","py")} border rounded text-sm`,"aria-label":y.label,value:String(f[y.id]||""),onChange:j=>g(y.id,j.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(h=y.options)==null?void 0:h.map(j=>n.jsx("option",{value:String(j.value||""),children:j.label},j.id))]})]},y.id)})}),w&&n.jsx("div",{children:n.jsx(Q,{variant:"outline",size:"sm",onClick:x,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",b.length," of ",e.length," results",w&&" (filtered)"]}),b.length===0?n.jsx(ft,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx($e,{children:i})})}):n.jsx("div",{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 ${m("base","gap")}`,children:b.map((y,h)=>n.jsx("div",{children:s(y,h)},h))})]})})}function yf({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Te,F(M({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(ut,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(ut,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}const wf=pe(v("w-full flex flex-col",m("2xl","py"),m("lg","px"),m("xl","gap-y")),{variants:{variant:{plain:"",gradient:"hero-gradient","gradient-glow":v("hero-gradient","hero-glow")},align:{start:"text-left",center:"text-center"}},defaultVariants:{variant:"plain",align:"start"}}),kf={start:"items-start",center:"items-center"},jf={start:"justify-start",center:"justify-center"},qo=l.forwardRef(function(x,g){var w=x,{kicker:t,title:r,description:s,actions:a,kpis:o,meta:i,variant:c="plain",align:u="start",className:d,"aria-label":f,"aria-labelledby":p}=w,b=z(w,["kicker","title","description","actions","kpis","meta","variant","align","className","aria-label","aria-labelledby"]);const y=f!=null||p!=null,h=f!=null?f:typeof r=="string"?r:void 0;return typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!y&&typeof r!="string"&&console.warn("[HeroSection] A non-string `title` was provided without `aria-label` or `aria-labelledby`. The hero <section> landmark will have no accessible name. Pass `aria-label`, or set `aria-labelledby` to your title's id."),n.jsxs("section",F(M({ref:g,className:v(wf({variant:c,align:u}),d),"aria-label":h,"aria-labelledby":p},b),{children:[n.jsxs("div",{className:v("flex flex-col",m("md","gap-y"),kf[u]),children:[t?n.jsx($e,{as:"span",variant:"caption",colorRole:"primary",colorShade:"DEFAULT",className:"text-sm font-semibold tracking-wide uppercase",children:t}):null,n.jsx($e,{as:"h1",variant:"heading",className:"text-3xl font-bold tracking-tight sm:text-4xl",children:r}),s?n.jsx($e,{as:"p",variant:"body",colorRole:"neutral",colorShade:"DEFAULT",className:"max-w-2xl text-base leading-relaxed sm:text-lg",children:s}):null]}),a?n.jsx("div",{className:v("flex flex-wrap",m("sm","gap"),jf[u]),children:a}):null,o?n.jsx("div",{className:"w-full",children:o}):null,i?n.jsx($e,{as:"p",variant:"caption",colorRole:"neutral",colorShade:"light",className:"text-sm",children:i}):null]}))});qo.displayName="HeroSection";const Nf=pe(v("flex items-center","border-b"),{variants:{variant:{default:v("border-line-default",m("base","gap-x")),sub:v("border-line-muted",m("sm","gap-x"))}},defaultVariants:{variant:"default"}}),Sf=pe(v("relative -mb-px inline-flex items-center",m("xs","gap-x"),"border-b-2 border-transparent","transition-colors","focus:outline-none","focus-visible:ring-2","focus-visible:ring-line-focus","focus-visible:ring-offset-2",U("sm")),{variants:{variant:{default:v(m("sm","px"),m("sm","py"),re("body")),sub:v(m("sm","px"),m("xs","py"),re("bodySmall"))},active:{true:v("border-line-brand","text-fg-brand-emphasis","font-medium"),false:v("text-fg-secondary","hover:text-fg-primary","hover:border-line-muted")}},compoundVariants:[{variant:"sub",active:!1,class:v("text-fg-tertiary","hover:text-fg-secondary")}],defaultVariants:{variant:"default",active:!1}}),$f=v("inline-flex items-center justify-center",U("full"),m("xs","px"),"bg-surface-muted text-fg-secondary text-xs"),Xo=l.forwardRef(function(d,u){var f=d,{items:t,variant:r="default",linkComponent:s,className:a,"aria-label":o,"aria-labelledby":i}=f,c=z(f,["items","variant","linkComponent","className","aria-label","aria-labelledby"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!o&&!i&&console.warn('[TabsAsLinks] renders a <nav> landmark and should have an accessible name. Pass `aria-label` (e.g. "Painel") or `aria-labelledby` — multiple unnamed navs on a page are ambiguous to screen readers.');const p=s!=null?s:"a";return n.jsx("nav",F(M({ref:u,className:v(Nf({variant:r}),a),"aria-label":o,"aria-labelledby":i},c),{children:t.map((b,g)=>n.jsxs(p,{href:b.href,"aria-current":b.active?"page":void 0,"data-active":b.active?"true":void 0,className:Sf({variant:r,active:!!b.active}),children:[b.icon?n.jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0",children:b.icon}):null,n.jsx("span",{children:b.label}),b.count!==void 0?n.jsx("span",{className:$f,children:b.count}):null]},b.href||g))}))});Xo.displayName="TabsAsLinks";function Cf(i){var c=i,{children:e,orientation:t="horizontal",size:r="md",attached:s=!1,className:a=""}=c,o=z(c,["children","orientation","size","attached","className"]);const u={horizontal:"flex-row",vertical:"flex-col"},d={sm:s?"":m("xs","gap"),md:s?"":m("sm","gap"),lg:s?"":m("md","gap")};return n.jsx("div",F(M({role:"group",className:v("inline-flex",u[t],d[r],s&&U("md"),a)},o),{children:e}))}function Ef(e,t={}){const{rootMargin:r="0px 0px -50% 0px",threshold:s=0}=t,[a,o]=l.useState(null),i=e.join("|");return l.useEffect(()=>{if(typeof window=="undefined"||typeof IntersectionObserver=="undefined")return;const c=e.map(d=>document.getElementById(d)).filter(d=>d!==null);if(c.length===0)return;const u=new IntersectionObserver(d=>{const f=d.filter(p=>p.isIntersecting).sort((p,b)=>p.boundingClientRect.top-b.boundingClientRect.top);f.length>0&&o(f[0].target.id)},{rootMargin:r,threshold:s});return c.forEach(d=>u.observe(d)),()=>u.disconnect()},[i,r,s]),a}exports.AMBER=lt;exports.Accordion=Nu;exports.AlertDialog=lf;exports.AppProvider=Gl;exports.Autocomplete=oo;exports.AutocompleteList=Lr;exports.AutocompleteOption=Is;exports.Avatar=pr;exports.AvatarGroup=yd;exports.BLUE=Zn;exports.BRAND_COLORS=_i;exports.BRAND_PRIMARY=st;exports.BRAND_SECONDARY=nt;exports.BREAKPOINT_TOKENS=kr;exports.Badge=Ia;exports.Breadcrumb=qa;exports.BreakpointTokenFactory=Tt;exports.Button=Q;exports.ButtonGroup=Cf;exports.COLOR_SCALES=gi;exports.CYAN=at;exports.Card=ft;exports.Checkbox=Mr;exports.Chip=$s;exports.Collapsible=js;exports.ColorPicker=xu;exports.CommandPalette=bf;exports.ConfigProvider=$a;exports.DashboardLayout=yf;exports.DataGrid=gf;exports.DataTablePattern=hf;exports.DatePicker=fu;exports.DatePickerCalendar=Rs;exports.DatePickerInput=As;exports.DatePickerProvider=fs;exports.Dialog=De;exports.DialogClose=Go;exports.DialogContent=on;exports.DialogContext=Nr;exports.DialogDescription=Uo;exports.DialogFooter=cn;exports.DialogHeader=ln;exports.DialogProvider=ys;exports.DialogTitle=Bo;exports.DialogTrigger=Ho;exports.Dot=za;exports.Drawer=Yt;exports.DrawerContent=Fs;exports.DrawerFooter=fo;exports.DrawerHeader=uo;exports.Dropdown=Za;exports.EMERALD=it;exports.EmptyState=Ja;exports.ErrorMessage=_a;exports.FONT_FAMILY_TOKENS=fi;exports.FONT_WEIGHT_TOKENS=mi;exports.FUCHSIA=Qn;exports.FileUpload=gu;exports.FilterChips=Id;exports.Form=Fd;exports.FormContext=Dd;exports.FormField=Pd;exports.FormProvider=Ha;exports.FormWizardPattern=xf;exports.GRAY=Kn;exports.GREEN=Yn;exports.Header=jt;exports.HeaderActions=vo;exports.HeaderComponent=jt;exports.HeaderHamburger=yo;exports.HeaderLogo=ho;exports.HeaderMobileMenu=wo;exports.HeaderNavigation=xo;exports.HeaderProvider=ms;exports.HeroSection=qo;exports.INDIGO=Un;exports.Info=ql;exports.Input=Ee;exports.LIME=sa;exports.Label=Dt;exports.LoginBox=Mu;exports.Menu=qt;exports.MenuContent=po;exports.MenuItem=zs;exports.MenuSeparator=bo;exports.MenuTrigger=Os;exports.Modal=Tu;exports.MultiSelect=io;exports.NavLink=Cr;exports.Navbar=pt;exports.NavbarContext=Hr;exports.NavbarGroup=_o;exports.NavbarItem=Io;exports.NavbarSeparator=Do;exports.NavbarToggle=vr;exports.Navigation=ko;exports.NavigationComponent=ko;exports.ORANGE=Xn;exports.PINK=ea;exports.PRIMITIVE_COLORS=bs;exports.PURPLE=ta;exports.PageHeader=jo;exports.PageHeaderComponent=jo;exports.Pagination=Xa;exports.Popover=Ds;exports.Progress=Ns;exports.RED=Jn;exports.ROSE=ct;exports.Radio=Fa;exports.Rating=bu;exports.SEMANTIC_COLORS=ki;exports.SEMANTIC_COLORS_DARK=wr;exports.SEMANTIC_COLORS_LIGHT=Kt;exports.SIDEBAR_TOKENS=rt;exports.SKY=dt;exports.SLATE=ot;exports.SPACING_TOKENS=yr;exports.SearchAndFilterPattern=vf;exports.SearchInput=_r;exports.Select=Er;exports.Separator=Ss;exports.SideNavbar=Te;exports.SideNavbarBackdrop=nn;exports.SideNavbarConfigContext=Or;exports.SideNavbarConfigProvider=Zs;exports.SideNavbarProvider=en;exports.SideNavbarResizeHandle=sn;exports.SideNavbarRoot=Ro;exports.SideNavbarStateContext=zr;exports.SideNavbarStateProvider=Qs;exports.SideNavbarThemeContext=Pr;exports.SideNavbarThemeProvider=Js;exports.SideNavbarToggle=an;exports.SideNavbarToggleContext=Wr;exports.Sidebar=bt;exports.SidebarContent=Po;exports.SidebarContext=Ur;exports.SidebarFooter=Oo;exports.SidebarGroup=zo;exports.SidebarHeader=Fo;exports.SidebarSlot=Vo;exports.SidebarSlotContent=Wo;exports.SidebarSlotContext=Vr;exports.SidebarSlotProvider=To;exports.Skeleton=La;exports.Slider=Oa;exports.SpacingTokenFactory=ve;exports.Spinner=ks;exports.Stat=Td;exports.StatGroup=Rd;exports.Stepper=Yo;exports.Switch=Pa;exports.TEAL=ra;exports.TYPOGRAPHY_TOKENS=wt;exports.Table=Me;exports.TableActions=Gs;exports.TableBody=Ys;exports.TableCell=Us;exports.TableContext=Au;exports.TableEmptyState=Ks;exports.TableFilters=qs;exports.TableHeader=Bs;exports.TableHeaderCell=Ws;exports.TableHeaderRow=Hs;exports.TablePagination=Xs;exports.TableProvider=ps;exports.TableRow=hr;exports.Tabs=pu;exports.TabsAsLinks=Xo;exports.TabsContent=ao;exports.TabsContext=Rr;exports.TabsList=so;exports.TabsProvider=ro;exports.TabsTrigger=no;exports.Text=$e;exports.Textarea=Da;exports.ThemeProvider=Na;exports.TimePicker=hu;exports.Timeline=pf;exports.Toast=Ko;exports.ToastContainer=ff;exports.ToastContext=jr;exports.ToastProvider=Ca;exports.Tooltip=_t;exports.TypographyTokenFactory=ge;exports.VIOLET=Gn;exports.YELLOW=qn;exports.blendColors=gs;exports.clampWidth=ur;exports.cn=v;exports.darken=Di;exports.defaultConfigValues=Ne;exports.defaultThemeValues=Rt;exports.formatKeyboardShortcut=Bu;exports.getAnimation=Al;exports.getAnimationClass=ye;exports.getBreakpoint=Li;exports.getColor=Ni;exports.getColorClass=$i;exports.getContrastColor=Ri;exports.getFocusColorClass=Mi;exports.getFocusRingClass=Ti;exports.getHoverColorClass=Ei;exports.getMediaQuery=Fi;exports.getNestedIndentClass=di;exports.getOpacity=Dl;exports.getOpacityClass=_l;exports.getPrimitiveColor=Ft;exports.getPrimitiveColorPalette=wi;exports.getSemanticColor=Ut;exports.getSemanticColorClass=Ci;exports.getSemanticColorRole=ji;exports.getSemanticColorValue=Si;exports.getSpacing=ui;exports.getSpacingClass=m;exports.getTransitionClass=Rl;exports.getTypography=pi;exports.getTypographyClasses=ue;exports.getTypographyLineHeight=bi;exports.getTypographySize=re;exports.getTypographySizeFromFontSize=je;exports.getTypographyWeight=ze;exports.getTypographyWeightFromFontWeight=It;exports.getZIndex=Il;exports.getZIndexClass=he;exports.isLightColor=na;exports.lighten=Ii;exports.parseKeyboardShortcut=So;exports.parseWidthToPixels=xr;exports.useApp=Kl;exports.useColumnResizing=Pu;exports.useConfig=Vl;exports.useDialogContext=Pt;exports.useDialogContextOptional=Hl;exports.useFocusManagement=Eo;exports.useFormContext=Cs;exports.useFormContextOptional=Ld;exports.useFormFieldArray=ou;exports.useGroupState=sf;exports.useHeaderContext=Vs;exports.useKeyboardShortcut=Mo;exports.useNavLink=Ra;exports.useNavbar=Qu;exports.useNavbarRequired=Br;exports.useResize=$o;exports.useResponsiveSidebar=Co;exports.useScrollSpy=Ef;exports.useSideNavbarCombined=of;exports.useSideNavbarConfig=zu;exports.useSideNavbarConfigRequired=Nt;exports.useSideNavbarContent=af;exports.useSideNavbarNavigation=nf;exports.useSideNavbarState=Vu;exports.useSideNavbarStateRequired=Je;exports.useSideNavbarTheme=Ou;exports.useSideNavbarThemeRequired=Xe;exports.useSideNavbarToggleContext=Uu;exports.useSideNavbarToggleContextRequired=Ao;exports.useSidebar=Lo;exports.useSidebarRequired=Xt;exports.useSidebarSlot=tn;exports.useSidebarSlotRequired=rn;exports.useTableContext=Ve;exports.useTableContextOptional=Iu;exports.useTabsContext=Ir;exports.useTabsContextOptional=mu;exports.useTheme=Ol;exports.useToast=mf;exports.useToastContext=vs;exports.useToastContextOptional=Wl;exports.useVirtualScrolling=No;exports.validateWidthBounds=Wu;exports.withOpacity=Ai;
|
|
492
|
+
${G("lg")}
|
|
493
|
+
`,children:[n.jsx("div",{className:`flex items-center ${m("sm","gap")}`}),n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[A,N&&n.jsx("div",{className:`flex items-center ${m("xs","gap")}`,children:($?C:C.filter(Z=>Z==="csv"||Z==="json")).map(Z=>n.jsx(te,{variant:"outline",size:"sm",leftIcon:n.jsx(xc,{className:"h-4 w-4"}),onClick:()=>re(Z),children:Z.toUpperCase()},Z))})]})]}),n.jsx(Ae,{columns:K,data:t,loading:r,onSort:s,sortColumn:a,sortDirection:o,pagination:j,filters:E,selectable:k,selectedRows:w,onSelectionChange:x,rowId:v,actions:S,resizable:f,columnWidths:O,onColumnResize:(Z,ee)=>{H||oe(J=>L(M({},J),{[Z]:ee})),h==null||h(Z,ee)},virtualScrolling:_,virtualScrollingOptions:R,emptyMessage:I,emptyStateTitle:D,emptyStateMessage:F,emptyStateIllustration:P,emptyStateAction:z})]})}function vf({columns:e,data:t,searchPlaceholder:r="Search...",enableSearch:s=!0,itemsPerPage:a=10,enablePagination:o=!0,actions:i,onRowClick:c,loading:u=!1,emptyMessage:d="No data available"}){const[f,b]=l.useState(""),[p,g]=l.useState(1),h=l.useMemo(()=>e.map($=>{if($.accessor||$.header){const C=$.key||(typeof $.accessor=="string"?$.accessor:String($.accessor)),j=$.label||$.header||"";return L(M({},$),{key:C,label:j})}return $}),[e]),k=l.useMemo(()=>{if(!f.trim())return t;const $=f.toLowerCase();return t.filter(C=>h.some(j=>{const E=C[String(j.key)];return String(E).toLowerCase().includes($)}))},[t,f,h]),w=l.useMemo(()=>{if(!o)return k;const $=(p-1)*a,C=$+a;return k.slice($,C)},[k,p,a,o]),x=o?Math.ceil(k.length/a):1,v=$=>{g($)},N=$=>{b($),g(1)};return n.jsx(bt,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Ot,{spacing:"md",children:[n.jsxs("div",{className:`flex items-center justify-between ${m("base","gap")}`,children:[s&&n.jsx("div",{className:"flex-1 max-w-md",children:n.jsx(Lr,{placeholder:r,value:f,onSearch:N})}),i&&n.jsx("div",{className:`flex ${m("sm","gap")}`,children:i})]}),n.jsx(Ae,{columns:h,data:w,loading:u,emptyMessage:d,onRowClick:c?$=>{const C=k.findIndex(j=>j===$);c($,C>=0?C:w.findIndex(j=>j===$))}:void 0}),o&&x>1&&n.jsx("div",{className:"flex justify-center",children:n.jsx(Qa,{currentPage:p,totalPages:x,onPageChange:v})}),s&&n.jsxs("div",{className:"text-sm text-fg-secondary text-center",children:["Showing ",w.length," of ",k.length," results"]})]})})}function yf({steps:e,onComplete:t,allowBackNavigation:r=!0,showStepNumbers:s=!0}){const[a,o]=l.useState(0),[i,c]=l.useState({}),[u,d]=l.useState({}),f=()=>ar(null,null,function*(){const w=e[a];if(w.validate&&!(yield w.validate())){d(L(M({},u),{[a]:!0}));return}d(L(M({},u),{[a]:!1})),w.onSubmit&&(yield w.onSubmit(i)),a<e.length-1?o(a+1):t&&t(i)}),b=()=>{a>0&&r&&(o(a-1),d(L(M({},u),{[a-1]:!1})))},p=w=>{r&&w<a&&o(w)},g=e[a],h=a===e.length-1,k=u[a]===!0;return n.jsx(bt,{maxWidth:"lg",paddingX:"base",paddingY:"lg",children:n.jsxs(Ot,{spacing:"lg",children:[n.jsx(Xo,{steps:e.map((w,x)=>({id:w.id,title:w.title,content:w.content,description:w.description,status:x<a?"completed":x===a?k?"error":"active":"pending"})),currentStep:a,onStepChange:p,allowNavigation:r}),n.jsx("div",{className:`bg-surface-base ${G("lg")} border ${m("lg","p")}`,children:n.jsxs(Ot,{spacing:"md",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-semibold",children:g.title}),g.description&&n.jsx("p",{className:`text-fg-secondary ${m("xs","mt")}`,children:g.description})]}),k&&n.jsx("div",{className:`bg-error-bg border border-error-border rounded ${m("md","p")}`,children:n.jsx("p",{className:"text-sm text-fg-error",children:"Please fix the errors before proceeding."})}),n.jsx("div",{className:"min-h-48",children:g.fields}),n.jsxs("div",{className:`flex justify-between ${m("base","pt")} border-t`,children:[n.jsx(te,{variant:"outline",onClick:b,disabled:a===0,children:"Back"}),n.jsx(te,{variant:"primary",onClick:f,children:h?"Complete":"Next"})]})]})})]})})}function wf({items:e,searchFn:t,filterFn:r,renderItem:s,filters:a=[],searchPlaceholder:o="Search...",emptyMessage:i="No results found",showResultsCount:c=!0}){const[u,d]=l.useState(""),[f,b]=l.useState({}),p=l.useMemo(()=>{let w=e;if(u.trim()&&t){const x=u.toLowerCase();w=w.filter(v=>t(x,v))}return r&&Object.keys(f).length>0&&(w=w.filter(x=>r(f,x))),w},[e,u,f,t,r]),g=(w,x)=>{b(v=>L(M({},v),{[w]:x}))},h=()=>{b({}),d("")},k=u.trim().length>0||Object.keys(f).length>0;return n.jsx(bt,{maxWidth:"full",paddingX:"base",paddingY:"base",children:n.jsxs(Ot,{spacing:"md",children:[n.jsx(gt,{padding:"medium",children:n.jsxs(Ot,{spacing:"md",children:[n.jsx("div",{children:n.jsx(Lr,{placeholder:o,value:u,onSearch:d})}),a.length>0&&n.jsx("div",{className:`flex flex-wrap ${m("sm","gap")}`,children:a.map(w=>{var x;return n.jsxs("div",{className:`flex items-center ${m("sm","gap")}`,children:[n.jsxs(Ee,{className:"text-fg-secondary text-sm",children:[w.label,":"]}),n.jsxs("select",{className:`${m("md","px")} ${m("xs","py")} border rounded text-sm`,"aria-label":w.label,value:String(f[w.id]||""),onChange:v=>g(w.id,v.target.value||void 0),children:[n.jsx("option",{value:"",children:"All"}),(x=w.options)==null?void 0:x.map(v=>n.jsx("option",{value:String(v.value||""),children:v.label},v.id))]})]},w.id)})}),k&&n.jsx("div",{children:n.jsx(te,{variant:"outline",size:"sm",onClick:h,children:"Clear Filters"})})]})}),c&&n.jsxs("div",{className:"text-sm text-fg-secondary",children:["Showing ",p.length," of ",e.length," results",k&&" (filtered)"]}),p.length===0?n.jsx(gt,{padding:"large",children:n.jsx("div",{className:"text-center text-fg-secondary",children:n.jsx(Ee,{children:i})})}):n.jsx("div",{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 ${m("base","gap")}`,children:p.map((w,x)=>n.jsx("div",{children:s(w,x)},x))})]})})}function kf({sidebar:e,children:t,header:r,footer:s,defaultCollapsed:a=!1,sidebarProps:o}){return n.jsxs("div",{className:"flex h-screen overflow-hidden",children:[e&&n.jsx(Ie,L(M({defaultCollapsed:a},o),{children:e})),n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r&&n.jsx("header",{className:"border-b bg-surface-base",children:n.jsx(bt,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:r})}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsx(bt,{maxWidth:"xl",paddingX:"base",paddingY:"base",children:t})}),s&&n.jsx("footer",{className:"border-t bg-surface-base",children:n.jsx(bt,{maxWidth:"full",paddingX:"base",paddingY:"sm",children:s})})]})]})}const jf=ge(y("w-full flex flex-col",m("2xl","py"),m("lg","px"),m("xl","gap-y")),{variants:{variant:{plain:"",gradient:"hero-gradient","gradient-glow":y("hero-gradient","hero-glow")},align:{start:"text-left",center:"text-center"}},defaultVariants:{variant:"plain",align:"start"}}),Nf={start:"items-start",center:"items-center"},Sf={start:"justify-start",center:"justify-center"},Jo=l.forwardRef(function(h,g){var k=h,{kicker:t,title:r,description:s,actions:a,kpis:o,meta:i,variant:c="plain",align:u="start",className:d,"aria-label":f,"aria-labelledby":b}=k,p=W(k,["kicker","title","description","actions","kpis","meta","variant","align","className","aria-label","aria-labelledby"]);const w=f!=null||b!=null,x=f!=null?f:typeof r=="string"?r:void 0;return typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!w&&typeof r!="string"&&console.warn("[HeroSection] A non-string `title` was provided without `aria-label` or `aria-labelledby`. The hero <section> landmark will have no accessible name. Pass `aria-label`, or set `aria-labelledby` to your title's id."),n.jsxs("section",L(M({ref:g,className:y(jf({variant:c,align:u}),d),"aria-label":x,"aria-labelledby":b},p),{children:[n.jsxs("div",{className:y("flex flex-col",m("md","gap-y"),Nf[u]),children:[t?n.jsx(Ee,{as:"span",variant:"caption",colorRole:"primary",colorShade:"DEFAULT",className:"text-sm font-semibold tracking-wide uppercase",children:t}):null,n.jsx(Ee,{as:"h1",variant:"heading",className:"text-3xl font-bold tracking-tight sm:text-4xl",children:r}),s?n.jsx(Ee,{as:"p",variant:"body",colorRole:"neutral",colorShade:"DEFAULT",className:"max-w-2xl text-base leading-relaxed sm:text-lg",children:s}):null]}),a?n.jsx("div",{className:y("flex flex-wrap",m("sm","gap"),Sf[u]),children:a}):null,o?n.jsx("div",{className:"w-full",children:o}):null,i?n.jsx(Ee,{as:"p",variant:"caption",colorRole:"neutral",colorShade:"light",className:"text-sm",children:i}):null]}))});Jo.displayName="HeroSection";const $f=ge(y("flex items-center","border-b"),{variants:{variant:{default:y("border-line-default",m("base","gap-x")),sub:y("border-line-muted",m("sm","gap-x"))}},defaultVariants:{variant:"default"}}),Cf=ge(y("relative -mb-px inline-flex items-center",m("xs","gap-x"),"border-b-2 border-transparent","transition-colors","focus:outline-none","focus-visible:ring-2","focus-visible:ring-line-focus","focus-visible:ring-offset-2",G("sm")),{variants:{variant:{default:y(m("sm","px"),m("sm","py"),ae("body")),sub:y(m("sm","px"),m("xs","py"),ae("bodySmall"))},active:{true:y("border-line-brand","text-fg-brand-emphasis","font-medium"),false:y("text-fg-secondary","hover:text-fg-primary","hover:border-line-muted")}},compoundVariants:[{variant:"sub",active:!1,class:y("text-fg-tertiary","hover:text-fg-secondary")}],defaultVariants:{variant:"default",active:!1}}),Ef=y("inline-flex items-center justify-center",G("full"),m("xs","px"),"bg-surface-muted text-fg-secondary text-xs"),Zo=l.forwardRef(function(d,u){var f=d,{items:t,variant:r="default",linkComponent:s,className:a,"aria-label":o,"aria-labelledby":i}=f,c=W(f,["items","variant","linkComponent","className","aria-label","aria-labelledby"]);typeof process!="undefined"&&process.env.NODE_ENV!=="production"&&!o&&!i&&console.warn('[TabsAsLinks] renders a <nav> landmark and should have an accessible name. Pass `aria-label` (e.g. "Painel") or `aria-labelledby` — multiple unnamed navs on a page are ambiguous to screen readers.');const b=s!=null?s:"a";return n.jsx("nav",L(M({ref:u,className:y($f({variant:r}),a),"aria-label":o,"aria-labelledby":i},c),{children:t.map((p,g)=>n.jsxs(b,{href:p.href,"aria-current":p.active?"page":void 0,"data-active":p.active?"true":void 0,className:Cf({variant:r,active:!!p.active}),children:[p.icon?n.jsx("span",{"aria-hidden":"true",className:"inline-flex shrink-0",children:p.icon}):null,n.jsx("span",{children:p.label}),p.count!==void 0?n.jsx("span",{className:Ef,children:p.count}):null]},p.href||g))}))});Zo.displayName="TabsAsLinks";function Tf(i){var c=i,{children:e,orientation:t="horizontal",size:r="md",attached:s=!1,className:a=""}=c,o=W(c,["children","orientation","size","attached","className"]);const u={horizontal:"flex-row",vertical:"flex-col"},d={sm:s?"":m("xs","gap"),md:s?"":m("sm","gap"),lg:s?"":m("md","gap")};return n.jsx("div",L(M({role:"group",className:y("inline-flex",u[t],d[r],s&&G("md"),a)},o),{children:e}))}function Mf(e,t={}){const{rootMargin:r="0px 0px -50% 0px",threshold:s=0}=t,[a,o]=l.useState(null),i=e.join("|");return l.useEffect(()=>{if(typeof window=="undefined"||typeof IntersectionObserver=="undefined")return;const c=e.map(d=>document.getElementById(d)).filter(d=>d!==null);if(c.length===0)return;const u=new IntersectionObserver(d=>{const f=d.filter(b=>b.isIntersecting).sort((b,p)=>b.boundingClientRect.top-p.boundingClientRect.top);f.length>0&&o(f[0].target.id)},{rootMargin:r,threshold:s});return c.forEach(d=>u.observe(d)),()=>u.disconnect()},[i,r,s]),a}exports.AMBER=ft;exports.Accordion=Su;exports.AlertDialog=df;exports.AppProvider=Kl;exports.Autocomplete=co;exports.AutocompleteList=Pr;exports.AutocompleteOption=_s;exports.Avatar=gr;exports.AvatarGroup=wd;exports.BLUE=ta;exports.BRAND_COLORS=_i;exports.BRAND_PRIMARY=it;exports.BRAND_SECONDARY=lt;exports.BREAKPOINT_TOKENS=Nr;exports.Badge=_a;exports.Breadcrumb=Za;exports.BreakpointTokenFactory=Rt;exports.Button=te;exports.ButtonGroup=Tf;exports.COLOR_SCALES=hi;exports.CYAN=ct;exports.Card=gt;exports.Checkbox=Ar;exports.Chip=Ts;exports.Collapsible=$s;exports.ColorPicker=vu;exports.CommandPalette=hf;exports.ConfigProvider=Ea;exports.DashboardLayout=kf;exports.DataGrid=xf;exports.DataTablePattern=vf;exports.DatePicker=mu;exports.DatePickerCalendar=Fs;exports.DatePickerInput=Ds;exports.DatePickerProvider=bs;exports.Dialog=Pe;exports.DialogClose=cn;exports.DialogContent=dn;exports.DialogContext=$r;exports.DialogDescription=Yo;exports.DialogFooter=fn;exports.DialogHeader=un;exports.DialogProvider=Ns;exports.DialogTitle=Ko;exports.DialogTrigger=Go;exports.Dot=Ha;exports.Drawer=Jt;exports.DrawerContent=Os;exports.DrawerFooter=bo;exports.DrawerHeader=po;exports.Dropdown=to;exports.EMERALD=ut;exports.EmptyState=eo;exports.ErrorMessage=Pa;exports.FONT_FAMILY_TOKENS=mi;exports.FONT_WEIGHT_TOKENS=pi;exports.FUCHSIA=ra;exports.FileUpload=hu;exports.FilterChips=Dd;exports.Form=Pd;exports.FormContext=Fd;exports.FormField=ou;exports.FormProvider=Ga;exports.FormWizardPattern=yf;exports.GRAY=Xn;exports.GREEN=Jn;exports.Header=Et;exports.HeaderActions=ko;exports.HeaderComponent=Et;exports.HeaderHamburger=jo;exports.HeaderLogo=yo;exports.HeaderMobileMenu=No;exports.HeaderNavigation=wo;exports.HeaderProvider=gs;exports.HeroSection=Jo;exports.INDIGO=Yn;exports.Info=Xl;exports.Input=Me;exports.LIME=oa;exports.Label=Lt;exports.LoginBox=Mu;exports.Menu=Zt;exports.MenuContent=ho;exports.MenuItem=Ws;exports.MenuSeparator=xo;exports.MenuTrigger=Vs;exports.Modal=Au;exports.MultiSelect=uo;exports.NavLink=Tr;exports.Navbar=xt;exports.NavbarContext=Gr;exports.NavbarGroup=Po;exports.NavbarItem=_o;exports.NavbarSeparator=Lo;exports.NavbarToggle=wr;exports.Navigation=So;exports.NavigationComponent=So;exports.ORANGE=Qn;exports.PINK=sa;exports.PRIMITIVE_COLORS=xs;exports.PURPLE=na;exports.PageHeader=$o;exports.PageHeaderComponent=$o;exports.Pagination=Qa;exports.Popover=Ls;exports.Progress=Cs;exports.RED=ea;exports.ROSE=mt;exports.Radio=za;exports.Rating=gu;exports.SEMANTIC_COLORS=ji;exports.SEMANTIC_COLORS_DARK=jr;exports.SEMANTIC_COLORS_LIGHT=qt;exports.SIDEBAR_TOKENS=ot;exports.SKY=pt;exports.SLATE=dt;exports.SPACING_TOKENS=kr;exports.SearchAndFilterPattern=wf;exports.SearchInput=Lr;exports.Select=Mr;exports.Separator=Es;exports.SideNavbar=Ie;exports.SideNavbarBackdrop=on;exports.SideNavbarConfigContext=Wr;exports.SideNavbarConfigProvider=en;exports.SideNavbarProvider=rn;exports.SideNavbarResizeHandle=an;exports.SideNavbarRoot=Fo;exports.SideNavbarStateContext=Hr;exports.SideNavbarStateProvider=tn;exports.SideNavbarThemeContext=Vr;exports.SideNavbarThemeProvider=Qs;exports.SideNavbarToggle=ln;exports.SideNavbarToggleContext=Ur;exports.Sidebar=vt;exports.SidebarContent=Vo;exports.SidebarContext=Yr;exports.SidebarFooter=Wo;exports.SidebarGroup=Ho;exports.SidebarHeader=zo;exports.SidebarSlot=Bo;exports.SidebarSlotContent=Uo;exports.SidebarSlotContext=Br;exports.SidebarSlotProvider=Ro;exports.Skeleton=Oa;exports.Slider=Wa;exports.SpacingTokenFactory=ke;exports.Spinner=Ss;exports.Stat=Ad;exports.StatGroup=Rd;exports.Stepper=Xo;exports.Switch=Va;exports.TEAL=aa;exports.TYPOGRAPHY_TOKENS=St;exports.Table=Ae;exports.TableActions=Ys;exports.TableBody=Xs;exports.TableCell=Ks;exports.TableContext=Iu;exports.TableEmptyState=qs;exports.TableFilters=Js;exports.TableHeader=Gs;exports.TableHeaderCell=Bs;exports.TableHeaderRow=Us;exports.TablePagination=Zs;exports.TableProvider=hs;exports.TableRow=vr;exports.Tabs=bu;exports.TabsAsLinks=Zo;exports.TabsContent=lo;exports.TabsContext=Dr;exports.TabsList=oo;exports.TabsProvider=ao;exports.TabsTrigger=io;exports.Text=Ee;exports.Textarea=La;exports.ThemeProvider=$a;exports.TimePicker=xu;exports.Timeline=gf;exports.Toast=qo;exports.ToastContainer=pf;exports.ToastContext=Sr;exports.ToastProvider=Ta;exports.Tooltip=Pt;exports.TypographyTokenFactory=he;exports.VIOLET=qn;exports.YELLOW=Zn;exports.blendColors=vs;exports.clampWidth=mr;exports.cn=y;exports.darken=Fi;exports.defaultConfigValues=Se;exports.defaultThemeValues=Ft;exports.formatKeyboardShortcut=Uu;exports.getAnimation=Il;exports.getAnimationClass=je;exports.getBreakpoint=Li;exports.getColor=Si;exports.getColorClass=Ci;exports.getContrastColor=Ri;exports.getFocusColorClass=Mi;exports.getFocusRingClass=Ai;exports.getHoverColorClass=Ti;exports.getMediaQuery=Pi;exports.getNestedIndentClass=ui;exports.getOpacity=Fl;exports.getOpacityClass=_l;exports.getPrimitiveColor=zt;exports.getPrimitiveColorPalette=ki;exports.getSemanticColor=Kt;exports.getSemanticColorClass=Ei;exports.getSemanticColorRole=Ni;exports.getSemanticColorValue=$i;exports.getSpacing=fi;exports.getSpacingClass=m;exports.getTransitionClass=Rl;exports.getTypography=bi;exports.getTypographyClasses=pe;exports.getTypographyLineHeight=gi;exports.getTypographySize=ae;exports.getTypographySizeFromFontSize=Ne;exports.getTypographyWeight=Le;exports.getTypographyWeightFromFontWeight=_t;exports.getZIndex=Dl;exports.getZIndexClass=xe;exports.isLightColor=ia;exports.lighten=Di;exports.parseKeyboardShortcut=Eo;exports.parseWidthToPixels=yr;exports.useApp=Yl;exports.useColumnResizing=Ou;exports.useConfig=Wl;exports.useDialogContext=Ct;exports.useDialogContextOptional=Bl;exports.useFocusManagement=Ao;exports.useFormContext=Ms;exports.useFormContextOptional=Ld;exports.useFormFieldArray=iu;exports.useGroupState=nf;exports.useHeaderContext=Hs;exports.useKeyboardShortcut=Io;exports.useNavLink=Fa;exports.useNavbar=ef;exports.useNavbarRequired=Kr;exports.useResize=To;exports.useResponsiveSidebar=Mo;exports.useScrollSpy=Mf;exports.useSideNavbarCombined=lf;exports.useSideNavbarConfig=Vu;exports.useSideNavbarConfigRequired=Tt;exports.useSideNavbarContent=of;exports.useSideNavbarNavigation=af;exports.useSideNavbarState=Wu;exports.useSideNavbarStateRequired=Qe;exports.useSideNavbarTheme=zu;exports.useSideNavbarThemeRequired=Ze;exports.useSideNavbarToggleContext=Gu;exports.useSideNavbarToggleContextRequired=Do;exports.useSidebar=Oo;exports.useSidebarRequired=Qt;exports.useSidebarSlot=sn;exports.useSidebarSlotRequired=nn;exports.useTableContext=Be;exports.useTableContextOptional=Du;exports.useTabsContext=Fr;exports.useTabsContextOptional=pu;exports.useTheme=zl;exports.useToast=bf;exports.useToastContext=js;exports.useToastContextOptional=Hl;exports.useVirtualScrolling=Co;exports.validateWidthBounds=Hu;exports.withOpacity=Ii;
|
|
494
494
|
//# sourceMappingURL=index.cjs.map
|