@plyaz/ui 0.7.18 → 0.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.es.js CHANGED
@@ -1,43 +1,44 @@
1
- import { TextReveal as it } from "./client/reveal-text.es.js";
2
- import { AlertDialog as st, AlertDialogAction as lt, AlertDialogCancel as ut, AlertDialogContent as ct, AlertDialogDescription as bt, AlertDialogFooter as pt, AlertDialogHeader as mt, AlertDialogOverlay as gt, AlertDialogPortal as ft, AlertDialogTitle as ht, AlertDialogTrigger as xt } from "./client/alert-dialog.es.js";
3
- import { Calendar as wt, CalendarDayButton as St } from "./client/calendar.es.js";
4
- import { Carousel as Ct, CarouselContent as Dt, CarouselItem as It, CarouselNext as Tt, CarouselPrevious as Nt } from "./client/carousel.es.js";
5
- import { Combobox as yt } from "./client/combobox.es.js";
6
- import { InputOTP as kt, InputOTPGroup as Et, InputOTPSeparator as zt, InputOTPSlot as Ot } from "./client/input-otp.es.js";
7
- import { Slider as Pt } from "./client/slider.es.js";
8
- import { Progress as Gt } from "./client/progress.es.js";
9
- import { Accordion as Lt, AccordionContent as Wt, AccordionItem as Ft, AccordionTrigger as jt } from "./client/accordion.es.js";
10
- import { Avatar as $t, AvatarFallback as qt, AvatarImage as Vt } from "./client/avatar.es.js";
11
- import { Checkbox as Xt } from "./client/checkbox.es.js";
12
- import { ContextMenu as Qt, ContextMenuCheckboxItem as Yt, ContextMenuContent as Zt, ContextMenuGroup as ea, ContextMenuItem as ta, ContextMenuLabel as aa, ContextMenuPortal as ra, ContextMenuRadioGroup as oa, ContextMenuRadioItem as na, ContextMenuSeparator as ia, ContextMenuShortcut as da, ContextMenuSub as sa, ContextMenuSubContent as la, ContextMenuSubTrigger as ua, ContextMenuTrigger as ca } from "./client/context-menu.es.js";
13
- import { DropdownMenu as pa, DropdownMenuCheckboxItem as ma, DropdownMenuContent as ga, DropdownMenuGroup as fa, DropdownMenuItem as ha, DropdownMenuLabel as xa, DropdownMenuPortal as va, DropdownMenuRadioGroup as wa, DropdownMenuRadioItem as Sa, DropdownMenuSeparator as Ma, DropdownMenuShortcut as Ca, DropdownMenuSub as Da, DropdownMenuSubContent as Ia, DropdownMenuSubTrigger as Ta, DropdownMenuTrigger as Na } from "./client/dropdown-menu.es.js";
14
- import { HoverCard as ya, HoverCardContent as _a, HoverCardTrigger as ka } from "./client/hover-card.es.js";
15
- import { RadioGroup as za, RadioGroupItem as Oa } from "./client/radio-group.es.js";
1
+ import { TextReveal as sr } from "./client/reveal-text.es.js";
2
+ import { AlertDialog as lr, AlertDialogAction as ur, AlertDialogCancel as cr, AlertDialogContent as fr, AlertDialogDescription as mr, AlertDialogFooter as br, AlertDialogHeader as pr, AlertDialogOverlay as gr, AlertDialogPortal as hr, AlertDialogTitle as xr, AlertDialogTrigger as vr } from "./client/alert-dialog.es.js";
3
+ import { Calendar as Cr, CalendarDayButton as yr } from "./client/calendar.es.js";
4
+ import { Carousel as Mr, CarouselContent as Dr, CarouselItem as _r, CarouselNext as Ir, CarouselPrevious as Nr } from "./client/carousel.es.js";
5
+ import { Combobox as Fr } from "./client/combobox.es.js";
6
+ import { InputOTP as kr, InputOTPGroup as Er, InputOTPSeparator as Or, InputOTPSlot as Rr } from "./client/input-otp.es.js";
7
+ import { Slider as Pr } from "./client/slider.es.js";
8
+ import { Progress as Lr } from "./client/progress.es.js";
9
+ import { Accordion as Gr, AccordionContent as Hr, AccordionItem as Wr, AccordionTrigger as $r } from "./client/accordion.es.js";
10
+ import { Avatar as Kr, AvatarFallback as qr, AvatarImage as Xr } from "./client/avatar.es.js";
11
+ import { Checkbox as Qr } from "./client/checkbox.es.js";
12
+ import { ContextMenu as Zr, ContextMenuCheckboxItem as jr, ContextMenuContent as ea, ContextMenuGroup as ta, ContextMenuItem as ra, ContextMenuLabel as aa, ContextMenuPortal as oa, ContextMenuRadioGroup as na, ContextMenuRadioItem as ia, ContextMenuSeparator as sa, ContextMenuShortcut as da, ContextMenuSub as la, ContextMenuSubContent as ua, ContextMenuSubTrigger as ca, ContextMenuTrigger as fa } from "./client/context-menu.es.js";
13
+ import { DropdownMenu as ba, DropdownMenuCheckboxItem as pa, DropdownMenuContent as ga, DropdownMenuGroup as ha, DropdownMenuItem as xa, DropdownMenuLabel as va, DropdownMenuPortal as wa, DropdownMenuRadioGroup as Ca, DropdownMenuRadioItem as ya, DropdownMenuSeparator as Sa, DropdownMenuShortcut as Ma, DropdownMenuSub as Da, DropdownMenuSubContent as _a, DropdownMenuSubTrigger as Ia, DropdownMenuTrigger as Na } from "./client/dropdown-menu.es.js";
14
+ import { HoverCard as Fa, HoverCardContent as Ta, HoverCardTrigger as ka } from "./client/hover-card.es.js";
15
+ import { RadioGroup as Oa, RadioGroupItem as Ra } from "./client/radio-group.es.js";
16
16
  import { ScrollArea as Pa, ScrollBar as Ba } from "./client/scroll-area.es.js";
17
- import { Switch as Ha } from "./client/switch.es.js";
18
- import { Tabs as Wa, TabsContent as Fa, TabsList as ja, TabsTrigger as Ka } from "./client/tabs.es.js";
19
- import { Tooltip as A, TooltipTrigger as y, TooltipContent as _, TooltipProvider as k } from "./client/tooltip.es.js";
20
- import { Command as qa, CommandDialog as Va, CommandEmpty as Ua, CommandGroup as Xa, CommandInput as Ja, CommandItem as Qa, CommandList as Ya, CommandSeparator as Za, CommandShortcut as er } from "./client/command.es.js";
21
- import { Dialog as ar, DialogClose as rr, DialogContent as or, DialogDescription as nr, DialogFooter as ir, DialogHeader as dr, DialogOverlay as sr, DialogPortal as lr, DialogTitle as ur, DialogTrigger as cr } from "./client/dialog.es.js";
22
- import { Drawer as pr, DrawerClose as mr, DrawerContent as gr, DrawerDescription as fr, DrawerFooter as hr, DrawerHeader as xr, DrawerOverlay as vr, DrawerPortal as wr, DrawerTitle as Sr, DrawerTrigger as Mr } from "./client/drawer.es.js";
23
- import { Sheet as E, SheetContent as z, SheetHeader as O, SheetTitle as R, SheetDescription as P } from "./client/sheet.es.js";
24
- import { SheetClose as Dr, SheetFooter as Ir, SheetTrigger as Tr } from "./client/sheet.es.js";
25
- import { Toaster as Ar } from "./client/toaster.es.js";
26
- import { Toggle as _r } from "./client/toggle.es.js";
27
- import { Label as Er } from "./client/label.es.js";
28
- import { Menubar as Or, MenubarCheckboxItem as Rr, MenubarContent as Pr, MenubarGroup as Br, MenubarItem as Gr, MenubarLabel as Hr, MenubarMenu as Lr, MenubarPortal as Wr, MenubarRadioGroup as Fr, MenubarRadioItem as jr, MenubarSeparator as Kr, MenubarShortcut as $r, MenubarSub as qr, MenubarSubContent as Vr, MenubarSubTrigger as Ur, MenubarTrigger as Xr } from "./client/menu-bar.es.js";
29
- import { Popover as Qr, PopoverAnchor as Yr, PopoverContent as Zr, PopoverTrigger as eo } from "./client/popover.es.js";
30
- import { jsx as a, jsxs as p } from "react/jsx-runtime";
31
- import * as s from "react";
32
- import { Slot as g } from "@radix-ui/react-slot";
33
- import { cva as B } from "class-variance-authority";
34
- import { PanelLeftIcon as G } from "lucide-react";
35
- import { c as n } from "./utils-B6yFEsav.js";
36
- import { I as H } from "./Textarea-BTbJSVLU.js";
37
- import { B as L } from "./Button-B7sEajdG.js";
17
+ import { Switch as za } from "./client/switch.es.js";
18
+ import { Tabs as Ha, TabsContent as Wa, TabsList as $a, TabsTrigger as Ua } from "./client/tabs.es.js";
19
+ import { Tooltip as ae, TooltipTrigger as oe, TooltipContent as ne, TooltipProvider as ie } from "./client/tooltip.es.js";
20
+ import { Command as qa, CommandDialog as Xa, CommandEmpty as Ja, CommandGroup as Qa, CommandInput as Ya, CommandItem as Za, CommandList as ja, CommandSeparator as eo, CommandShortcut as to } from "./client/command.es.js";
21
+ import { Dialog as ao, DialogClose as oo, DialogContent as no, DialogDescription as io, DialogFooter as so, DialogHeader as lo, DialogOverlay as uo, DialogPortal as co, DialogTitle as fo, DialogTrigger as mo } from "./client/dialog.es.js";
22
+ import { Drawer as po, DrawerClose as go, DrawerContent as ho, DrawerDescription as xo, DrawerFooter as vo, DrawerHeader as wo, DrawerOverlay as Co, DrawerPortal as yo, DrawerTitle as So, DrawerTrigger as Mo } from "./client/drawer.es.js";
23
+ import { Sheet as se, SheetContent as de, SheetHeader as le, SheetTitle as ue, SheetDescription as ce } from "./client/sheet.es.js";
24
+ import { SheetClose as _o, SheetFooter as Io, SheetTrigger as No } from "./client/sheet.es.js";
25
+ import { Toaster as Fo } from "./client/toaster.es.js";
26
+ import { Toggle as ko } from "./client/toggle.es.js";
27
+ import { Label as fe } from "./client/label.es.js";
28
+ import { Menubar as Oo, MenubarCheckboxItem as Ro, MenubarContent as Vo, MenubarGroup as Po, MenubarItem as Bo, MenubarLabel as Lo, MenubarMenu as zo, MenubarPortal as Go, MenubarRadioGroup as Ho, MenubarRadioItem as Wo, MenubarSeparator as $o, MenubarShortcut as Uo, MenubarSub as Ko, MenubarSubContent as qo, MenubarSubTrigger as Xo, MenubarTrigger as Jo } from "./client/menu-bar.es.js";
29
+ import { Popover as Yo, PopoverAnchor as Zo, PopoverContent as jo, PopoverTrigger as en } from "./client/popover.es.js";
30
+ import { jsx as n, jsxs as A } from "react/jsx-runtime";
31
+ import * as f from "react";
32
+ import d from "react";
33
+ import { Slot as F } from "@radix-ui/react-slot";
34
+ import { cva as me } from "class-variance-authority";
35
+ import { PanelLeftIcon as be } from "lucide-react";
36
+ import { c as u } from "./utils-B6yFEsav.js";
37
+ import { I as pe } from "./Textarea-BTbJSVLU.js";
38
+ import { B as ge } from "./Button-B7sEajdG.js";
38
39
  import "@radix-ui/react-select";
39
40
  import "next-intl";
40
- import { a as C, S as W } from "./Skeleton-Cj9Od_Nd.js";
41
+ import { a as G, S as he } from "./Skeleton-Cj9Od_Nd.js";
41
42
  import "@radix-ui/react-alert-dialog";
42
43
  import "react-day-picker";
43
44
  import "cmdk";
@@ -61,148 +62,150 @@ import "next-themes";
61
62
  import "sonner";
62
63
  import "@radix-ui/react-label";
63
64
  import "@radix-ui/react-menubar";
64
- var F = { WEEK: 6048e5 };
65
- const v = 768;
66
- function j() {
67
- const [t, e] = s.useState(void 0);
68
- return s.useEffect(() => {
69
- const r = window.matchMedia(`(max-width: ${v - 1}px)`), o = () => {
70
- e(window.innerWidth < v);
65
+ import "@radix-ui/react-separator";
66
+ import "@radix-ui/react-tooltip";
67
+ var xe = { WEEK: 6048e5 };
68
+ const V = 768;
69
+ function ve() {
70
+ const [e, r] = f.useState(void 0);
71
+ return f.useEffect(() => {
72
+ const t = window.matchMedia(`(max-width: ${V - 1}px)`), o = () => {
73
+ r(window.innerWidth < V);
71
74
  };
72
- return r.addEventListener("change", o), e(window.innerWidth < v), () => r.removeEventListener("change", o);
73
- }, []), !!t;
75
+ return t.addEventListener("change", o), r(window.innerWidth < V), () => t.removeEventListener("change", o);
76
+ }, []), !!e;
74
77
  }
75
- const K = "sidebar_state", $ = F.WEEK, q = "16rem", V = "18rem", U = "3rem", D = s.createContext(null);
76
- function I() {
77
- const t = s.useContext(D);
78
- if (!t)
78
+ const we = "sidebar_state", Ce = xe.WEEK, ye = "16rem", Se = "18rem", Me = "3rem", q = f.createContext(null);
79
+ function X() {
80
+ const e = f.useContext(q);
81
+ if (!e)
79
82
  throw new Error("useSidebar must be used within a SidebarProvider.");
80
- return t;
83
+ return e;
81
84
  }
82
- function Re({
83
- defaultOpen: t = !0,
84
- open: e,
85
- onOpenChange: r,
85
+ function Ot({
86
+ defaultOpen: e = !0,
87
+ open: r,
88
+ onOpenChange: t,
86
89
  className: o,
87
- style: i,
88
- children: d,
89
- ...l
90
+ style: a,
91
+ children: i,
92
+ ...s
90
93
  }) {
91
- const u = j(), [c, b] = s.useState(!1), [f, T] = s.useState(t), m = e ?? f, w = s.useCallback(
92
- (h) => {
93
- const x = typeof h == "function" ? h(m) : h;
94
- r ? r(x) : T(x), document.cookie = `${K}=${x}; path=/; max-age=${$}`;
94
+ const l = ve(), [m, c] = f.useState(!1), [b, v] = f.useState(e), x = r ?? b, I = f.useCallback(
95
+ (C) => {
96
+ const y = typeof C == "function" ? C(x) : C;
97
+ t ? t(y) : v(y), document.cookie = `${we}=${y}; path=/; max-age=${Ce}`;
95
98
  },
96
- [r, m]
97
- ), S = s.useCallback(() => {
98
- }, []), M = m ? "expanded" : "collapsed", N = s.useMemo(
99
+ [t, x]
100
+ ), S = f.useCallback(() => {
101
+ }, []), M = x ? "expanded" : "collapsed", D = f.useMemo(
99
102
  () => ({
100
103
  state: M,
101
- open: m,
102
- setOpen: w,
103
- isMobile: u,
104
- openMobile: c,
105
- setOpenMobile: b,
104
+ open: x,
105
+ setOpen: I,
106
+ isMobile: l,
107
+ openMobile: m,
108
+ setOpenMobile: c,
106
109
  toggleSidebar: S
107
110
  }),
108
- [M, m, w, u, c, b, S]
111
+ [M, x, I, l, m, c, S]
109
112
  );
110
- return /* @__PURE__ */ a(D.Provider, { value: N, children: /* @__PURE__ */ a(k, { delayDuration: 0, children: /* @__PURE__ */ a(
113
+ return /* @__PURE__ */ n(q.Provider, { value: D, children: /* @__PURE__ */ n(ie, { delayDuration: 0, children: /* @__PURE__ */ n(
111
114
  "div",
112
115
  {
113
116
  "data-slot": "sidebar-wrapper",
114
117
  style: {
115
- "--sidebar-width": q,
116
- "--sidebar-width-icon": U,
117
- ...i
118
+ "--sidebar-width": ye,
119
+ "--sidebar-width-icon": Me,
120
+ ...a
118
121
  },
119
- className: n(
122
+ className: u(
120
123
  "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
121
124
  o
122
125
  ),
123
- ...l,
124
- children: d
126
+ ...s,
127
+ children: i
125
128
  }
126
129
  ) }) });
127
130
  }
128
- function X({
129
- side: t,
130
- openMobile: e,
131
- setOpenMobile: r,
131
+ function De({
132
+ side: e,
133
+ openMobile: r,
134
+ setOpenMobile: t,
132
135
  children: o,
133
- ...i
136
+ ...a
134
137
  }) {
135
- return /* @__PURE__ */ a(E, { open: e, onOpenChange: r, ...i, children: /* @__PURE__ */ p(
136
- z,
138
+ return /* @__PURE__ */ n(se, { open: r, onOpenChange: t, ...a, children: /* @__PURE__ */ A(
139
+ de,
137
140
  {
138
141
  "data-sidebar": "sidebar",
139
142
  "data-slot": "sidebar",
140
143
  "data-mobile": "true",
141
144
  className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
142
145
  style: {
143
- "--sidebar-width": V
146
+ "--sidebar-width": Se
144
147
  },
145
- side: t,
148
+ side: e,
146
149
  children: [
147
- /* @__PURE__ */ p(O, { className: "sr-only", children: [
148
- /* @__PURE__ */ a(R, { children: "Sidebar" }),
149
- /* @__PURE__ */ a(P, { children: "Displays the mobile sidebar." })
150
+ /* @__PURE__ */ A(le, { className: "sr-only", children: [
151
+ /* @__PURE__ */ n(ue, { children: "Sidebar" }),
152
+ /* @__PURE__ */ n(ce, { children: "Displays the mobile sidebar." })
150
153
  ] }),
151
- /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: o })
154
+ /* @__PURE__ */ n("div", { className: "flex h-full w-full flex-col", children: o })
152
155
  ]
153
156
  }
154
157
  ) });
155
158
  }
156
- function J({
157
- side: t,
158
- variant: e,
159
- collapsible: r,
159
+ function _e({
160
+ side: e,
161
+ variant: r,
162
+ collapsible: t,
160
163
  state: o,
161
- className: i,
162
- children: d,
163
- ...l
164
+ className: a,
165
+ children: i,
166
+ ...s
164
167
  }) {
165
- return /* @__PURE__ */ p(
168
+ return /* @__PURE__ */ A(
166
169
  "div",
167
170
  {
168
171
  className: "group peer text-sidebar-foreground hidden md:block",
169
172
  "data-state": o,
170
- "data-collapsible": o === "collapsed" ? r : "",
171
- "data-variant": e,
172
- "data-side": t,
173
+ "data-collapsible": o === "collapsed" ? t : "",
174
+ "data-variant": r,
175
+ "data-side": e,
173
176
  "data-slot": "sidebar",
174
177
  children: [
175
- /* @__PURE__ */ a(
178
+ /* @__PURE__ */ n(
176
179
  "div",
177
180
  {
178
181
  "data-slot": "sidebar-gap",
179
- className: n(
182
+ className: u(
180
183
  "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
181
184
  "group-data-[collapsible=offcanvas]:w-0",
182
185
  "group-data-[side=right]:rotate-180",
183
- e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
186
+ r === "floating" || r === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
184
187
  )
185
188
  }
186
189
  ),
187
- /* @__PURE__ */ a(
190
+ /* @__PURE__ */ n(
188
191
  "div",
189
192
  {
190
193
  "data-slot": "sidebar-container",
191
- className: n(
194
+ className: u(
192
195
  "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
193
- t === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
196
+ e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
194
197
  // Adjust the padding for floating and inset variants.
195
- e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
196
- i
198
+ r === "floating" || r === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
199
+ a
197
200
  ),
198
- ...l,
199
- children: /* @__PURE__ */ a(
201
+ ...s,
202
+ children: /* @__PURE__ */ n(
200
203
  "div",
201
204
  {
202
205
  "data-sidebar": "sidebar",
203
206
  "data-slot": "sidebar-inner",
204
207
  className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
205
- children: d
208
+ children: i
206
209
  }
207
210
  )
208
211
  }
@@ -211,62 +214,62 @@ function J({
211
214
  }
212
215
  );
213
216
  }
214
- function Pe({
215
- side: t = "left",
216
- variant: e = "sidebar",
217
- collapsible: r = "offcanvas",
217
+ function Rt({
218
+ side: e = "left",
219
+ variant: r = "sidebar",
220
+ collapsible: t = "offcanvas",
218
221
  className: o,
219
- children: i,
220
- ...d
222
+ children: a,
223
+ ...i
221
224
  }) {
222
- const { isMobile: l, state: u, openMobile: c, setOpenMobile: b } = I();
223
- return r === "none" ? /* @__PURE__ */ a(
225
+ const { isMobile: s, state: l, openMobile: m, setOpenMobile: c } = X();
226
+ return t === "none" ? /* @__PURE__ */ n(
224
227
  "div",
225
228
  {
226
229
  "data-slot": "sidebar",
227
- className: n(
230
+ className: u(
228
231
  "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
229
232
  o
230
233
  ),
231
- ...d,
232
- children: i
234
+ ...i,
235
+ children: a
233
236
  }
234
- ) : l ? /* @__PURE__ */ a(X, { side: t, openMobile: c, setOpenMobile: b, ...d, children: i }) : /* @__PURE__ */ a(
235
- J,
237
+ ) : s ? /* @__PURE__ */ n(De, { side: e, openMobile: m, setOpenMobile: c, ...i, children: a }) : /* @__PURE__ */ n(
238
+ _e,
236
239
  {
237
- side: t,
238
- variant: e,
239
- collapsible: r,
240
- state: u,
240
+ side: e,
241
+ variant: r,
242
+ collapsible: t,
243
+ state: l,
241
244
  className: o,
242
- ...d,
243
- children: i
245
+ ...i,
246
+ children: a
244
247
  }
245
248
  );
246
249
  }
247
- function Be({ className: t, onClick: e, ...r }) {
248
- return /* @__PURE__ */ p(
249
- L,
250
+ function Vt({ className: e, onClick: r, ...t }) {
251
+ return /* @__PURE__ */ A(
252
+ ge,
250
253
  {
251
254
  "data-sidebar": "trigger",
252
255
  "data-slot": "sidebar-trigger",
253
256
  variant: "ghost",
254
257
  size: "icon",
255
- className: n("size-7", t),
258
+ className: u("size-7", e),
256
259
  onClick: (o) => {
257
- e == null || e(o);
260
+ r == null || r(o);
258
261
  },
259
262
  disabled: !0,
260
- ...r,
263
+ ...t,
261
264
  children: [
262
- /* @__PURE__ */ a(G, {}),
263
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Toggle Sidebar" })
265
+ /* @__PURE__ */ n(be, {}),
266
+ /* @__PURE__ */ n("span", { className: "sr-only", children: "Toggle Sidebar" })
264
267
  ]
265
268
  }
266
269
  );
267
270
  }
268
- function Ge({ className: t, ...e }) {
269
- return /* @__PURE__ */ a(
271
+ function Pt({ className: e, ...r }) {
272
+ return /* @__PURE__ */ n(
270
273
  "button",
271
274
  {
272
275
  "data-sidebar": "rail",
@@ -277,176 +280,176 @@ function Ge({ className: t, ...e }) {
277
280
  },
278
281
  title: "Toggle Sidebar",
279
282
  disabled: !0,
280
- className: n(
283
+ className: u(
281
284
  "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
282
285
  "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
283
286
  "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
284
287
  "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
285
288
  "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
286
289
  "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
287
- t
290
+ e
288
291
  ),
289
- ...e
292
+ ...r
290
293
  }
291
294
  );
292
295
  }
293
- function He({ className: t, ...e }) {
294
- return /* @__PURE__ */ a(
296
+ function Bt({ className: e, ...r }) {
297
+ return /* @__PURE__ */ n(
295
298
  "main",
296
299
  {
297
300
  "data-slot": "sidebar-inset",
298
- className: n(
301
+ className: u(
299
302
  "bg-background relative flex w-full flex-1 flex-col",
300
303
  "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
301
- t
304
+ e
302
305
  ),
303
- ...e
306
+ ...r
304
307
  }
305
308
  );
306
309
  }
307
- function Le({ className: t, ...e }) {
308
- return /* @__PURE__ */ a(
309
- H,
310
+ function Lt({ className: e, ...r }) {
311
+ return /* @__PURE__ */ n(
312
+ pe,
310
313
  {
311
314
  "data-slot": "sidebar-input",
312
315
  "data-sidebar": "input",
313
- className: n("bg-background h-10 w-full shadow-none", t),
314
- ...e
316
+ className: u("bg-background h-10 w-full shadow-none", e),
317
+ ...r
315
318
  }
316
319
  );
317
320
  }
318
- function We({ className: t, ...e }) {
319
- return /* @__PURE__ */ a(
321
+ function zt({ className: e, ...r }) {
322
+ return /* @__PURE__ */ n(
320
323
  "div",
321
324
  {
322
325
  "data-slot": "sidebar-header",
323
326
  "data-sidebar": "header",
324
- className: n("flex flex-col gap-3 p-2", t),
325
- ...e
327
+ className: u("flex flex-col gap-3 p-2", e),
328
+ ...r
326
329
  }
327
330
  );
328
331
  }
329
- function Fe({ className: t, ...e }) {
330
- return /* @__PURE__ */ a(
332
+ function Gt({ className: e, ...r }) {
333
+ return /* @__PURE__ */ n(
331
334
  "div",
332
335
  {
333
336
  "data-slot": "sidebar-footer",
334
337
  "data-sidebar": "footer",
335
- className: n("flex flex-col gap-3 p-2", t),
336
- ...e
338
+ className: u("flex flex-col gap-3 p-2", e),
339
+ ...r
337
340
  }
338
341
  );
339
342
  }
340
- function je({ className: t, ...e }) {
341
- return /* @__PURE__ */ a(
342
- W,
343
+ function Ht({ className: e, ...r }) {
344
+ return /* @__PURE__ */ n(
345
+ he,
343
346
  {
344
347
  "data-slot": "sidebar-separator",
345
348
  "data-sidebar": "separator",
346
- className: n("bg-sidebar-border mx-2 w-auto", t),
347
- ...e
349
+ className: u("bg-sidebar-border mx-2 w-auto", e),
350
+ ...r
348
351
  }
349
352
  );
350
353
  }
351
- function Ke({ className: t, ...e }) {
352
- return /* @__PURE__ */ a(
354
+ function Wt({ className: e, ...r }) {
355
+ return /* @__PURE__ */ n(
353
356
  "div",
354
357
  {
355
358
  "data-slot": "sidebar-content",
356
359
  "data-sidebar": "content",
357
- className: n(
360
+ className: u(
358
361
  "flex min-h-0 flex-1 flex-col gap-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
359
- t
362
+ e
360
363
  ),
361
- ...e
364
+ ...r
362
365
  }
363
366
  );
364
367
  }
365
- function $e({ className: t, ...e }) {
366
- return /* @__PURE__ */ a(
368
+ function $t({ className: e, ...r }) {
369
+ return /* @__PURE__ */ n(
367
370
  "div",
368
371
  {
369
372
  "data-slot": "sidebar-group",
370
373
  "data-sidebar": "group",
371
- className: n("relative flex w-full min-w-0 flex-col p-2", t),
372
- ...e
374
+ className: u("relative flex w-full min-w-0 flex-col p-2", e),
375
+ ...r
373
376
  }
374
377
  );
375
378
  }
376
- function qe({
377
- className: t,
378
- asChild: e = !1,
379
- ...r
379
+ function Ut({
380
+ className: e,
381
+ asChild: r = !1,
382
+ ...t
380
383
  }) {
381
- return /* @__PURE__ */ a(
382
- e ? g : "div",
384
+ return /* @__PURE__ */ n(
385
+ r ? F : "div",
383
386
  {
384
387
  "data-slot": "sidebar-group-label",
385
388
  "data-sidebar": "group-label",
386
- className: n(
389
+ className: u(
387
390
  "text-sidebar-foreground/70 ring-sidebar-ring flex h-10 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
388
391
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
389
- t
392
+ e
390
393
  ),
391
- ...r
394
+ ...t
392
395
  }
393
396
  );
394
397
  }
395
- function Ve({
396
- className: t,
397
- asChild: e = !1,
398
- ...r
398
+ function Kt({
399
+ className: e,
400
+ asChild: r = !1,
401
+ ...t
399
402
  }) {
400
- return /* @__PURE__ */ a(
401
- e ? g : "button",
403
+ return /* @__PURE__ */ n(
404
+ r ? F : "button",
402
405
  {
403
406
  "data-slot": "sidebar-group-action",
404
407
  "data-sidebar": "group-action",
405
- className: n(
408
+ className: u(
406
409
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
407
410
  // Increases the hit area of the button on mobile.
408
411
  "after:absolute after:-inset-2 md:after:hidden",
409
412
  "group-data-[collapsible=icon]:hidden",
410
- t
413
+ e
411
414
  ),
412
- ...r
415
+ ...t
413
416
  }
414
417
  );
415
418
  }
416
- function Ue({ className: t, ...e }) {
417
- return /* @__PURE__ */ a(
419
+ function qt({ className: e, ...r }) {
420
+ return /* @__PURE__ */ n(
418
421
  "div",
419
422
  {
420
423
  "data-slot": "sidebar-group-content",
421
424
  "data-sidebar": "group-content",
422
- className: n("w-full text-sm", t),
423
- ...e
425
+ className: u("w-full text-sm", e),
426
+ ...r
424
427
  }
425
428
  );
426
429
  }
427
- function Xe({ className: t, ...e }) {
428
- return /* @__PURE__ */ a(
430
+ function Xt({ className: e, ...r }) {
431
+ return /* @__PURE__ */ n(
429
432
  "ul",
430
433
  {
431
434
  "data-slot": "sidebar-menu",
432
435
  "data-sidebar": "menu",
433
- className: n("flex w-full min-w-0 flex-col gap-1", t),
434
- ...e
436
+ className: u("flex w-full min-w-0 flex-col gap-1", e),
437
+ ...r
435
438
  }
436
439
  );
437
440
  }
438
- function Je({ className: t, ...e }) {
439
- return /* @__PURE__ */ a(
441
+ function Jt({ className: e, ...r }) {
442
+ return /* @__PURE__ */ n(
440
443
  "li",
441
444
  {
442
445
  "data-slot": "sidebar-menu-item",
443
446
  "data-sidebar": "menu-item",
444
- className: n("group/menu-item relative", t),
445
- ...e
447
+ className: u("group/menu-item relative", e),
448
+ ...r
446
449
  }
447
450
  );
448
451
  }
449
- const Q = B(
452
+ const Ie = me(
450
453
  "peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-md p-2 text-left text-sm font-medium outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
451
454
  {
452
455
  variants: {
@@ -466,53 +469,53 @@ const Q = B(
466
469
  }
467
470
  }
468
471
  );
469
- function Qe({
470
- asChild: t = !1,
471
- isActive: e = !1,
472
- variant: r = "default",
472
+ function Qt({
473
+ asChild: e = !1,
474
+ isActive: r = !1,
475
+ variant: t = "default",
473
476
  size: o = "default",
474
- tooltip: i,
475
- className: d,
476
- ...l
477
+ tooltip: a,
478
+ className: i,
479
+ ...s
477
480
  }) {
478
- const u = t ? g : "button", { isMobile: c, state: b } = I(), f = /* @__PURE__ */ a(
479
- u,
481
+ const l = e ? F : "button", { isMobile: m, state: c } = X(), b = /* @__PURE__ */ n(
482
+ l,
480
483
  {
481
484
  "data-slot": "sidebar-menu-button",
482
485
  "data-sidebar": "menu-button",
483
486
  "data-size": o,
484
- "data-active": e,
485
- className: n(Q({ variant: r, size: o }), d),
486
- ...l
487
+ "data-active": r,
488
+ className: u(Ie({ variant: t, size: o }), i),
489
+ ...s
487
490
  }
488
491
  );
489
- return i ? (typeof i == "string" && (i = {
490
- children: i
491
- }), /* @__PURE__ */ p(A, { children: [
492
- /* @__PURE__ */ a(y, { asChild: !0, children: f }),
493
- /* @__PURE__ */ a(
494
- _,
492
+ return a ? (typeof a == "string" && (a = {
493
+ children: a
494
+ }), /* @__PURE__ */ A(ae, { children: [
495
+ /* @__PURE__ */ n(oe, { asChild: !0, children: b }),
496
+ /* @__PURE__ */ n(
497
+ ne,
495
498
  {
496
499
  side: "right",
497
500
  align: "center",
498
- hidden: b !== "collapsed" || c,
499
- ...i
501
+ hidden: c !== "collapsed" || m,
502
+ ...a
500
503
  }
501
504
  )
502
- ] })) : f;
505
+ ] })) : b;
503
506
  }
504
- function Ye({
505
- className: t,
506
- asChild: e = !1,
507
- showOnHover: r = !1,
507
+ function Yt({
508
+ className: e,
509
+ asChild: r = !1,
510
+ showOnHover: t = !1,
508
511
  ...o
509
512
  }) {
510
- return /* @__PURE__ */ a(
511
- e ? g : "button",
513
+ return /* @__PURE__ */ n(
514
+ r ? F : "button",
512
515
  {
513
516
  "data-slot": "sidebar-menu-action",
514
517
  "data-sidebar": "menu-action",
515
- className: n(
518
+ className: u(
516
519
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
517
520
  // Increases the hit area of the button on mobile.
518
521
  "after:absolute after:-inset-2 md:after:hidden",
@@ -520,50 +523,50 @@ function Ye({
520
523
  "peer-data-[size=default]/menu-button:top-1.5",
521
524
  "peer-data-[size=lg]/menu-button:top-2.5",
522
525
  "group-data-[collapsible=icon]:hidden",
523
- r && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
524
- t
526
+ t && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
527
+ e
525
528
  ),
526
529
  ...o
527
530
  }
528
531
  );
529
532
  }
530
- function Ze({ className: t, ...e }) {
531
- return /* @__PURE__ */ a(
533
+ function Zt({ className: e, ...r }) {
534
+ return /* @__PURE__ */ n(
532
535
  "div",
533
536
  {
534
537
  "data-slot": "sidebar-menu-badge",
535
538
  "data-sidebar": "menu-badge",
536
- className: n(
539
+ className: u(
537
540
  "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
538
541
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
539
542
  "peer-data-[size=sm]/menu-button:top-1",
540
543
  "peer-data-[size=default]/menu-button:top-1.5",
541
544
  "peer-data-[size=lg]/menu-button:top-2.5",
542
545
  "group-data-[collapsible=icon]:hidden",
543
- t
546
+ e
544
547
  ),
545
- ...e
548
+ ...r
546
549
  }
547
550
  );
548
551
  }
549
- const Y = 50, Z = 40;
550
- function et({
551
- className: t,
552
- showIcon: e = !1,
553
- ...r
552
+ const Ne = 50, Ae = 40;
553
+ function jt({
554
+ className: e,
555
+ showIcon: r = !1,
556
+ ...t
554
557
  }) {
555
- const o = s.useMemo(() => `${Math.floor(Math.random() * Z) + Y}%`, []);
556
- return /* @__PURE__ */ p(
558
+ const o = f.useMemo(() => `${Math.floor(Math.random() * Ae) + Ne}%`, []);
559
+ return /* @__PURE__ */ A(
557
560
  "div",
558
561
  {
559
562
  "data-slot": "sidebar-menu-skeleton",
560
563
  "data-sidebar": "menu-skeleton",
561
- className: n("flex h-10 items-center gap-3 rounded-md px-2", t),
562
- ...r,
564
+ className: u("flex h-10 items-center gap-3 rounded-md px-2", e),
565
+ ...t,
563
566
  children: [
564
- e && /* @__PURE__ */ a(C, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
565
- /* @__PURE__ */ a(
566
- C,
567
+ r && /* @__PURE__ */ n(G, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
568
+ /* @__PURE__ */ n(
569
+ G,
567
570
  {
568
571
  className: "h-4 max-w-(--skeleton-width) flex-1",
569
572
  "data-sidebar": "menu-skeleton-text",
@@ -576,221 +579,552 @@ function et({
576
579
  }
577
580
  );
578
581
  }
579
- function tt({ className: t, ...e }) {
580
- return /* @__PURE__ */ a(
582
+ function er({ className: e, ...r }) {
583
+ return /* @__PURE__ */ n(
581
584
  "ul",
582
585
  {
583
586
  "data-slot": "sidebar-menu-sub",
584
587
  "data-sidebar": "menu-sub",
585
- className: n(
588
+ className: u(
586
589
  "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
587
590
  "group-data-[collapsible=icon]:hidden",
588
- t
591
+ e
589
592
  ),
590
- ...e
593
+ ...r
591
594
  }
592
595
  );
593
596
  }
594
- function at({ className: t, ...e }) {
595
- return /* @__PURE__ */ a(
597
+ function tr({ className: e, ...r }) {
598
+ return /* @__PURE__ */ n(
596
599
  "li",
597
600
  {
598
601
  "data-slot": "sidebar-menu-sub-item",
599
602
  "data-sidebar": "menu-sub-item",
600
- className: n("group/menu-sub-item relative", t),
601
- ...e
603
+ className: u("group/menu-sub-item relative", e),
604
+ ...r
602
605
  }
603
606
  );
604
607
  }
605
- function rt({
606
- asChild: t = !1,
607
- size: e = "md",
608
- isActive: r = !1,
608
+ function rr({
609
+ asChild: e = !1,
610
+ size: r = "md",
611
+ isActive: t = !1,
609
612
  className: o,
610
- ...i
613
+ ...a
611
614
  }) {
612
- return /* @__PURE__ */ a(
613
- t ? g : "a",
615
+ return /* @__PURE__ */ n(
616
+ e ? F : "a",
614
617
  {
615
618
  "data-slot": "sidebar-menu-sub-button",
616
619
  "data-sidebar": "menu-sub-button",
617
- "data-size": e,
618
- "data-active": r,
619
- className: n(
620
+ "data-size": r,
621
+ "data-active": t,
622
+ className: u(
620
623
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-tertiary-foreground flex h-7 min-w-0 -translate-x-px items-center gap-3 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0",
621
624
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
622
- e === "sm" && "text-xs",
623
- e === "md" && "text-sm",
625
+ r === "sm" && "text-xs",
626
+ r === "md" && "text-sm",
624
627
  "group-data-[collapsible=icon]:hidden",
625
628
  o
626
629
  ),
627
- ...i
630
+ ...a
628
631
  }
629
632
  );
630
633
  }
634
+ var Fe = (e) => e.type === "checkbox", T = (e) => e instanceof Date, L = (e) => e == null;
635
+ const J = (e) => typeof e == "object";
636
+ var N = (e) => !L(e) && !Array.isArray(e) && J(e) && !T(e), Te = (e) => N(e) && e.target ? Fe(e.target) ? e.target.checked : e.target.value : e, ke = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ee = (e, r) => e.has(ke(r)), Oe = (e) => {
637
+ const r = e.constructor && e.constructor.prototype;
638
+ return N(r) && r.hasOwnProperty("isPrototypeOf");
639
+ }, Re = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
640
+ function Q(e) {
641
+ let r;
642
+ const t = Array.isArray(e), o = typeof FileList < "u" ? e instanceof FileList : !1;
643
+ if (e instanceof Date)
644
+ r = new Date(e);
645
+ else if (!(Re && (e instanceof Blob || o)) && (t || N(e)))
646
+ if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Oe(e))
647
+ r = e;
648
+ else
649
+ for (const a in e)
650
+ e.hasOwnProperty(a) && (r[a] = Q(e[a]));
651
+ else
652
+ return e;
653
+ return r;
654
+ }
655
+ var Y = (e) => /^\w*$/.test(e), B = (e) => e === void 0, Ve = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Z = (e) => Ve(e.replace(/["|']|\]/g, "").split(/\.|\[/)), h = (e, r, t) => {
656
+ if (!r || !N(e))
657
+ return t;
658
+ const o = (Y(r) ? [r] : Z(r)).reduce((a, i) => L(a) ? a : a[i], e);
659
+ return B(o) || o === e ? B(e[r]) ? t : e[r] : o;
660
+ }, P = (e) => typeof e == "boolean", H = (e, r, t) => {
661
+ let o = -1;
662
+ const a = Y(r) ? [r] : Z(r), i = a.length, s = i - 1;
663
+ for (; ++o < i; ) {
664
+ const l = a[o];
665
+ let m = t;
666
+ if (o !== s) {
667
+ const c = e[l];
668
+ m = N(c) || Array.isArray(c) ? c : isNaN(+a[o + 1]) ? {} : [];
669
+ }
670
+ if (l === "__proto__" || l === "constructor" || l === "prototype")
671
+ return;
672
+ e[l] = m, e = e[l];
673
+ }
674
+ };
675
+ const W = {
676
+ BLUR: "blur",
677
+ CHANGE: "change"
678
+ }, $ = {
679
+ all: "all"
680
+ }, z = d.createContext(null);
681
+ z.displayName = "HookFormContext";
682
+ const E = () => d.useContext(z), Pe = (e) => {
683
+ const { children: r, ...t } = e;
684
+ return d.createElement(z.Provider, { value: t }, r);
685
+ };
686
+ var Be = (e, r, t, o = !0) => {
687
+ const a = {
688
+ defaultValues: r._defaultValues
689
+ };
690
+ for (const i in e)
691
+ Object.defineProperty(a, i, {
692
+ get: () => {
693
+ const s = i;
694
+ return r._proxyFormState[s] !== $.all && (r._proxyFormState[s] = !o || $.all), t && (t[s] = !0), e[s];
695
+ }
696
+ });
697
+ return a;
698
+ };
699
+ const j = typeof window < "u" ? d.useLayoutEffect : d.useEffect;
700
+ function Le(e) {
701
+ const r = E(), { control: t = r.control, disabled: o, name: a, exact: i } = e || {}, [s, l] = d.useState(t._formState), m = d.useRef({
702
+ isDirty: !1,
703
+ isLoading: !1,
704
+ dirtyFields: !1,
705
+ touchedFields: !1,
706
+ validatingFields: !1,
707
+ isValidating: !1,
708
+ isValid: !1,
709
+ errors: !1
710
+ });
711
+ return j(() => t._subscribe({
712
+ name: a,
713
+ formState: m.current,
714
+ exact: i,
715
+ callback: (c) => {
716
+ !o && l({
717
+ ...t._formState,
718
+ ...c
719
+ });
720
+ }
721
+ }), [a, o, i]), d.useEffect(() => {
722
+ m.current.isValid && t._setValid(!0);
723
+ }, [t]), d.useMemo(() => Be(s, t, m.current, !1), [s, t]);
724
+ }
725
+ var ze = (e) => typeof e == "string", U = (e, r, t, o, a) => ze(e) ? h(t, e, a) : Array.isArray(e) ? e.map((i) => h(t, i)) : t, K = (e) => L(e) || !J(e);
726
+ function k(e, r, t = /* @__PURE__ */ new WeakSet()) {
727
+ if (K(e) || K(r))
728
+ return e === r;
729
+ if (T(e) && T(r))
730
+ return e.getTime() === r.getTime();
731
+ const o = Object.keys(e), a = Object.keys(r);
732
+ if (o.length !== a.length)
733
+ return !1;
734
+ if (t.has(e) || t.has(r))
735
+ return !0;
736
+ t.add(e), t.add(r);
737
+ for (const i of o) {
738
+ const s = e[i];
739
+ if (!a.includes(i))
740
+ return !1;
741
+ if (i !== "ref") {
742
+ const l = r[i];
743
+ if (T(s) && T(l) || N(s) && N(l) || Array.isArray(s) && Array.isArray(l) ? !k(s, l, t) : s !== l)
744
+ return !1;
745
+ }
746
+ }
747
+ return !0;
748
+ }
749
+ function Ge(e) {
750
+ const r = E(), { control: t = r.control, name: o, defaultValue: a, disabled: i, exact: s, compute: l } = e || {}, m = d.useRef(a), c = d.useRef(l), b = d.useRef(void 0), v = d.useRef(t), x = d.useRef(o);
751
+ c.current = l;
752
+ const [I, S] = d.useState(() => {
753
+ const p = t._getWatch(o, m.current);
754
+ return c.current ? c.current(p) : p;
755
+ }), M = d.useCallback((p) => {
756
+ const w = U(o, t._names, p || t._formValues, !1, m.current);
757
+ return c.current ? c.current(w) : w;
758
+ }, [t._formValues, t._names, o]), D = d.useCallback((p) => {
759
+ if (!i) {
760
+ const w = U(o, t._names, p || t._formValues, !1, m.current);
761
+ if (c.current) {
762
+ const _ = c.current(w);
763
+ k(_, b.current) || (S(_), b.current = _);
764
+ } else
765
+ S(w);
766
+ }
767
+ }, [t._formValues, t._names, i, o]);
768
+ j(() => ((v.current !== t || !k(x.current, o)) && (v.current = t, x.current = o, D()), t._subscribe({
769
+ name: o,
770
+ formState: {
771
+ values: !0
772
+ },
773
+ exact: s,
774
+ callback: (p) => {
775
+ D(p.values);
776
+ }
777
+ })), [t, s, o, D]), d.useEffect(() => t._removeUnmounted());
778
+ const C = v.current !== t, y = x.current, g = d.useMemo(() => {
779
+ if (i)
780
+ return null;
781
+ const p = !C && !k(y, o);
782
+ return C || p ? M() : null;
783
+ }, [i, C, o, y, M]);
784
+ return g !== null ? g : I;
785
+ }
786
+ function He(e) {
787
+ const r = E(), { name: t, disabled: o, control: a = r.control, shouldUnregister: i, defaultValue: s } = e, l = Ee(a._names.array, t), m = d.useMemo(() => h(a._formValues, t, h(a._defaultValues, t, s)), [a, t, s]), c = Ge({
788
+ control: a,
789
+ name: t,
790
+ defaultValue: m,
791
+ exact: !0
792
+ }), b = Le({
793
+ control: a,
794
+ name: t,
795
+ exact: !0
796
+ }), v = d.useRef(e), x = d.useRef(void 0), I = d.useRef(a.register(t, {
797
+ ...e.rules,
798
+ value: c,
799
+ ...P(e.disabled) ? { disabled: e.disabled } : {}
800
+ }));
801
+ v.current = e;
802
+ const S = d.useMemo(() => Object.defineProperties({}, {
803
+ invalid: {
804
+ enumerable: !0,
805
+ get: () => !!h(b.errors, t)
806
+ },
807
+ isDirty: {
808
+ enumerable: !0,
809
+ get: () => !!h(b.dirtyFields, t)
810
+ },
811
+ isTouched: {
812
+ enumerable: !0,
813
+ get: () => !!h(b.touchedFields, t)
814
+ },
815
+ isValidating: {
816
+ enumerable: !0,
817
+ get: () => !!h(b.validatingFields, t)
818
+ },
819
+ error: {
820
+ enumerable: !0,
821
+ get: () => h(b.errors, t)
822
+ }
823
+ }), [b, t]), M = d.useCallback((g) => I.current.onChange({
824
+ target: {
825
+ value: Te(g),
826
+ name: t
827
+ },
828
+ type: W.CHANGE
829
+ }), [t]), D = d.useCallback(() => I.current.onBlur({
830
+ target: {
831
+ value: h(a._formValues, t),
832
+ name: t
833
+ },
834
+ type: W.BLUR
835
+ }), [t, a._formValues]), C = d.useCallback((g) => {
836
+ const p = h(a._fields, t);
837
+ p && g && (p._f.ref = {
838
+ focus: () => g.focus && g.focus(),
839
+ select: () => g.select && g.select(),
840
+ setCustomValidity: (w) => g.setCustomValidity(w),
841
+ reportValidity: () => g.reportValidity()
842
+ });
843
+ }, [a._fields, t]), y = d.useMemo(() => ({
844
+ name: t,
845
+ value: c,
846
+ ...P(o) || b.disabled ? { disabled: b.disabled || o } : {},
847
+ onChange: M,
848
+ onBlur: D,
849
+ ref: C
850
+ }), [t, o, b.disabled, M, D, C, c]);
851
+ return d.useEffect(() => {
852
+ const g = a._options.shouldUnregister || i, p = x.current;
853
+ p && p !== t && !l && a.unregister(p), a.register(t, {
854
+ ...v.current.rules,
855
+ ...P(v.current.disabled) ? { disabled: v.current.disabled } : {}
856
+ });
857
+ const w = (_, re) => {
858
+ const R = h(a._fields, _);
859
+ R && R._f && (R._f.mount = re);
860
+ };
861
+ if (w(t, !0), g) {
862
+ const _ = Q(h(a._options.defaultValues, t, v.current.defaultValue));
863
+ H(a._defaultValues, t, _), B(h(a._formValues, t)) && H(a._formValues, t, _);
864
+ }
865
+ return !l && a.register(t), x.current = t, () => {
866
+ (l ? g && !a._state.action : g) ? a.unregister(t) : w(t, !1);
867
+ };
868
+ }, [t, a, l, i]), d.useEffect(() => {
869
+ a._setDisabledField({
870
+ disabled: o,
871
+ name: t
872
+ });
873
+ }, [o, t, a]), d.useMemo(() => ({
874
+ field: y,
875
+ formState: b,
876
+ fieldState: S
877
+ }), [y, b, S]);
878
+ }
879
+ const We = (e) => e.render(He(e)), ar = Pe, ee = f.createContext(null), or = ({
880
+ ...e
881
+ }) => /* @__PURE__ */ n(ee.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(We, { ...e }) }), O = () => {
882
+ const e = f.useContext(ee), r = f.useContext(te), { getFieldState: t, formState: o } = E();
883
+ if (!e)
884
+ throw new Error("useFormField should be used within <FormField>");
885
+ if (!r)
886
+ throw new Error("useFormField should be used within <FormItem>");
887
+ const a = t(e.name, o), { id: i } = r;
888
+ return {
889
+ id: i,
890
+ name: e.name,
891
+ formItemId: `${i}-form-item`,
892
+ formDescriptionId: `${i}-form-item-description`,
893
+ formMessageId: `${i}-form-item-message`,
894
+ ...a
895
+ };
896
+ }, te = f.createContext(null), $e = f.forwardRef(
897
+ ({ className: e, ...r }, t) => {
898
+ const o = f.useId();
899
+ return /* @__PURE__ */ n(te.Provider, { value: { id: o }, children: /* @__PURE__ */ n("div", { ref: t, className: u("space-y-2", e), ...r }) });
900
+ }
901
+ );
902
+ $e.displayName = "FormItem";
903
+ const Ue = f.forwardRef(({ className: e, ...r }, t) => {
904
+ const { error: o, formItemId: a } = O();
905
+ return /* @__PURE__ */ n(
906
+ fe,
907
+ {
908
+ ref: t,
909
+ className: u(o && "text-destructive", e),
910
+ htmlFor: a,
911
+ ...r
912
+ }
913
+ );
914
+ });
915
+ Ue.displayName = "FormLabel";
916
+ const Ke = f.forwardRef(({ ...e }, r) => {
917
+ const { error: t, formItemId: o, formDescriptionId: a, formMessageId: i } = O();
918
+ return /* @__PURE__ */ n(
919
+ F,
920
+ {
921
+ ref: r,
922
+ id: o,
923
+ "aria-describedby": t ? `${a} ${i}` : `${a}`,
924
+ "aria-invalid": !!t,
925
+ ...e
926
+ }
927
+ );
928
+ });
929
+ Ke.displayName = "FormControl";
930
+ const qe = f.forwardRef(({ className: e, ...r }, t) => {
931
+ const { formDescriptionId: o } = O();
932
+ return /* @__PURE__ */ n(
933
+ "p",
934
+ {
935
+ ref: t,
936
+ id: o,
937
+ className: u("text-[0.8rem] text-muted-foreground", e),
938
+ ...r
939
+ }
940
+ );
941
+ });
942
+ qe.displayName = "FormDescription";
943
+ const Xe = f.forwardRef(({ className: e, children: r, ...t }, o) => {
944
+ const { error: a, formMessageId: i } = O(), s = a ? String((a == null ? void 0 : a.message) ?? "") : r;
945
+ return s ? /* @__PURE__ */ n(
946
+ "p",
947
+ {
948
+ ref: o,
949
+ id: i,
950
+ className: u("font-medium text-[0.8rem] text-destructive", e),
951
+ ...t,
952
+ children: s
953
+ }
954
+ ) : null;
955
+ });
956
+ Xe.displayName = "FormMessage";
631
957
  export {
632
- Lt as Accordion,
633
- Wt as AccordionContent,
634
- Ft as AccordionItem,
635
- jt as AccordionTrigger,
636
- st as AlertDialog,
637
- lt as AlertDialogAction,
638
- ut as AlertDialogCancel,
639
- ct as AlertDialogContent,
640
- bt as AlertDialogDescription,
641
- pt as AlertDialogFooter,
642
- mt as AlertDialogHeader,
643
- gt as AlertDialogOverlay,
644
- ft as AlertDialogPortal,
645
- ht as AlertDialogTitle,
646
- xt as AlertDialogTrigger,
647
- $t as Avatar,
648
- qt as AvatarFallback,
649
- Vt as AvatarImage,
650
- wt as Calendar,
651
- St as CalendarDayButton,
652
- Ct as Carousel,
653
- Dt as CarouselContent,
654
- It as CarouselItem,
655
- Tt as CarouselNext,
656
- Nt as CarouselPrevious,
657
- Xt as Checkbox,
658
- yt as Combobox,
958
+ Gr as Accordion,
959
+ Hr as AccordionContent,
960
+ Wr as AccordionItem,
961
+ $r as AccordionTrigger,
962
+ lr as AlertDialog,
963
+ ur as AlertDialogAction,
964
+ cr as AlertDialogCancel,
965
+ fr as AlertDialogContent,
966
+ mr as AlertDialogDescription,
967
+ br as AlertDialogFooter,
968
+ pr as AlertDialogHeader,
969
+ gr as AlertDialogOverlay,
970
+ hr as AlertDialogPortal,
971
+ xr as AlertDialogTitle,
972
+ vr as AlertDialogTrigger,
973
+ Kr as Avatar,
974
+ qr as AvatarFallback,
975
+ Xr as AvatarImage,
976
+ Cr as Calendar,
977
+ yr as CalendarDayButton,
978
+ Mr as Carousel,
979
+ Dr as CarouselContent,
980
+ _r as CarouselItem,
981
+ Ir as CarouselNext,
982
+ Nr as CarouselPrevious,
983
+ Qr as Checkbox,
984
+ Fr as Combobox,
659
985
  qa as Command,
660
- Va as CommandDialog,
661
- Ua as CommandEmpty,
662
- Xa as CommandGroup,
663
- Ja as CommandInput,
664
- Qa as CommandItem,
665
- Ya as CommandList,
666
- Za as CommandSeparator,
667
- er as CommandShortcut,
668
- Qt as ContextMenu,
669
- Yt as ContextMenuCheckboxItem,
670
- Zt as ContextMenuContent,
671
- ea as ContextMenuGroup,
672
- ta as ContextMenuItem,
986
+ Xa as CommandDialog,
987
+ Ja as CommandEmpty,
988
+ Qa as CommandGroup,
989
+ Ya as CommandInput,
990
+ Za as CommandItem,
991
+ ja as CommandList,
992
+ eo as CommandSeparator,
993
+ to as CommandShortcut,
994
+ Zr as ContextMenu,
995
+ jr as ContextMenuCheckboxItem,
996
+ ea as ContextMenuContent,
997
+ ta as ContextMenuGroup,
998
+ ra as ContextMenuItem,
673
999
  aa as ContextMenuLabel,
674
- ra as ContextMenuPortal,
675
- oa as ContextMenuRadioGroup,
676
- na as ContextMenuRadioItem,
677
- ia as ContextMenuSeparator,
1000
+ oa as ContextMenuPortal,
1001
+ na as ContextMenuRadioGroup,
1002
+ ia as ContextMenuRadioItem,
1003
+ sa as ContextMenuSeparator,
678
1004
  da as ContextMenuShortcut,
679
- sa as ContextMenuSub,
680
- la as ContextMenuSubContent,
681
- ua as ContextMenuSubTrigger,
682
- ca as ContextMenuTrigger,
683
- ar as Dialog,
684
- rr as DialogClose,
685
- or as DialogContent,
686
- nr as DialogDescription,
687
- ir as DialogFooter,
688
- dr as DialogHeader,
689
- sr as DialogOverlay,
690
- lr as DialogPortal,
691
- ur as DialogTitle,
692
- cr as DialogTrigger,
693
- pr as Drawer,
694
- mr as DrawerClose,
695
- gr as DrawerContent,
696
- fr as DrawerDescription,
697
- hr as DrawerFooter,
698
- xr as DrawerHeader,
699
- vr as DrawerOverlay,
700
- wr as DrawerPortal,
701
- Sr as DrawerTitle,
702
- Mr as DrawerTrigger,
703
- pa as DropdownMenu,
704
- ma as DropdownMenuCheckboxItem,
1005
+ la as ContextMenuSub,
1006
+ ua as ContextMenuSubContent,
1007
+ ca as ContextMenuSubTrigger,
1008
+ fa as ContextMenuTrigger,
1009
+ ao as Dialog,
1010
+ oo as DialogClose,
1011
+ no as DialogContent,
1012
+ io as DialogDescription,
1013
+ so as DialogFooter,
1014
+ lo as DialogHeader,
1015
+ uo as DialogOverlay,
1016
+ co as DialogPortal,
1017
+ fo as DialogTitle,
1018
+ mo as DialogTrigger,
1019
+ po as Drawer,
1020
+ go as DrawerClose,
1021
+ ho as DrawerContent,
1022
+ xo as DrawerDescription,
1023
+ vo as DrawerFooter,
1024
+ wo as DrawerHeader,
1025
+ Co as DrawerOverlay,
1026
+ yo as DrawerPortal,
1027
+ So as DrawerTitle,
1028
+ Mo as DrawerTrigger,
1029
+ ba as DropdownMenu,
1030
+ pa as DropdownMenuCheckboxItem,
705
1031
  ga as DropdownMenuContent,
706
- fa as DropdownMenuGroup,
707
- ha as DropdownMenuItem,
708
- xa as DropdownMenuLabel,
709
- va as DropdownMenuPortal,
710
- wa as DropdownMenuRadioGroup,
711
- Sa as DropdownMenuRadioItem,
712
- Ma as DropdownMenuSeparator,
713
- Ca as DropdownMenuShortcut,
1032
+ ha as DropdownMenuGroup,
1033
+ xa as DropdownMenuItem,
1034
+ va as DropdownMenuLabel,
1035
+ wa as DropdownMenuPortal,
1036
+ Ca as DropdownMenuRadioGroup,
1037
+ ya as DropdownMenuRadioItem,
1038
+ Sa as DropdownMenuSeparator,
1039
+ Ma as DropdownMenuShortcut,
714
1040
  Da as DropdownMenuSub,
715
- Ia as DropdownMenuSubContent,
716
- Ta as DropdownMenuSubTrigger,
1041
+ _a as DropdownMenuSubContent,
1042
+ Ia as DropdownMenuSubTrigger,
717
1043
  Na as DropdownMenuTrigger,
718
- ya as HoverCard,
719
- _a as HoverCardContent,
1044
+ ar as Form,
1045
+ Ke as FormControl,
1046
+ qe as FormDescription,
1047
+ or as FormField,
1048
+ $e as FormItem,
1049
+ Ue as FormLabel,
1050
+ Xe as FormMessage,
1051
+ Fa as HoverCard,
1052
+ Ta as HoverCardContent,
720
1053
  ka as HoverCardTrigger,
721
- kt as InputOTP,
722
- Et as InputOTPGroup,
723
- zt as InputOTPSeparator,
724
- Ot as InputOTPSlot,
725
- Er as Label,
726
- Or as Menubar,
727
- Rr as MenubarCheckboxItem,
728
- Pr as MenubarContent,
729
- Br as MenubarGroup,
730
- Gr as MenubarItem,
731
- Hr as MenubarLabel,
732
- Lr as MenubarMenu,
733
- Wr as MenubarPortal,
734
- Fr as MenubarRadioGroup,
735
- jr as MenubarRadioItem,
736
- Kr as MenubarSeparator,
737
- $r as MenubarShortcut,
738
- qr as MenubarSub,
739
- Vr as MenubarSubContent,
740
- Ur as MenubarSubTrigger,
741
- Xr as MenubarTrigger,
742
- Qr as Popover,
743
- Yr as PopoverAnchor,
744
- Zr as PopoverContent,
745
- eo as PopoverTrigger,
746
- Gt as Progress,
747
- za as RadioGroup,
748
- Oa as RadioGroupItem,
1054
+ kr as InputOTP,
1055
+ Er as InputOTPGroup,
1056
+ Or as InputOTPSeparator,
1057
+ Rr as InputOTPSlot,
1058
+ fe as Label,
1059
+ Oo as Menubar,
1060
+ Ro as MenubarCheckboxItem,
1061
+ Vo as MenubarContent,
1062
+ Po as MenubarGroup,
1063
+ Bo as MenubarItem,
1064
+ Lo as MenubarLabel,
1065
+ zo as MenubarMenu,
1066
+ Go as MenubarPortal,
1067
+ Ho as MenubarRadioGroup,
1068
+ Wo as MenubarRadioItem,
1069
+ $o as MenubarSeparator,
1070
+ Uo as MenubarShortcut,
1071
+ Ko as MenubarSub,
1072
+ qo as MenubarSubContent,
1073
+ Xo as MenubarSubTrigger,
1074
+ Jo as MenubarTrigger,
1075
+ Yo as Popover,
1076
+ Zo as PopoverAnchor,
1077
+ jo as PopoverContent,
1078
+ en as PopoverTrigger,
1079
+ Lr as Progress,
1080
+ Oa as RadioGroup,
1081
+ Ra as RadioGroupItem,
749
1082
  Pa as ScrollArea,
750
1083
  Ba as ScrollBar,
751
- E as Sheet,
752
- Dr as SheetClose,
753
- z as SheetContent,
754
- P as SheetDescription,
755
- Ir as SheetFooter,
756
- O as SheetHeader,
757
- R as SheetTitle,
758
- Tr as SheetTrigger,
759
- Pe as Sidebar,
760
- Ke as SidebarContent,
761
- Fe as SidebarFooter,
762
- $e as SidebarGroup,
763
- Ve as SidebarGroupAction,
764
- Ue as SidebarGroupContent,
765
- qe as SidebarGroupLabel,
766
- We as SidebarHeader,
767
- Le as SidebarInput,
768
- He as SidebarInset,
769
- Xe as SidebarMenu,
770
- Ye as SidebarMenuAction,
771
- Ze as SidebarMenuBadge,
772
- Qe as SidebarMenuButton,
773
- Je as SidebarMenuItem,
774
- et as SidebarMenuSkeleton,
775
- tt as SidebarMenuSub,
776
- rt as SidebarMenuSubButton,
777
- at as SidebarMenuSubItem,
778
- Re as SidebarProvider,
779
- Ge as SidebarRail,
780
- je as SidebarSeparator,
781
- Be as SidebarTrigger,
782
- Pt as Slider,
783
- Ha as Switch,
784
- Wa as Tabs,
785
- Fa as TabsContent,
786
- ja as TabsList,
787
- Ka as TabsTrigger,
788
- it as TextReveal,
789
- Ar as Toaster,
790
- _r as Toggle,
791
- A as Tooltip,
792
- _ as TooltipContent,
793
- k as TooltipProvider,
794
- y as TooltipTrigger,
795
- I as useSidebar
1084
+ se as Sheet,
1085
+ _o as SheetClose,
1086
+ de as SheetContent,
1087
+ ce as SheetDescription,
1088
+ Io as SheetFooter,
1089
+ le as SheetHeader,
1090
+ ue as SheetTitle,
1091
+ No as SheetTrigger,
1092
+ Rt as Sidebar,
1093
+ Wt as SidebarContent,
1094
+ Gt as SidebarFooter,
1095
+ $t as SidebarGroup,
1096
+ Kt as SidebarGroupAction,
1097
+ qt as SidebarGroupContent,
1098
+ Ut as SidebarGroupLabel,
1099
+ zt as SidebarHeader,
1100
+ Lt as SidebarInput,
1101
+ Bt as SidebarInset,
1102
+ Xt as SidebarMenu,
1103
+ Yt as SidebarMenuAction,
1104
+ Zt as SidebarMenuBadge,
1105
+ Qt as SidebarMenuButton,
1106
+ Jt as SidebarMenuItem,
1107
+ jt as SidebarMenuSkeleton,
1108
+ er as SidebarMenuSub,
1109
+ rr as SidebarMenuSubButton,
1110
+ tr as SidebarMenuSubItem,
1111
+ Ot as SidebarProvider,
1112
+ Pt as SidebarRail,
1113
+ Ht as SidebarSeparator,
1114
+ Vt as SidebarTrigger,
1115
+ Pr as Slider,
1116
+ za as Switch,
1117
+ Ha as Tabs,
1118
+ Wa as TabsContent,
1119
+ $a as TabsList,
1120
+ Ua as TabsTrigger,
1121
+ sr as TextReveal,
1122
+ Fo as Toaster,
1123
+ ko as Toggle,
1124
+ ae as Tooltip,
1125
+ ne as TooltipContent,
1126
+ ie as TooltipProvider,
1127
+ oe as TooltipTrigger,
1128
+ O as useFormField,
1129
+ X as useSidebar
796
1130
  };