xertica-ui 2.0.2 → 2.0.4

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/bin/cli.ts +2 -1
  4. package/components/assistant/markdown-message/markdown-message.mdx +1 -1
  5. package/components/brand/language-selector/language-selector.mdx +1 -1
  6. package/components/brand/theme-toggle/theme-toggle.mdx +1 -1
  7. package/components/brand/xertica-logo/xertica-logo.mdx +1 -1
  8. package/components/brand/xertica-provider/xertica-provider.mdx +1 -1
  9. package/components/brand/xertica-xlogo/xertica-xlogo.mdx +1 -1
  10. package/components/index.ts +6 -0
  11. package/components/layout/header/header.mdx +1 -1
  12. package/components/layout/sidebar/sidebar.mdx +2 -1
  13. package/components/media/floating-media-wrapper.mdx +2 -2
  14. package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +2 -4
  15. package/components/pages/home-content/HomeContent.tsx +1 -1
  16. package/components/pages/home-content/home-content.mdx +1 -1
  17. package/components/pages/home-page/HomePage.stories.tsx +39 -0
  18. package/components/pages/home-page/HomePage.tsx +2 -3
  19. package/components/pages/home-page/home-page.mdx +56 -0
  20. package/components/pages/login-page/LoginPage.tsx +2 -5
  21. package/components/pages/reset-password-page/reset-password-page.mdx +6 -2
  22. package/components/pages/template-page/TemplatePage.stories.tsx +39 -0
  23. package/components/pages/template-page/TemplatePage.tsx +3 -1
  24. package/components/pages/template-page/template-page.mdx +54 -0
  25. package/components/pages/verify-email-page/VerifyEmailPage.tsx +2 -4
  26. package/components/ui/accordion/accordion.stories.tsx +27 -1
  27. package/components/ui/alert-dialog/alert-dialog.stories.tsx +30 -0
  28. package/components/ui/button/button.stories.tsx +23 -0
  29. package/components/ui/checkbox/checkbox.stories.tsx +20 -1
  30. package/components/ui/dialog/dialog.stories.tsx +30 -0
  31. package/components/ui/google-maps-loader/google-maps-loader.mdx +1 -1
  32. package/components/ui/input/input.stories.tsx +24 -0
  33. package/components/ui/switch/switch.stories.tsx +20 -1
  34. package/components/ui/tabs/tabs.stories.tsx +26 -1
  35. package/components.json +1507 -530
  36. package/dist/cli.js +3 -2
  37. package/dist/components/index.d.ts +6 -0
  38. package/dist/index.cjs.js +1233 -484
  39. package/dist/index.es.js +778 -28
  40. package/dist/ui.cjs.js +178 -178
  41. package/dist/ui.es.js +1 -1
  42. package/dist/use-mobile-CaENcqm-.js +4508 -0
  43. package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
  44. package/dist/xertica-ui.css +1 -1
  45. package/docs/decision-tree.md +287 -0
  46. package/guidelines/Guidelines.md +250 -657
  47. package/llms-compact.txt +327 -0
  48. package/llms.txt +160 -71
  49. package/package.json +193 -192
  50. package/templates/CLAUDE.md +160 -0
  51. package/templates/guidelines/Guidelines.md +245 -99
  52. package/templates/package.json +3 -3
@@ -0,0 +1,4508 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { e as cn, B as Button, d as buttonVariants } from "./tooltip-HDOoD2-0.js";
4
+ import { Slot, Slottable } from "@radix-ui/react-slot";
5
+ import { cva } from "class-variance-authority";
6
+ import { XCircle, AlertTriangle, Info, CheckCircle, Check, ChevronLeft, GripVerticalIcon, ChevronDownIcon, MoreHorizontalIcon, ChevronRightIcon, ChevronLeftIcon, MinusIcon, ChevronRight, ChevronDown, XIcon, CheckIcon, CircleIcon, SearchIcon, TrendingUp, TrendingDown, Minus, ArrowRight, ArrowLeft, X, Upload, AlertCircle, FileIcon, Star, Search as Search$1 } from "lucide-react";
7
+ import * as React from "react";
8
+ import React__default, { useRef, useEffect, useState } from "react";
9
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
10
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
11
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
12
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
13
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
14
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
15
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
16
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
17
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
18
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
19
+ import { OTPInput, OTPInputContext } from "input-otp";
20
+ import { FormProvider, Controller, useFormContext, useFormState } from "react-hook-form";
21
+ import * as LabelPrimitive from "@radix-ui/react-label";
22
+ import { getDefaultClassNames, DayPicker } from "react-day-picker";
23
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
24
+ import { Drawer as Drawer$1 } from "vaul";
25
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
26
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
27
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
28
+ import { Command as Command$1 } from "cmdk";
29
+ import { D as Dialog, k as DialogHeader, n as DialogTitle, i as DialogDescription, h as DialogContent, C as ChartContainer, d as ChartTooltip, e as ChartTooltipContent } from "./rich-text-editor-B9UbSXNb.js";
30
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
31
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
32
+ import useEmblaCarousel from "embla-carousel-react";
33
+ import { u as useGoogleMapsLoader } from "./google-maps-loader-BFWp6VPd.js";
34
+ import { createRoot } from "react-dom/client";
35
+ import { BarChart, CartesianGrid, XAxis, Bar } from "recharts";
36
+ function Label({
37
+ className,
38
+ size = "md",
39
+ ...props
40
+ }) {
41
+ const sizeClasses = {
42
+ sm: "text-xs",
43
+ md: "text-sm",
44
+ lg: "text-base"
45
+ };
46
+ return /* @__PURE__ */ jsx(
47
+ LabelPrimitive.Root,
48
+ {
49
+ "data-slot": "label",
50
+ className: cn(
51
+ "flex items-center gap-2 leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
52
+ sizeClasses[size],
53
+ className
54
+ ),
55
+ ...props
56
+ }
57
+ );
58
+ }
59
+ function Card({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx(
61
+ "div",
62
+ {
63
+ "data-slot": "card",
64
+ className: cn(
65
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-[var(--radius-card)]",
66
+ className
67
+ ),
68
+ ...props
69
+ }
70
+ );
71
+ }
72
+ function CardHeader({ className, ...props }) {
73
+ return /* @__PURE__ */ jsx(
74
+ "div",
75
+ {
76
+ "data-slot": "card-header",
77
+ className: cn(
78
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
79
+ className
80
+ ),
81
+ ...props
82
+ }
83
+ );
84
+ }
85
+ function CardTitle({ className, ...props }) {
86
+ return /* @__PURE__ */ jsx(
87
+ "h4",
88
+ {
89
+ "data-slot": "card-title",
90
+ className: cn("leading-none", className),
91
+ ...props
92
+ }
93
+ );
94
+ }
95
+ function CardDescription({ className, ...props }) {
96
+ return /* @__PURE__ */ jsx(
97
+ "p",
98
+ {
99
+ "data-slot": "card-description",
100
+ className: cn("text-muted-foreground", className),
101
+ ...props
102
+ }
103
+ );
104
+ }
105
+ function CardAction({ className, ...props }) {
106
+ return /* @__PURE__ */ jsx(
107
+ "div",
108
+ {
109
+ "data-slot": "card-action",
110
+ className: cn(
111
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
112
+ className
113
+ ),
114
+ ...props
115
+ }
116
+ );
117
+ }
118
+ function CardContent({ className, ...props }) {
119
+ return /* @__PURE__ */ jsx(
120
+ "div",
121
+ {
122
+ "data-slot": "card-content",
123
+ className: cn("px-6 [&:last-child]:pb-6", className),
124
+ ...props
125
+ }
126
+ );
127
+ }
128
+ function CardFooter({ className, ...props }) {
129
+ return /* @__PURE__ */ jsx(
130
+ "div",
131
+ {
132
+ "data-slot": "card-footer",
133
+ className: cn("flex items-center px-6 pb-6 [.border-t]:pt-6", className),
134
+ ...props
135
+ }
136
+ );
137
+ }
138
+ function Tabs({
139
+ className,
140
+ ...props
141
+ }) {
142
+ return /* @__PURE__ */ jsx(
143
+ TabsPrimitive.Root,
144
+ {
145
+ "data-slot": "tabs",
146
+ className: cn("flex flex-col gap-2", className),
147
+ ...props
148
+ }
149
+ );
150
+ }
151
+ function TabsList({
152
+ className,
153
+ ...props
154
+ }) {
155
+ return /* @__PURE__ */ jsx(
156
+ TabsPrimitive.List,
157
+ {
158
+ "data-slot": "tabs-list",
159
+ className: cn(
160
+ "relative inline-flex h-12 w-fit items-end justify-start border-b border-border bg-transparent",
161
+ className
162
+ ),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function TabsTrigger({
168
+ className,
169
+ ...props
170
+ }) {
171
+ return /* @__PURE__ */ jsx(
172
+ TabsPrimitive.Trigger,
173
+ {
174
+ "data-slot": "tabs-trigger",
175
+ className: cn(
176
+ "relative inline-flex h-12 items-center justify-center gap-1.5 bg-transparent px-4 py-3 text-sm font-medium whitespace-nowrap transition-all duration-200 ease-in-out border-b-2 border-transparent text-muted-foreground hover:text-foreground hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-primary data-[state=active]:border-primary data-[state=active]:bg-transparent [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
177
+ className
178
+ ),
179
+ ...props
180
+ }
181
+ );
182
+ }
183
+ function TabsContent({
184
+ className,
185
+ ...props
186
+ }) {
187
+ return /* @__PURE__ */ jsx(
188
+ TabsPrimitive.Content,
189
+ {
190
+ "data-slot": "tabs-content",
191
+ className: cn("flex-1 outline-none", className),
192
+ ...props
193
+ }
194
+ );
195
+ }
196
+ const badgeVariants = cva(
197
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
198
+ {
199
+ variants: {
200
+ variant: {
201
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
202
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
203
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
204
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
205
+ success: "border-transparent bg-[var(--toast-success-bg)] text-[var(--toast-success-icon)]",
206
+ warning: "border-transparent bg-[var(--toast-warning-bg)] text-[var(--toast-warning-icon)]",
207
+ info: "border-transparent bg-[var(--toast-info-bg)] text-[var(--toast-info-icon)]"
208
+ }
209
+ },
210
+ defaultVariants: {
211
+ variant: "default"
212
+ }
213
+ }
214
+ );
215
+ function Badge({
216
+ className,
217
+ variant,
218
+ asChild = false,
219
+ children,
220
+ ...props
221
+ }) {
222
+ const Comp = asChild ? Slot : "span";
223
+ return /* @__PURE__ */ jsx(
224
+ Comp,
225
+ {
226
+ "data-slot": "badge",
227
+ className: cn(badgeVariants({ variant }), className),
228
+ ...props,
229
+ children: /* @__PURE__ */ jsx(Slottable, { children })
230
+ }
231
+ );
232
+ }
233
+ const alertVariants = cva(
234
+ "relative w-full rounded-[var(--radius)] border-l-4 px-4 py-3 grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current",
235
+ {
236
+ variants: {
237
+ variant: {
238
+ default: "bg-muted/50 border-l-border text-foreground [&>svg]:text-muted-foreground",
239
+ success: "bg-[color:var(--success)]/10 dark:bg-[color:var(--success)]/20 border-l-[color:var(--success)] text-foreground [&>svg]:text-[color:var(--success)]",
240
+ info: "bg-[color:var(--info)]/10 dark:bg-[color:var(--info)]/20 border-l-[color:var(--info)] text-foreground [&>svg]:text-[color:var(--info)]",
241
+ warning: "bg-[color:var(--warning)]/10 dark:bg-[color:var(--warning)]/20 border-l-[color:var(--warning)] text-foreground [&>svg]:text-[color:var(--warning)]",
242
+ destructive: "bg-[color:var(--destructive)]/10 dark:bg-[color:var(--destructive)]/20 border-l-[color:var(--destructive)] text-foreground [&>svg]:text-[color:var(--destructive)]"
243
+ }
244
+ },
245
+ defaultVariants: {
246
+ variant: "default"
247
+ }
248
+ }
249
+ );
250
+ const alertIcons = {
251
+ default: Info,
252
+ success: CheckCircle,
253
+ info: Info,
254
+ warning: AlertTriangle,
255
+ destructive: XCircle
256
+ };
257
+ function Alert({
258
+ className,
259
+ variant,
260
+ icon,
261
+ children,
262
+ ...props
263
+ }) {
264
+ const alertVariant = variant && variant in alertIcons ? variant : "default";
265
+ const DefaultIcon = alertIcons[alertVariant];
266
+ return /* @__PURE__ */ jsxs(
267
+ "div",
268
+ {
269
+ "data-slot": "alert",
270
+ role: "alert",
271
+ className: cn(alertVariants({ variant }), className),
272
+ ...props,
273
+ children: [
274
+ icon !== void 0 ? icon : /* @__PURE__ */ jsx(DefaultIcon, { className: "flex-shrink-0" }),
275
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children })
276
+ ]
277
+ }
278
+ );
279
+ }
280
+ function AlertTitle({ className, ...props }) {
281
+ return /* @__PURE__ */ jsx(
282
+ "div",
283
+ {
284
+ "data-slot": "alert-title",
285
+ className: cn(
286
+ "font-medium mb-1 leading-tight",
287
+ className
288
+ ),
289
+ ...props
290
+ }
291
+ );
292
+ }
293
+ function AlertDescription({
294
+ className,
295
+ ...props
296
+ }) {
297
+ return /* @__PURE__ */ jsx(
298
+ "div",
299
+ {
300
+ "data-slot": "alert-description",
301
+ className: cn(
302
+ "leading-relaxed",
303
+ className
304
+ ),
305
+ ...props
306
+ }
307
+ );
308
+ }
309
+ const Checkbox = React.forwardRef(({ className, size = "md", ...props }, ref) => {
310
+ const sizeClasses = {
311
+ sm: "size-3.5",
312
+ md: "size-4",
313
+ lg: "size-5"
314
+ };
315
+ const iconSizeClasses = {
316
+ sm: "size-3",
317
+ md: "size-3.5",
318
+ lg: "size-4"
319
+ };
320
+ return /* @__PURE__ */ jsx(
321
+ CheckboxPrimitive.Root,
322
+ {
323
+ ref,
324
+ "data-slot": "checkbox",
325
+ className: cn(
326
+ "peer border bg-white dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
327
+ sizeClasses[size],
328
+ className
329
+ ),
330
+ ...props,
331
+ children: /* @__PURE__ */ jsx(
332
+ CheckboxPrimitive.Indicator,
333
+ {
334
+ "data-slot": "checkbox-indicator",
335
+ className: "flex items-center justify-center text-current transition-none",
336
+ children: /* @__PURE__ */ jsx(Check, { className: iconSizeClasses[size] })
337
+ }
338
+ )
339
+ }
340
+ );
341
+ });
342
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
343
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
344
+ RadioGroupPrimitive.Root,
345
+ {
346
+ className: cn("grid gap-4", className),
347
+ ...props,
348
+ ref
349
+ }
350
+ ));
351
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
352
+ const RadioGroupItem = React.forwardRef(({ className, size = "md", ...props }, ref) => {
353
+ const sizeClasses = {
354
+ sm: "size-4",
355
+ md: "size-5",
356
+ lg: "size-6"
357
+ };
358
+ const dotSizeClasses = {
359
+ sm: "size-2",
360
+ md: "size-2.5",
361
+ lg: "size-3"
362
+ };
363
+ return /* @__PURE__ */ jsx(
364
+ RadioGroupPrimitive.Item,
365
+ {
366
+ ref,
367
+ "data-slot": "radio-group-item",
368
+ className: cn(
369
+ // Base styles - Material UI inspired
370
+ "relative aspect-square shrink-0 rounded-full border-2 transition-all duration-200 outline-none cursor-pointer",
371
+ // Default state - sempre com contorno usando variáveis CSS
372
+ "border-muted-foreground bg-background",
373
+ // Hover state - usa variável primary
374
+ "hover:border-primary hover:shadow-md",
375
+ // Focus state - usa variável primary
376
+ "focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
377
+ // Checked state - mantém contorno com primary
378
+ "data-[state=checked]:border-primary data-[state=checked]:bg-background",
379
+ // Disabled state
380
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:border-muted",
381
+ // Invalid state - usa variável destructive
382
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
383
+ sizeClasses[size],
384
+ className
385
+ ),
386
+ ...props,
387
+ children: /* @__PURE__ */ jsx(
388
+ RadioGroupPrimitive.Indicator,
389
+ {
390
+ "data-slot": "radio-group-indicator",
391
+ className: "flex items-center justify-center",
392
+ children: /* @__PURE__ */ jsx("div", { className: cn("rounded-full bg-primary transition-all duration-200", dotSizeClasses[size]) })
393
+ }
394
+ )
395
+ }
396
+ );
397
+ });
398
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
399
+ const Switch = React.forwardRef(({ className, size = "md", ...props }, ref) => {
400
+ const trackClasses = {
401
+ sm: "h-3.5 w-7",
402
+ md: "h-[1.15rem] w-8",
403
+ lg: "h-[1.375rem] w-10"
404
+ };
405
+ const thumbClasses = {
406
+ sm: "size-3",
407
+ md: "size-4",
408
+ lg: "size-5"
409
+ };
410
+ return /* @__PURE__ */ jsx(
411
+ SwitchPrimitive.Root,
412
+ {
413
+ className: cn(
414
+ "peer inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50",
415
+ "data-[state=checked]:bg-primary",
416
+ "data-[state=unchecked]:bg-muted",
417
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
418
+ trackClasses[size],
419
+ className
420
+ ),
421
+ ...props,
422
+ ref,
423
+ children: /* @__PURE__ */ jsx(
424
+ SwitchPrimitive.Thumb,
425
+ {
426
+ className: cn(
427
+ "pointer-events-none block rounded-full ring-0 transition-transform shadow-sm",
428
+ "bg-background",
429
+ "data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0",
430
+ thumbClasses[size]
431
+ )
432
+ }
433
+ )
434
+ }
435
+ );
436
+ });
437
+ Switch.displayName = SwitchPrimitive.Root.displayName;
438
+ const trackVariants = {
439
+ default: "bg-primary/20",
440
+ success: "bg-success/20",
441
+ info: "bg-info/20",
442
+ warning: "bg-warning/20",
443
+ destructive: "bg-destructive/20"
444
+ };
445
+ const indicatorVariants = {
446
+ default: "bg-primary",
447
+ success: "bg-success",
448
+ info: "bg-info",
449
+ warning: "bg-warning",
450
+ destructive: "bg-destructive"
451
+ };
452
+ function Progress({
453
+ className,
454
+ value,
455
+ variant = "default",
456
+ ...props
457
+ }) {
458
+ return /* @__PURE__ */ jsx(
459
+ ProgressPrimitive.Root,
460
+ {
461
+ "data-slot": "progress",
462
+ "aria-label": props["aria-label"] || "Progresso",
463
+ className: cn(
464
+ "relative h-2 w-full overflow-hidden rounded-full",
465
+ trackVariants[variant],
466
+ className
467
+ ),
468
+ ...props,
469
+ children: /* @__PURE__ */ jsx(
470
+ ProgressPrimitive.Indicator,
471
+ {
472
+ "data-slot": "progress-indicator",
473
+ className: cn("h-full w-full flex-1 transition-all", indicatorVariants[variant]),
474
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
475
+ }
476
+ )
477
+ }
478
+ );
479
+ }
480
+ function Separator({
481
+ className,
482
+ orientation = "horizontal",
483
+ decorative = true,
484
+ ...props
485
+ }) {
486
+ return /* @__PURE__ */ jsx(
487
+ SeparatorPrimitive.Root,
488
+ {
489
+ "data-slot": "separator-root",
490
+ decorative,
491
+ orientation,
492
+ className: cn(
493
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
494
+ className
495
+ ),
496
+ ...props
497
+ }
498
+ );
499
+ }
500
+ function useMapLayers(map, layers) {
501
+ const trafficLayerRef = useRef(null);
502
+ const transitLayerRef = useRef(null);
503
+ const bicyclingLayerRef = useRef(null);
504
+ useEffect(() => {
505
+ if (!map) return;
506
+ if (layers.traffic) {
507
+ if (!trafficLayerRef.current) {
508
+ trafficLayerRef.current = new google.maps.TrafficLayer();
509
+ }
510
+ trafficLayerRef.current.setMap(map);
511
+ } else {
512
+ if (trafficLayerRef.current) {
513
+ trafficLayerRef.current.setMap(null);
514
+ }
515
+ }
516
+ return () => {
517
+ if (trafficLayerRef.current) {
518
+ trafficLayerRef.current.setMap(null);
519
+ }
520
+ };
521
+ }, [map, layers.traffic]);
522
+ useEffect(() => {
523
+ if (!map) return;
524
+ if (layers.transit) {
525
+ if (!transitLayerRef.current) {
526
+ transitLayerRef.current = new google.maps.TransitLayer();
527
+ }
528
+ transitLayerRef.current.setMap(map);
529
+ } else {
530
+ if (transitLayerRef.current) {
531
+ transitLayerRef.current.setMap(null);
532
+ }
533
+ }
534
+ return () => {
535
+ if (transitLayerRef.current) {
536
+ transitLayerRef.current.setMap(null);
537
+ }
538
+ };
539
+ }, [map, layers.transit]);
540
+ useEffect(() => {
541
+ if (!map) return;
542
+ if (layers.bicycling) {
543
+ if (!bicyclingLayerRef.current) {
544
+ bicyclingLayerRef.current = new google.maps.BicyclingLayer();
545
+ }
546
+ bicyclingLayerRef.current.setMap(map);
547
+ } else {
548
+ if (bicyclingLayerRef.current) {
549
+ bicyclingLayerRef.current.setMap(null);
550
+ }
551
+ }
552
+ return () => {
553
+ if (bicyclingLayerRef.current) {
554
+ bicyclingLayerRef.current.setMap(null);
555
+ }
556
+ };
557
+ }, [map, layers.bicycling]);
558
+ }
559
+ const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
560
+ const DEFAULT_CENTER = { lat: -23.5505, lng: -46.6333 };
561
+ const DEFAULT_ZOOM = 12;
562
+ const MapContent = React__default.forwardRef(
563
+ ({ apiKey, ...props }, ref) => {
564
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
565
+ const {
566
+ center = DEFAULT_CENTER,
567
+ zoom = DEFAULT_ZOOM,
568
+ markers = [],
569
+ circle,
570
+ polygon,
571
+ layers,
572
+ height = "400px",
573
+ mapContainerClassName,
574
+ disableDefaultUI = false,
575
+ zoomControl = true,
576
+ streetViewControl = false,
577
+ mapTypeControl = false,
578
+ fullscreenControl = true,
579
+ gestureHandling = "cooperative",
580
+ onMapLoad,
581
+ className,
582
+ ...divProps
583
+ } = props;
584
+ const [selectedMarker, setSelectedMarker] = useState(null);
585
+ const mapRef = useRef(null);
586
+ const gmpMapRef = useRef(null);
587
+ const infoWindowRef = useRef(null);
588
+ const circleRef = useRef(null);
589
+ const polygonRef = useRef(null);
590
+ const [themeColors, setThemeColors] = useState({
591
+ primary: "#4F46E5",
592
+ chart2: "#10B981"
593
+ });
594
+ useEffect(() => {
595
+ if (typeof window !== "undefined") {
596
+ const styles = getComputedStyle(document.documentElement);
597
+ setThemeColors({
598
+ primary: styles.getPropertyValue("--primary").trim() || "#4F46E5",
599
+ chart2: styles.getPropertyValue("--chart-2").trim() || "#10B981"
600
+ });
601
+ }
602
+ }, []);
603
+ useEffect(() => {
604
+ if (!isLoaded && apiKey && !loadError && load) {
605
+ load(apiKey).catch(console.error);
606
+ }
607
+ }, [isLoaded, apiKey, loadError, load]);
608
+ useEffect(() => {
609
+ if (!isLoaded || !gmpMapRef.current) return;
610
+ const gmpMap = gmpMapRef.current;
611
+ if (gmpMap.innerMap) {
612
+ mapRef.current = gmpMap.innerMap;
613
+ if (onMapLoad) {
614
+ onMapLoad(gmpMap.innerMap);
615
+ }
616
+ } else {
617
+ const interval = setInterval(() => {
618
+ if (gmpMap.innerMap) {
619
+ mapRef.current = gmpMap.innerMap;
620
+ if (onMapLoad) {
621
+ onMapLoad(gmpMap.innerMap);
622
+ }
623
+ clearInterval(interval);
624
+ }
625
+ }, 100);
626
+ return () => clearInterval(interval);
627
+ }
628
+ return () => {
629
+ mapRef.current = null;
630
+ };
631
+ }, [isLoaded]);
632
+ useEffect(() => {
633
+ if (gmpMapRef.current) {
634
+ if (center) gmpMapRef.current.center = center;
635
+ }
636
+ }, [center]);
637
+ useEffect(() => {
638
+ if (gmpMapRef.current) {
639
+ if (zoom !== void 0) gmpMapRef.current.zoom = zoom;
640
+ }
641
+ }, [zoom]);
642
+ useEffect(() => {
643
+ if (gmpMapRef.current) {
644
+ if (props.mapTypeId) gmpMapRef.current.mapTypeId = props.mapTypeId;
645
+ }
646
+ }, [props.mapTypeId]);
647
+ useEffect(() => {
648
+ var _a;
649
+ const map = mapRef.current;
650
+ if (!map || !isLoaded) return;
651
+ (_a = circleRef.current) == null ? void 0 : _a.setMap(null);
652
+ circleRef.current = null;
653
+ if (circle && circle.center && circle.radius) {
654
+ circleRef.current = new google.maps.Circle({
655
+ map,
656
+ center: circle.center,
657
+ radius: circle.radius,
658
+ fillColor: circle.fillColor || themeColors.primary,
659
+ fillOpacity: 0.2,
660
+ strokeColor: circle.strokeColor || themeColors.primary,
661
+ strokeOpacity: 0.8,
662
+ strokeWeight: 2
663
+ });
664
+ }
665
+ return () => {
666
+ var _a2;
667
+ (_a2 = circleRef.current) == null ? void 0 : _a2.setMap(null);
668
+ };
669
+ }, [circle, isLoaded, themeColors, mapRef.current]);
670
+ useEffect(() => {
671
+ var _a;
672
+ const map = mapRef.current;
673
+ if (!map || !isLoaded) return;
674
+ (_a = polygonRef.current) == null ? void 0 : _a.setMap(null);
675
+ polygonRef.current = null;
676
+ if (polygon && polygon.paths) {
677
+ polygonRef.current = new google.maps.Polygon({
678
+ map,
679
+ paths: polygon.paths,
680
+ fillColor: polygon.fillColor || themeColors.chart2,
681
+ fillOpacity: 0.2,
682
+ strokeColor: polygon.strokeColor || themeColors.chart2,
683
+ strokeOpacity: 0.8,
684
+ strokeWeight: 2
685
+ });
686
+ }
687
+ return () => {
688
+ var _a2;
689
+ (_a2 = polygonRef.current) == null ? void 0 : _a2.setMap(null);
690
+ };
691
+ }, [polygon, isLoaded, themeColors, mapRef.current]);
692
+ useMapLayers(mapRef.current, layers || {});
693
+ useEffect(() => {
694
+ var _a;
695
+ const map = mapRef.current;
696
+ if (!map || selectedMarker === null) {
697
+ (_a = infoWindowRef.current) == null ? void 0 : _a.close();
698
+ return;
699
+ }
700
+ const markerData = markers[selectedMarker];
701
+ if (!markerData) return;
702
+ }, [selectedMarker, markers]);
703
+ const handleMarkerClick = (index, markerElement) => {
704
+ setSelectedMarker(index);
705
+ const map = mapRef.current;
706
+ if (!map) return;
707
+ const markerData = markers[index];
708
+ if (!markerData) return;
709
+ let contentToRender = markerData.richContent;
710
+ if (!contentToRender && (markerData.title || markerData.info)) {
711
+ contentToRender = /* @__PURE__ */ jsxs("div", { className: "p-4 pr-8 min-w-[200px] max-w-[300px]", children: [
712
+ markerData.title && /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base mb-1", children: markerData.title }),
713
+ markerData.info && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: markerData.info })
714
+ ] });
715
+ }
716
+ if (contentToRender && markerElement.innerMarker) {
717
+ if (!infoWindowRef.current) {
718
+ infoWindowRef.current = new google.maps.InfoWindow();
719
+ }
720
+ const container = document.createElement("div");
721
+ const root = createRoot(container);
722
+ root.render(contentToRender);
723
+ infoWindowRef.current.setContent(container);
724
+ infoWindowRef.current.open({
725
+ map,
726
+ anchor: markerElement.innerMarker
727
+ });
728
+ infoWindowRef.current.addListener("closeclick", () => {
729
+ setSelectedMarker(null);
730
+ setTimeout(() => root.unmount(), 0);
731
+ });
732
+ }
733
+ };
734
+ if (loadError) {
735
+ return /* @__PURE__ */ jsx(
736
+ "div",
737
+ {
738
+ ref,
739
+ className: cn(
740
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
741
+ className
742
+ ),
743
+ style: { height },
744
+ ...divProps,
745
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
746
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
747
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
748
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
749
+ ] }) })
750
+ }
751
+ );
752
+ }
753
+ if (!isLoaded) {
754
+ return /* @__PURE__ */ jsx(
755
+ "div",
756
+ {
757
+ ref,
758
+ className: cn(
759
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
760
+ className
761
+ ),
762
+ style: { height },
763
+ ...divProps
764
+ }
765
+ );
766
+ }
767
+ return /* @__PURE__ */ jsx(
768
+ "div",
769
+ {
770
+ ref,
771
+ className: cn(
772
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
773
+ className
774
+ ),
775
+ style: { height },
776
+ ...divProps,
777
+ children: /* @__PURE__ */ jsx(
778
+ "gmp-map",
779
+ {
780
+ ref: gmpMapRef,
781
+ style: { height: "100%", width: "100%", display: "block" },
782
+ "map-id": props.mapId || "DEMO_MAP_ID",
783
+ children: markers.map((markerData, idx) => {
784
+ const markerColor = markerData.customColor || "var(--primary)";
785
+ const iconColor = markerData.iconColor || "white";
786
+ return (
787
+ // @ts-ignore
788
+ /* @__PURE__ */ jsx(
789
+ "gmp-advanced-marker",
790
+ {
791
+ title: markerData.title,
792
+ ref: (el) => {
793
+ if (el) {
794
+ el.position = markerData.position;
795
+ el.addEventListener("gmp-click", () => handleMarkerClick(idx, el));
796
+ }
797
+ },
798
+ children: /* @__PURE__ */ jsx(
799
+ "div",
800
+ {
801
+ className: "flex items-center justify-center w-8 h-8 border-[3px] border-background shadow-lg cursor-pointer origin-center transition-transform duration-200",
802
+ style: {
803
+ borderRadius: "50% 50% 50% 0",
804
+ transform: "rotate(-45deg)",
805
+ backgroundColor: markerColor
806
+ },
807
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center rotate-45", children: markerData.iconSvg ? /* @__PURE__ */ jsx(
808
+ "div",
809
+ {
810
+ dangerouslySetInnerHTML: { __html: markerData.iconSvg },
811
+ style: { color: iconColor, width: 16, height: 16, fill: "currentColor" }
812
+ }
813
+ ) : /* @__PURE__ */ jsx("span", { className: "font-semibold text-sm", style: { color: iconColor }, children: markerData.icon || markerData.label || "" }) })
814
+ }
815
+ )
816
+ },
817
+ idx
818
+ )
819
+ );
820
+ })
821
+ }
822
+ )
823
+ }
824
+ );
825
+ }
826
+ );
827
+ MapContent.displayName = "MapContent";
828
+ const Map$1 = React__default.forwardRef(
829
+ (props, ref) => {
830
+ const { isLoaded, loadError } = useGoogleMapsLoader();
831
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__$1 && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
832
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
833
+ if (isLoaded || isValidKey || loadError) {
834
+ return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
835
+ }
836
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
837
+ if (isScriptInjected) {
838
+ return /* @__PURE__ */ jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
839
+ }
840
+ return /* @__PURE__ */ jsx(
841
+ "div",
842
+ {
843
+ ref,
844
+ className: cn(
845
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
846
+ props.className
847
+ ),
848
+ style: { height: props.height || "400px" },
849
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
850
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { className: "w-8 h-8 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
851
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
852
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
853
+ ] }) }),
854
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
855
+ ] }) })
856
+ }
857
+ );
858
+ }
859
+ );
860
+ Map$1.displayName = "Map";
861
+ function PageHeader({
862
+ title,
863
+ subtitle,
864
+ backHref,
865
+ onBack,
866
+ renderBackLink,
867
+ actions,
868
+ className,
869
+ backLabel = "Back"
870
+ }) {
871
+ const showBack = !!(backHref || onBack || renderBackLink);
872
+ const icon = /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5" });
873
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4 md:flex-row md:items-center md:justify-between mb-8", className), children: [
874
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
875
+ showBack && /* @__PURE__ */ jsx(
876
+ Button,
877
+ {
878
+ variant: "outline",
879
+ size: "icon",
880
+ className: "h-10 w-10 shrink-0",
881
+ onClick: onBack,
882
+ asChild: !!renderBackLink || !!backHref,
883
+ "aria-label": backLabel,
884
+ children: renderBackLink ? renderBackLink(icon) : backHref ? /* @__PURE__ */ jsx("a", { href: backHref, children: icon }) : icon
885
+ }
886
+ ),
887
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-1", children: [
888
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: title }),
889
+ subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: subtitle })
890
+ ] })
891
+ ] }),
892
+ actions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: actions })
893
+ ] });
894
+ }
895
+ function PageHeaderHeading({
896
+ className,
897
+ ...props
898
+ }) {
899
+ return /* @__PURE__ */ jsx(
900
+ "h1",
901
+ {
902
+ className: cn(
903
+ "text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]",
904
+ className
905
+ ),
906
+ ...props
907
+ }
908
+ );
909
+ }
910
+ function PageHeaderDescription({
911
+ className,
912
+ ...props
913
+ }) {
914
+ return /* @__PURE__ */ jsx(
915
+ "p",
916
+ {
917
+ className: cn(
918
+ "text-lg text-muted-foreground sm:text-xl",
919
+ className
920
+ ),
921
+ ...props
922
+ }
923
+ );
924
+ }
925
+ function AlertDialog({
926
+ ...props
927
+ }) {
928
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
929
+ }
930
+ function AlertDialogTrigger({
931
+ ...props
932
+ }) {
933
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
934
+ }
935
+ function AlertDialogPortal({
936
+ ...props
937
+ }) {
938
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
939
+ }
940
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => {
941
+ return /* @__PURE__ */ jsx(
942
+ AlertDialogPrimitive.Overlay,
943
+ {
944
+ ref,
945
+ "data-slot": "alert-dialog-overlay",
946
+ className: cn(
947
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
948
+ className
949
+ ),
950
+ ...props
951
+ }
952
+ );
953
+ });
954
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
955
+ function AlertDialogContent({
956
+ className,
957
+ ...props
958
+ }) {
959
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
960
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
961
+ /* @__PURE__ */ jsx(
962
+ AlertDialogPrimitive.Content,
963
+ {
964
+ "data-slot": "alert-dialog-content",
965
+ className: cn(
966
+ "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
967
+ className
968
+ ),
969
+ ...props
970
+ }
971
+ )
972
+ ] });
973
+ }
974
+ function AlertDialogHeader({
975
+ className,
976
+ ...props
977
+ }) {
978
+ return /* @__PURE__ */ jsx(
979
+ "div",
980
+ {
981
+ "data-slot": "alert-dialog-header",
982
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
983
+ ...props
984
+ }
985
+ );
986
+ }
987
+ function AlertDialogFooter({
988
+ className,
989
+ ...props
990
+ }) {
991
+ return /* @__PURE__ */ jsx(
992
+ "div",
993
+ {
994
+ "data-slot": "alert-dialog-footer",
995
+ className: cn(
996
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
997
+ className
998
+ ),
999
+ ...props
1000
+ }
1001
+ );
1002
+ }
1003
+ function AlertDialogTitle({
1004
+ className,
1005
+ ...props
1006
+ }) {
1007
+ return /* @__PURE__ */ jsx(
1008
+ AlertDialogPrimitive.Title,
1009
+ {
1010
+ "data-slot": "alert-dialog-title",
1011
+ className: cn("text-lg font-semibold", className),
1012
+ ...props
1013
+ }
1014
+ );
1015
+ }
1016
+ function AlertDialogDescription({
1017
+ className,
1018
+ ...props
1019
+ }) {
1020
+ return /* @__PURE__ */ jsx(
1021
+ AlertDialogPrimitive.Description,
1022
+ {
1023
+ "data-slot": "alert-dialog-description",
1024
+ className: cn("text-muted-foreground text-sm", className),
1025
+ ...props
1026
+ }
1027
+ );
1028
+ }
1029
+ function AlertDialogAction({
1030
+ className,
1031
+ ...props
1032
+ }) {
1033
+ return /* @__PURE__ */ jsx(
1034
+ AlertDialogPrimitive.Action,
1035
+ {
1036
+ className: cn(buttonVariants(), className),
1037
+ ...props
1038
+ }
1039
+ );
1040
+ }
1041
+ function AlertDialogCancel({
1042
+ className,
1043
+ ...props
1044
+ }) {
1045
+ return /* @__PURE__ */ jsx(
1046
+ AlertDialogPrimitive.Cancel,
1047
+ {
1048
+ className: cn(buttonVariants({ variant: "outline" }), className),
1049
+ ...props
1050
+ }
1051
+ );
1052
+ }
1053
+ const ERROR_IMG_SRC = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==";
1054
+ function ImageWithFallback(props) {
1055
+ const [didError, setDidError] = useState(false);
1056
+ const handleError = () => {
1057
+ setDidError(true);
1058
+ };
1059
+ const { src, alt, style, className, ...rest } = props;
1060
+ return didError ? /* @__PURE__ */ jsx(
1061
+ "div",
1062
+ {
1063
+ className: `inline-block bg-gray-100 text-center align-middle ${className ?? ""}`,
1064
+ style,
1065
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx("img", { src: ERROR_IMG_SRC, alt: "Error loading image", ...rest, "data-original-url": src }) })
1066
+ }
1067
+ ) : /* @__PURE__ */ jsx("img", { src, alt, className, style, ...rest, onError: handleError });
1068
+ }
1069
+ function AspectRatio({
1070
+ ...props
1071
+ }) {
1072
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
1073
+ }
1074
+ const ResizableContext = React.createContext(null);
1075
+ const ResizablePanelGroup = ({
1076
+ children,
1077
+ className,
1078
+ direction = "horizontal",
1079
+ id,
1080
+ autoSaveId,
1081
+ storage,
1082
+ onLayout,
1083
+ ...props
1084
+ }) => {
1085
+ const [panels, setPanels] = React.useState(/* @__PURE__ */ new Map());
1086
+ const [handles, setHandles] = React.useState(/* @__PURE__ */ new Map());
1087
+ const [sizes, setSizes] = React.useState(/* @__PURE__ */ new Map());
1088
+ const [isDragging, setIsDragging] = React.useState(false);
1089
+ const containerRef = React.useRef(null);
1090
+ const getSortedItems = React.useCallback((items) => {
1091
+ if (!containerRef.current) return [];
1092
+ return Array.from(items.values()).sort((a, b) => {
1093
+ if (!a.ref.current || !b.ref.current) return 0;
1094
+ const position = a.ref.current.compareDocumentPosition(b.ref.current);
1095
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
1096
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
1097
+ return 0;
1098
+ });
1099
+ }, []);
1100
+ React.useEffect(() => {
1101
+ const sortedPanels = getSortedItems(panels);
1102
+ if (sortedPanels.length === 0) return;
1103
+ const uninitialized = sortedPanels.some((p) => !sizes.has(p.id));
1104
+ if (uninitialized) {
1105
+ const newSizes = new Map(sizes);
1106
+ const remainingSpace = 100;
1107
+ const defaultSizeCount = sortedPanels.filter((p) => p.defaultSize).length;
1108
+ let usedSpace = 0;
1109
+ sortedPanels.forEach((p) => {
1110
+ if (p.defaultSize) usedSpace += p.defaultSize;
1111
+ });
1112
+ const spaceForOthers = Math.max(0, remainingSpace - usedSpace);
1113
+ const countOthers = sortedPanels.length - defaultSizeCount;
1114
+ const sizeForOthers = countOthers > 0 ? spaceForOthers / countOthers : 0;
1115
+ sortedPanels.forEach((p) => {
1116
+ if (!newSizes.has(p.id)) {
1117
+ newSizes.set(p.id, p.defaultSize ?? sizeForOthers);
1118
+ }
1119
+ });
1120
+ setSizes(newSizes);
1121
+ }
1122
+ }, [panels, sizes, getSortedItems]);
1123
+ const registerPanel = React.useCallback((data) => {
1124
+ setPanels((prev) => {
1125
+ const next = new Map(prev);
1126
+ next.set(data.id, data);
1127
+ return next;
1128
+ });
1129
+ }, []);
1130
+ const unregisterPanel = React.useCallback((id2) => {
1131
+ setPanels((prev) => {
1132
+ const next = new Map(prev);
1133
+ next.delete(id2);
1134
+ return next;
1135
+ });
1136
+ setSizes((prev) => {
1137
+ const next = new Map(prev);
1138
+ next.delete(id2);
1139
+ return next;
1140
+ });
1141
+ }, []);
1142
+ const registerHandle = React.useCallback((data) => {
1143
+ setHandles((prev) => {
1144
+ const next = new Map(prev);
1145
+ next.set(data.id, data);
1146
+ return next;
1147
+ });
1148
+ }, []);
1149
+ const unregisterHandle = React.useCallback((id2) => {
1150
+ setHandles((prev) => {
1151
+ const next = new Map(prev);
1152
+ next.delete(id2);
1153
+ return next;
1154
+ });
1155
+ }, []);
1156
+ const startDragging = React.useCallback((handleId, event) => {
1157
+ var _a, _b;
1158
+ event.preventDefault();
1159
+ setIsDragging(true);
1160
+ const sortedPanels = getSortedItems(panels);
1161
+ const sortedHandles = getSortedItems(handles);
1162
+ const handleIndex = sortedHandles.findIndex((h) => h.id === handleId);
1163
+ if (handleIndex === -1) return;
1164
+ const leftPanel = sortedPanels[handleIndex];
1165
+ const rightPanel = sortedPanels[handleIndex + 1];
1166
+ if (!leftPanel || !rightPanel) return;
1167
+ const startX = "touches" in event ? event.touches[0].clientX : event.clientX;
1168
+ const startY = "touches" in event ? event.touches[0].clientY : event.clientY;
1169
+ const startSizeLeft = sizes.get(leftPanel.id) || 0;
1170
+ const startSizeRight = sizes.get(rightPanel.id) || 0;
1171
+ const containerSize = direction === "horizontal" ? ((_a = containerRef.current) == null ? void 0 : _a.offsetWidth) || 1 : ((_b = containerRef.current) == null ? void 0 : _b.offsetHeight) || 1;
1172
+ const onMove = (e) => {
1173
+ var _a2, _b2;
1174
+ const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
1175
+ const currentY = "touches" in e ? e.touches[0].clientY : e.clientY;
1176
+ const deltaPixels = direction === "horizontal" ? currentX - startX : currentY - startY;
1177
+ const deltaPercent = deltaPixels / containerSize * 100;
1178
+ let finalLeft = startSizeLeft + deltaPercent;
1179
+ let finalRight = startSizeRight - deltaPercent;
1180
+ if (leftPanel.minSize !== void 0 && finalLeft < leftPanel.minSize) {
1181
+ const diff = leftPanel.minSize - finalLeft;
1182
+ finalLeft = leftPanel.minSize;
1183
+ finalRight -= diff;
1184
+ }
1185
+ if (rightPanel.minSize !== void 0 && finalRight < rightPanel.minSize) {
1186
+ const diff = rightPanel.minSize - finalRight;
1187
+ finalRight = rightPanel.minSize;
1188
+ finalLeft -= diff;
1189
+ }
1190
+ if (leftPanel.maxSize !== void 0 && finalLeft > leftPanel.maxSize) {
1191
+ const diff = finalLeft - leftPanel.maxSize;
1192
+ finalLeft = leftPanel.maxSize;
1193
+ finalRight += diff;
1194
+ }
1195
+ if (rightPanel.maxSize !== void 0 && finalRight > rightPanel.maxSize) {
1196
+ const diff = finalRight - rightPanel.maxSize;
1197
+ finalRight = rightPanel.maxSize;
1198
+ finalLeft -= diff;
1199
+ }
1200
+ finalLeft = Math.max(0, Math.min(100, finalLeft));
1201
+ finalRight = Math.max(0, Math.min(100, finalRight));
1202
+ setSizes((prev) => {
1203
+ const next = new Map(prev);
1204
+ next.set(leftPanel.id, finalLeft);
1205
+ next.set(rightPanel.id, finalRight);
1206
+ return next;
1207
+ });
1208
+ (_a2 = leftPanel.onResize) == null ? void 0 : _a2.call(leftPanel, finalLeft);
1209
+ (_b2 = rightPanel.onResize) == null ? void 0 : _b2.call(rightPanel, finalRight);
1210
+ };
1211
+ const onUp = () => {
1212
+ setIsDragging(false);
1213
+ window.removeEventListener("mousemove", onMove);
1214
+ window.removeEventListener("mouseup", onUp);
1215
+ window.removeEventListener("touchmove", onMove);
1216
+ window.removeEventListener("touchend", onUp);
1217
+ if (onLayout) {
1218
+ onLayout(sortedPanels.map((p) => sizes.get(p.id) || 0));
1219
+ }
1220
+ };
1221
+ window.addEventListener("mousemove", onMove);
1222
+ window.addEventListener("mouseup", onUp);
1223
+ window.addEventListener("touchmove", onMove);
1224
+ window.addEventListener("touchend", onUp);
1225
+ }, [panels, handles, sizes, direction, getSortedItems, onLayout]);
1226
+ const getPanelStyle = React.useCallback((id2) => {
1227
+ const size = sizes.get(id2);
1228
+ if (size === void 0) return { flex: "1 1 0%", overflow: "hidden" };
1229
+ return { flex: `${size} 1 0%`, overflow: "hidden" };
1230
+ }, [sizes]);
1231
+ const contextValue = React.useMemo(() => ({
1232
+ direction,
1233
+ registerPanel,
1234
+ unregisterPanel,
1235
+ registerHandle,
1236
+ unregisterHandle,
1237
+ isDragging,
1238
+ startDragging,
1239
+ getPanelStyle
1240
+ }), [direction, registerPanel, unregisterPanel, registerHandle, unregisterHandle, isDragging, startDragging, getPanelStyle]);
1241
+ return /* @__PURE__ */ jsx(ResizableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1242
+ "div",
1243
+ {
1244
+ ref: containerRef,
1245
+ "data-slot": "resizable-panel-group",
1246
+ "data-panel-group-direction": direction,
1247
+ className: cn(
1248
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
1249
+ className
1250
+ ),
1251
+ ...props,
1252
+ children
1253
+ }
1254
+ ) });
1255
+ };
1256
+ const ResizablePanel = ({
1257
+ className,
1258
+ defaultSize,
1259
+ minSize = 0,
1260
+ maxSize = 100,
1261
+ collapsible,
1262
+ collapsedSize,
1263
+ onCollapse,
1264
+ onExpand,
1265
+ onResize,
1266
+ order,
1267
+ tagName,
1268
+ id: propId,
1269
+ children,
1270
+ ...props
1271
+ }) => {
1272
+ const context = React.useContext(ResizableContext);
1273
+ const ref = React.useRef(null);
1274
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1275
+ const id = propId || generatedId;
1276
+ const registerPanel = context == null ? void 0 : context.registerPanel;
1277
+ const unregisterPanel = context == null ? void 0 : context.unregisterPanel;
1278
+ React.useLayoutEffect(() => {
1279
+ if (!registerPanel || !unregisterPanel) return;
1280
+ registerPanel({
1281
+ id,
1282
+ ref,
1283
+ defaultSize,
1284
+ minSize,
1285
+ maxSize,
1286
+ collapsible,
1287
+ onCollapse,
1288
+ onExpand,
1289
+ onResize
1290
+ });
1291
+ return () => unregisterPanel(id);
1292
+ }, [registerPanel, unregisterPanel, id, defaultSize, minSize, maxSize, collapsible, onCollapse, onExpand, onResize]);
1293
+ if (!context) {
1294
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1", className), ...props, children });
1295
+ }
1296
+ return /* @__PURE__ */ jsx(
1297
+ "div",
1298
+ {
1299
+ ref,
1300
+ "data-slot": "resizable-panel",
1301
+ className: cn("relative transition-[flex-grow] duration-0", className),
1302
+ style: context.getPanelStyle(id),
1303
+ ...props,
1304
+ children
1305
+ }
1306
+ );
1307
+ };
1308
+ const ResizableHandle = ({
1309
+ withHandle,
1310
+ className,
1311
+ id: propId,
1312
+ tagName,
1313
+ ...props
1314
+ }) => {
1315
+ const context = React.useContext(ResizableContext);
1316
+ const ref = React.useRef(null);
1317
+ const [generatedId] = React.useState(() => Math.random().toString(36).substr(2, 9));
1318
+ const id = propId || generatedId;
1319
+ const registerHandle = context == null ? void 0 : context.registerHandle;
1320
+ const unregisterHandle = context == null ? void 0 : context.unregisterHandle;
1321
+ React.useLayoutEffect(() => {
1322
+ if (!registerHandle || !unregisterHandle) return;
1323
+ registerHandle({ id, ref });
1324
+ return () => unregisterHandle(id);
1325
+ }, [registerHandle, unregisterHandle, id]);
1326
+ const handleMouseDown = (e) => {
1327
+ if (context) {
1328
+ context.startDragging(id, e);
1329
+ }
1330
+ };
1331
+ if (!context) return null;
1332
+ return /* @__PURE__ */ jsx(
1333
+ "div",
1334
+ {
1335
+ ref,
1336
+ "data-slot": "resizable-handle",
1337
+ className: cn(
1338
+ "bg-border relative flex items-center justify-center focus-visible:outline-hidden",
1339
+ "touch-none select-none",
1340
+ context.direction === "vertical" ? "h-px w-full cursor-row-resize after:left-0 after:h-1 after:w-full after:-translate-y-1/2 hover:after:h-4" : "w-px h-full cursor-col-resize after:top-0 after:w-1 after:h-full after:-translate-x-1/2 hover:after:w-4",
1341
+ "after:absolute after:z-10",
1342
+ className
1343
+ ),
1344
+ onMouseDown: handleMouseDown,
1345
+ onTouchStart: handleMouseDown,
1346
+ ...props,
1347
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" }) })
1348
+ }
1349
+ );
1350
+ };
1351
+ function NavigationMenu({
1352
+ className,
1353
+ children,
1354
+ viewport = true,
1355
+ ...props
1356
+ }) {
1357
+ return /* @__PURE__ */ jsxs(
1358
+ NavigationMenuPrimitive.Root,
1359
+ {
1360
+ "data-slot": "navigation-menu",
1361
+ className: cn(
1362
+ "relative z-10 flex w-full flex-1 items-center justify-center",
1363
+ className
1364
+ ),
1365
+ ...props,
1366
+ children: [
1367
+ children,
1368
+ viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
1369
+ ]
1370
+ }
1371
+ );
1372
+ }
1373
+ function NavigationMenuList({
1374
+ className,
1375
+ ...props
1376
+ }) {
1377
+ return /* @__PURE__ */ jsx(
1378
+ NavigationMenuPrimitive.List,
1379
+ {
1380
+ "data-slot": "navigation-menu-list",
1381
+ className: cn(
1382
+ "group flex flex-1 list-none items-center justify-center gap-1",
1383
+ className
1384
+ ),
1385
+ ...props
1386
+ }
1387
+ );
1388
+ }
1389
+ function NavigationMenuItem({
1390
+ className,
1391
+ ...props
1392
+ }) {
1393
+ return /* @__PURE__ */ jsx(
1394
+ NavigationMenuPrimitive.Item,
1395
+ {
1396
+ "data-slot": "navigation-menu-item",
1397
+ className: cn("relative", className),
1398
+ ...props
1399
+ }
1400
+ );
1401
+ }
1402
+ const navigationMenuTriggerStyle = cva(
1403
+ "group inline-flex h-10 w-max items-center justify-center rounded-[var(--radius)] bg-background px-4 py-2 text-[var(--text-p)] font-[var(--font-weight-medium)] hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 outline-none focus-visible:ring-2 focus-visible:ring-ring"
1404
+ );
1405
+ function NavigationMenuTrigger({
1406
+ className,
1407
+ children,
1408
+ ...props
1409
+ }) {
1410
+ return /* @__PURE__ */ jsxs(
1411
+ NavigationMenuPrimitive.Trigger,
1412
+ {
1413
+ "data-slot": "navigation-menu-trigger",
1414
+ className: cn(navigationMenuTriggerStyle(), "group", className),
1415
+ ...props,
1416
+ children: [
1417
+ children,
1418
+ " ",
1419
+ /* @__PURE__ */ jsx(
1420
+ ChevronDownIcon,
1421
+ {
1422
+ className: "relative top-[1px] ml-1 size-3 group-data-[state=open]:rotate-180",
1423
+ "aria-hidden": "true"
1424
+ }
1425
+ )
1426
+ ]
1427
+ }
1428
+ );
1429
+ }
1430
+ function NavigationMenuContent({
1431
+ className,
1432
+ ...props
1433
+ }) {
1434
+ return /* @__PURE__ */ jsx(
1435
+ NavigationMenuPrimitive.Content,
1436
+ {
1437
+ "data-slot": "navigation-menu-content",
1438
+ className: cn(
1439
+ "left-0 top-0 w-full md:w-auto",
1440
+ className
1441
+ ),
1442
+ ...props
1443
+ }
1444
+ );
1445
+ }
1446
+ function NavigationMenuViewport({
1447
+ className,
1448
+ ...props
1449
+ }) {
1450
+ return /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center w-full"), children: /* @__PURE__ */ jsx(
1451
+ NavigationMenuPrimitive.Viewport,
1452
+ {
1453
+ "data-slot": "navigation-menu-viewport",
1454
+ className: cn(
1455
+ "origin-top-center relative mt-1.5 overflow-hidden rounded-[var(--radius)] border border-border bg-popover text-popover-foreground shadow-lg",
1456
+ className
1457
+ ),
1458
+ ...props
1459
+ }
1460
+ ) });
1461
+ }
1462
+ function NavigationMenuLink({
1463
+ className,
1464
+ ...props
1465
+ }) {
1466
+ return /* @__PURE__ */ jsx(
1467
+ NavigationMenuPrimitive.Link,
1468
+ {
1469
+ "data-slot": "navigation-menu-link",
1470
+ className: cn(
1471
+ "block select-none space-y-1 rounded-[var(--radius)] p-3 leading-none no-underline outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
1472
+ className
1473
+ ),
1474
+ ...props
1475
+ }
1476
+ );
1477
+ }
1478
+ function NavigationMenuIndicator({
1479
+ className,
1480
+ ...props
1481
+ }) {
1482
+ return /* @__PURE__ */ jsx(
1483
+ NavigationMenuPrimitive.Indicator,
1484
+ {
1485
+ "data-slot": "navigation-menu-indicator",
1486
+ className: cn(
1487
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
1488
+ className
1489
+ ),
1490
+ ...props,
1491
+ children: /* @__PURE__ */ jsx("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
1492
+ }
1493
+ );
1494
+ }
1495
+ function Pagination({ className, ...props }) {
1496
+ return /* @__PURE__ */ jsx(
1497
+ "nav",
1498
+ {
1499
+ role: "navigation",
1500
+ "aria-label": "pagination",
1501
+ "data-slot": "pagination",
1502
+ className: cn("mx-auto flex w-full justify-center", className),
1503
+ ...props
1504
+ }
1505
+ );
1506
+ }
1507
+ function PaginationContent({
1508
+ className,
1509
+ ...props
1510
+ }) {
1511
+ return /* @__PURE__ */ jsx(
1512
+ "ul",
1513
+ {
1514
+ "data-slot": "pagination-content",
1515
+ className: cn("flex flex-row items-center gap-1", className),
1516
+ ...props
1517
+ }
1518
+ );
1519
+ }
1520
+ function PaginationItem({ ...props }) {
1521
+ return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
1522
+ }
1523
+ function PaginationLink({
1524
+ className,
1525
+ isActive,
1526
+ size = "icon",
1527
+ ...props
1528
+ }) {
1529
+ return /* @__PURE__ */ jsx(
1530
+ "a",
1531
+ {
1532
+ "aria-current": isActive ? "page" : void 0,
1533
+ "data-slot": "pagination-link",
1534
+ "data-active": isActive,
1535
+ className: cn(
1536
+ buttonVariants({
1537
+ variant: isActive ? "outline" : "ghost",
1538
+ size
1539
+ }),
1540
+ className
1541
+ ),
1542
+ ...props
1543
+ }
1544
+ );
1545
+ }
1546
+ function PaginationPrevious({
1547
+ className,
1548
+ ...props
1549
+ }) {
1550
+ return /* @__PURE__ */ jsxs(
1551
+ PaginationLink,
1552
+ {
1553
+ "aria-label": "Go to previous page",
1554
+ size: "default",
1555
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className),
1556
+ ...props,
1557
+ children: [
1558
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
1559
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
1560
+ ]
1561
+ }
1562
+ );
1563
+ }
1564
+ function PaginationNext({
1565
+ className,
1566
+ ...props
1567
+ }) {
1568
+ return /* @__PURE__ */ jsxs(
1569
+ PaginationLink,
1570
+ {
1571
+ "aria-label": "Go to next page",
1572
+ size: "default",
1573
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className),
1574
+ ...props,
1575
+ children: [
1576
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
1577
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
1578
+ ]
1579
+ }
1580
+ );
1581
+ }
1582
+ function PaginationEllipsis({
1583
+ className,
1584
+ ...props
1585
+ }) {
1586
+ return /* @__PURE__ */ jsxs(
1587
+ "span",
1588
+ {
1589
+ "aria-hidden": true,
1590
+ "data-slot": "pagination-ellipsis",
1591
+ className: cn("flex size-9 items-center justify-center", className),
1592
+ ...props,
1593
+ children: [
1594
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
1595
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
1596
+ ]
1597
+ }
1598
+ );
1599
+ }
1600
+ const toggleVariants = cva(
1601
+ "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
1602
+ {
1603
+ variants: {
1604
+ variant: {
1605
+ default: "bg-transparent",
1606
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1607
+ },
1608
+ size: {
1609
+ default: "h-9 px-2 min-w-9",
1610
+ sm: "h-8 px-1.5 min-w-8",
1611
+ lg: "h-10 px-2.5 min-w-10"
1612
+ }
1613
+ },
1614
+ defaultVariants: {
1615
+ variant: "default",
1616
+ size: "default"
1617
+ }
1618
+ }
1619
+ );
1620
+ const Toggle = React.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
1621
+ TogglePrimitive.Root,
1622
+ {
1623
+ ref,
1624
+ "data-slot": "toggle",
1625
+ className: cn(toggleVariants({ variant, size, className })),
1626
+ ...props
1627
+ }
1628
+ ));
1629
+ Toggle.displayName = TogglePrimitive.Root.displayName;
1630
+ const ToggleGroupContext = React.createContext({
1631
+ size: "default",
1632
+ variant: "default"
1633
+ });
1634
+ const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
1635
+ ToggleGroupPrimitive.Root,
1636
+ {
1637
+ ref,
1638
+ "data-slot": "toggle-group",
1639
+ "data-variant": variant,
1640
+ "data-size": size,
1641
+ className: cn(
1642
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
1643
+ className
1644
+ ),
1645
+ ...props,
1646
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
1647
+ }
1648
+ ));
1649
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
1650
+ const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
1651
+ const context = React.useContext(ToggleGroupContext);
1652
+ return /* @__PURE__ */ jsx(
1653
+ ToggleGroupPrimitive.Item,
1654
+ {
1655
+ ref,
1656
+ "data-slot": "toggle-group-item",
1657
+ "data-variant": context.variant || variant,
1658
+ "data-size": context.size || size,
1659
+ className: cn(
1660
+ toggleVariants({
1661
+ variant: context.variant || variant,
1662
+ size: context.size || size
1663
+ }),
1664
+ "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
1665
+ className
1666
+ ),
1667
+ ...props,
1668
+ children
1669
+ }
1670
+ );
1671
+ });
1672
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
1673
+ function InputOTP({
1674
+ className,
1675
+ containerClassName,
1676
+ ...props
1677
+ }) {
1678
+ return /* @__PURE__ */ jsx(
1679
+ OTPInput,
1680
+ {
1681
+ "data-slot": "input-otp",
1682
+ containerClassName: cn(
1683
+ "flex items-center gap-2 has-disabled:opacity-50",
1684
+ containerClassName
1685
+ ),
1686
+ className: cn("disabled:cursor-not-allowed", className),
1687
+ ...props
1688
+ }
1689
+ );
1690
+ }
1691
+ function InputOTPGroup({ className, ...props }) {
1692
+ return /* @__PURE__ */ jsx(
1693
+ "div",
1694
+ {
1695
+ "data-slot": "input-otp-group",
1696
+ className: cn("flex items-center gap-1", className),
1697
+ ...props
1698
+ }
1699
+ );
1700
+ }
1701
+ function InputOTPSlot({
1702
+ index,
1703
+ className,
1704
+ size = "md",
1705
+ ...props
1706
+ }) {
1707
+ const inputOTPContext = React.useContext(OTPInputContext);
1708
+ const { char, hasFakeCaret, isActive } = (inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) ?? {};
1709
+ const sizeClasses = {
1710
+ sm: "h-8 w-8 text-sm",
1711
+ md: "h-10 w-10 text-base",
1712
+ lg: "h-12 w-12 text-lg"
1713
+ };
1714
+ return /* @__PURE__ */ jsxs(
1715
+ "div",
1716
+ {
1717
+ "data-slot": "input-otp-slot",
1718
+ "data-active": isActive,
1719
+ className: cn(
1720
+ "data-[active=true]:border-primary data-[active=true]:ring-primary/20 data-[active=true]:aria-invalid:ring-destructive/20 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive relative flex items-center justify-center border border-border rounded-[var(--radius)] bg-background transition-all outline-none data-[active=true]:z-10 data-[active=true]:ring-2",
1721
+ sizeClasses[size],
1722
+ className
1723
+ ),
1724
+ ...props,
1725
+ children: [
1726
+ char,
1727
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
1728
+ ]
1729
+ }
1730
+ );
1731
+ }
1732
+ function InputOTPSeparator({ ...props }) {
1733
+ return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
1734
+ }
1735
+ const Form = FormProvider;
1736
+ const FormFieldContext = React.createContext(
1737
+ {}
1738
+ );
1739
+ const FormField = ({
1740
+ ...props
1741
+ }) => {
1742
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1743
+ };
1744
+ const useFormField = () => {
1745
+ const fieldContext = React.useContext(FormFieldContext);
1746
+ const itemContext = React.useContext(FormItemContext);
1747
+ const { getFieldState } = useFormContext();
1748
+ const formState = useFormState({ name: fieldContext.name });
1749
+ const fieldState = getFieldState(
1750
+ fieldContext.name,
1751
+ formState
1752
+ );
1753
+ if (!fieldContext) {
1754
+ throw new Error(
1755
+ "useFormField should be used within <FormField>"
1756
+ );
1757
+ }
1758
+ const { id } = itemContext;
1759
+ return {
1760
+ id,
1761
+ name: fieldContext.name,
1762
+ formItemId: `${id}-form-item`,
1763
+ formDescriptionId: `${id}-form-item-description`,
1764
+ formMessageId: `${id}-form-item-message`,
1765
+ ...fieldState
1766
+ };
1767
+ };
1768
+ const FormItemContext = React.createContext(
1769
+ {}
1770
+ );
1771
+ function FormItem({
1772
+ className,
1773
+ ...props
1774
+ }) {
1775
+ const id = React.useId();
1776
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx(
1777
+ "div",
1778
+ {
1779
+ "data-slot": "form-item",
1780
+ className: cn("grid gap-2", className),
1781
+ ...props
1782
+ }
1783
+ ) });
1784
+ }
1785
+ function FormLabel({
1786
+ className,
1787
+ ...props
1788
+ }) {
1789
+ const { error, formItemId } = useFormField();
1790
+ return /* @__PURE__ */ jsx(
1791
+ Label,
1792
+ {
1793
+ "data-slot": "form-label",
1794
+ "data-error": !!error,
1795
+ className: cn(
1796
+ "data-[error=true]:text-destructive",
1797
+ className
1798
+ ),
1799
+ htmlFor: formItemId,
1800
+ ...props
1801
+ }
1802
+ );
1803
+ }
1804
+ function FormControl({
1805
+ ...props
1806
+ }) {
1807
+ const {
1808
+ error,
1809
+ formItemId,
1810
+ formDescriptionId,
1811
+ formMessageId
1812
+ } = useFormField();
1813
+ return /* @__PURE__ */ jsx(
1814
+ Slot,
1815
+ {
1816
+ "data-slot": "form-control",
1817
+ id: formItemId,
1818
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
1819
+ "aria-invalid": !!error,
1820
+ ...props
1821
+ }
1822
+ );
1823
+ }
1824
+ function FormDescription({
1825
+ className,
1826
+ ...props
1827
+ }) {
1828
+ const { formDescriptionId } = useFormField();
1829
+ return /* @__PURE__ */ jsx(
1830
+ "p",
1831
+ {
1832
+ "data-slot": "form-description",
1833
+ id: formDescriptionId,
1834
+ className: cn("text-muted-foreground text-sm", className),
1835
+ ...props
1836
+ }
1837
+ );
1838
+ }
1839
+ function FormMessage({
1840
+ className,
1841
+ ...props
1842
+ }) {
1843
+ const { error, formMessageId } = useFormField();
1844
+ const body = error ? String((error == null ? void 0 : error.message) ?? "") : props.children;
1845
+ if (!body) {
1846
+ return null;
1847
+ }
1848
+ return /* @__PURE__ */ jsx(
1849
+ "p",
1850
+ {
1851
+ "data-slot": "form-message",
1852
+ id: formMessageId,
1853
+ className: cn("text-destructive text-sm", className),
1854
+ ...props,
1855
+ children: body
1856
+ }
1857
+ );
1858
+ }
1859
+ function Calendar({
1860
+ className,
1861
+ classNames,
1862
+ showOutsideDays = true,
1863
+ captionLayout = "label",
1864
+ buttonVariant = "ghost",
1865
+ formatters,
1866
+ components,
1867
+ ...props
1868
+ }) {
1869
+ const defaultClassNames = getDefaultClassNames();
1870
+ return /* @__PURE__ */ jsx(
1871
+ DayPicker,
1872
+ {
1873
+ showOutsideDays,
1874
+ className: cn(
1875
+ "bg-background group/calendar p-4 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent font-sans",
1876
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
1877
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
1878
+ className
1879
+ ),
1880
+ captionLayout,
1881
+ formatters,
1882
+ classNames: {
1883
+ root: cn("w-fit", defaultClassNames.root),
1884
+ months: cn(
1885
+ "flex gap-6 flex-col md:flex-row relative",
1886
+ defaultClassNames.months
1887
+ ),
1888
+ month: cn("flex flex-col w-full gap-5", defaultClassNames.month),
1889
+ nav: cn(
1890
+ "flex items-center gap-2 w-full absolute top-0 inset-x-0 justify-between",
1891
+ defaultClassNames.nav
1892
+ ),
1893
+ button_previous: cn(
1894
+ buttonVariants({ variant: buttonVariant }),
1895
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1896
+ defaultClassNames.button_previous
1897
+ ),
1898
+ button_next: cn(
1899
+ buttonVariants({ variant: buttonVariant }),
1900
+ "size-(--cell-size) aria-disabled:opacity-40 p-0 select-none hover:bg-accent/50 transition-colors duration-200",
1901
+ defaultClassNames.button_next
1902
+ ),
1903
+ month_caption: cn(
1904
+ "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
1905
+ defaultClassNames.month_caption
1906
+ ),
1907
+ dropdowns: cn(
1908
+ "w-full flex items-center justify-center h-(--cell-size) gap-2",
1909
+ defaultClassNames.dropdowns
1910
+ ),
1911
+ dropdown_root: cn(
1912
+ "relative rounded-[var(--radius)] hover:bg-accent transition-colors",
1913
+ defaultClassNames.dropdown_root
1914
+ ),
1915
+ dropdown: cn(
1916
+ "absolute bg-popover inset-0 opacity-0 cursor-pointer",
1917
+ defaultClassNames.dropdown
1918
+ ),
1919
+ caption_label: cn(
1920
+ "select-none font-[family-name:var(--font-family,Roboto)] tracking-tight hover:bg-accent hover:text-accent-foreground transition-all duration-200 rounded-[var(--radius)] px-2 py-1",
1921
+ captionLayout === "label" ? "text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)]" : "flex items-center gap-1.5 text-[length:var(--calendar-caption-size)] font-[number:var(--font-weight-semibold)] [&>svg]:text-muted-foreground [&>svg]:size-4",
1922
+ defaultClassNames.caption_label
1923
+ ),
1924
+ table: "w-full border-collapse mt-1",
1925
+ weekdays: cn("flex gap-1", defaultClassNames.weekdays),
1926
+ weekday: cn(
1927
+ "text-muted-foreground rounded-(--cell-radius) flex-1 select-none text-[length:var(--calendar-weekday-size)] font-[number:var(--font-weight-medium)] uppercase tracking-wider",
1928
+ defaultClassNames.weekday
1929
+ ),
1930
+ week: cn("flex w-full gap-1", defaultClassNames.week),
1931
+ week_number_header: cn(
1932
+ "select-none w-(--cell-size)",
1933
+ defaultClassNames.week_number_header
1934
+ ),
1935
+ week_number: cn(
1936
+ "select-none text-muted-foreground text-[length:var(--calendar-weekday-size)]",
1937
+ defaultClassNames.week_number
1938
+ ),
1939
+ day: cn(
1940
+ "relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none",
1941
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
1942
+ defaultClassNames.day
1943
+ ),
1944
+ range_start: cn(
1945
+ "rounded-l-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:right-0 -z-0 isolate",
1946
+ defaultClassNames.range_start
1947
+ ),
1948
+ range_middle: cn(
1949
+ "rounded-none bg-accent/30",
1950
+ defaultClassNames.range_middle
1951
+ ),
1952
+ range_end: cn(
1953
+ "rounded-r-(--cell-radius) bg-accent/50 relative after:bg-accent/50 after:absolute after:inset-y-0 after:w-2 after:left-0 -z-0 isolate",
1954
+ defaultClassNames.range_end
1955
+ ),
1956
+ today: cn(
1957
+ "bg-accent/60 text-accent-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none font-[number:var(--font-weight-semibold)]",
1958
+ defaultClassNames.today
1959
+ ),
1960
+ outside: cn(
1961
+ "text-muted-foreground/40 aria-selected:text-muted-foreground/40",
1962
+ defaultClassNames.outside
1963
+ ),
1964
+ disabled: cn(
1965
+ "text-muted-foreground/30 opacity-40",
1966
+ defaultClassNames.disabled
1967
+ ),
1968
+ hidden: cn("invisible", defaultClassNames.hidden),
1969
+ ...classNames
1970
+ },
1971
+ components: {
1972
+ Root: ({ className: className2, rootRef, ...props2 }) => {
1973
+ return /* @__PURE__ */ jsx(
1974
+ "div",
1975
+ {
1976
+ "data-slot": "calendar",
1977
+ ref: rootRef,
1978
+ className: cn(className2),
1979
+ ...props2
1980
+ }
1981
+ );
1982
+ },
1983
+ Chevron: ({ className: className2, orientation, ...props2 }) => {
1984
+ if (orientation === "left") {
1985
+ return /* @__PURE__ */ jsx(
1986
+ ChevronLeft,
1987
+ {
1988
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
1989
+ ...props2
1990
+ }
1991
+ );
1992
+ }
1993
+ if (orientation === "right") {
1994
+ return /* @__PURE__ */ jsx(
1995
+ ChevronRight,
1996
+ {
1997
+ className: cn("size-5 transition-transform group-hover:scale-110", className2),
1998
+ ...props2
1999
+ }
2000
+ );
2001
+ }
2002
+ return /* @__PURE__ */ jsx(
2003
+ ChevronDown,
2004
+ {
2005
+ className: cn("size-4", className2),
2006
+ ...props2
2007
+ }
2008
+ );
2009
+ },
2010
+ DayButton: CalendarDayButton,
2011
+ WeekNumber: ({ children, ...props2 }) => {
2012
+ return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center font-[number:var(--font-weight-medium)]", children }) });
2013
+ },
2014
+ ...components
2015
+ },
2016
+ ...props
2017
+ }
2018
+ );
2019
+ }
2020
+ function CalendarDayButton({
2021
+ className,
2022
+ day,
2023
+ modifiers,
2024
+ ...props
2025
+ }) {
2026
+ const defaultClassNames = getDefaultClassNames();
2027
+ const ref = React.useRef(null);
2028
+ React.useEffect(() => {
2029
+ var _a;
2030
+ if (modifiers.focused) (_a = ref.current) == null ? void 0 : _a.focus();
2031
+ }, [modifiers.focused]);
2032
+ return /* @__PURE__ */ jsx(
2033
+ Button,
2034
+ {
2035
+ ref,
2036
+ variant: "ghost",
2037
+ size: "icon",
2038
+ "data-day": day.date.toLocaleDateString(),
2039
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
2040
+ "data-range-start": modifiers.range_start,
2041
+ "data-range-end": modifiers.range_end,
2042
+ "data-range-middle": modifiers.range_middle,
2043
+ className: cn(
2044
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col items-center justify-center gap-1 border-0 leading-none transition-all duration-200 cursor-pointer disabled:cursor-not-allowed",
2045
+ "text-[length:var(--calendar-day-size)] font-[number:var(--font-weight-regular)]",
2046
+ "hover:bg-accent/70 hover:text-accent-foreground hover:scale-105",
2047
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:font-[number:var(--font-weight-semibold)] data-[selected-single=true]:shadow-sm",
2048
+ "data-[range-middle=true]:bg-accent/50 data-[range-middle=true]:text-foreground",
2049
+ "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:font-[number:var(--font-weight-semibold)] data-[range-start=true]:shadow-sm",
2050
+ "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:font-[number:var(--font-weight-semibold)] data-[range-end=true]:shadow-sm",
2051
+ "group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-offset-2 group-data-[focused=true]/day:ring-offset-background",
2052
+ "data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius)",
2053
+ "data-[range-middle=true]:rounded-none",
2054
+ "data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius)",
2055
+ "[&>span]:opacity-80",
2056
+ defaultClassNames.day,
2057
+ className
2058
+ ),
2059
+ ...props,
2060
+ children: day.date.getDate()
2061
+ }
2062
+ );
2063
+ }
2064
+ function Sheet({ ...props }) {
2065
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
2066
+ }
2067
+ function SheetTrigger({
2068
+ ...props
2069
+ }) {
2070
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
2071
+ }
2072
+ function SheetPortal({
2073
+ ...props
2074
+ }) {
2075
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
2076
+ }
2077
+ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2078
+ DialogPrimitive.Overlay,
2079
+ {
2080
+ className: cn(
2081
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2082
+ className
2083
+ ),
2084
+ ...props,
2085
+ ref
2086
+ }
2087
+ ));
2088
+ SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
2089
+ function SheetContent({
2090
+ className,
2091
+ children,
2092
+ side = "right",
2093
+ ...props
2094
+ }) {
2095
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
2096
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
2097
+ /* @__PURE__ */ jsxs(
2098
+ DialogPrimitive.Content,
2099
+ {
2100
+ "data-slot": "sheet-content",
2101
+ className: cn(
2102
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2103
+ side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
2104
+ side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
2105
+ side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
2106
+ side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
2107
+ className
2108
+ ),
2109
+ ...props,
2110
+ children: [
2111
+ children,
2112
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2113
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
2114
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
2115
+ ] })
2116
+ ]
2117
+ }
2118
+ )
2119
+ ] });
2120
+ }
2121
+ function SheetHeader({ className, ...props }) {
2122
+ return /* @__PURE__ */ jsx(
2123
+ "div",
2124
+ {
2125
+ "data-slot": "sheet-header",
2126
+ className: cn("flex flex-col gap-1.5 px-6 pt-6", className),
2127
+ ...props
2128
+ }
2129
+ );
2130
+ }
2131
+ function SheetFooter({ className, ...props }) {
2132
+ return /* @__PURE__ */ jsx(
2133
+ "div",
2134
+ {
2135
+ "data-slot": "sheet-footer",
2136
+ className: cn("mt-auto flex flex-col gap-2 px-6 pb-6", className),
2137
+ ...props
2138
+ }
2139
+ );
2140
+ }
2141
+ function SheetTitle({
2142
+ className,
2143
+ ...props
2144
+ }) {
2145
+ return /* @__PURE__ */ jsx(
2146
+ DialogPrimitive.Title,
2147
+ {
2148
+ "data-slot": "sheet-title",
2149
+ className: cn("text-foreground font-semibold", className),
2150
+ ...props
2151
+ }
2152
+ );
2153
+ }
2154
+ function SheetDescription({
2155
+ className,
2156
+ ...props
2157
+ }) {
2158
+ return /* @__PURE__ */ jsx(
2159
+ DialogPrimitive.Description,
2160
+ {
2161
+ "data-slot": "sheet-description",
2162
+ className: cn("text-muted-foreground text-sm", className),
2163
+ ...props
2164
+ }
2165
+ );
2166
+ }
2167
+ function Drawer({
2168
+ ...props
2169
+ }) {
2170
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
2171
+ }
2172
+ function DrawerTrigger({
2173
+ ...props
2174
+ }) {
2175
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
2176
+ }
2177
+ function DrawerPortal({
2178
+ ...props
2179
+ }) {
2180
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
2181
+ }
2182
+ const DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => {
2183
+ return /* @__PURE__ */ jsx(
2184
+ Drawer$1.Overlay,
2185
+ {
2186
+ ref,
2187
+ "data-slot": "drawer-overlay",
2188
+ className: cn(
2189
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2190
+ className
2191
+ ),
2192
+ ...props
2193
+ }
2194
+ );
2195
+ });
2196
+ DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
2197
+ function DrawerContent({
2198
+ className,
2199
+ children,
2200
+ ...props
2201
+ }) {
2202
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
2203
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
2204
+ /* @__PURE__ */ jsxs(
2205
+ Drawer$1.Content,
2206
+ {
2207
+ "data-slot": "drawer-content",
2208
+ className: cn(
2209
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
2210
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
2211
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
2212
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
2213
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
2214
+ className
2215
+ ),
2216
+ ...props,
2217
+ children: [
2218
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
2219
+ children
2220
+ ]
2221
+ }
2222
+ )
2223
+ ] });
2224
+ }
2225
+ function DrawerHeader({ className, ...props }) {
2226
+ return /* @__PURE__ */ jsx(
2227
+ "div",
2228
+ {
2229
+ "data-slot": "drawer-header",
2230
+ className: cn("flex flex-col gap-1.5 p-4", className),
2231
+ ...props
2232
+ }
2233
+ );
2234
+ }
2235
+ function DrawerFooter({ className, ...props }) {
2236
+ return /* @__PURE__ */ jsx(
2237
+ "div",
2238
+ {
2239
+ "data-slot": "drawer-footer",
2240
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
2241
+ ...props
2242
+ }
2243
+ );
2244
+ }
2245
+ function DrawerTitle({
2246
+ className,
2247
+ ...props
2248
+ }) {
2249
+ return /* @__PURE__ */ jsx(
2250
+ Drawer$1.Title,
2251
+ {
2252
+ "data-slot": "drawer-title",
2253
+ className: cn("text-foreground font-semibold", className),
2254
+ ...props
2255
+ }
2256
+ );
2257
+ }
2258
+ function DrawerDescription({
2259
+ className,
2260
+ ...props
2261
+ }) {
2262
+ return /* @__PURE__ */ jsx(
2263
+ Drawer$1.Description,
2264
+ {
2265
+ "data-slot": "drawer-description",
2266
+ className: cn("text-muted-foreground text-sm", className),
2267
+ ...props
2268
+ }
2269
+ );
2270
+ }
2271
+ function DrawerHandle({ className, ...props }) {
2272
+ return /* @__PURE__ */ jsx(
2273
+ "div",
2274
+ {
2275
+ "data-slot": "drawer-handle",
2276
+ className: cn("bg-muted mx-auto mt-4 h-2 w-[100px] shrink-0 rounded-full", className),
2277
+ ...props
2278
+ }
2279
+ );
2280
+ }
2281
+ function HoverCard({
2282
+ ...props
2283
+ }) {
2284
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
2285
+ }
2286
+ function HoverCardTrigger({
2287
+ ...props
2288
+ }) {
2289
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
2290
+ }
2291
+ function HoverCardContent({
2292
+ className,
2293
+ align = "center",
2294
+ sideOffset = 4,
2295
+ ...props
2296
+ }) {
2297
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
2298
+ HoverCardPrimitive.Content,
2299
+ {
2300
+ "data-slot": "hover-card-content",
2301
+ align,
2302
+ sideOffset,
2303
+ className: cn(
2304
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
2305
+ className
2306
+ ),
2307
+ ...props
2308
+ }
2309
+ ) });
2310
+ }
2311
+ function ContextMenu({
2312
+ ...props
2313
+ }) {
2314
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
2315
+ }
2316
+ function ContextMenuTrigger({
2317
+ ...props
2318
+ }) {
2319
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
2320
+ }
2321
+ function ContextMenuGroup({
2322
+ ...props
2323
+ }) {
2324
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
2325
+ }
2326
+ function ContextMenuPortal({
2327
+ ...props
2328
+ }) {
2329
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
2330
+ }
2331
+ function ContextMenuSub({
2332
+ ...props
2333
+ }) {
2334
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
2335
+ }
2336
+ function ContextMenuRadioGroup({
2337
+ ...props
2338
+ }) {
2339
+ return /* @__PURE__ */ jsx(
2340
+ ContextMenuPrimitive.RadioGroup,
2341
+ {
2342
+ "data-slot": "context-menu-radio-group",
2343
+ ...props
2344
+ }
2345
+ );
2346
+ }
2347
+ function ContextMenuSubTrigger({
2348
+ className,
2349
+ inset,
2350
+ children,
2351
+ ...props
2352
+ }) {
2353
+ return /* @__PURE__ */ jsxs(
2354
+ ContextMenuPrimitive.SubTrigger,
2355
+ {
2356
+ "data-slot": "context-menu-sub-trigger",
2357
+ "data-inset": inset,
2358
+ className: cn(
2359
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2360
+ className
2361
+ ),
2362
+ ...props,
2363
+ children: [
2364
+ children,
2365
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })
2366
+ ]
2367
+ }
2368
+ );
2369
+ }
2370
+ function ContextMenuSubContent({
2371
+ className,
2372
+ ...props
2373
+ }) {
2374
+ return /* @__PURE__ */ jsx(
2375
+ ContextMenuPrimitive.SubContent,
2376
+ {
2377
+ "data-slot": "context-menu-sub-content",
2378
+ className: cn(
2379
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
2380
+ className
2381
+ ),
2382
+ ...props
2383
+ }
2384
+ );
2385
+ }
2386
+ function ContextMenuContent({
2387
+ className,
2388
+ ...props
2389
+ }) {
2390
+ return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2391
+ ContextMenuPrimitive.Content,
2392
+ {
2393
+ "data-slot": "context-menu-content",
2394
+ className: cn(
2395
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
2396
+ className
2397
+ ),
2398
+ ...props
2399
+ }
2400
+ ) });
2401
+ }
2402
+ function ContextMenuItem({
2403
+ className,
2404
+ inset,
2405
+ variant = "default",
2406
+ ...props
2407
+ }) {
2408
+ return /* @__PURE__ */ jsx(
2409
+ ContextMenuPrimitive.Item,
2410
+ {
2411
+ "data-slot": "context-menu-item",
2412
+ "data-inset": inset,
2413
+ "data-variant": variant,
2414
+ className: cn(
2415
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2416
+ className
2417
+ ),
2418
+ ...props
2419
+ }
2420
+ );
2421
+ }
2422
+ function ContextMenuCheckboxItem({
2423
+ className,
2424
+ children,
2425
+ checked,
2426
+ ...props
2427
+ }) {
2428
+ return /* @__PURE__ */ jsxs(
2429
+ ContextMenuPrimitive.CheckboxItem,
2430
+ {
2431
+ "data-slot": "context-menu-checkbox-item",
2432
+ className: cn(
2433
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2434
+ className
2435
+ ),
2436
+ checked,
2437
+ ...props,
2438
+ children: [
2439
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
2440
+ children
2441
+ ]
2442
+ }
2443
+ );
2444
+ }
2445
+ function ContextMenuRadioItem({
2446
+ className,
2447
+ children,
2448
+ ...props
2449
+ }) {
2450
+ return /* @__PURE__ */ jsxs(
2451
+ ContextMenuPrimitive.RadioItem,
2452
+ {
2453
+ "data-slot": "context-menu-radio-item",
2454
+ className: cn(
2455
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2456
+ className
2457
+ ),
2458
+ ...props,
2459
+ children: [
2460
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
2461
+ children
2462
+ ]
2463
+ }
2464
+ );
2465
+ }
2466
+ function ContextMenuLabel({
2467
+ className,
2468
+ inset,
2469
+ ...props
2470
+ }) {
2471
+ return /* @__PURE__ */ jsx(
2472
+ ContextMenuPrimitive.Label,
2473
+ {
2474
+ "data-slot": "context-menu-label",
2475
+ "data-inset": inset,
2476
+ className: cn(
2477
+ "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2478
+ className
2479
+ ),
2480
+ ...props
2481
+ }
2482
+ );
2483
+ }
2484
+ function ContextMenuSeparator({
2485
+ className,
2486
+ ...props
2487
+ }) {
2488
+ return /* @__PURE__ */ jsx(
2489
+ ContextMenuPrimitive.Separator,
2490
+ {
2491
+ "data-slot": "context-menu-separator",
2492
+ className: cn("bg-border -mx-1 my-1 h-px", className),
2493
+ ...props
2494
+ }
2495
+ );
2496
+ }
2497
+ function ContextMenuShortcut({
2498
+ className,
2499
+ ...props
2500
+ }) {
2501
+ return /* @__PURE__ */ jsx(
2502
+ "span",
2503
+ {
2504
+ "data-slot": "context-menu-shortcut",
2505
+ className: cn(
2506
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2507
+ className
2508
+ ),
2509
+ ...props
2510
+ }
2511
+ );
2512
+ }
2513
+ function Menubar({
2514
+ className,
2515
+ ...props
2516
+ }) {
2517
+ return /* @__PURE__ */ jsx(
2518
+ MenubarPrimitive.Root,
2519
+ {
2520
+ "data-slot": "menubar",
2521
+ className: cn(
2522
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
2523
+ className
2524
+ ),
2525
+ ...props
2526
+ }
2527
+ );
2528
+ }
2529
+ function MenubarMenu({
2530
+ ...props
2531
+ }) {
2532
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
2533
+ }
2534
+ function MenubarGroup({
2535
+ ...props
2536
+ }) {
2537
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
2538
+ }
2539
+ function MenubarPortal({
2540
+ ...props
2541
+ }) {
2542
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
2543
+ }
2544
+ function MenubarRadioGroup({
2545
+ ...props
2546
+ }) {
2547
+ return /* @__PURE__ */ jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
2548
+ }
2549
+ function MenubarTrigger({
2550
+ className,
2551
+ ...props
2552
+ }) {
2553
+ return /* @__PURE__ */ jsx(
2554
+ MenubarPrimitive.Trigger,
2555
+ {
2556
+ "data-slot": "menubar-trigger",
2557
+ className: cn(
2558
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
2559
+ className
2560
+ ),
2561
+ ...props
2562
+ }
2563
+ );
2564
+ }
2565
+ function MenubarContent({
2566
+ className,
2567
+ align = "start",
2568
+ alignOffset = -4,
2569
+ sideOffset = 8,
2570
+ ...props
2571
+ }) {
2572
+ return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
2573
+ MenubarPrimitive.Content,
2574
+ {
2575
+ "data-slot": "menubar-content",
2576
+ align,
2577
+ alignOffset,
2578
+ sideOffset,
2579
+ className: cn(
2580
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
2581
+ className
2582
+ ),
2583
+ ...props
2584
+ }
2585
+ ) });
2586
+ }
2587
+ function MenubarItem({
2588
+ className,
2589
+ inset,
2590
+ variant = "default",
2591
+ ...props
2592
+ }) {
2593
+ return /* @__PURE__ */ jsx(
2594
+ MenubarPrimitive.Item,
2595
+ {
2596
+ "data-slot": "menubar-item",
2597
+ "data-inset": inset,
2598
+ "data-variant": variant,
2599
+ className: cn(
2600
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2601
+ className
2602
+ ),
2603
+ ...props
2604
+ }
2605
+ );
2606
+ }
2607
+ function MenubarCheckboxItem({
2608
+ className,
2609
+ children,
2610
+ checked,
2611
+ ...props
2612
+ }) {
2613
+ return /* @__PURE__ */ jsxs(
2614
+ MenubarPrimitive.CheckboxItem,
2615
+ {
2616
+ "data-slot": "menubar-checkbox-item",
2617
+ className: cn(
2618
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2619
+ className
2620
+ ),
2621
+ checked,
2622
+ ...props,
2623
+ children: [
2624
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
2625
+ children
2626
+ ]
2627
+ }
2628
+ );
2629
+ }
2630
+ function MenubarRadioItem({
2631
+ className,
2632
+ children,
2633
+ ...props
2634
+ }) {
2635
+ return /* @__PURE__ */ jsxs(
2636
+ MenubarPrimitive.RadioItem,
2637
+ {
2638
+ "data-slot": "menubar-radio-item",
2639
+ className: cn(
2640
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2641
+ className
2642
+ ),
2643
+ ...props,
2644
+ children: [
2645
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
2646
+ children
2647
+ ]
2648
+ }
2649
+ );
2650
+ }
2651
+ function MenubarLabel({
2652
+ className,
2653
+ inset,
2654
+ ...props
2655
+ }) {
2656
+ return /* @__PURE__ */ jsx(
2657
+ MenubarPrimitive.Label,
2658
+ {
2659
+ "data-slot": "menubar-label",
2660
+ "data-inset": inset,
2661
+ className: cn(
2662
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
2663
+ className
2664
+ ),
2665
+ ...props
2666
+ }
2667
+ );
2668
+ }
2669
+ function MenubarSeparator({
2670
+ className,
2671
+ ...props
2672
+ }) {
2673
+ return /* @__PURE__ */ jsx(
2674
+ MenubarPrimitive.Separator,
2675
+ {
2676
+ "data-slot": "menubar-separator",
2677
+ className: cn("bg-border -mx-1 my-1 h-px", className),
2678
+ ...props
2679
+ }
2680
+ );
2681
+ }
2682
+ function MenubarShortcut({
2683
+ className,
2684
+ ...props
2685
+ }) {
2686
+ return /* @__PURE__ */ jsx(
2687
+ "span",
2688
+ {
2689
+ "data-slot": "menubar-shortcut",
2690
+ className: cn(
2691
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2692
+ className
2693
+ ),
2694
+ ...props
2695
+ }
2696
+ );
2697
+ }
2698
+ function MenubarSub({
2699
+ ...props
2700
+ }) {
2701
+ return /* @__PURE__ */ jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
2702
+ }
2703
+ function MenubarSubTrigger({
2704
+ className,
2705
+ inset,
2706
+ children,
2707
+ ...props
2708
+ }) {
2709
+ return /* @__PURE__ */ jsxs(
2710
+ MenubarPrimitive.SubTrigger,
2711
+ {
2712
+ "data-slot": "menubar-sub-trigger",
2713
+ "data-inset": inset,
2714
+ className: cn(
2715
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",
2716
+ className
2717
+ ),
2718
+ ...props,
2719
+ children: [
2720
+ children,
2721
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })
2722
+ ]
2723
+ }
2724
+ );
2725
+ }
2726
+ function MenubarSubContent({
2727
+ className,
2728
+ ...props
2729
+ }) {
2730
+ return /* @__PURE__ */ jsx(
2731
+ MenubarPrimitive.SubContent,
2732
+ {
2733
+ "data-slot": "menubar-sub-content",
2734
+ className: cn(
2735
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
2736
+ className
2737
+ ),
2738
+ ...props
2739
+ }
2740
+ );
2741
+ }
2742
+ function Command({
2743
+ className,
2744
+ ...props
2745
+ }) {
2746
+ return /* @__PURE__ */ jsx(
2747
+ Command$1,
2748
+ {
2749
+ "data-slot": "command",
2750
+ className: cn(
2751
+ "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
2752
+ className
2753
+ ),
2754
+ ...props
2755
+ }
2756
+ );
2757
+ }
2758
+ function CommandDialog({
2759
+ title = "Command Palette",
2760
+ description = "Search for a command to run...",
2761
+ children,
2762
+ ...props
2763
+ }) {
2764
+ return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
2765
+ /* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
2766
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
2767
+ /* @__PURE__ */ jsx(DialogDescription, { children: description })
2768
+ ] }),
2769
+ /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })
2770
+ ] });
2771
+ }
2772
+ function CommandInput({
2773
+ className,
2774
+ ...props
2775
+ }) {
2776
+ return /* @__PURE__ */ jsxs(
2777
+ "div",
2778
+ {
2779
+ "data-slot": "command-input-wrapper",
2780
+ className: "flex h-9 items-center gap-2 border-b px-3",
2781
+ children: [
2782
+ /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
2783
+ /* @__PURE__ */ jsx(
2784
+ Command$1.Input,
2785
+ {
2786
+ "data-slot": "command-input",
2787
+ className: cn(
2788
+ "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
2789
+ className
2790
+ ),
2791
+ ...props
2792
+ }
2793
+ )
2794
+ ]
2795
+ }
2796
+ );
2797
+ }
2798
+ function CommandList({
2799
+ className,
2800
+ ...props
2801
+ }) {
2802
+ return /* @__PURE__ */ jsx(
2803
+ Command$1.List,
2804
+ {
2805
+ "data-slot": "command-list",
2806
+ role: "listbox",
2807
+ className: cn(
2808
+ "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
2809
+ className
2810
+ ),
2811
+ ...props
2812
+ }
2813
+ );
2814
+ }
2815
+ function CommandEmpty({
2816
+ ...props
2817
+ }) {
2818
+ return /* @__PURE__ */ jsx(
2819
+ Command$1.Empty,
2820
+ {
2821
+ "data-slot": "command-empty",
2822
+ className: "py-6 text-center text-sm",
2823
+ ...props
2824
+ }
2825
+ );
2826
+ }
2827
+ function CommandGroup({
2828
+ className,
2829
+ ...props
2830
+ }) {
2831
+ return /* @__PURE__ */ jsx(
2832
+ Command$1.Group,
2833
+ {
2834
+ "data-slot": "command-group",
2835
+ className: cn(
2836
+ "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
2837
+ className
2838
+ ),
2839
+ ...props
2840
+ }
2841
+ );
2842
+ }
2843
+ function CommandSeparator({
2844
+ className,
2845
+ ...props
2846
+ }) {
2847
+ return /* @__PURE__ */ jsx(
2848
+ Command$1.Separator,
2849
+ {
2850
+ "data-slot": "command-separator",
2851
+ className: cn("bg-border -mx-1 h-px", className),
2852
+ ...props
2853
+ }
2854
+ );
2855
+ }
2856
+ function CommandItem({
2857
+ className,
2858
+ ...props
2859
+ }) {
2860
+ return /* @__PURE__ */ jsx(
2861
+ Command$1.Item,
2862
+ {
2863
+ "data-slot": "command-item",
2864
+ role: "option",
2865
+ className: cn(
2866
+ "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
2867
+ className
2868
+ ),
2869
+ ...props
2870
+ }
2871
+ );
2872
+ }
2873
+ function CommandShortcut({
2874
+ className,
2875
+ ...props
2876
+ }) {
2877
+ return /* @__PURE__ */ jsx(
2878
+ "span",
2879
+ {
2880
+ "data-slot": "command-shortcut",
2881
+ className: cn(
2882
+ "text-muted-foreground ml-auto text-xs tracking-widest",
2883
+ className
2884
+ ),
2885
+ ...props
2886
+ }
2887
+ );
2888
+ }
2889
+ function Skeleton({ className, ...props }) {
2890
+ return /* @__PURE__ */ jsx(
2891
+ "div",
2892
+ {
2893
+ "data-slot": "skeleton",
2894
+ className: cn("bg-accent animate-pulse rounded-md", className),
2895
+ ...props
2896
+ }
2897
+ );
2898
+ }
2899
+ const variantStyles = {
2900
+ default: "bg-primary text-primary-foreground",
2901
+ secondary: "bg-secondary text-secondary-foreground",
2902
+ destructive: "bg-destructive text-destructive-foreground",
2903
+ outline: "border-2 border-primary bg-background text-primary",
2904
+ success: "bg-success text-success-foreground",
2905
+ info: "bg-info text-info-foreground",
2906
+ warning: "bg-warning text-warning-foreground"
2907
+ };
2908
+ const NotificationBadge = React.forwardRef(
2909
+ ({
2910
+ className,
2911
+ count = 0,
2912
+ max = 99,
2913
+ showZero = false,
2914
+ dot = false,
2915
+ variant = "destructive",
2916
+ children,
2917
+ ...props
2918
+ }, ref) => {
2919
+ const displayCount = count > max ? `${max}+` : count;
2920
+ const shouldShow = count > 0 || showZero;
2921
+ if (!shouldShow && !dot) {
2922
+ return /* @__PURE__ */ jsx("div", { ref, className, ...props, children });
2923
+ }
2924
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
2925
+ children,
2926
+ /* @__PURE__ */ jsx(
2927
+ "span",
2928
+ {
2929
+ className: cn(
2930
+ "absolute -right-1 -top-1 flex items-center justify-center rounded-full",
2931
+ variantStyles[variant],
2932
+ dot ? "h-2 w-2" : "min-w-[1.25rem] h-5 px-1.5"
2933
+ ),
2934
+ children: !dot && shouldShow && /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium leading-none", children: displayCount })
2935
+ }
2936
+ )
2937
+ ] });
2938
+ }
2939
+ );
2940
+ NotificationBadge.displayName = "NotificationBadge";
2941
+ const Empty = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2942
+ "div",
2943
+ {
2944
+ ref,
2945
+ className: cn(
2946
+ "flex min-h-[400px] flex-col items-center justify-center rounded-[var(--radius-card)] border border-dashed border-border p-8 text-center animate-in fade-in-50",
2947
+ className
2948
+ ),
2949
+ ...props
2950
+ }
2951
+ ));
2952
+ Empty.displayName = "Empty";
2953
+ const EmptyIcon = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2954
+ "div",
2955
+ {
2956
+ ref,
2957
+ className: cn(
2958
+ "mx-auto flex h-20 w-20 items-center justify-center rounded-full bg-muted",
2959
+ className
2960
+ ),
2961
+ ...props
2962
+ }
2963
+ ));
2964
+ EmptyIcon.displayName = "EmptyIcon";
2965
+ const EmptyImage = React.forwardRef(({ className, alt, ...props }, ref) => /* @__PURE__ */ jsx(
2966
+ "img",
2967
+ {
2968
+ ref,
2969
+ alt,
2970
+ className: cn("mx-auto mb-4 h-48 w-48 object-contain opacity-50", className),
2971
+ ...props
2972
+ }
2973
+ ));
2974
+ EmptyImage.displayName = "EmptyImage";
2975
+ const EmptyTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2976
+ "h3",
2977
+ {
2978
+ ref,
2979
+ className: cn("mt-4 font-semibold text-foreground", className),
2980
+ ...props
2981
+ }
2982
+ ));
2983
+ EmptyTitle.displayName = "EmptyTitle";
2984
+ const EmptyDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2985
+ "p",
2986
+ {
2987
+ ref,
2988
+ className: cn("mt-2 text-sm text-muted-foreground max-w-sm mx-auto", className),
2989
+ ...props
2990
+ }
2991
+ ));
2992
+ EmptyDescription.displayName = "EmptyDescription";
2993
+ const EmptyAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2994
+ "div",
2995
+ {
2996
+ ref,
2997
+ className: cn("mt-6 flex flex-col gap-2 sm:flex-row sm:gap-4", className),
2998
+ ...props
2999
+ }
3000
+ ));
3001
+ EmptyAction.displayName = "EmptyAction";
3002
+ const StatsCard = React.forwardRef(
3003
+ ({ className, title, value, description, trend, icon, ...props }, ref) => {
3004
+ const getTrendIcon = () => {
3005
+ if (!trend) return null;
3006
+ if (trend.value > 0) {
3007
+ return /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-success" });
3008
+ } else if (trend.value < 0) {
3009
+ return /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-destructive" });
3010
+ } else {
3011
+ return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-muted-foreground" });
3012
+ }
3013
+ };
3014
+ const getTrendColor = () => {
3015
+ if (!trend) return "";
3016
+ if (trend.value > 0) {
3017
+ return "text-success";
3018
+ } else if (trend.value < 0) {
3019
+ return "text-destructive";
3020
+ } else {
3021
+ return "text-muted-foreground";
3022
+ }
3023
+ };
3024
+ return /* @__PURE__ */ jsx(Card, { ref, className: cn("", className), ...props, children: /* @__PURE__ */ jsx(CardContent, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
3025
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
3026
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-1 text-sm", children: title }),
3027
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-baseline gap-2", children: [
3028
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground text-xl sm:text-2xl", children: value }),
3029
+ trend && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 text-sm", getTrendColor()), children: [
3030
+ getTrendIcon(),
3031
+ /* @__PURE__ */ jsxs("span", { children: [
3032
+ Math.abs(trend.value),
3033
+ "%"
3034
+ ] })
3035
+ ] })
3036
+ ] }),
3037
+ (description || (trend == null ? void 0 : trend.label)) && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1 text-xs sm:text-sm", children: (trend == null ? void 0 : trend.label) || description })
3038
+ ] }),
3039
+ icon && /* @__PURE__ */ jsx("div", { className: "rounded-[var(--radius)] bg-muted p-2 sm:p-3 text-muted-foreground flex-shrink-0", children: icon })
3040
+ ] }) }) });
3041
+ }
3042
+ );
3043
+ StatsCard.displayName = "StatsCard";
3044
+ const Timeline = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3045
+ "ol",
3046
+ {
3047
+ ref,
3048
+ className: cn("relative border-l border-border", className),
3049
+ ...props
3050
+ }
3051
+ ));
3052
+ Timeline.displayName = "Timeline";
3053
+ const TimelineItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3054
+ "li",
3055
+ {
3056
+ ref,
3057
+ className: cn("mb-10 ml-6", className),
3058
+ ...props
3059
+ }
3060
+ ));
3061
+ TimelineItem.displayName = "TimelineItem";
3062
+ const TimelineDot = React.forwardRef(({ className, variant = "default", icon, children, ...props }, ref) => {
3063
+ const variantStyles2 = {
3064
+ default: "bg-muted border-border",
3065
+ primary: "bg-primary border-primary",
3066
+ success: "bg-success border-success",
3067
+ info: "bg-info border-info",
3068
+ warning: "bg-warning border-warning",
3069
+ destructive: "bg-destructive border-destructive",
3070
+ outline: "bg-background border-border"
3071
+ };
3072
+ const iconColorStyles = {
3073
+ default: "text-muted-foreground",
3074
+ primary: "text-primary-foreground",
3075
+ success: "text-success-foreground",
3076
+ info: "text-info-foreground",
3077
+ warning: "text-warning-foreground",
3078
+ destructive: "text-destructive-foreground",
3079
+ outline: "text-foreground"
3080
+ };
3081
+ if (icon || children) {
3082
+ return /* @__PURE__ */ jsx(
3083
+ "div",
3084
+ {
3085
+ ref,
3086
+ className: cn(
3087
+ "absolute -left-[17px] mt-0.5 h-8 w-8 rounded-full border-2 flex items-center justify-center",
3088
+ variantStyles2[variant],
3089
+ className
3090
+ ),
3091
+ ...props,
3092
+ children: /* @__PURE__ */ jsx("span", { className: cn("h-4 w-4", iconColorStyles[variant]), children: icon || children })
3093
+ }
3094
+ );
3095
+ }
3096
+ return /* @__PURE__ */ jsx(
3097
+ "div",
3098
+ {
3099
+ ref,
3100
+ className: cn(
3101
+ "absolute -left-[9px] mt-1.5 h-4 w-4 rounded-full border-2",
3102
+ variantStyles2[variant],
3103
+ className
3104
+ ),
3105
+ ...props
3106
+ }
3107
+ );
3108
+ });
3109
+ TimelineDot.displayName = "TimelineDot";
3110
+ const TimelineContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3111
+ "div",
3112
+ {
3113
+ ref,
3114
+ className: cn("", className),
3115
+ ...props
3116
+ }
3117
+ ));
3118
+ TimelineContent.displayName = "TimelineContent";
3119
+ const TimelineHeading = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3120
+ "h3",
3121
+ {
3122
+ ref,
3123
+ className: cn("mb-1 text-foreground", className),
3124
+ ...props
3125
+ }
3126
+ ));
3127
+ TimelineHeading.displayName = "TimelineHeading";
3128
+ const TimelineTime = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3129
+ "time",
3130
+ {
3131
+ ref,
3132
+ className: cn("mb-2 block text-muted-foreground", className),
3133
+ ...props
3134
+ }
3135
+ ));
3136
+ TimelineTime.displayName = "TimelineTime";
3137
+ const TimelineDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3138
+ "p",
3139
+ {
3140
+ ref,
3141
+ className: cn("text-muted-foreground", className),
3142
+ ...props
3143
+ }
3144
+ ));
3145
+ TimelineDescription.displayName = "TimelineDescription";
3146
+ const TreeView = React.forwardRef(
3147
+ ({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, ...props }, ref) => {
3148
+ const [expanded, setExpanded] = React.useState(new Set(defaultExpanded));
3149
+ const [internalSelectedId, setInternalSelectedId] = React.useState(void 0);
3150
+ const nodeRefs = React.useRef(/* @__PURE__ */ new Map());
3151
+ const isControlled = selectedNodeId !== void 0;
3152
+ const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
3153
+ const toggleExpand = (nodeId) => {
3154
+ setExpanded((prev) => {
3155
+ const next = new Set(prev);
3156
+ next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
3157
+ return next;
3158
+ });
3159
+ };
3160
+ const getVisibleNodes = React.useCallback(() => {
3161
+ const result = [];
3162
+ const traverse = (nodes) => {
3163
+ var _a;
3164
+ for (const node of nodes) {
3165
+ result.push(node);
3166
+ if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
3167
+ }
3168
+ };
3169
+ traverse(data);
3170
+ return result;
3171
+ }, [data, expanded]);
3172
+ const findParent = (nodes, targetId) => {
3173
+ var _a;
3174
+ for (const n of nodes) {
3175
+ if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
3176
+ if (n.children) {
3177
+ const found = findParent(n.children, targetId);
3178
+ if (found) return found;
3179
+ }
3180
+ }
3181
+ return null;
3182
+ };
3183
+ const handleSelect = (node) => {
3184
+ if (!isControlled) setInternalSelectedId(node.id);
3185
+ onNodeSelect == null ? void 0 : onNodeSelect(node);
3186
+ onNodeClick == null ? void 0 : onNodeClick(node);
3187
+ };
3188
+ const handleKeyDown = (e, node) => {
3189
+ var _a, _b;
3190
+ const visibleNodes = getVisibleNodes();
3191
+ const idx = visibleNodes.findIndex((n) => n.id === node.id);
3192
+ const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
3193
+ const isExpanded = expanded.has(node.id);
3194
+ const focusNode = (id) => {
3195
+ var _a2;
3196
+ (_a2 = nodeRefs.current.get(id)) == null ? void 0 : _a2.focus();
3197
+ };
3198
+ switch (e.key) {
3199
+ case "ArrowDown": {
3200
+ e.preventDefault();
3201
+ const next = visibleNodes[idx + 1];
3202
+ if (next) focusNode(next.id);
3203
+ break;
3204
+ }
3205
+ case "ArrowUp": {
3206
+ e.preventDefault();
3207
+ const prev = visibleNodes[idx - 1];
3208
+ if (prev) focusNode(prev.id);
3209
+ break;
3210
+ }
3211
+ case "ArrowRight": {
3212
+ e.preventDefault();
3213
+ if (hasChildren && !isExpanded) {
3214
+ toggleExpand(node.id);
3215
+ } else if (hasChildren && isExpanded && ((_b = node.children) == null ? void 0 : _b.length)) {
3216
+ focusNode(node.children[0].id);
3217
+ }
3218
+ break;
3219
+ }
3220
+ case "ArrowLeft": {
3221
+ e.preventDefault();
3222
+ if (hasChildren && isExpanded) {
3223
+ toggleExpand(node.id);
3224
+ } else {
3225
+ const parent = findParent(data, node.id);
3226
+ if (parent) focusNode(parent.id);
3227
+ }
3228
+ break;
3229
+ }
3230
+ case "Home": {
3231
+ e.preventDefault();
3232
+ if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
3233
+ break;
3234
+ }
3235
+ case "End": {
3236
+ e.preventDefault();
3237
+ const last = visibleNodes[visibleNodes.length - 1];
3238
+ if (last) focusNode(last.id);
3239
+ break;
3240
+ }
3241
+ case "Enter":
3242
+ case " ": {
3243
+ e.preventDefault();
3244
+ if (hasChildren) toggleExpand(node.id);
3245
+ handleSelect(node);
3246
+ break;
3247
+ }
3248
+ }
3249
+ };
3250
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsx(
3251
+ TreeNodeComponent,
3252
+ {
3253
+ node,
3254
+ level: 0,
3255
+ expanded,
3256
+ selectedId: effectiveSelectedId,
3257
+ onToggle: toggleExpand,
3258
+ onSelect: handleSelect,
3259
+ onKeyDown: handleKeyDown,
3260
+ nodeRefs
3261
+ },
3262
+ node.id
3263
+ )) });
3264
+ }
3265
+ );
3266
+ TreeView.displayName = "TreeView";
3267
+ const TreeNodeComponent = ({
3268
+ node,
3269
+ level,
3270
+ expanded,
3271
+ selectedId,
3272
+ onToggle,
3273
+ onSelect,
3274
+ onKeyDown,
3275
+ nodeRefs
3276
+ }) => {
3277
+ var _a;
3278
+ const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
3279
+ const isExpanded = expanded.has(node.id);
3280
+ const isSelected = node.id === selectedId;
3281
+ const handleClick = () => {
3282
+ if (hasChildren) onToggle(node.id);
3283
+ onSelect(node);
3284
+ };
3285
+ const setRef = (el) => {
3286
+ if (el) nodeRefs.current.set(node.id, el);
3287
+ else nodeRefs.current.delete(node.id);
3288
+ };
3289
+ return /* @__PURE__ */ jsxs("div", { role: "none", children: [
3290
+ /* @__PURE__ */ jsxs(
3291
+ "button",
3292
+ {
3293
+ ref: setRef,
3294
+ role: "treeitem",
3295
+ "aria-expanded": hasChildren ? isExpanded : void 0,
3296
+ "aria-selected": isSelected,
3297
+ tabIndex: isSelected ? 0 : -1,
3298
+ onClick: handleClick,
3299
+ onKeyDown: (e) => onKeyDown(e, node),
3300
+ className: cn(
3301
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
3302
+ "hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3303
+ isSelected && "bg-primary/10 text-primary font-medium"
3304
+ ),
3305
+ style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
3306
+ children: [
3307
+ hasChildren ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
3308
+ node.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
3309
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-foreground", children: node.label })
3310
+ ]
3311
+ }
3312
+ ),
3313
+ hasChildren && isExpanded && /* @__PURE__ */ jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsx(
3314
+ TreeNodeComponent,
3315
+ {
3316
+ node: child,
3317
+ level: level + 1,
3318
+ expanded,
3319
+ selectedId,
3320
+ onToggle,
3321
+ onSelect,
3322
+ onKeyDown,
3323
+ nodeRefs
3324
+ },
3325
+ child.id
3326
+ )) })
3327
+ ] });
3328
+ };
3329
+ function Collapsible({
3330
+ ...props
3331
+ }) {
3332
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
3333
+ }
3334
+ function CollapsibleTrigger({
3335
+ ...props
3336
+ }) {
3337
+ return /* @__PURE__ */ jsx(
3338
+ CollapsiblePrimitive.CollapsibleTrigger,
3339
+ {
3340
+ "data-slot": "collapsible-trigger",
3341
+ ...props
3342
+ }
3343
+ );
3344
+ }
3345
+ function CollapsibleContent({
3346
+ ...props
3347
+ }) {
3348
+ return /* @__PURE__ */ jsx(
3349
+ CollapsiblePrimitive.CollapsibleContent,
3350
+ {
3351
+ "data-slot": "collapsible-content",
3352
+ ...props
3353
+ }
3354
+ );
3355
+ }
3356
+ function Accordion({
3357
+ ...props
3358
+ }) {
3359
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
3360
+ }
3361
+ function AccordionItem({
3362
+ className,
3363
+ ...props
3364
+ }) {
3365
+ return /* @__PURE__ */ jsx(
3366
+ AccordionPrimitive.Item,
3367
+ {
3368
+ "data-slot": "accordion-item",
3369
+ className: cn("border-b last:border-b-0", className),
3370
+ ...props
3371
+ }
3372
+ );
3373
+ }
3374
+ function AccordionTrigger({
3375
+ className,
3376
+ children,
3377
+ ...props
3378
+ }) {
3379
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
3380
+ AccordionPrimitive.Trigger,
3381
+ {
3382
+ "data-slot": "accordion-trigger",
3383
+ className: cn(
3384
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
3385
+ className
3386
+ ),
3387
+ ...props,
3388
+ children: [
3389
+ children,
3390
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
3391
+ ]
3392
+ }
3393
+ ) });
3394
+ }
3395
+ function AccordionContent({
3396
+ className,
3397
+ children,
3398
+ ...props
3399
+ }) {
3400
+ return /* @__PURE__ */ jsx(
3401
+ AccordionPrimitive.Content,
3402
+ {
3403
+ "data-slot": "accordion-content",
3404
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
3405
+ ...props,
3406
+ children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
3407
+ }
3408
+ );
3409
+ }
3410
+ const CarouselContext = React.createContext(null);
3411
+ function useCarousel() {
3412
+ const context = React.useContext(CarouselContext);
3413
+ if (!context) {
3414
+ throw new Error("useCarousel must be used within a <Carousel />");
3415
+ }
3416
+ return context;
3417
+ }
3418
+ function Carousel({
3419
+ orientation = "horizontal",
3420
+ opts,
3421
+ setApi,
3422
+ plugins,
3423
+ className,
3424
+ children,
3425
+ ...props
3426
+ }) {
3427
+ const [carouselRef, api] = useEmblaCarousel(
3428
+ {
3429
+ ...opts,
3430
+ axis: orientation === "horizontal" ? "x" : "y"
3431
+ },
3432
+ plugins
3433
+ );
3434
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
3435
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
3436
+ const onSelect = React.useCallback((api2) => {
3437
+ if (!api2) return;
3438
+ setCanScrollPrev(api2.canScrollPrev());
3439
+ setCanScrollNext(api2.canScrollNext());
3440
+ }, []);
3441
+ const scrollPrev = React.useCallback(() => {
3442
+ api == null ? void 0 : api.scrollPrev();
3443
+ }, [api]);
3444
+ const scrollNext = React.useCallback(() => {
3445
+ api == null ? void 0 : api.scrollNext();
3446
+ }, [api]);
3447
+ const handleKeyDown = React.useCallback(
3448
+ (event) => {
3449
+ if (event.key === "ArrowLeft") {
3450
+ event.preventDefault();
3451
+ scrollPrev();
3452
+ } else if (event.key === "ArrowRight") {
3453
+ event.preventDefault();
3454
+ scrollNext();
3455
+ }
3456
+ },
3457
+ [scrollPrev, scrollNext]
3458
+ );
3459
+ React.useEffect(() => {
3460
+ if (!api || !setApi) return;
3461
+ setApi(api);
3462
+ }, [api, setApi]);
3463
+ React.useEffect(() => {
3464
+ if (!api) return;
3465
+ onSelect(api);
3466
+ api.on("reInit", onSelect);
3467
+ api.on("select", onSelect);
3468
+ return () => {
3469
+ api == null ? void 0 : api.off("select", onSelect);
3470
+ };
3471
+ }, [api, onSelect]);
3472
+ return /* @__PURE__ */ jsx(
3473
+ CarouselContext.Provider,
3474
+ {
3475
+ value: {
3476
+ carouselRef,
3477
+ api,
3478
+ opts,
3479
+ orientation: orientation || ((opts == null ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
3480
+ scrollPrev,
3481
+ scrollNext,
3482
+ canScrollPrev,
3483
+ canScrollNext
3484
+ },
3485
+ children: /* @__PURE__ */ jsx(
3486
+ "div",
3487
+ {
3488
+ onKeyDownCapture: handleKeyDown,
3489
+ className: cn("relative", className),
3490
+ role: "region",
3491
+ "aria-roledescription": "carousel",
3492
+ "data-slot": "carousel",
3493
+ ...props,
3494
+ children
3495
+ }
3496
+ )
3497
+ }
3498
+ );
3499
+ }
3500
+ function CarouselContent({ className, ...props }) {
3501
+ const { carouselRef, orientation } = useCarousel();
3502
+ return /* @__PURE__ */ jsx(
3503
+ "div",
3504
+ {
3505
+ ref: carouselRef,
3506
+ className: "overflow-hidden",
3507
+ "data-slot": "carousel-content",
3508
+ children: /* @__PURE__ */ jsx(
3509
+ "div",
3510
+ {
3511
+ className: cn(
3512
+ "flex",
3513
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
3514
+ className
3515
+ ),
3516
+ ...props
3517
+ }
3518
+ )
3519
+ }
3520
+ );
3521
+ }
3522
+ function CarouselItem({ className, ...props }) {
3523
+ const { orientation } = useCarousel();
3524
+ return /* @__PURE__ */ jsx(
3525
+ "div",
3526
+ {
3527
+ role: "group",
3528
+ "aria-roledescription": "slide",
3529
+ "data-slot": "carousel-item",
3530
+ className: cn(
3531
+ "min-w-0 shrink-0 grow-0 basis-full",
3532
+ orientation === "horizontal" ? "pl-4" : "pt-4",
3533
+ className
3534
+ ),
3535
+ ...props
3536
+ }
3537
+ );
3538
+ }
3539
+ function CarouselPrevious({
3540
+ className,
3541
+ variant = "outline",
3542
+ size = "icon",
3543
+ ...props
3544
+ }) {
3545
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
3546
+ return /* @__PURE__ */ jsxs(
3547
+ Button,
3548
+ {
3549
+ "data-slot": "carousel-previous",
3550
+ variant,
3551
+ size,
3552
+ className: cn(
3553
+ "absolute size-8 rounded-full",
3554
+ orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
3555
+ className
3556
+ ),
3557
+ disabled: !canScrollPrev,
3558
+ onClick: scrollPrev,
3559
+ ...props,
3560
+ children: [
3561
+ /* @__PURE__ */ jsx(ArrowLeft, {}),
3562
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
3563
+ ]
3564
+ }
3565
+ );
3566
+ }
3567
+ function CarouselNext({
3568
+ className,
3569
+ variant = "outline",
3570
+ size = "icon",
3571
+ ...props
3572
+ }) {
3573
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
3574
+ return /* @__PURE__ */ jsxs(
3575
+ Button,
3576
+ {
3577
+ "data-slot": "carousel-next",
3578
+ variant,
3579
+ size,
3580
+ className: cn(
3581
+ "absolute size-8 rounded-full",
3582
+ orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
3583
+ className
3584
+ ),
3585
+ disabled: !canScrollNext,
3586
+ onClick: scrollNext,
3587
+ ...props,
3588
+ children: [
3589
+ /* @__PURE__ */ jsx(ArrowRight, {}),
3590
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
3591
+ ]
3592
+ }
3593
+ );
3594
+ }
3595
+ const StepperContext = React.createContext(void 0);
3596
+ const useStepper = () => {
3597
+ const context = React.useContext(StepperContext);
3598
+ if (!context) throw new Error("useStepper must be used within a Stepper");
3599
+ return context;
3600
+ };
3601
+ const Stepper = React.forwardRef(
3602
+ ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
3603
+ const totalSteps = React.Children.count(children);
3604
+ return /* @__PURE__ */ jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsx(
3605
+ "div",
3606
+ {
3607
+ ref,
3608
+ className: cn("w-full", className),
3609
+ ...props,
3610
+ children: /* @__PURE__ */ jsx("div", { className: cn(
3611
+ orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
3612
+ ), children })
3613
+ }
3614
+ ) });
3615
+ }
3616
+ );
3617
+ Stepper.displayName = "Stepper";
3618
+ const Step = React.forwardRef(
3619
+ ({ step, label, description, error = false, className, ...props }, ref) => {
3620
+ const { currentStep, totalSteps, orientation } = useStepper();
3621
+ const isActive = step === currentStep;
3622
+ const isCompleted = step < currentStep && !error;
3623
+ const isFirst = step === 1;
3624
+ const isLast = step === totalSteps;
3625
+ const circleClasses = cn(
3626
+ "relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
3627
+ isActive && !error && "border-primary bg-primary text-primary-foreground",
3628
+ isCompleted && "border-primary bg-primary text-primary-foreground",
3629
+ error && "border-destructive bg-destructive text-destructive-foreground",
3630
+ !isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
3631
+ );
3632
+ const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
3633
+ if (orientation === "vertical") {
3634
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex gap-4", className), ...props, children: [
3635
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
3636
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
3637
+ !isLast && /* @__PURE__ */ jsx("div", { className: cn("w-0.5 flex-1 min-h-[2rem] mt-1", connectorClasses(step < currentStep)) })
3638
+ ] }),
3639
+ /* @__PURE__ */ jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
3640
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3641
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3642
+ ] })
3643
+ ] });
3644
+ }
3645
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-1 flex-col items-center", className), ...props, children: [
3646
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full items-start", children: [
3647
+ step > 1 && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
3648
+ /* @__PURE__ */ jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsx(X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx("span", { children: step }) }),
3649
+ step < totalSteps && /* @__PURE__ */ jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
3650
+ ] }),
3651
+ /* @__PURE__ */ jsxs("div", { className: cn(
3652
+ "mt-2 px-1",
3653
+ isFirst && "text-left self-start",
3654
+ isLast && "text-right self-end",
3655
+ !isFirst && !isLast && "text-center w-full"
3656
+ ), children: [
3657
+ /* @__PURE__ */ jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
3658
+ description && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
3659
+ ] })
3660
+ ] });
3661
+ }
3662
+ );
3663
+ Step.displayName = "Step";
3664
+ const FileUpload = React.forwardRef(
3665
+ ({
3666
+ className,
3667
+ onFilesChange,
3668
+ maxFiles = 1,
3669
+ maxSize = 5 * 1024 * 1024,
3670
+ // 5MB default
3671
+ showPreview = true,
3672
+ onError,
3673
+ accept,
3674
+ disabled,
3675
+ ...props
3676
+ }, ref) => {
3677
+ const [files, setFiles] = React.useState([]);
3678
+ const [dragActive, setDragActive] = React.useState(false);
3679
+ const [errorMessage, setErrorMessage] = React.useState(null);
3680
+ const inputRef = React.useRef(null);
3681
+ const handleFiles = (newFiles) => {
3682
+ if (!newFiles) return;
3683
+ setErrorMessage(null);
3684
+ const filesArray = Array.from(newFiles);
3685
+ const oversized = filesArray.filter((f) => f.size > maxSize);
3686
+ const validFiles = filesArray.filter((f) => f.size <= maxSize);
3687
+ if (oversized.length > 0) {
3688
+ const limitMB = (maxSize / 1024 / 1024).toFixed(0);
3689
+ setErrorMessage(`${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`);
3690
+ onError == null ? void 0 : onError(oversized, "size");
3691
+ }
3692
+ const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
3693
+ const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
3694
+ if (countRejected.length > 0) {
3695
+ setErrorMessage(`Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`);
3696
+ onError == null ? void 0 : onError(countRejected, "count");
3697
+ }
3698
+ setFiles(merged);
3699
+ onFilesChange == null ? void 0 : onFilesChange(merged);
3700
+ };
3701
+ const handleDrag = (e) => {
3702
+ e.preventDefault();
3703
+ e.stopPropagation();
3704
+ if (e.type === "dragenter" || e.type === "dragover") {
3705
+ setDragActive(true);
3706
+ } else if (e.type === "dragleave") {
3707
+ setDragActive(false);
3708
+ }
3709
+ };
3710
+ const handleDrop = (e) => {
3711
+ e.preventDefault();
3712
+ e.stopPropagation();
3713
+ setDragActive(false);
3714
+ if (disabled) return;
3715
+ handleFiles(e.dataTransfer.files);
3716
+ };
3717
+ const handleChange = (e) => {
3718
+ e.preventDefault();
3719
+ if (disabled) return;
3720
+ handleFiles(e.target.files);
3721
+ };
3722
+ const removeFile = (index) => {
3723
+ const updatedFiles = files.filter((_, i) => i !== index);
3724
+ setFiles(updatedFiles);
3725
+ onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
3726
+ if (updatedFiles.length === 0) setErrorMessage(null);
3727
+ };
3728
+ const openFileDialog = () => {
3729
+ var _a;
3730
+ if (!disabled) {
3731
+ setErrorMessage(null);
3732
+ (_a = inputRef.current) == null ? void 0 : _a.click();
3733
+ }
3734
+ };
3735
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("w-full", className), children: [
3736
+ /* @__PURE__ */ jsxs(
3737
+ "div",
3738
+ {
3739
+ onDragEnter: handleDrag,
3740
+ onDragLeave: handleDrag,
3741
+ onDragOver: handleDrag,
3742
+ onDrop: handleDrop,
3743
+ onClick: openFileDialog,
3744
+ className: cn(
3745
+ "relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50",
3746
+ dragActive && "border-primary bg-primary/5",
3747
+ errorMessage && "border-destructive/50",
3748
+ disabled && "cursor-not-allowed opacity-50"
3749
+ ),
3750
+ children: [
3751
+ /* @__PURE__ */ jsx(Upload, { className: "mb-4 h-10 w-10 text-muted-foreground" }),
3752
+ /* @__PURE__ */ jsxs("p", { className: "mb-2 text-foreground", children: [
3753
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: "Click to upload" }),
3754
+ " or drag and drop"
3755
+ ] }),
3756
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3757
+ maxFiles > 1 ? `Up to ${maxFiles} files` : "1 file",
3758
+ " • Max ",
3759
+ (maxSize / 1024 / 1024).toFixed(0),
3760
+ "MB"
3761
+ ] }),
3762
+ /* @__PURE__ */ jsx(
3763
+ "input",
3764
+ {
3765
+ ...props,
3766
+ ref: inputRef,
3767
+ type: "file",
3768
+ className: "hidden",
3769
+ onChange: handleChange,
3770
+ multiple: maxFiles > 1,
3771
+ accept,
3772
+ disabled
3773
+ }
3774
+ )
3775
+ ]
3776
+ }
3777
+ ),
3778
+ errorMessage && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
3779
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4 shrink-0" }),
3780
+ /* @__PURE__ */ jsx("span", { children: errorMessage })
3781
+ ] }),
3782
+ showPreview && files.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxs(
3783
+ "div",
3784
+ {
3785
+ className: "flex items-center justify-between rounded-[var(--radius)] border border-border bg-card p-3",
3786
+ children: [
3787
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
3788
+ /* @__PURE__ */ jsx(FileIcon, { className: "h-5 w-5 text-muted-foreground" }),
3789
+ /* @__PURE__ */ jsxs("div", { children: [
3790
+ /* @__PURE__ */ jsx("p", { className: "text-foreground", children: file.name }),
3791
+ /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground", children: [
3792
+ (file.size / 1024).toFixed(2),
3793
+ " KB"
3794
+ ] })
3795
+ ] })
3796
+ ] }),
3797
+ /* @__PURE__ */ jsx(
3798
+ Button,
3799
+ {
3800
+ type: "button",
3801
+ variant: "ghost",
3802
+ size: "sm",
3803
+ onClick: (e) => {
3804
+ e.stopPropagation();
3805
+ removeFile(index);
3806
+ },
3807
+ disabled,
3808
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
3809
+ }
3810
+ )
3811
+ ]
3812
+ },
3813
+ index
3814
+ )) })
3815
+ ] });
3816
+ }
3817
+ );
3818
+ FileUpload.displayName = "FileUpload";
3819
+ const Rating = React.forwardRef(
3820
+ ({
3821
+ className,
3822
+ value = 0,
3823
+ onChange,
3824
+ max = 5,
3825
+ readonly = false,
3826
+ disabled = false,
3827
+ size = "md",
3828
+ showValue = false,
3829
+ allowHalf = false,
3830
+ getAriaLabel,
3831
+ ...props
3832
+ }, ref) => {
3833
+ const [hoverValue, setHoverValue] = React.useState(null);
3834
+ const isInteractive = !readonly && !disabled;
3835
+ const sizeStyles = {
3836
+ sm: "h-4 w-4",
3837
+ md: "h-5 w-5",
3838
+ lg: "h-6 w-6"
3839
+ };
3840
+ const handleClick = (rating) => {
3841
+ if (isInteractive) onChange == null ? void 0 : onChange(rating);
3842
+ };
3843
+ const handleMouseMove = (e, rating) => {
3844
+ if (!isInteractive) return;
3845
+ if (allowHalf) {
3846
+ const rect = e.currentTarget.getBoundingClientRect();
3847
+ setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
3848
+ } else {
3849
+ setHoverValue(rating);
3850
+ }
3851
+ };
3852
+ const handleMouseLeave = () => {
3853
+ if (isInteractive) setHoverValue(null);
3854
+ };
3855
+ const handleClickWithHalf = (e, rating) => {
3856
+ if (!isInteractive) return;
3857
+ if (allowHalf) {
3858
+ const rect = e.currentTarget.getBoundingClientRect();
3859
+ const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
3860
+ onChange == null ? void 0 : onChange(half);
3861
+ } else {
3862
+ handleClick(rating);
3863
+ }
3864
+ };
3865
+ const displayValue = hoverValue ?? value;
3866
+ return /* @__PURE__ */ jsxs(
3867
+ "div",
3868
+ {
3869
+ ref,
3870
+ className: cn("flex items-center gap-1", disabled && "opacity-50", className),
3871
+ ...props,
3872
+ children: [
3873
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
3874
+ const rating = index + 1;
3875
+ const isFull = rating <= displayValue;
3876
+ const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
3877
+ return /* @__PURE__ */ jsxs(
3878
+ "button",
3879
+ {
3880
+ type: "button",
3881
+ onClick: (e) => handleClickWithHalf(e, rating),
3882
+ onMouseMove: (e) => handleMouseMove(e, rating),
3883
+ onMouseLeave: handleMouseLeave,
3884
+ disabled: readonly || disabled,
3885
+ "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
3886
+ className: cn(
3887
+ "relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3888
+ isInteractive && "cursor-pointer hover:scale-110",
3889
+ !isInteractive && "cursor-default"
3890
+ ),
3891
+ children: [
3892
+ /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
3893
+ (isFull || isHalf) && /* @__PURE__ */ jsx(
3894
+ "span",
3895
+ {
3896
+ className: cn(
3897
+ "absolute inset-0 overflow-hidden",
3898
+ isHalf ? "w-1/2" : "w-full"
3899
+ ),
3900
+ children: /* @__PURE__ */ jsx(Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
3901
+ }
3902
+ )
3903
+ ]
3904
+ },
3905
+ index
3906
+ );
3907
+ }) }),
3908
+ showValue && /* @__PURE__ */ jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
3909
+ ]
3910
+ }
3911
+ );
3912
+ }
3913
+ );
3914
+ Rating.displayName = "Rating";
3915
+ const Search = React.forwardRef(
3916
+ ({
3917
+ className,
3918
+ containerClassName,
3919
+ onSearch,
3920
+ onClear,
3921
+ onChange,
3922
+ size = "md",
3923
+ searchLabel = "Search",
3924
+ clearLabel = "Clear search",
3925
+ value: controlledValue,
3926
+ defaultValue,
3927
+ ...props
3928
+ }, ref) => {
3929
+ const isControlled = controlledValue !== void 0;
3930
+ const [internalValue, setInternalValue] = React.useState(
3931
+ isControlled ? "" : defaultValue ?? ""
3932
+ );
3933
+ const displayValue = isControlled ? controlledValue : internalValue;
3934
+ const sizeClasses = {
3935
+ sm: "h-8 px-8 py-1 text-sm",
3936
+ md: "h-10 px-10 py-2 text-base",
3937
+ lg: "h-12 px-12 py-3 text-base"
3938
+ };
3939
+ const iconSizeClasses = {
3940
+ sm: "left-2 h-3.5 w-3.5",
3941
+ md: "left-3 h-4 w-4",
3942
+ lg: "left-4 h-5 w-5"
3943
+ };
3944
+ const clearSizeClasses = {
3945
+ sm: "right-2",
3946
+ md: "right-3",
3947
+ lg: "right-4"
3948
+ };
3949
+ const handleChange = (e) => {
3950
+ const newValue = e.target.value;
3951
+ if (!isControlled) setInternalValue(newValue);
3952
+ onChange == null ? void 0 : onChange(e);
3953
+ onSearch == null ? void 0 : onSearch(newValue);
3954
+ };
3955
+ const handleClear = () => {
3956
+ if (!isControlled) setInternalValue("");
3957
+ onClear == null ? void 0 : onClear();
3958
+ onSearch == null ? void 0 : onSearch("");
3959
+ };
3960
+ const handleKeyDown = (e) => {
3961
+ var _a;
3962
+ if (e.key === "Escape") {
3963
+ handleClear();
3964
+ }
3965
+ (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
3966
+ };
3967
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full", containerClassName), children: [
3968
+ /* @__PURE__ */ jsx(
3969
+ Search$1,
3970
+ {
3971
+ "aria-hidden": "true",
3972
+ className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size])
3973
+ }
3974
+ ),
3975
+ /* @__PURE__ */ jsx(
3976
+ "input",
3977
+ {
3978
+ ref,
3979
+ type: "text",
3980
+ value: displayValue,
3981
+ onChange: handleChange,
3982
+ onKeyDown: handleKeyDown,
3983
+ className: cn(
3984
+ "flex w-full rounded-[var(--radius)] border border-border bg-background text-foreground transition-colors outline-none",
3985
+ "placeholder:text-muted-foreground",
3986
+ "focus:ring-2 focus:ring-primary focus:border-transparent",
3987
+ "disabled:cursor-not-allowed disabled:opacity-50",
3988
+ sizeClasses[size],
3989
+ className
3990
+ ),
3991
+ "aria-label": props.placeholder || searchLabel,
3992
+ ...props
3993
+ }
3994
+ ),
3995
+ displayValue && /* @__PURE__ */ jsx(
3996
+ "button",
3997
+ {
3998
+ type: "button",
3999
+ onClick: handleClear,
4000
+ "aria-label": clearLabel,
4001
+ className: cn(
4002
+ "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
4003
+ clearSizeClasses[size]
4004
+ ),
4005
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
4006
+ }
4007
+ )
4008
+ ] });
4009
+ }
4010
+ );
4011
+ Search.displayName = "Search";
4012
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
4013
+ const RouteMapContent = React__default.forwardRef(
4014
+ ({ apiKey, ...props }, ref) => {
4015
+ const { isLoaded, loadError, load } = useGoogleMapsLoader();
4016
+ const {
4017
+ origin,
4018
+ destination,
4019
+ waypoints = [],
4020
+ travelMode = "DRIVING",
4021
+ height = "450px",
4022
+ mapContainerClassName,
4023
+ disableDefaultUI = false,
4024
+ zoomControl = true,
4025
+ streetViewControl = false,
4026
+ mapTypeControl = false,
4027
+ fullscreenControl = true,
4028
+ onRouteCalculated,
4029
+ className,
4030
+ ...divProps
4031
+ } = props;
4032
+ const mapRef = useRef(null);
4033
+ const gmpMapRef = useRef(null);
4034
+ const directionsRendererRef = useRef(null);
4035
+ useRef(false);
4036
+ const isCalculatingRef = useRef(false);
4037
+ useEffect(() => {
4038
+ if (!isLoaded && apiKey && !loadError && load) {
4039
+ load(apiKey).catch(console.error);
4040
+ }
4041
+ }, [isLoaded, apiKey, loadError, load]);
4042
+ useEffect(() => {
4043
+ if (!isLoaded || !gmpMapRef.current) return;
4044
+ const setupMap = (map) => {
4045
+ mapRef.current = map;
4046
+ const computedStyle = getComputedStyle(document.documentElement);
4047
+ const primaryColor = computedStyle.getPropertyValue("--primary").trim() || "#4F46E5";
4048
+ if (!directionsRendererRef.current) {
4049
+ directionsRendererRef.current = new google.maps.DirectionsRenderer({
4050
+ map,
4051
+ suppressMarkers: false,
4052
+ polylineOptions: {
4053
+ strokeColor: primaryColor,
4054
+ strokeWeight: 5,
4055
+ strokeOpacity: 0.8
4056
+ }
4057
+ });
4058
+ } else {
4059
+ directionsRendererRef.current.setMap(map);
4060
+ }
4061
+ };
4062
+ const gmpMap = gmpMapRef.current;
4063
+ if (gmpMap.innerMap) {
4064
+ setupMap(gmpMap.innerMap);
4065
+ } else {
4066
+ const interval = setInterval(() => {
4067
+ if (gmpMap.innerMap) {
4068
+ setupMap(gmpMap.innerMap);
4069
+ clearInterval(interval);
4070
+ }
4071
+ }, 100);
4072
+ return () => clearInterval(interval);
4073
+ }
4074
+ return () => {
4075
+ if (directionsRendererRef.current) {
4076
+ directionsRendererRef.current.setMap(null);
4077
+ }
4078
+ mapRef.current = null;
4079
+ };
4080
+ }, [isLoaded]);
4081
+ useEffect(() => {
4082
+ if (gmpMapRef.current && origin) {
4083
+ gmpMapRef.current.center = origin;
4084
+ }
4085
+ }, [origin.lat, origin.lng]);
4086
+ useEffect(() => {
4087
+ if (gmpMapRef.current) {
4088
+ gmpMapRef.current.zoom = 13;
4089
+ }
4090
+ }, []);
4091
+ useEffect(() => {
4092
+ const map = mapRef.current;
4093
+ const renderer = directionsRendererRef.current;
4094
+ if (!map || !renderer || !isLoaded || isCalculatingRef.current) return;
4095
+ if (!origin || !destination) return;
4096
+ isCalculatingRef.current = true;
4097
+ const directionsService = new google.maps.DirectionsService();
4098
+ const request = {
4099
+ origin,
4100
+ destination,
4101
+ waypoints: waypoints.map((wp) => ({
4102
+ location: wp,
4103
+ stopover: true
4104
+ })),
4105
+ travelMode: google.maps.TravelMode[travelMode]
4106
+ };
4107
+ directionsService.route(request, (result, status) => {
4108
+ var _a;
4109
+ isCalculatingRef.current = false;
4110
+ if (status === "OK" && result) {
4111
+ renderer.setDirections(result);
4112
+ const route = result.routes[0];
4113
+ if (((_a = route == null ? void 0 : route.legs) == null ? void 0 : _a.length) > 0 && onRouteCalculated) {
4114
+ let totalDistance = 0;
4115
+ let totalDuration = 0;
4116
+ route.legs.forEach((leg) => {
4117
+ if (leg.distance) totalDistance += leg.distance.value;
4118
+ if (leg.duration) totalDuration += leg.duration.value;
4119
+ });
4120
+ const distanceKm = (totalDistance / 1e3).toFixed(1);
4121
+ const distanceText = `${distanceKm} km`;
4122
+ const hours = Math.floor(totalDuration / 3600);
4123
+ const minutes = Math.floor(totalDuration % 3600 / 60);
4124
+ const durationText = hours > 0 ? `${hours}h ${minutes}min` : `${minutes} min`;
4125
+ onRouteCalculated(distanceText, durationText);
4126
+ }
4127
+ }
4128
+ });
4129
+ }, [isLoaded, origin.lat, origin.lng, destination.lat, destination.lng, travelMode, mapRef.current]);
4130
+ if (loadError) {
4131
+ return /* @__PURE__ */ jsx(
4132
+ "div",
4133
+ {
4134
+ ref,
4135
+ className: cn(
4136
+ "relative rounded-[var(--radius-card)] border border-destructive/50 overflow-hidden bg-destructive/5",
4137
+ className
4138
+ ),
4139
+ style: { height },
4140
+ ...divProps,
4141
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2 p-6", children: [
4142
+ /* @__PURE__ */ jsx("div", { className: "text-destructive", children: /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
4143
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: "Failed to load Google Maps" }),
4144
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Check API key in Settings" })
4145
+ ] }) })
4146
+ }
4147
+ );
4148
+ }
4149
+ if (!isLoaded) {
4150
+ return /* @__PURE__ */ jsx(
4151
+ "div",
4152
+ {
4153
+ ref,
4154
+ className: cn(
4155
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted animate-pulse",
4156
+ className
4157
+ ),
4158
+ style: { height },
4159
+ ...divProps
4160
+ }
4161
+ );
4162
+ }
4163
+ return /* @__PURE__ */ jsx(
4164
+ "div",
4165
+ {
4166
+ ref,
4167
+ className: cn(
4168
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden",
4169
+ className
4170
+ ),
4171
+ style: { height },
4172
+ ...divProps,
4173
+ children: /* @__PURE__ */ jsx(
4174
+ "gmp-map",
4175
+ {
4176
+ ref: gmpMapRef,
4177
+ style: { height: "100%", width: "100%", display: "block" },
4178
+ "map-id": props.mapId || "xertica-route-map"
4179
+ }
4180
+ )
4181
+ }
4182
+ );
4183
+ }
4184
+ );
4185
+ RouteMapContent.displayName = "RouteMapContent";
4186
+ const RouteMap = React__default.forwardRef(
4187
+ (props, ref) => {
4188
+ const { isLoaded, loadError } = useGoogleMapsLoader();
4189
+ const effectiveApiKey = props.apiKey || typeof import.meta !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
4190
+ const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
4191
+ if (isLoaded || isValidKey || loadError) {
4192
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4193
+ }
4194
+ const isScriptInjected = typeof document !== "undefined" && !!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]');
4195
+ if (isScriptInjected) {
4196
+ return /* @__PURE__ */ jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
4197
+ }
4198
+ const {
4199
+ origin,
4200
+ destination,
4201
+ waypoints,
4202
+ travelMode,
4203
+ height,
4204
+ apiKey,
4205
+ mapContainerClassName,
4206
+ disableDefaultUI,
4207
+ zoomControl,
4208
+ streetViewControl,
4209
+ mapTypeControl,
4210
+ fullscreenControl,
4211
+ onRouteCalculated,
4212
+ ...divProps
4213
+ } = props;
4214
+ return /* @__PURE__ */ jsx(
4215
+ "div",
4216
+ {
4217
+ ref,
4218
+ className: cn(
4219
+ "relative rounded-[var(--radius-card)] border border-border overflow-hidden bg-muted",
4220
+ props.className
4221
+ ),
4222
+ style: { height: props.height || "450px" },
4223
+ ...divProps,
4224
+ children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-muted/50 to-muted", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
4225
+ /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs("svg", { className: "w-8 h-8 text-primary", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
4226
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
4227
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
4228
+ ] }) }),
4229
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Configure Google Maps API Key in Settings" })
4230
+ ] }) })
4231
+ }
4232
+ );
4233
+ }
4234
+ );
4235
+ RouteMap.displayName = "RouteMap";
4236
+ const SimpleMap = React__default.forwardRef(
4237
+ ({
4238
+ center,
4239
+ address,
4240
+ markerTitle,
4241
+ markerInfo,
4242
+ showMarker = true,
4243
+ zoom = 15,
4244
+ height = "350px",
4245
+ ...props
4246
+ }, ref) => {
4247
+ const markers = showMarker && center ? [
4248
+ {
4249
+ position: center,
4250
+ title: markerTitle || address || "Location",
4251
+ info: markerInfo || address
4252
+ }
4253
+ ] : [];
4254
+ return /* @__PURE__ */ jsx(
4255
+ Map$1,
4256
+ {
4257
+ ref,
4258
+ center,
4259
+ zoom,
4260
+ height,
4261
+ markers,
4262
+ ...props
4263
+ }
4264
+ );
4265
+ }
4266
+ );
4267
+ SimpleMap.displayName = "SimpleMap";
4268
+ function AssistantChart({
4269
+ data,
4270
+ config,
4271
+ categoryKey = "month",
4272
+ bars,
4273
+ xAxisFormatter,
4274
+ className
4275
+ }) {
4276
+ const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
4277
+ const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
4278
+ return /* @__PURE__ */ jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxs(BarChart, { accessibilityLayer: true, data, children: [
4279
+ /* @__PURE__ */ jsx(CartesianGrid, { vertical: false }),
4280
+ /* @__PURE__ */ jsx(
4281
+ XAxis,
4282
+ {
4283
+ dataKey: categoryKey,
4284
+ tickLine: false,
4285
+ tickMargin: 10,
4286
+ axisLine: false,
4287
+ tickFormatter: formatTick
4288
+ }
4289
+ ),
4290
+ /* @__PURE__ */ jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx(ChartTooltipContent, { indicator: "dashed" }) }),
4291
+ resolvedBars.map((bar) => /* @__PURE__ */ jsx(
4292
+ Bar,
4293
+ {
4294
+ dataKey: bar.dataKey,
4295
+ fill: bar.fill ?? `var(--color-${bar.dataKey})`,
4296
+ radius: bar.radius ?? 4
4297
+ },
4298
+ bar.dataKey
4299
+ ))
4300
+ ] }) });
4301
+ }
4302
+ const MOBILE_BREAKPOINT = 768;
4303
+ function useIsMobile() {
4304
+ const [isMobile, setIsMobile] = React.useState(
4305
+ void 0
4306
+ );
4307
+ React.useEffect(() => {
4308
+ var _a;
4309
+ if (typeof window === "undefined") {
4310
+ setIsMobile(false);
4311
+ return;
4312
+ }
4313
+ const mql = (_a = window.matchMedia) == null ? void 0 : _a.call(window, `(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
4314
+ const onChange = () => {
4315
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4316
+ };
4317
+ if (mql) {
4318
+ mql.addEventListener("change", onChange);
4319
+ }
4320
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4321
+ return () => {
4322
+ if (mql) {
4323
+ mql.removeEventListener("change", onChange);
4324
+ }
4325
+ };
4326
+ }, []);
4327
+ return !!isMobile;
4328
+ }
4329
+ const useMobile = useIsMobile;
4330
+ export {
4331
+ ContextMenuPortal as $,
4332
+ Accordion as A,
4333
+ Badge as B,
4334
+ Calendar as C,
4335
+ Carousel as D,
4336
+ CarouselContent as E,
4337
+ CarouselItem as F,
4338
+ CarouselNext as G,
4339
+ CarouselPrevious as H,
4340
+ Checkbox as I,
4341
+ Collapsible as J,
4342
+ CollapsibleContent as K,
4343
+ CollapsibleTrigger as L,
4344
+ Command as M,
4345
+ CommandDialog as N,
4346
+ CommandEmpty as O,
4347
+ CommandGroup as P,
4348
+ CommandInput as Q,
4349
+ CommandItem as R,
4350
+ CommandList as S,
4351
+ CommandSeparator as T,
4352
+ CommandShortcut as U,
4353
+ ContextMenu as V,
4354
+ ContextMenuCheckboxItem as W,
4355
+ ContextMenuContent as X,
4356
+ ContextMenuGroup as Y,
4357
+ ContextMenuItem as Z,
4358
+ ContextMenuLabel as _,
4359
+ AccordionContent as a,
4360
+ NavigationMenuList as a$,
4361
+ ContextMenuRadioGroup as a0,
4362
+ ContextMenuRadioItem as a1,
4363
+ ContextMenuSeparator as a2,
4364
+ ContextMenuShortcut as a3,
4365
+ ContextMenuSub as a4,
4366
+ ContextMenuSubContent as a5,
4367
+ ContextMenuSubTrigger as a6,
4368
+ ContextMenuTrigger as a7,
4369
+ Drawer as a8,
4370
+ DrawerContent as a9,
4371
+ InputOTP as aA,
4372
+ InputOTPGroup as aB,
4373
+ InputOTPSeparator as aC,
4374
+ InputOTPSlot as aD,
4375
+ Label as aE,
4376
+ Map$1 as aF,
4377
+ Menubar as aG,
4378
+ MenubarCheckboxItem as aH,
4379
+ MenubarContent as aI,
4380
+ MenubarGroup as aJ,
4381
+ MenubarItem as aK,
4382
+ MenubarLabel as aL,
4383
+ MenubarMenu as aM,
4384
+ MenubarPortal as aN,
4385
+ MenubarRadioGroup as aO,
4386
+ MenubarRadioItem as aP,
4387
+ MenubarSeparator as aQ,
4388
+ MenubarShortcut as aR,
4389
+ MenubarSub as aS,
4390
+ MenubarSubContent as aT,
4391
+ MenubarSubTrigger as aU,
4392
+ MenubarTrigger as aV,
4393
+ NavigationMenu as aW,
4394
+ NavigationMenuContent as aX,
4395
+ NavigationMenuIndicator as aY,
4396
+ NavigationMenuItem as aZ,
4397
+ NavigationMenuLink as a_,
4398
+ DrawerDescription as aa,
4399
+ DrawerFooter as ab,
4400
+ DrawerHandle as ac,
4401
+ DrawerHeader as ad,
4402
+ DrawerOverlay as ae,
4403
+ DrawerPortal as af,
4404
+ DrawerTitle as ag,
4405
+ DrawerTrigger as ah,
4406
+ Empty as ai,
4407
+ EmptyAction as aj,
4408
+ EmptyDescription as ak,
4409
+ EmptyIcon as al,
4410
+ EmptyImage as am,
4411
+ EmptyTitle as an,
4412
+ FileUpload as ao,
4413
+ Form as ap,
4414
+ FormControl as aq,
4415
+ FormDescription as ar,
4416
+ FormField as as,
4417
+ FormItem as at,
4418
+ FormLabel as au,
4419
+ FormMessage as av,
4420
+ HoverCard as aw,
4421
+ HoverCardContent as ax,
4422
+ HoverCardTrigger as ay,
4423
+ ImageWithFallback as az,
4424
+ AccordionItem as b,
4425
+ NavigationMenuTrigger as b0,
4426
+ NavigationMenuViewport as b1,
4427
+ NotificationBadge as b2,
4428
+ PageHeader as b3,
4429
+ PageHeaderDescription as b4,
4430
+ PageHeaderHeading as b5,
4431
+ Pagination as b6,
4432
+ PaginationContent as b7,
4433
+ PaginationEllipsis as b8,
4434
+ PaginationItem as b9,
4435
+ Switch as bA,
4436
+ Tabs as bB,
4437
+ TabsContent as bC,
4438
+ TabsList as bD,
4439
+ TabsTrigger as bE,
4440
+ Timeline as bF,
4441
+ TimelineContent as bG,
4442
+ TimelineDescription as bH,
4443
+ TimelineDot as bI,
4444
+ TimelineHeading as bJ,
4445
+ TimelineItem as bK,
4446
+ TimelineTime as bL,
4447
+ Toggle as bM,
4448
+ ToggleGroup as bN,
4449
+ ToggleGroupItem as bO,
4450
+ TreeView as bP,
4451
+ badgeVariants as bQ,
4452
+ navigationMenuTriggerStyle as bR,
4453
+ toggleVariants as bS,
4454
+ useFormField as bT,
4455
+ useIsMobile as bU,
4456
+ useMobile as bV,
4457
+ useStepper as bW,
4458
+ PaginationLink as ba,
4459
+ PaginationNext as bb,
4460
+ PaginationPrevious as bc,
4461
+ Progress as bd,
4462
+ RadioGroup as be,
4463
+ RadioGroupItem as bf,
4464
+ Rating as bg,
4465
+ ResizableHandle as bh,
4466
+ ResizablePanel as bi,
4467
+ ResizablePanelGroup as bj,
4468
+ RouteMap as bk,
4469
+ Search as bl,
4470
+ Separator as bm,
4471
+ Sheet as bn,
4472
+ SheetContent as bo,
4473
+ SheetDescription as bp,
4474
+ SheetFooter as bq,
4475
+ SheetHeader as br,
4476
+ SheetPortal as bs,
4477
+ SheetTitle as bt,
4478
+ SheetTrigger as bu,
4479
+ SimpleMap as bv,
4480
+ Skeleton as bw,
4481
+ StatsCard as bx,
4482
+ Step as by,
4483
+ Stepper as bz,
4484
+ AccordionTrigger as c,
4485
+ Alert as d,
4486
+ AlertDescription as e,
4487
+ AlertDialog as f,
4488
+ AlertDialogAction as g,
4489
+ AlertDialogCancel as h,
4490
+ AlertDialogContent as i,
4491
+ AlertDialogDescription as j,
4492
+ AlertDialogFooter as k,
4493
+ AlertDialogHeader as l,
4494
+ AlertDialogOverlay as m,
4495
+ AlertDialogPortal as n,
4496
+ AlertDialogTitle as o,
4497
+ AlertDialogTrigger as p,
4498
+ AlertTitle as q,
4499
+ AspectRatio as r,
4500
+ AssistantChart as s,
4501
+ Card as t,
4502
+ CardAction as u,
4503
+ CardContent as v,
4504
+ CardDescription as w,
4505
+ CardFooter as x,
4506
+ CardHeader as y,
4507
+ CardTitle as z
4508
+ };