@iress-oss/ids-components 5.14.1 → 5.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AutocompleteNoResults-BJwn3Csz.js → AutocompleteNoResults-CvhIxKQI.js} +1 -1
- package/dist/{ComboboxHiddenInput-Dgwi3tti.js → ComboboxHiddenInput-B7ztqo0l.js} +5 -5
- package/dist/{FieldAppendToLabel-DOal1Jmq.js → FieldAppendToLabel-DgXoSKDG.js} +6 -5
- package/dist/{InputBase-DevBiqf2.js → InputBase-nWIFJcGj.js} +1 -1
- package/dist/Loading.module-Bs6DSfb4.js +13 -0
- package/dist/LoadingSuspense-BdXYIsHy.js +5723 -0
- package/dist/LogoFromSrc-CtJE0Fsr.js +59 -0
- package/dist/MenuItem.module-Bj20OWCC.js +24 -0
- package/dist/Popover.module-DJ-RK5B3.js +11 -0
- package/dist/{SelectControl-CrSaqFGs.js → SelectControl-CYKkf3rM.js} +1 -1
- package/dist/{SliderTicks-C2tiJ8Jz.js → SliderTicks-Dqz-k-xS.js} +1 -1
- package/dist/TabSet.module-Cu1itlcf.js +13 -0
- package/dist/Table.module-Bb7fJIr8.js +32 -0
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +5 -4
- package/dist/components/Autocomplete/components/AutocompleteNoResults.js +1 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +84 -82
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.js +4 -4
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/ButtonGroup/hooks/useIDSButtonGroupItem.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/helpers/mapCheckboxGroupOptions.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +6 -6
- package/dist/components/CheckboxMark/CheckboxMark.types.js +2 -2
- package/dist/components/Combobox/Combobox.js +5 -4
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +5 -4
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
- package/dist/components/Combobox/components/ComboboxResults.js +5 -4
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +4 -3
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Expander/Expander.js +1 -1
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/Field/FieldGroup/FieldGroup.js +2 -2
- package/dist/components/Field/components/FieldAppendToLabel.js +5 -4
- package/dist/components/Filter/Filter.js +5 -4
- package/dist/components/Filter/components/FilterResetButton.js +4 -3
- package/dist/components/Filter/components/FilterSearch.js +4 -3
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +9 -8
- package/dist/components/Form/FormField/FormFieldset.js +5 -4
- package/dist/components/Form/HookForm/HookForm.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Hide/Hide.js +1 -1
- package/dist/components/Hide/helpers/composeHideClasses.js +5 -4
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +4 -3
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +4 -3
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/Input/ClearButton/ClearButton.js +1 -1
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/InputBase/InputBase.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputCurrency/InputCurrency.js +1 -1
- package/dist/components/InputCurrency/index.js +1 -1
- package/dist/components/Label/LabelBase/LabelBase.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDivider/MenuDivider.js +4 -3
- package/dist/components/Menu/MenuHeading/MenuHeading.js +2 -2
- package/dist/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemButtonProps.js +1 -1
- package/dist/components/Menu/MenuItem/hooks/useMenuItemComposite.js +2 -2
- package/dist/components/Menu/MenuText/MenuText.js +5 -4
- package/dist/components/Menu/helpers/mapMenuItems.js +1 -1
- package/dist/components/Menu/hooks/useMenuStyles.js +3 -3
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Navbar/Navbar.js +2 -2
- package/dist/components/Navbar/components/HomeLinkContent.js +2 -2
- package/dist/components/Navbar/components/LogoFromSrc.js +1 -1
- package/dist/components/Navbar/components/NavbarLogo.js +2 -2
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverActivator.js +1 -1
- package/dist/components/Popover/InputPopover/InputPopoverProvider.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverProvider.js +1 -1
- package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverContent.js +2 -2
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +1 -1
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +1 -1
- package/dist/components/Provider/Provider.js +38 -0
- package/dist/components/Provider/index.js +4 -0
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/Radio/helpers/mapRadioGroupOptions.js +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +3 -3
- package/dist/components/Readonly/Readonly.js +5 -4
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +4 -3
- package/dist/components/RichSelect/SelectBody/SelectBody.js +5 -4
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +9 -8
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +4 -3
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +4 -3
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +4 -3
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +4 -3
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.js +4 -3
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +4 -3
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +4 -3
- package/dist/components/Row/index.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/components/SelectControl.js +1 -1
- package/dist/components/Select/components/SelectReadonly.js +4 -3
- package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
- package/dist/components/Select/helpers/nodesToSelectOptions.js +3 -3
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slideout/Slideout.js +2 -2
- package/dist/components/Slideout/components/SlideoutInner.js +1 -1
- package/dist/components/Slideout/index.js +1 -1
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/components/SliderTicks.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +1 -1
- package/dist/components/TabSet/TabSet.js +2 -2
- package/dist/components/TabSet/components/TabSetItem.js +2 -2
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/TableBody/TableBody.js +15 -15
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableSortButton.js +3 -3
- package/dist/components/Table/hooks/useIDSTableColumnStyles.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/TagInput/TagInput.js +1 -1
- package/dist/components/Tag/components/TagListInput/TagListInput.js +1 -1
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Toaster/Toast/Toast.js +1 -1
- package/dist/components/Toaster/Toast/ToastAnimated.js +2 -2
- package/dist/components/Toaster/Toast/ToastIcon.js +1 -1
- package/dist/components/Toaster/Toaster.js +2 -2
- package/dist/components/Toaster/ToasterProvider.js +1 -1
- package/dist/components/Toaster/hooks/useToaster.js +24 -3
- package/dist/components/Toaster/index.js +11 -10
- package/dist/components/Toggle/Toggle.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/ValidationMessage/ValidationBase/ValidationBase.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +1 -1
- package/dist/constants.js +11 -11
- package/dist/{floating-ui.react-RKRjRgyj.js → floating-ui.react-SmaXvp4L.js} +771 -755
- package/dist/main.js +287 -284
- package/dist/patterns/Loading/Loading.js +1 -1
- package/dist/patterns/Loading/LoadingSuspense.js +1 -1
- package/dist/patterns/Loading/components/ComponentLoading.js +2 -2
- package/dist/patterns/Loading/components/DefaultLoading.js +3 -3
- package/dist/patterns/Loading/components/LongLoading.js +2 -2
- package/dist/patterns/Loading/components/PageLoading.js +3 -3
- package/dist/patterns/Loading/components/StartUpLoading.js +2 -2
- package/dist/patterns/Loading/components/ValidateLoading.js +2 -2
- package/dist/patterns/Loading/index.js +1 -1
- package/dist/src/components/Form/Form.types.d.ts +10 -1
- package/dist/src/components/Provider/Provider.d.ts +20 -0
- package/dist/src/components/Provider/index.d.ts +1 -0
- package/dist/src/components/Toaster/Toast/Toast.types.d.ts +2 -1
- package/dist/src/components/Toaster/ToasterProvider.d.ts +5 -2
- package/dist/src/components/Toaster/hooks/useToaster.d.ts +3 -3
- package/dist/src/constants.d.ts +7 -7
- package/dist/src/main.d.ts +1 -0
- package/dist/src/patterns/Loading/components/PageLoading.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/{useIDSButtonGroupItem-DWuujtfY.js → useIDSButtonGroupItem-CniAJ9N5.js} +1 -1
- package/dist/vite.config.d.ts +1 -1
- package/package.json +6 -4
- package/dist/Loading.module-CC_6gnKJ.js +0 -13
- package/dist/LoadingSuspense-COCIFlsi.js +0 -5692
- package/dist/LogoFromSrc-0jeEBge9.js +0 -59
- package/dist/MenuItem.module-mlKiHW50.js +0 -24
- package/dist/Popover.module-BVX_vz5-.js +0 -11
- package/dist/TabSet.module-BdTRhXdV.js +0 -13
- package/dist/Table.module-Dax40UyV.js +0 -32
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import { useLayoutEffect as
|
|
2
|
+
import { useLayoutEffect as $n } from "react";
|
|
3
3
|
import { t as At, i as Bn, f as Or } from "./index.esm-BnSuefUA.js";
|
|
4
4
|
import { jsx as ge, jsxs as Hn, Fragment as Ar } from "react/jsx-runtime";
|
|
5
5
|
import * as tn from "react-dom";
|
|
6
6
|
function Mt() {
|
|
7
7
|
return typeof window < "u";
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ke(e) {
|
|
10
10
|
return zn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
11
11
|
}
|
|
12
12
|
function he(e) {
|
|
13
13
|
var t;
|
|
14
14
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Oe(e) {
|
|
17
17
|
var t;
|
|
18
18
|
return (t = (zn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
19
19
|
}
|
|
@@ -23,7 +23,7 @@ function zn(e) {
|
|
|
23
23
|
function Y(e) {
|
|
24
24
|
return Mt() ? e instanceof Element || e instanceof he(e).Element : !1;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function re(e) {
|
|
27
27
|
return Mt() ? e instanceof HTMLElement || e instanceof he(e).HTMLElement : !1;
|
|
28
28
|
}
|
|
29
29
|
function Xt(e) {
|
|
@@ -39,9 +39,9 @@ function ut(e) {
|
|
|
39
39
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
40
40
|
}
|
|
41
41
|
function Mr(e) {
|
|
42
|
-
return ["table", "td", "th"].includes(
|
|
42
|
+
return ["table", "td", "th"].includes(Ke(e));
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function St(e) {
|
|
45
45
|
return [":popover-open", ":modal"].some((t) => {
|
|
46
46
|
try {
|
|
47
47
|
return e.matches(t);
|
|
@@ -51,25 +51,25 @@ function Pt(e) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
function nn(e) {
|
|
54
|
-
const t =
|
|
54
|
+
const t = Pt(), n = Y(e) ? we(e) : e;
|
|
55
55
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
let t =
|
|
59
|
-
for (;
|
|
57
|
+
function Sr(e) {
|
|
58
|
+
let t = ke(e);
|
|
59
|
+
for (; re(t) && !De(t); ) {
|
|
60
60
|
if (nn(t))
|
|
61
61
|
return t;
|
|
62
|
-
if (
|
|
62
|
+
if (St(t))
|
|
63
63
|
return null;
|
|
64
|
-
t =
|
|
64
|
+
t = ke(t);
|
|
65
65
|
}
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Pt() {
|
|
69
69
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return ["html", "body", "#document"].includes(
|
|
71
|
+
function De(e) {
|
|
72
|
+
return ["html", "body", "#document"].includes(Ke(e));
|
|
73
73
|
}
|
|
74
74
|
function we(e) {
|
|
75
75
|
return he(e).getComputedStyle(e);
|
|
@@ -83,36 +83,36 @@ function Dt(e) {
|
|
|
83
83
|
scrollTop: e.scrollY
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
86
|
+
function ke(e) {
|
|
87
|
+
if (Ke(e) === "html")
|
|
88
88
|
return e;
|
|
89
89
|
const t = (
|
|
90
90
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
91
91
|
e.assignedSlot || // DOM Element detected.
|
|
92
92
|
e.parentNode || // ShadowRoot detected.
|
|
93
93
|
Xt(e) && e.host || // Fallback.
|
|
94
|
-
|
|
94
|
+
Oe(e)
|
|
95
95
|
);
|
|
96
96
|
return Xt(t) ? t.host : t;
|
|
97
97
|
}
|
|
98
98
|
function Un(e) {
|
|
99
|
-
const t =
|
|
100
|
-
return
|
|
99
|
+
const t = ke(e);
|
|
100
|
+
return De(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Fe(e, t, n) {
|
|
103
103
|
var r;
|
|
104
104
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
105
105
|
const o = Un(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = he(o);
|
|
106
106
|
if (s) {
|
|
107
107
|
const c = Jt(i);
|
|
108
|
-
return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ?
|
|
108
|
+
return t.concat(i, i.visualViewport || [], ut(o) ? o : [], c && n ? Fe(c) : []);
|
|
109
109
|
}
|
|
110
|
-
return t.concat(o,
|
|
110
|
+
return t.concat(o, Fe(o, [], n));
|
|
111
111
|
}
|
|
112
112
|
function Jt(e) {
|
|
113
113
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const Pr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Pr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []), Qe = Math.min, be = Math.max, wt = Math.round, je = Math.floor, Ce = (e) => ({
|
|
116
116
|
x: e,
|
|
117
117
|
y: e
|
|
118
118
|
}), Dr = {
|
|
@@ -125,12 +125,12 @@ const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @_
|
|
|
125
125
|
end: "start"
|
|
126
126
|
};
|
|
127
127
|
function pn(e, t, n) {
|
|
128
|
-
return be(e,
|
|
128
|
+
return be(e, Qe(t, n));
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ze(e, t) {
|
|
131
131
|
return typeof e == "function" ? e(t) : e;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Te(e) {
|
|
134
134
|
return e.split("-")[0];
|
|
135
135
|
}
|
|
136
136
|
function Ie(e) {
|
|
@@ -142,11 +142,11 @@ function Gn(e) {
|
|
|
142
142
|
function jn(e) {
|
|
143
143
|
return e === "y" ? "height" : "width";
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return ["top", "bottom"].includes(
|
|
145
|
+
function Pe(e) {
|
|
146
|
+
return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
|
|
147
147
|
}
|
|
148
148
|
function qn(e) {
|
|
149
|
-
return Gn(
|
|
149
|
+
return Gn(Pe(e));
|
|
150
150
|
}
|
|
151
151
|
function Yn(e, t, n) {
|
|
152
152
|
n === void 0 && (n = !1);
|
|
@@ -176,7 +176,7 @@ function Fr(e, t, n) {
|
|
|
176
176
|
}
|
|
177
177
|
function Nr(e, t, n, r) {
|
|
178
178
|
const o = Ie(e);
|
|
179
|
-
let s = Fr(
|
|
179
|
+
let s = Fr(Te(e), n === "start", r);
|
|
180
180
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
|
|
181
181
|
}
|
|
182
182
|
function Et(e) {
|
|
@@ -191,7 +191,7 @@ function _r(e) {
|
|
|
191
191
|
...e
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Wr(e) {
|
|
195
195
|
return typeof e != "number" ? _r(e) : {
|
|
196
196
|
top: e,
|
|
197
197
|
right: e,
|
|
@@ -199,7 +199,7 @@ function Kr(e) {
|
|
|
199
199
|
left: e
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Ct(e) {
|
|
203
203
|
const {
|
|
204
204
|
x: t,
|
|
205
205
|
y: n,
|
|
@@ -238,14 +238,14 @@ function Qt() {
|
|
|
238
238
|
const e = /android/i;
|
|
239
239
|
return e.test(rn()) || e.test(Xn());
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Kr() {
|
|
242
242
|
return rn().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
|
|
243
243
|
}
|
|
244
244
|
function Qn() {
|
|
245
245
|
return Xn().includes("jsdom/");
|
|
246
246
|
}
|
|
247
|
-
const gn = "data-floating-ui-focusable",
|
|
248
|
-
function
|
|
247
|
+
const gn = "data-floating-ui-focusable", Vr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", _t = "ArrowLeft", Wt = "ArrowRight", $r = "ArrowUp", Br = "ArrowDown";
|
|
248
|
+
function Ee(e) {
|
|
249
249
|
let t = e.activeElement;
|
|
250
250
|
for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
|
|
251
251
|
var n;
|
|
@@ -253,7 +253,7 @@ function Re(e) {
|
|
|
253
253
|
}
|
|
254
254
|
return t;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ce(e, t) {
|
|
257
257
|
if (!e || !t)
|
|
258
258
|
return !1;
|
|
259
259
|
const n = t.getRootNode == null ? void 0 : t.getRootNode();
|
|
@@ -269,10 +269,10 @@ function ue(e, t) {
|
|
|
269
269
|
}
|
|
270
270
|
return !1;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Se(e) {
|
|
273
273
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Kt(e, t) {
|
|
276
276
|
if (t == null)
|
|
277
277
|
return !1;
|
|
278
278
|
if ("composedPath" in e)
|
|
@@ -283,11 +283,11 @@ function Vt(e, t) {
|
|
|
283
283
|
function Hr(e) {
|
|
284
284
|
return e.matches("html,body");
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function le(e) {
|
|
287
287
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
288
288
|
}
|
|
289
289
|
function on(e) {
|
|
290
|
-
return
|
|
290
|
+
return re(e) && e.matches(Vr);
|
|
291
291
|
}
|
|
292
292
|
function Zt(e) {
|
|
293
293
|
return e ? e.getAttribute("role") === "combobox" && on(e) : !1;
|
|
@@ -300,7 +300,7 @@ function zr(e) {
|
|
|
300
300
|
return !0;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function It(e) {
|
|
304
304
|
return e ? e.hasAttribute(gn) ? e : e.querySelector("[" + gn + "]") || e : null;
|
|
305
305
|
}
|
|
306
306
|
function qe(e, t) {
|
|
@@ -353,8 +353,9 @@ function it(e, t) {
|
|
|
353
353
|
const n = ["mouse", "pen"];
|
|
354
354
|
return t || n.push("", void 0), n.includes(e);
|
|
355
355
|
}
|
|
356
|
-
var
|
|
357
|
-
|
|
356
|
+
var jr = typeof document < "u", qr = function() {
|
|
357
|
+
}, X = jr ? $n : qr;
|
|
358
|
+
const Yr = {
|
|
358
359
|
...f
|
|
359
360
|
};
|
|
360
361
|
function xe(e) {
|
|
@@ -363,13 +364,13 @@ function xe(e) {
|
|
|
363
364
|
t.current = e;
|
|
364
365
|
}), t;
|
|
365
366
|
}
|
|
366
|
-
const
|
|
367
|
-
function
|
|
367
|
+
const Xr = Yr.useInsertionEffect, Jr = Xr || ((e) => e());
|
|
368
|
+
function se(e) {
|
|
368
369
|
const t = f.useRef(() => {
|
|
369
370
|
if (process.env.NODE_ENV !== "production")
|
|
370
371
|
throw new Error("Cannot call an event handler while rendering.");
|
|
371
372
|
});
|
|
372
|
-
return
|
|
373
|
+
return Jr(() => {
|
|
373
374
|
t.current = e;
|
|
374
375
|
}), f.useCallback(function() {
|
|
375
376
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
@@ -384,18 +385,18 @@ function Ye(e, t) {
|
|
|
384
385
|
return t < 0 || t >= e.current.length;
|
|
385
386
|
}
|
|
386
387
|
function yt(e, t) {
|
|
387
|
-
return
|
|
388
|
+
return ue(e, {
|
|
388
389
|
disabledIndices: t
|
|
389
390
|
});
|
|
390
391
|
}
|
|
391
392
|
function en(e, t) {
|
|
392
|
-
return
|
|
393
|
+
return ue(e, {
|
|
393
394
|
decrement: !0,
|
|
394
395
|
startingIndex: e.current.length,
|
|
395
396
|
disabledIndices: t
|
|
396
397
|
});
|
|
397
398
|
}
|
|
398
|
-
function
|
|
399
|
+
function ue(e, t) {
|
|
399
400
|
let {
|
|
400
401
|
startingIndex: n = -1,
|
|
401
402
|
decrement: r = !1,
|
|
@@ -404,7 +405,7 @@ function le(e, t) {
|
|
|
404
405
|
} = t === void 0 ? {} : t, i = n;
|
|
405
406
|
do
|
|
406
407
|
i += r ? -s : s;
|
|
407
|
-
while (i >= 0 && i <= e.current.length - 1 &&
|
|
408
|
+
while (i >= 0 && i <= e.current.length - 1 && ze(e, i, o));
|
|
408
409
|
return i;
|
|
409
410
|
}
|
|
410
411
|
function tr(e, t) {
|
|
@@ -423,7 +424,7 @@ function tr(e, t) {
|
|
|
423
424
|
if (n.key === $r) {
|
|
424
425
|
if (p && pe(n), l === -1)
|
|
425
426
|
g = u;
|
|
426
|
-
else if (g =
|
|
427
|
+
else if (g = ue(e, {
|
|
427
428
|
startingIndex: g,
|
|
428
429
|
amount: i,
|
|
429
430
|
decrement: !0,
|
|
@@ -434,40 +435,40 @@ function tr(e, t) {
|
|
|
434
435
|
}
|
|
435
436
|
Ye(e, g) && (g = l);
|
|
436
437
|
}
|
|
437
|
-
if (n.key === Br && (p && pe(n), l === -1 ? g = a : (g =
|
|
438
|
+
if (n.key === Br && (p && pe(n), l === -1 ? g = a : (g = ue(e, {
|
|
438
439
|
startingIndex: l,
|
|
439
440
|
amount: i,
|
|
440
441
|
disabledIndices: c
|
|
441
|
-
}), o && l + i > u && (g =
|
|
442
|
+
}), o && l + i > u && (g = ue(e, {
|
|
442
443
|
startingIndex: l % i - i,
|
|
443
444
|
amount: i,
|
|
444
445
|
disabledIndices: c
|
|
445
446
|
}))), Ye(e, g) && (g = l)), r === "both") {
|
|
446
447
|
const d = je(l / i);
|
|
447
|
-
n.key === (s ? _t :
|
|
448
|
+
n.key === (s ? _t : Wt) && (p && pe(n), l % i !== i - 1 ? (g = ue(e, {
|
|
448
449
|
startingIndex: l,
|
|
449
450
|
disabledIndices: c
|
|
450
|
-
}), o && pt(g, i, d) && (g =
|
|
451
|
+
}), o && pt(g, i, d) && (g = ue(e, {
|
|
451
452
|
startingIndex: l - l % i - 1,
|
|
452
453
|
disabledIndices: c
|
|
453
|
-
}))) : o && (g =
|
|
454
|
+
}))) : o && (g = ue(e, {
|
|
454
455
|
startingIndex: l - l % i - 1,
|
|
455
456
|
disabledIndices: c
|
|
456
|
-
})), pt(g, i, d) && (g = l)), n.key === (s ?
|
|
457
|
+
})), pt(g, i, d) && (g = l)), n.key === (s ? Wt : _t) && (p && pe(n), l % i !== 0 ? (g = ue(e, {
|
|
457
458
|
startingIndex: l,
|
|
458
459
|
decrement: !0,
|
|
459
460
|
disabledIndices: c
|
|
460
|
-
}), o && pt(g, i, d) && (g =
|
|
461
|
+
}), o && pt(g, i, d) && (g = ue(e, {
|
|
461
462
|
startingIndex: l + (i - l % i),
|
|
462
463
|
decrement: !0,
|
|
463
464
|
disabledIndices: c
|
|
464
|
-
}))) : o && (g =
|
|
465
|
+
}))) : o && (g = ue(e, {
|
|
465
466
|
startingIndex: l + (i - l % i),
|
|
466
467
|
decrement: !0,
|
|
467
468
|
disabledIndices: c
|
|
468
469
|
})), pt(g, i, d) && (g = l));
|
|
469
470
|
const h = je(u / i) === d;
|
|
470
|
-
Ye(e, g) && (o && h ? g = n.key === (s ?
|
|
471
|
+
Ye(e, g) && (o && h ? g = n.key === (s ? Wt : _t) ? u : ue(e, {
|
|
471
472
|
startingIndex: l - l % i - 1,
|
|
472
473
|
disabledIndices: c
|
|
473
474
|
}) : g = l);
|
|
@@ -513,7 +514,7 @@ function rr(e, t, n, r, o) {
|
|
|
513
514
|
function or(e, t) {
|
|
514
515
|
return t.flatMap((n, r) => e.includes(n) ? [r] : []);
|
|
515
516
|
}
|
|
516
|
-
function
|
|
517
|
+
function ze(e, t, n) {
|
|
517
518
|
if (typeof n == "function")
|
|
518
519
|
return n(t);
|
|
519
520
|
if (n)
|
|
@@ -533,20 +534,20 @@ const lt = () => ({
|
|
|
533
534
|
function ir(e, t) {
|
|
534
535
|
const n = At(e, lt()), r = n.length;
|
|
535
536
|
if (r === 0) return;
|
|
536
|
-
const o =
|
|
537
|
+
const o = Ee(le(e)), s = n.indexOf(o), i = s === -1 ? t === 1 ? 0 : r - 1 : s + t;
|
|
537
538
|
return n[i];
|
|
538
539
|
}
|
|
539
540
|
function sr(e) {
|
|
540
|
-
return ir(
|
|
541
|
+
return ir(le(e).body, 1) || e;
|
|
541
542
|
}
|
|
542
543
|
function cr(e) {
|
|
543
|
-
return ir(
|
|
544
|
+
return ir(le(e).body, -1) || e;
|
|
544
545
|
}
|
|
545
546
|
function ot(e, t) {
|
|
546
547
|
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
547
|
-
return !r || !
|
|
548
|
+
return !r || !ce(n, r);
|
|
548
549
|
}
|
|
549
|
-
function
|
|
550
|
+
function Qr(e) {
|
|
550
551
|
At(e, lt()).forEach((n) => {
|
|
551
552
|
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
552
553
|
});
|
|
@@ -562,7 +563,7 @@ function bn(e, t, n) {
|
|
|
562
563
|
reference: r,
|
|
563
564
|
floating: o
|
|
564
565
|
} = e;
|
|
565
|
-
const s =
|
|
566
|
+
const s = Pe(t), i = qn(t), c = jn(i), a = Te(t), u = s === "y", l = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[c] / 2 - o[c] / 2;
|
|
566
567
|
let d;
|
|
567
568
|
switch (a) {
|
|
568
569
|
case "top":
|
|
@@ -605,7 +606,7 @@ function bn(e, t, n) {
|
|
|
605
606
|
}
|
|
606
607
|
return d;
|
|
607
608
|
}
|
|
608
|
-
const
|
|
609
|
+
const Zr = async (e, t, n) => {
|
|
609
610
|
const {
|
|
610
611
|
placement: r = "bottom",
|
|
611
612
|
strategy: o = "absolute",
|
|
@@ -627,7 +628,7 @@ const Jr = async (e, t, n) => {
|
|
|
627
628
|
} = c[m], {
|
|
628
629
|
x: v,
|
|
629
630
|
y: x,
|
|
630
|
-
data:
|
|
631
|
+
data: C,
|
|
631
632
|
reset: A
|
|
632
633
|
} = await R({
|
|
633
634
|
x: l,
|
|
@@ -647,7 +648,7 @@ const Jr = async (e, t, n) => {
|
|
|
647
648
|
...d,
|
|
648
649
|
[y]: {
|
|
649
650
|
...d[y],
|
|
650
|
-
...
|
|
651
|
+
...C
|
|
651
652
|
}
|
|
652
653
|
}, A && h <= 50 && (h++, typeof A == "object" && (A.placement && (g = A.placement), A.rects && (u = A.rects === !0 ? await i.getElementRects({
|
|
653
654
|
reference: e,
|
|
@@ -682,7 +683,7 @@ async function kt(e, t) {
|
|
|
682
683
|
elementContext: p = "floating",
|
|
683
684
|
altBoundary: g = !1,
|
|
684
685
|
padding: d = 0
|
|
685
|
-
} =
|
|
686
|
+
} = Ze(t, e), h = Wr(d), y = c[g ? p === "floating" ? "reference" : "floating" : p], R = Ct(await s.getClippingRect({
|
|
686
687
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(y))) == null || n ? y : y.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
687
688
|
boundary: u,
|
|
688
689
|
rootBoundary: l,
|
|
@@ -692,29 +693,29 @@ async function kt(e, t) {
|
|
|
692
693
|
y: o,
|
|
693
694
|
width: i.floating.width,
|
|
694
695
|
height: i.floating.height
|
|
695
|
-
} : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)),
|
|
696
|
+
} : i.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), C = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
696
697
|
x: 1,
|
|
697
698
|
y: 1
|
|
698
699
|
} : {
|
|
699
700
|
x: 1,
|
|
700
701
|
y: 1
|
|
701
|
-
}, A =
|
|
702
|
+
}, A = Ct(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
702
703
|
elements: c,
|
|
703
704
|
rect: v,
|
|
704
705
|
offsetParent: x,
|
|
705
706
|
strategy: a
|
|
706
707
|
}) : v);
|
|
707
708
|
return {
|
|
708
|
-
top: (R.top - A.top + h.top) /
|
|
709
|
-
bottom: (A.bottom - R.bottom + h.bottom) /
|
|
710
|
-
left: (R.left - A.left + h.left) /
|
|
711
|
-
right: (A.right - R.right + h.right) /
|
|
709
|
+
top: (R.top - A.top + h.top) / C.y,
|
|
710
|
+
bottom: (A.bottom - R.bottom + h.bottom) / C.y,
|
|
711
|
+
left: (R.left - A.left + h.left) / C.x,
|
|
712
|
+
right: (A.right - R.right + h.right) / C.x
|
|
712
713
|
};
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
-
return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) =>
|
|
715
|
+
function eo(e, t, n) {
|
|
716
|
+
return (e ? [...n.filter((o) => Ie(o) === e), ...n.filter((o) => Ie(o) !== e)] : n.filter((o) => Te(o) === o)).filter((o) => e ? Ie(o) === e || (t ? Rt(o) !== o : !1) : !0);
|
|
716
717
|
}
|
|
717
|
-
const
|
|
718
|
+
const to = function(e) {
|
|
718
719
|
return e === void 0 && (e = {}), {
|
|
719
720
|
name: "autoPlacement",
|
|
720
721
|
options: e,
|
|
@@ -732,7 +733,7 @@ const Zr = function(e) {
|
|
|
732
733
|
allowedPlacements: g = mn,
|
|
733
734
|
autoAlignment: d = !0,
|
|
734
735
|
...h
|
|
735
|
-
} =
|
|
736
|
+
} = Ze(e, t), m = p !== void 0 || g === mn ? eo(p || null, d, g) : g, y = await kt(t, h), R = ((n = i.autoPlacement) == null ? void 0 : n.index) || 0, v = m[R];
|
|
736
737
|
if (v == null)
|
|
737
738
|
return {};
|
|
738
739
|
const x = Yn(v, s, await (a.isRTL == null ? void 0 : a.isRTL(u.floating)));
|
|
@@ -742,9 +743,9 @@ const Zr = function(e) {
|
|
|
742
743
|
placement: m[0]
|
|
743
744
|
}
|
|
744
745
|
};
|
|
745
|
-
const
|
|
746
|
+
const C = [y[Te(v)], y[x[0]], y[x[1]]], A = [...((r = i.autoPlacement) == null ? void 0 : r.overflows) || [], {
|
|
746
747
|
placement: v,
|
|
747
|
-
overflows:
|
|
748
|
+
overflows: C
|
|
748
749
|
}], k = m[R + 1];
|
|
749
750
|
if (k)
|
|
750
751
|
return {
|
|
@@ -760,7 +761,7 @@ const Zr = function(e) {
|
|
|
760
761
|
const _ = Ie(F.placement);
|
|
761
762
|
return [F.placement, _ && l ? (
|
|
762
763
|
// Check along the mainAxis and main crossAxis side.
|
|
763
|
-
F.overflows.slice(0, 2).reduce((U,
|
|
764
|
+
F.overflows.slice(0, 2).reduce((U, K) => U + K, 0)
|
|
764
765
|
) : (
|
|
765
766
|
// Check only the mainAxis.
|
|
766
767
|
F.overflows[0]
|
|
@@ -782,7 +783,7 @@ const Zr = function(e) {
|
|
|
782
783
|
} : {};
|
|
783
784
|
}
|
|
784
785
|
};
|
|
785
|
-
},
|
|
786
|
+
}, no = function(e) {
|
|
786
787
|
return e === void 0 && (e = {}), {
|
|
787
788
|
name: "flip",
|
|
788
789
|
options: e,
|
|
@@ -803,16 +804,16 @@ const Zr = function(e) {
|
|
|
803
804
|
fallbackAxisSideDirection: h = "none",
|
|
804
805
|
flipAlignment: m = !0,
|
|
805
806
|
...y
|
|
806
|
-
} =
|
|
807
|
+
} = Ze(e, t);
|
|
807
808
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
808
809
|
return {};
|
|
809
|
-
const R =
|
|
810
|
-
!g && k && A.push(...Nr(c, m, h,
|
|
811
|
-
const N = [c, ...A],
|
|
810
|
+
const R = Te(o), v = Pe(c), x = Te(c) === c, C = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), A = g || (x || !m ? [Et(c)] : Lr(c)), k = h !== "none";
|
|
811
|
+
!g && k && A.push(...Nr(c, m, h, C));
|
|
812
|
+
const N = [c, ...A], D = await kt(t, y), L = [];
|
|
812
813
|
let F = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
813
|
-
if (l && L.push(
|
|
814
|
-
const O = Yn(o, i,
|
|
815
|
-
L.push(
|
|
814
|
+
if (l && L.push(D[R]), p) {
|
|
815
|
+
const O = Yn(o, i, C);
|
|
816
|
+
L.push(D[O[0]], D[O[1]]);
|
|
816
817
|
}
|
|
817
818
|
if (F = [...F, {
|
|
818
819
|
placement: o,
|
|
@@ -820,7 +821,9 @@ const Zr = function(e) {
|
|
|
820
821
|
}], !L.every((O) => O <= 0)) {
|
|
821
822
|
var _, U;
|
|
822
823
|
const O = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, w = N[O];
|
|
823
|
-
if (w)
|
|
824
|
+
if (w && (!(p === "alignment" ? v !== Pe(w) : !1) || // We leave the current main axis only if every placement on that axis
|
|
825
|
+
// overflows the main axis.
|
|
826
|
+
F.every((b) => b.overflows[0] > 0 && Pe(b.placement) === v)))
|
|
824
827
|
return {
|
|
825
828
|
data: {
|
|
826
829
|
index: O,
|
|
@@ -830,31 +833,31 @@ const Zr = function(e) {
|
|
|
830
833
|
placement: w
|
|
831
834
|
}
|
|
832
835
|
};
|
|
833
|
-
let
|
|
834
|
-
if (!
|
|
836
|
+
let W = (U = F.filter((T) => T.overflows[0] <= 0).sort((T, b) => T.overflows[1] - b.overflows[1])[0]) == null ? void 0 : U.placement;
|
|
837
|
+
if (!W)
|
|
835
838
|
switch (d) {
|
|
836
839
|
case "bestFit": {
|
|
837
|
-
var
|
|
838
|
-
const T = (
|
|
840
|
+
var K;
|
|
841
|
+
const T = (K = F.filter((b) => {
|
|
839
842
|
if (k) {
|
|
840
|
-
const E =
|
|
843
|
+
const E = Pe(b.placement);
|
|
841
844
|
return E === v || // Create a bias to the `y` side axis due to horizontal
|
|
842
845
|
// reading directions favoring greater width.
|
|
843
846
|
E === "y";
|
|
844
847
|
}
|
|
845
848
|
return !0;
|
|
846
|
-
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E,
|
|
847
|
-
T && (
|
|
849
|
+
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, S) => E + S, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
|
|
850
|
+
T && (W = T);
|
|
848
851
|
break;
|
|
849
852
|
}
|
|
850
853
|
case "initialPlacement":
|
|
851
|
-
|
|
854
|
+
W = c;
|
|
852
855
|
break;
|
|
853
856
|
}
|
|
854
|
-
if (o !==
|
|
857
|
+
if (o !== W)
|
|
855
858
|
return {
|
|
856
859
|
reset: {
|
|
857
|
-
placement:
|
|
860
|
+
placement: W
|
|
858
861
|
}
|
|
859
862
|
};
|
|
860
863
|
}
|
|
@@ -862,12 +865,12 @@ const Zr = function(e) {
|
|
|
862
865
|
}
|
|
863
866
|
};
|
|
864
867
|
};
|
|
865
|
-
async function
|
|
868
|
+
async function ro(e, t) {
|
|
866
869
|
const {
|
|
867
870
|
placement: n,
|
|
868
871
|
platform: r,
|
|
869
872
|
elements: o
|
|
870
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i =
|
|
873
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = Pe(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
|
|
871
874
|
let {
|
|
872
875
|
mainAxis: g,
|
|
873
876
|
crossAxis: d,
|
|
@@ -889,7 +892,7 @@ async function to(e, t) {
|
|
|
889
892
|
y: d * l
|
|
890
893
|
};
|
|
891
894
|
}
|
|
892
|
-
const
|
|
895
|
+
const oo = function(e) {
|
|
893
896
|
return e === void 0 && (e = 0), {
|
|
894
897
|
name: "offset",
|
|
895
898
|
options: e,
|
|
@@ -900,7 +903,7 @@ const no = function(e) {
|
|
|
900
903
|
y: s,
|
|
901
904
|
placement: i,
|
|
902
905
|
middlewareData: c
|
|
903
|
-
} = t, a = await
|
|
906
|
+
} = t, a = await ro(t, e);
|
|
904
907
|
return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
905
908
|
x: o + a.x,
|
|
906
909
|
y: s + a.y,
|
|
@@ -911,7 +914,7 @@ const no = function(e) {
|
|
|
911
914
|
};
|
|
912
915
|
}
|
|
913
916
|
};
|
|
914
|
-
},
|
|
917
|
+
}, io = function(e) {
|
|
915
918
|
return e === void 0 && (e = {}), {
|
|
916
919
|
name: "shift",
|
|
917
920
|
options: e,
|
|
@@ -936,10 +939,10 @@ const no = function(e) {
|
|
|
936
939
|
}
|
|
937
940
|
},
|
|
938
941
|
...a
|
|
939
|
-
} =
|
|
942
|
+
} = Ze(e, t), u = {
|
|
940
943
|
x: n,
|
|
941
944
|
y: r
|
|
942
|
-
}, l = await kt(t, a), p =
|
|
945
|
+
}, l = await kt(t, a), p = Pe(Te(o)), g = Gn(p);
|
|
943
946
|
let d = u[g], h = u[p];
|
|
944
947
|
if (s) {
|
|
945
948
|
const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
|
|
@@ -967,7 +970,7 @@ const no = function(e) {
|
|
|
967
970
|
};
|
|
968
971
|
}
|
|
969
972
|
};
|
|
970
|
-
},
|
|
973
|
+
}, so = function(e) {
|
|
971
974
|
return e === void 0 && (e = {}), {
|
|
972
975
|
name: "size",
|
|
973
976
|
options: e,
|
|
@@ -982,21 +985,21 @@ const no = function(e) {
|
|
|
982
985
|
apply: a = () => {
|
|
983
986
|
},
|
|
984
987
|
...u
|
|
985
|
-
} =
|
|
988
|
+
} = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = Pe(o) === "y", {
|
|
986
989
|
width: h,
|
|
987
990
|
height: m
|
|
988
991
|
} = s.floating;
|
|
989
992
|
let y, R;
|
|
990
993
|
p === "top" || p === "bottom" ? (y = p, R = g === (await (i.isRTL == null ? void 0 : i.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (R = p, y = g === "end" ? "top" : "bottom");
|
|
991
|
-
const v = m - l.top - l.bottom, x = h - l.left - l.right,
|
|
992
|
-
let N =
|
|
993
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
994
|
-
const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0),
|
|
995
|
-
d ?
|
|
994
|
+
const v = m - l.top - l.bottom, x = h - l.left - l.right, C = Qe(m - l[y], v), A = Qe(h - l[R], x), k = !t.middlewareData.shift;
|
|
995
|
+
let N = C, D = A;
|
|
996
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = x), (r = t.middlewareData.shift) != null && r.enabled.y && (N = v), k && !g) {
|
|
997
|
+
const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0), K = be(l.bottom, 0);
|
|
998
|
+
d ? D = h - 2 * (F !== 0 || _ !== 0 ? F + _ : be(l.left, l.right)) : N = m - 2 * (U !== 0 || K !== 0 ? U + K : be(l.top, l.bottom));
|
|
996
999
|
}
|
|
997
1000
|
await a({
|
|
998
1001
|
...t,
|
|
999
|
-
availableWidth:
|
|
1002
|
+
availableWidth: D,
|
|
1000
1003
|
availableHeight: N
|
|
1001
1004
|
});
|
|
1002
1005
|
const L = await i.getDimensions(c.floating);
|
|
@@ -1011,7 +1014,7 @@ const no = function(e) {
|
|
|
1011
1014
|
function ur(e) {
|
|
1012
1015
|
const t = we(e);
|
|
1013
1016
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1014
|
-
const o =
|
|
1017
|
+
const o = re(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
|
|
1015
1018
|
return c && (n = s, r = i), {
|
|
1016
1019
|
width: n,
|
|
1017
1020
|
height: r,
|
|
@@ -1023,8 +1026,8 @@ function sn(e) {
|
|
|
1023
1026
|
}
|
|
1024
1027
|
function Xe(e) {
|
|
1025
1028
|
const t = sn(e);
|
|
1026
|
-
if (!
|
|
1027
|
-
return
|
|
1029
|
+
if (!re(t))
|
|
1030
|
+
return Ce(1);
|
|
1028
1031
|
const n = t.getBoundingClientRect(), {
|
|
1029
1032
|
width: r,
|
|
1030
1033
|
height: o,
|
|
@@ -1036,33 +1039,33 @@ function Xe(e) {
|
|
|
1036
1039
|
y: c
|
|
1037
1040
|
};
|
|
1038
1041
|
}
|
|
1039
|
-
const
|
|
1042
|
+
const co = /* @__PURE__ */ Ce(0);
|
|
1040
1043
|
function lr(e) {
|
|
1041
1044
|
const t = he(e);
|
|
1042
|
-
return !
|
|
1045
|
+
return !Pt() || !t.visualViewport ? co : {
|
|
1043
1046
|
x: t.visualViewport.offsetLeft,
|
|
1044
1047
|
y: t.visualViewport.offsetTop
|
|
1045
1048
|
};
|
|
1046
1049
|
}
|
|
1047
|
-
function
|
|
1050
|
+
function uo(e, t, n) {
|
|
1048
1051
|
return t === void 0 && (t = !1), !n || t && n !== he(e) ? !1 : t;
|
|
1049
1052
|
}
|
|
1050
|
-
function
|
|
1053
|
+
function Ue(e, t, n, r) {
|
|
1051
1054
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1052
1055
|
const o = e.getBoundingClientRect(), s = sn(e);
|
|
1053
|
-
let i =
|
|
1056
|
+
let i = Ce(1);
|
|
1054
1057
|
t && (r ? Y(r) && (i = Xe(r)) : i = Xe(e));
|
|
1055
|
-
const c =
|
|
1058
|
+
const c = uo(s, n, r) ? lr(s) : Ce(0);
|
|
1056
1059
|
let a = (o.left + c.x) / i.x, u = (o.top + c.y) / i.y, l = o.width / i.x, p = o.height / i.y;
|
|
1057
1060
|
if (s) {
|
|
1058
1061
|
const g = he(s), d = r && Y(r) ? he(r) : r;
|
|
1059
1062
|
let h = g, m = Jt(h);
|
|
1060
1063
|
for (; m && r && d !== h; ) {
|
|
1061
|
-
const y = Xe(m), R = m.getBoundingClientRect(), v = we(m), x = R.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x,
|
|
1062
|
-
a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u +=
|
|
1064
|
+
const y = Xe(m), R = m.getBoundingClientRect(), v = we(m), x = R.left + (m.clientLeft + parseFloat(v.paddingLeft)) * y.x, C = R.top + (m.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
1065
|
+
a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += C, h = he(m), m = Jt(h);
|
|
1063
1066
|
}
|
|
1064
1067
|
}
|
|
1065
|
-
return
|
|
1068
|
+
return Ct({
|
|
1066
1069
|
width: l,
|
|
1067
1070
|
height: p,
|
|
1068
1071
|
x: a,
|
|
@@ -1071,7 +1074,7 @@ function ze(e, t, n, r) {
|
|
|
1071
1074
|
}
|
|
1072
1075
|
function cn(e, t) {
|
|
1073
1076
|
const n = Dt(e).scrollLeft;
|
|
1074
|
-
return t ? t.left + n :
|
|
1077
|
+
return t ? t.left + n : Ue(Oe(e)).left + n;
|
|
1075
1078
|
}
|
|
1076
1079
|
function ar(e, t, n) {
|
|
1077
1080
|
n === void 0 && (n = !1);
|
|
@@ -1084,26 +1087,26 @@ function ar(e, t, n) {
|
|
|
1084
1087
|
y: s
|
|
1085
1088
|
};
|
|
1086
1089
|
}
|
|
1087
|
-
function
|
|
1090
|
+
function lo(e) {
|
|
1088
1091
|
let {
|
|
1089
1092
|
elements: t,
|
|
1090
1093
|
rect: n,
|
|
1091
1094
|
offsetParent: r,
|
|
1092
1095
|
strategy: o
|
|
1093
1096
|
} = e;
|
|
1094
|
-
const s = o === "fixed", i =
|
|
1097
|
+
const s = o === "fixed", i = Oe(r), c = t ? St(t.floating) : !1;
|
|
1095
1098
|
if (r === i || c && s)
|
|
1096
1099
|
return n;
|
|
1097
1100
|
let a = {
|
|
1098
1101
|
scrollLeft: 0,
|
|
1099
1102
|
scrollTop: 0
|
|
1100
|
-
}, u =
|
|
1101
|
-
const l =
|
|
1102
|
-
if ((p || !p && !s) && ((
|
|
1103
|
-
const d =
|
|
1103
|
+
}, u = Ce(1);
|
|
1104
|
+
const l = Ce(0), p = re(r);
|
|
1105
|
+
if ((p || !p && !s) && ((Ke(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
|
|
1106
|
+
const d = Ue(r);
|
|
1104
1107
|
u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
1105
1108
|
}
|
|
1106
|
-
const g = i && !p && !s ? ar(i, a, !0) :
|
|
1109
|
+
const g = i && !p && !s ? ar(i, a, !0) : Ce(0);
|
|
1107
1110
|
return {
|
|
1108
1111
|
width: n.width * u.x,
|
|
1109
1112
|
height: n.height * u.y,
|
|
@@ -1111,11 +1114,11 @@ function co(e) {
|
|
|
1111
1114
|
y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
|
|
1112
1115
|
};
|
|
1113
1116
|
}
|
|
1114
|
-
function
|
|
1117
|
+
function ao(e) {
|
|
1115
1118
|
return Array.from(e.getClientRects());
|
|
1116
1119
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const t =
|
|
1120
|
+
function fo(e) {
|
|
1121
|
+
const t = Oe(e), n = Dt(e), r = e.ownerDocument.body, o = be(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = be(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1119
1122
|
let i = -n.scrollLeft + cn(e);
|
|
1120
1123
|
const c = -n.scrollTop;
|
|
1121
1124
|
return we(r).direction === "rtl" && (i += be(t.clientWidth, r.clientWidth) - o), {
|
|
@@ -1125,12 +1128,12 @@ function lo(e) {
|
|
|
1125
1128
|
y: c
|
|
1126
1129
|
};
|
|
1127
1130
|
}
|
|
1128
|
-
function
|
|
1129
|
-
const n = he(e), r =
|
|
1131
|
+
function mo(e, t) {
|
|
1132
|
+
const n = he(e), r = Oe(e), o = n.visualViewport;
|
|
1130
1133
|
let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
|
|
1131
1134
|
if (o) {
|
|
1132
1135
|
s = o.width, i = o.height;
|
|
1133
|
-
const u =
|
|
1136
|
+
const u = Pt();
|
|
1134
1137
|
(!u || u && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
|
|
1135
1138
|
}
|
|
1136
1139
|
return {
|
|
@@ -1140,8 +1143,8 @@ function ao(e, t) {
|
|
|
1140
1143
|
y: a
|
|
1141
1144
|
};
|
|
1142
1145
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const n =
|
|
1146
|
+
function po(e, t) {
|
|
1147
|
+
const n = Ue(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = re(e) ? Xe(e) : Ce(1), i = e.clientWidth * s.x, c = e.clientHeight * s.y, a = o * s.x, u = r * s.y;
|
|
1145
1148
|
return {
|
|
1146
1149
|
width: i,
|
|
1147
1150
|
height: c,
|
|
@@ -1152,11 +1155,11 @@ function fo(e, t) {
|
|
|
1152
1155
|
function yn(e, t, n) {
|
|
1153
1156
|
let r;
|
|
1154
1157
|
if (t === "viewport")
|
|
1155
|
-
r =
|
|
1158
|
+
r = mo(e, n);
|
|
1156
1159
|
else if (t === "document")
|
|
1157
|
-
r =
|
|
1160
|
+
r = fo(Oe(e));
|
|
1158
1161
|
else if (Y(t))
|
|
1159
|
-
r =
|
|
1162
|
+
r = po(t, n);
|
|
1160
1163
|
else {
|
|
1161
1164
|
const o = lr(e);
|
|
1162
1165
|
r = {
|
|
@@ -1166,35 +1169,35 @@ function yn(e, t, n) {
|
|
|
1166
1169
|
height: t.height
|
|
1167
1170
|
};
|
|
1168
1171
|
}
|
|
1169
|
-
return
|
|
1172
|
+
return Ct(r);
|
|
1170
1173
|
}
|
|
1171
1174
|
function fr(e, t) {
|
|
1172
|
-
const n =
|
|
1173
|
-
return n === t || !Y(n) ||
|
|
1175
|
+
const n = ke(e);
|
|
1176
|
+
return n === t || !Y(n) || De(n) ? !1 : we(n).position === "fixed" || fr(n, t);
|
|
1174
1177
|
}
|
|
1175
|
-
function
|
|
1178
|
+
function go(e, t) {
|
|
1176
1179
|
const n = t.get(e);
|
|
1177
1180
|
if (n)
|
|
1178
1181
|
return n;
|
|
1179
|
-
let r =
|
|
1182
|
+
let r = Fe(e, [], !1).filter((c) => Y(c) && Ke(c) !== "body"), o = null;
|
|
1180
1183
|
const s = we(e).position === "fixed";
|
|
1181
|
-
let i = s ?
|
|
1182
|
-
for (; Y(i) && !
|
|
1184
|
+
let i = s ? ke(e) : e;
|
|
1185
|
+
for (; Y(i) && !De(i); ) {
|
|
1183
1186
|
const c = we(i), a = nn(i);
|
|
1184
|
-
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i =
|
|
1187
|
+
!a && c.position === "fixed" && (o = null), (s ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(i) && !a && fr(e, i)) ? r = r.filter((l) => l !== i) : o = c, i = ke(i);
|
|
1185
1188
|
}
|
|
1186
1189
|
return t.set(e, r), r;
|
|
1187
1190
|
}
|
|
1188
|
-
function
|
|
1191
|
+
function ho(e) {
|
|
1189
1192
|
let {
|
|
1190
1193
|
element: t,
|
|
1191
1194
|
boundary: n,
|
|
1192
1195
|
rootBoundary: r,
|
|
1193
1196
|
strategy: o
|
|
1194
1197
|
} = e;
|
|
1195
|
-
const i = [...n === "clippingAncestors" ?
|
|
1198
|
+
const i = [...n === "clippingAncestors" ? St(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
|
|
1196
1199
|
const p = yn(t, l, o);
|
|
1197
|
-
return u.top = be(p.top, u.top), u.right =
|
|
1200
|
+
return u.top = be(p.top, u.top), u.right = Qe(p.right, u.right), u.bottom = Qe(p.bottom, u.bottom), u.left = be(p.left, u.left), u;
|
|
1198
1201
|
}, yn(t, c, o));
|
|
1199
1202
|
return {
|
|
1200
1203
|
width: a.right - a.left,
|
|
@@ -1203,7 +1206,7 @@ function po(e) {
|
|
|
1203
1206
|
y: a.top
|
|
1204
1207
|
};
|
|
1205
1208
|
}
|
|
1206
|
-
function
|
|
1209
|
+
function vo(e) {
|
|
1207
1210
|
const {
|
|
1208
1211
|
width: t,
|
|
1209
1212
|
height: n
|
|
@@ -1213,59 +1216,63 @@ function go(e) {
|
|
|
1213
1216
|
height: n
|
|
1214
1217
|
};
|
|
1215
1218
|
}
|
|
1216
|
-
function
|
|
1217
|
-
const r =
|
|
1219
|
+
function bo(e, t, n) {
|
|
1220
|
+
const r = re(t), o = Oe(t), s = n === "fixed", i = Ue(e, !0, s, t);
|
|
1218
1221
|
let c = {
|
|
1219
1222
|
scrollLeft: 0,
|
|
1220
1223
|
scrollTop: 0
|
|
1221
1224
|
};
|
|
1222
|
-
const a =
|
|
1225
|
+
const a = Ce(0);
|
|
1226
|
+
function u() {
|
|
1227
|
+
a.x = cn(o);
|
|
1228
|
+
}
|
|
1223
1229
|
if (r || !r && !s)
|
|
1224
|
-
if ((
|
|
1225
|
-
const
|
|
1226
|
-
a.x =
|
|
1227
|
-
} else o && (
|
|
1228
|
-
|
|
1230
|
+
if ((Ke(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
|
|
1231
|
+
const d = Ue(t, !0, s, t);
|
|
1232
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
1233
|
+
} else o && u();
|
|
1234
|
+
s && !r && o && u();
|
|
1235
|
+
const l = o && !r && !s ? ar(o, c) : Ce(0), p = i.left + c.scrollLeft - a.x - l.x, g = i.top + c.scrollTop - a.y - l.y;
|
|
1229
1236
|
return {
|
|
1230
|
-
x:
|
|
1231
|
-
y:
|
|
1237
|
+
x: p,
|
|
1238
|
+
y: g,
|
|
1232
1239
|
width: i.width,
|
|
1233
1240
|
height: i.height
|
|
1234
1241
|
};
|
|
1235
1242
|
}
|
|
1236
|
-
function
|
|
1243
|
+
function Vt(e) {
|
|
1237
1244
|
return we(e).position === "static";
|
|
1238
1245
|
}
|
|
1239
1246
|
function xn(e, t) {
|
|
1240
|
-
if (!
|
|
1247
|
+
if (!re(e) || we(e).position === "fixed")
|
|
1241
1248
|
return null;
|
|
1242
1249
|
if (t)
|
|
1243
1250
|
return t(e);
|
|
1244
1251
|
let n = e.offsetParent;
|
|
1245
|
-
return
|
|
1252
|
+
return Oe(e) === n && (n = n.ownerDocument.body), n;
|
|
1246
1253
|
}
|
|
1247
1254
|
function dr(e, t) {
|
|
1248
1255
|
const n = he(e);
|
|
1249
|
-
if (
|
|
1256
|
+
if (St(e))
|
|
1250
1257
|
return n;
|
|
1251
|
-
if (!
|
|
1252
|
-
let o =
|
|
1253
|
-
for (; o && !
|
|
1254
|
-
if (Y(o) && !
|
|
1258
|
+
if (!re(e)) {
|
|
1259
|
+
let o = ke(e);
|
|
1260
|
+
for (; o && !De(o); ) {
|
|
1261
|
+
if (Y(o) && !Vt(o))
|
|
1255
1262
|
return o;
|
|
1256
|
-
o =
|
|
1263
|
+
o = ke(o);
|
|
1257
1264
|
}
|
|
1258
1265
|
return n;
|
|
1259
1266
|
}
|
|
1260
1267
|
let r = xn(e, t);
|
|
1261
|
-
for (; r && Mr(r) &&
|
|
1268
|
+
for (; r && Mr(r) && Vt(r); )
|
|
1262
1269
|
r = xn(r, t);
|
|
1263
|
-
return r &&
|
|
1270
|
+
return r && De(r) && Vt(r) && !nn(r) ? n : r || Sr(e) || n;
|
|
1264
1271
|
}
|
|
1265
|
-
const
|
|
1272
|
+
const yo = async function(e) {
|
|
1266
1273
|
const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
|
|
1267
1274
|
return {
|
|
1268
|
-
reference:
|
|
1275
|
+
reference: bo(e.reference, await t(e.floating), e.strategy),
|
|
1269
1276
|
floating: {
|
|
1270
1277
|
x: 0,
|
|
1271
1278
|
y: 0,
|
|
@@ -1274,27 +1281,27 @@ const vo = async function(e) {
|
|
|
1274
1281
|
}
|
|
1275
1282
|
};
|
|
1276
1283
|
};
|
|
1277
|
-
function
|
|
1284
|
+
function xo(e) {
|
|
1278
1285
|
return we(e).direction === "rtl";
|
|
1279
1286
|
}
|
|
1280
|
-
const
|
|
1281
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1282
|
-
getDocumentElement:
|
|
1283
|
-
getClippingRect:
|
|
1287
|
+
const wo = {
|
|
1288
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: lo,
|
|
1289
|
+
getDocumentElement: Oe,
|
|
1290
|
+
getClippingRect: ho,
|
|
1284
1291
|
getOffsetParent: dr,
|
|
1285
|
-
getElementRects:
|
|
1286
|
-
getClientRects:
|
|
1287
|
-
getDimensions:
|
|
1292
|
+
getElementRects: yo,
|
|
1293
|
+
getClientRects: ao,
|
|
1294
|
+
getDimensions: vo,
|
|
1288
1295
|
getScale: Xe,
|
|
1289
1296
|
isElement: Y,
|
|
1290
|
-
isRTL:
|
|
1297
|
+
isRTL: xo
|
|
1291
1298
|
};
|
|
1292
1299
|
function mr(e, t) {
|
|
1293
1300
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1294
1301
|
}
|
|
1295
|
-
function
|
|
1302
|
+
function Ro(e, t) {
|
|
1296
1303
|
let n = null, r;
|
|
1297
|
-
const o =
|
|
1304
|
+
const o = Oe(e);
|
|
1298
1305
|
function s() {
|
|
1299
1306
|
var c;
|
|
1300
1307
|
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -1311,19 +1318,19 @@ function xo(e, t) {
|
|
|
1311
1318
|
return;
|
|
1312
1319
|
const h = je(p), m = je(o.clientWidth - (l + g)), y = je(o.clientHeight - (p + d)), R = je(l), x = {
|
|
1313
1320
|
rootMargin: -h + "px " + -m + "px " + -y + "px " + -R + "px",
|
|
1314
|
-
threshold: be(0,
|
|
1321
|
+
threshold: be(0, Qe(1, a)) || 1
|
|
1315
1322
|
};
|
|
1316
|
-
let
|
|
1323
|
+
let C = !0;
|
|
1317
1324
|
function A(k) {
|
|
1318
1325
|
const N = k[0].intersectionRatio;
|
|
1319
1326
|
if (N !== a) {
|
|
1320
|
-
if (!
|
|
1327
|
+
if (!C)
|
|
1321
1328
|
return i();
|
|
1322
1329
|
N ? i(!1, N) : r = setTimeout(() => {
|
|
1323
1330
|
i(!1, 1e-7);
|
|
1324
1331
|
}, 1e3);
|
|
1325
1332
|
}
|
|
1326
|
-
N === 1 && !mr(u, e.getBoundingClientRect()) && i(),
|
|
1333
|
+
N === 1 && !mr(u, e.getBoundingClientRect()) && i(), C = !1;
|
|
1327
1334
|
}
|
|
1328
1335
|
try {
|
|
1329
1336
|
n = new IntersectionObserver(A, {
|
|
@@ -1338,7 +1345,7 @@ function xo(e, t) {
|
|
|
1338
1345
|
}
|
|
1339
1346
|
return i(!0), s;
|
|
1340
1347
|
}
|
|
1341
|
-
function
|
|
1348
|
+
function ui(e, t, n, r) {
|
|
1342
1349
|
r === void 0 && (r = {});
|
|
1343
1350
|
const {
|
|
1344
1351
|
ancestorScroll: o = !0,
|
|
@@ -1346,13 +1353,13 @@ function oi(e, t, n, r) {
|
|
|
1346
1353
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1347
1354
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1348
1355
|
animationFrame: a = !1
|
|
1349
|
-
} = r, u = sn(e), l = o || s ? [...u ?
|
|
1356
|
+
} = r, u = sn(e), l = o || s ? [...u ? Fe(u) : [], ...Fe(t)] : [];
|
|
1350
1357
|
l.forEach((R) => {
|
|
1351
1358
|
o && R.addEventListener("scroll", n, {
|
|
1352
1359
|
passive: !0
|
|
1353
1360
|
}), s && R.addEventListener("resize", n);
|
|
1354
1361
|
});
|
|
1355
|
-
const p = u && c ?
|
|
1362
|
+
const p = u && c ? Ro(u, n) : null;
|
|
1356
1363
|
let g = -1, d = null;
|
|
1357
1364
|
i && (d = new ResizeObserver((R) => {
|
|
1358
1365
|
let [v] = R;
|
|
@@ -1361,10 +1368,10 @@ function oi(e, t, n, r) {
|
|
|
1361
1368
|
(x = d) == null || x.observe(t);
|
|
1362
1369
|
})), n();
|
|
1363
1370
|
}), u && !a && d.observe(u), d.observe(t));
|
|
1364
|
-
let h, m = a ?
|
|
1371
|
+
let h, m = a ? Ue(e) : null;
|
|
1365
1372
|
a && y();
|
|
1366
1373
|
function y() {
|
|
1367
|
-
const R =
|
|
1374
|
+
const R = Ue(e);
|
|
1368
1375
|
m && !mr(m, R) && n(), m = R, h = requestAnimationFrame(y);
|
|
1369
1376
|
}
|
|
1370
1377
|
return n(), () => {
|
|
@@ -1374,20 +1381,21 @@ function oi(e, t, n, r) {
|
|
|
1374
1381
|
}), p == null || p(), (R = d) == null || R.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
1375
1382
|
};
|
|
1376
1383
|
}
|
|
1377
|
-
const
|
|
1384
|
+
const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
|
|
1378
1385
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1379
|
-
platform:
|
|
1386
|
+
platform: wo,
|
|
1380
1387
|
...n
|
|
1381
1388
|
}, s = {
|
|
1382
1389
|
...o.platform,
|
|
1383
1390
|
_c: r
|
|
1384
1391
|
};
|
|
1385
|
-
return
|
|
1392
|
+
return Zr(e, t, {
|
|
1386
1393
|
...o,
|
|
1387
1394
|
platform: s
|
|
1388
1395
|
});
|
|
1389
1396
|
};
|
|
1390
|
-
var
|
|
1397
|
+
var Mo = typeof document < "u", So = function() {
|
|
1398
|
+
}, xt = Mo ? $n : So;
|
|
1391
1399
|
function Tt(e, t) {
|
|
1392
1400
|
if (e === t)
|
|
1393
1401
|
return !0;
|
|
@@ -1431,7 +1439,7 @@ function $t(e) {
|
|
|
1431
1439
|
t.current = e;
|
|
1432
1440
|
}), t;
|
|
1433
1441
|
}
|
|
1434
|
-
function
|
|
1442
|
+
function Po(e) {
|
|
1435
1443
|
e === void 0 && (e = {});
|
|
1436
1444
|
const {
|
|
1437
1445
|
placement: t = "bottom",
|
|
@@ -1458,7 +1466,7 @@ function Oo(e) {
|
|
|
1458
1466
|
b !== k.current && (k.current = b, m(b));
|
|
1459
1467
|
}, []), x = f.useCallback((b) => {
|
|
1460
1468
|
b !== N.current && (N.current = b, R(b));
|
|
1461
|
-
}, []),
|
|
1469
|
+
}, []), C = s || h, A = i || y, k = f.useRef(null), N = f.useRef(null), D = f.useRef(l), L = a != null, F = $t(a), _ = $t(o), U = $t(u), K = f.useCallback(() => {
|
|
1462
1470
|
if (!k.current || !N.current)
|
|
1463
1471
|
return;
|
|
1464
1472
|
const b = {
|
|
@@ -1466,8 +1474,8 @@ function Oo(e) {
|
|
|
1466
1474
|
strategy: n,
|
|
1467
1475
|
middleware: g
|
|
1468
1476
|
};
|
|
1469
|
-
_.current && (b.platform = _.current),
|
|
1470
|
-
const
|
|
1477
|
+
_.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
|
|
1478
|
+
const S = {
|
|
1471
1479
|
...E,
|
|
1472
1480
|
// The floating element's position may be recomputed while it's closed
|
|
1473
1481
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -1475,13 +1483,13 @@ function Oo(e) {
|
|
|
1475
1483
|
// setting it to `true` when `open === false` (must be specified).
|
|
1476
1484
|
isPositioned: U.current !== !1
|
|
1477
1485
|
};
|
|
1478
|
-
O.current && !Tt(
|
|
1479
|
-
p(
|
|
1486
|
+
O.current && !Tt(D.current, S) && (D.current = S, tn.flushSync(() => {
|
|
1487
|
+
p(S);
|
|
1480
1488
|
}));
|
|
1481
1489
|
});
|
|
1482
1490
|
}, [g, t, n, _, U]);
|
|
1483
1491
|
xt(() => {
|
|
1484
|
-
u === !1 &&
|
|
1492
|
+
u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, p((b) => ({
|
|
1485
1493
|
...b,
|
|
1486
1494
|
isPositioned: !1
|
|
1487
1495
|
})));
|
|
@@ -1490,66 +1498,66 @@ function Oo(e) {
|
|
|
1490
1498
|
xt(() => (O.current = !0, () => {
|
|
1491
1499
|
O.current = !1;
|
|
1492
1500
|
}), []), xt(() => {
|
|
1493
|
-
if (
|
|
1501
|
+
if (C && (k.current = C), A && (N.current = A), C && A) {
|
|
1494
1502
|
if (F.current)
|
|
1495
|
-
return F.current(
|
|
1496
|
-
|
|
1503
|
+
return F.current(C, A, K);
|
|
1504
|
+
K();
|
|
1497
1505
|
}
|
|
1498
|
-
}, [
|
|
1506
|
+
}, [C, A, K, F, L]);
|
|
1499
1507
|
const w = f.useMemo(() => ({
|
|
1500
1508
|
reference: k,
|
|
1501
1509
|
floating: N,
|
|
1502
1510
|
setReference: v,
|
|
1503
1511
|
setFloating: x
|
|
1504
|
-
}), [v, x]),
|
|
1505
|
-
reference:
|
|
1512
|
+
}), [v, x]), W = f.useMemo(() => ({
|
|
1513
|
+
reference: C,
|
|
1506
1514
|
floating: A
|
|
1507
|
-
}), [
|
|
1515
|
+
}), [C, A]), T = f.useMemo(() => {
|
|
1508
1516
|
const b = {
|
|
1509
1517
|
position: n,
|
|
1510
1518
|
left: 0,
|
|
1511
1519
|
top: 0
|
|
1512
1520
|
};
|
|
1513
|
-
if (!
|
|
1521
|
+
if (!W.floating)
|
|
1514
1522
|
return b;
|
|
1515
|
-
const E = wn(
|
|
1523
|
+
const E = wn(W.floating, l.x), S = wn(W.floating, l.y);
|
|
1516
1524
|
return c ? {
|
|
1517
1525
|
...b,
|
|
1518
|
-
transform: "translate(" + E + "px, " +
|
|
1519
|
-
...pr(
|
|
1526
|
+
transform: "translate(" + E + "px, " + S + "px)",
|
|
1527
|
+
...pr(W.floating) >= 1.5 && {
|
|
1520
1528
|
willChange: "transform"
|
|
1521
1529
|
}
|
|
1522
1530
|
} : {
|
|
1523
1531
|
position: n,
|
|
1524
1532
|
left: E,
|
|
1525
|
-
top:
|
|
1533
|
+
top: S
|
|
1526
1534
|
};
|
|
1527
|
-
}, [n, c,
|
|
1535
|
+
}, [n, c, W.floating, l.x, l.y]);
|
|
1528
1536
|
return f.useMemo(() => ({
|
|
1529
1537
|
...l,
|
|
1530
|
-
update:
|
|
1538
|
+
update: K,
|
|
1531
1539
|
refs: w,
|
|
1532
|
-
elements:
|
|
1540
|
+
elements: W,
|
|
1533
1541
|
floatingStyles: T
|
|
1534
|
-
}), [l,
|
|
1542
|
+
}), [l, K, w, W, T]);
|
|
1535
1543
|
}
|
|
1536
|
-
const
|
|
1537
|
-
...wo(e),
|
|
1538
|
-
options: [e, t]
|
|
1539
|
-
}), si = (e, t) => ({
|
|
1544
|
+
const li = (e, t) => ({
|
|
1540
1545
|
...Eo(e),
|
|
1541
1546
|
options: [e, t]
|
|
1542
|
-
}),
|
|
1547
|
+
}), ai = (e, t) => ({
|
|
1543
1548
|
...Io(e),
|
|
1544
1549
|
options: [e, t]
|
|
1545
|
-
}),
|
|
1546
|
-
...
|
|
1550
|
+
}), fi = (e, t) => ({
|
|
1551
|
+
...To(e),
|
|
1547
1552
|
options: [e, t]
|
|
1548
|
-
}),
|
|
1549
|
-
...
|
|
1553
|
+
}), di = (e, t) => ({
|
|
1554
|
+
...Oo(e),
|
|
1555
|
+
options: [e, t]
|
|
1556
|
+
}), mi = (e, t) => ({
|
|
1557
|
+
...Co(e),
|
|
1550
1558
|
options: [e, t]
|
|
1551
1559
|
});
|
|
1552
|
-
function
|
|
1560
|
+
function Do(e) {
|
|
1553
1561
|
const t = f.useRef(void 0), n = f.useCallback((r) => {
|
|
1554
1562
|
const o = e.map((s) => {
|
|
1555
1563
|
if (s != null) {
|
|
@@ -1572,7 +1580,7 @@ function Ao(e) {
|
|
|
1572
1580
|
t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
|
|
1573
1581
|
}, e);
|
|
1574
1582
|
}
|
|
1575
|
-
function
|
|
1583
|
+
function ko(e, t) {
|
|
1576
1584
|
const n = e.compareDocumentPosition(t);
|
|
1577
1585
|
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
1578
1586
|
}
|
|
@@ -1586,7 +1594,7 @@ const gr = /* @__PURE__ */ f.createContext({
|
|
|
1586
1594
|
current: []
|
|
1587
1595
|
}
|
|
1588
1596
|
});
|
|
1589
|
-
function
|
|
1597
|
+
function Lo(e) {
|
|
1590
1598
|
const {
|
|
1591
1599
|
children: t,
|
|
1592
1600
|
elementsRef: n,
|
|
@@ -1600,7 +1608,7 @@ function Po(e) {
|
|
|
1600
1608
|
});
|
|
1601
1609
|
}, []), a = f.useMemo(() => {
|
|
1602
1610
|
const u = /* @__PURE__ */ new Map();
|
|
1603
|
-
return Array.from(o.keys()).sort(
|
|
1611
|
+
return Array.from(o.keys()).sort(ko).forEach((p, g) => {
|
|
1604
1612
|
u.set(p, g);
|
|
1605
1613
|
}), u;
|
|
1606
1614
|
}, [o]);
|
|
@@ -1615,7 +1623,7 @@ function Po(e) {
|
|
|
1615
1623
|
children: t
|
|
1616
1624
|
});
|
|
1617
1625
|
}
|
|
1618
|
-
function
|
|
1626
|
+
function Fo(e) {
|
|
1619
1627
|
e === void 0 && (e = {});
|
|
1620
1628
|
const {
|
|
1621
1629
|
label: t
|
|
@@ -1646,7 +1654,7 @@ function So(e) {
|
|
|
1646
1654
|
index: c ?? -1
|
|
1647
1655
|
}), [c, l]);
|
|
1648
1656
|
}
|
|
1649
|
-
const
|
|
1657
|
+
const No = "data-floating-ui-focusable", Rn = "active", En = "selected", _e = "ArrowLeft", We = "ArrowRight", st = "ArrowUp", Ne = "ArrowDown";
|
|
1650
1658
|
function hr(e, t) {
|
|
1651
1659
|
return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
|
|
1652
1660
|
...t
|
|
@@ -1656,7 +1664,7 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1656
1664
|
activeIndex: 0,
|
|
1657
1665
|
onNavigate: () => {
|
|
1658
1666
|
}
|
|
1659
|
-
}), br = [
|
|
1667
|
+
}), br = [_e, We], yr = [st, Ne], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1660
1668
|
const {
|
|
1661
1669
|
render: r,
|
|
1662
1670
|
orientation: o = "both",
|
|
@@ -1669,32 +1677,32 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1669
1677
|
itemSizes: p,
|
|
1670
1678
|
dense: g = !1,
|
|
1671
1679
|
...d
|
|
1672
|
-
} = t, [h, m] = f.useState(0), y = u ?? h, R =
|
|
1680
|
+
} = t, [h, m] = f.useState(0), y = u ?? h, R = se(l ?? m), v = f.useRef([]), x = r && typeof r != "function" ? r.props : {}, C = f.useMemo(() => ({
|
|
1673
1681
|
activeIndex: y,
|
|
1674
1682
|
onNavigate: R
|
|
1675
1683
|
}), [y, R]), A = c > 1;
|
|
1676
|
-
function k(
|
|
1677
|
-
if (!Bt.includes(
|
|
1684
|
+
function k(D) {
|
|
1685
|
+
if (!Bt.includes(D.key)) return;
|
|
1678
1686
|
let L = y;
|
|
1679
|
-
const F = yt(v, a), _ = en(v, a), U = i ?
|
|
1687
|
+
const F = yt(v, a), _ = en(v, a), U = i ? _e : We, K = i ? We : _e;
|
|
1680
1688
|
if (A) {
|
|
1681
1689
|
const b = p || Array.from({
|
|
1682
1690
|
length: v.current.length
|
|
1683
1691
|
}, () => ({
|
|
1684
1692
|
width: 1,
|
|
1685
1693
|
height: 1
|
|
1686
|
-
})), E = nr(b, c, g),
|
|
1687
|
-
current: E.map((
|
|
1694
|
+
})), E = nr(b, c, g), S = E.findIndex((V) => V != null && !ze(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !ze(v, ee, a) ? ae : V, -1), I = E[tr({
|
|
1695
|
+
current: E.map((V) => V ? v.current[V] : null)
|
|
1688
1696
|
}, {
|
|
1689
|
-
event:
|
|
1697
|
+
event: D,
|
|
1690
1698
|
orientation: o,
|
|
1691
1699
|
loop: s,
|
|
1692
1700
|
rtl: i,
|
|
1693
1701
|
cols: c,
|
|
1694
1702
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
1695
1703
|
// don't end up in them
|
|
1696
|
-
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((
|
|
1697
|
-
minIndex:
|
|
1704
|
+
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => ze(v, ee, a) ? ee : void 0), void 0], E),
|
|
1705
|
+
minIndex: S,
|
|
1698
1706
|
maxIndex: G,
|
|
1699
1707
|
prevIndex: rr(
|
|
1700
1708
|
y > _ ? F : y,
|
|
@@ -1704,31 +1712,31 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1704
1712
|
// use a corner matching the edge closest to the direction we're
|
|
1705
1713
|
// moving in so we don't end up in the same item. Prefer
|
|
1706
1714
|
// top/left over bottom/right.
|
|
1707
|
-
|
|
1715
|
+
D.key === Ne ? "bl" : D.key === U ? "tr" : "tl"
|
|
1708
1716
|
)
|
|
1709
1717
|
})];
|
|
1710
|
-
|
|
1718
|
+
I != null && (L = I);
|
|
1711
1719
|
}
|
|
1712
1720
|
const O = {
|
|
1713
1721
|
horizontal: [U],
|
|
1714
|
-
vertical: [
|
|
1715
|
-
both: [U,
|
|
1722
|
+
vertical: [Ne],
|
|
1723
|
+
both: [U, Ne]
|
|
1716
1724
|
}[o], w = {
|
|
1717
|
-
horizontal: [
|
|
1725
|
+
horizontal: [K],
|
|
1718
1726
|
vertical: [st],
|
|
1719
|
-
both: [
|
|
1720
|
-
}[o],
|
|
1727
|
+
both: [K, st]
|
|
1728
|
+
}[o], W = A ? Bt : {
|
|
1721
1729
|
horizontal: br,
|
|
1722
1730
|
vertical: yr,
|
|
1723
1731
|
both: Bt
|
|
1724
1732
|
}[o];
|
|
1725
|
-
if (L === y && [...O, ...w].includes(
|
|
1733
|
+
if (L === y && [...O, ...w].includes(D.key) && (s && L === _ && O.includes(D.key) ? L = F : s && L === F && w.includes(D.key) ? L = _ : L = ue(v, {
|
|
1726
1734
|
startingIndex: L,
|
|
1727
|
-
decrement: w.includes(
|
|
1735
|
+
decrement: w.includes(D.key),
|
|
1728
1736
|
disabledIndices: a
|
|
1729
1737
|
})), L !== y && !Ye(v, L)) {
|
|
1730
1738
|
var T;
|
|
1731
|
-
|
|
1739
|
+
D.stopPropagation(), W.includes(D.key) && D.preventDefault(), R(L), (T = v.current[L]) == null || T.focus();
|
|
1732
1740
|
}
|
|
1733
1741
|
}
|
|
1734
1742
|
const N = {
|
|
@@ -1736,18 +1744,18 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1736
1744
|
...x,
|
|
1737
1745
|
ref: n,
|
|
1738
1746
|
"aria-orientation": o === "both" ? void 0 : o,
|
|
1739
|
-
onKeyDown(
|
|
1740
|
-
d.onKeyDown == null || d.onKeyDown(
|
|
1747
|
+
onKeyDown(D) {
|
|
1748
|
+
d.onKeyDown == null || d.onKeyDown(D), x.onKeyDown == null || x.onKeyDown(D), k(D);
|
|
1741
1749
|
}
|
|
1742
1750
|
};
|
|
1743
1751
|
return /* @__PURE__ */ ge(vr.Provider, {
|
|
1744
|
-
value:
|
|
1745
|
-
children: /* @__PURE__ */ ge(
|
|
1752
|
+
value: C,
|
|
1753
|
+
children: /* @__PURE__ */ ge(Lo, {
|
|
1746
1754
|
elementsRef: v,
|
|
1747
1755
|
children: hr(r, N)
|
|
1748
1756
|
})
|
|
1749
1757
|
});
|
|
1750
|
-
}),
|
|
1758
|
+
}), gi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1751
1759
|
const {
|
|
1752
1760
|
render: r,
|
|
1753
1761
|
...o
|
|
@@ -1757,7 +1765,7 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1757
1765
|
} = f.useContext(vr), {
|
|
1758
1766
|
ref: a,
|
|
1759
1767
|
index: u
|
|
1760
|
-
} =
|
|
1768
|
+
} = Fo(), l = Do([a, n, s.ref]), p = i === u, g = {
|
|
1761
1769
|
...o,
|
|
1762
1770
|
...s,
|
|
1763
1771
|
ref: l,
|
|
@@ -1768,24 +1776,24 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1768
1776
|
}
|
|
1769
1777
|
};
|
|
1770
1778
|
return hr(r, g);
|
|
1771
|
-
}),
|
|
1779
|
+
}), _o = {
|
|
1772
1780
|
...f
|
|
1773
1781
|
};
|
|
1774
|
-
let
|
|
1775
|
-
const
|
|
1782
|
+
let Cn = !1, Wo = 0;
|
|
1783
|
+
const In = () => (
|
|
1776
1784
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
1777
1785
|
// on <React 18
|
|
1778
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
1786
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
|
|
1779
1787
|
);
|
|
1780
|
-
function
|
|
1781
|
-
const [e, t] = f.useState(() =>
|
|
1788
|
+
function Ko() {
|
|
1789
|
+
const [e, t] = f.useState(() => Cn ? In() : void 0);
|
|
1782
1790
|
return X(() => {
|
|
1783
|
-
e == null && t(
|
|
1791
|
+
e == null && t(In());
|
|
1784
1792
|
}, []), f.useEffect(() => {
|
|
1785
|
-
|
|
1793
|
+
Cn = !0;
|
|
1786
1794
|
}, []), e;
|
|
1787
1795
|
}
|
|
1788
|
-
const
|
|
1796
|
+
const Vo = _o.useId, Lt = Vo || Ko;
|
|
1789
1797
|
let ct;
|
|
1790
1798
|
process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
|
|
1791
1799
|
function Ht() {
|
|
@@ -1797,7 +1805,7 @@ function Ht() {
|
|
|
1797
1805
|
(s = ct) == null || s.add(o), console.warn(o);
|
|
1798
1806
|
}
|
|
1799
1807
|
}
|
|
1800
|
-
function
|
|
1808
|
+
function $o() {
|
|
1801
1809
|
for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1802
1810
|
n[r] = arguments[r];
|
|
1803
1811
|
const o = "Floating UI: " + n.join(" ");
|
|
@@ -1822,12 +1830,12 @@ function xr() {
|
|
|
1822
1830
|
}
|
|
1823
1831
|
};
|
|
1824
1832
|
}
|
|
1825
|
-
const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null),
|
|
1833
|
+
const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null), et = () => {
|
|
1826
1834
|
var e;
|
|
1827
1835
|
return ((e = f.useContext(wr)) == null ? void 0 : e.id) || null;
|
|
1828
|
-
},
|
|
1829
|
-
function
|
|
1830
|
-
const t = Lt(), n =
|
|
1836
|
+
}, tt = () => f.useContext(Rr);
|
|
1837
|
+
function hi(e) {
|
|
1838
|
+
const t = Lt(), n = tt(), o = et();
|
|
1831
1839
|
return X(() => {
|
|
1832
1840
|
if (!t) return;
|
|
1833
1841
|
const s = {
|
|
@@ -1839,11 +1847,11 @@ function di(e) {
|
|
|
1839
1847
|
};
|
|
1840
1848
|
}, [n, t, o]), t;
|
|
1841
1849
|
}
|
|
1842
|
-
function
|
|
1850
|
+
function vi(e) {
|
|
1843
1851
|
const {
|
|
1844
1852
|
children: t,
|
|
1845
1853
|
id: n
|
|
1846
|
-
} = e, r =
|
|
1854
|
+
} = e, r = et();
|
|
1847
1855
|
return /* @__PURE__ */ ge(wr.Provider, {
|
|
1848
1856
|
value: f.useMemo(() => ({
|
|
1849
1857
|
id: n,
|
|
@@ -1852,7 +1860,7 @@ function mi(e) {
|
|
|
1852
1860
|
children: t
|
|
1853
1861
|
});
|
|
1854
1862
|
}
|
|
1855
|
-
function
|
|
1863
|
+
function bi(e) {
|
|
1856
1864
|
const {
|
|
1857
1865
|
children: t
|
|
1858
1866
|
} = e, n = f.useRef([]), r = f.useCallback((i) => {
|
|
@@ -1870,13 +1878,13 @@ function pi(e) {
|
|
|
1870
1878
|
children: t
|
|
1871
1879
|
});
|
|
1872
1880
|
}
|
|
1873
|
-
function
|
|
1881
|
+
function Ge(e) {
|
|
1874
1882
|
return "data-floating-ui-" + e;
|
|
1875
1883
|
}
|
|
1876
1884
|
function ve(e) {
|
|
1877
1885
|
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
1878
1886
|
}
|
|
1879
|
-
const Tn = /* @__PURE__ */
|
|
1887
|
+
const Tn = /* @__PURE__ */ Ge("safe-polygon");
|
|
1880
1888
|
function zt(e, t, n) {
|
|
1881
1889
|
if (n && !it(n))
|
|
1882
1890
|
return 0;
|
|
@@ -1891,7 +1899,7 @@ function zt(e, t, n) {
|
|
|
1891
1899
|
function Ut(e) {
|
|
1892
1900
|
return typeof e == "function" ? e() : e;
|
|
1893
1901
|
}
|
|
1894
|
-
function
|
|
1902
|
+
function yi(e, t) {
|
|
1895
1903
|
t === void 0 && (t = {});
|
|
1896
1904
|
const {
|
|
1897
1905
|
open: n,
|
|
@@ -1906,8 +1914,8 @@ function gi(e, t) {
|
|
|
1906
1914
|
mouseOnly: l = !1,
|
|
1907
1915
|
restMs: p = 0,
|
|
1908
1916
|
move: g = !0
|
|
1909
|
-
} = t, d =
|
|
1910
|
-
}), F = f.useRef(!1), _ =
|
|
1917
|
+
} = t, d = tt(), h = et(), m = xe(u), y = xe(a), R = xe(n), v = xe(p), x = f.useRef(), C = f.useRef(-1), A = f.useRef(), k = f.useRef(-1), N = f.useRef(!0), D = f.useRef(!1), L = f.useRef(() => {
|
|
1918
|
+
}), F = f.useRef(!1), _ = se(() => {
|
|
1911
1919
|
var T;
|
|
1912
1920
|
const b = (T = o.current.openEvent) == null ? void 0 : T.type;
|
|
1913
1921
|
return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
|
|
@@ -1918,7 +1926,7 @@ function gi(e, t) {
|
|
|
1918
1926
|
let {
|
|
1919
1927
|
open: E
|
|
1920
1928
|
} = b;
|
|
1921
|
-
E || (ve(
|
|
1929
|
+
E || (ve(C), ve(k), N.current = !0, F.current = !1);
|
|
1922
1930
|
}
|
|
1923
1931
|
return s.on("openchange", T), () => {
|
|
1924
1932
|
s.off("openchange", T);
|
|
@@ -1928,104 +1936,104 @@ function gi(e, t) {
|
|
|
1928
1936
|
function T(E) {
|
|
1929
1937
|
_() && r(!1, E, "hover");
|
|
1930
1938
|
}
|
|
1931
|
-
const b =
|
|
1939
|
+
const b = le(i.floating).documentElement;
|
|
1932
1940
|
return b.addEventListener("mouseleave", T), () => {
|
|
1933
1941
|
b.removeEventListener("mouseleave", T);
|
|
1934
1942
|
};
|
|
1935
1943
|
}, [i.floating, n, r, c, m, _]);
|
|
1936
1944
|
const U = f.useCallback(function(T, b, E) {
|
|
1937
1945
|
b === void 0 && (b = !0), E === void 0 && (E = "hover");
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1940
|
-
}, [y, r]),
|
|
1946
|
+
const S = zt(y.current, "close", x.current);
|
|
1947
|
+
S && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), S)) : b && (ve(C), r(!1, T, E));
|
|
1948
|
+
}, [y, r]), K = se(() => {
|
|
1941
1949
|
L.current(), A.current = void 0;
|
|
1942
|
-
}), O =
|
|
1943
|
-
if (
|
|
1944
|
-
const T =
|
|
1945
|
-
T.style.pointerEvents = "", T.removeAttribute(Tn),
|
|
1950
|
+
}), O = se(() => {
|
|
1951
|
+
if (D.current) {
|
|
1952
|
+
const T = le(i.floating).body;
|
|
1953
|
+
T.style.pointerEvents = "", T.removeAttribute(Tn), D.current = !1;
|
|
1946
1954
|
}
|
|
1947
|
-
}), w =
|
|
1955
|
+
}), w = se(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
1948
1956
|
f.useEffect(() => {
|
|
1949
1957
|
if (!c) return;
|
|
1950
|
-
function T(
|
|
1951
|
-
if (ve(
|
|
1958
|
+
function T(I) {
|
|
1959
|
+
if (ve(C), N.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
|
|
1952
1960
|
return;
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
R.current || r(!0,
|
|
1956
|
-
},
|
|
1961
|
+
const V = zt(y.current, "open", x.current);
|
|
1962
|
+
V ? C.current = window.setTimeout(() => {
|
|
1963
|
+
R.current || r(!0, I, "hover");
|
|
1964
|
+
}, V) : n || r(!0, I, "hover");
|
|
1957
1965
|
}
|
|
1958
|
-
function b(
|
|
1966
|
+
function b(I) {
|
|
1959
1967
|
if (w()) {
|
|
1960
1968
|
O();
|
|
1961
1969
|
return;
|
|
1962
1970
|
}
|
|
1963
1971
|
L.current();
|
|
1964
|
-
const
|
|
1972
|
+
const V = le(i.floating);
|
|
1965
1973
|
if (ve(k), F.current = !1, m.current && o.current.floatingContext) {
|
|
1966
|
-
n || ve(
|
|
1974
|
+
n || ve(C), A.current = m.current({
|
|
1967
1975
|
...o.current.floatingContext,
|
|
1968
1976
|
tree: d,
|
|
1969
|
-
x:
|
|
1970
|
-
y:
|
|
1977
|
+
x: I.clientX,
|
|
1978
|
+
y: I.clientY,
|
|
1971
1979
|
onClose() {
|
|
1972
|
-
O(),
|
|
1980
|
+
O(), K(), w() || U(I, !0, "safe-polygon");
|
|
1973
1981
|
}
|
|
1974
1982
|
});
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1983
|
+
const ae = A.current;
|
|
1984
|
+
V.addEventListener("mousemove", ae), L.current = () => {
|
|
1985
|
+
V.removeEventListener("mousemove", ae);
|
|
1978
1986
|
};
|
|
1979
1987
|
return;
|
|
1980
1988
|
}
|
|
1981
|
-
(x.current === "touch" ? !
|
|
1989
|
+
(x.current === "touch" ? !ce(i.floating, I.relatedTarget) : !0) && U(I);
|
|
1982
1990
|
}
|
|
1983
|
-
function E(
|
|
1991
|
+
function E(I) {
|
|
1984
1992
|
w() || o.current.floatingContext && (m.current == null || m.current({
|
|
1985
1993
|
...o.current.floatingContext,
|
|
1986
1994
|
tree: d,
|
|
1987
|
-
x:
|
|
1988
|
-
y:
|
|
1995
|
+
x: I.clientX,
|
|
1996
|
+
y: I.clientY,
|
|
1989
1997
|
onClose() {
|
|
1990
|
-
O(),
|
|
1998
|
+
O(), K(), w() || U(I);
|
|
1991
1999
|
}
|
|
1992
|
-
})(
|
|
2000
|
+
})(I));
|
|
1993
2001
|
}
|
|
1994
|
-
function
|
|
1995
|
-
ve(
|
|
2002
|
+
function S() {
|
|
2003
|
+
ve(C);
|
|
1996
2004
|
}
|
|
1997
|
-
function G(
|
|
1998
|
-
w() || U(
|
|
2005
|
+
function G(I) {
|
|
2006
|
+
w() || U(I, !1);
|
|
1999
2007
|
}
|
|
2000
2008
|
if (Y(i.domReference)) {
|
|
2001
|
-
const
|
|
2002
|
-
return n &&
|
|
2009
|
+
const I = i.domReference, V = i.floating;
|
|
2010
|
+
return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
|
|
2003
2011
|
once: !0
|
|
2004
|
-
}),
|
|
2005
|
-
n &&
|
|
2012
|
+
}), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", S), V.addEventListener("mouseleave", G)), () => {
|
|
2013
|
+
n && I.removeEventListener("mouseleave", E), g && I.removeEventListener("mousemove", T), I.removeEventListener("mouseenter", T), I.removeEventListener("mouseleave", b), V && (V.removeEventListener("mouseleave", E), V.removeEventListener("mouseenter", S), V.removeEventListener("mouseleave", G));
|
|
2006
2014
|
};
|
|
2007
2015
|
}
|
|
2008
|
-
}, [i, c, e, l, g, U,
|
|
2016
|
+
}, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
|
|
2009
2017
|
var T;
|
|
2010
2018
|
if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && _()) {
|
|
2011
|
-
|
|
2019
|
+
D.current = !0;
|
|
2012
2020
|
const E = i.floating;
|
|
2013
2021
|
if (Y(i.domReference) && E) {
|
|
2014
2022
|
var b;
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
const G = i.domReference,
|
|
2018
|
-
return
|
|
2019
|
-
|
|
2023
|
+
const S = le(i.floating).body;
|
|
2024
|
+
S.setAttribute(Tn, "");
|
|
2025
|
+
const G = i.domReference, I = d == null || (b = d.nodesRef.current.find((V) => V.id === h)) == null || (b = b.context) == null ? void 0 : b.elements.floating;
|
|
2026
|
+
return I && (I.style.pointerEvents = ""), S.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
|
|
2027
|
+
S.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
|
|
2020
2028
|
};
|
|
2021
2029
|
}
|
|
2022
2030
|
}
|
|
2023
2031
|
}, [c, n, h, i, d, m, _]), X(() => {
|
|
2024
|
-
n || (x.current = void 0, F.current = !1,
|
|
2025
|
-
}, [n,
|
|
2026
|
-
|
|
2027
|
-
}, [c, i.domReference,
|
|
2028
|
-
const
|
|
2032
|
+
n || (x.current = void 0, F.current = !1, K(), O());
|
|
2033
|
+
}, [n, K, O]), f.useEffect(() => () => {
|
|
2034
|
+
K(), ve(C), ve(k), O();
|
|
2035
|
+
}, [c, i.domReference, K, O]);
|
|
2036
|
+
const W = f.useMemo(() => {
|
|
2029
2037
|
function T(b) {
|
|
2030
2038
|
x.current = b.pointerType;
|
|
2031
2039
|
}
|
|
@@ -2036,19 +2044,19 @@ function gi(e, t) {
|
|
|
2036
2044
|
const {
|
|
2037
2045
|
nativeEvent: E
|
|
2038
2046
|
} = b;
|
|
2039
|
-
function
|
|
2047
|
+
function S() {
|
|
2040
2048
|
!N.current && !R.current && r(!0, E, "hover");
|
|
2041
2049
|
}
|
|
2042
|
-
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ?
|
|
2050
|
+
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? S() : (F.current = !0, k.current = window.setTimeout(S, Ut(v.current))));
|
|
2043
2051
|
}
|
|
2044
2052
|
};
|
|
2045
2053
|
}, [l, r, n, R, v]);
|
|
2046
2054
|
return f.useMemo(() => c ? {
|
|
2047
|
-
reference:
|
|
2048
|
-
} : {}, [c,
|
|
2055
|
+
reference: W
|
|
2056
|
+
} : {}, [c, W]);
|
|
2049
2057
|
}
|
|
2050
2058
|
let On = 0;
|
|
2051
|
-
function
|
|
2059
|
+
function Be(e, t) {
|
|
2052
2060
|
t === void 0 && (t = {});
|
|
2053
2061
|
const {
|
|
2054
2062
|
preventScroll: n = !1,
|
|
@@ -2061,18 +2069,26 @@ function We(e, t) {
|
|
|
2061
2069
|
});
|
|
2062
2070
|
o ? s() : On = requestAnimationFrame(s);
|
|
2063
2071
|
}
|
|
2064
|
-
function
|
|
2072
|
+
function Bo(e) {
|
|
2065
2073
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
2066
2074
|
}
|
|
2067
|
-
|
|
2068
|
-
|
|
2075
|
+
const Je = {
|
|
2076
|
+
inert: /* @__PURE__ */ new WeakMap(),
|
|
2077
|
+
"aria-hidden": /* @__PURE__ */ new WeakMap(),
|
|
2078
|
+
none: /* @__PURE__ */ new WeakMap()
|
|
2079
|
+
};
|
|
2080
|
+
function An(e) {
|
|
2081
|
+
return e === "inert" ? Je.inert : e === "aria-hidden" ? Je["aria-hidden"] : Je.none;
|
|
2082
|
+
}
|
|
2083
|
+
let gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
|
|
2084
|
+
const Ho = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Er = (e) => e && (e.host || Er(e.parentNode)), zo = (e, t) => t.map((n) => {
|
|
2069
2085
|
if (e.contains(n))
|
|
2070
2086
|
return n;
|
|
2071
2087
|
const r = Er(n);
|
|
2072
2088
|
return e.contains(r) ? r : null;
|
|
2073
2089
|
}).filter((n) => n != null);
|
|
2074
|
-
function
|
|
2075
|
-
const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i =
|
|
2090
|
+
function Uo(e, t, n, r) {
|
|
2091
|
+
const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i = zo(t, e), c = /* @__PURE__ */ new Set(), a = new Set(i), u = [];
|
|
2076
2092
|
ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
|
|
2077
2093
|
const l = ht[o];
|
|
2078
2094
|
i.forEach(p), g(t), c.clear();
|
|
@@ -2081,26 +2097,26 @@ function $o(e, t, n, r) {
|
|
|
2081
2097
|
}
|
|
2082
2098
|
function g(d) {
|
|
2083
2099
|
!d || a.has(d) || [].forEach.call(d.children, (h) => {
|
|
2084
|
-
if (
|
|
2100
|
+
if (Ke(h) !== "script")
|
|
2085
2101
|
if (c.has(h))
|
|
2086
2102
|
g(h);
|
|
2087
2103
|
else {
|
|
2088
|
-
const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R =
|
|
2089
|
-
|
|
2104
|
+
const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R = An(s), v = (R.get(h) || 0) + 1, x = (l.get(h) || 0) + 1;
|
|
2105
|
+
R.set(h, v), l.set(h, x), u.push(h), v === 1 && y && gt.add(h), x === 1 && h.setAttribute(o, ""), !y && s && h.setAttribute(s, s === "inert" ? "" : "true");
|
|
2090
2106
|
}
|
|
2091
2107
|
});
|
|
2092
2108
|
}
|
|
2093
2109
|
return Gt++, () => {
|
|
2094
2110
|
u.forEach((d) => {
|
|
2095
|
-
const h =
|
|
2096
|
-
|
|
2097
|
-
}), Gt--, Gt || (
|
|
2111
|
+
const h = An(s), y = (h.get(d) || 0) - 1, R = (l.get(d) || 0) - 1;
|
|
2112
|
+
h.set(d, y), l.set(d, R), y || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), R || d.removeAttribute(o);
|
|
2113
|
+
}), Gt--, Gt || (Je.inert = /* @__PURE__ */ new WeakMap(), Je["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Je.none = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
|
|
2098
2114
|
};
|
|
2099
2115
|
}
|
|
2100
|
-
function
|
|
2116
|
+
function Mn(e, t, n) {
|
|
2101
2117
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2102
|
-
const r =
|
|
2103
|
-
return
|
|
2118
|
+
const r = Bo(e[0]).body;
|
|
2119
|
+
return Uo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
|
|
2104
2120
|
}
|
|
2105
2121
|
const Ft = {
|
|
2106
2122
|
border: 0,
|
|
@@ -2125,20 +2141,20 @@ const Ft = {
|
|
|
2125
2141
|
// Role is only for VoiceOver
|
|
2126
2142
|
role: r,
|
|
2127
2143
|
"aria-hidden": r ? void 0 : !0,
|
|
2128
|
-
[
|
|
2144
|
+
[Ge("focus-guard")]: "",
|
|
2129
2145
|
style: Ft
|
|
2130
2146
|
};
|
|
2131
2147
|
return /* @__PURE__ */ ge("span", {
|
|
2132
2148
|
...t,
|
|
2133
2149
|
...s
|
|
2134
2150
|
});
|
|
2135
|
-
}),
|
|
2136
|
-
function
|
|
2151
|
+
}), Cr = /* @__PURE__ */ f.createContext(null), Sn = /* @__PURE__ */ Ge("portal");
|
|
2152
|
+
function Go(e) {
|
|
2137
2153
|
e === void 0 && (e = {});
|
|
2138
2154
|
const {
|
|
2139
2155
|
id: t,
|
|
2140
2156
|
root: n
|
|
2141
|
-
} = e, r = Lt(), o =
|
|
2157
|
+
} = e, r = Lt(), o = Ir(), [s, i] = f.useState(null), c = f.useRef(null);
|
|
2142
2158
|
return X(() => () => {
|
|
2143
2159
|
s == null || s.remove(), queueMicrotask(() => {
|
|
2144
2160
|
c.current = null;
|
|
@@ -2148,7 +2164,7 @@ function Bo(e) {
|
|
|
2148
2164
|
const a = t ? document.getElementById(t) : null;
|
|
2149
2165
|
if (!a) return;
|
|
2150
2166
|
const u = document.createElement("div");
|
|
2151
|
-
u.id = r, u.setAttribute(
|
|
2167
|
+
u.id = r, u.setAttribute(Sn, ""), a.appendChild(u), c.current = u, i(u);
|
|
2152
2168
|
}, [t, r]), X(() => {
|
|
2153
2169
|
if (n === null || !r || c.current) return;
|
|
2154
2170
|
let a = n || (o == null ? void 0 : o.portalNode);
|
|
@@ -2156,16 +2172,16 @@ function Bo(e) {
|
|
|
2156
2172
|
let u = null;
|
|
2157
2173
|
t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
|
|
2158
2174
|
const l = document.createElement("div");
|
|
2159
|
-
l.id = r, l.setAttribute(
|
|
2175
|
+
l.id = r, l.setAttribute(Sn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
|
|
2160
2176
|
}, [t, n, r, o]), s;
|
|
2161
2177
|
}
|
|
2162
|
-
function
|
|
2178
|
+
function xi(e) {
|
|
2163
2179
|
const {
|
|
2164
2180
|
children: t,
|
|
2165
2181
|
id: n,
|
|
2166
2182
|
root: r,
|
|
2167
2183
|
preserveTabOrder: o = !0
|
|
2168
|
-
} = e, s =
|
|
2184
|
+
} = e, s = Go({
|
|
2169
2185
|
id: n,
|
|
2170
2186
|
root: r
|
|
2171
2187
|
}), [i, c] = f.useState(null), a = f.useRef(null), u = f.useRef(null), l = f.useRef(null), p = f.useRef(null), g = i == null ? void 0 : i.modal, d = i == null ? void 0 : i.open, h = (
|
|
@@ -2179,14 +2195,14 @@ function hi(e) {
|
|
|
2179
2195
|
if (!s || !o || g)
|
|
2180
2196
|
return;
|
|
2181
2197
|
function m(y) {
|
|
2182
|
-
s && ot(y) && (y.type === "focusin" ? vn :
|
|
2198
|
+
s && ot(y) && (y.type === "focusin" ? vn : Qr)(s);
|
|
2183
2199
|
}
|
|
2184
2200
|
return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
|
|
2185
2201
|
s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
|
|
2186
2202
|
};
|
|
2187
2203
|
}, [s, o, g]), f.useEffect(() => {
|
|
2188
2204
|
s && (d || vn(s));
|
|
2189
|
-
}, [d, s]), /* @__PURE__ */ Hn(
|
|
2205
|
+
}, [d, s]), /* @__PURE__ */ Hn(Cr.Provider, {
|
|
2190
2206
|
value: f.useMemo(() => ({
|
|
2191
2207
|
preserveTabOrder: o,
|
|
2192
2208
|
beforeOutsideRef: a,
|
|
@@ -2226,7 +2242,7 @@ function hi(e) {
|
|
|
2226
2242
|
})]
|
|
2227
2243
|
});
|
|
2228
2244
|
}
|
|
2229
|
-
const
|
|
2245
|
+
const Ir = () => f.useContext(Cr);
|
|
2230
2246
|
function Pn(e) {
|
|
2231
2247
|
return f.useMemo(() => (t) => {
|
|
2232
2248
|
e.forEach((n) => {
|
|
@@ -2234,19 +2250,19 @@ function Pn(e) {
|
|
|
2234
2250
|
});
|
|
2235
2251
|
}, e);
|
|
2236
2252
|
}
|
|
2237
|
-
const
|
|
2238
|
-
let
|
|
2239
|
-
function
|
|
2240
|
-
|
|
2253
|
+
const jo = 20;
|
|
2254
|
+
let He = [];
|
|
2255
|
+
function qo(e) {
|
|
2256
|
+
He = He.filter((t) => t.isConnected), e && Ke(e) !== "body" && (He.push(e), He.length > jo && (He = He.slice(-20)));
|
|
2241
2257
|
}
|
|
2242
|
-
function
|
|
2243
|
-
return
|
|
2258
|
+
function Dn() {
|
|
2259
|
+
return He.slice().reverse().find((e) => e.isConnected);
|
|
2244
2260
|
}
|
|
2245
|
-
function
|
|
2261
|
+
function Yo(e) {
|
|
2246
2262
|
const t = lt();
|
|
2247
2263
|
return Bn(e, t) ? e : At(e, t)[0] || e;
|
|
2248
2264
|
}
|
|
2249
|
-
function
|
|
2265
|
+
function kn(e, t) {
|
|
2250
2266
|
var n;
|
|
2251
2267
|
if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
|
|
2252
2268
|
return;
|
|
@@ -2256,7 +2272,7 @@ function Dn(e, t) {
|
|
|
2256
2272
|
}), i = e.getAttribute("tabindex");
|
|
2257
2273
|
t.current.includes("floating") || s.length === 0 ? i !== "0" && e.setAttribute("tabindex", "0") : (i !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
|
|
2258
2274
|
}
|
|
2259
|
-
const
|
|
2275
|
+
const Xo = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2260
2276
|
return /* @__PURE__ */ ge("button", {
|
|
2261
2277
|
...t,
|
|
2262
2278
|
type: "button",
|
|
@@ -2265,7 +2281,7 @@ const Go = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
|
2265
2281
|
style: Ft
|
|
2266
2282
|
});
|
|
2267
2283
|
});
|
|
2268
|
-
function
|
|
2284
|
+
function wi(e) {
|
|
2269
2285
|
const {
|
|
2270
2286
|
context: t,
|
|
2271
2287
|
children: n,
|
|
@@ -2289,147 +2305,147 @@ function vi(e) {
|
|
|
2289
2305
|
domReference: v,
|
|
2290
2306
|
floating: x
|
|
2291
2307
|
}
|
|
2292
|
-
} = t,
|
|
2293
|
-
var
|
|
2294
|
-
return (
|
|
2295
|
-
}), A =
|
|
2296
|
-
return
|
|
2297
|
-
}),
|
|
2298
|
-
const z =
|
|
2299
|
-
return _.current.map((
|
|
2308
|
+
} = t, C = se(() => {
|
|
2309
|
+
var H;
|
|
2310
|
+
return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
|
|
2311
|
+
}), A = se(d), k = typeof i == "number" && i < 0, N = Zt(v) && k, D = Ho(), L = D ? s : !0, F = !L || D && g, _ = xe(o), U = xe(i), K = xe(c), O = tt(), w = Ir(), W = f.useRef(null), T = f.useRef(null), b = f.useRef(!1), E = f.useRef(!1), S = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
|
|
2312
|
+
return H === void 0 && (H = I), H ? At(H, lt()) : [];
|
|
2313
|
+
}), ee = se((H) => {
|
|
2314
|
+
const z = V(H);
|
|
2315
|
+
return _.current.map(($) => v && $ === "reference" ? v : I && $ === "floating" ? I : z).filter(Boolean).flat();
|
|
2300
2316
|
});
|
|
2301
2317
|
f.useEffect(() => {
|
|
2302
2318
|
if (r || !u) return;
|
|
2303
|
-
function
|
|
2304
|
-
if (
|
|
2305
|
-
|
|
2306
|
-
const
|
|
2307
|
-
_.current[0] === "reference" &&
|
|
2319
|
+
function H($) {
|
|
2320
|
+
if ($.key === "Tab") {
|
|
2321
|
+
ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
|
|
2322
|
+
const B = ee(), oe = Se($);
|
|
2323
|
+
_.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? Be(B[B.length - 1]) : Be(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), Be(B[0]));
|
|
2308
2324
|
}
|
|
2309
2325
|
}
|
|
2310
|
-
const z =
|
|
2311
|
-
return z.addEventListener("keydown",
|
|
2312
|
-
z.removeEventListener("keydown",
|
|
2326
|
+
const z = le(I);
|
|
2327
|
+
return z.addEventListener("keydown", H), () => {
|
|
2328
|
+
z.removeEventListener("keydown", H);
|
|
2313
2329
|
};
|
|
2314
|
-
}, [r, v,
|
|
2330
|
+
}, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
|
|
2315
2331
|
if (r || !x) return;
|
|
2316
|
-
function
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2332
|
+
function H(z) {
|
|
2333
|
+
const $ = Se(z), oe = V().indexOf($);
|
|
2334
|
+
oe !== -1 && (S.current = oe);
|
|
2319
2335
|
}
|
|
2320
|
-
return x.addEventListener("focusin",
|
|
2321
|
-
x.removeEventListener("focusin",
|
|
2336
|
+
return x.addEventListener("focusin", H), () => {
|
|
2337
|
+
x.removeEventListener("focusin", H);
|
|
2322
2338
|
};
|
|
2323
|
-
}, [r, x,
|
|
2339
|
+
}, [r, x, V]), f.useEffect(() => {
|
|
2324
2340
|
if (r || !p) return;
|
|
2325
|
-
function
|
|
2341
|
+
function H() {
|
|
2326
2342
|
E.current = !0, setTimeout(() => {
|
|
2327
2343
|
E.current = !1;
|
|
2328
2344
|
});
|
|
2329
2345
|
}
|
|
2330
|
-
function z(
|
|
2331
|
-
const
|
|
2346
|
+
function z($) {
|
|
2347
|
+
const B = $.relatedTarget, oe = $.currentTarget, ne = Se($);
|
|
2332
2348
|
queueMicrotask(() => {
|
|
2333
|
-
const
|
|
2334
|
-
var
|
|
2335
|
-
return
|
|
2336
|
-
}) || hn(O.nodesRef.current,
|
|
2337
|
-
var
|
|
2338
|
-
return [(
|
|
2349
|
+
const de = C(), me = !(ce(v, B) || ce(x, B) || ce(B, x) || ce(w == null ? void 0 : w.portalNode, B) || B != null && B.hasAttribute(Ge("focus-guard")) || O && (qe(O.nodesRef.current, de).find((q) => {
|
|
2350
|
+
var J, Re;
|
|
2351
|
+
return ce((J = q.context) == null ? void 0 : J.elements.floating, B) || ce((Re = q.context) == null ? void 0 : Re.elements.domReference, B);
|
|
2352
|
+
}) || hn(O.nodesRef.current, de).find((q) => {
|
|
2353
|
+
var J, Re, M;
|
|
2354
|
+
return [(J = q.context) == null ? void 0 : J.elements.floating, It((Re = q.context) == null ? void 0 : Re.elements.floating)].includes(B) || ((M = q.context) == null ? void 0 : M.elements.domReference) === B;
|
|
2339
2355
|
})));
|
|
2340
|
-
if (
|
|
2341
|
-
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2356
|
+
if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
|
|
2357
|
+
re(I) && I.focus();
|
|
2358
|
+
const q = S.current, J = V(), Re = J[q] || J[J.length - 1] || I;
|
|
2359
|
+
re(Re) && Re.focus();
|
|
2344
2360
|
}
|
|
2345
2361
|
if (R.current.insideReactTree) {
|
|
2346
2362
|
R.current.insideReactTree = !1;
|
|
2347
2363
|
return;
|
|
2348
2364
|
}
|
|
2349
|
-
(N || !u) &&
|
|
2350
|
-
|
|
2365
|
+
(N || !u) && B && me && !E.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
2366
|
+
B !== Dn() && (b.current = !0, m(!1, $, "focus-out"));
|
|
2351
2367
|
});
|
|
2352
2368
|
}
|
|
2353
|
-
if (x &&
|
|
2354
|
-
return v.addEventListener("focusout", z), v.addEventListener("pointerdown",
|
|
2355
|
-
v.removeEventListener("focusout", z), v.removeEventListener("pointerdown",
|
|
2369
|
+
if (x && re(v))
|
|
2370
|
+
return v.addEventListener("focusout", z), v.addEventListener("pointerdown", H), x.addEventListener("focusout", z), () => {
|
|
2371
|
+
v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
|
|
2356
2372
|
};
|
|
2357
|
-
}, [r, v, x,
|
|
2358
|
-
const
|
|
2373
|
+
}, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
|
|
2374
|
+
const ae = f.useRef(null), te = f.useRef(null), fe = Pn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Pn([te, w == null ? void 0 : w.afterInsideRef]);
|
|
2359
2375
|
f.useEffect(() => {
|
|
2360
|
-
var
|
|
2376
|
+
var H, z;
|
|
2361
2377
|
if (r || !x) return;
|
|
2362
|
-
const
|
|
2363
|
-
var
|
|
2364
|
-
return (
|
|
2365
|
-
}) : [],
|
|
2366
|
-
var
|
|
2367
|
-
return Zt(((
|
|
2368
|
-
})) == null || (z = z.context) == null ? void 0 : z.elements.domReference,
|
|
2378
|
+
const $ = Array.from((w == null || (H = w.portalNode) == null ? void 0 : H.querySelectorAll("[" + Ge("portal") + "]")) || []), B = O ? hn(O.nodesRef.current, C()) : [], oe = O && !u ? B.map((q) => {
|
|
2379
|
+
var J;
|
|
2380
|
+
return (J = q.context) == null ? void 0 : J.elements.floating;
|
|
2381
|
+
}) : [], ne = (z = B.find((q) => {
|
|
2382
|
+
var J;
|
|
2383
|
+
return Zt(((J = q.context) == null ? void 0 : J.elements.domReference) || null);
|
|
2384
|
+
})) == null || (z = z.context) == null ? void 0 : z.elements.domReference, de = [x, ne, ...$, ...oe, ...A(), W.current, T.current, ae.current, te.current, w == null ? void 0 : w.beforeOutsideRef.current, w == null ? void 0 : w.afterOutsideRef.current, _.current.includes("reference") || N ? v : null].filter((q) => q != null), me = u || N ? Mn(de, !F, F) : Mn(de);
|
|
2369
2385
|
return () => {
|
|
2370
|
-
|
|
2386
|
+
me();
|
|
2371
2387
|
};
|
|
2372
|
-
}, [r, v, x, u, _, w, N, L, F, O,
|
|
2373
|
-
if (r || !
|
|
2374
|
-
const
|
|
2388
|
+
}, [r, v, x, u, _, w, N, L, F, O, C, A]), X(() => {
|
|
2389
|
+
if (r || !re(I)) return;
|
|
2390
|
+
const H = le(I), z = Ee(H);
|
|
2375
2391
|
queueMicrotask(() => {
|
|
2376
|
-
const
|
|
2377
|
-
!k && !
|
|
2378
|
-
preventScroll:
|
|
2392
|
+
const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
|
|
2393
|
+
!k && !ne && h && Be(oe, {
|
|
2394
|
+
preventScroll: oe === I
|
|
2379
2395
|
});
|
|
2380
2396
|
});
|
|
2381
|
-
}, [r, h,
|
|
2382
|
-
if (r || !
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
function
|
|
2397
|
+
}, [r, h, I, k, ee, U]), X(() => {
|
|
2398
|
+
if (r || !I) return;
|
|
2399
|
+
const H = le(I), z = Ee(H);
|
|
2400
|
+
qo(z);
|
|
2401
|
+
function $(ne) {
|
|
2386
2402
|
let {
|
|
2387
|
-
reason:
|
|
2388
|
-
event:
|
|
2389
|
-
nested:
|
|
2390
|
-
} =
|
|
2391
|
-
if (["hover", "safe-polygon"].includes(
|
|
2392
|
-
if (
|
|
2403
|
+
reason: de,
|
|
2404
|
+
event: me,
|
|
2405
|
+
nested: q
|
|
2406
|
+
} = ne;
|
|
2407
|
+
if (["hover", "safe-polygon"].includes(de) && me.type === "mouseleave" && (b.current = !0), de === "outside-press")
|
|
2408
|
+
if (q)
|
|
2393
2409
|
b.current = !1;
|
|
2394
|
-
else if (Zn(
|
|
2410
|
+
else if (Zn(me) || er(me))
|
|
2395
2411
|
b.current = !1;
|
|
2396
2412
|
else {
|
|
2397
|
-
let
|
|
2413
|
+
let J = !1;
|
|
2398
2414
|
document.createElement("div").focus({
|
|
2399
2415
|
get preventScroll() {
|
|
2400
|
-
return
|
|
2416
|
+
return J = !0, !1;
|
|
2401
2417
|
}
|
|
2402
|
-
}),
|
|
2418
|
+
}), J ? b.current = !1 : b.current = !0;
|
|
2403
2419
|
}
|
|
2404
2420
|
}
|
|
2405
|
-
y.on("openchange",
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2408
|
-
function
|
|
2409
|
-
if (typeof
|
|
2410
|
-
const
|
|
2411
|
-
return
|
|
2421
|
+
y.on("openchange", $);
|
|
2422
|
+
const B = H.createElement("span");
|
|
2423
|
+
B.setAttribute("tabindex", "-1"), B.setAttribute("aria-hidden", "true"), Object.assign(B.style, Ft), G && v && v.insertAdjacentElement("afterend", B);
|
|
2424
|
+
function oe() {
|
|
2425
|
+
if (typeof K.current == "boolean") {
|
|
2426
|
+
const ne = v || Dn();
|
|
2427
|
+
return ne && ne.isConnected ? ne : B;
|
|
2412
2428
|
}
|
|
2413
|
-
return
|
|
2429
|
+
return K.current.current || B;
|
|
2414
2430
|
}
|
|
2415
2431
|
return () => {
|
|
2416
|
-
y.off("openchange",
|
|
2417
|
-
const
|
|
2418
|
-
var
|
|
2419
|
-
return
|
|
2420
|
-
}),
|
|
2432
|
+
y.off("openchange", $);
|
|
2433
|
+
const ne = Ee(H), de = ce(x, ne) || O && qe(O.nodesRef.current, C()).some((q) => {
|
|
2434
|
+
var J;
|
|
2435
|
+
return ce((J = q.context) == null ? void 0 : J.elements.floating, ne);
|
|
2436
|
+
}), me = oe();
|
|
2421
2437
|
queueMicrotask(() => {
|
|
2422
|
-
const
|
|
2438
|
+
const q = Yo(me);
|
|
2423
2439
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2424
|
-
|
|
2440
|
+
K.current && !b.current && re(q) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
2425
2441
|
// since it likely entered a different element which should be
|
|
2426
2442
|
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
2427
|
-
(!(
|
|
2443
|
+
(!(q !== ne && ne !== H.body) || de) && q.focus({
|
|
2428
2444
|
preventScroll: !0
|
|
2429
|
-
}),
|
|
2445
|
+
}), B.remove();
|
|
2430
2446
|
});
|
|
2431
2447
|
};
|
|
2432
|
-
}, [r, x,
|
|
2448
|
+
}, [r, x, I, K, R, y, O, G, v, C]), f.useEffect(() => {
|
|
2433
2449
|
queueMicrotask(() => {
|
|
2434
2450
|
b.current = !1;
|
|
2435
2451
|
});
|
|
@@ -2445,43 +2461,43 @@ function vi(e) {
|
|
|
2445
2461
|
w.setFocusManagerState(null);
|
|
2446
2462
|
};
|
|
2447
2463
|
}, [r, w, u, h, m, p, v]), X(() => {
|
|
2448
|
-
r ||
|
|
2449
|
-
}, [r,
|
|
2450
|
-
function
|
|
2451
|
-
return r || !l || !u ? null : /* @__PURE__ */ ge(
|
|
2452
|
-
ref:
|
|
2464
|
+
r || I && kn(I, _);
|
|
2465
|
+
}, [r, I, _]);
|
|
2466
|
+
function Ve(H) {
|
|
2467
|
+
return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
|
|
2468
|
+
ref: H === "start" ? W : T,
|
|
2453
2469
|
onClick: (z) => m(!1, z.nativeEvent),
|
|
2454
2470
|
children: typeof l == "string" ? l : "Dismiss"
|
|
2455
2471
|
});
|
|
2456
2472
|
}
|
|
2457
|
-
const
|
|
2473
|
+
const Me = !r && L && (u ? !N : !0) && (G || u);
|
|
2458
2474
|
return /* @__PURE__ */ Hn(Ar, {
|
|
2459
|
-
children: [
|
|
2475
|
+
children: [Me && /* @__PURE__ */ ge(Ot, {
|
|
2460
2476
|
"data-type": "inside",
|
|
2461
|
-
ref:
|
|
2462
|
-
onFocus: (
|
|
2477
|
+
ref: fe,
|
|
2478
|
+
onFocus: (H) => {
|
|
2463
2479
|
if (u) {
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2480
|
+
const $ = ee();
|
|
2481
|
+
Be(o[0] === "reference" ? $[0] : $[$.length - 1]);
|
|
2466
2482
|
} else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2467
|
-
if (b.current = !1, ot(
|
|
2468
|
-
const
|
|
2469
|
-
|
|
2483
|
+
if (b.current = !1, ot(H, w.portalNode)) {
|
|
2484
|
+
const $ = sr(v);
|
|
2485
|
+
$ == null || $.focus();
|
|
2470
2486
|
} else {
|
|
2471
2487
|
var z;
|
|
2472
2488
|
(z = w.beforeOutsideRef.current) == null || z.focus();
|
|
2473
2489
|
}
|
|
2474
2490
|
}
|
|
2475
|
-
}), !N &&
|
|
2491
|
+
}), !N && Ve("start"), n, Ve("end"), Me && /* @__PURE__ */ ge(Ot, {
|
|
2476
2492
|
"data-type": "inside",
|
|
2477
|
-
ref:
|
|
2478
|
-
onFocus: (
|
|
2493
|
+
ref: Ae,
|
|
2494
|
+
onFocus: (H) => {
|
|
2479
2495
|
if (u)
|
|
2480
|
-
|
|
2496
|
+
Be(ee()[0]);
|
|
2481
2497
|
else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2482
|
-
if (p && (b.current = !0), ot(
|
|
2483
|
-
const
|
|
2484
|
-
|
|
2498
|
+
if (p && (b.current = !0), ot(H, w.portalNode)) {
|
|
2499
|
+
const $ = cr(v);
|
|
2500
|
+
$ == null || $.focus();
|
|
2485
2501
|
} else {
|
|
2486
2502
|
var z;
|
|
2487
2503
|
(z = w.afterOutsideRef.current) == null || z.focus();
|
|
@@ -2491,11 +2507,11 @@ function vi(e) {
|
|
|
2491
2507
|
});
|
|
2492
2508
|
}
|
|
2493
2509
|
let vt = 0;
|
|
2494
|
-
const
|
|
2495
|
-
function
|
|
2510
|
+
const Ln = "--floating-ui-scrollbar-width";
|
|
2511
|
+
function Jo() {
|
|
2496
2512
|
const e = rn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
|
|
2497
2513
|
e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, o = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", s = window.innerWidth - document.documentElement.clientWidth, i = n.left ? parseFloat(n.left) : window.scrollX, c = n.top ? parseFloat(n.top) : window.scrollY;
|
|
2498
|
-
if (n.overflow = "hidden", n.setProperty(
|
|
2514
|
+
if (n.overflow = "hidden", n.setProperty(Ln, s + "px"), s && (n[o] = s + "px"), t) {
|
|
2499
2515
|
var a, u;
|
|
2500
2516
|
const l = ((a = window.visualViewport) == null ? void 0 : a.offsetLeft) || 0, p = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
|
|
2501
2517
|
Object.assign(n, {
|
|
@@ -2509,7 +2525,7 @@ function jo() {
|
|
|
2509
2525
|
Object.assign(n, {
|
|
2510
2526
|
overflow: "",
|
|
2511
2527
|
[o]: ""
|
|
2512
|
-
}), n.removeProperty(
|
|
2528
|
+
}), n.removeProperty(Ln), t && (Object.assign(n, {
|
|
2513
2529
|
position: "",
|
|
2514
2530
|
top: "",
|
|
2515
2531
|
left: "",
|
|
@@ -2517,17 +2533,17 @@ function jo() {
|
|
|
2517
2533
|
}), window.scrollTo(i, c));
|
|
2518
2534
|
};
|
|
2519
2535
|
}
|
|
2520
|
-
let
|
|
2536
|
+
let Fn = () => {
|
|
2521
2537
|
};
|
|
2522
|
-
const
|
|
2538
|
+
const Ri = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2523
2539
|
const {
|
|
2524
2540
|
lockScroll: r = !1,
|
|
2525
2541
|
...o
|
|
2526
2542
|
} = t;
|
|
2527
2543
|
return X(() => {
|
|
2528
2544
|
if (r)
|
|
2529
|
-
return vt++, vt === 1 && (
|
|
2530
|
-
vt--, vt === 0 &&
|
|
2545
|
+
return vt++, vt === 1 && (Fn = Jo()), () => {
|
|
2546
|
+
vt--, vt === 0 && Fn();
|
|
2531
2547
|
};
|
|
2532
2548
|
}, [r]), /* @__PURE__ */ ge("div", {
|
|
2533
2549
|
ref: n,
|
|
@@ -2543,16 +2559,16 @@ const bi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
|
2543
2559
|
}
|
|
2544
2560
|
});
|
|
2545
2561
|
});
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2562
|
+
function Nn(e) {
|
|
2563
|
+
return re(e.target) && e.target.tagName === "BUTTON";
|
|
2548
2564
|
}
|
|
2549
|
-
function
|
|
2550
|
-
return
|
|
2565
|
+
function Qo(e) {
|
|
2566
|
+
return re(e.target) && e.target.tagName === "A";
|
|
2551
2567
|
}
|
|
2552
|
-
function
|
|
2568
|
+
function _n(e) {
|
|
2553
2569
|
return on(e);
|
|
2554
2570
|
}
|
|
2555
|
-
function
|
|
2571
|
+
function Ei(e, t) {
|
|
2556
2572
|
t === void 0 && (t = {});
|
|
2557
2573
|
const {
|
|
2558
2574
|
open: n,
|
|
@@ -2585,32 +2601,32 @@ function yi(e, t) {
|
|
|
2585
2601
|
it(y, !0) && u || (n && a && (!(o.current.openEvent && p) || o.current.openEvent.type === "click") ? r(!1, m.nativeEvent, "click") : r(!0, m.nativeEvent, "click"));
|
|
2586
2602
|
},
|
|
2587
2603
|
onKeyDown(m) {
|
|
2588
|
-
g.current = void 0, !(m.defaultPrevented || !l ||
|
|
2604
|
+
g.current = void 0, !(m.defaultPrevented || !l || Nn(m)) && (m.key === " " && !_n(s) && (m.preventDefault(), d.current = !0), !Qo(m) && m.key === "Enter" && r(!(n && a), m.nativeEvent, "click"));
|
|
2589
2605
|
},
|
|
2590
2606
|
onKeyUp(m) {
|
|
2591
|
-
m.defaultPrevented || !l ||
|
|
2607
|
+
m.defaultPrevented || !l || Nn(m) || _n(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
|
|
2592
2608
|
}
|
|
2593
2609
|
}), [o, s, c, u, l, r, n, p, a]);
|
|
2594
2610
|
return f.useMemo(() => i ? {
|
|
2595
2611
|
reference: h
|
|
2596
2612
|
} : {}, [i, h]);
|
|
2597
2613
|
}
|
|
2598
|
-
const
|
|
2614
|
+
const Zo = {
|
|
2599
2615
|
pointerdown: "onPointerDown",
|
|
2600
2616
|
mousedown: "onMouseDown",
|
|
2601
2617
|
click: "onClick"
|
|
2602
|
-
},
|
|
2618
|
+
}, ei = {
|
|
2603
2619
|
pointerdown: "onPointerDownCapture",
|
|
2604
2620
|
mousedown: "onMouseDownCapture",
|
|
2605
2621
|
click: "onClickCapture"
|
|
2606
|
-
},
|
|
2622
|
+
}, Wn = (e) => {
|
|
2607
2623
|
var t, n;
|
|
2608
2624
|
return {
|
|
2609
2625
|
escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
|
|
2610
2626
|
outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
|
|
2611
2627
|
};
|
|
2612
2628
|
};
|
|
2613
|
-
function
|
|
2629
|
+
function Ci(e, t) {
|
|
2614
2630
|
t === void 0 && (t = {});
|
|
2615
2631
|
const {
|
|
2616
2632
|
open: n,
|
|
@@ -2627,22 +2643,22 @@ function xi(e, t) {
|
|
|
2627
2643
|
ancestorScroll: g = !1,
|
|
2628
2644
|
bubbles: d,
|
|
2629
2645
|
capture: h
|
|
2630
|
-
} = t, m =
|
|
2646
|
+
} = t, m = tt(), y = se(typeof a == "function" ? a : () => !1), R = typeof a == "function" ? y : a, v = f.useRef(!1), {
|
|
2631
2647
|
escapeKey: x,
|
|
2632
|
-
outsidePress:
|
|
2633
|
-
} =
|
|
2648
|
+
outsidePress: C
|
|
2649
|
+
} = Wn(d), {
|
|
2634
2650
|
escapeKey: A,
|
|
2635
2651
|
outsidePress: k
|
|
2636
|
-
} =
|
|
2637
|
-
var
|
|
2652
|
+
} = Wn(h), N = f.useRef(!1), D = f.useRef(-1), L = se((w) => {
|
|
2653
|
+
var W;
|
|
2638
2654
|
if (!n || !i || !c || w.key !== "Escape" || N.current)
|
|
2639
2655
|
return;
|
|
2640
|
-
const T = (
|
|
2656
|
+
const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
|
|
2641
2657
|
if (!x && (w.stopPropagation(), b.length > 0)) {
|
|
2642
2658
|
let E = !0;
|
|
2643
|
-
if (b.forEach((
|
|
2659
|
+
if (b.forEach((S) => {
|
|
2644
2660
|
var G;
|
|
2645
|
-
if ((G =
|
|
2661
|
+
if ((G = S.context) != null && G.open && !S.context.dataRef.current.__escapeKeyBubbles) {
|
|
2646
2662
|
E = !1;
|
|
2647
2663
|
return;
|
|
2648
2664
|
}
|
|
@@ -2650,50 +2666,50 @@ function xi(e, t) {
|
|
|
2650
2666
|
return;
|
|
2651
2667
|
}
|
|
2652
2668
|
r(!1, Gr(w) ? w.nativeEvent : w, "escape-key");
|
|
2653
|
-
}), F =
|
|
2654
|
-
var
|
|
2669
|
+
}), F = se((w) => {
|
|
2670
|
+
var W;
|
|
2655
2671
|
const T = () => {
|
|
2656
2672
|
var b;
|
|
2657
|
-
L(w), (b =
|
|
2673
|
+
L(w), (b = Se(w)) == null || b.removeEventListener("keydown", T);
|
|
2658
2674
|
};
|
|
2659
|
-
(
|
|
2660
|
-
}), _ =
|
|
2661
|
-
var
|
|
2675
|
+
(W = Se(w)) == null || W.addEventListener("keydown", T);
|
|
2676
|
+
}), _ = se((w) => {
|
|
2677
|
+
var W;
|
|
2662
2678
|
const T = s.current.insideReactTree;
|
|
2663
2679
|
s.current.insideReactTree = !1;
|
|
2664
2680
|
const b = v.current;
|
|
2665
2681
|
if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
|
|
2666
2682
|
return;
|
|
2667
|
-
const E =
|
|
2668
|
-
let
|
|
2669
|
-
for (;
|
|
2670
|
-
const te =
|
|
2671
|
-
if (
|
|
2683
|
+
const E = Se(w), S = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(S);
|
|
2684
|
+
let I = Y(E) ? E : null;
|
|
2685
|
+
for (; I && !De(I); ) {
|
|
2686
|
+
const te = ke(I);
|
|
2687
|
+
if (De(te) || !Y(te))
|
|
2672
2688
|
break;
|
|
2673
|
-
|
|
2689
|
+
I = te;
|
|
2674
2690
|
}
|
|
2675
2691
|
if (G.length && Y(E) && !Hr(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2676
|
-
!
|
|
2692
|
+
!ce(E, o.floating) && // If the target root element contains none of the markers, then the
|
|
2677
2693
|
// element was injected after the floating element rendered.
|
|
2678
|
-
Array.from(G).every((te) => !
|
|
2694
|
+
Array.from(G).every((te) => !ce(I, te)))
|
|
2679
2695
|
return;
|
|
2680
|
-
if (
|
|
2681
|
-
const te =
|
|
2682
|
-
if (
|
|
2696
|
+
if (re(E) && O) {
|
|
2697
|
+
const te = De(E), fe = we(E), Ae = /auto|scroll/, Ve = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ve && E.clientWidth > 0 && E.scrollWidth > E.clientWidth, z = Me && E.clientHeight > 0 && E.scrollHeight > E.clientHeight, $ = fe.direction === "rtl", B = z && ($ ? w.offsetX <= E.offsetWidth - E.clientWidth : w.offsetX > E.clientWidth), oe = H && w.offsetY > E.clientHeight;
|
|
2698
|
+
if (B || oe)
|
|
2683
2699
|
return;
|
|
2684
2700
|
}
|
|
2685
|
-
const
|
|
2686
|
-
var
|
|
2687
|
-
return
|
|
2701
|
+
const V = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, ee = m && qe(m.nodesRef.current, V).some((te) => {
|
|
2702
|
+
var fe;
|
|
2703
|
+
return Kt(w, (fe = te.context) == null ? void 0 : fe.elements.floating);
|
|
2688
2704
|
});
|
|
2689
|
-
if (
|
|
2705
|
+
if (Kt(w, o.floating) || Kt(w, o.domReference) || ee)
|
|
2690
2706
|
return;
|
|
2691
|
-
const
|
|
2692
|
-
if (
|
|
2707
|
+
const ae = m ? qe(m.nodesRef.current, V) : [];
|
|
2708
|
+
if (ae.length > 0) {
|
|
2693
2709
|
let te = !0;
|
|
2694
|
-
if (
|
|
2695
|
-
var
|
|
2696
|
-
if ((
|
|
2710
|
+
if (ae.forEach((fe) => {
|
|
2711
|
+
var Ae;
|
|
2712
|
+
if ((Ae = fe.context) != null && Ae.open && !fe.context.dataRef.current.__outsidePressBubbles) {
|
|
2697
2713
|
te = !1;
|
|
2698
2714
|
return;
|
|
2699
2715
|
}
|
|
@@ -2701,20 +2717,20 @@ function xi(e, t) {
|
|
|
2701
2717
|
return;
|
|
2702
2718
|
}
|
|
2703
2719
|
r(!1, w, "outside-press");
|
|
2704
|
-
}), U =
|
|
2705
|
-
var
|
|
2720
|
+
}), U = se((w) => {
|
|
2721
|
+
var W;
|
|
2706
2722
|
const T = () => {
|
|
2707
2723
|
var b;
|
|
2708
|
-
_(w), (b =
|
|
2724
|
+
_(w), (b = Se(w)) == null || b.removeEventListener(u, T);
|
|
2709
2725
|
};
|
|
2710
|
-
(
|
|
2726
|
+
(W = Se(w)) == null || W.addEventListener(u, T);
|
|
2711
2727
|
});
|
|
2712
2728
|
f.useEffect(() => {
|
|
2713
2729
|
if (!n || !i)
|
|
2714
2730
|
return;
|
|
2715
|
-
s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles =
|
|
2731
|
+
s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles = C;
|
|
2716
2732
|
let w = -1;
|
|
2717
|
-
function
|
|
2733
|
+
function W(G) {
|
|
2718
2734
|
r(!1, G, "ancestor-scroll");
|
|
2719
2735
|
}
|
|
2720
2736
|
function T() {
|
|
@@ -2727,31 +2743,31 @@ function xi(e, t) {
|
|
|
2727
2743
|
},
|
|
2728
2744
|
// 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
|
|
2729
2745
|
// Only apply to WebKit for the test to remain 0ms.
|
|
2730
|
-
|
|
2746
|
+
Pt() ? 5 : 0
|
|
2731
2747
|
);
|
|
2732
2748
|
}
|
|
2733
|
-
const E =
|
|
2749
|
+
const E = le(o.floating);
|
|
2734
2750
|
c && (E.addEventListener("keydown", A ? F : L, A), E.addEventListener("compositionstart", T), E.addEventListener("compositionend", b)), R && E.addEventListener(u, k ? U : _, k);
|
|
2735
|
-
let
|
|
2736
|
-
return g && (Y(o.domReference) && (
|
|
2737
|
-
var
|
|
2738
|
-
return G !== ((
|
|
2739
|
-
}),
|
|
2740
|
-
G.addEventListener("scroll",
|
|
2751
|
+
let S = [];
|
|
2752
|
+
return g && (Y(o.domReference) && (S = Fe(o.domReference)), Y(o.floating) && (S = S.concat(Fe(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (S = S.concat(Fe(o.reference.contextElement)))), S = S.filter((G) => {
|
|
2753
|
+
var I;
|
|
2754
|
+
return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
|
|
2755
|
+
}), S.forEach((G) => {
|
|
2756
|
+
G.addEventListener("scroll", W, {
|
|
2741
2757
|
passive: !0
|
|
2742
2758
|
});
|
|
2743
2759
|
}), () => {
|
|
2744
|
-
c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k),
|
|
2745
|
-
G.removeEventListener("scroll",
|
|
2760
|
+
c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), S.forEach((G) => {
|
|
2761
|
+
G.removeEventListener("scroll", W);
|
|
2746
2762
|
}), window.clearTimeout(w);
|
|
2747
2763
|
};
|
|
2748
|
-
}, [s, o, c, R, u, n, r, g, i, x,
|
|
2764
|
+
}, [s, o, c, R, u, n, r, g, i, x, C, L, A, F, _, k, U]), f.useEffect(() => {
|
|
2749
2765
|
s.current.insideReactTree = !1;
|
|
2750
2766
|
}, [s, R, u]);
|
|
2751
|
-
const
|
|
2767
|
+
const K = f.useMemo(() => ({
|
|
2752
2768
|
onKeyDown: L,
|
|
2753
2769
|
...l && {
|
|
2754
|
-
[
|
|
2770
|
+
[Zo[p]]: (w) => {
|
|
2755
2771
|
r(!1, w.nativeEvent, "reference-press");
|
|
2756
2772
|
},
|
|
2757
2773
|
...p !== "click" && {
|
|
@@ -2768,31 +2784,31 @@ function xi(e, t) {
|
|
|
2768
2784
|
onMouseUp() {
|
|
2769
2785
|
v.current = !0;
|
|
2770
2786
|
},
|
|
2771
|
-
[
|
|
2787
|
+
[ei[u]]: () => {
|
|
2772
2788
|
s.current.insideReactTree = !0;
|
|
2773
2789
|
},
|
|
2774
2790
|
onBlurCapture() {
|
|
2775
|
-
m || (ve(
|
|
2791
|
+
m || (ve(D), s.current.insideReactTree = !0, D.current = window.setTimeout(() => {
|
|
2776
2792
|
s.current.insideReactTree = !1;
|
|
2777
2793
|
}));
|
|
2778
2794
|
}
|
|
2779
2795
|
}), [L, u, s, m]);
|
|
2780
2796
|
return f.useMemo(() => i ? {
|
|
2781
|
-
reference:
|
|
2797
|
+
reference: K,
|
|
2782
2798
|
floating: O
|
|
2783
|
-
} : {}, [i,
|
|
2799
|
+
} : {}, [i, K, O]);
|
|
2784
2800
|
}
|
|
2785
|
-
function
|
|
2801
|
+
function ti(e) {
|
|
2786
2802
|
const {
|
|
2787
2803
|
open: t = !1,
|
|
2788
2804
|
onOpenChange: n,
|
|
2789
2805
|
elements: r
|
|
2790
|
-
} = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c =
|
|
2806
|
+
} = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c = et() != null;
|
|
2791
2807
|
if (process.env.NODE_ENV !== "production") {
|
|
2792
2808
|
const d = r.reference;
|
|
2793
|
-
d && !Y(d) &&
|
|
2809
|
+
d && !Y(d) && $o("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2794
2810
|
}
|
|
2795
|
-
const [a, u] = f.useState(r.reference), l =
|
|
2811
|
+
const [a, u] = f.useState(r.reference), l = se((d, h, m) => {
|
|
2796
2812
|
s.current.openEvent = d ? h : void 0, i.emit("openchange", {
|
|
2797
2813
|
open: d,
|
|
2798
2814
|
event: h,
|
|
@@ -2816,22 +2832,22 @@ function Jo(e) {
|
|
|
2816
2832
|
refs: p
|
|
2817
2833
|
}), [t, l, g, i, o, p]);
|
|
2818
2834
|
}
|
|
2819
|
-
function
|
|
2835
|
+
function Ii(e) {
|
|
2820
2836
|
e === void 0 && (e = {});
|
|
2821
2837
|
const {
|
|
2822
2838
|
nodeId: t
|
|
2823
|
-
} = e, n =
|
|
2839
|
+
} = e, n = ti({
|
|
2824
2840
|
...e,
|
|
2825
2841
|
elements: {
|
|
2826
2842
|
reference: null,
|
|
2827
2843
|
floating: null,
|
|
2828
2844
|
...e.elements
|
|
2829
2845
|
}
|
|
2830
|
-
}), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g =
|
|
2846
|
+
}), r = e.rootContext || n, o = r.elements, [s, i] = f.useState(null), [c, a] = f.useState(null), l = (o == null ? void 0 : o.domReference) || s, p = f.useRef(null), g = tt();
|
|
2831
2847
|
X(() => {
|
|
2832
2848
|
l && (p.current = l);
|
|
2833
2849
|
}, [l]);
|
|
2834
|
-
const d =
|
|
2850
|
+
const d = Po({
|
|
2835
2851
|
...e,
|
|
2836
2852
|
elements: {
|
|
2837
2853
|
...o,
|
|
@@ -2840,12 +2856,12 @@ function wi(e) {
|
|
|
2840
2856
|
}
|
|
2841
2857
|
}
|
|
2842
2858
|
}), h = f.useCallback((x) => {
|
|
2843
|
-
const
|
|
2859
|
+
const C = Y(x) ? {
|
|
2844
2860
|
getBoundingClientRect: () => x.getBoundingClientRect(),
|
|
2845
2861
|
getClientRects: () => x.getClientRects(),
|
|
2846
2862
|
contextElement: x
|
|
2847
2863
|
} : x;
|
|
2848
|
-
a(
|
|
2864
|
+
a(C), d.refs.setReference(C);
|
|
2849
2865
|
}, [d.refs]), m = f.useCallback((x) => {
|
|
2850
2866
|
(Y(x) || x === null) && (p.current = x, i(x)), (Y(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
2851
2867
|
// `null` to support `positionReference` + an unstable `reference`
|
|
@@ -2868,7 +2884,7 @@ function wi(e) {
|
|
|
2868
2884
|
}), [d, y, R, t, r]);
|
|
2869
2885
|
return X(() => {
|
|
2870
2886
|
r.dataRef.current.floatingContext = v;
|
|
2871
|
-
const x = g == null ? void 0 : g.nodesRef.current.find((
|
|
2887
|
+
const x = g == null ? void 0 : g.nodesRef.current.find((C) => C.id === t);
|
|
2872
2888
|
x && (x.context = v);
|
|
2873
2889
|
}), f.useMemo(() => ({
|
|
2874
2890
|
...d,
|
|
@@ -2878,9 +2894,9 @@ function wi(e) {
|
|
|
2878
2894
|
}), [d, y, R, v]);
|
|
2879
2895
|
}
|
|
2880
2896
|
function jt() {
|
|
2881
|
-
return
|
|
2897
|
+
return Kr() && Jn();
|
|
2882
2898
|
}
|
|
2883
|
-
function
|
|
2899
|
+
function Ti(e, t) {
|
|
2884
2900
|
t === void 0 && (t = {});
|
|
2885
2901
|
const {
|
|
2886
2902
|
open: n,
|
|
@@ -2896,7 +2912,7 @@ function Ri(e, t) {
|
|
|
2896
2912
|
if (!c) return;
|
|
2897
2913
|
const d = he(i.domReference);
|
|
2898
2914
|
function h() {
|
|
2899
|
-
!n &&
|
|
2915
|
+
!n && re(i.domReference) && i.domReference === Ee(le(i.domReference)) && (u.current = !0);
|
|
2900
2916
|
}
|
|
2901
2917
|
function m() {
|
|
2902
2918
|
p.current = !0;
|
|
@@ -2927,7 +2943,7 @@ function Ri(e, t) {
|
|
|
2927
2943
|
},
|
|
2928
2944
|
onFocus(d) {
|
|
2929
2945
|
if (u.current) return;
|
|
2930
|
-
const h =
|
|
2946
|
+
const h = Se(d.nativeEvent);
|
|
2931
2947
|
if (a && Y(h)) {
|
|
2932
2948
|
if (jt() && !d.relatedTarget) {
|
|
2933
2949
|
if (!p.current && !on(h))
|
|
@@ -2939,11 +2955,11 @@ function Ri(e, t) {
|
|
|
2939
2955
|
},
|
|
2940
2956
|
onBlur(d) {
|
|
2941
2957
|
u.current = !1;
|
|
2942
|
-
const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(
|
|
2958
|
+
const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(Ge("focus-guard")) && h.getAttribute("data-type") === "outside";
|
|
2943
2959
|
l.current = window.setTimeout(() => {
|
|
2944
2960
|
var R;
|
|
2945
|
-
const v =
|
|
2946
|
-
!h && v === i.domReference ||
|
|
2961
|
+
const v = Ee(i.domReference ? i.domReference.ownerDocument : document);
|
|
2962
|
+
!h && v === i.domReference || ce((R = s.current.floatingContext) == null ? void 0 : R.refs.floating.current, v) || ce(i.domReference, v) || y || r(!1, m, "focus");
|
|
2947
2963
|
});
|
|
2948
2964
|
}
|
|
2949
2965
|
}), [s, i.domReference, r, a]);
|
|
@@ -2965,7 +2981,7 @@ function qt(e, t, n) {
|
|
|
2965
2981
|
return {
|
|
2966
2982
|
...n === "floating" && {
|
|
2967
2983
|
tabIndex: -1,
|
|
2968
|
-
[
|
|
2984
|
+
[No]: ""
|
|
2969
2985
|
},
|
|
2970
2986
|
...s,
|
|
2971
2987
|
...t.map((i) => {
|
|
@@ -2988,7 +3004,7 @@ function qt(e, t, n) {
|
|
|
2988
3004
|
}), i), {})
|
|
2989
3005
|
};
|
|
2990
3006
|
}
|
|
2991
|
-
function
|
|
3007
|
+
function Oi(e) {
|
|
2992
3008
|
e === void 0 && (e = []);
|
|
2993
3009
|
const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = f.useCallback(
|
|
2994
3010
|
(c) => qt(c, e, "reference"),
|
|
@@ -3009,7 +3025,7 @@ function Ei(e) {
|
|
|
3009
3025
|
getItemProps: i
|
|
3010
3026
|
}), [o, s, i]);
|
|
3011
3027
|
}
|
|
3012
|
-
const
|
|
3028
|
+
const ni = "Escape";
|
|
3013
3029
|
function Nt(e, t, n) {
|
|
3014
3030
|
switch (e) {
|
|
3015
3031
|
case "vertical":
|
|
@@ -3021,19 +3037,19 @@ function Nt(e, t, n) {
|
|
|
3021
3037
|
}
|
|
3022
3038
|
}
|
|
3023
3039
|
function bt(e, t) {
|
|
3024
|
-
return Nt(t, e === st || e ===
|
|
3040
|
+
return Nt(t, e === st || e === Ne, e === _e || e === We);
|
|
3025
3041
|
}
|
|
3026
3042
|
function Yt(e, t, n) {
|
|
3027
|
-
return Nt(t, e ===
|
|
3043
|
+
return Nt(t, e === Ne, n ? e === _e : e === We) || e === "Enter" || e === " " || e === "";
|
|
3028
3044
|
}
|
|
3029
3045
|
function Kn(e, t, n) {
|
|
3030
|
-
return Nt(t, n ? e ===
|
|
3046
|
+
return Nt(t, n ? e === _e : e === We, e === Ne);
|
|
3031
3047
|
}
|
|
3032
3048
|
function Vn(e, t, n, r) {
|
|
3033
|
-
const o = n ? e ===
|
|
3034
|
-
return t === "both" || t === "horizontal" && r && r > 1 ? e ===
|
|
3049
|
+
const o = n ? e === We : e === _e, s = e === st;
|
|
3050
|
+
return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
|
|
3035
3051
|
}
|
|
3036
|
-
function
|
|
3052
|
+
function Ai(e, t) {
|
|
3037
3053
|
const {
|
|
3038
3054
|
open: n,
|
|
3039
3055
|
onOpenChange: r,
|
|
@@ -3055,98 +3071,98 @@ function Ii(e, t) {
|
|
|
3055
3071
|
focusItemOnHover: R = !0,
|
|
3056
3072
|
openOnArrowKeyDown: v = !0,
|
|
3057
3073
|
disabledIndices: x = void 0,
|
|
3058
|
-
orientation:
|
|
3074
|
+
orientation: C = "vertical",
|
|
3059
3075
|
parentOrientation: A,
|
|
3060
3076
|
cols: k = 1,
|
|
3061
3077
|
scrollItemIntoView: N = !0,
|
|
3062
|
-
virtualItemRef:
|
|
3078
|
+
virtualItemRef: D,
|
|
3063
3079
|
itemSizes: L,
|
|
3064
3080
|
dense: F = !1
|
|
3065
3081
|
} = t;
|
|
3066
|
-
process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")),
|
|
3067
|
-
const _ =
|
|
3082
|
+
process.env.NODE_ENV !== "production" && (p && (g || Ht("`useListNavigation` looping must be enabled to allow escaping."), m || Ht("`useListNavigation` must be virtual to allow escaping.")), C === "vertical" && k > 1 && Ht("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
|
|
3083
|
+
const _ = It(o.floating), U = xe(_), K = et(), O = tt();
|
|
3068
3084
|
X(() => {
|
|
3069
|
-
e.dataRef.current.orientation =
|
|
3070
|
-
}, [e,
|
|
3071
|
-
const w =
|
|
3085
|
+
e.dataRef.current.orientation = C;
|
|
3086
|
+
}, [e, C]);
|
|
3087
|
+
const w = se(() => {
|
|
3072
3088
|
a(b.current === -1 ? null : b.current);
|
|
3073
|
-
}),
|
|
3074
|
-
function
|
|
3089
|
+
}), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), S = f.useRef(!0), G = f.useRef(w), I = f.useRef(!!o.floating), V = f.useRef(n), ee = f.useRef(!1), ae = f.useRef(!1), te = xe(x), fe = xe(n), Ae = xe(N), Ve = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
|
|
3090
|
+
function M(Z) {
|
|
3075
3091
|
if (m) {
|
|
3076
3092
|
var ie;
|
|
3077
|
-
(ie =
|
|
3093
|
+
(ie = Z.id) != null && ie.endsWith("-fui-option") && (Z.id = s + "-" + Math.random().toString(16).slice(2, 10)), H(Z.id), O == null || O.events.emit("virtualfocus", Z), D && (D.current = Z);
|
|
3078
3094
|
} else
|
|
3079
|
-
|
|
3080
|
-
sync:
|
|
3095
|
+
Be(Z, {
|
|
3096
|
+
sync: ee.current,
|
|
3081
3097
|
preventScroll: !0
|
|
3082
3098
|
});
|
|
3083
3099
|
}
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3086
|
-
const
|
|
3087
|
-
if (!
|
|
3088
|
-
|
|
3089
|
-
const ie =
|
|
3090
|
-
ie &&
|
|
3100
|
+
const j = i.current[b.current], P = ae.current;
|
|
3101
|
+
j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
|
|
3102
|
+
const Z = i.current[b.current] || j;
|
|
3103
|
+
if (!Z) return;
|
|
3104
|
+
j || M(Z);
|
|
3105
|
+
const ie = Ae.current;
|
|
3106
|
+
ie && ne && (P || !S.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
|
|
3091
3107
|
block: "nearest",
|
|
3092
3108
|
inline: "nearest"
|
|
3093
3109
|
} : ie));
|
|
3094
3110
|
});
|
|
3095
3111
|
});
|
|
3096
3112
|
X(() => {
|
|
3097
|
-
u && (n && o.floating ? T.current && l != null && (
|
|
3113
|
+
u && (n && o.floating ? T.current && l != null && (ae.current = !0, b.current = l, w()) : I.current && (b.current = -1, G.current()));
|
|
3098
3114
|
}, [u, n, o.floating, l, w]), X(() => {
|
|
3099
3115
|
if (u && n && o.floating)
|
|
3100
3116
|
if (c == null) {
|
|
3101
|
-
if (
|
|
3117
|
+
if (ee.current = !1, Ve.current != null)
|
|
3102
3118
|
return;
|
|
3103
|
-
if (
|
|
3104
|
-
let
|
|
3105
|
-
const
|
|
3106
|
-
i.current[0] == null ? (
|
|
3119
|
+
if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
|
|
3120
|
+
let M = 0;
|
|
3121
|
+
const j = () => {
|
|
3122
|
+
i.current[0] == null ? (M < 2 && (M ? requestAnimationFrame : queueMicrotask)(j), M++) : (b.current = E.current == null || Yt(E.current, C, h) || d ? yt(i, te.current) : en(i, te.current), E.current = null, w());
|
|
3107
3123
|
};
|
|
3108
|
-
|
|
3124
|
+
j();
|
|
3109
3125
|
}
|
|
3110
|
-
} else Ye(i, c) || (b.current = c,
|
|
3111
|
-
}, [u, n, o.floating, c,
|
|
3112
|
-
var
|
|
3113
|
-
if (!u || o.floating || !O || m || !
|
|
3126
|
+
} else Ye(i, c) || (b.current = c, B(), ae.current = !1);
|
|
3127
|
+
}, [u, n, o.floating, c, Ve, d, i, C, h, w, B, te]), X(() => {
|
|
3128
|
+
var M;
|
|
3129
|
+
if (!u || o.floating || !O || m || !I.current)
|
|
3114
3130
|
return;
|
|
3115
|
-
const
|
|
3116
|
-
P && !
|
|
3131
|
+
const j = O.nodesRef.current, P = (M = j.find((ie) => ie.id === K)) == null || (M = M.context) == null ? void 0 : M.elements.floating, Q = Ee(le(o.floating)), Z = j.some((ie) => ie.context && ce(ie.context.elements.floating, Q));
|
|
3132
|
+
P && !Z && S.current && P.focus({
|
|
3117
3133
|
preventScroll: !0
|
|
3118
3134
|
});
|
|
3119
|
-
}, [u, o.floating, O,
|
|
3120
|
-
if (!u || !O || !m ||
|
|
3121
|
-
function
|
|
3122
|
-
|
|
3135
|
+
}, [u, o.floating, O, K, m]), X(() => {
|
|
3136
|
+
if (!u || !O || !m || K) return;
|
|
3137
|
+
function M(j) {
|
|
3138
|
+
$(j.id), D && (D.current = j);
|
|
3123
3139
|
}
|
|
3124
|
-
return O.events.on("virtualfocus",
|
|
3125
|
-
O.events.off("virtualfocus",
|
|
3140
|
+
return O.events.on("virtualfocus", M), () => {
|
|
3141
|
+
O.events.off("virtualfocus", M);
|
|
3126
3142
|
};
|
|
3127
|
-
}, [u, O, m,
|
|
3128
|
-
G.current = w,
|
|
3143
|
+
}, [u, O, m, K, D]), X(() => {
|
|
3144
|
+
G.current = w, V.current = n, I.current = !!o.floating;
|
|
3129
3145
|
}), X(() => {
|
|
3130
3146
|
n || (E.current = null, T.current = y);
|
|
3131
3147
|
}, [n, y]);
|
|
3132
|
-
const
|
|
3133
|
-
function
|
|
3134
|
-
if (!
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3148
|
+
const oe = c != null, ne = f.useMemo(() => {
|
|
3149
|
+
function M(P) {
|
|
3150
|
+
if (!fe.current) return;
|
|
3151
|
+
const Q = i.current.indexOf(P);
|
|
3152
|
+
Q !== -1 && b.current !== Q && (b.current = Q, w());
|
|
3137
3153
|
}
|
|
3138
3154
|
return {
|
|
3139
3155
|
onFocus(P) {
|
|
3140
3156
|
let {
|
|
3141
|
-
currentTarget:
|
|
3157
|
+
currentTarget: Q
|
|
3142
3158
|
} = P;
|
|
3143
|
-
|
|
3159
|
+
ee.current = !0, M(Q);
|
|
3144
3160
|
},
|
|
3145
3161
|
onClick: (P) => {
|
|
3146
3162
|
let {
|
|
3147
|
-
currentTarget:
|
|
3163
|
+
currentTarget: Q
|
|
3148
3164
|
} = P;
|
|
3149
|
-
return
|
|
3165
|
+
return Q.focus({
|
|
3150
3166
|
preventScroll: !0
|
|
3151
3167
|
});
|
|
3152
3168
|
},
|
|
@@ -3154,159 +3170,159 @@ function Ii(e, t) {
|
|
|
3154
3170
|
...R && {
|
|
3155
3171
|
onMouseMove(P) {
|
|
3156
3172
|
let {
|
|
3157
|
-
currentTarget:
|
|
3173
|
+
currentTarget: Q
|
|
3158
3174
|
} = P;
|
|
3159
|
-
|
|
3175
|
+
ee.current = !0, ae.current = !1, M(Q);
|
|
3160
3176
|
},
|
|
3161
3177
|
onPointerLeave(P) {
|
|
3162
3178
|
let {
|
|
3163
|
-
pointerType:
|
|
3179
|
+
pointerType: Q
|
|
3164
3180
|
} = P;
|
|
3165
|
-
if (!(!
|
|
3166
|
-
var
|
|
3167
|
-
(
|
|
3181
|
+
if (!(!S.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
|
|
3182
|
+
var Z;
|
|
3183
|
+
(Z = U.current) == null || Z.focus({
|
|
3168
3184
|
preventScroll: !0
|
|
3169
3185
|
});
|
|
3170
3186
|
}
|
|
3171
3187
|
}
|
|
3172
3188
|
}
|
|
3173
3189
|
};
|
|
3174
|
-
}, [
|
|
3175
|
-
var
|
|
3176
|
-
return A ?? (O == null || (
|
|
3177
|
-
}, [
|
|
3178
|
-
if (
|
|
3190
|
+
}, [fe, U, R, i, w, m]), de = f.useCallback(() => {
|
|
3191
|
+
var M;
|
|
3192
|
+
return A ?? (O == null || (M = O.nodesRef.current.find((j) => j.id === K)) == null || (M = M.context) == null || (M = M.dataRef) == null ? void 0 : M.current.orientation);
|
|
3193
|
+
}, [K, O, A]), me = se((M) => {
|
|
3194
|
+
if (S.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
|
|
3179
3195
|
return;
|
|
3180
|
-
if (d && Vn(
|
|
3181
|
-
bt(
|
|
3196
|
+
if (d && Vn(M.key, C, h, k)) {
|
|
3197
|
+
bt(M.key, de()) || pe(M), r(!1, M.nativeEvent, "list-navigation"), re(o.domReference) && (m ? O == null || O.events.emit("virtualfocus", o.domReference) : o.domReference.focus());
|
|
3182
3198
|
return;
|
|
3183
3199
|
}
|
|
3184
|
-
const
|
|
3185
|
-
if (
|
|
3186
|
-
const
|
|
3200
|
+
const j = b.current, P = yt(i, x), Q = en(i, x);
|
|
3201
|
+
if (W || (M.key === "Home" && (pe(M), b.current = P, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
|
|
3202
|
+
const Z = L || Array.from({
|
|
3187
3203
|
length: i.current.length
|
|
3188
3204
|
}, () => ({
|
|
3189
3205
|
width: 1,
|
|
3190
3206
|
height: 1
|
|
3191
|
-
})), ie = nr(
|
|
3207
|
+
})), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !ze(i, ye, x)), at = ie.reduce((ye, $e, ft) => $e != null && !ze(i, $e, x) ? ft : ye, -1), rt = ie[tr({
|
|
3192
3208
|
current: ie.map((ye) => ye != null ? i.current[ye] : null)
|
|
3193
3209
|
}, {
|
|
3194
|
-
event:
|
|
3195
|
-
orientation:
|
|
3210
|
+
event: M,
|
|
3211
|
+
orientation: C,
|
|
3196
3212
|
loop: g,
|
|
3197
3213
|
rtl: h,
|
|
3198
3214
|
cols: k,
|
|
3199
3215
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
3200
3216
|
// don't end up in them
|
|
3201
|
-
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye,
|
|
3217
|
+
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, $e) => ze(i, $e, x) ? $e : void 0), void 0], ie),
|
|
3202
3218
|
minIndex: nt,
|
|
3203
3219
|
maxIndex: at,
|
|
3204
3220
|
prevIndex: rr(
|
|
3205
|
-
b.current >
|
|
3206
|
-
|
|
3221
|
+
b.current > Q ? P : b.current,
|
|
3222
|
+
Z,
|
|
3207
3223
|
ie,
|
|
3208
3224
|
k,
|
|
3209
3225
|
// use a corner matching the edge closest to the direction
|
|
3210
3226
|
// we're moving in so we don't end up in the same item. Prefer
|
|
3211
3227
|
// top/left over bottom/right.
|
|
3212
|
-
|
|
3228
|
+
M.key === Ne ? "bl" : M.key === (h ? _e : We) ? "tr" : "tl"
|
|
3213
3229
|
),
|
|
3214
3230
|
stopEvent: !0
|
|
3215
3231
|
})];
|
|
3216
|
-
if (rt != null && (b.current = rt, w()),
|
|
3232
|
+
if (rt != null && (b.current = rt, w()), C === "both")
|
|
3217
3233
|
return;
|
|
3218
3234
|
}
|
|
3219
|
-
if (bt(
|
|
3220
|
-
if (pe(
|
|
3221
|
-
b.current = Yt(
|
|
3235
|
+
if (bt(M.key, C)) {
|
|
3236
|
+
if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
|
|
3237
|
+
b.current = Yt(M.key, C, h) ? P : Q, w();
|
|
3222
3238
|
return;
|
|
3223
3239
|
}
|
|
3224
|
-
Yt(
|
|
3225
|
-
startingIndex:
|
|
3240
|
+
Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : P : ue(i, {
|
|
3241
|
+
startingIndex: j,
|
|
3226
3242
|
disabledIndices: x
|
|
3227
|
-
}) : b.current = Math.min(
|
|
3228
|
-
startingIndex:
|
|
3243
|
+
}) : b.current = Math.min(Q, ue(i, {
|
|
3244
|
+
startingIndex: j,
|
|
3229
3245
|
disabledIndices: x
|
|
3230
|
-
})) : g ? b.current =
|
|
3231
|
-
startingIndex:
|
|
3246
|
+
})) : g ? b.current = j <= P ? p && j !== -1 ? i.current.length : Q : ue(i, {
|
|
3247
|
+
startingIndex: j,
|
|
3232
3248
|
decrement: !0,
|
|
3233
3249
|
disabledIndices: x
|
|
3234
|
-
}) : b.current = Math.max(P,
|
|
3235
|
-
startingIndex:
|
|
3250
|
+
}) : b.current = Math.max(P, ue(i, {
|
|
3251
|
+
startingIndex: j,
|
|
3236
3252
|
decrement: !0,
|
|
3237
3253
|
disabledIndices: x
|
|
3238
3254
|
})), Ye(i, b.current) && (b.current = -1), w();
|
|
3239
3255
|
}
|
|
3240
|
-
}),
|
|
3241
|
-
"aria-activedescendant": z ||
|
|
3242
|
-
}, [m, n,
|
|
3243
|
-
"aria-orientation":
|
|
3244
|
-
...
|
|
3245
|
-
onKeyDown:
|
|
3256
|
+
}), q = f.useMemo(() => m && n && oe && {
|
|
3257
|
+
"aria-activedescendant": z || Me
|
|
3258
|
+
}, [m, n, oe, z, Me]), J = f.useMemo(() => ({
|
|
3259
|
+
"aria-orientation": C === "both" ? void 0 : C,
|
|
3260
|
+
...W ? {} : q,
|
|
3261
|
+
onKeyDown: me,
|
|
3246
3262
|
onPointerMove() {
|
|
3247
|
-
|
|
3263
|
+
S.current = !0;
|
|
3248
3264
|
}
|
|
3249
|
-
}), [
|
|
3250
|
-
function
|
|
3265
|
+
}), [q, me, C, W]), Re = f.useMemo(() => {
|
|
3266
|
+
function M(P) {
|
|
3251
3267
|
y === "auto" && Zn(P.nativeEvent) && (T.current = !0);
|
|
3252
3268
|
}
|
|
3253
|
-
function
|
|
3269
|
+
function j(P) {
|
|
3254
3270
|
T.current = y, y === "auto" && er(P.nativeEvent) && (T.current = !0);
|
|
3255
3271
|
}
|
|
3256
3272
|
return {
|
|
3257
|
-
...
|
|
3273
|
+
...q,
|
|
3258
3274
|
onKeyDown(P) {
|
|
3259
|
-
|
|
3260
|
-
const
|
|
3275
|
+
S.current = !1;
|
|
3276
|
+
const Q = P.key.startsWith("Arrow"), Z = ["Home", "End"].includes(P.key), ie = Q || Z, nt = Kn(P.key, C, h), at = Vn(P.key, C, h, k), rt = Kn(P.key, de(), h), ye = bt(P.key, C), $e = (d ? rt : ye) || P.key === "Enter" || P.key.trim() === "";
|
|
3261
3277
|
if (m && n) {
|
|
3262
|
-
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null),
|
|
3263
|
-
if (ie &&
|
|
3278
|
+
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), Le = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
|
|
3279
|
+
if (ie && Le && D) {
|
|
3264
3280
|
const mt = new KeyboardEvent("keydown", {
|
|
3265
3281
|
key: P.key,
|
|
3266
3282
|
bubbles: !0
|
|
3267
3283
|
});
|
|
3268
3284
|
if (nt || at) {
|
|
3269
3285
|
var ft, un;
|
|
3270
|
-
const Tr = ((ft =
|
|
3271
|
-
an && (pe(P), an.dispatchEvent(mt),
|
|
3286
|
+
const Tr = ((ft = Le.context) == null ? void 0 : ft.elements.domReference) === P.currentTarget, an = at && !Tr ? (un = Le.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
|
|
3287
|
+
an && (pe(P), an.dispatchEvent(mt), $(void 0));
|
|
3272
3288
|
}
|
|
3273
|
-
if ((ye ||
|
|
3289
|
+
if ((ye || Z) && Le.context && Le.context.open && Le.parentId && P.currentTarget !== Le.context.elements.domReference) {
|
|
3274
3290
|
var ln;
|
|
3275
|
-
pe(P), (ln =
|
|
3291
|
+
pe(P), (ln = Le.context.elements.domReference) == null || ln.dispatchEvent(mt);
|
|
3276
3292
|
return;
|
|
3277
3293
|
}
|
|
3278
3294
|
}
|
|
3279
|
-
return
|
|
3295
|
+
return me(P);
|
|
3280
3296
|
}
|
|
3281
|
-
if (!(!n && !v &&
|
|
3282
|
-
if (
|
|
3283
|
-
const dt = bt(P.key,
|
|
3297
|
+
if (!(!n && !v && Q)) {
|
|
3298
|
+
if ($e) {
|
|
3299
|
+
const dt = bt(P.key, de());
|
|
3284
3300
|
E.current = d && dt ? null : P.key;
|
|
3285
3301
|
}
|
|
3286
3302
|
if (d) {
|
|
3287
3303
|
rt && (pe(P), n ? (b.current = yt(i, te.current), w()) : r(!0, P.nativeEvent, "list-navigation"));
|
|
3288
3304
|
return;
|
|
3289
3305
|
}
|
|
3290
|
-
ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") :
|
|
3306
|
+
ye && (l != null && (b.current = l), pe(P), !n && v ? r(!0, P.nativeEvent, "list-navigation") : me(P), n && w());
|
|
3291
3307
|
}
|
|
3292
3308
|
},
|
|
3293
3309
|
onFocus() {
|
|
3294
3310
|
n && !m && (b.current = -1, w());
|
|
3295
3311
|
},
|
|
3296
|
-
onPointerDown:
|
|
3297
|
-
onPointerEnter:
|
|
3298
|
-
onMouseDown:
|
|
3299
|
-
onClick:
|
|
3312
|
+
onPointerDown: j,
|
|
3313
|
+
onPointerEnter: j,
|
|
3314
|
+
onMouseDown: M,
|
|
3315
|
+
onClick: M
|
|
3300
3316
|
};
|
|
3301
|
-
}, [
|
|
3317
|
+
}, [Me, q, k, me, te, y, i, d, w, r, n, v, C, de, h, l, O, m, D]);
|
|
3302
3318
|
return f.useMemo(() => u ? {
|
|
3303
|
-
reference:
|
|
3304
|
-
floating:
|
|
3305
|
-
item:
|
|
3306
|
-
} : {}, [u,
|
|
3319
|
+
reference: Re,
|
|
3320
|
+
floating: J,
|
|
3321
|
+
item: ne
|
|
3322
|
+
} : {}, [u, Re, J, ne]);
|
|
3307
3323
|
}
|
|
3308
|
-
const
|
|
3309
|
-
function
|
|
3324
|
+
const ri = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
3325
|
+
function Mi(e, t) {
|
|
3310
3326
|
var n, r;
|
|
3311
3327
|
t === void 0 && (t = {});
|
|
3312
3328
|
const {
|
|
@@ -3318,8 +3334,8 @@ function Ci(e, t) {
|
|
|
3318
3334
|
role: a = "dialog"
|
|
3319
3335
|
} = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, p = f.useMemo(() => {
|
|
3320
3336
|
var v;
|
|
3321
|
-
return ((v =
|
|
3322
|
-
}, [s.floating, i]), g = (r =
|
|
3337
|
+
return ((v = It(s.floating)) == null ? void 0 : v.id) || i;
|
|
3338
|
+
}, [s.floating, i]), g = (r = ri.get(a)) != null ? r : a, h = et() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
|
|
3323
3339
|
["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? p : void 0
|
|
3324
3340
|
} : {
|
|
3325
3341
|
"aria-expanded": o ? "true" : "false",
|
|
@@ -3356,7 +3372,7 @@ function Ci(e, t) {
|
|
|
3356
3372
|
}, [g, p, l, a]), R = f.useCallback((v) => {
|
|
3357
3373
|
let {
|
|
3358
3374
|
active: x,
|
|
3359
|
-
selected:
|
|
3375
|
+
selected: C
|
|
3360
3376
|
} = v;
|
|
3361
3377
|
const A = {
|
|
3362
3378
|
role: "option",
|
|
@@ -3368,12 +3384,12 @@ function Ci(e, t) {
|
|
|
3368
3384
|
case "select":
|
|
3369
3385
|
return {
|
|
3370
3386
|
...A,
|
|
3371
|
-
"aria-selected": x &&
|
|
3387
|
+
"aria-selected": x && C
|
|
3372
3388
|
};
|
|
3373
3389
|
case "combobox":
|
|
3374
3390
|
return {
|
|
3375
3391
|
...A,
|
|
3376
|
-
"aria-selected":
|
|
3392
|
+
"aria-selected": C
|
|
3377
3393
|
};
|
|
3378
3394
|
}
|
|
3379
3395
|
return {};
|
|
@@ -3384,7 +3400,7 @@ function Ci(e, t) {
|
|
|
3384
3400
|
item: R
|
|
3385
3401
|
} : {}, [c, m, y, R]);
|
|
3386
3402
|
}
|
|
3387
|
-
function
|
|
3403
|
+
function oi(e, t) {
|
|
3388
3404
|
const [n, r] = f.useState(e);
|
|
3389
3405
|
return e && !n && r(!0), f.useEffect(() => {
|
|
3390
3406
|
if (!e && n) {
|
|
@@ -3393,7 +3409,7 @@ function ei(e, t) {
|
|
|
3393
3409
|
}
|
|
3394
3410
|
}, [e, n, t]), n;
|
|
3395
3411
|
}
|
|
3396
|
-
function
|
|
3412
|
+
function Si(e, t) {
|
|
3397
3413
|
t === void 0 && (t = {});
|
|
3398
3414
|
const {
|
|
3399
3415
|
open: n,
|
|
@@ -3402,7 +3418,7 @@ function Ti(e, t) {
|
|
|
3402
3418
|
}
|
|
3403
3419
|
} = e, {
|
|
3404
3420
|
duration: o = 250
|
|
3405
|
-
} = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u =
|
|
3421
|
+
} = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = oi(n, i);
|
|
3406
3422
|
return !u && c === "close" && a("unmounted"), X(() => {
|
|
3407
3423
|
if (r) {
|
|
3408
3424
|
if (n) {
|
|
@@ -3424,30 +3440,30 @@ function Ti(e, t) {
|
|
|
3424
3440
|
};
|
|
3425
3441
|
}
|
|
3426
3442
|
export {
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3443
|
+
pi as C,
|
|
3444
|
+
bi as F,
|
|
3445
|
+
gi as a,
|
|
3446
|
+
mi as b,
|
|
3447
|
+
di as c,
|
|
3448
|
+
Ii as d,
|
|
3449
|
+
Ei as e,
|
|
3450
|
+
fi as f,
|
|
3451
|
+
Ci as g,
|
|
3452
|
+
Mi as h,
|
|
3453
|
+
Oi as i,
|
|
3454
|
+
ui as j,
|
|
3455
|
+
et as k,
|
|
3456
|
+
hi as l,
|
|
3457
|
+
vi as m,
|
|
3458
|
+
xi as n,
|
|
3459
|
+
li as o,
|
|
3460
|
+
Lo as p,
|
|
3461
|
+
wi as q,
|
|
3462
|
+
Ai as r,
|
|
3463
|
+
ai as s,
|
|
3464
|
+
yi as t,
|
|
3465
|
+
Fo as u,
|
|
3466
|
+
Ti as v,
|
|
3467
|
+
Si as w,
|
|
3468
|
+
Ri as x
|
|
3453
3469
|
};
|