@editora/ui-react 0.1.13 → 0.1.14

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/index.esm.js CHANGED
@@ -1,497 +1,1475 @@
1
1
  'use client';
2
2
  import "@editora/ui-core";
3
- import { Button as _ } from "./Button.esm.js";
4
- import { Tooltip as re } from "./Tooltip.esm.js";
5
- import { Alert as oe, AlertActions as ne, AlertDescription as ie, AlertIcon as ae, AlertTitle as pe } from "./Alert.esm.js";
6
- import { Dropdown as me, DropdownContent as se, DropdownItem as le, DropdownSectionLabel as ce, DropdownSeparator as ue, DropdownTrigger as xe } from "./Dropdown.esm.js";
7
- import { Input as ge } from "./Input.esm.js";
8
- import { PasswordField as Ae } from "./PasswordField.esm.js";
9
- import { TagsInput as De } from "./TagsInput.esm.js";
10
- import { OTPInput as Pe, PinInput as ye } from "./PinInput.esm.js";
11
- import { Dropzone as Te, FileUpload as Me } from "./FileUpload.esm.js";
12
- import { Textarea as ve } from "./Textarea.esm.js";
13
- import { Field as Fe } from "./Field.esm.js";
14
- import { ControlGroup as Re, Description as Le, FieldError as Be, Fieldset as Ee } from "./FieldSemantics.esm.js";
15
- import { FiltersBar as He } from "./FiltersBar.esm.js";
16
- import { Combobox as ze } from "./Combobox.esm.js";
17
- import { Badge as qe } from "./Badge.esm.js";
18
- import { EmptyState as Ke } from "./EmptyState.esm.js";
19
- import { Table as $e } from "./Table.esm.js";
20
- import { DataTable as Qe } from "./DataTable.esm.js";
21
- import { Chart as Je } from "./Chart.esm.js";
22
- import { Timeline as Ye } from "./Timeline.esm.js";
23
- import { Carousel as _e } from "./Carousel.esm.js";
24
- import { CodeBlock as rr } from "./CodeBlock.esm.js";
25
- import { CodeSnippet as or } from "./CodeSnippet.esm.js";
26
- import { CopyButton as ir } from "./CopyButton.esm.js";
27
- import { DataViewToolbar as pr } from "./DataViewToolbar.esm.js";
28
- import { Stat as mr } from "./Stat.esm.js";
29
- import { MetricCard as lr } from "./MetricCard.esm.js";
30
- import { Calendar as ur } from "./Calendar.esm.js";
31
- import { ColorPicker as dr } from "./ColorPicker.esm.js";
32
- import { DatePicker as hr } from "./DatePicker.esm.js";
33
- import { DateRangePicker as br } from "./DateRangePicker.esm.js";
34
- import { DateField as wr, TimeField as Pr } from "./DateField.esm.js";
35
- import { NumberField as Cr } from "./NumberField.esm.js";
36
- import { MultiSelect as Mr } from "./MultiSelect.esm.js";
37
- import { SplitButton as vr } from "./SplitButton.esm.js";
38
- import { TransferList as Fr } from "./TransferList.esm.js";
39
- import { Sortable as Rr } from "./Sortable.esm.js";
40
- import { InlineEdit as Br } from "./InlineEdit.esm.js";
41
- import { TimePicker as Nr } from "./TimePicker.esm.js";
42
- import { DateTimePicker as Gr } from "./DateTimePicker.esm.js";
43
- import { DateRangeTimePicker as Vr } from "./DateRangeTimePicker.esm.js";
44
- import { Gantt as Or } from "./Gantt.esm.js";
45
- import { Stepper as Wr } from "./Stepper.esm.js";
46
- import { Wizard as Ur } from "./Wizard.esm.js";
47
- import { Rating as jr } from "./Rating.esm.js";
48
- import { QuickActions as Xr } from "./QuickActions.esm.js";
49
- import { NavigationMenu as Zr, NavigationMenuContent as _r, NavigationMenuIndicator as et, NavigationMenuItem as rt, NavigationMenuLink as tt, NavigationMenuList as ot, NavigationMenuRoot as nt, NavigationMenuTrigger as it, NavigationMenuViewport as at } from "./NavigationMenu.esm.js";
50
- import { Menubar as ft } from "./Menubar.esm.js";
51
- import { Dialog as st } from "./Dialog.esm.js";
52
- import { DialogProvider as ct, useDialog as ut } from "./DialogProvider.esm.js";
53
- import { Popover as dt } from "./Popover.esm.js";
54
- import { Tabs as ht } from "./Tabs.esm.js";
55
- import { Menu as bt, MenuItem as Dt, MenuSectionLabel as wt, MenuSeparator as Pt } from "./Menu.esm.js";
56
- import { Icon as Ct } from "./Icon.esm.js";
57
- import { ToastAPI as Mt, ToastProvider as St, toast as vt, toastApi as kt, useToast as Ft } from "./ToastAPI.esm.js";
58
- import { Toast as Rt } from "./Toast.esm.js";
59
- import { FloatingToolbar as Bt } from "./FloatingToolbar.esm.js";
60
- import { BlockControls as Nt } from "./BlockControls.esm.js";
61
- import { Kbd as Gt } from "./Kbd.esm.js";
62
- import { Shortcut as Vt } from "./Shortcut.esm.js";
63
- import { Command as Ot, CommandItem as Kt } from "./Command.esm.js";
64
- import { CommandPalette as $t, CommandPaletteItem as Ut } from "./CommandPalette.esm.js";
65
- import { ContextMenu as jt } from "./ContextMenu.esm.js";
66
- import { SelectionPopup as Xt } from "./SelectionPopup.esm.js";
67
- import { PluginPanel as Zt } from "./PluginPanel.esm.js";
68
- import { Form as eo } from "./Form.esm.js";
69
- import { useRef as y, useCallback as l, useState as G, useEffect as V } from "react";
70
- import "./runtime-864efe2f-3a3f8a32.mjs";
71
- import { Box as to } from "./Box.esm.js";
72
- import { Flex as no } from "./Flex.esm.js";
73
- import { Grid as ao } from "./Grid.esm.js";
74
- import { PlacementGrid as fo } from "./PlacementGrid.esm.js";
75
- import { MasonryGrid as so } from "./MasonryGrid.esm.js";
76
- import { Section as co } from "./Section.esm.js";
77
- import { Container as xo } from "./Container.esm.js";
78
- import { Sidebar as ho } from "./Sidebar.esm.js";
79
- import { Panel as bo, PanelGroup as Do, Splitter as wo } from "./PanelGroup.esm.js";
80
- import { Tree as yo } from "./Tree.esm.js";
81
- import { Breadcrumb as To } from "./Breadcrumb.esm.js";
82
- import { AppHeader as So, AppHeaderCenter as vo, AppHeaderEnd as ko, AppHeaderStart as Fo, AppHeaderSubtitle as Io, AppHeaderTitle as Ro } from "./AppHeader.esm.js";
83
- import { PageHeader as Bo } from "./PageHeader.esm.js";
84
- import { PageToolbar as No } from "./PageToolbar.esm.js";
85
- import { RecordHeader as Go } from "./RecordHeader.esm.js";
86
- import { Drawer as Vo } from "./Drawer.esm.js";
87
- import { Layout as Oo } from "./Layout.esm.js";
88
- import { ThemeProvider as Wo, useTheme as $o } from "./ThemeProvider.esm.js";
89
- import { Collection as Qo } from "./Collection.esm.js";
90
- import { Listbox as Jo } from "./Listbox.esm.js";
91
- import { RovingFocusGroup as Yo } from "./RovingFocusGroup.esm.js";
92
- import { DismissableLayer as _o } from "./DismissableLayer.esm.js";
93
- import { FocusScope as rn } from "./FocusScope.esm.js";
94
- import { Positioner as on } from "./Positioner.esm.js";
95
- import { Anchor as an } from "./Anchor.esm.js";
96
- import { Checkbox as fn } from "./Checkbox.esm.js";
97
- import { Radio as sn } from "./Radio.esm.js";
98
- import { RadioGroup as cn } from "./RadioGroup.esm.js";
99
- import { Switch as xn } from "./Switch.esm.js";
100
- import { Toggle as gn } from "./Toggle.esm.js";
101
- import { ToggleGroup as An } from "./ToggleGroup.esm.js";
102
- import { AspectRatio as Dn } from "./AspectRatio.esm.js";
103
- import { Avatar as Pn } from "./Avatar.esm.js";
104
- import { Presence as Cn } from "./Presence.esm.js";
105
- import { Progress as Mn } from "./Progress.esm.js";
106
- import { Meter as vn } from "./Meter.esm.js";
107
- import { Portal as Fn } from "./Portal.esm.js";
108
- import { ScrollArea as Rn } from "./ScrollArea.esm.js";
109
- import { Separator as Bn } from "./Separator.esm.js";
110
- import { Slot as Nn } from "./Slot.esm.js";
111
- import { Toolbar as Gn } from "./Toolbar.esm.js";
112
- import { VisuallyHidden as Vn } from "./VisuallyHidden.esm.js";
113
- import { Collapsible as On } from "./Collapsible.esm.js";
114
- import { Pagination as Wn } from "./Pagination.esm.js";
115
- import { Accordion as Un } from "./Accordion.esm.js";
116
- import { DirectionProvider as jn } from "./DirectionProvider.esm.js";
117
- import { HoverCard as Xn } from "./HoverCard.esm.js";
118
- import { Card as Zn } from "./Card.esm.js";
119
- import { Label as ei } from "./Label.esm.js";
120
- import { AlertDialog as ti, AlertDialogActions as oi, AlertDialogContent as ni, AlertDialogDescription as ii, AlertDialogIcon as ai, AlertDialogTitle as pi } from "./AlertDialog.esm.js";
121
- import { AlertDialogProvider as mi, useAlertDialog as si } from "./AlertDialogProvider.esm.js";
122
- import { AnimatedText as ci } from "./AnimatedText.esm.js";
123
- import { SpinningText as xi } from "./SpinningText.esm.js";
124
- import { NumberTicker as gi } from "./NumberTicker.esm.js";
125
- import { AnimatedList as Ai } from "./AnimatedList.esm.js";
126
- import { AnimatedBeam as Di } from "./AnimatedBeam.esm.js";
127
- import { IconCloud as Pi } from "./IconCloud.esm.js";
128
- import { Dock as Ci } from "./Dock.esm.js";
129
- import { Orbiter as Mi } from "./Orbiter.esm.js";
130
- import { Marquee as vi } from "./Marquee.esm.js";
131
- import { Select as Fi } from "./Select.esm.js";
132
- import { Slider as Ri } from "./Slider.esm.js";
133
- import { Skeleton as Bi } from "./Skeleton.esm.js";
134
- import { AnimatedNumber as Ni, useAnimatedNumber as Hi, useAnimatedNumberValue as Gi } from "./AnimatedNumber.esm.js";
135
- import { toastAdvanced as Vi, default as qi, toastPro as Oi } from "@editora/toast";
3
+ import { Button as Lt } from "./Button.esm.js";
4
+ import { Tooltip as St } from "./Tooltip.esm.js";
5
+ import { Alert as Nt, AlertActions as Ot, AlertDescription as $t, AlertIcon as Kt, AlertTitle as Bt } from "./Alert.esm.js";
6
+ import { Dropdown as Ht, DropdownContent as zt, DropdownItem as qt, DropdownSectionLabel as Gt, DropdownSeparator as Ut, DropdownTrigger as jt } from "./Dropdown.esm.js";
7
+ import { Input as Qt } from "./Input.esm.js";
8
+ import { PasswordField as Yt } from "./PasswordField.esm.js";
9
+ import { TagsInput as Jt } from "./TagsInput.esm.js";
10
+ import { OTPInput as er, PinInput as tr } from "./PinInput.esm.js";
11
+ import { Dropzone as nr, FileUpload as or } from "./FileUpload.esm.js";
12
+ import { Textarea as sr } from "./Textarea.esm.js";
13
+ import { Field as lr } from "./Field.esm.js";
14
+ import { ControlGroup as fr, Description as cr, FieldError as mr, Fieldset as dr } from "./FieldSemantics.esm.js";
15
+ import { FiltersBar as gr } from "./FiltersBar.esm.js";
16
+ import { Combobox as xr } from "./Combobox.esm.js";
17
+ import { Badge as Pr } from "./Badge.esm.js";
18
+ import { EmptyState as Dr } from "./EmptyState.esm.js";
19
+ import { Table as hr } from "./Table.esm.js";
20
+ import { DataTable as Er } from "./DataTable.esm.js";
21
+ import { Chart as Rr } from "./Chart.esm.js";
22
+ import { Timeline as Fr } from "./Timeline.esm.js";
23
+ import { Carousel as Lr } from "./Carousel.esm.js";
24
+ import { CodeBlock as Sr } from "./CodeBlock.esm.js";
25
+ import { CodeSnippet as Nr } from "./CodeSnippet.esm.js";
26
+ import { CopyButton as $r } from "./CopyButton.esm.js";
27
+ import { DataViewToolbar as Br } from "./DataViewToolbar.esm.js";
28
+ import { Stat as Hr } from "./Stat.esm.js";
29
+ import { MetricCard as qr } from "./MetricCard.esm.js";
30
+ import { Calendar as Ur } from "./Calendar.esm.js";
31
+ import { ColorPicker as _r } from "./ColorPicker.esm.js";
32
+ import { DatePicker as Xr } from "./DatePicker.esm.js";
33
+ import { DateRangePicker as Zr } from "./DateRangePicker.esm.js";
34
+ import { DateField as Wr, TimeField as en } from "./DateField.esm.js";
35
+ import { NumberField as rn } from "./NumberField.esm.js";
36
+ import { MultiSelect as on } from "./MultiSelect.esm.js";
37
+ import { SplitButton as un } from "./SplitButton.esm.js";
38
+ import { TransferList as an } from "./TransferList.esm.js";
39
+ import { Sortable as cn } from "./Sortable.esm.js";
40
+ import { InlineEdit as dn } from "./InlineEdit.esm.js";
41
+ import { TimePicker as gn } from "./TimePicker.esm.js";
42
+ import { DateTimePicker as xn } from "./DateTimePicker.esm.js";
43
+ import { DateRangeTimePicker as Pn } from "./DateRangeTimePicker.esm.js";
44
+ import { Gantt as Dn } from "./Gantt.esm.js";
45
+ import { Stepper as hn } from "./Stepper.esm.js";
46
+ import { Wizard as En } from "./Wizard.esm.js";
47
+ import { Rating as Rn } from "./Rating.esm.js";
48
+ import { QuickActions as Fn } from "./QuickActions.esm.js";
49
+ import { NavigationMenu as Ln, NavigationMenuContent as Cn, NavigationMenuIndicator as Sn, NavigationMenuItem as kn, NavigationMenuLink as Nn, NavigationMenuList as On, NavigationMenuRoot as $n, NavigationMenuTrigger as Kn, NavigationMenuViewport as Bn } from "./NavigationMenu.esm.js";
50
+ import { Menubar as Hn } from "./Menubar.esm.js";
51
+ import { Dialog as qn } from "./Dialog.esm.js";
52
+ import { DialogProvider as Un, useDialog as jn } from "./DialogProvider.esm.js";
53
+ import { Popover as Qn } from "./Popover.esm.js";
54
+ import { Tabs as Yn } from "./Tabs.esm.js";
55
+ import { Menu as Jn, MenuItem as Wn, MenuSectionLabel as eo, MenuSeparator as to } from "./Menu.esm.js";
56
+ import { Icon as no } from "./Icon.esm.js";
57
+ import { ToastAPI as io, ToastProvider as so, toast as uo, toastApi as lo, useToast as ao } from "./ToastAPI.esm.js";
58
+ import { Toast as co } from "./Toast.esm.js";
59
+ import { FloatingToolbar as po } from "./FloatingToolbar.esm.js";
60
+ import { BlockControls as yo } from "./BlockControls.esm.js";
61
+ import { Kbd as wo } from "./Kbd.esm.js";
62
+ import { Shortcut as bo } from "./Shortcut.esm.js";
63
+ import { Command as vo, CommandItem as ho } from "./Command.esm.js";
64
+ import { CommandPalette as Eo, CommandPaletteItem as Io } from "./CommandPalette.esm.js";
65
+ import { ContextMenu as Mo } from "./ContextMenu.esm.js";
66
+ import { SelectionPopup as To } from "./SelectionPopup.esm.js";
67
+ import { PluginPanel as Co } from "./PluginPanel.esm.js";
68
+ import { Form as ko } from "./Form.esm.js";
69
+ import S, { useRef as R, useCallback as D, useState as H, useLayoutEffect as Le, useEffect as K, createContext as ae, useMemo as V, useContext as re } from "react";
70
+ import { createPositioner as Ue, createVirtualPoint as je } from "@editora/ui-core/runtime";
71
+ import { createPortal as _e } from "react-dom";
72
+ import { Box as Oo } from "./Box.esm.js";
73
+ import { Flex as Ko } from "./Flex.esm.js";
74
+ import { Grid as Vo } from "./Grid.esm.js";
75
+ import { PlacementGrid as zo } from "./PlacementGrid.esm.js";
76
+ import { MasonryGrid as Go } from "./MasonryGrid.esm.js";
77
+ import { Section as jo } from "./Section.esm.js";
78
+ import { Container as Qo } from "./Container.esm.js";
79
+ import { Sidebar as Yo } from "./Sidebar.esm.js";
80
+ import { Panel as Jo, PanelGroup as Wo, Splitter as ei } from "./PanelGroup.esm.js";
81
+ import { Tree as ri } from "./Tree.esm.js";
82
+ import { Breadcrumb as oi } from "./Breadcrumb.esm.js";
83
+ import { AppHeader as si, AppHeaderCenter as ui, AppHeaderEnd as li, AppHeaderStart as ai, AppHeaderSubtitle as fi, AppHeaderTitle as ci } from "./AppHeader.esm.js";
84
+ import { PageHeader as di } from "./PageHeader.esm.js";
85
+ import { PageToolbar as gi } from "./PageToolbar.esm.js";
86
+ import { RecordHeader as xi } from "./RecordHeader.esm.js";
87
+ import { Drawer as Pi } from "./Drawer.esm.js";
88
+ import { Layout as Di } from "./Layout.esm.js";
89
+ import { ThemeProvider as hi, useTheme as Ai } from "./ThemeProvider.esm.js";
90
+ import { Collection as Ii } from "./Collection.esm.js";
91
+ import { Listbox as Mi } from "./Listbox.esm.js";
92
+ import { RovingFocusGroup as Ti } from "./RovingFocusGroup.esm.js";
93
+ import { DismissableLayer as Ci } from "./DismissableLayer.esm.js";
94
+ import { FocusScope as ki } from "./FocusScope.esm.js";
95
+ import { Positioner as Oi } from "./Positioner.esm.js";
96
+ import { Anchor as Ki } from "./Anchor.esm.js";
97
+ import { Checkbox as Vi } from "./Checkbox.esm.js";
98
+ import { Radio as zi } from "./Radio.esm.js";
99
+ import { RadioGroup as Gi } from "./RadioGroup.esm.js";
100
+ import { Switch as ji } from "./Switch.esm.js";
101
+ import { Toggle as Qi } from "./Toggle.esm.js";
102
+ import { ToggleGroup as Yi } from "./ToggleGroup.esm.js";
103
+ import { AspectRatio as Ji } from "./AspectRatio.esm.js";
104
+ import { Avatar as es } from "./Avatar.esm.js";
105
+ import { Presence as rs } from "./Presence.esm.js";
106
+ import { Progress as os } from "./Progress.esm.js";
107
+ import { Meter as ss } from "./Meter.esm.js";
108
+ import { Portal as ls } from "./Portal.esm.js";
109
+ import { ScrollArea as fs } from "./ScrollArea.esm.js";
110
+ import { Separator as ms } from "./Separator.esm.js";
111
+ import { Slot as ps } from "./Slot.esm.js";
112
+ import { Toolbar as ys } from "./Toolbar.esm.js";
113
+ import { VisuallyHidden as ws } from "./VisuallyHidden.esm.js";
114
+ import { Collapsible as bs } from "./Collapsible.esm.js";
115
+ import { Pagination as vs } from "./Pagination.esm.js";
116
+ import { Accordion as As } from "./Accordion.esm.js";
117
+ import { DirectionProvider as Is } from "./DirectionProvider.esm.js";
118
+ import { HoverCard as Ms } from "./HoverCard.esm.js";
119
+ import { Card as Ts } from "./Card.esm.js";
120
+ import { Label as Cs } from "./Label.esm.js";
121
+ import { AlertDialog as ks, AlertDialogActions as Ns, AlertDialogContent as Os, AlertDialogDescription as $s, AlertDialogIcon as Ks, AlertDialogTitle as Bs } from "./AlertDialog.esm.js";
122
+ import { AlertDialogProvider as Hs, useAlertDialog as zs } from "./AlertDialogProvider.esm.js";
123
+ import { AnimatedText as Gs } from "./AnimatedText.esm.js";
124
+ import { SpinningText as js } from "./SpinningText.esm.js";
125
+ import { NumberTicker as Qs } from "./NumberTicker.esm.js";
126
+ import { AnimatedList as Ys } from "./AnimatedList.esm.js";
127
+ import { AnimatedBeam as Js } from "./AnimatedBeam.esm.js";
128
+ import { IconCloud as eu } from "./IconCloud.esm.js";
129
+ import { Dock as ru } from "./Dock.esm.js";
130
+ import { Orbiter as ou } from "./Orbiter.esm.js";
131
+ import { Marquee as su } from "./Marquee.esm.js";
132
+ import { Select as lu } from "./Select.esm.js";
133
+ import { Slider as fu } from "./Slider.esm.js";
134
+ import { Skeleton as mu } from "./Skeleton.esm.js";
135
+ import { AnimatedNumber as pu, useAnimatedNumber as gu, useAnimatedNumberValue as yu } from "./AnimatedNumber.esm.js";
136
+ import { toastAdvanced as wu, default as Pu, toastPro as bu } from "@editora/toast";
136
137
  import "./_internals-68620b0c.mjs";
137
- import "react-dom";
138
- function q(f, u, h = "top") {
139
- const x = typeof h == "string" ? { placement: h } : h, m = x.placement || "top", c = typeof x.offset == "number" ? x.offset : 8, D = !!x.shift, e = f.getBoundingClientRect(), t = u.getBoundingClientRect();
140
- let o = 0, p = 0;
141
- m === "top" ? (o = e.top - t.height - c, p = e.left + (e.width - t.width) / 2) : m === "bottom" ? (o = e.bottom + c, p = e.left + (e.width - t.width) / 2) : m === "left" ? (o = e.top + (e.height - t.height) / 2, p = e.left - t.width - c) : (o = e.top + (e.height - t.height) / 2, p = e.right + c);
142
- const w = e.left + e.width / 2, M = e.top + e.height / 2, P = Math.round(w - p), S = Math.round(M - o);
143
- if (D) {
144
- const v = window.innerWidth || document.documentElement.clientWidth, g = window.innerHeight || document.documentElement.clientHeight;
145
- if (m === "top" || m === "bottom") {
146
- const s = v - t.width - 4;
147
- p < 4 && (p = Math.min(s, p + (4 - p))), p > s && (p = Math.max(4, p - (p - s)));
148
- } else {
149
- const s = g - t.height - 4;
150
- o < 4 && (o = Math.min(s, o + (4 - o))), o > s && (o = Math.max(4, o - (o - s)));
151
- }
152
- }
153
- return { top: o, left: p, placement: m, x: P, y: S };
154
- }
155
- function J() {
156
- const f = y(null), u = l(async () => {
157
- const e = f.current;
158
- return e ? await e.submit() : !1;
159
- }, []), h = l(async () => {
160
- const e = f.current;
161
- return e ? await e.validate() : { valid: !0, errors: {} };
162
- }, []), x = l(() => {
163
- var t;
164
- const e = f.current;
165
- return e ? (t = e.getValues) == null ? void 0 : t.call(e) : {};
166
- }, []), m = l((e) => {
167
- var o;
168
- const t = f.current;
169
- return (o = t == null ? void 0 : t.reset) == null ? void 0 : o.call(t, e);
170
- }, []), c = l(() => {
171
- var t;
172
- const e = f.current;
173
- return e ? typeof e.isDirty == "function" ? !!e.isDirty() : ((t = e.hasAttribute) == null ? void 0 : t.call(e, "dirty")) || !1 : !1;
174
- }, []), D = l((e) => {
175
- var o;
176
- const t = f.current;
177
- return (o = t == null ? void 0 : t.markClean) == null ? void 0 : o.call(t, e);
138
+ function st() {
139
+ const e = R(null), n = D(async () => {
140
+ const c = e.current;
141
+ return c ? await c.submit() : !1;
142
+ }, []), r = D(async () => {
143
+ const c = e.current;
144
+ return c ? await c.validate() : { valid: !0, errors: {} };
145
+ }, []), t = D(() => {
146
+ var i;
147
+ const c = e.current;
148
+ return c ? (i = c.getValues) == null ? void 0 : i.call(c) : {};
149
+ }, []), o = D((c) => {
150
+ var u;
151
+ const i = e.current;
152
+ return (u = i == null ? void 0 : i.reset) == null ? void 0 : u.call(i, c);
153
+ }, []), f = D(() => {
154
+ var i;
155
+ const c = e.current;
156
+ return c ? typeof c.isDirty == "function" ? !!c.isDirty() : ((i = c.hasAttribute) == null ? void 0 : i.call(c, "dirty")) || !1 : !1;
157
+ }, []), s = D((c) => {
158
+ var u;
159
+ const i = e.current;
160
+ return (u = i == null ? void 0 : i.markClean) == null ? void 0 : u.call(i, c);
178
161
  }, []);
179
- return { ref: f, submit: u, validate: h, getValues: x, reset: m, isDirty: c, markClean: D };
162
+ return { ref: e, submit: n, validate: r, getValues: t, reset: o, isDirty: f, markClean: s };
180
163
  }
181
- function z(f, u) {
182
- if (f) {
183
- if (typeof f == "function") {
184
- f(u);
164
+ const Te = typeof window < "u" ? Le : K;
165
+ function ye(e, n) {
166
+ if (e) {
167
+ if (typeof e == "function") {
168
+ e(n);
185
169
  return;
186
170
  }
187
- f.current = u;
171
+ e.current = n;
188
172
  }
189
173
  }
190
- function X(f) {
191
- const { placement: u = "bottom", offset: h = 8, open: x, onOpen: m, onClose: c, role: D = "menu" } = f || {}, e = y(null), t = y(null), o = y(null), p = y(`floating-${Math.random().toString(36).slice(2, 9)}`), [w, M] = G({ top: 0, left: 0, placement: u }), P = typeof x < "u", [S, v] = G(!!x), g = P ? !!x : S, s = l(() => {
192
- const n = e.current, i = t.current;
193
- if (!n || !i)
194
- return;
195
- const a = q(n, i, { placement: u, offset: h });
196
- M({
197
- top: Math.round(a.top),
198
- left: Math.round(a.left),
199
- placement: a.placement,
200
- arrow: a.x || a.y ? { x: a.x, y: a.y } : void 0
201
- });
202
- }, [u, h]), b = l(
203
- (n) => {
204
- P || v(n), n ? m == null || m() : c == null || c();
174
+ function xe(...e) {
175
+ return (n) => {
176
+ e.forEach((r) => ye(r, n));
177
+ };
178
+ }
179
+ function Qe(...e) {
180
+ return (...n) => {
181
+ e.forEach((r) => r == null ? void 0 : r(...n));
182
+ };
183
+ }
184
+ function k(e, n, r = {}) {
185
+ return (t) => {
186
+ e == null || e(t), !((r.checkDefaultPrevented ?? !0) && t.defaultPrevented) && n(t);
187
+ };
188
+ }
189
+ function ut(e) {
190
+ const {
191
+ placement: n = "bottom",
192
+ offset: r = 8,
193
+ open: t,
194
+ onOpen: o,
195
+ onClose: f,
196
+ onOpenChange: s,
197
+ role: c = "menu",
198
+ flip: i = !0,
199
+ shift: u = !0,
200
+ matchWidth: a = !1,
201
+ fitViewport: m = !1,
202
+ strategy: p = "absolute",
203
+ arrowPadding: l = 8,
204
+ dir: d,
205
+ boundary: y = null,
206
+ boundaryPadding: P,
207
+ autoPlacement: F = !1,
208
+ allowedPlacements: E,
209
+ fallbackPlacements: M,
210
+ inline: I = !1,
211
+ hideWhenDetached: L = !1,
212
+ observeWindowResize: B,
213
+ observeScroll: T,
214
+ observeAncestorScroll: N,
215
+ observeAncestorResize: U,
216
+ observeLayoutShift: j,
217
+ observeAnchorResize: g,
218
+ observeFloatingResize: b,
219
+ animationFrame: A,
220
+ middleware: C
221
+ } = e || {}, O = R(null), v = R(null), z = R(null), Y = R(null), te = R(null), ne = R(`floating-${Math.random().toString(36).slice(2, 9)}`), [$e, be] = H(0), [De, Ke] = H(null), [Z, Be] = H(null), [ve, Ve] = H(null), [J, He] = H({ top: 0, left: 0, placement: n }), fe = typeof t < "u", [ze, qe] = H(!!t), q = fe ? !!t : ze, he = D(() => {
222
+ var x;
223
+ (x = te.current) == null || x.update();
224
+ }, []), _ = D(
225
+ (x, w = "manual") => {
226
+ fe || qe(x), s == null || s(x, w), x ? o == null || o(w) : f == null || f(w);
205
227
  },
206
- [P, m, c]
207
- ), F = l(() => b(!g), [g, b]), I = l(() => b(!0), [b]), R = l(() => b(!1), [b]);
208
- V(() => {
209
- if (!g)
228
+ [fe, o, f, s]
229
+ ), ce = D((x = "manual") => _(!q, x), [q, _]), Ae = D((x = "manual") => _(!0, x), [_]), Ee = D((x = "manual") => _(!1, x), [_]);
230
+ Te(() => {
231
+ var h;
232
+ if (!q)
210
233
  return;
211
- const n = e.current, i = t.current;
212
- if (!n || !i)
234
+ const x = De, w = Z;
235
+ if (!x || !w)
213
236
  return;
214
- s();
215
- const a = () => {
216
- o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => s());
217
- }, A = () => {
218
- o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => s());
237
+ const $ = w.style.visibility, X = w.style.pointerEvents, W = !w.offsetWidth && !w.offsetHeight;
238
+ return W && (w.style.visibility = "hidden", w.style.pointerEvents = "none"), (h = te.current) == null || h.destroy(), te.current = Ue({
239
+ anchor: Y.current || x,
240
+ floating: w,
241
+ placement: n,
242
+ strategy: p,
243
+ offset: r,
244
+ flip: i,
245
+ shift: u,
246
+ matchWidth: a,
247
+ fitViewport: m,
248
+ arrow: ve,
249
+ arrowPadding: l,
250
+ dir: d,
251
+ boundary: y,
252
+ boundaryPadding: P,
253
+ autoPlacement: F,
254
+ allowedPlacements: E,
255
+ fallbackPlacements: M,
256
+ inline: I,
257
+ hideWhenDetached: L,
258
+ observeWindowResize: B,
259
+ observeScroll: T,
260
+ observeAncestorScroll: N,
261
+ observeAncestorResize: U,
262
+ observeLayoutShift: j,
263
+ observeAnchorResize: g,
264
+ observeFloatingResize: b,
265
+ animationFrame: A,
266
+ middleware: C,
267
+ onUpdate: (G) => {
268
+ var Fe;
269
+ He({
270
+ top: Math.round(G.y),
271
+ left: Math.round(G.x),
272
+ placement: G.placement,
273
+ arrow: (Fe = G.middlewareData) != null && Fe.arrow ? {
274
+ x: G.middlewareData.arrow.x,
275
+ y: G.middlewareData.arrow.y,
276
+ centerOffset: G.middlewareData.arrow.centerOffset
277
+ } : void 0
278
+ });
279
+ }
280
+ }), () => {
281
+ var G;
282
+ W && (w.style.visibility = $, w.style.pointerEvents = X), (G = te.current) == null || G.destroy(), te.current = null;
219
283
  };
220
- window.addEventListener("scroll", a, { passive: !0, capture: !0 }), window.addEventListener("resize", A);
221
- let d = null, r = null;
222
- try {
223
- typeof ResizeObserver < "u" && (d = new ResizeObserver(A), r = new ResizeObserver(A), d.observe(n), r.observe(i));
224
- } catch {
225
- d = r = null;
226
- }
227
- return () => {
228
- window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", A), d == null || d.disconnect(), r == null || r.disconnect(), o.current && cancelAnimationFrame(o.current), o.current = null;
229
- };
230
- }, [g, s]);
231
- const L = l((n) => {
232
- e.current = n;
233
- }, []), B = l((n) => {
234
- t.current = n;
235
- }, []), C = () => t.current ? Array.from(
236
- t.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')
237
- ).filter(Boolean) : [], T = (n) => {
238
- const i = C();
239
- if (!i.length)
284
+ }, [
285
+ q,
286
+ n,
287
+ p,
288
+ r,
289
+ i,
290
+ u,
291
+ a,
292
+ m,
293
+ $e,
294
+ De,
295
+ Z,
296
+ ve,
297
+ l,
298
+ d,
299
+ y,
300
+ P,
301
+ F,
302
+ E,
303
+ M,
304
+ I,
305
+ L,
306
+ B,
307
+ T,
308
+ N,
309
+ U,
310
+ j,
311
+ g,
312
+ b,
313
+ A,
314
+ C
315
+ ]), Te(() => {
316
+ !q || !Z || (Z.style.visibility = "", Z.style.pointerEvents = "");
317
+ }, [J.left, J.top, q, Z]);
318
+ const oe = D((x) => {
319
+ O.current = x, Ke((w) => w === x ? w : x);
320
+ }, []), ie = D((x) => {
321
+ v.current = x, Be((w) => w === x ? w : x);
322
+ }, []), me = D((x) => {
323
+ z.current = x, Ve((w) => w === x ? w : x);
324
+ }, []), de = D((x) => {
325
+ Y.current = x, be((w) => w + 1);
326
+ }, []), Ge = D((x, w) => {
327
+ const $ = O.current || v.current || void 0;
328
+ Y.current = je(x, w, $), be((X) => X + 1);
329
+ }, []), se = () => v.current ? Array.from(
330
+ v.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')
331
+ ).filter(Boolean) : [], ue = (x) => {
332
+ const w = se();
333
+ if (!w.length)
240
334
  return;
241
- const a = Math.max(0, Math.min(i.length - 1, n));
335
+ const $ = Math.max(0, Math.min(w.length - 1, x));
242
336
  try {
243
- i[a].focus();
337
+ w[$].focus();
244
338
  } catch {
245
339
  }
246
- }, k = () => T(0), E = () => {
247
- const n = C();
248
- n.length && T(n.length - 1);
249
- }, N = () => {
250
- const n = C(), i = n.findIndex((a) => a === document.activeElement);
251
- T(i < 0 ? 0 : (i + 1) % n.length);
252
- }, H = () => {
253
- const n = C(), i = n.findIndex((a) => a === document.activeElement);
254
- T(i <= 0 ? n.length - 1 : i - 1);
340
+ }, pe = () => ue(0), Ie = () => {
341
+ const x = se();
342
+ x.length && ue(x.length - 1);
343
+ }, Re = () => {
344
+ const x = se(), w = x.findIndex(($) => $ === document.activeElement);
345
+ ue(w < 0 ? 0 : (w + 1) % x.length);
346
+ }, Me = () => {
347
+ const x = se(), w = x.findIndex(($) => $ === document.activeElement);
348
+ ue(w <= 0 ? x.length - 1 : w - 1);
255
349
  };
256
350
  return {
257
- referenceRef: L,
258
- floatingRef: B,
259
- coords: w,
260
- update: s,
261
- open: g,
262
- setOpen: b,
263
- toggle: F,
264
- openPopup: I,
265
- closePopup: R,
266
- getReferenceProps: (n = {}) => {
267
- const { onClick: i, onKeyDown: a, ref: A, ...d } = n;
351
+ referenceRef: oe,
352
+ floatingRef: ie,
353
+ arrowRef: me,
354
+ setPositionReference: de,
355
+ setClientPoint: Ge,
356
+ coords: J,
357
+ update: he,
358
+ open: q,
359
+ setOpen: _,
360
+ toggle: ce,
361
+ openPopup: Ae,
362
+ closePopup: Ee,
363
+ getReferenceProps: (x = {}) => {
364
+ const { onClick: w, onKeyDown: $, ref: X, ...W } = x;
268
365
  return {
269
- ...d,
270
- ref: (r) => {
271
- L(r), z(A, r);
366
+ ...W,
367
+ ref: (h) => {
368
+ oe(h), ye(X, h);
272
369
  },
273
- "aria-haspopup": D,
274
- "aria-controls": p.current,
275
- "aria-expanded": g ? "true" : "false",
276
- onClick: (r) => {
277
- i == null || i(r), !r.defaultPrevented && F();
370
+ "aria-haspopup": c,
371
+ "aria-controls": ne.current,
372
+ "aria-expanded": q ? "true" : "false",
373
+ onClick: (h) => {
374
+ w == null || w(h), !h.defaultPrevented && ce();
278
375
  },
279
- onKeyDown: (r) => {
280
- a == null || a(r), !r.defaultPrevented && r.key === "ArrowDown" && (r.preventDefault(), I(), setTimeout(() => k(), 0));
376
+ onKeyDown: (h) => {
377
+ $ == null || $(h), !h.defaultPrevented && h.key === "ArrowDown" && (h.preventDefault(), Ae("list-navigation"), setTimeout(() => pe(), 0));
281
378
  }
282
379
  };
283
380
  },
284
- getFloatingProps: (n = {}) => {
285
- const { onKeyDown: i, style: a, ref: A, ...d } = n;
381
+ getFloatingProps: (x = {}) => {
382
+ const { onKeyDown: w, style: $, ref: X, ...W } = x;
286
383
  return {
287
- ...d,
288
- id: p.current,
289
- ref: (r) => {
290
- B(r), z(A, r);
384
+ ...W,
385
+ id: ne.current,
386
+ ref: (h) => {
387
+ ie(h), ye(X, h);
291
388
  },
292
- role: D,
389
+ role: c,
293
390
  tabIndex: -1,
294
391
  style: {
295
- ...a || {},
296
- position: "absolute",
297
- top: `${w.top}px`,
298
- left: `${w.left}px`
392
+ ...$ || {},
393
+ position: p,
394
+ top: J.top,
395
+ left: J.left
299
396
  },
300
- hidden: !g,
301
- onKeyDown: (r) => {
302
- i == null || i(r), !r.defaultPrevented && (r.key === "Escape" ? (r.preventDefault(), R()) : r.key === "ArrowDown" ? (r.preventDefault(), N()) : r.key === "ArrowUp" ? (r.preventDefault(), H()) : r.key === "Home" ? (r.preventDefault(), k()) : r.key === "End" && (r.preventDefault(), E()));
397
+ hidden: !q,
398
+ onKeyDown: (h) => {
399
+ w == null || w(h), !h.defaultPrevented && (h.key === "Escape" ? (h.preventDefault(), Ee("dismiss")) : h.key === "ArrowDown" ? (h.preventDefault(), Re()) : h.key === "ArrowUp" ? (h.preventDefault(), Me()) : h.key === "Home" ? (h.preventDefault(), pe()) : h.key === "End" && (h.preventDefault(), Ie()));
303
400
  }
304
401
  };
305
402
  },
306
- focusFirstItem: k,
307
- focusLastItem: E,
308
- focusNext: N,
309
- focusPrev: H
403
+ focusFirstItem: pe,
404
+ focusLastItem: Ie,
405
+ focusNext: Re,
406
+ focusPrev: Me,
407
+ refs: {
408
+ reference: O,
409
+ floating: v,
410
+ arrow: z,
411
+ setReference: oe,
412
+ setFloating: ie,
413
+ setArrow: me,
414
+ setPositionReference: de
415
+ },
416
+ elements: {
417
+ get reference() {
418
+ return O.current;
419
+ },
420
+ get floating() {
421
+ return v.current;
422
+ },
423
+ get arrow() {
424
+ return z.current;
425
+ }
426
+ },
427
+ floatingId: ne.current,
428
+ role: c,
429
+ placement: n,
430
+ context: {
431
+ open: q,
432
+ setOpen: _,
433
+ toggle: ce,
434
+ refs: {
435
+ reference: O,
436
+ floating: v,
437
+ arrow: z,
438
+ setReference: oe,
439
+ setFloating: ie,
440
+ setArrow: me,
441
+ setPositionReference: de
442
+ },
443
+ elements: {
444
+ get reference() {
445
+ return O.current;
446
+ },
447
+ get floating() {
448
+ return v.current;
449
+ },
450
+ get arrow() {
451
+ return z.current;
452
+ }
453
+ },
454
+ coords: J,
455
+ update: he,
456
+ floatingId: ne.current,
457
+ role: c,
458
+ placement: n,
459
+ strategy: p
460
+ }
310
461
  };
311
462
  }
463
+ function ge(e, n = {}) {
464
+ return e.reduce((r, t) => {
465
+ const o = (t == null ? void 0 : t(r)) || r;
466
+ return Xe(r, o);
467
+ }, n);
468
+ }
469
+ function Xe(e, n) {
470
+ const r = { ...e, ...n };
471
+ return Object.keys(e).forEach((t) => {
472
+ /^on[A-Z]/.test(t) && typeof e[t] == "function" && typeof n[t] == "function" && (r[t] = Qe(e[t], n[t]));
473
+ }), (e.ref || n.ref) && (r.ref = xe(e.ref, n.ref)), (e.style || n.style) && (r.style = { ...e.style || {}, ...n.style || {} }), r;
474
+ }
475
+ function Q(e, n) {
476
+ return !!e && !!n && e.contains(n);
477
+ }
478
+ function ee(e, n) {
479
+ return typeof e == "number" ? e : (e == null ? void 0 : e[n]) ?? 0;
480
+ }
481
+ function le(e) {
482
+ return Array.from(
483
+ (e == null ? void 0 : e.querySelectorAll(
484
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
485
+ )) || []
486
+ ).filter((n) => !n.hasAttribute("disabled") && n.getAttribute("aria-hidden") !== "true");
487
+ }
488
+ function Ye(e) {
489
+ const n = e.target;
490
+ if (!n)
491
+ return !0;
492
+ try {
493
+ return typeof n.matches != "function" || n.matches(":focus-visible");
494
+ } catch {
495
+ return !0;
496
+ }
497
+ }
498
+ function Ce(e) {
499
+ return typeof e == "object" && e !== null && "current" in e;
500
+ }
501
+ function Se(e) {
502
+ if (!(e instanceof Element))
503
+ return null;
504
+ const n = e.closest("[data-floating-node-id], [data-floating-reference-id]");
505
+ return n && (n.dataset.floatingNodeId || n.dataset.floatingReferenceId) || null;
506
+ }
507
+ function ke(e, n, r) {
508
+ if (!e || n === r)
509
+ return !1;
510
+ let t = e.getNode(n);
511
+ for (; t != null && t.parentId; ) {
512
+ if (t.parentId === r)
513
+ return !0;
514
+ t = e.getNode(t.parentId);
515
+ }
516
+ return !1;
517
+ }
518
+ function lt(e) {
519
+ const n = e.filter(Boolean);
520
+ return V(() => ({
521
+ getReferenceProps: (r = {}) => ge(n.map((t) => t.getReferenceProps), r),
522
+ getFloatingProps: (r = {}) => ge(n.map((t) => t.getFloatingProps), r),
523
+ getItemProps: (r = {}) => ge(n.map((t) => t.getItemProps), r)
524
+ }), [n]);
525
+ }
526
+ function at(e, n = {}) {
527
+ const {
528
+ enabled: r = !0,
529
+ toggle: t = !0,
530
+ event: o = "click",
531
+ ignoreMouse: f = !1,
532
+ keyboardHandlers: s = !0,
533
+ stickIfOpen: c = !1
534
+ } = n;
535
+ return V(() => ({
536
+ getReferenceProps(i = {}) {
537
+ if (!r)
538
+ return i;
539
+ const u = o === "mousedown" ? "onMouseDown" : "onClick", a = (m = "click") => {
540
+ e.open && c || (t ? e.toggle(m) : e.setOpen(!0, m));
541
+ };
542
+ return {
543
+ ...i,
544
+ [u]: k(i[u], (m) => {
545
+ f && (m.detail ?? 0) !== 0 || a("click");
546
+ }),
547
+ onKeyDown: k(i.onKeyDown, (m) => {
548
+ s && (m.key !== "Enter" && m.key !== " " || (m.preventDefault(), !(e.open && c) && (t ? e.toggle("click") : e.setOpen(!0, "click"))));
549
+ })
550
+ };
551
+ }
552
+ }), [e, r, o, f, s, c, t]);
553
+ }
554
+ function ft(e, n = {}) {
555
+ const { enabled: r = !0, delay: t = 0, closeDelay: o, mouseOnly: f = !1, move: s = !0, restMs: c = 0 } = n, i = re(Pe), u = R(`delay-group-${Math.random().toString(36).slice(2, 9)}`), a = R(null), m = R(null), p = D(() => {
556
+ a.current && window.clearTimeout(a.current), a.current = null, m.current && window.clearTimeout(m.current), m.current = null;
557
+ }, []), l = D((d) => {
558
+ p();
559
+ const y = o ?? ee(t, "close"), P = d ? i != null && i.instantPhase || i != null && i.currentId && i.currentId !== u.current ? 1 : ee(t, "open") : y;
560
+ a.current = window.setTimeout(() => {
561
+ d ? i == null || i.beginInstantPhase(u.current) : (i == null ? void 0 : i.currentIdRef.current) === u.current && (i.setCurrentId(null), i.scheduleInstantPhaseReset(u.current)), e.setOpen(d, "hover");
562
+ }, P);
563
+ }, [p, o, e, t, i]);
564
+ return K(() => p, [p]), V(() => ({
565
+ getReferenceProps(d = {}) {
566
+ return r ? {
567
+ ...d,
568
+ onMouseEnter: k(d.onMouseEnter, (y) => {
569
+ if (!(f && y.pointerType && y.pointerType !== "mouse")) {
570
+ if (c > 0) {
571
+ p(), m.current = window.setTimeout(() => l(!0), c);
572
+ return;
573
+ }
574
+ l(!0);
575
+ }
576
+ }),
577
+ onMouseLeave: k(d.onMouseLeave, () => l(!1))
578
+ } : d;
579
+ },
580
+ getFloatingProps(d = {}) {
581
+ return r ? {
582
+ ...d,
583
+ onMouseEnter: k(d.onMouseEnter, () => {
584
+ s && l(!0);
585
+ }),
586
+ onMouseLeave: k(d.onMouseLeave, () => l(!1))
587
+ } : d;
588
+ }
589
+ }), [p, r, f, s, c, l]);
590
+ }
591
+ function ct(e, n = {}) {
592
+ const { enabled: r = !0, visibleOnly: t = !0 } = n;
593
+ return V(() => ({
594
+ getReferenceProps(o = {}) {
595
+ return r ? {
596
+ ...o,
597
+ onFocus: k(o.onFocus, (f) => {
598
+ t && !Ye(f) || e.setOpen(!0, "focus");
599
+ }),
600
+ onBlur: k(o.onBlur, (f) => {
601
+ const s = f.relatedTarget;
602
+ Q(e.elements.floating, s) || e.setOpen(!1, "focus");
603
+ })
604
+ } : o;
605
+ },
606
+ getFloatingProps(o = {}) {
607
+ return r ? {
608
+ ...o,
609
+ onBlur: k(o.onBlur, (f) => {
610
+ const s = f.relatedTarget;
611
+ Q(e.elements.reference, s) || Q(e.elements.floating, s) || e.setOpen(!1, "focus");
612
+ })
613
+ } : o;
614
+ }
615
+ }), [e, r, t]);
616
+ }
617
+ function mt(e, n = {}) {
618
+ const { role: r = e.role, enabled: t = !0 } = n;
619
+ return V(() => ({
620
+ getReferenceProps(o = {}) {
621
+ return t ? {
622
+ ...o,
623
+ "aria-haspopup": r,
624
+ "aria-expanded": e.open ? "true" : "false",
625
+ "aria-controls": e.floatingId
626
+ } : o;
627
+ },
628
+ getFloatingProps(o = {}) {
629
+ return t ? {
630
+ ...o,
631
+ id: e.floatingId,
632
+ role: r
633
+ } : o;
634
+ }
635
+ }), [e.floatingId, e.open, t, r]);
636
+ }
637
+ function dt(e, n = {}) {
638
+ const {
639
+ enabled: r = !0,
640
+ escapeKey: t = !0,
641
+ outsidePress: o = !0,
642
+ outsidePressEvent: f = "pointerdown",
643
+ ancestorScroll: s = !1,
644
+ referencePress: c = !1,
645
+ referencePressEvent: i = "pointerdown",
646
+ nodeId: u = null
647
+ } = n, a = we(), m = D((l) => {
648
+ if (!a || !u)
649
+ return !1;
650
+ const d = Se(l);
651
+ return !d || d === u ? !1 : ke(a, d, u);
652
+ }, [u, a]), p = D((l = "dismiss") => {
653
+ u && (a == null || a.closeDescendants(u, l)), e.setOpen(!1, l);
654
+ }, [e, u, a]);
655
+ return K(() => {
656
+ if (!r || !e.open)
657
+ return;
658
+ const l = (P) => {
659
+ o && (Q(e.elements.reference, P.target) || Q(e.elements.floating, P.target) || m(P.target) || typeof o == "function" && !o(P) || p("dismiss"));
660
+ }, d = (P) => {
661
+ !t || P.key !== "Escape" || P.defaultPrevented || m(P.target) || (P.preventDefault(), p("dismiss"));
662
+ }, y = () => {
663
+ s && p("dismiss");
664
+ };
665
+ return document.addEventListener(f, l, !0), document.addEventListener("keydown", d), window.addEventListener("scroll", y, !0), () => {
666
+ document.removeEventListener(f, l, !0), document.removeEventListener("keydown", d), window.removeEventListener("scroll", y, !0);
667
+ };
668
+ }, [
669
+ s,
670
+ p,
671
+ e,
672
+ r,
673
+ t,
674
+ m,
675
+ o,
676
+ f
677
+ ]), V(() => ({
678
+ getReferenceProps(l = {}) {
679
+ if (!r && !u)
680
+ return l;
681
+ const d = i === "click" ? "onClick" : i === "mousedown" ? "onMouseDown" : "onPointerDown", y = {
682
+ ...l,
683
+ "data-floating-reference-id": u ?? l["data-floating-reference-id"]
684
+ };
685
+ return c ? {
686
+ ...y,
687
+ [d]: k(l[d], () => {
688
+ e.open && p("dismiss");
689
+ })
690
+ } : y;
691
+ },
692
+ getFloatingProps(l = {}) {
693
+ if (!r && !u)
694
+ return l;
695
+ const d = {
696
+ ...l,
697
+ "data-floating-node-id": u ?? l["data-floating-node-id"]
698
+ };
699
+ return r ? {
700
+ ...d,
701
+ onKeyDown: k(l.onKeyDown, (y) => {
702
+ t && y.key === "Escape" && (y.preventDefault(), p("dismiss"));
703
+ })
704
+ } : d;
705
+ }
706
+ }), [p, e, r, t, u, c, i]);
707
+ }
708
+ function pt(e, n) {
709
+ const {
710
+ enabled: r = !0,
711
+ listRef: t,
712
+ activeIndex: o,
713
+ onNavigate: f,
714
+ loop: s = !0,
715
+ orientation: c = "vertical",
716
+ cols: i = 1,
717
+ rtl: u = !1,
718
+ focusItemOnOpen: a = !1,
719
+ openOnArrowKeyDown: m = !1,
720
+ nested: p = !1,
721
+ nodeId: l = null,
722
+ getItemHasSubmenu: d,
723
+ getItemExpanded: y,
724
+ onOpenSubmenu: P,
725
+ onCloseSubmenu: F,
726
+ openSubmenuKey: E = u ? "ArrowLeft" : "ArrowRight",
727
+ closeSubmenuKey: M = u ? "ArrowRight" : "ArrowLeft",
728
+ restoreFocusOnClose: I = p
729
+ } = n, L = D(() => {
730
+ var g;
731
+ return (g = t == null ? void 0 : t.current) == null ? void 0 : g.filter(Boolean);
732
+ }, [t]), B = D((g) => {
733
+ if (!(g instanceof Element))
734
+ return null;
735
+ const b = g.closest("[data-index]");
736
+ if (!b)
737
+ return null;
738
+ const A = Number(b.dataset.index);
739
+ return Number.isFinite(A) ? A : null;
740
+ }, []), T = D(() => {
741
+ const g = I && Ce(I) ? I.current : e.elements.reference;
742
+ !I || !g || requestAnimationFrame(() => g.focus());
743
+ }, [e.elements, I]), N = D((g, b) => {
744
+ var z;
745
+ const A = L();
746
+ if (!(A != null && A.length))
747
+ return;
748
+ const C = A.indexOf(document.activeElement);
749
+ let v = (b ?? o ?? (C >= 0 ? C : -1)) + g;
750
+ s ? v = (v + A.length) % A.length : v = Math.max(0, Math.min(A.length - 1, v)), f(v), (z = A[v]) == null || z.focus();
751
+ }, [o, L, s, f]);
752
+ K(() => {
753
+ if (!r || !e.open || !(a === !0 || a === "auto"))
754
+ return;
755
+ const g = o ?? 0;
756
+ let b = 0, A = !1, C = 0;
757
+ const O = () => {
758
+ var Y;
759
+ if (A)
760
+ return;
761
+ const v = L();
762
+ if (!(v != null && v.length)) {
763
+ C < 4 && (C += 1, b = requestAnimationFrame(O));
764
+ return;
765
+ }
766
+ const z = v.indexOf(document.activeElement);
767
+ if (z >= 0) {
768
+ f(z);
769
+ return;
770
+ }
771
+ f(g), (Y = v[g]) == null || Y.focus();
772
+ };
773
+ return b = requestAnimationFrame(O), () => {
774
+ A = !0, cancelAnimationFrame(b);
775
+ };
776
+ }, [o, e.open, r, a, L, f]);
777
+ const U = D((g) => {
778
+ const b = c === "vertical" || c === "both", A = c === "horizontal" || c === "both";
779
+ return b && g === "ArrowDown" ? i : b && g === "ArrowUp" ? -i : A && g === (u ? "ArrowLeft" : "ArrowRight") ? 1 : A && g === (u ? "ArrowRight" : "ArrowLeft") ? -1 : 0;
780
+ }, [i, c, u]), j = D((g) => {
781
+ var C, O;
782
+ const b = B(g.target) ?? o;
783
+ if (p && g.key === E && b != null && (d != null && d(b))) {
784
+ g.preventDefault(), f(b), P == null || P(b);
785
+ return;
786
+ }
787
+ if (p && F && g.key === M) {
788
+ g.preventDefault(), F == null || F(), T();
789
+ return;
790
+ }
791
+ const A = U(g.key);
792
+ if (A)
793
+ g.preventDefault(), N(A, b);
794
+ else if (g.key === "Home") {
795
+ const v = L();
796
+ if (!(v != null && v.length))
797
+ return;
798
+ g.preventDefault(), f(0), (C = v[0]) == null || C.focus();
799
+ } else if (g.key === "End") {
800
+ const v = L();
801
+ if (!(v != null && v.length))
802
+ return;
803
+ g.preventDefault(), f(v.length - 1), (O = v[v.length - 1]) == null || O.focus();
804
+ }
805
+ }, [
806
+ o,
807
+ M,
808
+ T,
809
+ U,
810
+ d,
811
+ B,
812
+ L,
813
+ N,
814
+ p,
815
+ F,
816
+ f,
817
+ P,
818
+ E
819
+ ]);
820
+ return V(() => ({
821
+ getReferenceProps(g = {}) {
822
+ return !r || !m ? g : {
823
+ ...g,
824
+ onKeyDown: k(g.onKeyDown, (b) => {
825
+ if (e.open || !U(b.key))
826
+ return;
827
+ const C = L();
828
+ if (b.preventDefault(), C != null && C.length) {
829
+ const O = b.key === "ArrowUp" || b.key === (u ? "ArrowRight" : "ArrowLeft") ? C.length - 1 : 0;
830
+ f(O);
831
+ } else
832
+ b.key !== "ArrowUp" && b.key !== (u ? "ArrowRight" : "ArrowLeft") && f(0);
833
+ e.setOpen(!0, "list-navigation");
834
+ })
835
+ };
836
+ },
837
+ getFloatingProps(g = {}) {
838
+ return r ? {
839
+ ...g,
840
+ "data-floating-node-id": l ?? g["data-floating-node-id"],
841
+ "aria-activedescendant": o != null ? `floating-item-${o}` : void 0,
842
+ onKeyDown: k(g.onKeyDown, j)
843
+ } : g;
844
+ },
845
+ getItemProps(g = {}) {
846
+ const b = g["data-index"], A = typeof b == "number" ? b : Number(b), C = Number.isFinite(A) ? d == null ? void 0 : d(A) : !1;
847
+ return {
848
+ ...g,
849
+ id: typeof b == "number" ? `floating-item-${b}` : g.id,
850
+ tabIndex: b === o ? 0 : -1,
851
+ "data-active": b === o ? "" : void 0,
852
+ "aria-haspopup": C ? "menu" : g["aria-haspopup"],
853
+ "aria-expanded": C ? String((y == null ? void 0 : y(A)) ?? !1) : g["aria-expanded"],
854
+ onKeyDown: k(g.onKeyDown, j)
855
+ };
856
+ }
857
+ }), [
858
+ o,
859
+ e,
860
+ r,
861
+ y,
862
+ d,
863
+ j,
864
+ U,
865
+ L,
866
+ l,
867
+ f,
868
+ m,
869
+ u
870
+ ]);
871
+ }
872
+ function gt(e, n) {
873
+ const {
874
+ enabled: r = !0,
875
+ labelsRef: t,
876
+ listRef: o,
877
+ activeIndex: f,
878
+ onMatch: s,
879
+ resetMs: c = 750,
880
+ selectedIndex: i = null,
881
+ onTypingChange: u,
882
+ findMatch: a
883
+ } = n, m = R(""), p = R(null);
884
+ return K(() => () => {
885
+ p.current && window.clearTimeout(p.current);
886
+ }, []), V(() => ({
887
+ getFloatingProps(l = {}) {
888
+ return r ? {
889
+ ...l,
890
+ onKeyDown: k(l.onKeyDown, (d) => {
891
+ var E, M;
892
+ if (d.key.length !== 1 || d.altKey || d.ctrlKey || d.metaKey)
893
+ return;
894
+ m.current += d.key.toLocaleLowerCase(), u == null || u(!0), p.current && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
895
+ m.current = "", u == null || u(!1);
896
+ }, c);
897
+ const y = t.current.map((I) => I.toLocaleLowerCase()), P = a ? a(y, m.current, f) : (() => {
898
+ const I = (f ?? i) == null ? 0 : (f ?? i) + 1;
899
+ return y.map((B, T) => (I + T) % y.length).find((B) => {
900
+ var T;
901
+ return (T = y[B]) == null ? void 0 : T.startsWith(m.current);
902
+ }) ?? null;
903
+ })(), F = P == null || P < 0 ? null : P;
904
+ F != null && (d.preventDefault(), s(F), (M = (E = o == null ? void 0 : o.current) == null ? void 0 : E[F]) == null || M.focus(), e.setOpen(!0, "typeahead"));
905
+ })
906
+ } : l;
907
+ }
908
+ }), [f, e, r, a, t, o, s, u, c, i]);
909
+ }
910
+ function yt(e, n = {}) {
911
+ const { duration: r = 160, initial: t, open: o, close: f } = n, [s, c] = H(e.open), [i, u] = H(e.open ? "open" : "unmounted"), a = ee(r, "open"), m = ee(r, "close");
912
+ return K(() => {
913
+ if (e.open) {
914
+ c(!0), u("initial");
915
+ const l = requestAnimationFrame(() => u("open"));
916
+ return () => cancelAnimationFrame(l);
917
+ }
918
+ if (!s)
919
+ return;
920
+ u("close");
921
+ const p = window.setTimeout(() => {
922
+ c(!1), u("unmounted");
923
+ }, m);
924
+ return () => window.clearTimeout(p);
925
+ }, [m, e.open, s]), {
926
+ isMounted: s,
927
+ status: i,
928
+ styles: {
929
+ transition: `opacity ${i === "close" ? m : a}ms ease, transform ${i === "close" ? m : a}ms ease`,
930
+ ...i === "initial" ? { opacity: 0, transform: "scale(0.98)", ...t } : null,
931
+ ...i === "open" ? { opacity: 1, transform: "scale(1)", ...o } : null,
932
+ ...i === "close" ? { opacity: 0, transform: "scale(0.98)", ...f } : null
933
+ }
934
+ };
935
+ }
936
+ function xt(e, n = {}) {
937
+ const { enabled: r = !0, axis: t = "both" } = n, o = R({ x: 0, y: 0 });
938
+ return V(() => ({
939
+ getReferenceProps(f = {}) {
940
+ return r ? {
941
+ ...f,
942
+ onPointerMove: k(f.onPointerMove, (s) => {
943
+ o.current = {
944
+ x: t === "y" ? o.current.x : s.clientX,
945
+ y: t === "x" ? o.current.y : s.clientY
946
+ }, e.refs.setPositionReference({
947
+ contextElement: e.elements.reference || void 0,
948
+ getBoundingClientRect: () => new DOMRect(o.current.x, o.current.y, 0, 0)
949
+ }), e.update();
950
+ })
951
+ } : f;
952
+ }
953
+ }), [t, e, r]);
954
+ }
955
+ const Ne = ae(null);
956
+ function wt({ children: e, elementsRef: n, labelsRef: r }) {
957
+ const t = R([]), o = R([]), f = V(() => ({
958
+ elementsRef: n || t,
959
+ labelsRef: r || o
960
+ }), [n, r]);
961
+ return /* @__PURE__ */ S.createElement(Ne.Provider, { value: f }, e);
962
+ }
963
+ function Pt() {
964
+ return re(Ne);
965
+ }
966
+ const bt = S.forwardRef(function({
967
+ context: n,
968
+ width: r = 14,
969
+ height: t = 8,
970
+ fill: o = "currentColor",
971
+ stroke: f,
972
+ strokeWidth: s = 1,
973
+ style: c,
974
+ ...i
975
+ }, u) {
976
+ const a = n.coords.arrow, m = n.coords.placement.split("-")[0], p = {
977
+ top: `M0 ${s / 2} L${r / 2} ${t - s / 2} L${r} ${s / 2}`,
978
+ bottom: `M0 ${t - s / 2} L${r / 2} ${s / 2} L${r} ${t - s / 2}`,
979
+ left: `M${s / 2} ${s / 2} L${r - s / 2} ${t / 2} L${s / 2} ${t - s / 2}`,
980
+ right: `M${r - s / 2} ${s / 2} L${s / 2} ${t / 2} L${r - s / 2} ${t - s / 2}`
981
+ }, l = {
982
+ position: "absolute",
983
+ width: r,
984
+ height: t,
985
+ pointerEvents: "none",
986
+ overflow: "visible",
987
+ left: typeof (a == null ? void 0 : a.x) == "number" ? Math.round(a.x) : void 0,
988
+ top: typeof (a == null ? void 0 : a.y) == "number" ? Math.round(a.y) : void 0,
989
+ transform: a != null && a.centerOffset ? `translate(${Math.round(a.centerOffset * (m === "top" || m === "bottom" ? 0.15 : 0))}px, ${Math.round(a.centerOffset * (m === "left" || m === "right" ? 0.15 : 0))}px)` : void 0
990
+ };
991
+ return m === "top" && (l.top = void 0, l.bottom = -t + s), m === "bottom" && (l.top = -t + s), m === "left" && (l.left = void 0, l.right = -r + s), m === "right" && (l.left = -r + s, l.top = typeof (a == null ? void 0 : a.y) == "number" ? Math.round(a.y) : void 0), /* @__PURE__ */ S.createElement(
992
+ "div",
993
+ {
994
+ ...i,
995
+ ref: xe(n.refs.setArrow, u),
996
+ "aria-hidden": "true",
997
+ "data-side": m,
998
+ "data-center-offset": typeof (a == null ? void 0 : a.centerOffset) == "number" ? String(Math.round(a.centerOffset)) : void 0,
999
+ style: { ...l, ...c }
1000
+ },
1001
+ /* @__PURE__ */ S.createElement(
1002
+ "svg",
1003
+ {
1004
+ width: r,
1005
+ height: t,
1006
+ viewBox: `0 0 ${r} ${t}`,
1007
+ style: { display: "block", overflow: "visible" }
1008
+ },
1009
+ /* @__PURE__ */ S.createElement(
1010
+ "path",
1011
+ {
1012
+ d: p[m] || p.bottom,
1013
+ fill: o,
1014
+ stroke: f,
1015
+ strokeWidth: f ? s : 0,
1016
+ strokeLinejoin: "round"
1017
+ }
1018
+ )
1019
+ )
1020
+ );
1021
+ });
1022
+ function Dt({ children: e, root: n }) {
1023
+ const [r, t] = H(!1);
1024
+ return K(() => t(!0), []), r ? _e(e, n || document.body) : null;
1025
+ }
1026
+ function vt({ lockScroll: e = !1, style: n, ...r }) {
1027
+ return K(() => {
1028
+ if (!e)
1029
+ return;
1030
+ const t = document.body.style.overflow;
1031
+ return document.body.style.overflow = "hidden", () => {
1032
+ document.body.style.overflow = t;
1033
+ };
1034
+ }, [e]), /* @__PURE__ */ S.createElement("div", { ...r, style: { position: "fixed", inset: 0, ...n } });
1035
+ }
1036
+ function ht({
1037
+ context: e,
1038
+ children: n,
1039
+ modal: r = !1,
1040
+ initialFocus: t = !0,
1041
+ returnFocus: o = !0,
1042
+ guards: f = !0,
1043
+ disabled: s = !1,
1044
+ closeOnFocusOut: c = !r,
1045
+ outsideElementsInert: i = !1,
1046
+ visuallyHiddenDismiss: u = !1
1047
+ }) {
1048
+ const a = we(), m = R(null), p = R(null), l = R(null), d = R(null), y = R(!1), P = D(() => {
1049
+ var E;
1050
+ return typeof t == "number" ? le(e.elements.floating)[t] || null : typeof t == "object" && t && "current" in t ? t.current : ((E = e.elements.floating) == null ? void 0 : E.querySelector("[autofocus]")) || le(e.elements.floating)[0] || null;
1051
+ }, [e.elements.floating, t]), F = D((E = !1) => {
1052
+ const M = le(e.elements.floating), I = E ? M[M.length - 1] : M[0];
1053
+ I == null || I.focus();
1054
+ }, [e.elements.floating]);
1055
+ return Le(() => {
1056
+ var E;
1057
+ if (!(!e.open || s))
1058
+ return y.current = !1, d.current = document.activeElement, t && (y.current = !0, (E = P()) == null || E.focus()), () => {
1059
+ var M;
1060
+ y.current = !1, o && (Ce(o) ? (M = o.current) == null || M.focus() : d.current instanceof HTMLElement && d.current.focus());
1061
+ };
1062
+ }, [e.open, s, t, P, o]), K(() => {
1063
+ if (s || !e.open)
1064
+ return;
1065
+ const E = (M) => {
1066
+ var j, g, b;
1067
+ const I = M.target;
1068
+ if (!I)
1069
+ return;
1070
+ const L = Q(m.current, I) || Q(e.elements.floating, I), B = Q(e.elements.reference, I), T = ((j = e.elements.floating) == null ? void 0 : j.dataset.floatingNodeId) || ((g = e.elements.reference) == null ? void 0 : g.dataset.floatingReferenceId) || null, N = Se(I), U = !!T && !!N && ke(a, N, T);
1071
+ if (!(L || B || U)) {
1072
+ if (r) {
1073
+ if (!y.current && t) {
1074
+ y.current = !0, (b = P()) == null || b.focus();
1075
+ return;
1076
+ }
1077
+ F();
1078
+ return;
1079
+ }
1080
+ c && e.setOpen(!1, "dismiss");
1081
+ }
1082
+ };
1083
+ return document.addEventListener("focusin", E), () => {
1084
+ document.removeEventListener("focusin", E);
1085
+ };
1086
+ }, [c, e, e.open, s, F, t, r, P, a]), K(() => {
1087
+ var B;
1088
+ if (!i || !r || !e.open || s)
1089
+ return;
1090
+ const E = ((B = m.current) == null ? void 0 : B.parentElement) || document.body, M = Array.from(E.children), I = new Set(
1091
+ [
1092
+ m.current,
1093
+ e.elements.floating,
1094
+ p.current,
1095
+ l.current
1096
+ ].filter(Boolean)
1097
+ ), L = /* @__PURE__ */ new Map();
1098
+ return M.forEach((T) => {
1099
+ Array.from(I).some((N) => N === T || N.contains(T) || T.contains(N)) || (L.set(T, T.getAttribute("aria-hidden")), T.setAttribute("aria-hidden", "true"));
1100
+ }), () => {
1101
+ L.forEach((T, N) => {
1102
+ T == null ? N.removeAttribute("aria-hidden") : N.setAttribute("aria-hidden", T);
1103
+ });
1104
+ };
1105
+ }, [e.elements.floating, e.open, s, r, i]), s ? /* @__PURE__ */ S.createElement(S.Fragment, null, n) : /* @__PURE__ */ S.createElement(S.Fragment, null, r && f ? /* @__PURE__ */ S.createElement("span", { ref: p, tabIndex: 0, "data-floating-focus-guard": "", "aria-hidden": "true", onFocus: () => F(!0) }) : null, /* @__PURE__ */ S.createElement(
1106
+ "div",
1107
+ {
1108
+ ref: m,
1109
+ role: r ? "dialog" : void 0,
1110
+ "aria-modal": r ? "true" : void 0,
1111
+ onKeyDown: (E) => {
1112
+ if (!r || E.key !== "Tab")
1113
+ return;
1114
+ const M = le(e.elements.floating);
1115
+ if (!M.length)
1116
+ return;
1117
+ const I = M[0], L = M[M.length - 1];
1118
+ E.shiftKey && document.activeElement === I ? (E.preventDefault(), L.focus()) : !E.shiftKey && document.activeElement === L && (E.preventDefault(), I.focus());
1119
+ }
1120
+ },
1121
+ u ? /* @__PURE__ */ S.createElement(
1122
+ "button",
1123
+ {
1124
+ type: "button",
1125
+ style: {
1126
+ position: "absolute",
1127
+ width: 1,
1128
+ height: 1,
1129
+ padding: 0,
1130
+ margin: -1,
1131
+ overflow: "hidden",
1132
+ clip: "rect(0, 0, 0, 0)",
1133
+ whiteSpace: "nowrap",
1134
+ border: 0
1135
+ },
1136
+ onClick: () => e.setOpen(!1, "dismiss")
1137
+ },
1138
+ typeof u == "string" ? u : "Dismiss"
1139
+ ) : null,
1140
+ n
1141
+ ), r && f ? /* @__PURE__ */ S.createElement("span", { ref: l, tabIndex: 0, "data-floating-focus-guard": "", "aria-hidden": "true", onFocus: () => F(!1) }) : null);
1142
+ }
1143
+ const Oe = ae(null), Ze = ae(null);
1144
+ function At({ children: e }) {
1145
+ const n = R([]), [r, t] = H(0), o = V(() => new EventTarget(), []), f = D((p) => (n.current = [...n.current.filter((l) => l.id !== p.id), p], t((l) => l + 1), () => {
1146
+ n.current = n.current.filter((l) => l.id !== p.id), t((l) => l + 1);
1147
+ }), []), s = D((p, l = {}) => {
1148
+ o.dispatchEvent(new CustomEvent(p, { detail: l }));
1149
+ }, [o]), c = D((p, l) => {
1150
+ const d = l;
1151
+ return o.addEventListener(p, d), () => {
1152
+ o.removeEventListener(p, d);
1153
+ };
1154
+ }, [o]), i = D((p) => n.current.find((l) => l.id === p) || null, []), u = D((p) => n.current.filter((l) => (l.parentId ?? null) === (p ?? null)), []), a = D((p, l = "dismiss") => {
1155
+ const d = (y) => {
1156
+ n.current.filter((P) => P.parentId === y).forEach((P) => {
1157
+ var F;
1158
+ (F = P.setOpen) == null || F.call(P, !1, l), d(P.id);
1159
+ });
1160
+ };
1161
+ d(p);
1162
+ }, []), m = V(() => ({
1163
+ nodes: n,
1164
+ register: f,
1165
+ events: o,
1166
+ emit: s,
1167
+ on: c,
1168
+ getNode: i,
1169
+ getChildren: u,
1170
+ closeDescendants: a
1171
+ }), [a, s, o, u, i, c, f, r]);
1172
+ return /* @__PURE__ */ S.createElement(Oe.Provider, { value: m }, e);
1173
+ }
1174
+ function we() {
1175
+ return re(Oe);
1176
+ }
1177
+ function Je() {
1178
+ return re(Ze);
1179
+ }
1180
+ function Et(e) {
1181
+ const n = we(), r = Je(), t = R(`floating-node-${Math.random().toString(36).slice(2, 9)}`), o = R(void 0);
1182
+ let f, s;
1183
+ typeof e == "string" || e == null ? f = e ?? r : (f = e.parentId ?? r, s = e.setOpen), K(() => {
1184
+ o.current = s;
1185
+ }, [s]);
1186
+ const c = D((u, a) => {
1187
+ var m;
1188
+ (m = o.current) == null || m.call(o, u, a);
1189
+ }, []), i = n == null ? void 0 : n.register;
1190
+ return K(() => i == null ? void 0 : i({ id: t.current, parentId: f, setOpen: c }), [c, f, i]), t.current;
1191
+ }
1192
+ const Pe = ae(null);
1193
+ function It({ children: e, delay: n = 250, closeDelay: r }) {
1194
+ const t = R(null), [o, f] = H(null), [s, c] = H(!1), i = R(null), u = ee(n, "open"), a = r ?? (ee(n, "close") || 120), m = D(() => {
1195
+ t.current && (window.clearTimeout(t.current), t.current = null);
1196
+ }, []);
1197
+ K(() => {
1198
+ i.current = o;
1199
+ }, [o]);
1200
+ const p = D((y) => {
1201
+ m(), i.current = y, f(y), c(!0);
1202
+ }, [m]), l = D((y) => {
1203
+ m(), t.current = window.setTimeout(() => {
1204
+ (i.current === y || i.current == null) && (i.current = null, f(null), c(!1)), t.current = null;
1205
+ }, a);
1206
+ }, [m, a]);
1207
+ K(() => m, [m]);
1208
+ const d = V(() => ({
1209
+ delay: u,
1210
+ closeDelay: a,
1211
+ timeoutRef: t,
1212
+ currentId: o,
1213
+ currentIdRef: i,
1214
+ setCurrentId: f,
1215
+ instantPhase: s,
1216
+ setInstantPhase: c,
1217
+ beginInstantPhase: p,
1218
+ scheduleInstantPhaseReset: l,
1219
+ cancelInstantPhaseReset: m
1220
+ }), [
1221
+ p,
1222
+ m,
1223
+ o,
1224
+ s,
1225
+ u,
1226
+ a,
1227
+ l
1228
+ ]);
1229
+ return /* @__PURE__ */ S.createElement(Pe.Provider, { value: d }, e);
1230
+ }
1231
+ function Rt() {
1232
+ const e = re(Pe);
1233
+ return e ? {
1234
+ ...e,
1235
+ isInstantPhase: e.instantPhase
1236
+ } : null;
1237
+ }
1238
+ const Mt = S.forwardRef(function({ children: n, orientation: r = "vertical", loop: t = !0, cols: o = 1, rtl: f = !1, ...s }, c) {
1239
+ const i = R(null);
1240
+ return /* @__PURE__ */ S.createElement(
1241
+ "div",
1242
+ {
1243
+ ...s,
1244
+ ref: xe(i, c),
1245
+ role: s.role || "group",
1246
+ onKeyDown: k(s.onKeyDown, (u) => {
1247
+ var P, F;
1248
+ const a = Array.from(((P = i.current) == null ? void 0 : P.querySelectorAll("[data-composite-item]")) || []);
1249
+ if (!a.length)
1250
+ return;
1251
+ const m = a.indexOf(document.activeElement), p = r === "vertical" || r === "both", l = r === "horizontal" || r === "both";
1252
+ let d = 0;
1253
+ if (p && u.key === "ArrowDown" ? d = o : p && u.key === "ArrowUp" ? d = -o : l && u.key === (f ? "ArrowLeft" : "ArrowRight") ? d = 1 : l && u.key === (f ? "ArrowRight" : "ArrowLeft") && (d = -1), !d && u.key !== "Home" && u.key !== "End")
1254
+ return;
1255
+ u.preventDefault();
1256
+ let y = m;
1257
+ u.key === "Home" ? y = 0 : u.key === "End" ? y = a.length - 1 : y += d, t && u.key !== "Home" && u.key !== "End" ? y = (y + a.length) % a.length : y = Math.max(0, Math.min(a.length - 1, y)), (F = a[y]) == null || F.focus();
1258
+ })
1259
+ },
1260
+ n
1261
+ );
1262
+ });
312
1263
  export {
313
- Un as Accordion,
314
- oe as Alert,
315
- ne as AlertActions,
316
- ie as AlertDescription,
317
- ti as AlertDialog,
318
- oi as AlertDialogActions,
319
- ni as AlertDialogContent,
320
- ii as AlertDialogDescription,
321
- ai as AlertDialogIcon,
322
- mi as AlertDialogProvider,
323
- pi as AlertDialogTitle,
324
- ae as AlertIcon,
325
- pe as AlertTitle,
326
- an as Anchor,
327
- Di as AnimatedBeam,
328
- Ai as AnimatedList,
329
- Ni as AnimatedNumber,
330
- ci as AnimatedText,
331
- So as AppHeader,
332
- vo as AppHeaderCenter,
333
- ko as AppHeaderEnd,
334
- Fo as AppHeaderStart,
335
- Io as AppHeaderSubtitle,
336
- Ro as AppHeaderTitle,
337
- Dn as AspectRatio,
338
- Pn as Avatar,
339
- qe as Badge,
340
- Nt as BlockControls,
341
- to as Box,
342
- To as Breadcrumb,
343
- _ as Button,
344
- ur as Calendar,
345
- Zn as Card,
346
- _e as Carousel,
347
- Je as Chart,
348
- fn as Checkbox,
349
- rr as CodeBlock,
350
- or as CodeSnippet,
351
- On as Collapsible,
352
- Qo as Collection,
353
- dr as ColorPicker,
354
- ze as Combobox,
355
- Ot as Command,
356
- Kt as CommandItem,
357
- $t as CommandPalette,
358
- Ut as CommandPaletteItem,
359
- xo as Container,
360
- jt as ContextMenu,
361
- Re as ControlGroup,
362
- ir as CopyButton,
363
- Qe as DataTable,
364
- pr as DataViewToolbar,
365
- wr as DateField,
366
- hr as DatePicker,
367
- br as DateRangePicker,
368
- Vr as DateRangeTimePicker,
369
- Gr as DateTimePicker,
370
- Le as Description,
371
- st as Dialog,
372
- ct as DialogProvider,
373
- jn as DirectionProvider,
374
- _o as DismissableLayer,
375
- Ci as Dock,
376
- Vo as Drawer,
377
- me as Dropdown,
378
- se as DropdownContent,
379
- le as DropdownItem,
380
- ce as DropdownSectionLabel,
381
- ue as DropdownSeparator,
382
- xe as DropdownTrigger,
383
- Te as Dropzone,
384
- Ke as EmptyState,
385
- Fe as Field,
386
- Be as FieldError,
387
- Ee as Fieldset,
388
- Me as FileUpload,
389
- He as FiltersBar,
390
- no as Flex,
391
- Bt as FloatingToolbar,
392
- rn as FocusScope,
393
- eo as Form,
394
- Or as Gantt,
395
- ao as Grid,
396
- Xn as HoverCard,
397
- Ct as Icon,
398
- Pi as IconCloud,
399
- Br as InlineEdit,
400
- ge as Input,
401
- Gt as Kbd,
402
- ei as Label,
403
- Oo as Layout,
404
- Jo as Listbox,
405
- vi as Marquee,
406
- so as MasonryGrid,
407
- bt as Menu,
408
- Dt as MenuItem,
409
- wt as MenuSectionLabel,
410
- Pt as MenuSeparator,
411
- ft as Menubar,
412
- vn as Meter,
413
- lr as MetricCard,
414
- Mr as MultiSelect,
415
- Zr as NavigationMenu,
416
- _r as NavigationMenuContent,
417
- et as NavigationMenuIndicator,
418
- rt as NavigationMenuItem,
419
- tt as NavigationMenuLink,
420
- ot as NavigationMenuList,
421
- nt as NavigationMenuRoot,
422
- it as NavigationMenuTrigger,
423
- at as NavigationMenuViewport,
424
- Cr as NumberField,
425
- gi as NumberTicker,
426
- Pe as OTPInput,
427
- Mi as Orbiter,
428
- Bo as PageHeader,
429
- No as PageToolbar,
430
- Wn as Pagination,
431
- bo as Panel,
432
- Do as PanelGroup,
433
- Ae as PasswordField,
434
- ye as PinInput,
435
- fo as PlacementGrid,
436
- Zt as PluginPanel,
437
- dt as Popover,
438
- Fn as Portal,
439
- on as Positioner,
440
- Cn as Presence,
441
- Mn as Progress,
442
- Xr as QuickActions,
443
- sn as Radio,
444
- cn as RadioGroup,
445
- jr as Rating,
446
- Go as RecordHeader,
447
- Yo as RovingFocusGroup,
448
- Rn as ScrollArea,
449
- co as Section,
450
- Fi as Select,
451
- Xt as SelectionPopup,
452
- Bn as Separator,
453
- Vt as Shortcut,
454
- ho as Sidebar,
455
- Bi as Skeleton,
456
- Ri as Slider,
457
- Nn as Slot,
458
- Rr as Sortable,
459
- xi as SpinningText,
460
- vr as SplitButton,
461
- wo as Splitter,
462
- mr as Stat,
463
- Wr as Stepper,
464
- xn as Switch,
465
- $e as Table,
466
- ht as Tabs,
467
- De as TagsInput,
468
- ve as Textarea,
469
- Wo as ThemeProvider,
470
- Pr as TimeField,
471
- Nr as TimePicker,
472
- Ye as Timeline,
473
- Rt as Toast,
474
- Mt as ToastAPI,
475
- St as ToastProvider,
476
- gn as Toggle,
477
- An as ToggleGroup,
478
- Gn as Toolbar,
479
- re as Tooltip,
480
- Fr as TransferList,
481
- yo as Tree,
482
- Vn as VisuallyHidden,
483
- Ur as Wizard,
484
- vt as toast,
485
- Vi as toastAdvanced,
486
- kt as toastApi,
487
- qi as toastLegacy,
488
- Oi as toastPro,
489
- si as useAlertDialog,
490
- Hi as useAnimatedNumber,
491
- Gi as useAnimatedNumberValue,
492
- ut as useDialog,
493
- X as useFloating,
494
- J as useForm,
495
- $o as useTheme,
496
- Ft as useToast
1264
+ As as Accordion,
1265
+ Nt as Alert,
1266
+ Ot as AlertActions,
1267
+ $t as AlertDescription,
1268
+ ks as AlertDialog,
1269
+ Ns as AlertDialogActions,
1270
+ Os as AlertDialogContent,
1271
+ $s as AlertDialogDescription,
1272
+ Ks as AlertDialogIcon,
1273
+ Hs as AlertDialogProvider,
1274
+ Bs as AlertDialogTitle,
1275
+ Kt as AlertIcon,
1276
+ Bt as AlertTitle,
1277
+ Ki as Anchor,
1278
+ Js as AnimatedBeam,
1279
+ Ys as AnimatedList,
1280
+ pu as AnimatedNumber,
1281
+ Gs as AnimatedText,
1282
+ si as AppHeader,
1283
+ ui as AppHeaderCenter,
1284
+ li as AppHeaderEnd,
1285
+ ai as AppHeaderStart,
1286
+ fi as AppHeaderSubtitle,
1287
+ ci as AppHeaderTitle,
1288
+ Ji as AspectRatio,
1289
+ es as Avatar,
1290
+ Pr as Badge,
1291
+ yo as BlockControls,
1292
+ Oo as Box,
1293
+ oi as Breadcrumb,
1294
+ Lt as Button,
1295
+ Ur as Calendar,
1296
+ Ts as Card,
1297
+ Lr as Carousel,
1298
+ Rr as Chart,
1299
+ Vi as Checkbox,
1300
+ Sr as CodeBlock,
1301
+ Nr as CodeSnippet,
1302
+ bs as Collapsible,
1303
+ Ii as Collection,
1304
+ _r as ColorPicker,
1305
+ xr as Combobox,
1306
+ vo as Command,
1307
+ ho as CommandItem,
1308
+ Eo as CommandPalette,
1309
+ Io as CommandPaletteItem,
1310
+ Mt as Composite,
1311
+ Qo as Container,
1312
+ Mo as ContextMenu,
1313
+ fr as ControlGroup,
1314
+ $r as CopyButton,
1315
+ Er as DataTable,
1316
+ Br as DataViewToolbar,
1317
+ Wr as DateField,
1318
+ Xr as DatePicker,
1319
+ Zr as DateRangePicker,
1320
+ Pn as DateRangeTimePicker,
1321
+ xn as DateTimePicker,
1322
+ cr as Description,
1323
+ qn as Dialog,
1324
+ Un as DialogProvider,
1325
+ Is as DirectionProvider,
1326
+ Ci as DismissableLayer,
1327
+ ru as Dock,
1328
+ Pi as Drawer,
1329
+ Ht as Dropdown,
1330
+ zt as DropdownContent,
1331
+ qt as DropdownItem,
1332
+ Gt as DropdownSectionLabel,
1333
+ Ut as DropdownSeparator,
1334
+ jt as DropdownTrigger,
1335
+ nr as Dropzone,
1336
+ Dr as EmptyState,
1337
+ lr as Field,
1338
+ mr as FieldError,
1339
+ dr as Fieldset,
1340
+ or as FileUpload,
1341
+ gr as FiltersBar,
1342
+ Ko as Flex,
1343
+ bt as FloatingArrow,
1344
+ It as FloatingDelayGroup,
1345
+ ht as FloatingFocusManager,
1346
+ wt as FloatingList,
1347
+ Ne as FloatingListContext,
1348
+ vt as FloatingOverlay,
1349
+ Dt as FloatingPortal,
1350
+ po as FloatingToolbar,
1351
+ At as FloatingTree,
1352
+ ki as FocusScope,
1353
+ ko as Form,
1354
+ Dn as Gantt,
1355
+ Vo as Grid,
1356
+ Ms as HoverCard,
1357
+ no as Icon,
1358
+ eu as IconCloud,
1359
+ dn as InlineEdit,
1360
+ Qt as Input,
1361
+ wo as Kbd,
1362
+ Cs as Label,
1363
+ Di as Layout,
1364
+ Mi as Listbox,
1365
+ su as Marquee,
1366
+ Go as MasonryGrid,
1367
+ Jn as Menu,
1368
+ Wn as MenuItem,
1369
+ eo as MenuSectionLabel,
1370
+ to as MenuSeparator,
1371
+ Hn as Menubar,
1372
+ ss as Meter,
1373
+ qr as MetricCard,
1374
+ on as MultiSelect,
1375
+ Ln as NavigationMenu,
1376
+ Cn as NavigationMenuContent,
1377
+ Sn as NavigationMenuIndicator,
1378
+ kn as NavigationMenuItem,
1379
+ Nn as NavigationMenuLink,
1380
+ On as NavigationMenuList,
1381
+ $n as NavigationMenuRoot,
1382
+ Kn as NavigationMenuTrigger,
1383
+ Bn as NavigationMenuViewport,
1384
+ rn as NumberField,
1385
+ Qs as NumberTicker,
1386
+ er as OTPInput,
1387
+ ou as Orbiter,
1388
+ di as PageHeader,
1389
+ gi as PageToolbar,
1390
+ vs as Pagination,
1391
+ Jo as Panel,
1392
+ Wo as PanelGroup,
1393
+ Yt as PasswordField,
1394
+ tr as PinInput,
1395
+ zo as PlacementGrid,
1396
+ Co as PluginPanel,
1397
+ Qn as Popover,
1398
+ ls as Portal,
1399
+ Oi as Positioner,
1400
+ rs as Presence,
1401
+ os as Progress,
1402
+ Fn as QuickActions,
1403
+ zi as Radio,
1404
+ Gi as RadioGroup,
1405
+ Rn as Rating,
1406
+ xi as RecordHeader,
1407
+ Ti as RovingFocusGroup,
1408
+ fs as ScrollArea,
1409
+ jo as Section,
1410
+ lu as Select,
1411
+ To as SelectionPopup,
1412
+ ms as Separator,
1413
+ bo as Shortcut,
1414
+ Yo as Sidebar,
1415
+ mu as Skeleton,
1416
+ fu as Slider,
1417
+ ps as Slot,
1418
+ cn as Sortable,
1419
+ js as SpinningText,
1420
+ un as SplitButton,
1421
+ ei as Splitter,
1422
+ Hr as Stat,
1423
+ hn as Stepper,
1424
+ ji as Switch,
1425
+ hr as Table,
1426
+ Yn as Tabs,
1427
+ Jt as TagsInput,
1428
+ sr as Textarea,
1429
+ hi as ThemeProvider,
1430
+ en as TimeField,
1431
+ gn as TimePicker,
1432
+ Fr as Timeline,
1433
+ co as Toast,
1434
+ io as ToastAPI,
1435
+ so as ToastProvider,
1436
+ Qi as Toggle,
1437
+ Yi as ToggleGroup,
1438
+ ys as Toolbar,
1439
+ St as Tooltip,
1440
+ an as TransferList,
1441
+ ri as Tree,
1442
+ ws as VisuallyHidden,
1443
+ En as Wizard,
1444
+ ye as assignRef,
1445
+ Qe as callAll,
1446
+ k as composeEventHandlers,
1447
+ xe as mergeRefs,
1448
+ uo as toast,
1449
+ wu as toastAdvanced,
1450
+ lo as toastApi,
1451
+ Pu as toastLegacy,
1452
+ bu as toastPro,
1453
+ zs as useAlertDialog,
1454
+ gu as useAnimatedNumber,
1455
+ yu as useAnimatedNumberValue,
1456
+ at as useClick,
1457
+ xt as useClientPoint,
1458
+ Rt as useDelayGroup,
1459
+ jn as useDialog,
1460
+ dt as useDismiss,
1461
+ ut as useFloating,
1462
+ Pt as useFloatingList,
1463
+ Et as useFloatingNodeId,
1464
+ we as useFloatingTree,
1465
+ ct as useFocus,
1466
+ st as useForm,
1467
+ ft as useHover,
1468
+ lt as useInteractions,
1469
+ pt as useListNavigation,
1470
+ mt as useRole,
1471
+ Ai as useTheme,
1472
+ ao as useToast,
1473
+ yt as useTransition,
1474
+ gt as useTypeahead
497
1475
  };