@craftzbay/ui 0.9.0 → 0.11.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/README.md +82 -10
- package/dist-lib/__tests__/helpers/color.d.ts +9 -0
- package/dist-lib/__tests__/helpers/theme.d.ts +18 -0
- package/dist-lib/components/ui/Accordion.js +71 -0
- package/dist-lib/components/ui/Accordion.js.map +1 -0
- package/dist-lib/components/ui/Alert.d.ts +17 -1
- package/dist-lib/components/ui/Alert.js +79 -0
- package/dist-lib/components/ui/Alert.js.map +1 -0
- package/dist-lib/components/ui/Avatar.d.ts +3 -3
- package/dist-lib/components/ui/Avatar.js +94 -0
- package/dist-lib/components/ui/Avatar.js.map +1 -0
- package/dist-lib/components/ui/Badge.d.ts +4 -2
- package/dist-lib/components/ui/Badge.js +76 -0
- package/dist-lib/components/ui/Badge.js.map +1 -0
- package/dist-lib/components/ui/Breadcrumbs.d.ts +2 -0
- package/dist-lib/components/ui/Breadcrumbs.js +52 -0
- package/dist-lib/components/ui/Breadcrumbs.js.map +1 -0
- package/dist-lib/components/ui/Button.d.ts +6 -4
- package/dist-lib/components/ui/Button.js +131 -0
- package/dist-lib/components/ui/Button.js.map +1 -0
- package/dist-lib/components/ui/Calendar.d.ts +7 -1
- package/dist-lib/components/ui/Calendar.js +139 -0
- package/dist-lib/components/ui/Calendar.js.map +1 -0
- package/dist-lib/components/ui/Card.d.ts +3 -1
- package/dist-lib/components/ui/Card.js +97 -0
- package/dist-lib/components/ui/Card.js.map +1 -0
- package/dist-lib/components/ui/Carousel.d.ts +11 -7
- package/dist-lib/components/ui/Carousel.js +174 -0
- package/dist-lib/components/ui/Carousel.js.map +1 -0
- package/dist-lib/components/ui/Chart.d.ts +68 -7
- package/dist-lib/components/ui/Chart.js +487 -0
- package/dist-lib/components/ui/Chart.js.map +1 -0
- package/dist-lib/components/ui/Checkbox.js +70 -0
- package/dist-lib/components/ui/Checkbox.js.map +1 -0
- package/dist-lib/components/ui/Combobox.d.ts +9 -0
- package/dist-lib/components/ui/Combobox.js +195 -0
- package/dist-lib/components/ui/Combobox.js.map +1 -0
- package/dist-lib/components/ui/CommandPalette.d.ts +9 -6
- package/dist-lib/components/ui/CommandPalette.js +179 -0
- package/dist-lib/components/ui/CommandPalette.js.map +1 -0
- package/dist-lib/components/ui/ContextMenu.d.ts +7 -2
- package/dist-lib/components/ui/ContextMenu.js +165 -0
- package/dist-lib/components/ui/ContextMenu.js.map +1 -0
- package/dist-lib/components/ui/DataGrid.d.ts +17 -4
- package/dist-lib/components/ui/DataGrid.js +99 -0
- package/dist-lib/components/ui/DataGrid.js.map +1 -0
- package/dist-lib/components/ui/DatePicker.d.ts +16 -13
- package/dist-lib/components/ui/DatePicker.js +193 -0
- package/dist-lib/components/ui/DatePicker.js.map +1 -0
- package/dist-lib/components/ui/DesignSystemProvider.d.ts +102 -41
- package/dist-lib/components/ui/DesignSystemProvider.js +135 -0
- package/dist-lib/components/ui/DesignSystemProvider.js.map +1 -0
- package/dist-lib/components/ui/Dialog.d.ts +19 -4
- package/dist-lib/components/ui/Dialog.js +165 -0
- package/dist-lib/components/ui/Dialog.js.map +1 -0
- package/dist-lib/components/ui/Drawer.d.ts +23 -2
- package/dist-lib/components/ui/Drawer.js +132 -0
- package/dist-lib/components/ui/Drawer.js.map +1 -0
- package/dist-lib/components/ui/DropdownMenu.js +169 -0
- package/dist-lib/components/ui/DropdownMenu.js.map +1 -0
- package/dist-lib/components/ui/EmptyState.d.ts +2 -0
- package/dist-lib/components/ui/EmptyState.js +46 -0
- package/dist-lib/components/ui/EmptyState.js.map +1 -0
- package/dist-lib/components/ui/ErrorState.d.ts +13 -2
- package/dist-lib/components/ui/ErrorState.js +69 -0
- package/dist-lib/components/ui/ErrorState.js.map +1 -0
- package/dist-lib/components/ui/FileUpload.d.ts +3 -0
- package/dist-lib/components/ui/FileUpload.js +111 -0
- package/dist-lib/components/ui/FileUpload.js.map +1 -0
- package/dist-lib/components/ui/Form.d.ts +16 -2
- package/dist-lib/components/ui/Form.js +131 -0
- package/dist-lib/components/ui/Form.js.map +1 -0
- package/dist-lib/components/ui/Icon.d.ts +1 -1
- package/dist-lib/components/ui/Icon.js +32 -0
- package/dist-lib/components/ui/Icon.js.map +1 -0
- package/dist-lib/components/ui/IconButton.d.ts +3 -3
- package/dist-lib/components/ui/IconButton.js +64 -0
- package/dist-lib/components/ui/IconButton.js.map +1 -0
- package/dist-lib/components/ui/Input.d.ts +9 -4
- package/dist-lib/components/ui/Input.js +149 -0
- package/dist-lib/components/ui/Input.js.map +1 -0
- package/dist-lib/components/ui/Kbd.js +24 -0
- package/dist-lib/components/ui/Kbd.js.map +1 -0
- package/dist-lib/components/ui/MultiSelect.d.ts +3 -1
- package/dist-lib/components/ui/MultiSelect.js +210 -0
- package/dist-lib/components/ui/MultiSelect.js.map +1 -0
- package/dist-lib/components/ui/Pagination.d.ts +23 -0
- package/dist-lib/components/ui/Pagination.js +153 -0
- package/dist-lib/components/ui/Pagination.js.map +1 -0
- package/dist-lib/components/ui/Popover.js +35 -0
- package/dist-lib/components/ui/Popover.js.map +1 -0
- package/dist-lib/components/ui/Progress.d.ts +3 -3
- package/dist-lib/components/ui/Progress.js +100 -0
- package/dist-lib/components/ui/Progress.js.map +1 -0
- package/dist-lib/components/ui/RadioGroup.d.ts +1 -1
- package/dist-lib/components/ui/RadioGroup.js +81 -0
- package/dist-lib/components/ui/RadioGroup.js.map +1 -0
- package/dist-lib/components/ui/RelativeTime.d.ts +19 -0
- package/dist-lib/components/ui/RelativeTime.js +31 -0
- package/dist-lib/components/ui/RelativeTime.js.map +1 -0
- package/dist-lib/components/ui/ScrollArea.d.ts +9 -1
- package/dist-lib/components/ui/ScrollArea.js +60 -0
- package/dist-lib/components/ui/ScrollArea.js.map +1 -0
- package/dist-lib/components/ui/Select.d.ts +6 -1
- package/dist-lib/components/ui/Select.js +139 -0
- package/dist-lib/components/ui/Select.js.map +1 -0
- package/dist-lib/components/ui/Separator.js +26 -0
- package/dist-lib/components/ui/Separator.js.map +1 -0
- package/dist-lib/components/ui/Sheet.d.ts +10 -1
- package/dist-lib/components/ui/Sheet.js +136 -0
- package/dist-lib/components/ui/Sheet.js.map +1 -0
- package/dist-lib/components/ui/Sidebar.d.ts +29 -14
- package/dist-lib/components/ui/Sidebar.js +212 -0
- package/dist-lib/components/ui/Sidebar.js.map +1 -0
- package/dist-lib/components/ui/Skeleton.d.ts +13 -2
- package/dist-lib/components/ui/Skeleton.js +29 -0
- package/dist-lib/components/ui/Skeleton.js.map +1 -0
- package/dist-lib/components/ui/Slider.js +64 -0
- package/dist-lib/components/ui/Slider.js.map +1 -0
- package/dist-lib/components/ui/Snackbar.d.ts +1 -1
- package/dist-lib/components/ui/Snackbar.js +57 -0
- package/dist-lib/components/ui/Snackbar.js.map +1 -0
- package/dist-lib/components/ui/Spinner.js +54 -0
- package/dist-lib/components/ui/Spinner.js.map +1 -0
- package/dist-lib/components/ui/Stepper.d.ts +6 -0
- package/dist-lib/components/ui/Stepper.js +111 -0
- package/dist-lib/components/ui/Stepper.js.map +1 -0
- package/dist-lib/components/ui/Switch.js +80 -0
- package/dist-lib/components/ui/Switch.js.map +1 -0
- package/dist-lib/components/ui/Table.d.ts +41 -5
- package/dist-lib/components/ui/Table.js +179 -0
- package/dist-lib/components/ui/Table.js.map +1 -0
- package/dist-lib/components/ui/Tabs.d.ts +1 -1
- package/dist-lib/components/ui/Tabs.js +91 -0
- package/dist-lib/components/ui/Tabs.js.map +1 -0
- package/dist-lib/components/ui/TagInput.d.ts +17 -2
- package/dist-lib/components/ui/TagInput.js +111 -0
- package/dist-lib/components/ui/TagInput.js.map +1 -0
- package/dist-lib/components/ui/Textarea.js +88 -0
- package/dist-lib/components/ui/Textarea.js.map +1 -0
- package/dist-lib/components/ui/Timeline.d.ts +16 -6
- package/dist-lib/components/ui/Timeline.js +56 -0
- package/dist-lib/components/ui/Timeline.js.map +1 -0
- package/dist-lib/components/ui/Toast.d.ts +1 -1
- package/dist-lib/components/ui/Toast.js +158 -0
- package/dist-lib/components/ui/Toast.js.map +1 -0
- package/dist-lib/components/ui/Tooltip.d.ts +4 -1
- package/dist-lib/components/ui/Tooltip.js +60 -0
- package/dist-lib/components/ui/Tooltip.js.map +1 -0
- package/dist-lib/components/ui/TopNav.d.ts +7 -3
- package/dist-lib/components/ui/TopNav.js +62 -0
- package/dist-lib/components/ui/TopNav.js.map +1 -0
- package/dist-lib/components/ui/Tree.d.ts +34 -7
- package/dist-lib/components/ui/Tree.js +170 -0
- package/dist-lib/components/ui/Tree.js.map +1 -0
- package/dist-lib/hooks/use-debounce.d.ts +19 -0
- package/dist-lib/hooks/use-debounce.js +36 -0
- package/dist-lib/hooks/use-debounce.js.map +1 -0
- package/dist-lib/hooks/use-delayed-loading.d.ts +21 -0
- package/dist-lib/hooks/use-delayed-loading.js +20 -0
- package/dist-lib/hooks/use-delayed-loading.js.map +1 -0
- package/dist-lib/hooks/use-field-ids.d.ts +30 -0
- package/dist-lib/hooks/use-field-ids.js +18 -0
- package/dist-lib/hooks/use-field-ids.js.map +1 -0
- package/dist-lib/hooks/use-media-query.d.ts +3 -1
- package/dist-lib/hooks/use-media-query.js +22 -0
- package/dist-lib/hooks/use-media-query.js.map +1 -0
- package/dist-lib/hooks/use-modifier-key.d.ts +13 -0
- package/dist-lib/hooks/use-modifier-key.js +19 -0
- package/dist-lib/hooks/use-modifier-key.js.map +1 -0
- package/dist-lib/hooks/use-strings.d.ts +5 -0
- package/dist-lib/hooks/use-strings.js +12 -0
- package/dist-lib/hooks/use-strings.js.map +1 -0
- package/dist-lib/hooks/use-toast.d.ts +7 -2
- package/dist-lib/hooks/use-toast.js +67 -0
- package/dist-lib/hooks/use-toast.js.map +1 -0
- package/dist-lib/icon.d.ts +8 -0
- package/dist-lib/icon.js +7 -0
- package/dist-lib/icon.js.map +1 -0
- package/dist-lib/icons/index.d.ts +80 -88
- package/dist-lib/icons/index.js +163 -0
- package/dist-lib/icons/index.js.map +1 -0
- package/dist-lib/illustrations/index.d.ts +1 -0
- package/dist-lib/illustrations/index.js +114 -0
- package/dist-lib/illustrations/index.js.map +1 -0
- package/dist-lib/index.d.ts +68 -59
- package/dist-lib/index.js +288 -4530
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/lib/format.d.ts +65 -0
- package/dist-lib/lib/format.js +95 -0
- package/dist-lib/lib/format.js.map +1 -0
- package/dist-lib/lib/return-focus.d.ts +11 -0
- package/dist-lib/lib/return-focus.js +12 -0
- package/dist-lib/lib/return-focus.js.map +1 -0
- package/dist-lib/lib/strings.d.ts +190 -0
- package/dist-lib/lib/strings.js +141 -0
- package/dist-lib/lib/strings.js.map +1 -0
- package/dist-lib/lib/strings.mn.d.ts +3 -0
- package/dist-lib/lib/strings.mn.js +115 -0
- package/dist-lib/lib/strings.mn.js.map +1 -0
- package/dist-lib/lib/utils.d.ts +0 -1
- package/dist-lib/lib/utils.js +10 -0
- package/dist-lib/lib/utils.js.map +1 -0
- package/dist-lib/styles.css +1 -1
- package/dist-lib/theme.css +840 -0
- package/package.json +38 -8
- package/dist-lib/index.cjs +0 -8
- package/dist-lib/index.cjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftzbay/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Refined-minimal Tailwind v4 + React design system — 50+ accessible, themeable primitives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "craftzbay",
|
|
7
7
|
"homepage": "https://components.runestonetechnologies.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/craftzbay/craftzbay-ui.git",
|
|
10
|
+
"url": "git+https://github.com/craftzbay/craftzbay-ui.git",
|
|
11
11
|
"directory": "packages/ui"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
@@ -24,16 +24,32 @@
|
|
|
24
24
|
"accessible"
|
|
25
25
|
],
|
|
26
26
|
"type": "module",
|
|
27
|
-
"
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist-lib/index.js",
|
|
28
31
|
"module": "./dist-lib/index.js",
|
|
29
32
|
"types": "./dist-lib/index.d.ts",
|
|
33
|
+
"typesVersions": {
|
|
34
|
+
"*": {
|
|
35
|
+
"icon": [
|
|
36
|
+
"./dist-lib/icon.d.ts"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
30
40
|
"exports": {
|
|
31
41
|
".": {
|
|
32
42
|
"types": "./dist-lib/index.d.ts",
|
|
33
43
|
"import": "./dist-lib/index.js",
|
|
34
|
-
"
|
|
44
|
+
"default": "./dist-lib/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./icon": {
|
|
47
|
+
"types": "./dist-lib/icon.d.ts",
|
|
48
|
+
"import": "./dist-lib/icon.js",
|
|
49
|
+
"default": "./dist-lib/icon.js"
|
|
35
50
|
},
|
|
36
51
|
"./styles.css": "./dist-lib/styles.css",
|
|
52
|
+
"./theme.css": "./dist-lib/theme.css",
|
|
37
53
|
"./package.json": "./package.json"
|
|
38
54
|
},
|
|
39
55
|
"sideEffects": [
|
|
@@ -89,6 +105,7 @@
|
|
|
89
105
|
"@types/react": "^18.3.12",
|
|
90
106
|
"@types/react-dom": "^18.3.1",
|
|
91
107
|
"@vitejs/plugin-react": "^4.3.4",
|
|
108
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
92
109
|
"@vitest/ui": "^4.1.6",
|
|
93
110
|
"autoprefixer": "^10.4.20",
|
|
94
111
|
"eslint": "^9.16.0",
|
|
@@ -111,18 +128,31 @@
|
|
|
111
128
|
"vitest": "^4.1.6"
|
|
112
129
|
},
|
|
113
130
|
"peerDependencies": {
|
|
114
|
-
"react": "
|
|
115
|
-
"react-dom": "
|
|
131
|
+
"react": "^18 || ^19",
|
|
132
|
+
"react-dom": "^18 || ^19",
|
|
133
|
+
"tailwindcss": "^4",
|
|
134
|
+
"tw-animate-css": "^1"
|
|
135
|
+
},
|
|
136
|
+
"peerDependenciesMeta": {
|
|
137
|
+
"tailwindcss": {
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
"tw-animate-css": {
|
|
141
|
+
"optional": true
|
|
142
|
+
}
|
|
116
143
|
},
|
|
117
144
|
"scripts": {
|
|
118
|
-
"build": "vite build",
|
|
145
|
+
"build": "vite build && node scripts/fix-dts-extensions.mjs && (cp src/styles/theme.css dist-lib/ || true)",
|
|
119
146
|
"dev": "vite build --watch",
|
|
120
147
|
"typecheck": "tsc --noEmit",
|
|
121
148
|
"format": "prettier --write .",
|
|
122
149
|
"test": "vitest run",
|
|
123
150
|
"test:watch": "vitest",
|
|
151
|
+
"test:coverage": "vitest run --coverage",
|
|
124
152
|
"changeset": "changeset",
|
|
125
153
|
"changeset:version": "changeset version",
|
|
126
|
-
"changeset:release": "pnpm build && changeset publish"
|
|
154
|
+
"changeset:release": "pnpm build && changeset publish",
|
|
155
|
+
"lint": "eslint src",
|
|
156
|
+
"test:treeshake": "vitest run src/__tests__/treeshake.test.ts"
|
|
127
157
|
}
|
|
128
158
|
}
|
package/dist-lib/index.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ao=require("clsx"),Bo=require("tailwind-merge"),l=require("react"),Eo=require("lucide-react/dist/esm/icons/alert-circle.js"),ue=require("lucide-react/dist/esm/icons/alert-triangle.js"),vt=require("lucide-react/dist/esm/icons/arrow-down.js"),Oo=require("lucide-react/dist/esm/icons/arrow-left.js"),Go=require("lucide-react/dist/esm/icons/arrow-right.js"),jt=require("lucide-react/dist/esm/icons/arrow-up.js"),Nt=require("lucide-react/dist/esm/icons/arrow-up-down.js"),Ho=require("lucide-react/dist/esm/icons/at-sign.js"),Vo=require("lucide-react/dist/esm/icons/bar-chart-3.js"),Wo=require("lucide-react/dist/esm/icons/bell.js"),Uo=require("lucide-react/dist/esm/icons/bookmark.js"),wt=require("lucide-react/dist/esm/icons/calendar.js"),H=require("lucide-react/dist/esm/icons/check.js"),fe=require("lucide-react/dist/esm/icons/check-circle-2.js"),Z=require("lucide-react/dist/esm/icons/chevron-down.js"),me=require("lucide-react/dist/esm/icons/chevron-left.js"),O=require("lucide-react/dist/esm/icons/chevron-right.js"),yt=require("lucide-react/dist/esm/icons/chevron-up.js"),Re=require("lucide-react/dist/esm/icons/chevrons-left.js"),Me=require("lucide-react/dist/esm/icons/chevrons-right.js"),xe=require("lucide-react/dist/esm/icons/chevrons-up-down.js"),Ie=require("lucide-react/dist/esm/icons/circle.js"),Ko=require("lucide-react/dist/esm/icons/copy.js"),Xo=require("lucide-react/dist/esm/icons/corner-down-left.js"),Qo=require("lucide-react/dist/esm/icons/credit-card.js"),Yo=require("lucide-react/dist/esm/icons/download.js"),Zo=require("lucide-react/dist/esm/icons/edit-2.js"),Jo=require("lucide-react/dist/esm/icons/ellipsis.js"),en=require("lucide-react/dist/esm/icons/external-link.js"),Ct=require("lucide-react/dist/esm/icons/eye.js"),kt=require("lucide-react/dist/esm/icons/eye-off.js"),_e=require("lucide-react/dist/esm/icons/file.js"),tn=require("lucide-react/dist/esm/icons/file-text.js"),rn=require("lucide-react/dist/esm/icons/filter.js"),St=require("lucide-react/dist/esm/icons/folder.js"),Tt=require("lucide-react/dist/esm/icons/folder-open.js"),on=require("lucide-react/dist/esm/icons/github.js"),nn=require("lucide-react/dist/esm/icons/grip-vertical.js"),sn=require("lucide-react/dist/esm/icons/heart.js"),an=require("lucide-react/dist/esm/icons/help-circle.js"),ln=require("lucide-react/dist/esm/icons/home.js"),dn=require("lucide-react/dist/esm/icons/inbox.js"),ge=require("lucide-react/dist/esm/icons/info.js"),cn=require("lucide-react/dist/esm/icons/layout-grid.js"),un=require("lucide-react/dist/esm/icons/link-2.js"),be=require("lucide-react/dist/esm/icons/loader-2.js"),fn=require("lucide-react/dist/esm/icons/lock.js"),mn=require("lucide-react/dist/esm/icons/log-out.js"),xn=require("lucide-react/dist/esm/icons/mail.js"),gn=require("lucide-react/dist/esm/icons/menu.js"),Dt=require("lucide-react/dist/esm/icons/minus.js"),bn=require("lucide-react/dist/esm/icons/moon.js"),zt=require("lucide-react/dist/esm/icons/more-horizontal.js"),pn=require("lucide-react/dist/esm/icons/package.js"),hn=require("lucide-react/dist/esm/icons/pencil.js"),vn=require("lucide-react/dist/esm/icons/plug.js"),jn=require("lucide-react/dist/esm/icons/plus.js"),Pe=require("lucide-react/dist/esm/icons/search.js"),Rt=require("lucide-react/dist/esm/icons/settings.js"),Nn=require("lucide-react/dist/esm/icons/shopping-cart.js"),wn=require("lucide-react/dist/esm/icons/sparkles.js"),yn=require("lucide-react/dist/esm/icons/star.js"),Cn=require("lucide-react/dist/esm/icons/sun.js"),kn=require("lucide-react/dist/esm/icons/trash-2.js"),Mt=require("lucide-react/dist/esm/icons/upload.js"),Sn=require("lucide-react/dist/esm/icons/user.js"),Tn=require("lucide-react/dist/esm/icons/users.js"),L=require("lucide-react/dist/esm/icons/x.js"),pe=require("lucide-react/dist/esm/icons/x-circle.js"),Dn=require("lucide-react/dist/esm/icons/zap.js"),e=require("react/jsx-runtime"),zn=require("@radix-ui/react-accordion"),F=require("class-variance-authority"),Rn=require("@radix-ui/react-avatar"),It=require("@radix-ui/react-slot"),Mn=require("@radix-ui/react-checkbox"),In=require("@radix-ui/react-popover"),M=require("cmdk"),_n=require("@radix-ui/react-dialog"),Pn=require("@radix-ui/react-context-menu"),Fn=require("@radix-ui/react-dropdown-menu"),qn=require("react-day-picker"),Ln=require("@radix-ui/react-select"),$n=require("@radix-ui/react-label"),Fe=require("react-hook-form"),_t=require("lucide-react/dynamicIconImports"),An=require("@radix-ui/react-progress"),Bn=require("@radix-ui/react-radio-group"),En=require("@radix-ui/react-scroll-area"),On=require("@radix-ui/react-separator"),Gn=require("@radix-ui/react-slider"),Hn=require("@radix-ui/react-switch"),Vn=require("@radix-ui/react-tabs"),Wn=require("@radix-ui/react-toast"),Un=require("@radix-ui/react-tooltip"),Kn=require("embla-carousel-react"),V=require("vaul");function z(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const r in n)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}return t.default=n,Object.freeze(t)}const re=z(zn),De=z(Rn),mt=z(Mn),k=z(In),C=z(_n),I=z(Pn),_=z(Fn),D=z(Ln),Xn=z($n),xt=z(An),ze=z(Bn),ee=z(En),Qn=z(On),le=z(Gn),gt=z(Hn),he=z(Vn),X=z(Wn),oe=z(Un);function i(...n){return Bo.twMerge(Ao.clsx(n))}let bt=0;function Yn(n="ds"){return bt+=1,`${n}-${bt}`}function Pt(n){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(n).matches);return l.useEffect(()=>{if(typeof window>"u")return;const o=window.matchMedia(n),s=a=>r(a.matches);return r(o.matches),o.addEventListener("change",s),()=>o.removeEventListener("change",s)},[n]),t}function Zn(){return Pt("(prefers-reduced-motion: reduce)")}const K={toasts:[],listeners:new Set,emit(){for(const n of this.listeners)n(this.toasts)},push(n){const t=n.id??`t_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,r={open:!0,duration:5e3,variant:"default",...n,id:t};return this.toasts=[r,...this.toasts].slice(0,3),this.emit(),t},dismiss(n){this.toasts=this.toasts.map(t=>t.id===n?{...t,open:!1}:t),this.emit()},remove(n){this.toasts=this.toasts.filter(t=>t.id!==n),this.emit()}};function Ft(){const[n,t]=l.useState(()=>[...K.toasts]);l.useEffect(()=>{const a=d=>t([...d]);return K.listeners.add(a),()=>{K.listeners.delete(a)}},[]);const r=l.useCallback(a=>K.push(a),[]),o=l.useCallback(a=>K.dismiss(a),[]),s=l.useCallback(a=>K.remove(a),[]);return{toasts:n,push:r,dismiss:o,remove:s}}const Jn=n=>K.push(n),es=Object.freeze(Object.defineProperty({__proto__:null,AlertCircle:Eo,AlertTriangle:ue,ArrowDown:vt,ArrowLeft:Oo,ArrowRight:Go,ArrowUp:jt,ArrowUpDown:Nt,AtSign:Ho,BarChart3:Vo,Bell:Wo,Bookmark:Uo,Calendar:wt,Check:H,CheckCircle2:fe,ChevronDown:Z,ChevronLeft:me,ChevronRight:O,ChevronUp:yt,ChevronsLeft:Re,ChevronsRight:Me,ChevronsUpDown:xe,Circle:Ie,Copy:Ko,CornerDownLeft:Xo,CreditCard:Qo,Download:Yo,Edit2:Zo,Ellipsis:Jo,ExternalLink:en,Eye:Ct,EyeOff:kt,File:_e,FileText:tn,Filter:rn,Folder:St,FolderOpen:Tt,Github:on,GripVertical:nn,Heart:sn,HelpCircle:an,Home:ln,Inbox:dn,Info:ge,LayoutGrid:cn,Link2:un,Loader2:be,Lock:fn,LogOut:mn,Mail:xn,Menu:gn,Minus:Dt,Moon:bn,MoreHorizontal:zt,Package:pn,Pencil:hn,Plug:vn,Plus:jn,Search:Pe,Settings:Rt,ShoppingCart:Nn,Sparkles:wn,Star:yn,Sun:Cn,Trash2:kn,Upload:Mt,User:Sn,Users:Tn,X:L,XCircle:pe,Zap:Dn},Symbol.toStringTag,{value:"Module"}));function J({className:n,children:t,...r}){return e.jsx("svg",{viewBox:"0 0 120 120",role:"img",width:"120",height:"120",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:i("text-foreground-subtle",n),"aria-hidden":!0,...r,children:t})}function qt(n){return e.jsxs(J,{...n,children:[e.jsx("path",{d:"M22 56l10-28a6 6 0 0 1 6-4h44a6 6 0 0 1 6 4l10 28"}),e.jsx("path",{d:"M22 56v32a6 6 0 0 0 6 6h64a6 6 0 0 0 6-6V56"}),e.jsx("path",{d:"M22 56h22l4 10h24l4-10h22"}),e.jsx("circle",{cx:"60",cy:"36",r:"2",className:"text-accent",stroke:"currentColor"}),e.jsx("path",{d:"M52 28l8 8M68 28l-8 8",opacity:"0.4"})]})}function ts(n){return e.jsxs(J,{...n,children:[e.jsx("circle",{cx:"52",cy:"52",r:"26"}),e.jsx("path",{d:"M72 72l20 20"}),e.jsx("path",{d:"M42 52h20",opacity:"0.5"}),e.jsx("circle",{cx:"98",cy:"22",r:"1.5",className:"text-accent",stroke:"currentColor"}),e.jsx("circle",{cx:"20",cy:"92",r:"1.5",className:"text-accent",stroke:"currentColor"})]})}function Lt(n){return e.jsxs(J,{...n,children:[e.jsx("path",{d:"M22 32h76v56a6 6 0 0 1-6 6H28a6 6 0 0 1-6-6V32z"}),e.jsx("path",{d:"M22 44h76"}),e.jsx("circle",{cx:"32",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"40",cy:"38",r:"1.5"}),e.jsx("circle",{cx:"48",cy:"38",r:"1.5"}),e.jsx("path",{d:"M44 64l32 16M76 64l-32 16",className:"text-accent",stroke:"currentColor"}),e.jsx("text",{x:"60",y:"76",fontFamily:"ui-monospace,monospace",fontSize:"9",textAnchor:"middle",fill:"currentColor",stroke:"none",opacity:"0.6",children:"404"})]})}function $t(n){return e.jsxs(J,{...n,children:[e.jsx("rect",{x:"22",y:"28",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"54",width:"76",height:"20",rx:"3"}),e.jsx("rect",{x:"22",y:"80",width:"76",height:"20",rx:"3"}),e.jsx("circle",{cx:"32",cy:"38",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"64",r:"2",className:"text-danger",stroke:"currentColor"}),e.jsx("circle",{cx:"32",cy:"90",r:"2",className:"text-warning",stroke:"currentColor"}),e.jsx("path",{d:"M44 38h44M44 64h44M44 90h28",opacity:"0.4"}),e.jsx("path",{d:"M82 84l16 16M82 100l16-16",className:"text-danger",stroke:"currentColor"})]})}function rs(n){return e.jsxs(J,{...n,children:[e.jsx("path",{d:"M22 86h76"}),e.jsx("path",{d:"M30 86V52l30-22 30 22v34"}),e.jsx("rect",{x:"40",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("rect",{x:"66",y:"64",width:"14",height:"14",rx:"1"}),e.jsx("path",{d:"M30 52h60",opacity:"0.4"}),e.jsx("path",{d:"M40 40v6M50 36v10M70 36v10M80 40v6",className:"text-accent",stroke:"currentColor"})]})}function At(n){return e.jsxs(J,{...n,children:[e.jsx("path",{d:"M22 60a40 40 0 0 1 76 0",opacity:"0.4"}),e.jsx("path",{d:"M34 70a28 28 0 0 1 52 0",opacity:"0.6"}),e.jsx("path",{d:"M46 80a16 16 0 0 1 28 0"}),e.jsx("circle",{cx:"60",cy:"92",r:"3"}),e.jsx("path",{d:"M20 20l80 80",className:"text-danger",stroke:"currentColor"})]})}const os=Object.freeze(Object.defineProperty({__proto__:null,ConnectionLost:At,Construction:rs,InboxEmpty:qt,NoSearchResults:ts,NotFound:Lt,ServerError:$t},Symbol.toStringTag,{value:"Module"})),ns=re.Root,Bt=l.forwardRef(function({className:t,...r},o){return e.jsx(re.Item,{ref:o,className:i("border-b border-border",t),...r})});Bt.displayName="AccordionItem";const Et=l.forwardRef(function({className:t,children:r,...o},s){return e.jsx(re.Header,{className:"flex",children:e.jsxs(re.Trigger,{ref:s,className:i("flex flex-1 items-center justify-between gap-2 py-4 text-left text-sm font-medium text-foreground","outline-none transition-colors duration-[var(--duration-fast)]","hover:text-accent","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","[&[data-state=open]>svg]:rotate-180",t),...o,children:[r,e.jsx(Z,{className:"size-4 shrink-0 text-foreground-subtle transition-transform duration-[var(--duration-base)]","aria-hidden":!0})]})})});Et.displayName="AccordionTrigger";const Ot=l.forwardRef(function({className:t,children:r,...o},s){return e.jsx(re.Content,{ref:s,className:i("overflow-hidden text-sm text-foreground-muted","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"),...o,children:e.jsx("div",{className:i("pb-4 pt-0",t),children:r})})});Ot.displayName="AccordionContent";const ss=F.cva(["relative flex w-full gap-3 rounded-lg border p-4","text-sm"],{variants:{variant:{default:"border-border bg-background-subtle text-foreground",info:"border-info-border-soft bg-info-soft text-info-text",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text"}},defaultVariants:{variant:"default"}}),as={default:null,info:e.jsx(ge,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),success:e.jsx(fe,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(ue,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(pe,{className:"size-4 shrink-0 mt-0.5","aria-hidden":!0})},Gt=l.forwardRef(function({className:t,variant:r="default",title:o,dismissible:s,onDismiss:a,icon:d,children:u,...f},c){const[x,g]=l.useState(!0);if(!x)return null;const m=()=>{g(!1),a==null||a()},b=d===!1?null:d??as[r??"default"];return e.jsxs("div",{ref:c,role:"alert",className:i(ss({variant:r}),t),...f,children:[b,e.jsxs("div",{className:"flex-1 min-w-0",children:[o&&e.jsx("h5",{className:"font-medium leading-tight mb-1",children:o}),e.jsx("div",{className:"text-sm leading-relaxed [&_p]:leading-relaxed",children:u})]}),s&&e.jsx("button",{type:"button","aria-label":"Dismiss",onClick:m,className:i("inline-flex size-6 shrink-0 items-center justify-center rounded-md","hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:e.jsx(L,{className:"size-3.5","aria-hidden":!0})})]})});Gt.displayName="Alert";const Ht={xs:"size-5 text-[10px]",sm:"size-6 text-xs",md:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"},is=F.cva("relative inline-flex shrink-0",{variants:{size:Ht},defaultVariants:{size:"md"}}),ls={online:"bg-success",busy:"bg-danger",away:"bg-warning",offline:"bg-foreground-subtle"},Vt=l.forwardRef(function({className:t,size:r,src:o,alt:s,fallback:a,status:d,...u},f){return e.jsxs("span",{className:is({size:r}),children:[e.jsxs(De.Root,{ref:f,className:i("block size-full overflow-hidden rounded-full bg-background-muted text-foreground-muted",t),...u,children:[o&&e.jsx(De.Image,{src:o,alt:s??"",className:"aspect-square size-full object-cover"}),e.jsx(De.Fallback,{delayMs:o?200:0,className:"flex size-full items-center justify-center bg-background-muted font-medium uppercase",children:a??"?"})]}),d&&e.jsx("span",{"aria-label":`Status: ${d}`,className:i("absolute bottom-0 right-0 block size-[28%] rounded-full ring-2 ring-background",ls[d])})]})});Vt.displayName="Avatar";const Wt=l.forwardRef(function({max:t=4,size:r="md",className:o,children:s,...a},d){const u=Array.isArray(s)?s:[s],f=u.slice(0,t),c=u.length-f.length;return e.jsxs("div",{ref:d,className:i("flex items-center -space-x-2",o),...a,children:[f.map((x,g)=>e.jsx("div",{className:"ring-2 ring-background rounded-full",children:x},g)),c>0&&e.jsxs("div",{className:i("inline-flex items-center justify-center rounded-full bg-background-muted text-foreground-muted ring-2 ring-background",Ht[r],"font-medium"),"aria-label":`${c} more`,children:["+",c]})]})});Wt.displayName="AvatarGroup";const ds=F.cva(["inline-flex items-center gap-1 rounded-full px-2 py-0.5","text-xs font-medium whitespace-nowrap"],{variants:{variant:{subtle:"",outline:"border bg-transparent"},tone:{neutral:"",accent:"",success:"",warning:"",danger:"",info:""}},compoundVariants:[{variant:"subtle",tone:"neutral",class:"bg-background-muted text-foreground-muted"},{variant:"subtle",tone:"accent",class:"bg-accent-soft text-on-accent-soft"},{variant:"subtle",tone:"success",class:"bg-success-soft text-success-text"},{variant:"subtle",tone:"warning",class:"bg-warning-soft text-warning-text"},{variant:"subtle",tone:"danger",class:"bg-danger-soft text-danger-text"},{variant:"subtle",tone:"info",class:"bg-info-soft text-info-text"},{variant:"outline",tone:"neutral",class:"border-border text-foreground-muted"},{variant:"outline",tone:"accent",class:"border-accent text-accent"},{variant:"outline",tone:"success",class:"border-success-border-soft text-success-text"},{variant:"outline",tone:"warning",class:"border-warning-border-soft text-warning-text"},{variant:"outline",tone:"danger",class:"border-danger-border-soft text-danger-text"},{variant:"outline",tone:"info",class:"border-info-border-soft text-info-text"}],defaultVariants:{variant:"subtle",tone:"neutral"}}),cs={neutral:"bg-foreground-subtle",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"},Ut=l.forwardRef(function({className:t,variant:r,tone:o="neutral",dot:s,children:a,...d},u){return e.jsxs("span",{ref:u,className:i(ds({variant:r,tone:o}),t),...d,children:[s&&e.jsx("span",{"aria-hidden":!0,className:i("inline-block size-1.5 rounded-full",cs[o??"neutral"])}),a]})});Ut.displayName="Badge";const Kt=l.forwardRef(function({items:t,maxItems:r=4,renderLink:o,className:s,...a},d){const f=t.length>r?[t[0],{collapsed:!0},...t.slice(-2)]:t;return e.jsx("nav",{ref:d,"aria-label":"Breadcrumb",className:i("text-sm",s),...a,children:e.jsx("ol",{className:"flex flex-wrap items-center gap-1.5 text-foreground-subtle",children:f.map((c,x)=>{const g=x===f.length-1;if("collapsed"in c)return e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(zt,{className:"size-4","aria-hidden":!0}),e.jsx(O,{className:"size-3.5","aria-hidden":!0})]},`ellipsis-${x}`);const m=c,b=g?e.jsx("span",{"aria-current":"page",className:"font-medium text-foreground",children:m.label}):m.href?o?o(m.href,m.label):e.jsx("a",{href:m.href,className:"hover:text-foreground transition-colors duration-[var(--duration-fast)] outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",children:m.label}):e.jsx("span",{children:m.label});return e.jsxs("li",{className:"flex items-center gap-1.5",children:[b,!g&&e.jsx(O,{className:"size-3.5","aria-hidden":!0})]},x)})})})});Kt.displayName="Breadcrumbs";const us=F.cva(["inline-flex items-center justify-center gap-2 whitespace-nowrap","rounded-md text-sm font-medium","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-accent text-on-accent","hover:bg-accent-700","active:bg-accent-800"],secondary:["bg-background-muted text-foreground border border-border","hover:bg-neutral-200 dark:hover:bg-neutral-800","active:bg-neutral-300 dark:active:bg-neutral-700"],outline:["border border-border bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],ghost:["bg-transparent text-foreground","hover:bg-background-muted","active:bg-background-subtle"],destructive:["bg-danger text-on-danger","hover:bg-danger-700","active:bg-danger-800"],link:["bg-transparent text-accent underline-offset-4 px-0","hover:underline","active:text-accent-700"]},size:{sm:"h-8 px-3 text-xs [&_svg]:size-4",md:"h-9 px-3.5 text-sm [&_svg]:size-4",lg:"h-10 px-4 text-sm [&_svg]:size-5",icon:"h-9 w-9 [&_svg]:size-4"}},compoundVariants:[{variant:"link",size:"sm",class:"h-auto px-0"},{variant:"link",size:"md",class:"h-auto px-0"},{variant:"link",size:"lg",class:"h-auto px-0"}],defaultVariants:{variant:"primary",size:"md"}}),ne=l.forwardRef(function({className:t,variant:r,size:o,asChild:s=!1,loading:a=!1,leadingIcon:d,trailingIcon:u,disabled:f,children:c,type:x="button",...g},m){const b=f||a,p=i(us({variant:r,size:o}),t);return s?e.jsx(It.Slot,{ref:m,"aria-busy":a||void 0,"data-loading":a||void 0,className:p,...g,children:c}):e.jsxs("button",{ref:m,type:x,"aria-busy":a||void 0,disabled:b,"data-loading":a||void 0,className:p,...g,children:[a?e.jsx(be,{className:"animate-spin","aria-hidden":"true"}):d,c,!a&&u]})});ne.displayName="Button";const fs=F.cva(["rounded-lg border bg-card text-card-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]"],{variants:{variant:{default:"border-border",interactive:"border-border hover:border-border-strong hover:bg-background-subtle cursor-pointer"},padding:{none:"",sm:"p-4",md:"p-5",lg:"p-6"}},defaultVariants:{variant:"default",padding:"md"}}),Xt=l.forwardRef(function({className:t,variant:r,padding:o,...s},a){return e.jsx("div",{ref:a,className:i(fs({variant:r,padding:o}),t),...s})});Xt.displayName="Card";const Qt=l.forwardRef(function({className:t,...r},o){return e.jsx("div",{ref:o,className:i("flex flex-col gap-1 pb-4",t),...r})});Qt.displayName="CardHeader";const Yt=l.forwardRef(function({className:t,...r},o){return e.jsx("h3",{ref:o,className:i("text-base font-semibold text-foreground leading-tight",t),...r})});Yt.displayName="CardTitle";const Zt=l.forwardRef(function({className:t,...r},o){return e.jsx("p",{ref:o,className:i("text-sm text-foreground-muted",t),...r})});Zt.displayName="CardDescription";const Jt=l.forwardRef(function({className:t,...r},o){return e.jsx("div",{ref:o,className:i("text-sm text-foreground",t),...r})});Jt.displayName="CardContent";const er=l.forwardRef(function({className:t,...r},o){return e.jsx("div",{ref:o,className:i("flex items-center gap-2 pt-4",t),...r})});er.displayName="CardFooter";const tr=l.forwardRef(function({className:t,label:r,description:o,error:s,hideLabel:a,id:d,disabled:u,...f},c){const x=l.useId(),g=d??x,m=o?`${g}-desc`:void 0,b=s?`${g}-error`:void 0;return e.jsxs("div",{className:i("flex flex-col gap-1",t),children:[e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx(mt.Root,{ref:c,id:g,disabled:u,"aria-describedby":b??m,"aria-invalid":!!s||void 0,className:i("peer mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-sm border","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-on-accent","data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-on-accent","disabled:cursor-not-allowed disabled:opacity-50",s?"border-danger":"border-border-strong"),...f,children:e.jsx(mt.Indicator,{className:"flex items-center justify-center",children:f.checked==="indeterminate"?e.jsx(Dt,{className:"size-3","aria-hidden":!0,strokeWidth:3}):e.jsx(H,{className:"size-3","aria-hidden":!0,strokeWidth:3})})}),r&&e.jsxs("div",{className:i("flex flex-col gap-0.5",a&&"sr-only"),children:[e.jsx("label",{htmlFor:g,className:i("text-sm text-foreground select-none",u&&"opacity-50 cursor-not-allowed"),children:r}),o&&e.jsx("p",{id:m,className:"text-xs text-foreground-subtle",children:o})]})]}),s&&e.jsx("p",{id:b,role:"alert",className:"text-xs text-danger-text",children:s})]})});tr.displayName="Checkbox";const rr=l.forwardRef(function({value:t,onChange:r,options:o,loadOptions:s,label:a,helperText:d,error:u,placeholder:f="Select…",searchPlaceholder:c="Search…",emptyText:x="No results.",clearable:g=!0,disabled:m,size:b="md",className:p},h){const v=l.useId(),S=`${v}-helper`,R=`${v}-error`,[T,y]=l.useState(!1),[j,w]=l.useState(""),[q,B]=l.useState([]),[W,Q]=l.useState(!1),$=s?q:o??[];l.useEffect(()=>{if(!s||!T)return;let P=!1;return Q(!0),s(j).then(Te=>{P||B(Te)}).finally(()=>{P||Q(!1)}),()=>{P=!0}},[j,T,s]);const E=l.useMemo(()=>$.find(P=>P.value===t)??null,[$,t]),U=b==="sm"?"h-8":b==="lg"?"h-10":"h-9",N=b==="sm"?"px-2.5":b==="lg"?"px-3.5":"px-3",G=l.useCallback(P=>{P.stopPropagation(),r(null)},[r]),Se=!!u;return e.jsxs("div",{ref:h,className:i("flex flex-col gap-1.5",p),children:[a&&e.jsx("label",{htmlFor:v,className:"text-sm font-medium text-foreground",children:a}),e.jsxs(k.Root,{open:T,onOpenChange:y,children:[e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("button",{id:v,type:"button",role:"combobox","aria-expanded":T,"aria-invalid":Se||void 0,"aria-describedby":Se?R:d?S:void 0,disabled:m,className:i("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",U,N,Se?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring"),children:[e.jsx("span",{className:i("truncate",!E&&"text-foreground-subtle"),children:E?E.label:f}),e.jsxs("span",{className:"ml-2 flex items-center gap-1 shrink-0",children:[g&&E&&!m&&e.jsx("span",{role:"button",tabIndex:-1,onClick:G,"aria-label":"Clear selection",className:"text-foreground-subtle hover:text-foreground",children:e.jsx(L,{className:"size-4","aria-hidden":!0})}),e.jsx(xe,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:i("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:e.jsxs(M.Command,{shouldFilter:!s,className:"flex h-full w-full flex-col",children:[e.jsxs("div",{className:"flex items-center border-b border-border px-3",children:[e.jsx(M.Command.Input,{value:j,onValueChange:w,placeholder:c,className:"flex h-9 w-full bg-transparent py-2 text-sm outline-none placeholder:text-foreground-subtle"}),W&&e.jsx(be,{className:"size-4 animate-spin text-foreground-subtle","aria-hidden":!0})]}),e.jsxs(M.Command.List,{className:"max-h-64 overflow-y-auto p-1",children:[$.map(P=>{const Te=P.value===t;return e.jsxs(M.Command.Item,{value:P.value,disabled:P.disabled,onSelect:$o=>{r($o),y(!1)},className:i("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{className:"flex-1",children:P.label}),P.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:P.description}),Te&&e.jsx(H,{className:"size-4 text-accent","aria-hidden":!0})]},P.value)}),!W&&$.length===0&&e.jsx(M.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:x})]})]})})})]}),u?e.jsx("p",{id:R,role:"alert",className:"text-xs text-danger-text",children:u}):d?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:d}):null]})});rr.displayName="Combobox";const qe=l.forwardRef(function({className:t,...r},o){return e.jsx(M.Command,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground",t),...r})});qe.displayName="Command";const or=l.forwardRef(function({className:t,...r},o){return e.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3","cmdk-input-wrapper":"",children:[e.jsx(Pe,{className:"size-4 shrink-0 text-foreground-subtle","aria-hidden":!0}),e.jsx(M.Command.Input,{ref:o,className:i("flex h-11 w-full bg-transparent py-3 text-sm outline-none","placeholder:text-foreground-subtle disabled:cursor-not-allowed disabled:opacity-50",t),...r})]})});or.displayName="CommandInput";const nr=l.forwardRef(function({className:t,...r},o){return e.jsx(M.Command.List,{ref:o,className:i("max-h-[320px] overflow-y-auto p-1",t),...r})});nr.displayName="CommandList";const sr=l.forwardRef(function(t,r){return e.jsx(M.Command.Empty,{ref:r,className:"py-8 text-center text-sm text-foreground-subtle",...t})});sr.displayName="CommandEmpty";const ar=l.forwardRef(function({className:t,...r},o){return e.jsx(M.Command.Group,{ref:o,className:i("overflow-hidden text-foreground p-1","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium","[&_[cmdk-group-heading]]:text-foreground-subtle",t),...r})});ar.displayName="CommandGroup";const ir=l.forwardRef(function({className:t,...r},o){return e.jsx(M.Command.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-border",t),...r})});ir.displayName="CommandSeparator";const lr=l.forwardRef(function({className:t,...r},o){return e.jsx(M.Command.Item,{ref:o,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[selected=true]:bg-background-muted data-[selected=true]:text-foreground","data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50","[&_svg]:size-4 [&_svg]:text-foreground-subtle",t),...r})});lr.displayName="CommandItem";function ms({children:n,className:t}){return e.jsx("span",{className:i("ml-auto inline-flex items-center gap-0.5 text-xs tracking-widest text-foreground-subtle font-mono",t),children:n})}function xs({open:n,onOpenChange:t,children:r,title:o="Command palette"}){return e.jsx(C.Root,{open:n,onOpenChange:t,children:e.jsxs(C.Portal,{children:[e.jsx(C.Overlay,{className:i("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0")}),e.jsxs(C.Content,{"aria-describedby":void 0,className:i("fixed left-1/2 top-[20%] z-[var(--z-modal)] -translate-x-1/2","w-[calc(100%-2rem)] max-w-[640px] overflow-hidden","rounded-lg border border-border bg-popover text-popover-foreground shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0","data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95"),children:[e.jsx(C.Title,{className:"sr-only",children:o}),e.jsx(qe,{children:r})]})]})})}function gs(n){const[t,r]=l.useState(0);l.useEffect(()=>{const o=s=>{s.key==="k"&&(s.metaKey||s.ctrlKey)&&(s.preventDefault(),n(!0),r(a=>a+1))};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n])}const bs=I.Root,ps=I.Trigger,hs=I.Group,dr=I.Portal,vs=I.Sub,js=I.RadioGroup,ve=i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),cr=l.forwardRef(function({className:t,children:r,...o},s){return e.jsxs(I.SubTrigger,{ref:s,className:i(ve,"data-[state=open]:bg-background-muted",t),...o,children:[r,e.jsx(O,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});cr.displayName="ContextMenuSubTrigger";const ur=l.forwardRef(function({className:t,...r},o){return e.jsx(I.SubContent,{ref:o,className:i("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",t),...r})});ur.displayName="ContextMenuSubContent";const fr=l.forwardRef(function({className:t,...r},o){return e.jsx(dr,{children:e.jsx(I.Content,{ref:o,className:i("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})})});fr.displayName="ContextMenuContent";const mr=l.forwardRef(function({className:t,destructive:r,...o},s){return e.jsx(I.Item,{ref:s,className:i(ve,r&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...o})});mr.displayName="ContextMenuItem";const xr=l.forwardRef(function({className:t,children:r,...o},s){return e.jsxs(I.CheckboxItem,{ref:s,className:i(ve,"pl-8",t),...o,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(I.ItemIndicator,{children:e.jsx(H,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});xr.displayName="ContextMenuCheckboxItem";const gr=l.forwardRef(function({className:t,children:r,...o},s){return e.jsxs(I.RadioItem,{ref:s,className:i(ve,"pl-8",t),...o,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(I.ItemIndicator,{children:e.jsx(Ie,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});gr.displayName="ContextMenuRadioItem";const br=l.forwardRef(function({className:t,...r},o){return e.jsx(I.Label,{ref:o,className:i("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});br.displayName="ContextMenuLabel";const pr=l.forwardRef(function({className:t,...r},o){return e.jsx(I.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-border",t),...r})});pr.displayName="ContextMenuSeparator";function hr({className:n,...t}){return e.jsx("span",{className:i("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}hr.displayName="ContextMenuShortcut";const vr=_.Root,jr=_.Trigger,Ns=_.Group,Nr=_.Portal,ws=_.Sub,ys=_.RadioGroup,je=i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-[var(--duration-fast)]"),wr=l.forwardRef(function({className:t,inset:r,children:o,...s},a){return e.jsxs(_.SubTrigger,{ref:a,className:i(je,"data-[state=open]:bg-background-muted",r&&"pl-8",t),...s,children:[o,e.jsx(O,{className:"ml-auto size-4 text-foreground-subtle","aria-hidden":!0})]})});wr.displayName="DropdownMenuSubTrigger";const yr=l.forwardRef(function({className:t,...r},o){return e.jsx(_.SubContent,{ref:o,className:i("z-[var(--z-popover)] min-w-[8rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...r})});yr.displayName="DropdownMenuSubContent";const Le=l.forwardRef(function({className:t,sideOffset:r=4,align:o="end",...s},a){return e.jsx(Nr,{children:e.jsx(_.Content,{ref:a,sideOffset:r,align:o,className:i("z-[var(--z-popover)] min-w-[12rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1",t),...s})})});Le.displayName="DropdownMenuContent";const Cr=l.forwardRef(function({className:t,inset:r,destructive:o,...s},a){return e.jsx(_.Item,{ref:a,className:i(je,r&&"pl-8",o&&"text-danger-text data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger-text",t),...s})});Cr.displayName="DropdownMenuItem";const $e=l.forwardRef(function({className:t,children:r,checked:o,...s},a){return e.jsxs(_.CheckboxItem,{ref:a,checked:o,className:i(je,"pl-8",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(_.ItemIndicator,{children:e.jsx(H,{className:"size-4 text-accent","aria-hidden":!0})})}),r]})});$e.displayName="DropdownMenuCheckboxItem";const kr=l.forwardRef(function({className:t,children:r,...o},s){return e.jsxs(_.RadioItem,{ref:s,className:i(je,"pl-8",t),...o,children:[e.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:e.jsx(_.ItemIndicator,{children:e.jsx(Ie,{className:"size-2 fill-accent text-accent","aria-hidden":!0})})}),r]})});kr.displayName="DropdownMenuRadioItem";const Ae=l.forwardRef(function({className:t,inset:r,...o},s){return e.jsx(_.Label,{ref:s,className:i("px-2 py-1.5 text-xs font-medium text-foreground-subtle",r&&"pl-8",t),...o})});Ae.displayName="DropdownMenuLabel";const Be=l.forwardRef(function({className:t,...r},o){return e.jsx(_.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-border",t),...r})});Be.displayName="DropdownMenuSeparator";function Sr({className:n,...t}){return e.jsx("span",{className:i("ml-auto text-xs tracking-widest text-foreground-subtle font-mono",n),...t})}Sr.displayName="DropdownMenuShortcut";const Cs=F.cva(["inline-flex items-center justify-center shrink-0","rounded-md","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none"],{variants:{variant:{primary:"bg-accent text-on-accent hover:bg-accent-700 active:bg-accent-800",secondary:"bg-background-muted text-foreground border border-border hover:bg-neutral-200 dark:hover:bg-neutral-800",outline:"border border-border bg-transparent text-foreground hover:bg-background-muted",ghost:"bg-transparent text-foreground-muted hover:bg-background-muted hover:text-foreground",destructive:"bg-danger text-on-danger hover:bg-danger-700 active:bg-danger-800"},size:{sm:"h-7 w-7 [&_svg]:size-3.5",md:"h-8 w-8 [&_svg]:size-4",lg:"h-10 w-10 [&_svg]:size-5"}},defaultVariants:{variant:"ghost",size:"md"}}),se=l.forwardRef(function({className:t,variant:r,size:o,icon:s,loading:a,disabled:d,type:u="button",...f},c){const x=d||a;return e.jsx("button",{ref:c,type:u,"aria-busy":a||void 0,disabled:x,className:i(Cs({variant:r,size:o}),t),...f,children:a?e.jsx(be,{className:"animate-spin","aria-hidden":"true"}):s})});se.displayName="IconButton";const ks=F.cva(["group inline-flex items-center w-full","rounded-md border bg-card text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","has-disabled:opacity-50 has-disabled:pointer-events-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-background"],{variants:{size:{sm:"h-8 px-2.5 gap-1.5",md:"h-9 px-3 gap-2",lg:"h-10 px-3.5 gap-2"},tone:{default:"border-border focus-within:border-accent focus-within:ring-ring",error:"border-danger focus-within:border-danger focus-within:ring-danger"}},defaultVariants:{size:"md",tone:"default"}}),Ss=F.cva(["flex-1 min-w-0 bg-transparent outline-none","placeholder:text-foreground-subtle","text-foreground","disabled:cursor-not-allowed"]),Ee=l.forwardRef(function({className:t,type:r="text",size:o,tone:s,label:a,helperText:d,error:u,prefix:f,suffix:c,clearable:x,onClear:g,hideLabel:m,id:b,disabled:p,value:h,...v},S){const R=l.useId(),T=b??R,y=`${T}-helper`,j=`${T}-error`,[w,q]=l.useState(!1),B=r==="password"?w?"text":"password":r,W=!!u,Q=W?"error":s,$=f??(r==="search"?e.jsx(Pe,{className:"size-4 text-foreground-subtle","aria-hidden":!0}):null),E=h!==void 0&&h!==""&&h!==null;return e.jsxs("div",{className:i("flex flex-col gap-1.5",t),children:[a&&e.jsx("label",{htmlFor:T,className:i("text-sm font-medium text-foreground",m&&"sr-only"),children:a}),e.jsxs("div",{className:i(ks({size:o,tone:Q})),children:[$&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:$}),e.jsx("input",{ref:S,id:T,type:B,disabled:p,value:h,"aria-invalid":W||void 0,"aria-describedby":u?j:d?y:void 0,className:i(Ss()),...v}),x&&E&&e.jsx("button",{type:"button",onClick:g,tabIndex:-1,"aria-label":"Clear input",className:"flex items-center text-foreground-subtle hover:text-foreground",children:e.jsx(L,{className:"size-4","aria-hidden":!0})}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>q(U=>!U),tabIndex:-1,"aria-label":w?"Hide password":"Show password","aria-pressed":w,className:"flex items-center text-foreground-subtle hover:text-foreground",children:w?e.jsx(kt,{className:"size-4","aria-hidden":!0}):e.jsx(Ct,{className:"size-4","aria-hidden":!0})}),c&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:c})]}),u?e.jsx("p",{id:j,role:"alert",className:"text-xs text-danger-text",children:u}):d?e.jsx("p",{id:y,className:"text-xs text-foreground-subtle",children:d}):null]})});Ee.displayName="Input";const Oe=l.forwardRef(function({className:t,...r},o){return e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:o,className:i("w-full caption-bottom text-sm border-collapse",t),...r})})});Oe.displayName="Table";const Ge=l.forwardRef(function({className:t,...r},o){return e.jsx("thead",{ref:o,className:i("sticky top-0 z-10 bg-background-subtle text-foreground-muted","[&_tr]:border-b [&_tr]:border-border",t),...r})});Ge.displayName="TableHeader";const He=l.forwardRef(function({className:t,...r},o){return e.jsx("tbody",{ref:o,className:i("[&_tr:last-child]:border-0",t),...r})});He.displayName="TableBody";const Tr=l.forwardRef(function({className:t,...r},o){return e.jsx("tfoot",{ref:o,className:i("border-t border-border bg-background-subtle font-medium",t),...r})});Tr.displayName="TableFooter";const Y=l.forwardRef(function({className:t,selected:r,...o},s){return e.jsx("tr",{ref:s,"data-selected":r||void 0,className:i("border-b border-border transition-colors duration-[var(--duration-fast)]","hover:bg-background-subtle","data-[selected]:bg-accent-soft data-[selected]:hover:bg-accent-soft",t),...o})});Y.displayName="TableRow";const Ne=l.forwardRef(function({className:t,...r},o){return e.jsx("th",{ref:o,className:i("h-10 px-3 text-left align-middle text-xs font-medium uppercase tracking-wide text-foreground-subtle","[&:has([role=checkbox])]:w-10 [&:has([role=checkbox])]:pr-0",t),...r})});Ne.displayName="TableHead";const te=l.forwardRef(function({className:t,...r},o){return e.jsx("td",{ref:o,className:i("px-3 py-3 align-middle text-foreground",t),...r})});te.displayName="TableCell";const Dr=l.forwardRef(function({className:t,...r},o){return e.jsx("caption",{ref:o,className:i("mt-4 text-sm text-foreground-subtle",t),...r})});Dr.displayName="TableCaption";const Ve=l.forwardRef(function({sortKey:t,currentSort:r,onSortChange:o,children:s,className:a,...d},u){const f=(r==null?void 0:r.key)===t,c=f?r==null?void 0:r.direction:void 0,x=()=>{o(t,f&&c==="asc"?"desc":"asc")};return e.jsx(Ne,{ref:u,className:i("p-0",a),"aria-sort":f?c==="asc"?"ascending":"descending":"none",...d,children:e.jsxs("button",{type:"button",onClick:x,className:i("inline-flex h-10 w-full items-center gap-1.5 px-3 outline-none","transition-colors duration-[var(--duration-fast)]","hover:text-foreground focus-visible:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm",f&&"text-foreground"),children:[s,c==="asc"?e.jsx(jt,{className:"size-3.5","aria-hidden":!0}):c==="desc"?e.jsx(vt,{className:"size-3.5","aria-hidden":!0}):e.jsx(Nt,{className:"size-3.5 opacity-40","aria-hidden":!0})]})})});Ve.displayName="TableSortHeader";const We=l.forwardRef(function({className:t,variant:r,...o},s){return e.jsx("div",{ref:s,"aria-hidden":!0,className:i("animate-pulse bg-background-muted",r==="text"&&"h-3 rounded-sm",r==="circle"&&"rounded-full aspect-square",r==="avatar"&&"size-8 rounded-full",r==="card"&&"rounded-lg",!r&&"rounded-md",t),...o})});We.displayName="Skeleton";function Ts({columns:n,rows:t,loading:r,sort:o,onSortChange:s,filter:a,emptyState:d,className:u}){const[f,c]=l.useState({}),x=l.useMemo(()=>n.filter(m=>!f[m.key]),[n,f]),g=()=>r?Array.from({length:5}).map((m,b)=>e.jsx(Y,{children:x.map(p=>e.jsx(te,{children:e.jsx(We,{variant:"text",className:"w-3/4"})},p.key))},`skel-${b}`)):t.length===0?e.jsx(Y,{children:e.jsx(te,{colSpan:x.length,className:"h-32 text-center",children:d??e.jsx("span",{className:"text-foreground-subtle",children:"No results."})})}):t.map(m=>e.jsx(Y,{children:x.map(b=>e.jsx(te,{className:i(b.align==="right"&&"text-right tabular"),children:b.cell?b.cell(m):m[b.key]},b.key))},m.id));return e.jsxs("div",{className:i("flex flex-col gap-3",u),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a?e.jsx(Ee,{type:"search",placeholder:a.placeholder??"Filter…",value:a.value,onChange:m=>a.onChange(m.target.value),clearable:!0,onClear:()=>a.onChange(""),className:"max-w-sm w-full",hideLabel:!0,label:"Filter rows"}):e.jsx("div",{}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(vr,{children:[e.jsx(jr,{asChild:!0,children:e.jsx(se,{"aria-label":"Column visibility",icon:e.jsx(Rt,{}),variant:"outline"})}),e.jsxs(Le,{children:[e.jsx(Ae,{children:"Columns"}),e.jsx(Be,{}),n.map(m=>e.jsx($e,{checked:!f[m.key],onCheckedChange:b=>c(p=>({...p,[m.key]:!b})),children:m.header},m.key))]})]})})]}),e.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:e.jsxs(Oe,{children:[e.jsx("colgroup",{children:x.map(m=>e.jsx("col",{style:m.width?{width:m.width}:void 0},m.key))}),e.jsx(Ge,{children:e.jsx(Y,{children:x.map(m=>m.sortable&&s?e.jsx(Ve,{sortKey:m.key,currentSort:o??null,onSortChange:(b,p)=>s({key:b,direction:p}),children:m.header},m.key):e.jsx(Ne,{className:i(m.align==="right"&&"text-right"),children:m.header},m.key))})}),e.jsx(He,{children:g()})]})})]})}const Ue=D.Root,Ds=D.Value,Ke=l.forwardRef(function({className:t,placeholder:r,size:o="md",tone:s="default",...a},d){return e.jsxs(D.Trigger,{ref:d,className:i("inline-flex w-full items-center justify-between gap-2 rounded-md border bg-card text-sm text-foreground","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed","data-[placeholder]:text-foreground-subtle",o==="sm"&&"h-8 px-2.5",o==="md"&&"h-9 px-3",o==="lg"&&"h-10 px-3.5",s==="default"?"border-border focus-visible:border-accent focus-visible:ring-ring":"border-danger focus-visible:border-danger focus-visible:ring-danger",t),...a,children:[e.jsx(D.Value,{placeholder:r}),e.jsx(D.Icon,{asChild:!0,children:e.jsx(xe,{className:"size-4 text-foreground-subtle shrink-0","aria-hidden":!0})})]})});Ke.displayName="SelectTrigger";const zr="flex h-6 cursor-default items-center justify-center text-foreground-subtle",Xe=l.forwardRef(function({className:t,...r},o){return e.jsx(D.ScrollUpButton,{ref:o,className:i(zr,t),...r,children:e.jsx(yt,{className:"size-4","aria-hidden":!0})})});Xe.displayName="SelectScrollUpButton";const Qe=l.forwardRef(function({className:t,...r},o){return e.jsx(D.ScrollDownButton,{ref:o,className:i(zr,t),...r,children:e.jsx(Z,{className:"size-4","aria-hidden":!0})})});Qe.displayName="SelectScrollDownButton";const we=l.forwardRef(function({className:t,children:r,position:o="popper",...s},a){return e.jsx(D.Portal,{children:e.jsxs(D.Content,{ref:a,position:o,className:i("z-[var(--z-popover)] min-w-[var(--radix-select-trigger-width)] max-h-96","overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground","shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),...s,children:[e.jsx(Xe,{}),e.jsx(D.Viewport,{className:"p-1",children:r}),e.jsx(Qe,{})]})})});we.displayName="SelectContent";const Ye=l.forwardRef(function({className:t,...r},o){return e.jsx(D.Label,{ref:o,className:i("px-2 py-1.5 text-xs font-medium text-foreground-subtle",t),...r})});Ye.displayName="SelectLabel";const ye=l.forwardRef(function({className:t,children:r,leadingIcon:o,...s},a){return e.jsxs(D.Item,{ref:a,className:i("relative flex w-full cursor-default select-none items-center gap-2","rounded-sm px-2 py-1.5 pr-8 text-sm text-foreground outline-none","data-[highlighted]:bg-background-muted data-[highlighted]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[o&&e.jsx("span",{className:"flex items-center text-foreground-subtle [&_svg]:size-4",children:o}),e.jsx(D.ItemText,{children:r}),e.jsx("span",{className:"absolute right-2 flex items-center justify-center",children:e.jsx(D.ItemIndicator,{children:e.jsx(H,{className:"size-4 text-accent","aria-hidden":!0})})})]})});ye.displayName="SelectItem";const Rr=l.forwardRef(function({className:t,...r},o){return e.jsx(D.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-border",t),...r})});Rr.displayName="SelectSeparator";const Mr=l.forwardRef(function({label:t,children:r,...o},s){return e.jsxs(D.Group,{ref:s,...o,children:[t&&e.jsx(Ye,{children:t}),r]})});Mr.displayName="SelectGroup";function zs({options:n=[],value:t,onChange:r,disabled:o,"aria-label":s}){const a=n.find(d=>d.value===Number(t));return e.jsxs(Ue,{value:t===void 0?void 0:String(t),onValueChange:d=>{r==null||r({target:{value:d}})},disabled:o,children:[e.jsxs(D.Trigger,{"aria-label":s,className:i("inline-flex h-7 items-center gap-1 rounded-md border border-border bg-card px-2 text-sm font-medium text-foreground","outline-none hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50"),children:[e.jsx(D.Value,{children:a==null?void 0:a.label}),e.jsx(D.Icon,{asChild:!0,children:e.jsx(Z,{className:"size-3.5 opacity-60","aria-hidden":!0})})]}),e.jsx(we,{className:"max-h-64",children:n.map(d=>e.jsx(ye,{value:String(d.value),disabled:d.disabled,children:d.label},d.value))})]})}const Ze=l.forwardRef(function({className:t,classNames:r,captionLayout:o="dropdown",startMonth:s,endMonth:a,...d},u){const{start:f,end:c}=l.useMemo(()=>{const x=new Date;return{start:s??new Date(x.getFullYear()-100,0,1),end:a??new Date(x.getFullYear()+10,11,31)}},[s,a]);return e.jsx(qn.DayPicker,{showOutsideDays:!0,captionLayout:o,startMonth:f,endMonth:c,className:i("inline-block rounded-lg border border-border bg-card p-3",t),classNames:{root:"rdp",months:"relative flex flex-col gap-4 sm:flex-row sm:gap-6",month:"flex flex-col gap-3",month_caption:"relative flex h-8 items-center justify-center px-8",dropdowns:"flex items-center justify-center gap-2",caption_label:"flex items-center gap-1 text-sm font-medium",nav:"pointer-events-none absolute inset-x-0 top-0 z-10 flex h-8 items-center justify-between",button_previous:"pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none disabled:opacity-40 disabled:pointer-events-none",button_next:"pointer-events-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-foreground-muted hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none disabled:opacity-40 disabled:pointer-events-none",month_grid:"w-full border-collapse",weekdays:"grid grid-cols-7",weekday:"h-8 w-9 text-center text-[11px] font-medium uppercase tracking-wide text-foreground-subtle",week:"mt-0.5 grid grid-cols-7",day:"relative h-9 w-9 p-0 text-center",day_button:"inline-flex h-9 w-9 items-center justify-center rounded-md text-sm hover:bg-background-muted focus-visible:ring-2 focus-visible:ring-ring outline-none aria-selected:bg-accent aria-selected:text-on-accent aria-selected:hover:bg-accent-700",today:"[&_button]:border [&_button]:border-border",outside:"text-foreground-subtle",disabled:"opacity-40 pointer-events-none",range_start:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-r-none",range_end:"[&_button]:bg-accent [&_button]:text-on-accent [&_button]:rounded-l-none",range_middle:"[&_button]:bg-accent-soft [&_button]:text-foreground [&_button]:rounded-none",hidden:"invisible",...r},components:{Dropdown:zs,Chevron:({orientation:x})=>x==="left"?e.jsx(me,{className:"size-4"}):x==="right"?e.jsx(O,{className:"size-4"}):e.jsx(Z,{className:"size-3.5 opacity-60"})},...d})});function ce(n){return n?n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""}function Ir({label:n,placeholder:t,hasValue:r,children:o,error:s,fieldId:a,disabled:d}){return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&e.jsx("label",{htmlFor:a,className:"text-sm font-medium text-foreground",children:n}),e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("button",{id:a,type:"button",disabled:d,"aria-invalid":!!s||void 0,className:i("inline-flex h-9 w-full items-center justify-start gap-2 rounded-md border bg-card px-3 text-left text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",s?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",!r&&"text-foreground-subtle"),children:[e.jsx(wt,{className:"size-4 text-foreground-subtle","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:r?o:t})]})}),s&&e.jsx("p",{role:"alert",className:"text-xs text-danger-text",children:s})]})}const _r=l.forwardRef(function({value:t,onChange:r,label:o,placeholder:s="Pick a date",error:a,disabled:d,fromDate:u,toDate:f,className:c},x){const g=l.useId(),[m,b]=l.useState(!1);return e.jsx("div",{ref:x,className:i(c),children:e.jsxs(k.Root,{open:m,onOpenChange:b,children:[e.jsx(Ir,{label:o,placeholder:s,hasValue:!!t,error:a,fieldId:g,disabled:d,children:ce(t)}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg text-popover-foreground shadow-lg",children:e.jsx(Ze,{mode:"single",selected:t,onSelect:p=>{r(p??void 0),p&&b(!1)},startMonth:u,endMonth:f})})})]})})});_r.displayName="DatePicker";const Pr=l.forwardRef(function({value:t,onChange:r,label:o,placeholder:s="Pick a range",error:a,disabled:d,fromDate:u,toDate:f,className:c},x){const g=l.useId(),[m,b]=l.useState(!1),p=!!(t!=null&&t.from);return e.jsx("div",{ref:x,className:i(c),children:e.jsxs(k.Root,{open:m,onOpenChange:b,children:[e.jsx(Ir,{label:o,placeholder:s,hasValue:p,error:a,fieldId:g,disabled:d,children:t!=null&&t.from&&t.to?`${ce(t.from)} – ${ce(t.to)}`:t!=null&&t.from?ce(t.from):""}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:"z-[var(--z-popover)] rounded-lg text-popover-foreground shadow-lg",children:e.jsx(Ze,{mode:"range",selected:t,onSelect:r,numberOfMonths:2,startMonth:u,endMonth:f})})})]})})});Pr.displayName="DateRangePicker";function Rs({tokens:n,className:t,children:r,style:o,...s}){const a={...o};if(n)for(const[d,u]of Object.entries(n)){const f=d.startsWith("--")?d:`--${d}`;a[f]=u}return e.jsx("div",{"data-brand-scope":!0,className:i("contents",t),style:a,...s,children:r})}const Ms={default:{},blue:{accent:"oklch(0.55 0.16 250)","color-accent-700":"oklch(0.47 0.16 250)","color-accent-800":"oklch(0.39 0.14 250)","accent-subtle":"oklch(0.95 0.04 250)","accent-subtle-foreground":"oklch(0.45 0.15 250)",ring:"oklch(0.62 0.16 250)"},violet:{accent:"oklch(0.53 0.20 295)","color-accent-700":"oklch(0.45 0.18 295)","color-accent-800":"oklch(0.38 0.16 295)","accent-subtle":"oklch(0.95 0.04 295)","accent-subtle-foreground":"oklch(0.45 0.18 295)",ring:"oklch(0.60 0.20 295)"},emerald:{accent:"oklch(0.55 0.13 160)","color-accent-700":"oklch(0.47 0.13 160)","color-accent-800":"oklch(0.39 0.12 160)","accent-subtle":"oklch(0.95 0.04 160)","accent-subtle-foreground":"oklch(0.42 0.12 160)",ring:"oklch(0.60 0.13 160)"},rose:{accent:"oklch(0.57 0.19 12)","color-accent-700":"oklch(0.49 0.18 12)","color-accent-800":"oklch(0.41 0.16 12)","accent-subtle":"oklch(0.95 0.035 12)","accent-subtle-foreground":"oklch(0.48 0.18 12)",ring:"oklch(0.62 0.19 12)"},amber:{accent:"oklch(0.62 0.14 65)","color-accent-700":"oklch(0.54 0.13 65)","color-accent-800":"oklch(0.46 0.12 65)","accent-subtle":"oklch(0.95 0.05 75)","accent-subtle-foreground":"oklch(0.48 0.12 65)",ring:"oklch(0.66 0.14 65)"}},Fr=C.Root,Is=C.Trigger,qr=C.Portal,Lr=C.Close,Je=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Overlay,{ref:o,className:i("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r})});Je.displayName="DialogOverlay";const et=l.forwardRef(function({className:t,children:r,showClose:o=!0,size:s="md",...a},d){return e.jsxs(qr,{children:[e.jsx(Je,{}),e.jsxs(C.Content,{ref:d,className:i("fixed left-1/2 top-1/2 z-[var(--z-modal)] -translate-x-1/2 -translate-y-1/2","w-[calc(100%-2rem)] rounded-lg border border-border bg-card text-card-foreground shadow-lg","p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",s==="sm"&&"max-w-[400px]",s==="md"&&"max-w-[520px]",s==="lg"&&"max-w-[720px]",t),...a,children:[r,o&&e.jsx(C.Close,{"aria-label":"Close",className:i("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(L,{className:"size-4","aria-hidden":!0})})]})]})});et.displayName="DialogContent";function tt({className:n,...t}){return e.jsx("div",{className:i("flex flex-col gap-1 pb-4",n),...t})}tt.displayName="DialogHeader";function rt({className:n,...t}){return e.jsx("div",{className:i("flex flex-col-reverse gap-2 pt-6 sm:flex-row sm:justify-end",n),...t})}rt.displayName="DialogFooter";const ot=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Title,{ref:o,className:i("text-lg font-semibold text-foreground leading-tight",t),...r})});ot.displayName="DialogTitle";const nt=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Description,{ref:o,className:i("text-sm text-foreground-muted",t),...r})});nt.displayName="DialogDescription";function $r({open:n,onOpenChange:t,title:r,description:o,confirmLabel:s="Confirm",cancelLabel:a="Cancel",confirmVariant:d="primary",onConfirm:u,loading:f}){return e.jsx(Fr,{open:n,onOpenChange:t,children:e.jsxs(et,{size:"sm",children:[e.jsxs(tt,{children:[e.jsx(ot,{children:r}),o&&e.jsx(nt,{children:o})]}),e.jsxs(rt,{children:[e.jsx(Lr,{asChild:!0,children:e.jsx(ne,{variant:"outline",children:a})}),e.jsx(ne,{variant:d,loading:f,onClick:u,children:s})]})]})})}$r.displayName="ConfirmationDialog";const Ar=l.forwardRef(function({icon:t,illustration:r,title:o,description:s,action:a,secondaryAction:d,className:u,...f},c){return e.jsxs("div",{ref:c,className:i("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-background-subtle p-10 text-center",u),...f,children:[r||(t?e.jsx("div",{className:"inline-flex size-12 items-center justify-center rounded-full bg-background-muted text-foreground-muted [&_svg]:size-6",children:t}):e.jsx(qt,{className:"size-24"})),e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:o}),s&&e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:s}),(a||d)&&e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[a,d]})]})});Ar.displayName="EmptyState";const _s={404:{illustration:e.jsx(Lt,{className:"size-32"}),title:"Page not found",description:"We couldn't find what you were looking for."},500:{illustration:e.jsx($t,{className:"size-32"}),title:"Something went wrong",description:"We're looking into it. Please try again in a moment."},generic:{illustration:e.jsx(At,{className:"size-32"}),title:"Unexpected error",description:"Something interrupted this action."}},Br=l.forwardRef(function({variant:t="generic",title:r,description:o,illustration:s,action:a,onRetry:d,className:u,...f},c){const x=_s[t];return e.jsxs("div",{ref:c,role:"alert",className:i("flex flex-col items-center justify-center gap-3 rounded-lg border border-border bg-background-subtle p-10 text-center",u),...f,children:[s??x.illustration,e.jsx("h3",{className:"text-base font-semibold text-foreground leading-tight",children:r??x.title}),e.jsx("p",{className:"max-w-md text-sm text-foreground-muted leading-relaxed",children:o??x.description}),(a||d)&&e.jsx("div",{className:"mt-2 flex items-center gap-2",children:a??e.jsx(ne,{onClick:d,variant:"outline",children:"Try again"})})]})});Br.displayName="ErrorState";const Ps=Fe.FormProvider,Er=l.createContext(null);function Fs(n){return e.jsx(Er.Provider,{value:{name:n.name},children:e.jsx(Fe.Controller,{...n})})}const Or=l.createContext(null);function ae(){const n=l.useContext(Er),t=l.useContext(Or),{getFieldState:r,formState:o}=Fe.useFormContext();if(!n)throw new Error("useFormField must be used inside <FormField>");const s=r(n.name,o),a=(t==null?void 0:t.id)??"";return{id:a,name:n.name,formItemId:`${a}-item`,formDescriptionId:`${a}-desc`,formMessageId:`${a}-error`,...s}}const Gr=l.forwardRef(function({className:t,...r},o){const s=l.useId();return e.jsx(Or.Provider,{value:{id:s},children:e.jsx("div",{ref:o,className:i("flex flex-col gap-1.5",t),...r})})});Gr.displayName="FormItem";const Hr=l.forwardRef(function({className:t,...r},o){const{formItemId:s,error:a}=ae();return e.jsx(Xn.Root,{ref:o,htmlFor:s,className:i("text-sm font-medium text-foreground",a&&"text-danger-text",t),...r})});Hr.displayName="FormLabel";const Vr=l.forwardRef(function(t,r){const{error:o,formItemId:s,formDescriptionId:a,formMessageId:d}=ae();return e.jsx(It.Slot,{ref:r,id:s,"aria-describedby":o?`${a} ${d}`:a,"aria-invalid":!!o,...t})});Vr.displayName="FormControl";const Wr=l.forwardRef(function({className:t,...r},o){const{formDescriptionId:s}=ae();return e.jsx("p",{ref:o,id:s,className:i("text-xs text-foreground-subtle",t),...r})});Wr.displayName="FormDescription";const Ur=l.forwardRef(function({className:t,children:r,...o},s){const{error:a,formMessageId:d}=ae(),u=a?String((a==null?void 0:a.message)??""):r;return u?e.jsx("p",{ref:s,id:d,role:"alert",className:i("text-xs text-danger-text",t),...o,children:u}):null});Ur.displayName="FormError";const qs=Object.keys(_t),pt=new Map;function Ls(n){const t=pt.get(n);if(t)return t;const r=l.lazy(_t[n]);return pt.set(n,r),r}function $s({name:n,fallback:t,...r}){const o=l.useMemo(()=>Ls(n),[n]),s=t??e.jsx("span",{"aria-hidden":!0,style:{display:"inline-block",width:r.size??"1em",height:r.size??"1em"}});return e.jsx(l.Suspense,{fallback:s,children:e.jsx(o,{...r})})}const Kr=l.forwardRef(function({size:t="sm",className:r,...o},s){return e.jsx("kbd",{ref:s,className:i("inline-flex items-center justify-center rounded border border-border bg-background-subtle font-mono","text-foreground-muted shadow-xs",t==="sm"?"h-5 min-w-5 px-1 text-[10px]":"h-6 min-w-6 px-1.5 text-xs",r),...o})});Kr.displayName="Kbd";const Xr=l.forwardRef(function({options:t,value:r,onChange:o,label:s,helperText:a,error:d,placeholder:u="Select…",emptyText:f="No results.",maxVisibleChips:c=3,clearable:x=!0,disabled:g,className:m},b){const p=l.useId(),h=p,v=`${p}-helper`,S=`${p}-error`,[R,T]=l.useState(!1),[y,j]=l.useState(""),w=l.useRef(null),q=l.useMemo(()=>t.filter(N=>r.includes(N.value)),[t,r]),B=l.useCallback(N=>{r.includes(N)?o(r.filter(G=>G!==N)):o([...r,N])},[r,o]),W=l.useCallback(()=>o([]),[o]),Q=N=>{N.key==="Backspace"&&y===""&&r.length>0&&o(r.slice(0,-1))},$=q.slice(0,c),E=q.length-$.length,U=!!d;return e.jsxs("div",{ref:b,className:i("flex flex-col gap-1.5",m),children:[s&&e.jsx("label",{htmlFor:h,className:"text-sm font-medium text-foreground",children:s}),e.jsxs(k.Root,{open:R,onOpenChange:T,children:[e.jsx(k.Trigger,{asChild:!0,children:e.jsxs("div",{role:"combobox","aria-expanded":R,"aria-controls":`${h}-list`,"aria-haspopup":"listbox",id:h,tabIndex:g?-1:0,onKeyDown:Q,"aria-disabled":g||void 0,"aria-invalid":U||void 0,"aria-describedby":U?S:a?v:void 0,className:i("flex h-9 w-full cursor-text items-center gap-1.5 overflow-hidden rounded-md border bg-card px-2 py-1 text-sm","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background",U?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent focus-visible:ring-ring",g&&"opacity-50 pointer-events-none"),onClick:()=>{var N;return(N=w.current)==null?void 0:N.focus()},children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden",children:[$.length===0&&e.jsx("span",{className:"truncate px-1 text-foreground-subtle",children:u}),$.map(N=>e.jsxs("span",{className:"inline-flex max-w-[10rem] shrink-0 items-center gap-1 rounded-md bg-accent-soft px-1.5 py-0.5 text-xs font-medium text-on-accent-soft",children:[e.jsx("span",{className:"truncate",children:N.label}),e.jsx("button",{type:"button","aria-label":`Remove ${N.label}`,className:"inline-flex items-center text-on-accent-soft hover:text-foreground",onClick:G=>{G.stopPropagation(),B(N.value)},children:e.jsx(L,{className:"size-3","aria-hidden":!0})})]},N.value)),E>0&&e.jsxs("span",{className:"shrink-0 rounded-md bg-background-muted px-1.5 py-0.5 text-xs font-medium text-foreground-muted",children:["+",E]}),e.jsx("input",{ref:w,value:y,onChange:N=>j(N.target.value),onFocus:()=>T(!0),className:"min-w-[6ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle",disabled:g})]}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1 pl-1",children:[x&&q.length>0&&e.jsx("button",{type:"button","aria-label":"Clear all",onClick:N=>{N.stopPropagation(),W()},className:"text-foreground-subtle hover:text-foreground",children:e.jsx(L,{className:"size-4","aria-hidden":!0})}),e.jsx(xe,{className:"size-4 text-foreground-subtle","aria-hidden":!0})]})]})}),e.jsx(k.Portal,{children:e.jsx(k.Content,{align:"start",sideOffset:4,className:i("z-[var(--z-popover)] w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),onOpenAutoFocus:N=>N.preventDefault(),children:e.jsx(M.Command,{shouldFilter:!1,className:"flex h-full w-full flex-col",children:e.jsxs(M.Command.List,{id:`${h}-list`,className:"max-h-64 overflow-y-auto p-1",children:[t.filter(N=>N.label.toLowerCase().includes(y.toLowerCase())).map(N=>{const G=r.includes(N.value);return e.jsxs(M.Command.Item,{value:N.value,disabled:N.disabled,onSelect:()=>B(N.value),className:i("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground","data-[selected=true]:bg-background-muted","data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none"),children:[e.jsx("span",{"aria-hidden":!0,className:i("flex size-4 items-center justify-center rounded-sm border",G?"border-accent bg-accent text-on-accent":"border-border"),children:G&&e.jsx(H,{className:"size-3","aria-hidden":!0})}),e.jsx("span",{className:"flex-1",children:N.label}),N.description&&e.jsx("span",{className:"text-xs text-foreground-subtle",children:N.description})]},N.value)}),e.jsx(M.Command.Empty,{className:"px-2 py-6 text-center text-sm text-foreground-subtle",children:f})]})})})})]}),d?e.jsx("p",{id:S,role:"alert",className:"text-xs text-danger-text",children:d}):a?e.jsx("p",{id:v,className:"text-xs text-foreground-subtle",children:a}):null]})});Xr.displayName="MultiSelect";function As(n,t,r=7){if(t<=r)return Array.from({length:t},(u,f)=>f+1);const o=1,s=[],a=Math.max(2,n-o),d=Math.min(t-1,n+o);s.push(1),a>2&&s.push("gap");for(let u=a;u<=d;u++)s.push(u);return d<t-1&&s.push("gap"),s.push(t),s}const Qr=l.forwardRef(function({page:t,pageCount:r,onPageChange:o,totalItems:s,pageSize:a,pageSizeOptions:d,onPageSizeChange:u,showJump:f=!0,className:c,...x},g){const m=l.useMemo(()=>As(t,r),[t,r]),b=a?(t-1)*a+1:void 0,p=a&&s?Math.min(t*a,s):void 0,h=v=>{v<1||v>r||v===t||o(v)};return e.jsxs("nav",{ref:g,"aria-label":"Pagination",className:i("flex flex-wrap items-center justify-between gap-3",c),...x,children:[e.jsxs("div",{className:"flex items-center gap-3 text-sm text-foreground-muted",children:[s!==void 0&&a!==void 0&&e.jsxs("span",{className:"tabular",children:["Showing ",b,"–",p," of ",s]}),d&&u&&a!==void 0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"page-size",className:"sr-only",children:"Rows per page"}),e.jsxs(Ue,{value:String(a),onValueChange:v=>u(Number(v)),children:[e.jsx(Ke,{size:"sm",className:"w-[7.5rem] whitespace-nowrap"}),e.jsx(we,{children:d.map(v=>e.jsxs(ye,{value:String(v),children:[v," / page"]},v))})]})]})]}),e.jsxs("ul",{className:"flex items-center gap-1",children:[f&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to first page",disabled:t===1,onClick:()=>h(1),className:de,children:e.jsx(Re,{className:"size-4","aria-hidden":!0})})}),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:t===1,onClick:()=>h(t-1),className:de,children:e.jsx(me,{className:"size-4","aria-hidden":!0})})}),m.map((v,S)=>v==="gap"?e.jsx("li",{className:"px-2 text-foreground-subtle",children:"…"},`gap-${S}`):e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":`Page ${v}`,"aria-current":v===t?"page":void 0,onClick:()=>h(v),className:i("inline-flex size-8 items-center justify-center rounded-md text-sm tabular outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",v===t?"bg-accent text-on-accent font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground"),children:v})},v)),e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:t===r,onClick:()=>h(t+1),className:de,children:e.jsx(O,{className:"size-4","aria-hidden":!0})})}),f&&e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":"Go to last page",disabled:t===r,onClick:()=>h(r),className:de,children:e.jsx(Me,{className:"size-4","aria-hidden":!0})})})]})]})});Qr.displayName="Pagination";const de=i("inline-flex size-8 items-center justify-center rounded-md text-foreground-muted","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","disabled:opacity-50 disabled:pointer-events-none","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),Bs=k.Root,Es=k.Trigger,Os=k.Anchor,Gs=k.Close,Yr=l.forwardRef(function({className:t,align:r="center",sideOffset:o=4,...s},a){return e.jsx(k.Portal,{children:e.jsx(k.Content,{ref:a,align:r,sideOffset:o,className:i("z-[var(--z-popover)] w-72 rounded-lg border border-border bg-popover p-4 text-popover-foreground shadow-md","outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",t),...s})})});Yr.displayName="PopoverContent";const Hs={sm:"h-1",md:"h-1.5",lg:"h-2"},Vs={accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger"},Zr=l.forwardRef(function({className:t,value:r,size:o="md",tone:s="accent",...a},d){const u=r==null;return e.jsxs(xt.Root,{ref:d,value:u?void 0:r,className:i("relative w-full overflow-hidden rounded-full bg-background-muted",Hs[o],t),...a,children:[e.jsx(xt.Indicator,{className:i("h-full w-full flex-1 transition-transform",Vs[s],u&&"animate-[progressIndeterminate_1.4s_ease-in-out_infinite] origin-left"),style:u?void 0:{transform:`translateX(-${100-(r??0)}%)`}}),e.jsx("style",{children:`
|
|
2
|
-
@keyframes progressIndeterminate {
|
|
3
|
-
0% { transform: translateX(-100%) scaleX(0.6); }
|
|
4
|
-
50% { transform: translateX(0%) scaleX(0.4); }
|
|
5
|
-
100% { transform: translateX(100%) scaleX(0.6); }
|
|
6
|
-
}
|
|
7
|
-
`})]})});Zr.displayName="Progress";const Ws={accent:"stroke-accent",success:"stroke-success",warning:"stroke-warning",danger:"stroke-danger"},Jr=l.forwardRef(function({value:t,size:r=36,thickness:o=3,className:s,tone:a="accent",...d},u){const f=t===void 0,c=(r-o)/2,x=2*Math.PI*c,g=f?0:x-Math.min(100,Math.max(0,t))/100*x;return e.jsxs("svg",{ref:u,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f?void 0:t,className:i("shrink-0",f&&"animate-spin",s),...d,children:[e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:o,className:"stroke-background-muted fill-none"}),e.jsx("circle",{cx:r/2,cy:r/2,r:c,strokeWidth:o,strokeLinecap:"round",strokeDasharray:x,strokeDashoffset:f?x*.7:g,className:i(Ws[a],"fill-none transition-[stroke-dashoffset]"),transform:`rotate(-90 ${r/2} ${r/2})`})]})});Jr.displayName="ProgressCircle";const eo=l.forwardRef(function({className:t,orientation:r="vertical",...o},s){return e.jsx(ze.Root,{ref:s,className:i("flex gap-3",r==="vertical"?"flex-col":"flex-row flex-wrap",t),...o})});eo.displayName="RadioGroup";const to=l.forwardRef(function({className:t,label:r,description:o,hideLabel:s,id:a,disabled:d,...u},f){const c=l.useId(),x=a??c,g=o?`${x}-desc`:void 0;return e.jsxs("div",{className:i("flex items-start gap-2.5",t),children:[e.jsx(ze.Item,{ref:f,id:x,disabled:d,"aria-describedby":g,className:i("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border bg-card","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-accent","disabled:cursor-not-allowed disabled:opacity-50","border-border-strong"),...u,children:e.jsx(ze.Indicator,{className:"flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})})}),r&&e.jsxs("div",{className:i("flex flex-col gap-0.5",s&&"sr-only"),children:[e.jsx("label",{htmlFor:x,className:i("text-sm text-foreground select-none",d&&"opacity-50 cursor-not-allowed"),children:r}),o&&e.jsx("p",{id:g,className:"text-xs text-foreground-subtle",children:o})]})]})});to.displayName="RadioItem";const ro=l.forwardRef(function({className:t,children:r,...o},s){return e.jsxs(ee.Root,{ref:s,className:i("relative overflow-hidden",t),...o,children:[e.jsx(ee.Viewport,{className:"h-full w-full rounded-[inherit]",children:r}),e.jsx(st,{}),e.jsx(ee.Corner,{})]})});ro.displayName="ScrollArea";const st=l.forwardRef(function({className:t,orientation:r="vertical",...o},s){return e.jsx(ee.ScrollAreaScrollbar,{ref:s,orientation:r,className:i("flex touch-none select-none transition-colors duration-[var(--duration-fast)]",r==="vertical"&&"h-full w-2 border-l border-l-transparent p-px",r==="horizontal"&&"h-2 flex-col border-t border-t-transparent p-px",t),...o,children:e.jsx(ee.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border-strong"})})});st.displayName="ScrollBar";const oo=l.forwardRef(function({className:t,orientation:r="horizontal",decorative:o=!0,...s},a){return e.jsx(Qn.Root,{ref:a,orientation:r,decorative:o,className:i("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...s})});oo.displayName="Separator";const Us=C.Root,Ks=C.Trigger,Xs=C.Close,no=C.Portal,so=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Overlay,{ref:o,className:i("fixed inset-0 z-[var(--z-overlay)] bg-neutral-950/60 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",t),...r})});so.displayName="SheetOverlay";const Qs=F.cva(["fixed z-[var(--z-modal)] bg-card text-card-foreground shadow-lg","flex flex-col gap-4 p-6","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:duration-[var(--duration-base)] data-[state=open]:duration-[var(--duration-slow)]"],{variants:{side:{top:"inset-x-0 top-0 border-b border-border data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top",bottom:"inset-x-0 bottom-0 border-t border-border data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom",left:"inset-y-0 left-0 h-full w-3/4 max-w-md border-r border-border data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-md border-l border-border data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right"}},defaultVariants:{side:"right"}}),ao=l.forwardRef(function({className:t,children:r,side:o="right",showClose:s=!0,...a},d){return e.jsxs(no,{children:[e.jsx(so,{}),e.jsxs(C.Content,{ref:d,className:i(Qs({side:o}),t),...a,children:[r,s&&e.jsx(C.Close,{"aria-label":"Close",className:i("absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-foreground-subtle","hover:bg-background-muted hover:text-foreground","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","transition-colors duration-[var(--duration-fast)]"),children:e.jsx(L,{className:"size-4","aria-hidden":!0})})]})]})});ao.displayName="SheetContent";function io({className:n,...t}){return e.jsx("div",{className:i("flex flex-col gap-1",n),...t})}io.displayName="SheetHeader";function lo({className:n,...t}){return e.jsx("div",{className:i("mt-auto flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end",n),...t})}lo.displayName="SheetFooter";const co=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Title,{ref:o,className:i("text-lg font-semibold text-foreground leading-tight",t),...r})});co.displayName="SheetTitle";const uo=l.forwardRef(function({className:t,...r},o){return e.jsx(C.Description,{ref:o,className:i("text-sm text-foreground-muted",t),...r})});uo.displayName="SheetDescription";const ie=l.createContext({collapsed:!1});function Ys(){return l.useContext(ie)}const fo=l.forwardRef(function({defaultCollapsed:t=!1,collapsed:r,onCollapsedChange:o,header:s,footer:a,className:d,children:u,...f},c){const[x,g]=l.useState(t),m=r??x,b=p=>{r===void 0&&g(p),o==null||o(p)};return e.jsx(ie.Provider,{value:{collapsed:m},children:e.jsxs("aside",{ref:c,"aria-label":"Primary",className:i("sticky top-0 hidden md:flex h-screen shrink-0 flex-col gap-2 border-r border-border bg-background-subtle","transition-[width] duration-[var(--duration-base)] ease-[var(--ease-out)]",m?"w-14":"w-60",d),...f,children:[s&&e.jsx("div",{className:i("flex h-14 shrink-0 items-center overflow-hidden border-b border-border",m?"justify-center px-2":"px-3"),children:s}),e.jsx("div",{className:"flex-1 overflow-y-auto py-3",children:u}),a&&e.jsx("div",{className:"border-t border-border p-2",children:a}),e.jsxs("button",{type:"button",onClick:()=>b(!m),"aria-label":m?"Expand sidebar":"Collapse sidebar","aria-expanded":!m,className:i("flex h-8 items-center gap-2 mx-2 mb-2 rounded-md px-2 text-foreground-subtle","hover:bg-background-muted hover:text-foreground outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-colors duration-[var(--duration-fast)]"),children:[m?e.jsx(Me,{className:"size-4","aria-hidden":!0}):e.jsx(Re,{className:"size-4","aria-hidden":!0}),!m&&e.jsx("span",{className:"text-xs font-medium",children:"Collapse"})]})]})})});fo.displayName="Sidebar";function mo({label:n,className:t,children:r,...o}){const{collapsed:s}=l.useContext(ie);return e.jsxs("div",{className:i("mb-3",t),...o,children:[n&&!s&&e.jsx("div",{className:"px-4 pb-1 pt-2 text-xs font-medium text-foreground-subtle uppercase tracking-wide",children:n}),e.jsx("ul",{className:"flex flex-col gap-px",children:r})]})}mo.displayName="SidebarSection";function xo({icon:n,active:t,href:r,trailing:o,sub:s,className:a,children:d,...u}){const{collapsed:f}=l.useContext(ie),c=r?"a":"button";return e.jsx("li",{className:"px-2",children:e.jsxs(c,{href:r,"aria-current":t?"page":void 0,className:i("flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm outline-none","transition-colors duration-[var(--duration-fast)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-background-muted text-foreground font-medium":"text-foreground-muted hover:bg-background-muted hover:text-foreground",s&&!f&&"ml-6",f&&"justify-center",a),...u,children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),!f&&e.jsx("span",{className:"flex-1 truncate text-left",children:d}),!f&&o&&e.jsx("span",{className:"ml-auto",children:o})]})})}xo.displayName="SidebarItem";function go({icon:n,label:t,defaultOpen:r=!0,children:o}){const{collapsed:s}=l.useContext(ie),[a,d]=l.useState(r);return s?e.jsx(e.Fragment,{children:o}):e.jsxs("li",{children:[e.jsxs("button",{type:"button",onClick:()=>d(u=>!u),"aria-expanded":a,className:i("mx-2 flex h-8 w-[calc(100%-1rem)] items-center gap-2 rounded-md px-2 text-sm text-foreground-muted outline-none","transition-colors duration-[var(--duration-fast)]","hover:bg-background-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[n&&e.jsx("span",{className:"flex shrink-0 items-center [&_svg]:size-4",children:n}),e.jsx("span",{className:"flex-1 text-left",children:t}),e.jsx(Z,{className:i("size-3.5 transition-transform",a&&"rotate-180"),"aria-hidden":!0})]}),a&&e.jsx("ul",{className:"flex flex-col gap-px",children:o})]})}go.displayName="SidebarGroup";const bo=l.forwardRef(function({className:t,label:r,showValue:o,formatValue:s=c=>String(c),value:a,defaultValue:d,...u},f){const c=a??d??[0],x=c.length>1;return e.jsxs("div",{className:i("flex flex-col gap-2",t),children:[(r||o)&&e.jsxs("div",{className:"flex items-center justify-between",children:[r&&e.jsx("span",{className:"text-sm font-medium text-foreground",children:r}),o&&e.jsx("span",{className:"text-xs tabular text-foreground-muted font-mono",children:x?`${s(c[0])} – ${s(c[1])}`:s(c[0])})]}),e.jsxs(le.Root,{ref:f,value:a,defaultValue:d,className:"relative flex w-full touch-none select-none items-center",...u,children:[e.jsx(le.Track,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-background-muted",children:e.jsx(le.Range,{className:"absolute h-full bg-accent"})}),c.map((g,m)=>e.jsx(le.Thumb,{className:i("block size-4 rounded-full border-2 border-accent bg-card shadow-sm","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","transition-transform duration-[var(--duration-fast)] ease-[var(--ease-out)]","hover:scale-110 disabled:pointer-events-none disabled:opacity-50"),"aria-label":x?m===0?"Minimum":"Maximum":r?String(r):"Value"},m))]})]})});bo.displayName="Slider";const Zs={sm:"size-3.5",md:"size-4",lg:"size-6"},Js={accent:"text-accent",neutral:"text-foreground-subtle","on-accent":"text-on-accent"},po=l.forwardRef(function({className:t,tone:r="accent",size:o="md",label:s,decorative:a,...d},u){return e.jsxs("svg",{ref:u,viewBox:"0 0 24 24",role:a?void 0:"status","aria-label":a?void 0:s??"Loading","aria-hidden":a||void 0,className:i("animate-spin",Zs[o],Js[r],t),...d,children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeOpacity:.2,fill:"none"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"})]})});po.displayName="Spinner";const ho=l.forwardRef(function({steps:t,current:r,orientation:o="horizontal",className:s,...a},d){return e.jsx("ol",{ref:d,"aria-label":"Progress",className:i(o==="horizontal"?"flex w-full items-center":"flex flex-col gap-6",s),...a,children:t.map((u,f)=>{const c=f<r?"complete":f===r?"current":"upcoming",x=f===t.length-1;return e.jsxs("li",{"aria-current":c==="current"?"step":void 0,className:i(o==="horizontal"?"flex flex-1 items-center gap-3 last:flex-initial":"flex items-start gap-3"),children:[e.jsxs("div",{className:i(o==="horizontal"?"flex items-center gap-3":"flex flex-col items-center"),children:[e.jsx("span",{"aria-hidden":!0,className:i("inline-flex size-7 items-center justify-center rounded-full text-xs font-semibold transition-colors",c==="complete"&&"bg-accent text-on-accent",c==="current"&&"bg-card border-2 border-accent text-accent",c==="upcoming"&&"bg-background-muted text-foreground-subtle border border-border"),children:c==="complete"?e.jsx(H,{className:"size-4"}):f+1}),o==="vertical"&&!x&&e.jsx("span",{className:i("mt-1 w-px flex-1 min-h-6",f<r?"bg-accent":"bg-border")})]}),e.jsxs("div",{className:i("flex flex-col",o==="horizontal"&&"min-w-0"),children:[e.jsx("span",{className:i("text-sm font-medium",c==="upcoming"?"text-foreground-subtle":"text-foreground"),children:u.title}),o==="vertical"&&u.description&&e.jsx("p",{className:"text-xs text-foreground-muted mt-0.5",children:u.description})]}),o==="horizontal"&&!x&&e.jsx("span",{"aria-hidden":!0,className:i("h-px flex-1 mx-2",f<r?"bg-accent":"bg-border")})]},f)})})});ho.displayName="Stepper";const ea={sm:"h-4 w-7",md:"h-5 w-9"},ta={sm:"size-3 data-[state=checked]:translate-x-3",md:"size-4 data-[state=checked]:translate-x-4"},vo=l.forwardRef(function({className:t,label:r,description:o,labelPosition:s="after",size:a="md",hideLabel:d,id:u,disabled:f,...c},x){const g=l.useId(),m=u??g,b=o?`${m}-desc`:void 0,p=e.jsx(gt.Root,{ref:x,id:m,disabled:f,"aria-describedby":b,className:i("peer inline-flex shrink-0 items-center rounded-full border-2 border-transparent","transition-colors duration-[var(--duration-base)] ease-[var(--ease-out)]","outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-neutral-300 dark:data-[state=unchecked]:bg-neutral-700",ea[a]),...c,children:e.jsx(gt.Thumb,{className:i("pointer-events-none block rounded-full bg-white shadow-sm","transition-transform duration-[var(--duration-base)] ease-[var(--ease-out)]","translate-x-0",ta[a])})}),h=r&&e.jsxs("div",{className:i("flex flex-col gap-0.5 select-none",d&&"sr-only"),children:[e.jsx("label",{htmlFor:m,className:i("text-sm text-foreground",f&&"opacity-50 cursor-not-allowed"),children:r}),o&&e.jsx("p",{id:b,className:"text-xs text-foreground-subtle",children:o})]});return e.jsxs("div",{className:i("inline-flex items-center gap-2.5",t),children:[s==="before"&&h,p,s==="after"&&h]})});vo.displayName="Switch";const ra=he.Root,oa=F.cva("inline-flex items-center",{variants:{variant:{underline:"gap-4 border-b border-border w-full",pills:"gap-1 rounded-lg bg-background-muted p-1"},size:{sm:"h-9 text-xs",md:"h-10 text-sm",lg:"h-11 text-sm"}},defaultVariants:{variant:"underline",size:"md"}}),jo=l.forwardRef(function({className:t,variant:r="underline",size:o,...s},a){return e.jsx(he.List,{ref:a,"data-variant":r,className:i(oa({variant:r,size:o}),t),...s})});jo.displayName="TabsList";const No=l.forwardRef(function({className:t,...r},o){return e.jsx(he.Trigger,{ref:o,className:i("inline-flex items-center gap-2 whitespace-nowrap font-medium","outline-none transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[[data-variant=underline]_&]:relative [[data-variant=underline]_&]:h-full","[[data-variant=underline]_&]:px-1 [[data-variant=underline]_&]:text-foreground-muted","[[data-variant=underline]_&]:hover:text-foreground","[[data-variant=underline]_&]:data-[state=active]:text-foreground","[[data-variant=underline]_&]:data-[state=active]:after:absolute","[[data-variant=underline]_&]:data-[state=active]:after:inset-x-0","[[data-variant=underline]_&]:data-[state=active]:after:-bottom-px","[[data-variant=underline]_&]:data-[state=active]:after:h-0.5","[[data-variant=underline]_&]:data-[state=active]:after:bg-accent","[[data-variant=pills]_&]:h-full [[data-variant=pills]_&]:rounded-md [[data-variant=pills]_&]:px-3","[[data-variant=pills]_&]:text-foreground-muted","[[data-variant=pills]_&]:hover:text-foreground","[[data-variant=pills]_&]:data-[state=active]:bg-card","[[data-variant=pills]_&]:data-[state=active]:text-foreground","[[data-variant=pills]_&]:data-[state=active]:shadow-xs",t),...r})});No.displayName="TabsTrigger";const wo=l.forwardRef(function({className:t,...r},o){return e.jsx(he.Content,{ref:o,className:i("mt-4 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",t),...r})});wo.displayName="TabsContent";const yo=l.forwardRef(function({className:t,label:r,helperText:o,error:s,autoResize:a,minRows:d=3,maxRows:u=12,hideLabel:f,id:c,onChange:x,value:g,defaultValue:m,...b},p){const h=l.useId(),v=c??h,S=`${v}-helper`,R=`${v}-error`,T=l.useRef(null),y=w=>{T.current=w,typeof p=="function"?p(w):p&&(p.current=w)},j=l.useCallback(()=>{const w=T.current;if(!w||!a)return;w.style.height="auto";const B=(parseFloat(getComputedStyle(w).lineHeight)||20)*u;w.style.height=`${Math.min(w.scrollHeight,B)}px`,w.style.overflowY=w.scrollHeight>B?"auto":"hidden"},[a,u]);return l.useEffect(()=>{a&&j()},[a,j,g,m]),e.jsxs("div",{className:i("flex flex-col gap-1.5",t),children:[r&&e.jsx("label",{htmlFor:v,className:i("text-sm font-medium text-foreground",f&&"sr-only"),children:r}),e.jsx("textarea",{ref:y,id:v,rows:d,value:g,defaultValue:m,onChange:w=>{x==null||x(w),a&&j()},"aria-invalid":!!s||void 0,"aria-describedby":s?R:o?S:void 0,className:i("rounded-md border bg-card px-3 py-2 text-sm text-foreground","placeholder:text-foreground-subtle","transition-colors duration-[var(--duration-fast)] ease-[var(--ease-out)]","outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","focus-visible:ring-offset-background","disabled:opacity-50 disabled:cursor-not-allowed",s?"border-danger focus-visible:border-danger focus-visible:ring-danger":"border-border focus-visible:border-accent",a?"resize-none":"resize-y min-h-20"),...b}),s?e.jsx("p",{id:R,role:"alert",className:"text-xs text-danger-text",children:s}):o?e.jsx("p",{id:S,className:"text-xs text-foreground-subtle",children:o}):null]})});yo.displayName="Textarea";const Co=X.Provider,at=l.forwardRef(function({className:t,...r},o){return e.jsx(X.Viewport,{ref:o,className:i("fixed bottom-0 right-0 z-[var(--z-toast)] flex max-h-screen w-full flex-col-reverse gap-2 p-6","sm:bottom-auto sm:top-4 sm:right-4 sm:max-w-sm sm:flex-col",t),...r})});at.displayName="ToastViewport";const na=F.cva(["group pointer-events-auto relative flex w-full items-start gap-3","overflow-hidden rounded-lg border p-4 pr-8 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-right-full","data-[state=closed]:slide-out-to-right-full","data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform","data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]"],{variants:{variant:{default:"border-border bg-card text-card-foreground",success:"border-success-border-soft bg-success-soft text-success-text",warning:"border-warning-border-soft bg-warning-soft text-warning-text",danger:"border-danger-border-soft bg-danger-soft text-danger-text",info:"border-info-border-soft bg-info-soft text-info-text"}},defaultVariants:{variant:"default"}}),sa={default:null,success:e.jsx(fe,{className:"size-5 text-success-text shrink-0 mt-0.5","aria-hidden":!0}),warning:e.jsx(ue,{className:"size-5 text-warning-text shrink-0 mt-0.5","aria-hidden":!0}),danger:e.jsx(pe,{className:"size-5 text-danger-text shrink-0 mt-0.5","aria-hidden":!0}),info:e.jsx(ge,{className:"size-5 text-info-text shrink-0 mt-0.5","aria-hidden":!0})},it=l.forwardRef(function({className:t,variant:r="default",children:o,...s},a){return e.jsxs(X.Root,{ref:a,className:i(na({variant:r}),t),...s,children:[sa[r??"default"],e.jsx("div",{className:"flex-1 space-y-1",children:o})]})});it.displayName="Toast";const lt=l.forwardRef(function({className:t,...r},o){return e.jsx(X.Title,{ref:o,className:i("text-sm font-medium",t),...r})});lt.displayName="ToastTitle";const dt=l.forwardRef(function({className:t,...r},o){return e.jsx(X.Description,{ref:o,className:i("text-sm opacity-90",t),...r})});dt.displayName="ToastDescription";const ct=l.forwardRef(function({className:t,...r},o){return e.jsx(X.Action,{ref:o,className:i("inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-current bg-transparent px-3 text-sm font-medium","transition-colors hover:bg-current/10 outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",t),...r})});ct.displayName="ToastAction";const ut=l.forwardRef(function({className:t,...r},o){return e.jsx(X.Close,{ref:o,"aria-label":"Close",className:i("absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-md text-foreground-subtle","opacity-0 transition-opacity group-hover:opacity-100 hover:text-foreground","outline-none focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",t),"toast-close":"",...r,children:e.jsx(L,{className:"size-4","aria-hidden":!0})})});ut.displayName="ToastClose";function ko(){const{toasts:n,dismiss:t,remove:r}=Ft();return l.useEffect(()=>{const o=n.filter(a=>!a.open);if(o.length===0)return;const s=o.map(a=>window.setTimeout(()=>r(a.id),200));return()=>s.forEach(a=>window.clearTimeout(a))},[n,r]),e.jsxs(Co,{children:[n.map(o=>e.jsxs(it,{variant:o.variant??"default",open:o.open,duration:o.duration,onOpenChange:s=>{s||t(o.id)},children:[o.title&&e.jsx(lt,{children:o.title}),o.description&&e.jsx(dt,{children:o.description}),o.action&&e.jsx(ct,{altText:o.action.altText,onClick:o.action.onClick,className:"mt-1",children:o.action.label}),e.jsx(ut,{})]},o.id)),e.jsx(at,{})]})}ko.displayName="Toaster";const aa=({delayDuration:n=500,skipDelayDuration:t=200,...r})=>e.jsx(oe.Provider,{delayDuration:n,skipDelayDuration:t,...r}),So=oe.Root,To=oe.Trigger,ft=l.forwardRef(function({className:t,sideOffset:r=4,...o},s){return e.jsx(oe.Portal,{children:e.jsx(oe.Content,{ref:s,sideOffset:r,className:i("z-[var(--z-tooltip)] overflow-hidden rounded-md px-2 py-1 text-xs font-medium","bg-neutral-900 text-neutral-50","dark:bg-neutral-50 dark:text-neutral-900","shadow-sm max-w-xs","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",t),...o})})});ft.displayName="TooltipContent";function Do({children:n,label:t,side:r="top",align:o="center",disabled:s,delayDuration:a}){return s?e.jsx(e.Fragment,{children:n}):e.jsxs(So,{delayDuration:a,children:[e.jsx(To,{asChild:!0,children:n}),e.jsx(ft,{side:r,align:o,children:t})]})}Do.displayName="Tooltip";const zo=l.forwardRef(function({logo:t,nav:r,search:o,actions:s,className:a,...d},u){return e.jsxs("header",{ref:u,className:i("sticky top-0 z-[var(--z-sticky)] flex h-14 w-full items-center gap-4","border-b border-border bg-background/80 px-4 backdrop-blur","supports-[backdrop-filter]:bg-background/60",a),...d,children:[e.jsxs("div",{className:"flex items-center gap-6 shrink-0",children:[t,r&&e.jsx("nav",{className:"hidden md:flex items-center gap-1",children:r})]}),o&&e.jsx("div",{className:"flex-1 max-w-md mx-auto",children:o}),s&&e.jsx("div",{className:"ml-auto flex items-center gap-2 shrink-0",children:s})]})});zo.displayName="TopNav";const Ro=l.forwardRef(function({href:t,active:r,className:o,children:s,...a},d){return e.jsx("a",{ref:d,href:t,"aria-current":r?"page":void 0,className:i("inline-flex h-9 items-center rounded-md px-3 text-sm font-medium outline-none","transition-colors duration-[var(--duration-fast)]",r?"text-foreground":"text-foreground-muted hover:text-foreground","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",o),...a,children:s})});Ro.displayName="TopNavLink";const Mo=l.createContext(null);function Ce(){const n=l.useContext(Mo);if(!n)throw new Error("Carousel components must be used inside <Carousel>");return n}const ia=l.forwardRef(function({opts:t,orientation:r="horizontal",setApi:o,className:s,children:a,...d},u){const[f,c]=Kn({...t,axis:r==="horizontal"?"x":"y"}),[x,g]=l.useState(!1),[m,b]=l.useState(!1),p=l.useCallback(h=>{h&&(g(h.canScrollPrev()),b(h.canScrollNext()))},[]);return l.useEffect(()=>{if(c)return o==null||o(c),p(c),c.on("reInit",p).on("select",p),()=>{c.off("reInit",p).off("select",p)}},[c,p,o]),e.jsx(Mo.Provider,{value:{carouselRef:f,api:c,canPrev:x,canNext:m,scrollPrev:()=>c==null?void 0:c.scrollPrev(),scrollNext:()=>c==null?void 0:c.scrollNext(),orientation:r},children:e.jsx("div",{ref:u,className:i("relative",s),role:"region","aria-roledescription":"carousel",...d,children:a})})}),la=l.forwardRef(function({className:t,...r},o){const{carouselRef:s,orientation:a}=Ce();return e.jsx("div",{ref:s,className:"overflow-hidden",children:e.jsx("div",{ref:o,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...r})})}),da=l.forwardRef(function({className:t,...r},o){const{orientation:s}=Ce();return e.jsx("div",{ref:o,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",s==="horizontal"?"pl-4":"pt-4",t),...r})});function ca({className:n}){const{canPrev:t,scrollPrev:r,orientation:o}=Ce();return e.jsx(se,{"aria-label":"Previous",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(me,{}),className:i("absolute z-10",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",n)})}function ua({className:n}){const{canNext:t,scrollNext:r,orientation:o}=Ce();return e.jsx(se,{"aria-label":"Next",variant:"outline",disabled:!t,onClick:r,icon:e.jsx(O,{}),className:i("absolute z-10",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",n)})}const ke=600,A=6,ht=4;function fa(n,t){const r=n.map(x=>x.y),o=Math.min(0,...r),a=Math.max(...r,1)-o||1,d=ke-A*2,u=t-A*2;return{sx:x=>n.length<=1?A+d/2:A+x/(n.length-1)*d,sy:x=>A+u-(x-o)/a*u}}function ma(n){if(n.length===0)return"";if(n.length<3)return n.map((r,o)=>`${o?"L":"M"}${r[0]},${r[1]}`).join(" ");let t=`M${n[0][0]},${n[0][1]}`;for(let r=0;r<n.length-1;r++){const o=n[r-1]??n[r],s=n[r],a=n[r+1],d=n[r+2]??a,u=s[0]+(a[0]-o[0])/6,f=s[1]+(a[1]-o[1])/6,c=a[0]-(d[0]-s[0])/6,x=a[1]-(d[1]-s[1])/6;t+=` C${u.toFixed(1)},${f.toFixed(1)} ${c.toFixed(1)},${x.toFixed(1)} ${a[0].toFixed(1)},${a[1].toFixed(1)}`}return t}function Io({height:n}){const t=n-A*2;return e.jsx("g",{children:Array.from({length:ht+1},(r,o)=>{const s=A+o/ht*t;return e.jsx("line",{x1:0,x2:ke,y1:s,y2:s,stroke:"var(--color-border)",strokeWidth:1,vectorEffect:"non-scaling-stroke",opacity:.6},o)})})}function _o({caption:n,height:t,width:r,className:o,children:s}){return e.jsxs("figure",{className:i("flex flex-col gap-1.5",o),children:[n&&e.jsx("figcaption",{className:"text-xs text-foreground-muted",children:n}),e.jsx("svg",{viewBox:`0 0 ${ke} ${t}`,width:r,height:t,preserveAspectRatio:"none",role:"img",className:"overflow-visible",children:s})]})}function Po({data:n,height:t=160,width:r="100%",caption:o,grid:s=!0,className:a}){const d=l.useId().replace(/:/g,""),{sx:u,sy:f}=fa(n,t),c=n.map((b,p)=>[u(p),f(b.y)]),x=ma(c),g=c.length?`${x} L${c[c.length-1][0].toFixed(1)},${t} L${c[0][0].toFixed(1)},${t} Z`:"",m=c[c.length-1];return e.jsxs(_o,{caption:o,height:t,width:r,className:a,children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:`area-${d}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-accent)",stopOpacity:.22}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-accent)",stopOpacity:0})]})}),s&&e.jsx(Io,{height:t}),g&&e.jsx("path",{d:g,fill:`url(#area-${d})`}),e.jsx("path",{d:x,fill:"none",stroke:"var(--color-accent)",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"}),m&&e.jsx("circle",{cx:m[0],cy:m[1],r:3.5,fill:"var(--color-accent)",vectorEffect:"non-scaling-stroke",children:e.jsx("title",{children:`${n[n.length-1].x}: ${n[n.length-1].y}`})})]})}function xa(n){return e.jsx(Po,{...n})}function ga({data:n,height:t=160,width:r="100%",caption:o,grid:s=!0,className:a}){const d=ke-A*2,u=t-A*2,f=d/Math.max(1,n.length),c=Math.max(2,f*.62),x=n.map(m=>m.y),g=Math.max(...x,1);return e.jsxs(_o,{caption:o,height:t,width:r,className:a,children:[s&&e.jsx(Io,{height:t}),n.map((m,b)=>{const p=m.y/g*u,h=A+b*f+(f-c)/2;return e.jsx("rect",{x:h,y:A+u-p,width:c,height:Math.max(0,p),fill:"var(--color-accent)",rx:2,className:"transition-opacity hover:opacity-80",children:e.jsx("title",{children:`${m.x}: ${m.y}`})},b)})]})}const Fo=({shouldScaleBackground:n=!0,...t})=>e.jsx(V.Drawer.Root,{shouldScaleBackground:n,...t});Fo.displayName="Drawer";const ba=V.Drawer.Trigger,qo=V.Drawer.Portal,pa=V.Drawer.Close,Lo=l.forwardRef(function({className:t,...r},o){return e.jsx(V.Drawer.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/40",t),...r})}),ha={bottom:"inset-x-0 bottom-0 mt-24 flex h-auto max-h-[90vh] flex-col rounded-t-xl border-t border-border",top:"inset-x-0 top-0 mb-24 flex h-auto max-h-[90vh] flex-col rounded-b-xl border-b border-border",left:"inset-y-0 left-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-r-xl border-r border-border",right:"inset-y-0 right-0 flex h-full w-[420px] max-w-[90vw] flex-col rounded-l-xl border-l border-border"},va={bottom:"mx-auto mt-3 h-1.5 w-12 rounded-full bg-border",top:"mx-auto mb-3 h-1.5 w-12 rounded-full bg-border order-last",left:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border order-last self-stretch shrink-0",right:"mx-1.5 my-auto h-12 w-1.5 rounded-full bg-border shrink-0 self-stretch"},ja=l.forwardRef(function({className:t,direction:r="bottom",hideHandle:o,children:s,...a},d){const u=r==="left"||r==="right";return e.jsxs(qo,{children:[e.jsx(Lo,{}),e.jsxs(V.Drawer.Content,{ref:d,className:i("fixed z-50 bg-card",ha[r],u&&"flex-row",t),...a,children:[!o&&e.jsx("div",{"aria-hidden":!0,className:va[r]}),e.jsx("div",{className:i("min-h-0 min-w-0 flex-1",u&&"flex flex-col"),children:s})]})]})});function Na({className:n,...t}){return e.jsx("div",{className:i("grid gap-1 p-4 text-center sm:text-left",n),...t})}function wa({className:n,...t}){return e.jsx("div",{className:i("mt-auto flex flex-col gap-2 p-4",n),...t})}const ya=l.forwardRef(function({className:t,...r},o){return e.jsx(V.Drawer.Title,{ref:o,className:i("text-lg font-semibold",t),...r})}),Ca=l.forwardRef(function({className:t,...r},o){return e.jsx(V.Drawer.Description,{ref:o,className:i("text-sm text-foreground-muted",t),...r})});function ka(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(1)} MB`}const Sa=l.forwardRef(function({accept:t,multiple:r,maxSize:o,value:s,onChange:a,hint:d,disabled:u,className:f},c){const x=l.useRef(null),g=l.useId(),[m,b]=l.useState([]),[p,h]=l.useState(!1),v=s??m,S=l.useCallback(j=>{s===void 0&&b(j),a==null||a(j)},[a,s]),R=l.useCallback(j=>{const w=Array.from(j).filter(q=>!o||q.size<=o);S(r?[...v,...w]:w.slice(0,1))},[v,o,r,S]),T=j=>S(v.filter((w,q)=>q!==j)),y=j=>{j.preventDefault(),h(!1),!u&&R(j.dataTransfer.files)};return e.jsxs("div",{ref:c,className:i("flex flex-col gap-3",f),children:[e.jsxs("label",{htmlFor:g,onDragOver:j=>{j.preventDefault(),u||h(!0)},onDragLeave:()=>h(!1),onDrop:y,className:i("group relative flex cursor-pointer flex-col items-center justify-center gap-2","rounded-md border border-dashed border-border bg-background-subtle px-6 py-8","text-center transition-colors","hover:border-border-strong hover:bg-background-muted",p&&"border-accent bg-accent-soft",u&&"pointer-events-none opacity-50"),children:[e.jsx(Mt,{className:"size-5 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Drop files here, or click to browse"}),d&&e.jsx("p",{className:"text-xs text-foreground-muted",children:d})]}),e.jsx("input",{ref:x,id:g,type:"file",accept:t,multiple:r,disabled:u,className:"sr-only",onChange:j=>j.target.files&&R(j.target.files)})]}),v.length>0&&e.jsx("ul",{className:"flex flex-col gap-2",children:v.map((j,w)=>e.jsxs("li",{className:"flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",children:[e.jsx(_e,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-sm",children:j.name}),e.jsx("p",{className:"text-xs text-foreground-muted",children:ka(j.size)})]}),e.jsx("button",{type:"button",onClick:()=>T(w),className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground","aria-label":`Remove ${j.name}`,children:e.jsx(L,{className:"size-4"})})]},`${j.name}-${w}`))})]})}),Ta=F.cva(["relative pointer-events-auto w-full max-w-md","flex items-start gap-3 rounded-md border bg-card p-3 shadow-md","text-sm text-foreground"],{variants:{variant:{default:"border-border",info:"border-info-border-soft",success:"border-success-border-soft",warning:"border-warning-border-soft",danger:"border-danger-border-soft"}},defaultVariants:{variant:"default"}}),Da={default:null,info:e.jsx(ge,{className:"size-4 shrink-0 mt-0.5 text-info-text","aria-hidden":!0}),success:e.jsx(fe,{className:"size-4 shrink-0 mt-0.5 text-success-text","aria-hidden":!0}),warning:e.jsx(ue,{className:"size-4 shrink-0 mt-0.5 text-warning-text","aria-hidden":!0}),danger:e.jsx(pe,{className:"size-4 shrink-0 mt-0.5 text-danger-text","aria-hidden":!0})},za=l.forwardRef(function({className:t,variant:r="default",title:o,action:s,onClose:a,icon:d,children:u,...f},c){const x=d===!1?null:d??Da[r??"default"];return e.jsxs("div",{ref:c,role:"status",className:i(Ta({variant:r}),t),...f,children:[x,e.jsxs("div",{className:"min-w-0 flex-1",children:[o&&e.jsx("p",{className:"font-medium",children:o}),u&&e.jsx("p",{className:"text-foreground-muted",children:u})]}),s,a&&e.jsx("button",{type:"button",onClick:a,"aria-label":"Dismiss",className:"rounded p-1 text-foreground-muted hover:bg-background-muted hover:text-foreground",children:e.jsx(L,{className:"size-4"})})]})}),Ra=l.forwardRef(function({value:t,defaultValue:r=[],onChange:o,placeholder:s="Add and press Enter",max:a,disabled:d,error:u,separators:f=["Enter",","],className:c},x){const[g,m]=l.useState(r),[b,p]=l.useState(""),h=t??g,v=l.useCallback(y=>{t===void 0&&m(y),o==null||o(y)},[o,t]),S=y=>{const j=y.trim();!j||h.includes(j)||a!==void 0&&h.length>=a||v([...h,j])},R=y=>v(h.filter((j,w)=>w!==y)),T=y=>{f.includes(y.key)?(y.preventDefault(),S(b),p("")):y.key==="Backspace"&&!b&&h.length&&R(h.length-1)};return e.jsxs("div",{ref:x,className:i("flex max-h-24 min-h-9 w-full flex-wrap items-center gap-1.5 overflow-y-auto rounded-md border bg-card px-2 py-1.5","transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring",u?"border-danger focus-within:border-danger focus-within:ring-danger":"border-border",d&&"pointer-events-none opacity-50",c),children:[h.map((y,j)=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-background-muted px-2 py-0.5 text-xs",children:[y,e.jsx("button",{type:"button",onClick:()=>R(j),className:"rounded p-0.5 text-foreground-muted hover:bg-background-subtle hover:text-foreground","aria-label":`Remove ${y}`,children:e.jsx(L,{className:"size-3"})})]},`${y}-${j}`)),e.jsx("input",{value:b,disabled:d,onChange:y=>p(y.target.value),onKeyDown:T,onBlur:()=>{b&&(S(b),p(""))},placeholder:h.length===0?s:void 0,className:"min-w-[8ch] flex-1 bg-transparent text-sm outline-none placeholder:text-foreground-subtle"})]})}),Ma=l.forwardRef(function({className:t,children:r,...o},s){return e.jsx("ol",{ref:s,className:i("relative flex flex-col gap-6",t),...o,children:r})}),Ia=l.forwardRef(function({bullet:t,isLast:r,className:o,children:s,...a},d){return e.jsxs("li",{ref:d,className:i("relative flex gap-4 pb-1",o),...a,children:[e.jsxs("div",{className:"relative flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"flex size-6 items-center justify-center rounded-full border border-border bg-card text-foreground-muted",children:t??e.jsx("span",{className:"size-2 rounded-full bg-accent","aria-hidden":!0})}),!r&&e.jsx("span",{className:"mt-1 flex-1 w-px bg-border","aria-hidden":!0})]}),e.jsx("div",{className:"min-w-0 flex-1 pb-4",children:s})]})});function _a({className:n,children:t}){return e.jsx("p",{className:i("text-xs text-foreground-subtle",n),children:t})}function Pa({className:n,children:t}){return e.jsx("p",{className:i("text-sm font-medium",n),children:t})}function Fa({className:n,children:t}){return e.jsx("p",{className:i("mt-0.5 text-sm text-foreground-muted",n),children:t})}function qa({data:n,defaultExpanded:t=[],selectedId:r,onSelect:o,className:s}){const[a,d]=l.useState(new Set(t)),u=c=>d(x=>{const g=new Set(x);return g.has(c)?g.delete(c):g.add(c),g});function f(c,x){const g=!!c.children,m=a.has(c.id),b=r===c.id,p=g?m?Tt:St:_e;return e.jsxs("li",{role:"treeitem","aria-expanded":g?m:void 0,children:[e.jsxs("button",{type:"button",tabIndex:0,onClick:()=>{o==null||o(c.id),g&&u(c.id)},onKeyDown:h=>{(h.key==="ArrowRight"&&g&&!m||h.key==="ArrowLeft"&&g&&m)&&u(c.id)},style:{paddingLeft:x*16+8},className:i("flex w-full items-center gap-1.5 rounded-md py-1 pr-2 text-left text-sm","hover:bg-background-muted focus-visible:bg-background-muted outline-none",b&&"bg-accent-soft text-foreground"),children:[g?e.jsx(O,{className:i("size-3.5 shrink-0 text-foreground-subtle transition-transform",m&&"rotate-90"),"aria-hidden":!0}):e.jsx("span",{className:"w-3.5 shrink-0","aria-hidden":!0}),c.icon??e.jsx(p,{className:"size-4 shrink-0 text-foreground-muted","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:c.label})]}),g&&m&&e.jsx("ul",{role:"group",className:"mt-0.5",children:c.children.map(h=>f(h,x+1))})]},c.id)}return e.jsx("ul",{role:"tree",className:i("flex flex-col gap-0.5",s),children:n.map(c=>f(c,0))})}Object.defineProperty(exports,"cva",{enumerable:!0,get:()=>F.cva});exports.Accordion=ns;exports.AccordionContent=Ot;exports.AccordionItem=Bt;exports.AccordionTrigger=Et;exports.Alert=Gt;exports.AreaChart=xa;exports.Avatar=Vt;exports.AvatarGroup=Wt;exports.Badge=Ut;exports.BarChart=ga;exports.Breadcrumbs=Kt;exports.Button=ne;exports.Calendar=Ze;exports.Card=Xt;exports.CardContent=Jt;exports.CardDescription=Zt;exports.CardFooter=er;exports.CardHeader=Qt;exports.CardTitle=Yt;exports.Carousel=ia;exports.CarouselContent=la;exports.CarouselItem=da;exports.CarouselNext=ua;exports.CarouselPrevious=ca;exports.Checkbox=tr;exports.Combobox=rr;exports.Command=qe;exports.CommandDialog=xs;exports.CommandEmpty=sr;exports.CommandGroup=ar;exports.CommandInput=or;exports.CommandItem=lr;exports.CommandList=nr;exports.CommandSeparator=ir;exports.CommandShortcut=ms;exports.ConfirmationDialog=$r;exports.ContextMenu=bs;exports.ContextMenuCheckboxItem=xr;exports.ContextMenuContent=fr;exports.ContextMenuGroup=hs;exports.ContextMenuItem=mr;exports.ContextMenuLabel=br;exports.ContextMenuPortal=dr;exports.ContextMenuRadioGroup=js;exports.ContextMenuRadioItem=gr;exports.ContextMenuSeparator=pr;exports.ContextMenuShortcut=hr;exports.ContextMenuSub=vs;exports.ContextMenuSubContent=ur;exports.ContextMenuSubTrigger=cr;exports.ContextMenuTrigger=ps;exports.DataGrid=Ts;exports.DatePicker=_r;exports.DateRangePicker=Pr;exports.DesignSystemProvider=Rs;exports.Dialog=Fr;exports.DialogClose=Lr;exports.DialogContent=et;exports.DialogDescription=nt;exports.DialogFooter=rt;exports.DialogHeader=tt;exports.DialogOverlay=Je;exports.DialogPortal=qr;exports.DialogTitle=ot;exports.DialogTrigger=Is;exports.Drawer=Fo;exports.DrawerClose=pa;exports.DrawerContent=ja;exports.DrawerDescription=Ca;exports.DrawerFooter=wa;exports.DrawerHeader=Na;exports.DrawerOverlay=Lo;exports.DrawerPortal=qo;exports.DrawerTitle=ya;exports.DrawerTrigger=ba;exports.DropdownMenu=vr;exports.DropdownMenuCheckboxItem=$e;exports.DropdownMenuContent=Le;exports.DropdownMenuGroup=Ns;exports.DropdownMenuItem=Cr;exports.DropdownMenuLabel=Ae;exports.DropdownMenuPortal=Nr;exports.DropdownMenuRadioGroup=ys;exports.DropdownMenuRadioItem=kr;exports.DropdownMenuSeparator=Be;exports.DropdownMenuShortcut=Sr;exports.DropdownMenuSub=ws;exports.DropdownMenuSubContent=yr;exports.DropdownMenuSubTrigger=wr;exports.DropdownMenuTrigger=jr;exports.EmptyState=Ar;exports.ErrorState=Br;exports.FileUpload=Sa;exports.Form=Ps;exports.FormControl=Vr;exports.FormDescription=Wr;exports.FormError=Ur;exports.FormField=Fs;exports.FormItem=Gr;exports.FormLabel=Hr;exports.Icon=$s;exports.IconButton=se;exports.Icons=es;exports.Illustrations=os;exports.Input=Ee;exports.Kbd=Kr;exports.LineChart=Po;exports.MultiSelect=Xr;exports.Pagination=Qr;exports.Popover=Bs;exports.PopoverAnchor=Os;exports.PopoverClose=Gs;exports.PopoverContent=Yr;exports.PopoverTrigger=Es;exports.Progress=Zr;exports.ProgressCircle=Jr;exports.RadioGroup=eo;exports.RadioItem=to;exports.ScrollArea=ro;exports.ScrollBar=st;exports.Select=Ue;exports.SelectContent=we;exports.SelectGroup=Mr;exports.SelectItem=ye;exports.SelectLabel=Ye;exports.SelectScrollDownButton=Qe;exports.SelectScrollUpButton=Xe;exports.SelectSeparator=Rr;exports.SelectTrigger=Ke;exports.SelectValue=Ds;exports.Separator=oo;exports.Sheet=Us;exports.SheetClose=Xs;exports.SheetContent=ao;exports.SheetDescription=uo;exports.SheetFooter=lo;exports.SheetHeader=io;exports.SheetPortal=no;exports.SheetTitle=co;exports.SheetTrigger=Ks;exports.Sidebar=fo;exports.SidebarGroup=go;exports.SidebarItem=xo;exports.SidebarSection=mo;exports.Skeleton=We;exports.Slider=bo;exports.Snackbar=za;exports.Spinner=po;exports.Stepper=ho;exports.Switch=vo;exports.Table=Oe;exports.TableBody=He;exports.TableCaption=Dr;exports.TableCell=te;exports.TableFooter=Tr;exports.TableHead=Ne;exports.TableHeader=Ge;exports.TableRow=Y;exports.TableSortHeader=Ve;exports.Tabs=ra;exports.TabsContent=wo;exports.TabsList=jo;exports.TabsTrigger=No;exports.TagInput=Ra;exports.Textarea=yo;exports.Timeline=Ma;exports.TimelineDescription=Fa;exports.TimelineItem=Ia;exports.TimelineTime=_a;exports.TimelineTitle=Pa;exports.Toast=it;exports.ToastAction=ct;exports.ToastClose=ut;exports.ToastDescription=dt;exports.ToastProvider=Co;exports.ToastTitle=lt;exports.ToastViewport=at;exports.Toaster=ko;exports.Tooltip=Do;exports.TooltipContent=ft;exports.TooltipProvider=aa;exports.TooltipRoot=So;exports.TooltipTrigger=To;exports.TopNav=zo;exports.TopNavLink=Ro;exports.Tree=qa;exports.brandPresets=Ms;exports.cn=i;exports.iconNames=qs;exports.toast=Jn;exports.uid=Yn;exports.useCommandPaletteShortcut=gs;exports.useFormField=ae;exports.useMediaQuery=Pt;exports.usePrefersReducedMotion=Zn;exports.useSidebar=Ys;exports.useToast=Ft;
|
|
8
|
-
//# sourceMappingURL=index.cjs.map
|