@spacesync/client 0.1.9 → 0.1.11

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 (129) hide show
  1. package/dist/analog-clock-picker.js +3 -11
  2. package/dist/analog-clock-picker.js.map +1 -1
  3. package/dist/booking-schedule-calendars.d.ts +1 -29
  4. package/dist/booking-schedule-calendars.js +6 -92
  5. package/dist/booking-schedule-calendars.js.map +1 -1
  6. package/dist/booking-schedule.d.ts +71 -0
  7. package/dist/booking-schedule.js +3 -0
  8. package/dist/booking-schedule.js.map +1 -0
  9. package/dist/booking-space-layout-picker.js +8 -11
  10. package/dist/booking-space-layout-picker.js.map +1 -1
  11. package/dist/button-Iem7kbk0.d.ts +16 -0
  12. package/dist/chat-stick-to-bottom.js +0 -10
  13. package/dist/chat-stick-to-bottom.js.map +1 -1
  14. package/dist/chunk-2IZODKTR.js +116 -0
  15. package/dist/chunk-2IZODKTR.js.map +1 -0
  16. package/dist/chunk-2TT2ZGMT.js +21 -0
  17. package/dist/chunk-2TT2ZGMT.js.map +1 -0
  18. package/dist/chunk-3MAGTCCN.js +192 -0
  19. package/dist/chunk-3MAGTCCN.js.map +1 -0
  20. package/dist/chunk-56H7UFAW.js +237 -0
  21. package/dist/chunk-56H7UFAW.js.map +1 -0
  22. package/dist/chunk-5HOK5JHR.js +60 -0
  23. package/dist/chunk-5HOK5JHR.js.map +1 -0
  24. package/dist/{chunk-H7EX6B6N.js → chunk-5NOKULX2.js} +5 -4
  25. package/dist/chunk-5NOKULX2.js.map +1 -0
  26. package/dist/chunk-6VJQIBC3.js +715 -0
  27. package/dist/chunk-6VJQIBC3.js.map +1 -0
  28. package/dist/chunk-BQVMO33N.js +133 -0
  29. package/dist/chunk-BQVMO33N.js.map +1 -0
  30. package/dist/chunk-CXXOKCLJ.js +37 -0
  31. package/dist/chunk-CXXOKCLJ.js.map +1 -0
  32. package/dist/chunk-FN4BWFDX.js +43 -0
  33. package/dist/chunk-FN4BWFDX.js.map +1 -0
  34. package/dist/chunk-HRHDOLWU.js +62 -0
  35. package/dist/chunk-HRHDOLWU.js.map +1 -0
  36. package/dist/chunk-HZB2EHEH.js +216 -0
  37. package/dist/chunk-HZB2EHEH.js.map +1 -0
  38. package/dist/chunk-IBGGQXTH.js +21 -0
  39. package/dist/chunk-IBGGQXTH.js.map +1 -0
  40. package/dist/chunk-JCEOU7BU.js +128 -0
  41. package/dist/chunk-JCEOU7BU.js.map +1 -0
  42. package/dist/{chunk-RV5PMZYZ.js → chunk-MBZAYH5D.js} +4 -18
  43. package/dist/chunk-MBZAYH5D.js.map +1 -0
  44. package/dist/chunk-NWVNYKND.js +153 -0
  45. package/dist/chunk-NWVNYKND.js.map +1 -0
  46. package/dist/chunk-OTSA5ROL.js +209 -0
  47. package/dist/chunk-OTSA5ROL.js.map +1 -0
  48. package/dist/chunk-OV5ODANJ.js +224 -0
  49. package/dist/chunk-OV5ODANJ.js.map +1 -0
  50. package/dist/chunk-PPMJZVR4.js +37 -0
  51. package/dist/chunk-PPMJZVR4.js.map +1 -0
  52. package/dist/{chunk-CKCXQBHQ.js → chunk-RC5SWZPB.js} +5 -4
  53. package/dist/chunk-RC5SWZPB.js.map +1 -0
  54. package/dist/chunk-SHMKDGFF.js +75 -0
  55. package/dist/chunk-SHMKDGFF.js.map +1 -0
  56. package/dist/chunk-T3SOBIYA.js +61 -0
  57. package/dist/chunk-T3SOBIYA.js.map +1 -0
  58. package/dist/chunk-TH5RASJS.js +97 -0
  59. package/dist/chunk-TH5RASJS.js.map +1 -0
  60. package/dist/{chunk-LUB7QWGU.js → chunk-VIJ2HWPZ.js} +5 -159
  61. package/dist/chunk-VIJ2HWPZ.js.map +1 -0
  62. package/dist/chunk-VQ63T7CJ.js +22 -0
  63. package/dist/chunk-VQ63T7CJ.js.map +1 -0
  64. package/dist/chunk-XDVGFHK4.js +50 -0
  65. package/dist/chunk-XDVGFHK4.js.map +1 -0
  66. package/dist/chunk-XI4BQY5T.js +188 -0
  67. package/dist/chunk-XI4BQY5T.js.map +1 -0
  68. package/dist/detail-page-header.js +1 -1
  69. package/dist/file-viewer-dialog.js +3 -9
  70. package/dist/file-viewer-dialog.js.map +1 -1
  71. package/dist/floor-switcher.js +5 -9
  72. package/dist/floor-switcher.js.map +1 -1
  73. package/dist/layout-canvas-view.js +8 -11
  74. package/dist/page-list-chrome.js +5 -3
  75. package/dist/page-list-loading.js +5 -3
  76. package/dist/page-list-loading.js.map +1 -1
  77. package/dist/platform-support-message-composer.js +2 -10
  78. package/dist/platform-support-message-composer.js.map +1 -1
  79. package/dist/sidebar-Dzvrjr69.d.ts +85 -0
  80. package/dist/styles/theme.css +52 -2
  81. package/dist/styles/theme.css.map +1 -1
  82. package/dist/theme-appearance-control.js +2 -1
  83. package/dist/theme-appearance-control.js.map +1 -1
  84. package/dist/ui/accordion.d.ts +9 -0
  85. package/dist/ui/accordion.js +4 -0
  86. package/dist/ui/accordion.js.map +1 -0
  87. package/dist/ui/calendar.d.ts +6 -0
  88. package/dist/ui/calendar.js +4 -0
  89. package/dist/ui/calendar.js.map +1 -0
  90. package/dist/ui/carousel.d.ts +22 -0
  91. package/dist/ui/carousel.js +5 -0
  92. package/dist/ui/carousel.js.map +1 -0
  93. package/dist/ui/chart.d.ts +42 -0
  94. package/dist/ui/chart.js +229 -0
  95. package/dist/ui/chart.js.map +1 -0
  96. package/dist/ui/command.d.ts +19 -0
  97. package/dist/ui/command.js +5 -0
  98. package/dist/ui/command.js.map +1 -0
  99. package/dist/ui/context-menu.d.ts +27 -0
  100. package/dist/ui/context-menu.js +4 -0
  101. package/dist/ui/context-menu.js.map +1 -0
  102. package/dist/ui/form.d.ts +27 -0
  103. package/dist/ui/form.js +5 -0
  104. package/dist/ui/form.js.map +1 -0
  105. package/dist/ui/input-otp.d.ts +13 -0
  106. package/dist/ui/input-otp.js +4 -0
  107. package/dist/ui/input-otp.js.map +1 -0
  108. package/dist/ui/menubar.d.ts +28 -0
  109. package/dist/ui/menubar.js +4 -0
  110. package/dist/ui/menubar.js.map +1 -0
  111. package/dist/ui/navigation-menu.d.ts +17 -0
  112. package/dist/ui/navigation-menu.js +4 -0
  113. package/dist/ui/navigation-menu.js.map +1 -0
  114. package/dist/ui/resizable.d.ts +10 -0
  115. package/dist/ui/resizable.js +4 -0
  116. package/dist/ui/resizable.js.map +1 -0
  117. package/dist/ui/sidebar.d.ts +7 -0
  118. package/dist/ui/sidebar.js +9 -0
  119. package/dist/ui/sidebar.js.map +1 -0
  120. package/dist/ui.d.ts +28 -272
  121. package/dist/ui.js +2427 -6
  122. package/dist/ui.js.map +1 -1
  123. package/package.json +9 -1
  124. package/dist/chunk-CKCXQBHQ.js.map +0 -1
  125. package/dist/chunk-F7MU5T46.js +0 -5146
  126. package/dist/chunk-F7MU5T46.js.map +0 -1
  127. package/dist/chunk-H7EX6B6N.js.map +0 -1
  128. package/dist/chunk-LUB7QWGU.js.map +0 -1
  129. package/dist/chunk-RV5PMZYZ.js.map +0 -1
package/dist/ui.js CHANGED
@@ -1,14 +1,2435 @@
1
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CheckboxField, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContentFade, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DashFade, DateField, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FeedSkeleton, FieldLabel, FilterPopover, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, IconInput, InputGroup, InputGroupInput, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberInput, PasswordInput, PhoneInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ReceiptCard, ReceiptSummaryRow, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveAlertDialog, ResponsiveAlertDialogAction, ResponsiveAlertDialogCancel, ResponsiveAlertDialogContent, ResponsiveAlertDialogDescription, AlertDialogFooter as ResponsiveAlertDialogFooter, AlertDialogHeader as ResponsiveAlertDialogHeader, ResponsiveAlertDialogTitle, ResponsiveDialog, ResponsiveDialogClose, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogTitle, ResponsiveDialogTrigger, ScrollArea, ScrollBar, SegmentedTabList, SegmentedTabTrigger, SelectableCard, SelectableListRow, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShellTopBarViewToggle, ShellTopBarViewToggleItem, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Slider, SmoothSize, Switch, TabCountBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, TimeField, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, addMinutesToHm, badgeVariants, fieldLabelClass, formatTimeForDisplay, hmToMinutes, hourlyEndTimes, minutesToHm, navigationMenuTriggerStyle, parseHm, snapScheduleEndTime, tabsListVariants, tabsTriggerVariants, textVariants, toTimeStr, toggleVariants, useFormField, useIsMobile, useResponsiveDialogDrawer, useSidebar } from './chunk-F7MU5T46.js';
2
- export { Label, RadioGroup, RadioGroupItem } from './chunk-RV5PMZYZ.js';
1
+ export { RadioGroup, RadioGroupItem } from './chunk-MBZAYH5D.js';
2
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './chunk-3MAGTCCN.js';
3
+ export { ResponsiveDialog, ResponsiveDialogClose, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogTitle, ResponsiveDialogTrigger, useResponsiveDialogDrawer } from './chunk-SHMKDGFF.js';
4
+ export { Textarea } from './chunk-VQ63T7CJ.js';
5
+ export { Checkbox, CheckboxField } from './chunk-2IZODKTR.js';
6
+ export { TimeField, addMinutesToHm, formatTimeForDisplay, hmToMinutes, hourlyEndTimes, minutesToHm, parseHm, snapScheduleEndTime, toTimeStr } from './chunk-OV5ODANJ.js';
3
7
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './chunk-L65F4EMK.js';
4
- import './chunk-PBNBLCC2.js';
8
+ import { formatDate, toDateStr } from './chunk-PBNBLCC2.js';
9
+ import { Popover, PopoverTrigger, PopoverContent } from './chunk-CXXOKCLJ.js';
10
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './chunk-CXXOKCLJ.js';
11
+ import { Drawer, DrawerContent, DrawerTitle, DrawerDescription } from './chunk-VVXGQKN7.js';
5
12
  export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './chunk-VVXGQKN7.js';
6
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './chunk-7YCAAP43.js';
13
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchField } from './chunk-BQVMO33N.js';
14
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-VIJ2HWPZ.js';
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './chunk-VIJ2HWPZ.js';
16
+ import { shellTopBarSegmentedShellClass, shellTopBarSegmentedItemClass } from './chunk-FCY5FYJB.js';
17
+ export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from './chunk-56H7UFAW.js';
18
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from './chunk-HZB2EHEH.js';
19
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle } from './chunk-NWVNYKND.js';
20
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from './chunk-XI4BQY5T.js';
21
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './chunk-FN4BWFDX.js';
22
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './chunk-T3SOBIYA.js';
23
+ import { Separator } from './chunk-6VJQIBC3.js';
24
+ export { Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from './chunk-6VJQIBC3.js';
25
+ import { useIsMobile } from './chunk-2TT2ZGMT.js';
26
+ export { useIsMobile } from './chunk-2TT2ZGMT.js';
27
+ import { Tooltip, TooltipTrigger, TooltipContent } from './chunk-XDVGFHK4.js';
28
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './chunk-XDVGFHK4.js';
29
+ import { Skeleton } from './chunk-DC4QH6W2.js';
7
30
  export { Skeleton } from './chunk-DC4QH6W2.js';
8
- export { Input, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SearchField, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, inputVariants } from './chunk-LUB7QWGU.js';
31
+ import { Input } from './chunk-PPMJZVR4.js';
32
+ export { Input, inputVariants } from './chunk-PPMJZVR4.js';
33
+ import { Button, buttonVariants } from './chunk-VHINHHZQ.js';
9
34
  export { Button, buttonVariants } from './chunk-VHINHHZQ.js';
10
- import './chunk-FCY5FYJB.js';
11
35
  import './chunk-OWNUMPUC.js';
36
+ import { Calendar as Calendar$1 } from './chunk-5HOK5JHR.js';
37
+ export { Calendar } from './chunk-5HOK5JHR.js';
38
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from './chunk-JCEOU7BU.js';
39
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './chunk-7YCAAP43.js';
40
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from './chunk-TH5RASJS.js';
41
+ export { Label } from './chunk-IBGGQXTH.js';
42
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from './chunk-HRHDOLWU.js';
43
+ import { cn } from './chunk-DMPSQ22Q.js';
12
44
  export { cn } from './chunk-DMPSQ22Q.js';
45
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
46
+ import { jsx, jsxs } from 'react/jsx-runtime';
47
+ import { cva } from 'class-variance-authority';
48
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
49
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
50
+ import { Slot } from '@radix-ui/react-slot';
51
+ import { EyeOff, Eye, ChevronRight, MoreHorizontal, Pipette, Calendar, ListFilter } from 'lucide-react';
52
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
53
+ import * as React7 from 'react';
54
+ import { useRef, useState, useLayoutEffect } from 'react';
55
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
56
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
57
+ import * as SliderPrimitive from '@radix-ui/react-slider';
58
+ import { useTheme } from 'next-themes';
59
+ import { Toaster as Toaster$1 } from 'sonner';
60
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
61
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
62
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
63
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
64
+
65
+ function AlertDialog({ ...props }) {
66
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
67
+ }
68
+ function AlertDialogTrigger({
69
+ ...props
70
+ }) {
71
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
72
+ }
73
+ function AlertDialogPortal({ ...props }) {
74
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
75
+ }
76
+ function AlertDialogOverlay({
77
+ className,
78
+ ...props
79
+ }) {
80
+ return /* @__PURE__ */ jsx(
81
+ AlertDialogPrimitive.Overlay,
82
+ {
83
+ "data-slot": "alert-dialog-overlay",
84
+ className: cn(
85
+ "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",
86
+ className
87
+ ),
88
+ ...props
89
+ }
90
+ );
91
+ }
92
+ function AlertDialogContent({
93
+ className,
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
97
+ /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
98
+ /* @__PURE__ */ jsx(
99
+ AlertDialogPrimitive.Content,
100
+ {
101
+ "data-slot": "alert-dialog-content",
102
+ className: cn(
103
+ "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",
104
+ className
105
+ ),
106
+ ...props
107
+ }
108
+ )
109
+ ] });
110
+ }
111
+ function AlertDialogHeader({ className, ...props }) {
112
+ return /* @__PURE__ */ jsx(
113
+ "div",
114
+ {
115
+ "data-slot": "alert-dialog-header",
116
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
117
+ ...props
118
+ }
119
+ );
120
+ }
121
+ function AlertDialogFooter({ className, ...props }) {
122
+ return /* @__PURE__ */ jsx(
123
+ "div",
124
+ {
125
+ "data-slot": "alert-dialog-footer",
126
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
127
+ ...props
128
+ }
129
+ );
130
+ }
131
+ function AlertDialogTitle({
132
+ className,
133
+ ...props
134
+ }) {
135
+ return /* @__PURE__ */ jsx(
136
+ AlertDialogPrimitive.Title,
137
+ {
138
+ "data-slot": "alert-dialog-title",
139
+ className: cn("text-lg font-semibold", className),
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ function AlertDialogDescription({
145
+ className,
146
+ ...props
147
+ }) {
148
+ return /* @__PURE__ */ jsx(
149
+ AlertDialogPrimitive.Description,
150
+ {
151
+ "data-slot": "alert-dialog-description",
152
+ className: cn("text-muted-foreground text-sm", className),
153
+ ...props
154
+ }
155
+ );
156
+ }
157
+ function AlertDialogAction({
158
+ className,
159
+ ...props
160
+ }) {
161
+ return /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { className: cn(buttonVariants(), className), ...props });
162
+ }
163
+ function AlertDialogCancel({
164
+ className,
165
+ ...props
166
+ }) {
167
+ return /* @__PURE__ */ jsx(
168
+ AlertDialogPrimitive.Cancel,
169
+ {
170
+ className: cn(buttonVariants({ variant: "outline" }), className),
171
+ ...props
172
+ }
173
+ );
174
+ }
175
+ var alertVariants = cva(
176
+ "relative w-full rounded-lg border px-4 py-3 text-sm 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-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
177
+ {
178
+ variants: {
179
+ variant: {
180
+ default: "bg-card text-card-foreground",
181
+ destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
182
+ }
183
+ },
184
+ defaultVariants: {
185
+ variant: "default"
186
+ }
187
+ }
188
+ );
189
+ function Alert({
190
+ className,
191
+ variant,
192
+ ...props
193
+ }) {
194
+ return /* @__PURE__ */ jsx(
195
+ "div",
196
+ {
197
+ "data-slot": "alert",
198
+ role: "alert",
199
+ className: cn(alertVariants({ variant }), className),
200
+ ...props
201
+ }
202
+ );
203
+ }
204
+ function AlertTitle({ className, ...props }) {
205
+ return /* @__PURE__ */ jsx(
206
+ "div",
207
+ {
208
+ "data-slot": "alert-title",
209
+ className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
210
+ ...props
211
+ }
212
+ );
213
+ }
214
+ function AlertDescription({ className, ...props }) {
215
+ return /* @__PURE__ */ jsx(
216
+ "div",
217
+ {
218
+ "data-slot": "alert-description",
219
+ className: cn(
220
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
221
+ className
222
+ ),
223
+ ...props
224
+ }
225
+ );
226
+ }
227
+ function AspectRatio({ ...props }) {
228
+ return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
229
+ }
230
+ function Avatar({ className, ...props }) {
231
+ return /* @__PURE__ */ jsx(
232
+ AvatarPrimitive.Root,
233
+ {
234
+ "data-slot": "avatar",
235
+ className: cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", className),
236
+ ...props
237
+ }
238
+ );
239
+ }
240
+ function AvatarImage({ className, ...props }) {
241
+ return /* @__PURE__ */ jsx(
242
+ AvatarPrimitive.Image,
243
+ {
244
+ "data-slot": "avatar-image",
245
+ className: cn("aspect-square size-full", className),
246
+ ...props
247
+ }
248
+ );
249
+ }
250
+ function AvatarFallback({
251
+ className,
252
+ ...props
253
+ }) {
254
+ return /* @__PURE__ */ jsx(
255
+ AvatarPrimitive.Fallback,
256
+ {
257
+ "data-slot": "avatar-fallback",
258
+ className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
259
+ ...props
260
+ }
261
+ );
262
+ }
263
+ var badgeVariants = cva(
264
+ "inline-flex items-center justify-center border w-fit whitespace-nowrap shrink-0 [&>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",
265
+ {
266
+ variants: {
267
+ variant: {
268
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
269
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
270
+ 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",
271
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
272
+ },
273
+ size: {
274
+ default: "rounded-md px-2 py-0.5 text-xs font-medium gap-1 [&>svg]:size-3 justify-center",
275
+ pill: "rounded-full px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide gap-1 [&>svg]:size-2.5"
276
+ }
277
+ },
278
+ defaultVariants: {
279
+ variant: "default",
280
+ size: "default"
281
+ }
282
+ }
283
+ );
284
+ function Badge({
285
+ className,
286
+ variant,
287
+ size,
288
+ asChild = false,
289
+ ...props
290
+ }) {
291
+ const Comp = asChild ? Slot : "span";
292
+ return /* @__PURE__ */ jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant, size }), className), ...props });
293
+ }
294
+ function Breadcrumb({ ...props }) {
295
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
296
+ }
297
+ function BreadcrumbList({ className, ...props }) {
298
+ return /* @__PURE__ */ jsx(
299
+ "ol",
300
+ {
301
+ "data-slot": "breadcrumb-list",
302
+ className: cn(
303
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
304
+ className
305
+ ),
306
+ ...props
307
+ }
308
+ );
309
+ }
310
+ function BreadcrumbItem({ className, ...props }) {
311
+ return /* @__PURE__ */ jsx(
312
+ "li",
313
+ {
314
+ "data-slot": "breadcrumb-item",
315
+ className: cn("inline-flex items-center gap-1.5", className),
316
+ ...props
317
+ }
318
+ );
319
+ }
320
+ function BreadcrumbLink({
321
+ asChild,
322
+ className,
323
+ ...props
324
+ }) {
325
+ const Comp = asChild ? Slot : "a";
326
+ return /* @__PURE__ */ jsx(
327
+ Comp,
328
+ {
329
+ "data-slot": "breadcrumb-link",
330
+ className: cn("hover:text-foreground transition-colors", className),
331
+ ...props
332
+ }
333
+ );
334
+ }
335
+ function BreadcrumbPage({ className, ...props }) {
336
+ return /* @__PURE__ */ jsx(
337
+ "span",
338
+ {
339
+ "data-slot": "breadcrumb-page",
340
+ role: "link",
341
+ "aria-disabled": "true",
342
+ "aria-current": "page",
343
+ className: cn("text-foreground font-normal", className),
344
+ ...props
345
+ }
346
+ );
347
+ }
348
+ function BreadcrumbSeparator({ children, className, ...props }) {
349
+ return /* @__PURE__ */ jsx(
350
+ "li",
351
+ {
352
+ "data-slot": "breadcrumb-separator",
353
+ role: "presentation",
354
+ "aria-hidden": "true",
355
+ className: cn("[&>svg]:size-3.5", className),
356
+ ...props,
357
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
358
+ }
359
+ );
360
+ }
361
+ function BreadcrumbEllipsis({ className, ...props }) {
362
+ return /* @__PURE__ */ jsxs(
363
+ "span",
364
+ {
365
+ "data-slot": "breadcrumb-ellipsis",
366
+ role: "presentation",
367
+ "aria-hidden": "true",
368
+ className: cn("flex size-9 items-center justify-center", className),
369
+ ...props,
370
+ children: [
371
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
372
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
373
+ ]
374
+ }
375
+ );
376
+ }
377
+ function Card({ className, ...props }) {
378
+ return /* @__PURE__ */ jsx(
379
+ "div",
380
+ {
381
+ "data-slot": "card",
382
+ className: cn(
383
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",
384
+ className
385
+ ),
386
+ ...props
387
+ }
388
+ );
389
+ }
390
+ function CardHeader({ className, ...props }) {
391
+ return /* @__PURE__ */ jsx(
392
+ "div",
393
+ {
394
+ "data-slot": "card-header",
395
+ className: cn(
396
+ "@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",
397
+ className
398
+ ),
399
+ ...props
400
+ }
401
+ );
402
+ }
403
+ function CardTitle({ className, ...props }) {
404
+ return /* @__PURE__ */ jsx("h4", { "data-slot": "card-title", className: cn("leading-none", className), ...props });
405
+ }
406
+ function CardDescription({ className, ...props }) {
407
+ return /* @__PURE__ */ jsx("p", { "data-slot": "card-description", className: cn("text-muted-foreground", className), ...props });
408
+ }
409
+ function CardAction({ className, ...props }) {
410
+ return /* @__PURE__ */ jsx(
411
+ "div",
412
+ {
413
+ "data-slot": "card-action",
414
+ className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
415
+ ...props
416
+ }
417
+ );
418
+ }
419
+ function CardContent({ className, ...props }) {
420
+ return /* @__PURE__ */ jsx(
421
+ "div",
422
+ {
423
+ "data-slot": "card-content",
424
+ className: cn("px-6 [&:last-child]:pb-6", className),
425
+ ...props
426
+ }
427
+ );
428
+ }
429
+ function CardFooter({ className, ...props }) {
430
+ return /* @__PURE__ */ jsx(
431
+ "div",
432
+ {
433
+ "data-slot": "card-footer",
434
+ className: cn("flex items-center px-6 pb-6 [.border-t]:pt-6", className),
435
+ ...props
436
+ }
437
+ );
438
+ }
439
+ function Collapsible({ ...props }) {
440
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
441
+ }
442
+ function CollapsibleTrigger2({
443
+ ...props
444
+ }) {
445
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
446
+ }
447
+ function CollapsibleContent2({
448
+ ...props
449
+ }) {
450
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
451
+ }
452
+ var HEX_RE = /^#?[0-9A-Fa-f]{6}$/;
453
+ function clamp(n, min, max) {
454
+ return Math.min(max, Math.max(min, n));
455
+ }
456
+ function normalizeHex(value) {
457
+ const trimmed = value.trim();
458
+ if (!HEX_RE.test(trimmed)) return null;
459
+ const withHash = trimmed.startsWith("#") ? trimmed : `#${trimmed}`;
460
+ return withHash.toUpperCase();
461
+ }
462
+ function hexToRgb(hex) {
463
+ const normalized = normalizeHex(hex);
464
+ if (!normalized) return null;
465
+ return {
466
+ r: parseInt(normalized.slice(1, 3), 16),
467
+ g: parseInt(normalized.slice(3, 5), 16),
468
+ b: parseInt(normalized.slice(5, 7), 16)
469
+ };
470
+ }
471
+ function rgbToHex(r, g, b) {
472
+ return `#${[r, g, b].map((channel) => clamp(Math.round(channel), 0, 255).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
473
+ }
474
+ function rgbToHsv(r, g, b) {
475
+ const rn = r / 255;
476
+ const gn = g / 255;
477
+ const bn = b / 255;
478
+ const max = Math.max(rn, gn, bn);
479
+ const min = Math.min(rn, gn, bn);
480
+ const d = max - min;
481
+ let h = 0;
482
+ if (d !== 0) {
483
+ if (max === rn) h = (gn - bn) / d % 6;
484
+ else if (max === gn) h = (bn - rn) / d + 2;
485
+ else h = (rn - gn) / d + 4;
486
+ h *= 60;
487
+ if (h < 0) h += 360;
488
+ }
489
+ const s = max === 0 ? 0 : d / max;
490
+ return { h, s, v: max };
491
+ }
492
+ function hsvToRgb(h, s, v) {
493
+ const c = v * s;
494
+ const x = c * (1 - Math.abs(h / 60 % 2 - 1));
495
+ const m = v - c;
496
+ let rp = 0;
497
+ let gp = 0;
498
+ let bp = 0;
499
+ if (h < 60) [rp, gp, bp] = [c, x, 0];
500
+ else if (h < 120) [rp, gp, bp] = [x, c, 0];
501
+ else if (h < 180) [rp, gp, bp] = [0, c, x];
502
+ else if (h < 240) [rp, gp, bp] = [0, x, c];
503
+ else if (h < 300) [rp, gp, bp] = [x, 0, c];
504
+ else [rp, gp, bp] = [c, 0, x];
505
+ return {
506
+ r: (rp + m) * 255,
507
+ g: (gp + m) * 255,
508
+ b: (bp + m) * 255
509
+ };
510
+ }
511
+ function hexToHsv(hex) {
512
+ const rgb = hexToRgb(hex);
513
+ if (!rgb) return { h: 210, s: 0.7, v: 0.95 };
514
+ return rgbToHsv(rgb.r, rgb.g, rgb.b);
515
+ }
516
+ function hsvToHex(hsv) {
517
+ const rgb = hsvToRgb(hsv.h, hsv.s, hsv.v);
518
+ return rgbToHex(rgb.r, rgb.g, rgb.b);
519
+ }
520
+ function usePointerDrag(onMove) {
521
+ const onMoveRef = React7.useRef(onMove);
522
+ onMoveRef.current = onMove;
523
+ return React7.useCallback((event) => {
524
+ event.preventDefault();
525
+ const target = event.currentTarget;
526
+ target.setPointerCapture(event.pointerId);
527
+ onMoveRef.current(event.clientX, event.clientY);
528
+ const onPointerMove = (moveEvent) => {
529
+ onMoveRef.current(moveEvent.clientX, moveEvent.clientY);
530
+ };
531
+ const onPointerUp = (upEvent) => {
532
+ target.releasePointerCapture(upEvent.pointerId);
533
+ target.removeEventListener("pointermove", onPointerMove);
534
+ target.removeEventListener("pointerup", onPointerUp);
535
+ target.removeEventListener("pointercancel", onPointerUp);
536
+ };
537
+ target.addEventListener("pointermove", onPointerMove);
538
+ target.addEventListener("pointerup", onPointerUp);
539
+ target.addEventListener("pointercancel", onPointerUp);
540
+ }, []);
541
+ }
542
+ function SaturationValuePlane({
543
+ hsv,
544
+ onChange
545
+ }) {
546
+ const planeRef = React7.useRef(null);
547
+ const hueColor = hsvToHex({ h: hsv.h, s: 1, v: 1 });
548
+ const onPointerDown = usePointerDrag((clientX, clientY) => {
549
+ const el = planeRef.current;
550
+ if (!el) return;
551
+ const rect = el.getBoundingClientRect();
552
+ const s = clamp((clientX - rect.left) / rect.width, 0, 1);
553
+ const v = clamp(1 - (clientY - rect.top) / rect.height, 0, 1);
554
+ onChange({ ...hsv, s, v });
555
+ });
556
+ return /* @__PURE__ */ jsx(
557
+ "div",
558
+ {
559
+ ref: planeRef,
560
+ role: "slider",
561
+ "aria-label": "Saturation and brightness",
562
+ "aria-valuetext": `Saturation ${Math.round(hsv.s * 100)}%, brightness ${Math.round(hsv.v * 100)}%`,
563
+ tabIndex: 0,
564
+ onPointerDown,
565
+ onKeyDown: (event) => {
566
+ const step = event.shiftKey ? 0.1 : 0.02;
567
+ if (event.key === "ArrowLeft") {
568
+ event.preventDefault();
569
+ onChange({ ...hsv, s: clamp(hsv.s - step, 0, 1) });
570
+ } else if (event.key === "ArrowRight") {
571
+ event.preventDefault();
572
+ onChange({ ...hsv, s: clamp(hsv.s + step, 0, 1) });
573
+ } else if (event.key === "ArrowUp") {
574
+ event.preventDefault();
575
+ onChange({ ...hsv, v: clamp(hsv.v + step, 0, 1) });
576
+ } else if (event.key === "ArrowDown") {
577
+ event.preventDefault();
578
+ onChange({ ...hsv, v: clamp(hsv.v - step, 0, 1) });
579
+ }
580
+ },
581
+ className: "relative h-40 w-full cursor-crosshair touch-none overflow-hidden rounded-xl ring-1 ring-black/10 select-none",
582
+ style: {
583
+ background: `
584
+ linear-gradient(to top, #000, transparent),
585
+ linear-gradient(to right, #fff, ${hueColor})
586
+ `
587
+ },
588
+ children: /* @__PURE__ */ jsx(
589
+ "span",
590
+ {
591
+ "aria-hidden": true,
592
+ className: "pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_1px_4px_rgba(0,0,0,0.45)]",
593
+ style: {
594
+ left: `${hsv.s * 100}%`,
595
+ top: `${(1 - hsv.v) * 100}%`,
596
+ backgroundColor: hsvToHex(hsv)
597
+ }
598
+ }
599
+ )
600
+ }
601
+ );
602
+ }
603
+ function HueSlider({ hsv, onChange }) {
604
+ const trackRef = React7.useRef(null);
605
+ const onPointerDown = usePointerDrag((clientX) => {
606
+ const el = trackRef.current;
607
+ if (!el) return;
608
+ const rect = el.getBoundingClientRect();
609
+ const h = clamp((clientX - rect.left) / rect.width * 360, 0, 359.999);
610
+ onChange({ ...hsv, h });
611
+ });
612
+ return /* @__PURE__ */ jsx(
613
+ "div",
614
+ {
615
+ ref: trackRef,
616
+ role: "slider",
617
+ "aria-label": "Hue",
618
+ "aria-valuemin": 0,
619
+ "aria-valuemax": 360,
620
+ "aria-valuenow": Math.round(hsv.h),
621
+ tabIndex: 0,
622
+ onPointerDown,
623
+ onKeyDown: (event) => {
624
+ const step = event.shiftKey ? 12 : 2;
625
+ if (event.key === "ArrowLeft" || event.key === "ArrowDown") {
626
+ event.preventDefault();
627
+ onChange({ ...hsv, h: (hsv.h - step + 360) % 360 });
628
+ } else if (event.key === "ArrowRight" || event.key === "ArrowUp") {
629
+ event.preventDefault();
630
+ onChange({ ...hsv, h: (hsv.h + step) % 360 });
631
+ }
632
+ },
633
+ className: "relative h-3.5 w-full cursor-pointer touch-none rounded-full ring-1 ring-black/10 select-none",
634
+ style: {
635
+ background: "linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"
636
+ },
637
+ children: /* @__PURE__ */ jsx(
638
+ "span",
639
+ {
640
+ "aria-hidden": true,
641
+ className: "pointer-events-none absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_1px_4px_rgba(0,0,0,0.35)]",
642
+ style: {
643
+ left: `${hsv.h / 360 * 100}%`,
644
+ backgroundColor: hsvToHex({ h: hsv.h, s: 1, v: 1 })
645
+ }
646
+ }
647
+ )
648
+ }
649
+ );
650
+ }
651
+ function ColorPicker({
652
+ value,
653
+ onChange,
654
+ presets = [],
655
+ disabled,
656
+ className,
657
+ "aria-label": ariaLabel = "Color"
658
+ }) {
659
+ const resolved = normalizeHex(value) ?? "#4285F4";
660
+ const [open, setOpen] = React7.useState(false);
661
+ const [hsv, setHsv] = React7.useState(() => hexToHsv(resolved));
662
+ const [hexDraft, setHexDraft] = React7.useState(resolved);
663
+ React7.useEffect(() => {
664
+ setHsv(hexToHsv(resolved));
665
+ setHexDraft(resolved);
666
+ }, [resolved]);
667
+ const commitHsv = (next) => {
668
+ setHsv(next);
669
+ const hex = hsvToHex(next);
670
+ setHexDraft(hex);
671
+ onChange(hex);
672
+ };
673
+ const commitHexDraft = () => {
674
+ const next = normalizeHex(hexDraft);
675
+ if (!next) {
676
+ setHexDraft(resolved);
677
+ return;
678
+ }
679
+ setHexDraft(next);
680
+ setHsv(hexToHsv(next));
681
+ onChange(next);
682
+ };
683
+ const supportsEyeDropper = typeof window !== "undefined" && "EyeDropper" in window && !disabled;
684
+ const pickFromScreen = async () => {
685
+ try {
686
+ const EyeDropperCtor = window.EyeDropper;
687
+ if (!EyeDropperCtor) return;
688
+ const result = await new EyeDropperCtor().open();
689
+ const hex = normalizeHex(result.sRGBHex);
690
+ if (!hex) return;
691
+ setHexDraft(hex);
692
+ setHsv(hexToHsv(hex));
693
+ onChange(hex);
694
+ } catch {
695
+ }
696
+ };
697
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-center gap-2", className), children: [
698
+ presets.map((preset) => {
699
+ const hex = normalizeHex(preset) ?? preset;
700
+ const selected = resolved === hex;
701
+ return /* @__PURE__ */ jsx(
702
+ Button,
703
+ {
704
+ type: "button",
705
+ variant: "ghost",
706
+ size: "icon",
707
+ disabled,
708
+ "aria-label": `Use color ${hex}`,
709
+ "aria-pressed": selected,
710
+ onClick: () => onChange(hex),
711
+ className: cn(
712
+ "size-8 rounded-full border p-0 shadow-sm transition-transform",
713
+ selected ? "scale-105 border-foreground ring-2 ring-foreground/15" : "border-black/10 hover:scale-105 hover:border-foreground/30"
714
+ ),
715
+ style: { backgroundColor: hex }
716
+ },
717
+ hex
718
+ );
719
+ }),
720
+ /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
721
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
722
+ Button,
723
+ {
724
+ type: "button",
725
+ variant: "outline",
726
+ disabled,
727
+ "aria-label": ariaLabel,
728
+ className: "h-9 gap-2.5 rounded-xl border-border bg-card px-2.5 shadow-sm hover:bg-accent/60",
729
+ children: [
730
+ /* @__PURE__ */ jsx(
731
+ "span",
732
+ {
733
+ className: "size-5 shrink-0 rounded-full shadow-inner ring-1 ring-black/15",
734
+ style: { backgroundColor: resolved },
735
+ "aria-hidden": true
736
+ }
737
+ ),
738
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-xs tabular-nums tracking-wide text-foreground uppercase", children: resolved })
739
+ ]
740
+ }
741
+ ) }),
742
+ /* @__PURE__ */ jsx(
743
+ PopoverContent,
744
+ {
745
+ align: "start",
746
+ sideOffset: 8,
747
+ className: "w-[272px] rounded-2xl border-border bg-card p-3 shadow-xl",
748
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
749
+ /* @__PURE__ */ jsx(SaturationValuePlane, { hsv, onChange: commitHsv }),
750
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
751
+ supportsEyeDropper ? /* @__PURE__ */ jsx(
752
+ Button,
753
+ {
754
+ type: "button",
755
+ variant: "outline",
756
+ size: "icon",
757
+ onClick: pickFromScreen,
758
+ "aria-label": "Pick color from screen",
759
+ className: "size-9 shrink-0 rounded-xl",
760
+ children: /* @__PURE__ */ jsx(Pipette, { size: 15 })
761
+ }
762
+ ) : null,
763
+ /* @__PURE__ */ jsx(
764
+ "span",
765
+ {
766
+ className: "size-9 shrink-0 rounded-full shadow-inner ring-1 ring-black/15",
767
+ style: { backgroundColor: resolved },
768
+ "aria-hidden": true
769
+ }
770
+ ),
771
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 py-1", children: /* @__PURE__ */ jsx(HueSlider, { hsv, onChange: commitHsv }) })
772
+ ] }),
773
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
774
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold tracking-wider text-muted-foreground uppercase", children: "Hex" }),
775
+ /* @__PURE__ */ jsx(
776
+ Input,
777
+ {
778
+ value: hexDraft,
779
+ onChange: (event) => setHexDraft(event.target.value.toUpperCase()),
780
+ onBlur: commitHexDraft,
781
+ onKeyDown: (event) => {
782
+ if (event.key === "Enter") {
783
+ event.preventDefault();
784
+ commitHexDraft();
785
+ }
786
+ },
787
+ spellCheck: false,
788
+ "aria-label": "Hex color",
789
+ className: "h-8 font-mono text-xs uppercase tracking-wide"
790
+ }
791
+ )
792
+ ] })
793
+ ] })
794
+ }
795
+ )
796
+ ] })
797
+ ] });
798
+ }
799
+ function ContentFade({ children, className }) {
800
+ return /* @__PURE__ */ jsx(
801
+ "div",
802
+ {
803
+ "data-slot": "content-fade",
804
+ className: cn("animate-in fade-in duration-300 ease-out motion-reduce:animate-none", className),
805
+ children
806
+ }
807
+ );
808
+ }
809
+ function DashFade({
810
+ children,
811
+ delayMs = 0,
812
+ className
813
+ }) {
814
+ return /* @__PURE__ */ jsx(
815
+ "div",
816
+ {
817
+ "data-slot": "dash-fade",
818
+ className: cn(
819
+ "animate-in fade-in slide-in-from-bottom-2 duration-500 ease-out fill-mode-both motion-reduce:animate-none",
820
+ className
821
+ ),
822
+ style: {
823
+ animationDelay: delayMs ? `${delayMs}ms` : void 0,
824
+ animationFillMode: "both"
825
+ },
826
+ children
827
+ }
828
+ );
829
+ }
830
+ function parseLocalDate(iso) {
831
+ if (!iso || !/^\d{4}-\d{2}-\d{2}$/.test(iso)) return void 0;
832
+ const [y, m, d] = iso.split("-").map(Number);
833
+ const dt = new Date(y, m - 1, d);
834
+ if (Number.isNaN(dt.getTime())) return void 0;
835
+ return dt;
836
+ }
837
+ function DateField({
838
+ value,
839
+ onChange,
840
+ min,
841
+ max,
842
+ disabled,
843
+ id,
844
+ placeholder = "Select date",
845
+ triggerClassName,
846
+ align = "start"
847
+ }) {
848
+ const [open, setOpen] = React7.useState(false);
849
+ const selected = parseLocalDate(value);
850
+ const minD = min ? parseLocalDate(min) : void 0;
851
+ const maxD = max ? parseLocalDate(max) : void 0;
852
+ const defaultMonth = selected ?? minD ?? /* @__PURE__ */ new Date();
853
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
854
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
855
+ "button",
856
+ {
857
+ type: "button",
858
+ id,
859
+ disabled,
860
+ className: cn(
861
+ "flex w-full min-w-0 items-center gap-2 rounded-md border border-border bg-card px-3 h-9 text-left text-sm text-muted-foreground outline-none transition-colors hover:bg-muted/80 focus-visible:border-blue-400 focus-visible:ring-[3px] focus-visible:ring-blue-500/25 disabled:cursor-not-allowed disabled:opacity-50",
862
+ triggerClassName
863
+ ),
864
+ children: [
865
+ /* @__PURE__ */ jsx(Calendar, { size: 13, className: "shrink-0 text-muted-foreground", "aria-hidden": true }),
866
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: selected ? formatDate(selected) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: placeholder }) })
867
+ ]
868
+ }
869
+ ) }),
870
+ /* @__PURE__ */ jsx(PopoverContent, { className: "z-[100] w-auto p-0", align, children: /* @__PURE__ */ jsx(
871
+ Calendar$1,
872
+ {
873
+ mode: "single",
874
+ selected,
875
+ defaultMonth,
876
+ fromDate: minD,
877
+ toDate: maxD,
878
+ initialFocus: true,
879
+ onSelect: (date) => {
880
+ if (date) {
881
+ onChange(toDateStr(date));
882
+ setOpen(false);
883
+ }
884
+ }
885
+ }
886
+ ) })
887
+ ] });
888
+ }
889
+ function FeedSkeleton({
890
+ rows = 3,
891
+ variant = "list"
892
+ }) {
893
+ if (variant === "cards") {
894
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2.5", role: "status", "aria-busy": "true", "aria-label": "Loading", children: [
895
+ Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs("div", { className: "space-y-2 rounded-lg border border-border bg-muted/40 p-3", children: [
896
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
897
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-28" }),
898
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12" })
899
+ ] }),
900
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-36" })
901
+ ] }, i)),
902
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading" })
903
+ ] });
904
+ }
905
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-1", role: "status", "aria-busy": "true", "aria-label": "Loading", children: [
906
+ Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-lg px-3 py-2.5", children: [
907
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-2 w-2 shrink-0 rounded-full" }),
908
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" }),
909
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12 shrink-0" })
910
+ ] }, i)),
911
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading" })
912
+ ] });
913
+ }
914
+ var fieldLabelClass = "text-[10px] uppercase tracking-widest text-muted-foreground";
915
+ function FieldLabel({
916
+ as,
917
+ emphasis = false,
918
+ className,
919
+ ...props
920
+ }) {
921
+ const Component = as ?? "span";
922
+ return /* @__PURE__ */ jsx(
923
+ Component,
924
+ {
925
+ className: cn(fieldLabelClass, emphasis && "font-medium", className),
926
+ ...props
927
+ }
928
+ );
929
+ }
930
+ function ScrollArea({
931
+ className,
932
+ children,
933
+ ...props
934
+ }) {
935
+ return /* @__PURE__ */ jsxs(
936
+ ScrollAreaPrimitive.Root,
937
+ {
938
+ "data-slot": "scroll-area",
939
+ className: cn("relative", className),
940
+ ...props,
941
+ children: [
942
+ /* @__PURE__ */ jsx(
943
+ ScrollAreaPrimitive.Viewport,
944
+ {
945
+ "data-slot": "scroll-area-viewport",
946
+ className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
947
+ children
948
+ }
949
+ ),
950
+ /* @__PURE__ */ jsx(ScrollBar, {}),
951
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
952
+ ]
953
+ }
954
+ );
955
+ }
956
+ function ScrollBar({
957
+ className,
958
+ orientation = "vertical",
959
+ ...props
960
+ }) {
961
+ return /* @__PURE__ */ jsx(
962
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
963
+ {
964
+ "data-slot": "scroll-area-scrollbar",
965
+ orientation,
966
+ className: cn(
967
+ "flex touch-none p-px transition-colors select-none",
968
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
969
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
970
+ className
971
+ ),
972
+ ...props,
973
+ children: /* @__PURE__ */ jsx(
974
+ ScrollAreaPrimitive.ScrollAreaThumb,
975
+ {
976
+ "data-slot": "scroll-area-thumb",
977
+ className: "bg-border relative flex-1 rounded-full"
978
+ }
979
+ )
980
+ }
981
+ );
982
+ }
983
+ var filterPopoverBodyStyles = cn(
984
+ "space-y-4 px-4 py-3",
985
+ "[&_label]:text-xs [&_label]:font-medium [&_label]:!text-white/70",
986
+ "[&_.text-muted-foreground]:!text-white/70",
987
+ "[&_.text-muted-foreground]:!text-white/80",
988
+ "[&_[data-slot=select-trigger]]:!border-white/15 [&_[data-slot=select-trigger]]:!bg-card/10",
989
+ "[&_[data-slot=select-trigger]]:!text-white [&_[data-slot=select-trigger]]:hover:!border-white/25",
990
+ "[&_[data-slot=select-trigger]]:hover:!bg-card/15",
991
+ "[&_[data-slot=select-value]]:!text-white",
992
+ "[&_[data-slot=select-trigger]]:data-[placeholder]:!text-white/50",
993
+ "[&_[data-slot=select-trigger]::placeholder]:!text-white/50",
994
+ "[&_[data-slot=select-trigger]_svg]:!text-white/50",
995
+ "[&_[data-slot=input]]:!border-white/15 [&_[data-slot=input]]:!bg-card/10",
996
+ "[&_[data-slot=input]]:!text-white [&_[data-slot=input]]:placeholder:!text-white/50",
997
+ "[&_[data-slot=input]]:hover:!border-white/25 [&_[data-slot=input]]:hover:!bg-card/15",
998
+ "[&_button.flex.w-full]:!border-white/15 [&_button.flex.w-full]:!bg-card/10",
999
+ "[&_button.flex.w-full]:!text-white [&_button.flex.w-full]:hover:!bg-card/15",
1000
+ "[&_button.flex.w-full_.text-muted-foreground]:!text-white/50",
1001
+ "[&_button.flex.w-full_span]:!text-white",
1002
+ "[&_[data-slot=segmented-tab-list]]:!bg-card/10 [&_[data-slot=segmented-tab-list]]:!text-white/70",
1003
+ "[&_[data-slot=segmented-tab-list]]:!ring-white/15",
1004
+ "[&_[data-slot=segmented-tab-list]_button]:!text-white/60",
1005
+ "[&_[data-slot=segmented-tab-list]_button:hover]:!bg-card/10 [&_[data-slot=segmented-tab-list]_button:hover]:!text-white",
1006
+ "[&_[data-slot=segmented-tab-list]_button[aria-selected=true]]:!text-white",
1007
+ "[&_[data-slot=segmented-tab-list]>div[aria-hidden]]:!bg-white/15",
1008
+ "[&_[data-slot=segmented-tab-list]>div[aria-hidden]]:!shadow-none",
1009
+ "[&_[data-slot=segmented-tab-list]>div[aria-hidden]]:!ring-white/20",
1010
+ "[&_.rounded-lg.border]:!border-white/10 [&_.rounded-lg.border]:!bg-card/5",
1011
+ "[&_[data-slot=switch]]:data-[state=unchecked]:!bg-card/20"
1012
+ );
1013
+ function FilterPopover({
1014
+ open,
1015
+ onOpenChange,
1016
+ activeCount,
1017
+ onApply,
1018
+ onCancel,
1019
+ onClearAll,
1020
+ children,
1021
+ title = "Filters",
1022
+ triggerLabel = "More filters",
1023
+ applyDisabled = false,
1024
+ clearDisabled = false,
1025
+ align = "start",
1026
+ contentClassName,
1027
+ contentId = "filter-popover-content",
1028
+ "aria-label": ariaLabel = "Open filters"
1029
+ }) {
1030
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange, children: [
1031
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1032
+ Button,
1033
+ {
1034
+ type: "button",
1035
+ variant: "outline",
1036
+ className: "h-11 min-h-11 gap-2 rounded-xl border-border bg-card px-3.5 text-sm font-medium text-muted-foreground shadow-none hover:bg-accent",
1037
+ "aria-expanded": open,
1038
+ "aria-controls": contentId,
1039
+ "aria-label": ariaLabel,
1040
+ children: [
1041
+ /* @__PURE__ */ jsx(ListFilter, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
1042
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: triggerLabel }),
1043
+ activeCount > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "default", className: "h-5 min-w-5 rounded-md px-1.5 tabular-nums", children: activeCount }) : null
1044
+ ]
1045
+ }
1046
+ ) }),
1047
+ /* @__PURE__ */ jsxs(
1048
+ PopoverContent,
1049
+ {
1050
+ id: contentId,
1051
+ align,
1052
+ className: cn(
1053
+ "flex w-[min(100vw-2rem,28rem)] flex-col gap-0 overflow-hidden p-0 shadow-lg",
1054
+ contentClassName
1055
+ ),
1056
+ children: [
1057
+ /* @__PURE__ */ jsx("div", { className: "border-b border-white/10 px-4 py-3", children: /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-popover-foreground", children: title }) }),
1058
+ /* @__PURE__ */ jsx(ScrollArea, { className: "max-h-[min(70vh,24rem)]", children: /* @__PURE__ */ jsx("div", { "data-slot": "filter-popover-body", className: filterPopoverBodyStyles, children }) }),
1059
+ /* @__PURE__ */ jsx(Separator, { className: "bg-card/10" }),
1060
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 px-4 py-3", children: [
1061
+ /* @__PURE__ */ jsx(
1062
+ Button,
1063
+ {
1064
+ type: "button",
1065
+ variant: "ghost",
1066
+ size: "sm",
1067
+ className: "h-auto px-0 text-sm font-medium text-white/70 hover:bg-transparent hover:text-white",
1068
+ onClick: onClearAll,
1069
+ disabled: clearDisabled,
1070
+ children: "Clear all"
1071
+ }
1072
+ ),
1073
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1074
+ /* @__PURE__ */ jsx(
1075
+ Button,
1076
+ {
1077
+ type: "button",
1078
+ variant: "ghost",
1079
+ size: "sm",
1080
+ className: "text-white/70 hover:bg-card/10 hover:text-white",
1081
+ onClick: onCancel,
1082
+ children: "Cancel"
1083
+ }
1084
+ ),
1085
+ /* @__PURE__ */ jsx(
1086
+ Button,
1087
+ {
1088
+ type: "button",
1089
+ size: "sm",
1090
+ className: "border border-white/30 bg-card/15 font-semibold text-white hover:bg-card/25",
1091
+ onClick: onApply,
1092
+ disabled: applyDisabled,
1093
+ children: "Apply"
1094
+ }
1095
+ )
1096
+ ] })
1097
+ ] })
1098
+ ]
1099
+ }
1100
+ )
1101
+ ] });
1102
+ }
1103
+ function InputGroup({
1104
+ leading,
1105
+ children,
1106
+ className,
1107
+ size = "default"
1108
+ }) {
1109
+ return /* @__PURE__ */ jsxs(
1110
+ "div",
1111
+ {
1112
+ className: cn(
1113
+ "flex items-center gap-2 rounded-md border border-border bg-card px-3 focus-within:border-blue-400 focus-within:ring-[3px] focus-within:ring-blue-500/25 transition-colors",
1114
+ size === "lg" ? "h-10" : "h-9",
1115
+ className
1116
+ ),
1117
+ children: [
1118
+ leading ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground shrink-0", children: leading }) : null,
1119
+ children
1120
+ ]
1121
+ }
1122
+ );
1123
+ }
1124
+ var InputGroupInput = React7.forwardRef(function InputGroupInput2({ className, ...props }, ref) {
1125
+ return /* @__PURE__ */ jsx(
1126
+ Input,
1127
+ {
1128
+ ref,
1129
+ className: cn(
1130
+ "flex-1 border-0 bg-transparent shadow-none focus-visible:ring-0 px-0 h-auto min-w-0",
1131
+ className
1132
+ ),
1133
+ ...props
1134
+ }
1135
+ );
1136
+ });
1137
+ function IconInput({
1138
+ icon: Icon,
1139
+ value,
1140
+ onChange,
1141
+ placeholder,
1142
+ type = "text",
1143
+ min,
1144
+ max,
1145
+ step,
1146
+ id,
1147
+ disabled,
1148
+ autoFocus,
1149
+ className,
1150
+ iconSize = 13
1151
+ }) {
1152
+ return /* @__PURE__ */ jsxs(InputGroup, { className, children: [
1153
+ /* @__PURE__ */ jsx(Icon, { size: iconSize, className: "text-muted-foreground shrink-0" }),
1154
+ /* @__PURE__ */ jsx(
1155
+ InputGroupInput,
1156
+ {
1157
+ id,
1158
+ type,
1159
+ min,
1160
+ max,
1161
+ step,
1162
+ value,
1163
+ placeholder,
1164
+ disabled,
1165
+ autoFocus,
1166
+ onChange: (e) => onChange(e.target.value)
1167
+ }
1168
+ )
1169
+ ] });
1170
+ }
1171
+ function NumberInput({
1172
+ value,
1173
+ onChange,
1174
+ placeholder,
1175
+ min,
1176
+ max,
1177
+ step = 1,
1178
+ className,
1179
+ id,
1180
+ disabled
1181
+ }) {
1182
+ return /* @__PURE__ */ jsx(
1183
+ Input,
1184
+ {
1185
+ id,
1186
+ type: "number",
1187
+ value: Number.isFinite(value) ? value : 0,
1188
+ min,
1189
+ max,
1190
+ step,
1191
+ placeholder,
1192
+ disabled,
1193
+ onChange: (e) => onChange(parseFloat(e.target.value) || 0),
1194
+ className: cn("tabular-nums", className)
1195
+ }
1196
+ );
1197
+ }
1198
+
1199
+ // src/ui/phone-countries.ts
1200
+ var PHONE_COUNTRIES = [
1201
+ { iso: "US", name: "United States", dialCode: "+1", flagCode: "USA" },
1202
+ { iso: "GB", name: "United Kingdom", dialCode: "+44", flagCode: "GB" },
1203
+ { iso: "CA", name: "Canada", dialCode: "+1", flagCode: "CA" },
1204
+ { iso: "AU", name: "Australia", dialCode: "+61", flagCode: "AU" },
1205
+ { iso: "DE", name: "Germany", dialCode: "+49", flagCode: "DE" },
1206
+ { iso: "FR", name: "France", dialCode: "+33", flagCode: "FR" },
1207
+ { iso: "IN", name: "India", dialCode: "+91", flagCode: "IN" },
1208
+ { iso: "NP", name: "Nepal", dialCode: "+977", flagCode: "NP" },
1209
+ { iso: "PK", name: "Pakistan", dialCode: "+92", flagCode: "PK" },
1210
+ { iso: "AE", name: "United Arab Emirates", dialCode: "+971", flagCode: "AE" },
1211
+ { iso: "SA", name: "Saudi Arabia", dialCode: "+966", flagCode: "SA" },
1212
+ { iso: "SG", name: "Singapore", dialCode: "+65", flagCode: "SG" },
1213
+ { iso: "JP", name: "Japan", dialCode: "+81", flagCode: "JP" },
1214
+ { iso: "CN", name: "China", dialCode: "+86", flagCode: "CN" },
1215
+ { iso: "BR", name: "Brazil", dialCode: "+55", flagCode: "BR" },
1216
+ { iso: "MX", name: "Mexico", dialCode: "+52", flagCode: "MX" },
1217
+ { iso: "NL", name: "Netherlands", dialCode: "+31", flagCode: "NL" },
1218
+ { iso: "ES", name: "Spain", dialCode: "+34", flagCode: "ES" },
1219
+ { iso: "IT", name: "Italy", dialCode: "+39", flagCode: "IT" },
1220
+ { iso: "ZA", name: "South Africa", dialCode: "+27", flagCode: "ZA" },
1221
+ { iso: "NG", name: "Nigeria", dialCode: "+234", flagCode: "NG" }
1222
+ ];
1223
+ var DEFAULT_PHONE_COUNTRY_ISO = "US";
1224
+ function phoneCountryByIso(iso) {
1225
+ return PHONE_COUNTRIES.find((c) => c.iso === iso);
1226
+ }
1227
+ function parsePhoneValue(value, defaultIso = DEFAULT_PHONE_COUNTRY_ISO) {
1228
+ const trimmed = value.trim();
1229
+ if (!trimmed) {
1230
+ return { iso: defaultIso, national: "" };
1231
+ }
1232
+ const sorted = [...PHONE_COUNTRIES].sort((a, b) => b.dialCode.length - a.dialCode.length);
1233
+ for (const country of sorted) {
1234
+ if (trimmed.startsWith(country.dialCode)) {
1235
+ return {
1236
+ iso: country.iso,
1237
+ national: trimmed.slice(country.dialCode.length).replace(/\D/g, "")
1238
+ };
1239
+ }
1240
+ }
1241
+ return {
1242
+ iso: defaultIso,
1243
+ national: trimmed.replace(/^\+/, "").replace(/\D/g, "")
1244
+ };
1245
+ }
1246
+ function formatPhoneValue(iso, national) {
1247
+ const country = phoneCountryByIso(iso);
1248
+ if (!country) return national;
1249
+ const digits = national.replace(/\D/g, "");
1250
+ return digits ? `${country.dialCode}${digits}` : country.dialCode;
1251
+ }
1252
+
1253
+ // assets/flags/AE.svg
1254
+ var AE_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_119949" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_119949)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M5.71436 4.7619H20.0001V0H5.71436V4.7619Z" fill="%2312833B"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M5.71436 14.2856H20.0001V9.52374H5.71436V14.2856Z" fill="%23262626"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2857H5.71429V0H0V14.2857Z" fill="%23FF323E"/>%0A</g>%0A</svg>%0A';
1255
+
1256
+ // assets/flags/AU.svg
1257
+ var AU_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3508_170803" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3508_170803)">%0A<rect width="20" height="14.2857" fill="%230A17A7"/>%0A<path d="M0 -0.333333H-0.901086L-0.21693 0.253086L3 3.01045V3.63798L-0.193746 5.91923L-0.333333 6.01894V6.19048V6.66667V7.26808L0.176666 6.94933L3.90512 4.61905H4.65508L7.86042 6.90858C7.94367 6.96804 8.04341 7 8.14571 7C8.60139 7 8.8111 6.43307 8.46513 6.13652L5.57143 3.65621V3.02868L8.62559 0.84714C8.80078 0.721999 8.90476 0.519952 8.90476 0.304651V0V-0.601416L8.39476 -0.282666L4.66631 2.04762H3.91635L0.669937 -0.271244L0.583012 -0.333333H0.47619H0Z" fill="%23FF2E3B" stroke="white" stroke-width="0.666667"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 2.38095V4.28571H3.33333V6.47619C3.33333 6.84438 3.63181 7.14286 4 7.14286H4.57143C4.93962 7.14286 5.23809 6.84438 5.23809 6.47619V4.28571H8.38095C8.74914 4.28571 9.04762 3.98724 9.04762 3.61905V3.04762C9.04762 2.67943 8.74914 2.38095 8.38095 2.38095H5.23809V0H3.33333V2.38095H0Z" fill="url(%23paint0_linear_3508_170803)"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 2.85714H3.80952V2.38095V0H4.7619V2.38095V2.85714H8.57143V3.80952H4.7619V4.28571V6.66667H3.80952V4.28571V3.80952H0V2.85714Z" fill="url(%23paint1_linear_3508_170803)"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.28575 11.6667L3.44606 12.1081L3.60642 11.1731L2.9271 10.5109L3.8659 10.3745L4.28575 9.5238L4.7056 10.3745L5.6444 10.5109L4.96508 11.1731L5.12544 12.1081L4.28575 11.6667Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M14.2856 12.381L13.6122 12.5782L13.8094 11.9048L13.6122 11.2313L14.2856 11.4286L14.9591 11.2313L14.7618 11.9048L14.9591 12.5782L14.2856 12.381Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M14.2856 3.33336L13.6122 3.5306L13.8094 2.85717L13.6122 2.18373L14.2856 2.38098L14.9591 2.18373L14.7618 2.85717L14.9591 3.5306L14.2856 3.33336Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M17.1428 6.19053L16.4694 6.38778L16.6666 5.71434L16.4694 5.04091L17.1428 5.23815L17.8162 5.04091L17.619 5.71434L17.8162 6.38778L17.1428 6.19053Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M11.4287 7.1428L10.7553 7.34005L10.9525 6.66661L10.7553 5.99318L11.4287 6.19042L12.1021 5.99318L11.9049 6.66661L12.1021 7.34005L11.4287 7.1428Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7142 8.33343L15.3775 8.43205L15.4761 8.09533L15.3775 7.75861L15.7142 7.85724L16.0509 7.75861L15.9523 8.09533L16.0509 8.43205L15.7142 8.33343Z" fill="white"/>%0A</g>%0A<defs>%0A<linearGradient id="paint0_linear_3508_170803" x1="0" y1="0" x2="0" y2="7.14286" gradientUnits="userSpaceOnUse">%0A<stop stop-color="white"/>%0A<stop offset="1" stop-color="%23F0F0F0"/>%0A</linearGradient>%0A<linearGradient id="paint1_linear_3508_170803" x1="0" y1="0" x2="0" y2="6.66667" gradientUnits="userSpaceOnUse">%0A<stop stop-color="%23FF2E3B"/>%0A<stop offset="1" stop-color="%23FC0D1B"/>%0A</linearGradient>%0A</defs>%0A</svg>%0A';
1258
+
1259
+ // assets/flags/BR.svg
1260
+ var BR_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120137" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120137)">%0A<rect width="20" height="14.2857" fill="%2305AB41"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M2.7698 7.70259C2.3638 7.43989 2.3638 6.84587 2.7698 6.58317L9.63786 2.13913C9.85824 1.99652 10.1418 1.99652 10.3622 2.13913L17.2302 6.58317C17.6362 6.84587 17.6362 7.43989 17.2302 7.70259L10.3622 12.1466C10.1418 12.2892 9.85824 12.2892 9.63786 12.1466L2.7698 7.70259Z" fill="%23FDD216"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99984 10.4761C11.8408 10.4761 13.3332 8.98373 13.3332 7.14278C13.3332 5.30183 11.8408 3.80945 9.99984 3.80945C8.15889 3.80945 6.6665 5.30183 6.6665 7.14278C6.6665 8.98373 8.15889 10.4761 9.99984 10.4761Z" fill="%23053087"/>%0A<mask id="mask1_3569_120137" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="6" y="3" width="8" height="8">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99984 10.4761C11.8408 10.4761 13.3332 8.98373 13.3332 7.14278C13.3332 5.30183 11.8408 3.80945 9.99984 3.80945C8.15889 3.80945 6.6665 5.30183 6.6665 7.14278C6.6665 8.98373 8.15889 10.4761 9.99984 10.4761Z" fill="white"/>%0A</mask>%0A<g mask="url(%23mask1_3569_120137)">%0A<path d="M6.2713 6.27147C6.79466 5.84766 8.48348 6.24914 10.06 6.66968C11.6364 7.09021 13.2806 7.97164 13.6993 8.48862" stroke="white" stroke-width="1.33333" stroke-linecap="square"/>%0A</g>%0A</g>%0A</svg>%0A';
1261
+
1262
+ // assets/flags/CA.svg
1263
+ var CA_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.964355" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3508_170838" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.964355" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3508_170838)">%0A<rect x="14.2856" y="0.714355" width="5.71428" height="14.2857" fill="%23FF3131"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 15.0001H5.71429V0.714355H0V15.0001Z" fill="%23FF3131"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M11.6835 7.1261C11.4645 7.34509 11.0945 7.14706 11.1552 6.84337L11.4287 5.47618L10.4763 5.95237L10.0001 4.5238L9.52389 5.95237L8.57151 5.47618L8.84495 6.84337C8.90568 7.14706 8.53566 7.34509 8.31666 7.1261C8.19442 7.00385 7.99622 7.00385 7.87398 7.1261L7.61913 7.38095L6.66675 6.90476L7.14294 7.85714L6.90245 8.09762C6.77228 8.2278 6.77228 8.43885 6.90245 8.56903L8.09532 9.7619H9.52389L9.76199 11.1905H10.2382L10.4763 9.7619H11.9048L13.0977 8.56903C13.2279 8.43885 13.2279 8.2278 13.0977 8.09762L12.8572 7.85714L13.3334 6.90476L12.381 7.38095L12.1262 7.1261C12.0039 7.00385 11.8057 7.00385 11.6835 7.1261Z" fill="%23FF3131"/>%0A</g>%0A</svg>%0A';
1264
+
1265
+ // assets/flags/CN.svg
1266
+ var CN_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120212" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120212)">%0A<rect width="20" height="14.2857" fill="%23F1361D"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M7.19482 2.21489L7.88657 2.33282L8.40538 2.80532L8.52332 2.11358L8.99581 1.59476L8.30407 1.47683L7.78525 1.00433L7.66732 1.69608L7.19482 2.21489ZM9.04768 4.63449L9.64712 4.26967L10.3487 4.28589L9.98384 3.68646L10.0001 2.98492L9.40063 3.34974L8.69909 3.33351L9.06391 3.93295L9.04768 4.63449ZM8.23455 8.55079L7.64821 8.9363L7.63994 8.23463L7.25442 7.64829L7.9561 7.64002L8.54244 7.2545L8.55071 7.95618L8.93623 8.54252L8.23455 8.55079ZM8.74371 6.7368L9.44117 6.6595L10.0701 6.97069L9.99281 6.27323L10.304 5.64428L9.60655 5.72158L8.97759 5.4104L9.0549 6.10785L8.74371 6.7368Z" fill="%23FFDC42"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76193 5.87621L3.08254 7.0734L3.70218 5.10626L2.04462 3.87902L4.10697 3.86045L4.76193 1.90479L5.41689 3.86045L7.47923 3.87902L5.82168 5.10626L6.44131 7.0734L4.76193 5.87621Z" fill="%23FFDC42"/>%0A</g>%0A</svg>%0A';
1267
+
1268
+ // assets/flags/DE.svg
1269
+ var DE_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120343" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120343)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.7619H20V0H0V4.7619Z" fill="%23262626"/>%0A<g filter="url(%23filter0_d_3569_120343)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 9.52387H20V4.76196H0V9.52387Z" fill="%23F01515"/>%0A</g>%0A<g filter="url(%23filter1_d_3569_120343)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2856H20V9.52374H0V14.2856Z" fill="%23FFD521"/>%0A</g>%0A</g>%0A<defs>%0A<filter id="filter0_d_3569_120343" x="0" y="4.76196" width="20" height="4.7619" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">%0A<feFlood flood-opacity="0" result="BackgroundImageFix"/>%0A<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>%0A<feOffset/>%0A<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>%0A<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_3569_120343"/>%0A<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_3569_120343" result="shape"/>%0A</filter>%0A<filter id="filter1_d_3569_120343" x="0" y="9.52374" width="20" height="4.7619" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">%0A<feFlood flood-opacity="0" result="BackgroundImageFix"/>%0A<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>%0A<feOffset/>%0A<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>%0A<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_3569_120343"/>%0A<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_3569_120343" result="shape"/>%0A</filter>%0A</defs>%0A</svg>%0A';
1270
+
1271
+ // assets/flags/ES.svg
1272
+ var ES_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120389" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120389)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 3.80952H20V0H0V3.80952Z" fill="%23DD172C"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2858H20V10.4763H0V14.2858Z" fill="%23DD172C"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 10.4761H20V3.80945H0V10.4761Z" fill="%23FFD133"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M5.23804 6.66667H6.19042V7.14286H5.23804V6.66667Z" fill="%23FFEDB1"/>%0A<path d="M4.43996 6.8849C4.42376 6.69056 4.57713 6.52389 4.77214 6.52389H5.70403C5.89904 6.52389 6.0524 6.69056 6.03621 6.8849L5.93737 8.07092C5.90707 8.43462 5.60304 8.71436 5.23808 8.71436C4.87313 8.71436 4.5691 8.43462 4.53879 8.07092L4.43996 6.8849Z" stroke="%23A41517" stroke-width="0.666667"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.28564 7.14288H6.19041V7.61907H5.71422L5.23803 8.57146L4.76184 7.61907H4.28564V7.14288Z" fill="%23A41517"/>%0A<rect x="2.85718" y="5.71429" width="0.952381" height="3.33333" rx="0.47619" fill="%23A41517"/>%0A<rect x="6.66675" y="5.71429" width="0.952382" height="3.33333" rx="0.476191" fill="%23A41517"/>%0A<path d="M4.28564 5.52387C4.28564 5.10308 4.62676 4.76196 5.04755 4.76196H5.4285C5.84929 4.76196 6.19041 5.10308 6.19041 5.52387C6.19041 5.62906 6.10513 5.71434 5.99993 5.71434H4.47612C4.37092 5.71434 4.28564 5.62906 4.28564 5.52387Z" fill="%23A41517"/>%0A</g>%0A</svg>%0A';
1273
+
1274
+ // assets/flags/FR.svg
1275
+ var FR_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_120433" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120433)">%0A<rect x="13.3333" width="6.66667" height="14.2857" fill="%23F44653"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2857H6.66667V0H0V14.2857Z" fill="%231035BB"/>%0A</g>%0A</svg>%0A';
1276
+
1277
+ // assets/flags/GB.svg
1278
+ var GB_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120460" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120460)">%0A<rect width="20" height="14.2857" fill="%230A17A7"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M-0.916072 -1.3689L7.61903 4.3881V-0.952357H12.3809V4.38812L20.916 -1.36888L21.9812 0.210239L15.233 4.76193H20V9.52383H15.2331L21.9812 14.0755L20.916 15.6546L12.3809 9.8976V15.2381H7.61903V9.89762L-0.916063 15.6546L-1.98119 14.0755L4.76692 9.52383H-2.30074e-05V4.76193H4.76698L-1.9812 0.210223L-0.916072 -1.3689Z" fill="white"/>%0A<path d="M13.3342 4.52298L22.3809 -1.42859" stroke="%23DB1F35" stroke-width="0.666667" stroke-linecap="round"/>%0A<path d="M14.2949 9.78387L22.4048 15.2502" stroke="%23DB1F35" stroke-width="0.666667" stroke-linecap="round"/>%0A<path d="M5.71833 4.50743L-2.74097 -1.1936" stroke="%23DB1F35" stroke-width="0.666667" stroke-linecap="round"/>%0A<path d="M6.63583 9.71777L-2.74097 15.936" stroke="%23DB1F35" stroke-width="0.666667" stroke-linecap="round"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 8.57143H8.57143V14.2857H11.4286V8.57143H20V5.71429H11.4286V0H8.57143V5.71429H0V8.57143Z" fill="%23E6273E"/>%0A</g>%0A</svg>%0A';
1279
+
1280
+ // assets/flags/IN.svg
1281
+ var IN_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_120679" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120679)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.7619H20V0H0V4.7619Z" fill="%23FFA44A"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2856H20V9.52374H0V14.2856Z" fill="%231A9F0B"/>%0A<path d="M10.0001 8.90477C10.9732 8.90477 11.762 8.11594 11.762 7.14287C11.762 6.16979 10.9732 5.38096 10.0001 5.38096C9.02703 5.38096 8.2382 6.16979 8.2382 7.14287C8.2382 8.11594 9.02703 8.90477 10.0001 8.90477Z" fill="%23181A93" fill-opacity="0.15" stroke="%23181A93" stroke-width="0.666667"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0001 7.61901C10.2631 7.61901 10.4763 7.40581 10.4763 7.14282C10.4763 6.87982 10.2631 6.66663 10.0001 6.66663C9.73712 6.66663 9.52393 6.87982 9.52393 7.14282C9.52393 7.40581 9.73712 7.61901 10.0001 7.61901Z" fill="%23181A93"/>%0A</g>%0A</svg>%0A';
1282
+
1283
+ // assets/flags/IT.svg
1284
+ var IT_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_120670" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120670)">%0A<rect x="13.3335" width="6.66667" height="14.2857" fill="%23E43D4C"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2857H6.66667V0H0V14.2857Z" fill="%231BB65D"/>%0A</g>%0A</svg>%0A';
1285
+
1286
+ // assets/flags/JP.svg
1287
+ var JP_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.535645" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3508_170816" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.535645" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3508_170816)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0001 11.7143C12.367 11.7143 14.2858 9.79547 14.2858 7.42854C14.2858 5.0616 12.367 3.14282 10.0001 3.14282C7.63314 3.14282 5.71436 5.0616 5.71436 7.42854C5.71436 9.79547 7.63314 11.7143 10.0001 11.7143Z" fill="url(%23paint0_linear_3508_170816)"/>%0A</g>%0A<defs>%0A<linearGradient id="paint0_linear_3508_170816" x1="5.71436" y1="3.14282" x2="5.71436" y2="11.7143" gradientUnits="userSpaceOnUse">%0A<stop stop-color="%23D81441"/>%0A<stop offset="1" stop-color="%23BB0831"/>%0A</linearGradient>%0A</defs>%0A</svg>%0A';
1288
+
1289
+ // assets/flags/MX.svg
1290
+ var MX_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.821289" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3508_170820" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.821289" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3508_170820)">%0A<rect x="13.3333" y="0.571289" width="6.66667" height="14.2857" fill="%23E3283E"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.857H6.66667V0.571289H0V14.857Z" fill="%23128A60"/>%0A<path d="M8.76188 7.23792C8.76188 6.86973 8.4634 6.57125 8.09521 6.57125C7.72703 6.57125 7.42855 6.86973 7.42855 7.23792H8.76188ZM8.71083 9.46322C9.02929 9.648 9.43726 9.53963 9.62204 9.22117C9.80683 8.90271 9.69846 8.49475 9.38 8.30996L8.71083 9.46322ZM10.6657 8.2821C10.3555 8.48048 10.2649 8.89274 10.4632 9.20292C10.6616 9.5131 11.0739 9.60373 11.3841 9.40535L10.6657 8.2821ZM12.5714 7.23792C12.5714 6.86973 12.2729 6.57125 11.9047 6.57125C11.5365 6.57125 11.2381 6.86973 11.2381 7.23792H12.5714ZM7.42855 7.23792C7.42855 8.18933 7.94559 9.0192 8.71083 9.46322L9.38 8.30996C9.00897 8.09468 8.76188 7.69476 8.76188 7.23792H7.42855ZM11.3841 9.40535C12.0966 8.9496 12.5714 8.14942 12.5714 7.23792H11.2381C11.2381 7.67574 11.0113 8.06104 10.6657 8.2821L11.3841 9.40535Z" fill="%238C9157"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99999 8.19039C10.526 8.19039 10.9524 7.5508 10.9524 6.76182C10.9524 5.97285 10.526 5.33325 9.99999 5.33325C9.474 5.33325 9.04761 5.97285 9.04761 6.76182C9.04761 7.5508 9.474 8.19039 9.99999 8.19039Z" fill="%23C59262"/>%0A</g>%0A</svg>%0A';
1291
+
1292
+ // assets/flags/NG.svg
1293
+ var NG_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_121134" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121134)">%0A<rect x="13.3333" width="6.66667" height="14.2857" fill="%23189B62"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2857H6.66667V0H0V14.2857Z" fill="%23189B62"/>%0A</g>%0A</svg>%0A';
1294
+
1295
+ // assets/flags/NL.svg
1296
+ var NL_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_121129" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121129)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.7619H20V0H0V4.7619Z" fill="%23CA2B39"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 14.2857H20V9.5238H0V14.2857Z" fill="%232C56A2"/>%0A</g>%0A</svg>%0A';
1297
+
1298
+ // assets/flags/NP.svg
1299
+ var NP_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.73015C0 0.774614 0.774613 -6.29663e-10 1.73015 2.96692e-10C1.844 4.07073e-10 1.95532 0.0337021 2.05005 0.0968592L9.66924 5.17632C10.7669 5.90808 10.2488 7.61905 8.92963 7.61905H5.71429L10.6627 11.9489C11.5893 12.7597 11.0159 14.2857 9.78473 14.2857H2C0.895429 14.2857 0 13.3903 0 12.2857V1.73015Z" fill="white"/>%0A<mask id="mask0_3569_121178" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="12" height="15">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.73015C0 0.774614 0.774613 -6.29663e-10 1.73015 2.96692e-10C1.844 4.07073e-10 1.95532 0.0337021 2.05005 0.0968592L9.66924 5.17632C10.7669 5.90808 10.2488 7.61905 8.92963 7.61905H5.71429L10.6627 11.9489C11.5893 12.7597 11.0159 14.2857 9.78473 14.2857H2C0.895429 14.2857 0 13.3903 0 12.2857V1.73015Z" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121178)">%0A<path d="M9.78473 13.619H0.666667V0.666667L1.70291 0.666667L9.29943 5.73102C9.84826 6.0969 9.58924 6.95238 8.92963 6.95238H5.71429C5.43655 6.95238 5.18791 7.12457 5.09022 7.38456C4.99253 7.64456 5.06626 7.93787 5.27528 8.12077L10.2237 12.4507C10.687 12.856 10.4003 13.619 9.78473 13.619Z" fill="%23EE1B44" stroke="%230543A8" stroke-width="1.33333" stroke-linejoin="round"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.89362 5.572C5.16798 5.49681 5.42092 5.39397 5.64463 5.26869C5.42272 6.07465 4.68451 6.66665 3.80803 6.66665C2.93156 6.66665 2.19335 6.07467 1.97144 5.26872C2.19578 5.39435 2.44952 5.49741 2.72477 5.57265L3.09527 5.23816L2.48973 4.69147L3.30448 4.73309L3.26287 3.91833L3.80956 4.52388L4.35625 3.91833L4.31463 4.73309L5.12938 4.69147L4.52384 5.23816L4.89362 5.572ZM3.08056 12.2359L3.80948 11.4286L4.5384 12.2359L4.48291 11.1496L5.56925 11.2051L4.76186 10.4762L5.56925 9.74725L4.48291 9.80274L4.5384 8.7164L3.80948 9.52379L3.08056 8.7164L3.13604 9.80274L2.04971 9.74725L2.8571 10.4762L2.04971 11.2051L3.13604 11.1496L3.08056 12.2359Z" fill="white"/>%0A</g>%0A</svg>%0A';
1300
+
1301
+ // assets/flags/PK.svg
1302
+ var PK_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_121272" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121272)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0001 0H5.71436V14.2857L20.0001 14.2857V0Z" fill="%230A632F"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9071 7.67884C16.8155 8.57216 16.4347 9.43052 15.7617 10.1035C14.1575 11.7077 11.5003 11.6514 9.8266 9.97772C8.15292 8.30405 8.0966 5.64681 9.70079 4.04262C10.3738 3.36961 11.2322 2.98886 12.1255 2.8972C11.8441 3.06302 11.5777 3.26764 11.3346 3.5108C9.87623 4.96916 9.8041 7.26148 11.1735 8.63085C12.5428 10.0002 14.8352 9.92809 16.2935 8.46973C16.5367 8.22657 16.7413 7.96023 16.9071 7.67884ZM15.0659 5.78893L14.8386 7.14496L14.2034 5.92554L12.8435 6.1284L13.8069 5.14744L13.1938 3.91678L14.4244 4.52994L15.4054 3.5665L15.2025 4.9264L16.422 5.56162L15.0659 5.78893Z" fill="white"/>%0A</g>%0A</svg>%0A';
1303
+
1304
+ // assets/flags/SA.svg
1305
+ var SA_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A<mask id="mask0_3569_120832" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_120832)">%0A<rect width="20" height="14.2857" fill="%23128C4B"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76196 8.57141H12.381V8.20763C12.381 7.71843 12.8958 7.40025 13.3334 7.61903V8.57141H14.6032C14.9539 8.57141 15.2382 8.85567 15.2382 9.20633C15.2382 9.90764 14.6696 10.4762 13.9683 10.4762H13.0477C12.6795 10.4762 12.381 10.1777 12.381 9.8095V9.52379H5.99049C5.81367 9.52379 5.64411 9.45355 5.51908 9.32853L4.76196 8.57141Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76196 5.85228C4.76196 5.76388 4.79708 5.67909 4.85959 5.61658L5.00245 5.47372C5.13263 5.34355 5.13263 5.13249 5.00245 5.00232L4.85959 4.85946C4.79708 4.79695 4.76196 4.71216 4.76196 4.62376V4.14278C4.76196 3.95869 4.9112 3.80945 5.0953 3.80945H5.53246C5.63291 3.80945 5.71434 3.89088 5.71434 3.99134C5.71434 4.18327 5.97308 4.24435 6.05892 4.07268L6.1299 3.93071C6.16706 3.85639 6.24302 3.80945 6.32611 3.80945H7.38101C7.51251 3.80945 7.61911 3.91605 7.61911 4.04754C7.61911 4.17904 7.51251 4.28564 7.38101 4.28564H6.90482C6.77332 4.28564 6.66672 4.39224 6.66672 4.52373C6.66672 4.65523 6.77332 4.76183 6.90482 4.76183H7.28577C7.46987 4.76183 7.61911 4.91107 7.61911 5.09516V6.33326C7.61911 6.51735 7.46987 6.66659 7.28577 6.66659H7.00006C6.81596 6.66659 6.66672 6.51735 6.66672 6.33326V5.95231C6.66672 5.82081 6.77332 5.71421 6.90482 5.71421C7.03632 5.71421 7.14291 5.60761 7.14291 5.47611C7.14291 5.34462 7.03632 5.23802 6.90482 5.23802H6.52387C6.33977 5.23802 6.19053 5.38726 6.19053 5.57135V6.4285C6.19053 6.55999 6.08394 6.66659 5.95244 6.66659C5.82094 6.66659 5.71434 6.55999 5.71434 6.4285V5.95231C5.71434 5.82081 5.60774 5.71421 5.47625 5.71421C5.34475 5.71421 5.23815 5.82081 5.23815 5.95231V6.4285C5.23815 6.55999 5.13155 6.66659 5.00006 6.66659C4.86856 6.66659 4.76196 6.55999 4.76196 6.4285V5.85228Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M12.3809 5.85228C12.3809 5.76388 12.416 5.67909 12.4785 5.61658L12.6213 5.47372C12.7515 5.34355 12.7515 5.13249 12.6213 5.00232L12.4785 4.85946C12.416 4.79695 12.3809 4.71216 12.3809 4.62376V4.14278C12.3809 3.95869 12.5301 3.80945 12.7142 3.80945H13.1514C13.2518 3.80945 13.3332 3.89088 13.3332 3.99134C13.3332 4.18327 13.592 4.24435 13.6778 4.07268L13.7488 3.93071C13.786 3.85639 13.8619 3.80945 13.945 3.80945H14.9999C15.1314 3.80945 15.238 3.91605 15.238 4.04754C15.238 4.17904 15.1314 4.28564 14.9999 4.28564H14.5237C14.3922 4.28564 14.2856 4.39224 14.2856 4.52373C14.2856 4.65523 14.3922 4.76183 14.5237 4.76183H14.9047C15.0888 4.76183 15.238 4.91107 15.238 5.09516V6.33326C15.238 6.51735 15.0888 6.66659 14.9047 6.66659H14.619C14.4349 6.66659 14.2856 6.51735 14.2856 6.33326V5.95231C14.2856 5.82081 14.3922 5.71421 14.5237 5.71421C14.6552 5.71421 14.7618 5.60761 14.7618 5.47611C14.7618 5.34462 14.6552 5.23802 14.5237 5.23802H14.1428C13.9587 5.23802 13.8094 5.38726 13.8094 5.57135V6.4285C13.8094 6.55999 13.7028 6.66659 13.5713 6.66659C13.4398 6.66659 13.3332 6.55999 13.3332 6.4285V5.95231C13.3332 5.82081 13.2266 5.71421 13.0951 5.71421C12.9636 5.71421 12.857 5.82081 12.857 5.95231V6.4285C12.857 6.55999 12.7505 6.66659 12.619 6.66659C12.4875 6.66659 12.3809 6.55999 12.3809 6.4285V5.85228Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M11.4287 4.5215C11.4287 4.65423 11.3543 4.83623 11.2568 4.93374L11.1244 5.0661C11.0295 5.16105 11.0269 5.31242 11.1244 5.40994L11.2568 5.54229C11.3517 5.63724 11.4287 5.81613 11.4287 5.95454V6.42627C11.4287 6.55899 11.3268 6.66659 11.1884 6.66659H10.7166C10.5839 6.66659 10.4763 6.56467 10.4763 6.42627V5.95454C10.4763 5.82181 10.4324 5.8021 10.3659 5.9351L10.1105 6.4457C10.0496 6.5677 9.88801 6.66659 9.76421 6.66659H8.80743C8.67715 6.66659 8.57153 6.55615 8.57153 6.4285C8.57153 6.297 8.67345 6.1904 8.81186 6.1904H9.28359C9.41632 6.1904 9.52391 6.07996 9.52391 5.95231C9.52391 5.82081 9.42199 5.71421 9.28359 5.71421H8.81186C8.67913 5.71421 8.57153 5.6118 8.57153 5.48065V4.04301C8.57153 3.91402 8.67345 3.80945 8.81186 3.80945H9.28359C9.41632 3.80945 9.52391 3.91137 9.52391 4.04977V4.5215C9.52391 4.65423 9.41347 4.76183 9.28582 4.76183C9.15432 4.76183 9.04772 4.87227 9.04772 4.99992C9.04772 5.13142 9.14965 5.23802 9.28805 5.23802H9.75978C9.89251 5.23802 10.0001 5.12592 10.0001 5.00212V4.04535C10.0001 3.91506 10.1105 3.80945 10.2382 3.80945C10.3697 3.80945 10.4763 3.91137 10.4763 4.04977V4.5215C10.4763 4.65423 10.5867 4.76183 10.7144 4.76183C10.8459 4.76183 10.9525 4.65991 10.9525 4.5215V4.04977C10.9525 3.91705 11.0629 3.80945 11.1906 3.80945C11.3221 3.80945 11.4287 3.91137 11.4287 4.04977V4.5215Z" fill="white"/>%0A</g>%0A</svg>%0A';
1306
+
1307
+ // assets/flags/SG.svg
1308
+ var SG_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="%23F5F5F5" stroke-width="0.5"/>%0A<mask id="mask0_3569_121405" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect x="0.25" y="0.25" width="19.5" height="13.7857" rx="1.75" fill="white" stroke="white" stroke-width="0.5"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121405)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 7.61905H20V0H0V7.61905Z" fill="%23E12237"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76193 6.66668C5.43696 6.66668 6.05731 6.43259 6.54624 6.04115C6.28726 6.13774 6.00695 6.19053 5.71431 6.19053C4.39935 6.19053 3.33336 5.12455 3.33336 3.80958C3.33336 2.49462 4.39935 1.42863 5.71431 1.42863C6.00703 1.42863 6.28742 1.48146 6.54645 1.57809C6.05749 1.18655 5.43706 0.952393 4.76193 0.952393C3.18397 0.952393 1.90479 2.23158 1.90479 3.80954C1.90479 5.38749 3.18397 6.66668 4.76193 6.66668ZM5.71431 3.33339C5.71431 3.59638 5.50111 3.80958 5.23812 3.80958C4.97513 3.80958 4.76193 3.59638 4.76193 3.33339C4.76193 3.0704 4.97513 2.8572 5.23812 2.8572C5.50111 2.8572 5.71431 3.0704 5.71431 3.33339ZM6.19052 5.71425C6.45352 5.71425 6.66671 5.50105 6.66671 5.23806C6.66671 4.97507 6.45352 4.76187 6.19052 4.76187C5.92753 4.76187 5.71433 4.97507 5.71433 5.23806C5.71433 5.50105 5.92753 5.71425 6.19052 5.71425ZM8.57145 5.23806C8.57145 5.50105 8.35825 5.71425 8.09526 5.71425C7.83227 5.71425 7.61907 5.50105 7.61907 5.23806C7.61907 4.97507 7.83227 4.76187 8.09526 4.76187C8.35825 4.76187 8.57145 4.97507 8.57145 5.23806ZM9.04767 3.80958C9.31066 3.80958 9.52386 3.59638 9.52386 3.33339C9.52386 3.0704 9.31066 2.8572 9.04767 2.8572C8.78467 2.8572 8.57147 3.0704 8.57147 3.33339C8.57147 3.59638 8.78467 3.80958 9.04767 3.80958ZM7.61905 1.90482C7.61905 2.16781 7.40585 2.38101 7.14286 2.38101C6.87986 2.38101 6.66667 2.16781 6.66667 1.90482C6.66667 1.64183 6.87986 1.42863 7.14286 1.42863C7.40585 1.42863 7.61905 1.64183 7.61905 1.90482Z" fill="white"/>%0A</g>%0A</svg>%0A';
1309
+
1310
+ // assets/flags/USA.svg
1311
+ var USA_default = 'data:image/svg+xml,<svg width="20" height="16" viewBox="0 0 20 16" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <rect y="0.856934" width="20" height="14.2857" rx="2" fill="white"/>%0A <mask id="mask0_3508_170844" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="16">%0A <rect y="0.856934" width="20" height="14.2857" rx="2" fill="white"/>%0A </mask>%0A <g mask="url(%23mask0_3508_170844)">%0A <path fill-rule="evenodd" clip-rule="evenodd" d="M20 0.856934H0V1.80931H20V0.856934ZM20 2.76174H0V3.71412H20V2.76174ZM0 4.66641H20V5.61879H0V4.66641ZM20 6.57122H0V7.5236H20V6.57122ZM0 8.47603H20V9.42841H0V8.47603ZM20 10.3807H0V11.3331H20V10.3807ZM0 12.2855H20V13.2379H0V12.2855ZM20 14.1903H0V15.1427H20V14.1903Z" fill="%23D02F44"/>%0A <rect y="0.856934" width="8.57143" height="6.66667" fill="%2346467F"/>%0A <g filter="url(%23filter0_d_3508_170844)">%0A <path fill-rule="evenodd" clip-rule="evenodd" d="M1.90477 2.28546C1.90477 2.54845 1.69158 2.76165 1.42858 2.76165C1.16559 2.76165 0.952393 2.54845 0.952393 2.28546C0.952393 2.02246 1.16559 1.80927 1.42858 1.80927C1.69158 1.80927 1.90477 2.02246 1.90477 2.28546ZM3.80955 2.28546C3.80955 2.54845 3.59635 2.76165 3.33336 2.76165C3.07036 2.76165 2.85717 2.54845 2.85717 2.28546C2.85717 2.02246 3.07036 1.80927 3.33336 1.80927C3.59635 1.80927 3.80955 2.02246 3.80955 2.28546ZM5.2381 2.76165C5.50109 2.76165 5.71429 2.54845 5.71429 2.28546C5.71429 2.02246 5.50109 1.80927 5.2381 1.80927C4.9751 1.80927 4.7619 2.02246 4.7619 2.28546C4.7619 2.54845 4.9751 2.76165 5.2381 2.76165ZM7.61906 2.28546C7.61906 2.54845 7.40586 2.76165 7.14287 2.76165C6.87988 2.76165 6.66668 2.54845 6.66668 2.28546C6.66668 2.02246 6.87988 1.80927 7.14287 1.80927C7.40586 1.80927 7.61906 2.02246 7.61906 2.28546ZM2.38095 3.71398C2.64394 3.71398 2.85714 3.50078 2.85714 3.23779C2.85714 2.9748 2.64394 2.7616 2.38095 2.7616C2.11796 2.7616 1.90476 2.9748 1.90476 3.23779C1.90476 3.50078 2.11796 3.71398 2.38095 3.71398ZM4.76192 3.23779C4.76192 3.50078 4.54872 3.71398 4.28573 3.71398C4.02273 3.71398 3.80954 3.50078 3.80954 3.23779C3.80954 2.9748 4.02273 2.7616 4.28573 2.7616C4.54872 2.7616 4.76192 2.9748 4.76192 3.23779ZM6.1905 3.71398C6.45349 3.71398 6.66669 3.50078 6.66669 3.23779C6.66669 2.9748 6.45349 2.7616 6.1905 2.7616C5.92751 2.7616 5.71431 2.9748 5.71431 3.23779C5.71431 3.50078 5.92751 3.71398 6.1905 3.71398ZM7.61906 4.19026C7.61906 4.45326 7.40586 4.66645 7.14287 4.66645C6.87988 4.66645 6.66668 4.45326 6.66668 4.19026C6.66668 3.92727 6.87988 3.71407 7.14287 3.71407C7.40586 3.71407 7.61906 3.92727 7.61906 4.19026ZM5.2381 4.66645C5.50109 4.66645 5.71429 4.45326 5.71429 4.19026C5.71429 3.92727 5.50109 3.71407 5.2381 3.71407C4.9751 3.71407 4.7619 3.92727 4.7619 4.19026C4.7619 4.45326 4.9751 4.66645 5.2381 4.66645ZM3.80955 4.19026C3.80955 4.45326 3.59635 4.66645 3.33336 4.66645C3.07036 4.66645 2.85717 4.45326 2.85717 4.19026C2.85717 3.92727 3.07036 3.71407 3.33336 3.71407C3.59635 3.71407 3.80955 3.92727 3.80955 4.19026ZM1.42858 4.66645C1.69158 4.66645 1.90477 4.45326 1.90477 4.19026C1.90477 3.92727 1.69158 3.71407 1.42858 3.71407C1.16559 3.71407 0.952393 3.92727 0.952393 4.19026C0.952393 4.45326 1.16559 4.66645 1.42858 4.66645ZM2.85714 5.1426C2.85714 5.40559 2.64394 5.61879 2.38095 5.61879C2.11796 5.61879 1.90476 5.40559 1.90476 5.1426C1.90476 4.87961 2.11796 4.66641 2.38095 4.66641C2.64394 4.66641 2.85714 4.87961 2.85714 5.1426ZM4.28573 5.61879C4.54872 5.61879 4.76192 5.40559 4.76192 5.1426C4.76192 4.87961 4.54872 4.66641 4.28573 4.66641C4.02273 4.66641 3.80954 4.87961 3.80954 5.1426C3.80954 5.40559 4.02273 5.61879 4.28573 5.61879ZM6.66669 5.1426C6.66669 5.40559 6.45349 5.61879 6.1905 5.61879C5.92751 5.61879 5.71431 5.40559 5.71431 5.1426C5.71431 4.87961 5.92751 4.66641 6.1905 4.66641C6.45349 4.66641 6.66669 4.87961 6.66669 5.1426ZM7.14287 6.57112C7.40586 6.57112 7.61906 6.35793 7.61906 6.09493C7.61906 5.83194 7.40586 5.61874 7.14287 5.61874C6.87988 5.61874 6.66668 5.83194 6.66668 6.09493C6.66668 6.35793 6.87988 6.57112 7.14287 6.57112ZM5.71429 6.09493C5.71429 6.35793 5.50109 6.57112 5.2381 6.57112C4.9751 6.57112 4.7619 6.35793 4.7619 6.09493C4.7619 5.83194 4.9751 5.61874 5.2381 5.61874C5.50109 5.61874 5.71429 5.83194 5.71429 6.09493ZM3.33336 6.57112C3.59635 6.57112 3.80955 6.35793 3.80955 6.09493C3.80955 5.83194 3.59635 5.61874 3.33336 5.61874C3.07036 5.61874 2.85717 5.83194 2.85717 6.09493C2.85717 6.35793 3.07036 6.57112 3.33336 6.57112ZM1.90477 6.09493C1.90477 6.35793 1.69158 6.57112 1.42858 6.57112C1.16559 6.57112 0.952393 6.35793 0.952393 6.09493C0.952393 5.83194 1.16559 5.61874 1.42858 5.61874C1.69158 5.61874 1.90477 5.83194 1.90477 6.09493Z" fill="url(%23paint0_linear_3508_170844)"/>%0A </g>%0A </g>%0A <defs>%0A <filter id="filter0_d_3508_170844" x="0.952393" y="1.80927" width="6.66675" height="5.76184" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">%0A <feFlood flood-opacity="0" result="BackgroundImageFix"/>%0A <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>%0A <feOffset dy="1"/>%0A <feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>%0A <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_3508_170844"/>%0A <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_3508_170844" result="shape"/>%0A </filter>%0A <linearGradient id="paint0_linear_3508_170844" x1="0.952393" y1="1.80927" x2="0.952393" y2="6.57117" gradientUnits="userSpaceOnUse">%0A <stop stop-color="white"/>%0A <stop offset="1" stop-color="%23F0F0F0"/>%0A </linearGradient>%0A </defs>%0A</svg>%0A';
1312
+
1313
+ // assets/flags/ZA.svg
1314
+ var ZA_default = 'data:image/svg+xml,<svg width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="20" height="14.2857" rx="2" fill="%2306A86E"/>%0A<mask id="mask0_3569_121718" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="15">%0A<rect width="20" height="14.2857" rx="2" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_3569_121718)">%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.90479L6.66667 7.14288L0 12.381V1.90479Z" fill="%23FFBF2E"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M-0.952393 2.14282L5.47618 7.14282L-0.952393 12.1428V2.14282Z" fill="%23262626"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M8.57145 5.71429L1.90479 0H20V5.71429H8.57145Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M8.8095 4.7619L3.09521 0H20V4.7619H8.8095Z" fill="%23F44E46"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M1.90479 14.2857H20V8.57141H8.57145L1.90479 14.2857Z" fill="white"/>%0A<path fill-rule="evenodd" clip-rule="evenodd" d="M3.09521 14.2858H20V9.52393H8.8095L3.09521 14.2858Z" fill="%23072CB4"/>%0A</g>%0A</svg>%0A';
1315
+
1316
+ // src/ui/phone-flag-urls.ts
1317
+ var FLAG_URL_BY_CODE = {
1318
+ AE: AE_default,
1319
+ AU: AU_default,
1320
+ BR: BR_default,
1321
+ CA: CA_default,
1322
+ CN: CN_default,
1323
+ DE: DE_default,
1324
+ ES: ES_default,
1325
+ FR: FR_default,
1326
+ GB: GB_default,
1327
+ IN: IN_default,
1328
+ IT: IT_default,
1329
+ JP: JP_default,
1330
+ MX: MX_default,
1331
+ NG: NG_default,
1332
+ NL: NL_default,
1333
+ NP: NP_default,
1334
+ PK: PK_default,
1335
+ SA: SA_default,
1336
+ SG: SG_default,
1337
+ USA: USA_default,
1338
+ ZA: ZA_default
1339
+ };
1340
+ function CountryFlag({
1341
+ flagCode,
1342
+ className
1343
+ }) {
1344
+ const src = FLAG_URL_BY_CODE[flagCode];
1345
+ if (!src) return null;
1346
+ return /* @__PURE__ */ jsx(
1347
+ "img",
1348
+ {
1349
+ src,
1350
+ alt: "",
1351
+ "aria-hidden": true,
1352
+ className: cn("size-4 shrink-0 rounded-sm object-cover", className)
1353
+ }
1354
+ );
1355
+ }
1356
+ function PhoneInput({
1357
+ value,
1358
+ onChange,
1359
+ id,
1360
+ className,
1361
+ placeholder = "Phone number",
1362
+ disabled,
1363
+ defaultCountryIso = DEFAULT_PHONE_COUNTRY_ISO
1364
+ }) {
1365
+ const parsed = parsePhoneValue(value, defaultCountryIso);
1366
+ const activeIso = phoneCountryByIso(parsed.iso) ? parsed.iso : defaultCountryIso;
1367
+ const activeCountry = phoneCountryByIso(activeIso);
1368
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 items-center gap-2", className), children: [
1369
+ /* @__PURE__ */ jsxs(
1370
+ Select,
1371
+ {
1372
+ value: activeIso,
1373
+ onValueChange: (iso) => onChange(formatPhoneValue(iso, parsed.national)),
1374
+ disabled,
1375
+ children: [
1376
+ /* @__PURE__ */ jsx(
1377
+ SelectTrigger,
1378
+ {
1379
+ "aria-label": "Country code",
1380
+ className: "h-9 w-[7.5rem] shrink-0 px-2.5",
1381
+ children: /* @__PURE__ */ jsx(SelectValue, { children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
1382
+ /* @__PURE__ */ jsx(CountryFlag, { flagCode: activeCountry.flagCode }),
1383
+ /* @__PURE__ */ jsx("span", { className: "text-sm tabular-nums", children: activeCountry.dialCode })
1384
+ ] }) })
1385
+ }
1386
+ ),
1387
+ /* @__PURE__ */ jsx(SelectContent, { children: PHONE_COUNTRIES.map((country) => /* @__PURE__ */ jsx(SelectItem, { value: country.iso, children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
1388
+ /* @__PURE__ */ jsx(CountryFlag, { flagCode: country.flagCode }),
1389
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: country.name }),
1390
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground tabular-nums", children: country.dialCode })
1391
+ ] }) }, country.iso)) })
1392
+ ]
1393
+ }
1394
+ ),
1395
+ /* @__PURE__ */ jsx(
1396
+ Input,
1397
+ {
1398
+ id,
1399
+ type: "tel",
1400
+ inputMode: "tel",
1401
+ autoComplete: "tel-national",
1402
+ value: parsed.national,
1403
+ placeholder,
1404
+ disabled,
1405
+ onChange: (e) => onChange(formatPhoneValue(activeIso, e.target.value.replace(/[^\d\s()-]/g, ""))),
1406
+ className: "min-w-0 flex-1"
1407
+ }
1408
+ )
1409
+ ] });
1410
+ }
1411
+ var PasswordInput = React7.forwardRef(
1412
+ function PasswordInput2({ className, disabled, ...props }, ref) {
1413
+ const [visible, setVisible] = React7.useState(false);
1414
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1415
+ /* @__PURE__ */ jsx(
1416
+ Input,
1417
+ {
1418
+ ref,
1419
+ type: visible ? "text" : "password",
1420
+ disabled,
1421
+ className: cn("pr-10", className),
1422
+ ...props
1423
+ }
1424
+ ),
1425
+ /* @__PURE__ */ jsx(
1426
+ Button,
1427
+ {
1428
+ type: "button",
1429
+ variant: "ghost",
1430
+ size: "icon",
1431
+ disabled,
1432
+ className: "absolute right-0.5 top-1/2 size-8 -translate-y-1/2 text-muted-foreground hover:text-foreground",
1433
+ "aria-label": visible ? "Hide password" : "Show password",
1434
+ "aria-pressed": visible,
1435
+ onClick: () => setVisible((v) => !v),
1436
+ children: visible ? /* @__PURE__ */ jsx(EyeOff, { size: 16 }) : /* @__PURE__ */ jsx(Eye, { size: 16 })
1437
+ }
1438
+ )
1439
+ ] });
1440
+ }
1441
+ );
1442
+ function Progress({
1443
+ className,
1444
+ value,
1445
+ ...props
1446
+ }) {
1447
+ return /* @__PURE__ */ jsx(
1448
+ ProgressPrimitive.Root,
1449
+ {
1450
+ "data-slot": "progress",
1451
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
1452
+ ...props,
1453
+ children: /* @__PURE__ */ jsx(
1454
+ ProgressPrimitive.Indicator,
1455
+ {
1456
+ "data-slot": "progress-indicator",
1457
+ className: "bg-primary h-full w-full flex-1 transition-all",
1458
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
1459
+ }
1460
+ )
1461
+ }
1462
+ );
1463
+ }
1464
+ var SAWTOOTH_DEPTH = 10;
1465
+ var SAWTOOTH_TEETH = 32;
1466
+ function buildReceiptClipPath(teeth, depth) {
1467
+ const top = [];
1468
+ for (let i = 0; i <= teeth; i++) {
1469
+ const x = `${(i / teeth * 100).toFixed(3)}%`;
1470
+ top.push(`${x} ${i % 2 === 0 ? `${depth}px` : "0px"}`);
1471
+ }
1472
+ const right = `100% calc(100% - ${depth}px)`;
1473
+ const bottom = [];
1474
+ for (let i = teeth - 1; i >= 0; i--) {
1475
+ const x = `${(i / teeth * 100).toFixed(3)}%`;
1476
+ bottom.push(`${x} ${i % 2 === 0 ? `calc(100% - ${depth}px)` : "100%"}`);
1477
+ }
1478
+ const left = `0 calc(100% - ${depth}px)`;
1479
+ return `polygon(${[...top, right, ...bottom, left].join(", ")})`;
1480
+ }
1481
+ var RECEIPT_CLIP_PATH = buildReceiptClipPath(SAWTOOTH_TEETH, SAWTOOTH_DEPTH);
1482
+ function ReceiptCard({ className, children, ...props }) {
1483
+ return /* @__PURE__ */ jsx("aside", { className: cn("w-full py-1", className), ...props, children: /* @__PURE__ */ jsx(
1484
+ "div",
1485
+ {
1486
+ className: "bg-muted px-5 pb-5 pt-6 drop-shadow-[0_1px_4px_rgba(15,23,42,0.05),0_0_0_1px_rgba(15,23,42,0.07)]",
1487
+ style: { clipPath: RECEIPT_CLIP_PATH },
1488
+ children
1489
+ }
1490
+ ) });
1491
+ }
1492
+ function ReceiptSummaryRow({
1493
+ label,
1494
+ value,
1495
+ bold,
1496
+ divider,
1497
+ valueClass,
1498
+ className
1499
+ }) {
1500
+ return /* @__PURE__ */ jsxs(
1501
+ "div",
1502
+ {
1503
+ className: cn(
1504
+ "flex items-baseline gap-1",
1505
+ divider && "mt-2 border-t border-dashed border-border pt-2",
1506
+ className
1507
+ ),
1508
+ children: [
1509
+ /* @__PURE__ */ jsx(
1510
+ "span",
1511
+ {
1512
+ className: cn(
1513
+ "shrink-0",
1514
+ bold ? "text-sm font-semibold uppercase tracking-wide text-foreground" : "text-sm text-muted-foreground"
1515
+ ),
1516
+ children: label
1517
+ }
1518
+ ),
1519
+ /* @__PURE__ */ jsx(
1520
+ "span",
1521
+ {
1522
+ "aria-hidden": true,
1523
+ className: "mx-1 mb-1 min-h-px min-w-4 flex-1 self-end border-b border-dotted border-border"
1524
+ }
1525
+ ),
1526
+ /* @__PURE__ */ jsx(
1527
+ "span",
1528
+ {
1529
+ className: cn(
1530
+ "shrink-0 font-mono text-sm tabular-nums",
1531
+ bold ? "text-base font-semibold text-foreground" : valueClass ?? "text-muted-foreground"
1532
+ ),
1533
+ children: value
1534
+ }
1535
+ )
1536
+ ]
1537
+ }
1538
+ );
1539
+ }
1540
+ var ResponsiveAlertCtx = React7.createContext({
1541
+ drawer: false,
1542
+ requestClose: () => {
1543
+ }
1544
+ });
1545
+ var alertDrawerShell = "w-full min-w-0 !max-w-none left-0 right-0 gap-0 border-border bg-card p-0 rounded-t-xl text-foreground shadow-xl pb-[max(1rem,env(safe-area-inset-bottom))] max-h-[min(90vh,90dvh)] z-[60] overflow-hidden";
1546
+ function ResponsiveAlertDialog({
1547
+ children,
1548
+ open,
1549
+ onOpenChange,
1550
+ ...rest
1551
+ }) {
1552
+ const drawer = useIsMobile();
1553
+ const requestClose = React7.useCallback(() => {
1554
+ onOpenChange?.(false);
1555
+ }, [onOpenChange]);
1556
+ return /* @__PURE__ */ jsx(ResponsiveAlertCtx.Provider, { value: { drawer, requestClose }, children: drawer ? /* @__PURE__ */ jsx(Drawer, { repositionInputs: false, open, onOpenChange, children }) : /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, ...rest, children }) });
1557
+ }
1558
+ function ResponsiveAlertDialogContent({ className, children, ...props }) {
1559
+ const { drawer } = React7.useContext(ResponsiveAlertCtx);
1560
+ if (drawer) {
1561
+ const {
1562
+ onOpenAutoFocus,
1563
+ onCloseAutoFocus,
1564
+ onEscapeKeyDown,
1565
+ onPointerDownOutside,
1566
+ forceMount,
1567
+ ...restDrawer
1568
+ } = props;
1569
+ return /* @__PURE__ */ jsx(DrawerContent, { className: cn(alertDrawerShell, "px-6 pt-2 pb-6", className, "!w-full"), ...restDrawer, children });
1570
+ }
1571
+ return /* @__PURE__ */ jsx(AlertDialogContent, { className, ...props, children });
1572
+ }
1573
+ function ResponsiveAlertDialogTitle({ className, ...props }) {
1574
+ const { drawer } = React7.useContext(ResponsiveAlertCtx);
1575
+ if (drawer) {
1576
+ return /* @__PURE__ */ jsx(DrawerTitle, { className: cn("text-lg font-semibold", className), ...props });
1577
+ }
1578
+ return /* @__PURE__ */ jsx(AlertDialogTitle, { className, ...props });
1579
+ }
1580
+ function ResponsiveAlertDialogDescription({ className, ...props }) {
1581
+ const { drawer } = React7.useContext(ResponsiveAlertCtx);
1582
+ if (drawer) {
1583
+ return /* @__PURE__ */ jsx(DrawerDescription, { className: cn("text-muted-foreground text-sm", className), ...props });
1584
+ }
1585
+ return /* @__PURE__ */ jsx(AlertDialogDescription, { className, ...props });
1586
+ }
1587
+ function ResponsiveAlertDialogAction({
1588
+ className,
1589
+ onClick,
1590
+ asChild,
1591
+ ...props
1592
+ }) {
1593
+ const { drawer, requestClose } = React7.useContext(ResponsiveAlertCtx);
1594
+ if (drawer) {
1595
+ return /* @__PURE__ */ jsx(
1596
+ "button",
1597
+ {
1598
+ type: "button",
1599
+ className: cn(buttonVariants(), className),
1600
+ ...props,
1601
+ onClick: (e) => {
1602
+ onClick?.(e);
1603
+ if (!e.defaultPrevented) requestClose();
1604
+ }
1605
+ }
1606
+ );
1607
+ }
1608
+ return /* @__PURE__ */ jsx(AlertDialogAction, { className, onClick, asChild, ...props });
1609
+ }
1610
+ function ResponsiveAlertDialogCancel({
1611
+ className,
1612
+ onClick,
1613
+ asChild,
1614
+ ...props
1615
+ }) {
1616
+ const { drawer, requestClose } = React7.useContext(ResponsiveAlertCtx);
1617
+ if (drawer) {
1618
+ return /* @__PURE__ */ jsx(
1619
+ "button",
1620
+ {
1621
+ type: "button",
1622
+ className: cn(buttonVariants({ variant: "outline" }), className),
1623
+ ...props,
1624
+ onClick: (e) => {
1625
+ onClick?.(e);
1626
+ if (!e.defaultPrevented) requestClose();
1627
+ }
1628
+ }
1629
+ );
1630
+ }
1631
+ return /* @__PURE__ */ jsx(AlertDialogCancel, { className, onClick, asChild, ...props });
1632
+ }
1633
+ function SelectableCard({
1634
+ selected = false,
1635
+ disabled = false,
1636
+ onSelect,
1637
+ children,
1638
+ className,
1639
+ ...props
1640
+ }) {
1641
+ return /* @__PURE__ */ jsx(
1642
+ Button,
1643
+ {
1644
+ type: "button",
1645
+ variant: "outline",
1646
+ disabled,
1647
+ onClick: onSelect,
1648
+ "data-slot": "selectable-card",
1649
+ "data-selected": selected || void 0,
1650
+ className: cn(
1651
+ "h-auto w-full flex-col items-stretch gap-0 rounded-xl border p-4 text-left font-normal shadow-none",
1652
+ selected ? "border-blue-500 bg-blue-50/50 ring-2 ring-blue-500/20 dark:border-blue-500 dark:bg-blue-950/30 dark:ring-blue-500/30" : "border-border bg-card hover:bg-accent",
1653
+ disabled && "cursor-default opacity-60 hover:bg-card",
1654
+ className
1655
+ ),
1656
+ ...props,
1657
+ children
1658
+ }
1659
+ );
1660
+ }
1661
+ SelectableCard.displayName = "SelectableCard";
1662
+ function SelectableListRow({
1663
+ selected = false,
1664
+ disabled = false,
1665
+ onSelect,
1666
+ leading,
1667
+ trailing,
1668
+ children,
1669
+ className,
1670
+ ...props
1671
+ }) {
1672
+ return /* @__PURE__ */ jsxs(
1673
+ Button,
1674
+ {
1675
+ type: "button",
1676
+ variant: "ghost",
1677
+ disabled,
1678
+ onClick: onSelect,
1679
+ "data-slot": "selectable-list-row",
1680
+ "data-selected": selected || void 0,
1681
+ className: cn(
1682
+ "flex h-auto w-full items-center gap-3 rounded-none px-3 py-2.5 text-left text-sm font-normal",
1683
+ disabled ? "cursor-default bg-muted text-muted-foreground hover:bg-muted hover:text-muted-foreground" : "text-foreground hover:bg-accent",
1684
+ selected && !disabled && "bg-accent",
1685
+ className
1686
+ ),
1687
+ ...props,
1688
+ children: [
1689
+ leading ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: leading }) : null,
1690
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1", children }),
1691
+ trailing ? /* @__PURE__ */ jsx("span", { className: "shrink-0", children: trailing }) : null
1692
+ ]
1693
+ }
1694
+ );
1695
+ }
1696
+ SelectableListRow.displayName = "SelectableListRow";
1697
+ function ShellTopBarViewToggle({
1698
+ className,
1699
+ children,
1700
+ "aria-label": ariaLabel,
1701
+ ...props
1702
+ }) {
1703
+ return /* @__PURE__ */ jsx(
1704
+ "div",
1705
+ {
1706
+ role: "group",
1707
+ "aria-label": ariaLabel,
1708
+ "data-slot": "shell-top-bar-view-toggle",
1709
+ className: cn(shellTopBarSegmentedShellClass, className),
1710
+ ...props,
1711
+ children
1712
+ }
1713
+ );
1714
+ }
1715
+ ShellTopBarViewToggle.displayName = "ShellTopBarViewToggle";
1716
+ function ShellTopBarViewToggleItem({
1717
+ active,
1718
+ onSelect,
1719
+ className,
1720
+ children,
1721
+ ...props
1722
+ }) {
1723
+ return /* @__PURE__ */ jsx(
1724
+ "button",
1725
+ {
1726
+ type: "button",
1727
+ "aria-pressed": active,
1728
+ onClick: onSelect,
1729
+ "data-slot": "shell-top-bar-view-toggle-item",
1730
+ className: cn(shellTopBarSegmentedItemClass(active), className),
1731
+ ...props,
1732
+ children
1733
+ }
1734
+ );
1735
+ }
1736
+ ShellTopBarViewToggleItem.displayName = "ShellTopBarViewToggleItem";
1737
+ function Slider({
1738
+ className,
1739
+ defaultValue,
1740
+ value,
1741
+ min = 0,
1742
+ max = 100,
1743
+ ...props
1744
+ }) {
1745
+ const _values = React7.useMemo(
1746
+ () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
1747
+ [value, defaultValue, min, max]
1748
+ );
1749
+ return /* @__PURE__ */ jsxs(
1750
+ SliderPrimitive.Root,
1751
+ {
1752
+ "data-slot": "slider",
1753
+ defaultValue,
1754
+ value,
1755
+ min,
1756
+ max,
1757
+ className: cn(
1758
+ "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
1759
+ className
1760
+ ),
1761
+ ...props,
1762
+ children: [
1763
+ /* @__PURE__ */ jsx(
1764
+ SliderPrimitive.Track,
1765
+ {
1766
+ "data-slot": "slider-track",
1767
+ className: cn(
1768
+ "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-4 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
1769
+ ),
1770
+ children: /* @__PURE__ */ jsx(
1771
+ SliderPrimitive.Range,
1772
+ {
1773
+ "data-slot": "slider-range",
1774
+ className: cn(
1775
+ "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
1776
+ )
1777
+ }
1778
+ )
1779
+ }
1780
+ ),
1781
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(
1782
+ SliderPrimitive.Thumb,
1783
+ {
1784
+ "data-slot": "slider-thumb",
1785
+ className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
1786
+ },
1787
+ index
1788
+ ))
1789
+ ]
1790
+ }
1791
+ );
1792
+ }
1793
+ function SmoothSize({ children, className }) {
1794
+ const innerRef = useRef(null);
1795
+ const [height, setHeight] = useState();
1796
+ const heightRef = useRef(void 0);
1797
+ useLayoutEffect(() => {
1798
+ const el = innerRef.current;
1799
+ if (!el) return;
1800
+ let frame = 0;
1801
+ const measure = (animate) => {
1802
+ const next = Math.round(el.getBoundingClientRect().height);
1803
+ if (!animate || heightRef.current === void 0) {
1804
+ heightRef.current = next;
1805
+ setHeight(next);
1806
+ return;
1807
+ }
1808
+ if (heightRef.current === next) return;
1809
+ cancelAnimationFrame(frame);
1810
+ frame = requestAnimationFrame(() => {
1811
+ heightRef.current = next;
1812
+ setHeight(next);
1813
+ });
1814
+ };
1815
+ measure(false);
1816
+ const observer = new ResizeObserver(() => measure(true));
1817
+ observer.observe(el);
1818
+ return () => {
1819
+ cancelAnimationFrame(frame);
1820
+ observer.disconnect();
1821
+ };
1822
+ }, []);
1823
+ return /* @__PURE__ */ jsx(
1824
+ "div",
1825
+ {
1826
+ "data-slot": "smooth-size",
1827
+ className: cn(
1828
+ "w-full overflow-hidden motion-reduce:transition-none",
1829
+ height !== void 0 && "transition-[height] duration-300 ease-out",
1830
+ className
1831
+ ),
1832
+ style: height !== void 0 ? { height } : void 0,
1833
+ children: /* @__PURE__ */ jsx("div", { ref: innerRef, className: "w-full", children })
1834
+ }
1835
+ );
1836
+ }
1837
+ var Toaster = ({ ...props }) => {
1838
+ const { resolvedTheme } = useTheme();
1839
+ return /* @__PURE__ */ jsx(
1840
+ Toaster$1,
1841
+ {
1842
+ theme: resolvedTheme === "dark" ? "dark" : "light",
1843
+ className: "toaster group",
1844
+ style: {
1845
+ "--normal-bg": "var(--popover)",
1846
+ "--normal-text": "var(--popover-foreground)",
1847
+ "--normal-border": "var(--border)"
1848
+ },
1849
+ ...props
1850
+ }
1851
+ );
1852
+ };
1853
+ function Switch({ className, ...props }) {
1854
+ return /* @__PURE__ */ jsx(
1855
+ SwitchPrimitive.Root,
1856
+ {
1857
+ "data-slot": "switch",
1858
+ className: cn(
1859
+ "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
1860
+ className
1861
+ ),
1862
+ ...props,
1863
+ children: /* @__PURE__ */ jsx(
1864
+ SwitchPrimitive.Thumb,
1865
+ {
1866
+ "data-slot": "switch-thumb",
1867
+ className: cn(
1868
+ "bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
1869
+ )
1870
+ }
1871
+ )
1872
+ }
1873
+ );
1874
+ }
1875
+ function Table({ className, ...props }) {
1876
+ return /* @__PURE__ */ jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx(
1877
+ "table",
1878
+ {
1879
+ "data-slot": "table",
1880
+ className: cn("w-full caption-bottom text-sm", className),
1881
+ ...props
1882
+ }
1883
+ ) });
1884
+ }
1885
+ function TableHeader({ className, ...props }) {
1886
+ return /* @__PURE__ */ jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props });
1887
+ }
1888
+ function TableBody({ className, ...props }) {
1889
+ return /* @__PURE__ */ jsx(
1890
+ "tbody",
1891
+ {
1892
+ "data-slot": "table-body",
1893
+ className: cn("[&_tr:last-child]:border-0", className),
1894
+ ...props
1895
+ }
1896
+ );
1897
+ }
1898
+ function TableFooter({ className, ...props }) {
1899
+ return /* @__PURE__ */ jsx(
1900
+ "tfoot",
1901
+ {
1902
+ "data-slot": "table-footer",
1903
+ className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
1904
+ ...props
1905
+ }
1906
+ );
1907
+ }
1908
+ function TableRow({ className, ...props }) {
1909
+ return /* @__PURE__ */ jsx(
1910
+ "tr",
1911
+ {
1912
+ "data-slot": "table-row",
1913
+ className: cn(
1914
+ "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
1915
+ className
1916
+ ),
1917
+ ...props
1918
+ }
1919
+ );
1920
+ }
1921
+ function TableHead({ className, ...props }) {
1922
+ return /* @__PURE__ */ jsx(
1923
+ "th",
1924
+ {
1925
+ "data-slot": "table-head",
1926
+ className: cn(
1927
+ "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
1928
+ className
1929
+ ),
1930
+ ...props
1931
+ }
1932
+ );
1933
+ }
1934
+ function TableCell({ className, ...props }) {
1935
+ return /* @__PURE__ */ jsx(
1936
+ "td",
1937
+ {
1938
+ "data-slot": "table-cell",
1939
+ className: cn(
1940
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
1941
+ className
1942
+ ),
1943
+ ...props
1944
+ }
1945
+ );
1946
+ }
1947
+ function TableCaption({ className, ...props }) {
1948
+ return /* @__PURE__ */ jsx(
1949
+ "caption",
1950
+ {
1951
+ "data-slot": "table-caption",
1952
+ className: cn("text-muted-foreground mt-4 text-sm", className),
1953
+ ...props
1954
+ }
1955
+ );
1956
+ }
1957
+ function useSegmentedPillPosition(containerRef) {
1958
+ const [rect, setRect] = React7.useState({
1959
+ left: 0,
1960
+ top: 0,
1961
+ width: 0,
1962
+ height: 0,
1963
+ visible: false
1964
+ });
1965
+ const measure = React7.useCallback(() => {
1966
+ const el = containerRef.current;
1967
+ if (!el) return;
1968
+ const active = el.querySelector(
1969
+ ':scope > [data-state="active"], :scope > [role="tab"][aria-selected="true"]'
1970
+ );
1971
+ if (!active) {
1972
+ setRect((s) => ({ ...s, visible: false }));
1973
+ return;
1974
+ }
1975
+ setRect({
1976
+ left: active.offsetLeft,
1977
+ top: active.offsetTop,
1978
+ width: active.offsetWidth,
1979
+ height: active.offsetHeight,
1980
+ visible: true
1981
+ });
1982
+ }, [containerRef]);
1983
+ React7.useLayoutEffect(() => {
1984
+ measure();
1985
+ }, [measure]);
1986
+ React7.useLayoutEffect(() => {
1987
+ const el = containerRef.current;
1988
+ if (!el) return;
1989
+ const ro = new ResizeObserver(() => measure());
1990
+ ro.observe(el);
1991
+ for (const child of el.querySelectorAll(':scope > [role="tab"]')) {
1992
+ ro.observe(child);
1993
+ }
1994
+ const mo = new MutationObserver(() => measure());
1995
+ mo.observe(el, {
1996
+ subtree: true,
1997
+ childList: true,
1998
+ attributes: true,
1999
+ attributeFilter: ["data-state", "aria-selected"]
2000
+ });
2001
+ el.addEventListener("scroll", measure, { passive: true });
2002
+ const onWin = () => measure();
2003
+ window.addEventListener("resize", onWin);
2004
+ return () => {
2005
+ ro.disconnect();
2006
+ mo.disconnect();
2007
+ el.removeEventListener("scroll", measure);
2008
+ window.removeEventListener("resize", onWin);
2009
+ };
2010
+ }, [containerRef, measure]);
2011
+ return rect;
2012
+ }
2013
+ function SegmentedSlidingPill({ containerRef }) {
2014
+ const { left, top, width, height, visible } = useSegmentedPillPosition(containerRef);
2015
+ return /* @__PURE__ */ jsx(
2016
+ "div",
2017
+ {
2018
+ "aria-hidden": true,
2019
+ className: "pointer-events-none absolute z-0 rounded-md bg-card shadow-sm ring-1 ring-black/[0.06] transition-[left,top,width,height,opacity] duration-200 ease-out motion-reduce:transition-none",
2020
+ style: {
2021
+ left,
2022
+ top,
2023
+ width,
2024
+ height,
2025
+ opacity: visible ? 1 : 0
2026
+ }
2027
+ }
2028
+ );
2029
+ }
2030
+ var TabsListVariantContext = React7.createContext("default");
2031
+ var tabsListVariants = cva("inline-flex items-center justify-center", {
2032
+ variants: {
2033
+ variant: {
2034
+ default: "bg-muted text-muted-foreground h-9 w-fit rounded-xl p-[3px] [flex-flow:row] [flex-wrap:nowrap] gap-0",
2035
+ segmented: "h-auto w-full min-w-0 max-w-full rounded-lg bg-muted p-1 text-muted-foreground ring-1 ring-inset ring-gray-200/80 sm:w-auto",
2036
+ secondary: "h-auto w-fit [flex-wrap:wrap] gap-1.5 bg-transparent p-0 text-slate-500"
2037
+ }
2038
+ },
2039
+ defaultVariants: { variant: "default" }
2040
+ });
2041
+ var tabsTriggerVariants = cva(
2042
+ "whitespace-nowrap font-medium transition-[color,box-shadow,background] outline-none disabled:pointer-events-none disabled:opacity-50",
2043
+ {
2044
+ variants: {
2045
+ listVariant: {
2046
+ default: [
2047
+ "data-[state=active]:bg-card focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring",
2048
+ "dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30",
2049
+ "text-foreground dark:text-muted-foreground",
2050
+ "inline-flex h-[calc(100%-1px)] min-h-0 flex-1 min-w-0 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm",
2051
+ "focus-visible:ring-[3px] focus-visible:outline-1",
2052
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
2053
+ ],
2054
+ segmented: [
2055
+ "relative z-[1] inline-flex shrink-0 min-h-0 items-center justify-center gap-1.5 rounded-md border border-transparent bg-transparent px-4 py-2 text-xs sm:text-sm",
2056
+ "text-muted-foreground hover:bg-accent hover:text-foreground",
2057
+ "focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
2058
+ "data-[state=active]:bg-card data-[state=active]:text-foreground data-[state=active]:hover:bg-card",
2059
+ "aria-selected:bg-card aria-selected:text-foreground aria-selected:hover:bg-card"
2060
+ ],
2061
+ secondary: [
2062
+ "inline-flex shrink-0 min-h-0 items-center justify-center rounded-md border border-transparent px-3 py-1.5 text-xs",
2063
+ "text-slate-500 hover:bg-slate-100 hover:text-slate-800",
2064
+ "focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2",
2065
+ "data-[state=active]:bg-slate-200 data-[state=active]:text-slate-900"
2066
+ ]
2067
+ }
2068
+ },
2069
+ defaultVariants: { listVariant: "default" }
2070
+ }
2071
+ );
2072
+ var segmentedTabScrollerClass = "relative flex min-w-0 w-full flex-nowrap items-center justify-center gap-0.5 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
2073
+ function Tabs({ className, ...props }) {
2074
+ return /* @__PURE__ */ jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn("flex flex-col gap-2", className), ...props });
2075
+ }
2076
+ function TabsList({ className, variant = "default", ref: refProp, children, ...props }) {
2077
+ const segmentedContainerRef = React7.useRef(null);
2078
+ const assignSegmentedListRef = React7.useCallback(
2079
+ (node) => {
2080
+ segmentedContainerRef.current = node;
2081
+ if (refProp == null) return;
2082
+ if (typeof refProp === "function") refProp(node);
2083
+ else if (typeof refProp === "object") refProp.current = node;
2084
+ },
2085
+ [refProp]
2086
+ );
2087
+ if (variant === "segmented") {
2088
+ return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx("div", { className: cn(tabsListVariants({ variant }), className), children: /* @__PURE__ */ jsxs(
2089
+ TabsPrimitive.List,
2090
+ {
2091
+ ref: assignSegmentedListRef,
2092
+ "data-slot": "tabs-list",
2093
+ "data-tabs-variant": variant,
2094
+ className: segmentedTabScrollerClass,
2095
+ ...props,
2096
+ children: [
2097
+ /* @__PURE__ */ jsx(SegmentedSlidingPill, { containerRef: segmentedContainerRef }),
2098
+ children
2099
+ ]
2100
+ }
2101
+ ) }) });
2102
+ }
2103
+ return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(
2104
+ TabsPrimitive.List,
2105
+ {
2106
+ ref: refProp,
2107
+ "data-slot": "tabs-list",
2108
+ "data-tabs-variant": variant,
2109
+ className: cn(tabsListVariants({ variant }), className),
2110
+ ...props,
2111
+ children
2112
+ }
2113
+ ) });
2114
+ }
2115
+ TabsList.displayName = "TabsList";
2116
+ function SegmentedTabList({ className, children, ref: refProp, ...props }) {
2117
+ const containerRef = React7.useRef(null);
2118
+ const assignRef2 = React7.useCallback(
2119
+ (node) => {
2120
+ containerRef.current = node;
2121
+ if (refProp == null) return;
2122
+ if (typeof refProp === "function") refProp(node);
2123
+ else if (typeof refProp === "object") refProp.current = node;
2124
+ },
2125
+ [refProp]
2126
+ );
2127
+ return /* @__PURE__ */ jsx("div", { className: cn(tabsListVariants({ variant: "segmented" }), className), children: /* @__PURE__ */ jsxs(
2128
+ "div",
2129
+ {
2130
+ ref: assignRef2,
2131
+ role: "tablist",
2132
+ "data-slot": "segmented-tab-list",
2133
+ className: segmentedTabScrollerClass,
2134
+ ...props,
2135
+ children: [
2136
+ /* @__PURE__ */ jsx(SegmentedSlidingPill, { containerRef }),
2137
+ children
2138
+ ]
2139
+ }
2140
+ ) });
2141
+ }
2142
+ SegmentedTabList.displayName = "SegmentedTabList";
2143
+ function SegmentedTabTrigger({
2144
+ selected,
2145
+ onSelect,
2146
+ className,
2147
+ children,
2148
+ ...props
2149
+ }) {
2150
+ return /* @__PURE__ */ jsx(
2151
+ "button",
2152
+ {
2153
+ type: "button",
2154
+ role: "tab",
2155
+ "aria-selected": selected,
2156
+ onClick: onSelect,
2157
+ "data-slot": "segmented-tab-trigger",
2158
+ className: cn(tabsTriggerVariants({ listVariant: "segmented" }), className),
2159
+ ...props,
2160
+ children
2161
+ }
2162
+ );
2163
+ }
2164
+ SegmentedTabTrigger.displayName = "SegmentedTabTrigger";
2165
+ function TabsTrigger({ className, ref, ...props }) {
2166
+ const listVariant = React7.useContext(TabsListVariantContext);
2167
+ return /* @__PURE__ */ jsx(
2168
+ TabsPrimitive.Trigger,
2169
+ {
2170
+ ref,
2171
+ "data-slot": "tabs-trigger",
2172
+ className: cn(tabsTriggerVariants({ listVariant }), className),
2173
+ ...props
2174
+ }
2175
+ );
2176
+ }
2177
+ TabsTrigger.displayName = "TabsTrigger";
2178
+ function TabsContent({ className, ...props }) {
2179
+ return /* @__PURE__ */ jsx(
2180
+ TabsPrimitive.Content,
2181
+ {
2182
+ "data-slot": "tabs-content",
2183
+ className: cn("flex-1 outline-none", className),
2184
+ ...props
2185
+ }
2186
+ );
2187
+ }
2188
+ function TabCountBadge({ count, className }) {
2189
+ if (count <= 0) return null;
2190
+ return /* @__PURE__ */ jsx(
2191
+ "span",
2192
+ {
2193
+ "aria-hidden": true,
2194
+ className: cn(
2195
+ "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full bg-amber-500 px-1 text-[10px] font-semibold leading-none tabular-nums text-white",
2196
+ "dark:bg-amber-600",
2197
+ className
2198
+ ),
2199
+ children: count > 99 ? "99+" : count
2200
+ }
2201
+ );
2202
+ }
2203
+ var LINE_CLAMP_CLASS = {
2204
+ 2: "line-clamp-2",
2205
+ 3: "line-clamp-3",
2206
+ 4: "line-clamp-4",
2207
+ 5: "line-clamp-5",
2208
+ 6: "line-clamp-6"
2209
+ };
2210
+ var textVariants = cva("", {
2211
+ variants: {
2212
+ size: {
2213
+ xs: "text-xs",
2214
+ sm: "text-sm",
2215
+ base: "text-base",
2216
+ lg: "text-lg"
2217
+ },
2218
+ weight: {
2219
+ normal: "font-normal",
2220
+ medium: "font-medium",
2221
+ semibold: "font-semibold",
2222
+ bold: "font-bold"
2223
+ },
2224
+ muted: {
2225
+ true: "text-muted-foreground",
2226
+ false: ""
2227
+ }
2228
+ },
2229
+ defaultVariants: {
2230
+ weight: "normal",
2231
+ muted: false
2232
+ }
2233
+ });
2234
+ function isTextClipped(element, lines) {
2235
+ if (lines <= 1) {
2236
+ return element.scrollWidth > element.clientWidth;
2237
+ }
2238
+ return element.scrollHeight > element.clientHeight;
2239
+ }
2240
+ function useIsTextClipped(ref, lines, contentKey) {
2241
+ const [isClipped, setIsClipped] = React7.useState(false);
2242
+ React7.useLayoutEffect(() => {
2243
+ if (lines == null) {
2244
+ setIsClipped(false);
2245
+ return;
2246
+ }
2247
+ const element = ref.current;
2248
+ if (!element) return;
2249
+ const sync = () => {
2250
+ setIsClipped(isTextClipped(element, lines));
2251
+ };
2252
+ sync();
2253
+ const resizeObserver = new ResizeObserver(sync);
2254
+ resizeObserver.observe(element);
2255
+ return () => {
2256
+ resizeObserver.disconnect();
2257
+ };
2258
+ }, [lines, contentKey, ref]);
2259
+ return isClipped;
2260
+ }
2261
+ function getEllipsisClasses(lines) {
2262
+ if (lines <= 1) {
2263
+ return "truncate whitespace-nowrap overflow-hidden";
2264
+ }
2265
+ return LINE_CLAMP_CLASS[lines] ?? "overflow-hidden";
2266
+ }
2267
+ function getEllipsisStyle(lines) {
2268
+ if (lines <= 6 || lines <= 1) return void 0;
2269
+ return {
2270
+ display: "-webkit-box",
2271
+ WebkitBoxOrient: "vertical",
2272
+ WebkitLineClamp: lines,
2273
+ overflow: "hidden"
2274
+ };
2275
+ }
2276
+ function assignRef(ref, value) {
2277
+ if (!ref) return;
2278
+ if (typeof ref === "function") {
2279
+ ref(value);
2280
+ return;
2281
+ }
2282
+ ref.current = value;
2283
+ }
2284
+ function resolveTooltipContent(children, tooltip, lines) {
2285
+ if (lines == null) return null;
2286
+ if (tooltip === false) return null;
2287
+ if (tooltip != null && tooltip !== true) return tooltip;
2288
+ if (typeof children === "string" || typeof children === "number") {
2289
+ return String(children);
2290
+ }
2291
+ return null;
2292
+ }
2293
+ var Text = React7.forwardRef(function Text2({
2294
+ as = "span",
2295
+ className,
2296
+ size,
2297
+ weight,
2298
+ muted,
2299
+ lines,
2300
+ tooltip,
2301
+ tooltipSide = "top",
2302
+ children,
2303
+ style,
2304
+ ...props
2305
+ }, forwardedRef) {
2306
+ const localRef = React7.useRef(null);
2307
+ const contentKey = typeof children === "string" || typeof children === "number" ? String(children) : React7.Children.count(children).toString();
2308
+ const mergedRef = React7.useCallback(
2309
+ (node) => {
2310
+ assignRef(localRef, node);
2311
+ assignRef(forwardedRef, node);
2312
+ },
2313
+ [forwardedRef]
2314
+ );
2315
+ const isClipped = useIsTextClipped(localRef, lines, contentKey);
2316
+ const tooltipContent = resolveTooltipContent(children, tooltip, lines);
2317
+ const ellipsisStyle = lines != null ? getEllipsisStyle(lines) : void 0;
2318
+ const Comp = as;
2319
+ const textElement = /* @__PURE__ */ jsx(
2320
+ Comp,
2321
+ {
2322
+ ref: mergedRef,
2323
+ "data-slot": "text",
2324
+ className: cn(
2325
+ textVariants({ size, weight, muted }),
2326
+ lines != null && "min-w-0",
2327
+ lines != null && getEllipsisClasses(lines),
2328
+ className
2329
+ ),
2330
+ style: ellipsisStyle ? { ...ellipsisStyle, ...style } : style,
2331
+ ...props,
2332
+ children
2333
+ }
2334
+ );
2335
+ if (lines != null && isClipped && tooltipContent != null) {
2336
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
2337
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: textElement }),
2338
+ /* @__PURE__ */ jsx(TooltipContent, { side: tooltipSide, children: tooltipContent })
2339
+ ] });
2340
+ }
2341
+ return textElement;
2342
+ });
2343
+ Text.displayName = "Text";
2344
+ var toggleVariants = cva(
2345
+ "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",
2346
+ {
2347
+ variants: {
2348
+ variant: {
2349
+ default: "bg-transparent",
2350
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
2351
+ },
2352
+ size: {
2353
+ default: "h-9 px-2 min-w-9",
2354
+ sm: "h-8 px-1.5 min-w-8",
2355
+ lg: "h-10 px-2.5 min-w-10"
2356
+ }
2357
+ },
2358
+ defaultVariants: {
2359
+ variant: "default",
2360
+ size: "default"
2361
+ }
2362
+ }
2363
+ );
2364
+ function Toggle({
2365
+ className,
2366
+ variant,
2367
+ size,
2368
+ ...props
2369
+ }) {
2370
+ return /* @__PURE__ */ jsx(
2371
+ TogglePrimitive.Root,
2372
+ {
2373
+ "data-slot": "toggle",
2374
+ className: cn(toggleVariants({ variant, size, className })),
2375
+ ...props
2376
+ }
2377
+ );
2378
+ }
2379
+ var ToggleGroupContext = React7.createContext({
2380
+ size: "default",
2381
+ variant: "default"
2382
+ });
2383
+ function ToggleGroup({
2384
+ className,
2385
+ variant,
2386
+ size,
2387
+ children,
2388
+ ...props
2389
+ }) {
2390
+ return /* @__PURE__ */ jsx(
2391
+ ToggleGroupPrimitive.Root,
2392
+ {
2393
+ "data-slot": "toggle-group",
2394
+ "data-variant": variant,
2395
+ "data-size": size,
2396
+ className: cn(
2397
+ "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
2398
+ className
2399
+ ),
2400
+ ...props,
2401
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
2402
+ }
2403
+ );
2404
+ }
2405
+ function ToggleGroupItem({
2406
+ className,
2407
+ children,
2408
+ variant,
2409
+ size,
2410
+ ...props
2411
+ }) {
2412
+ const context = React7.useContext(ToggleGroupContext);
2413
+ return /* @__PURE__ */ jsx(
2414
+ ToggleGroupPrimitive.Item,
2415
+ {
2416
+ "data-slot": "toggle-group-item",
2417
+ "data-variant": context.variant || variant,
2418
+ "data-size": context.size || size,
2419
+ className: cn(
2420
+ toggleVariants({
2421
+ variant: context.variant || variant,
2422
+ size: context.size || size
2423
+ }),
2424
+ "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",
2425
+ className
2426
+ ),
2427
+ ...props,
2428
+ children
2429
+ }
2430
+ );
2431
+ }
2432
+
2433
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, ContentFade, DashFade, DateField, FeedSkeleton, FieldLabel, FilterPopover, IconInput, InputGroup, InputGroupInput, NumberInput, PasswordInput, PhoneInput, Progress, ReceiptCard, ReceiptSummaryRow, ResponsiveAlertDialog, ResponsiveAlertDialogAction, ResponsiveAlertDialogCancel, ResponsiveAlertDialogContent, ResponsiveAlertDialogDescription, AlertDialogFooter as ResponsiveAlertDialogFooter, AlertDialogHeader as ResponsiveAlertDialogHeader, ResponsiveAlertDialogTitle, ScrollArea, ScrollBar, SegmentedTabList, SegmentedTabTrigger, SelectableCard, SelectableListRow, ShellTopBarViewToggle, ShellTopBarViewToggleItem, Slider, SmoothSize, Switch, TabCountBadge, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, fieldLabelClass, tabsListVariants, tabsTriggerVariants, textVariants, toggleVariants };
13
2434
  //# sourceMappingURL=ui.js.map
14
2435
  //# sourceMappingURL=ui.js.map