@iress-oss/ids-components 5.14.1 → 5.14.2
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-CA3kLIMp.js} +1 -1
- package/dist/{ComboboxHiddenInput-Dgwi3tti.js → ComboboxHiddenInput-3nXQLXWs.js} +5 -5
- package/dist/{FieldAppendToLabel-DOal1Jmq.js → FieldAppendToLabel-fLFwdVe0.js} +2 -2
- package/dist/{InputBase-DevBiqf2.js → InputBase-Gu84XDiJ.js} +1 -1
- package/dist/Loading.module-BoPWGcXe.js +13 -0
- package/dist/{LoadingSuspense-COCIFlsi.js → LoadingSuspense-CbdTDOzY.js} +608 -602
- package/dist/LogoFromSrc-C3T9li5n.js +59 -0
- package/dist/MenuItem.module-36-M9GIW.js +24 -0
- package/dist/Popover.module-qeMQ2uo5.js +11 -0
- package/dist/{SelectControl-CrSaqFGs.js → SelectControl-CzcS0y-K.js} +1 -1
- package/dist/{SliderTicks-C2tiJ8Jz.js → SliderTicks-Dfc9Q2il.js} +1 -1
- package/dist/TabSet.module-BduoH_21.js +13 -0
- package/dist/Table.module-CONHit0r.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 +2 -2
- 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 +2 -2
- package/dist/components/Combobox/MultiCombobox/MultiCombobox.js +2 -2
- package/dist/components/Combobox/components/ComboboxHiddenInput.js +1 -1
- package/dist/components/Combobox/components/ComboboxResults.js +3 -3
- package/dist/components/Combobox/components/ComboboxResultsDescriptor.js +1 -1
- 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 +2 -2
- package/dist/components/Filter/Filter.js +2 -2
- package/dist/components/Filter/components/FilterResetButton.js +1 -1
- package/dist/components/Filter/components/FilterSearch.js +1 -1
- package/dist/components/Filter/index.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormField/FormField.js +1 -1
- package/dist/components/Form/FormField/FormFieldset.js +1 -1
- 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 +1 -1
- package/dist/components/Hide/index.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/Inline/Inline.js +1 -1
- 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 +1 -1
- 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 +2 -2
- 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/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 +2 -2
- package/dist/components/Readonly/index.js +1 -1
- package/dist/components/RichSelect/RichSelect.js +1 -1
- package/dist/components/RichSelect/SelectBody/SelectBody.js +1 -1
- package/dist/components/RichSelect/SelectCreate/SelectCreate.js +1 -1
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +1 -1
- package/dist/components/RichSelect/SelectLabel/SelectLabel.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenu.js +1 -1
- package/dist/components/RichSelect/SelectMenu/SelectMenuItem.js +1 -1
- package/dist/components/RichSelect/SelectSearch/SelectSearch.js +1 -1
- package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +1 -1
- package/dist/components/RichSelect/SelectTags/SelectTags.js +1 -1
- package/dist/components/RichSelect/components/SelectActivator.js +1 -1
- package/dist/components/RichSelect/components/SelectOptions.js +1 -1
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- 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 +1 -1
- package/dist/components/Select/helpers/mapSelectOptions.js +1 -1
- package/dist/components/Select/helpers/nodesToSelectOptions.js +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/components/Toaster/index.js +1 -1
- 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 +1 -1
- package/dist/{floating-ui.react-RKRjRgyj.js → floating-ui.react-DfZ-vbiG.js} +766 -756
- package/dist/main.js +2 -2
- 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 +2 -2
- package/dist/patterns/Loading/components/LongLoading.js +2 -2
- package/dist/patterns/Loading/components/PageLoading.js +2 -2
- 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/style.css +1 -1
- package/dist/{useIDSButtonGroupItem-DWuujtfY.js → useIDSButtonGroupItem-DUZ2VDnl.js} +1 -1
- package/package.json +5 -3
- package/dist/Loading.module-CC_6gnKJ.js +0 -13
- 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 We(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,7 +39,7 @@ 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(We(e));
|
|
43
43
|
}
|
|
44
44
|
function Pt(e) {
|
|
45
45
|
return [":popover-open", ":modal"].some((t) => {
|
|
@@ -55,21 +55,21 @@ function nn(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
57
|
function Pr(e) {
|
|
58
|
-
let t =
|
|
59
|
-
for (;
|
|
58
|
+
let t = De(e);
|
|
59
|
+
for (; re(t) && !Se(t); ) {
|
|
60
60
|
if (nn(t))
|
|
61
61
|
return t;
|
|
62
62
|
if (Pt(t))
|
|
63
63
|
return null;
|
|
64
|
-
t =
|
|
64
|
+
t = De(t);
|
|
65
65
|
}
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
68
|
function St() {
|
|
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 Se(e) {
|
|
72
|
+
return ["html", "body", "#document"].includes(We(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 De(e) {
|
|
87
|
+
if (We(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 = De(e);
|
|
100
|
+
return Se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : re(t) && ut(t) ? t : Un(t);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Le(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 ? Le(c) : []);
|
|
109
109
|
}
|
|
110
|
-
return t.concat(o,
|
|
110
|
+
return t.concat(o, Le(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 Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.reduce((e, t) => e.concat(t, t + "-" + dn[0], t + "-" + dn[1]), []),
|
|
115
|
+
const Sr = ["top", "right", "bottom", "left"], dn = ["start", "end"], mn = /* @__PURE__ */ Sr.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 ze(e) {
|
|
146
|
+
return ["top", "bottom"].includes(Te(e)) ? "y" : "x";
|
|
147
147
|
}
|
|
148
148
|
function qn(e) {
|
|
149
|
-
return Gn(
|
|
149
|
+
return Gn(ze(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 Pe(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 && He(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 He(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 = ze(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 = ze(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,
|
|
@@ -830,31 +831,31 @@ const Zr = function(e) {
|
|
|
830
831
|
placement: w
|
|
831
832
|
}
|
|
832
833
|
};
|
|
833
|
-
let
|
|
834
|
-
if (!
|
|
834
|
+
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;
|
|
835
|
+
if (!W)
|
|
835
836
|
switch (d) {
|
|
836
837
|
case "bestFit": {
|
|
837
|
-
var
|
|
838
|
-
const T = (
|
|
838
|
+
var K;
|
|
839
|
+
const T = (K = F.filter((b) => {
|
|
839
840
|
if (k) {
|
|
840
|
-
const E =
|
|
841
|
+
const E = ze(b.placement);
|
|
841
842
|
return E === v || // Create a bias to the `y` side axis due to horizontal
|
|
842
843
|
// reading directions favoring greater width.
|
|
843
844
|
E === "y";
|
|
844
845
|
}
|
|
845
846
|
return !0;
|
|
846
|
-
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E,
|
|
847
|
-
T && (
|
|
847
|
+
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, P) => E + P, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : K[0];
|
|
848
|
+
T && (W = T);
|
|
848
849
|
break;
|
|
849
850
|
}
|
|
850
851
|
case "initialPlacement":
|
|
851
|
-
|
|
852
|
+
W = c;
|
|
852
853
|
break;
|
|
853
854
|
}
|
|
854
|
-
if (o !==
|
|
855
|
+
if (o !== W)
|
|
855
856
|
return {
|
|
856
857
|
reset: {
|
|
857
|
-
placement:
|
|
858
|
+
placement: W
|
|
858
859
|
}
|
|
859
860
|
};
|
|
860
861
|
}
|
|
@@ -862,12 +863,12 @@ const Zr = function(e) {
|
|
|
862
863
|
}
|
|
863
864
|
};
|
|
864
865
|
};
|
|
865
|
-
async function
|
|
866
|
+
async function ro(e, t) {
|
|
866
867
|
const {
|
|
867
868
|
placement: n,
|
|
868
869
|
platform: r,
|
|
869
870
|
elements: o
|
|
870
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i =
|
|
871
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Te(n), c = Ie(n), a = ze(n) === "y", u = ["left", "top"].includes(i) ? -1 : 1, l = s && a ? -1 : 1, p = Ze(t, e);
|
|
871
872
|
let {
|
|
872
873
|
mainAxis: g,
|
|
873
874
|
crossAxis: d,
|
|
@@ -889,7 +890,7 @@ async function to(e, t) {
|
|
|
889
890
|
y: d * l
|
|
890
891
|
};
|
|
891
892
|
}
|
|
892
|
-
const
|
|
893
|
+
const oo = function(e) {
|
|
893
894
|
return e === void 0 && (e = 0), {
|
|
894
895
|
name: "offset",
|
|
895
896
|
options: e,
|
|
@@ -900,7 +901,7 @@ const no = function(e) {
|
|
|
900
901
|
y: s,
|
|
901
902
|
placement: i,
|
|
902
903
|
middlewareData: c
|
|
903
|
-
} = t, a = await
|
|
904
|
+
} = t, a = await ro(t, e);
|
|
904
905
|
return i === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
905
906
|
x: o + a.x,
|
|
906
907
|
y: s + a.y,
|
|
@@ -911,7 +912,7 @@ const no = function(e) {
|
|
|
911
912
|
};
|
|
912
913
|
}
|
|
913
914
|
};
|
|
914
|
-
},
|
|
915
|
+
}, io = function(e) {
|
|
915
916
|
return e === void 0 && (e = {}), {
|
|
916
917
|
name: "shift",
|
|
917
918
|
options: e,
|
|
@@ -936,10 +937,10 @@ const no = function(e) {
|
|
|
936
937
|
}
|
|
937
938
|
},
|
|
938
939
|
...a
|
|
939
|
-
} =
|
|
940
|
+
} = Ze(e, t), u = {
|
|
940
941
|
x: n,
|
|
941
942
|
y: r
|
|
942
|
-
}, l = await kt(t, a), p =
|
|
943
|
+
}, l = await kt(t, a), p = ze(Te(o)), g = Gn(p);
|
|
943
944
|
let d = u[g], h = u[p];
|
|
944
945
|
if (s) {
|
|
945
946
|
const y = g === "y" ? "top" : "left", R = g === "y" ? "bottom" : "right", v = d + l[y], x = d - l[R];
|
|
@@ -967,7 +968,7 @@ const no = function(e) {
|
|
|
967
968
|
};
|
|
968
969
|
}
|
|
969
970
|
};
|
|
970
|
-
},
|
|
971
|
+
}, so = function(e) {
|
|
971
972
|
return e === void 0 && (e = {}), {
|
|
972
973
|
name: "size",
|
|
973
974
|
options: e,
|
|
@@ -982,21 +983,21 @@ const no = function(e) {
|
|
|
982
983
|
apply: a = () => {
|
|
983
984
|
},
|
|
984
985
|
...u
|
|
985
|
-
} =
|
|
986
|
+
} = Ze(e, t), l = await kt(t, u), p = Te(o), g = Ie(o), d = ze(o) === "y", {
|
|
986
987
|
width: h,
|
|
987
988
|
height: m
|
|
988
989
|
} = s.floating;
|
|
989
990
|
let y, R;
|
|
990
991
|
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 ?
|
|
992
|
+
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;
|
|
993
|
+
let N = C, D = A;
|
|
994
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (D = x), (r = t.middlewareData.shift) != null && r.enabled.y && (N = v), k && !g) {
|
|
995
|
+
const F = be(l.left, 0), _ = be(l.right, 0), U = be(l.top, 0), K = be(l.bottom, 0);
|
|
996
|
+
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
997
|
}
|
|
997
998
|
await a({
|
|
998
999
|
...t,
|
|
999
|
-
availableWidth:
|
|
1000
|
+
availableWidth: D,
|
|
1000
1001
|
availableHeight: N
|
|
1001
1002
|
});
|
|
1002
1003
|
const L = await i.getDimensions(c.floating);
|
|
@@ -1011,7 +1012,7 @@ const no = function(e) {
|
|
|
1011
1012
|
function ur(e) {
|
|
1012
1013
|
const t = we(e);
|
|
1013
1014
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1014
|
-
const o =
|
|
1015
|
+
const o = re(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = wt(n) !== s || wt(r) !== i;
|
|
1015
1016
|
return c && (n = s, r = i), {
|
|
1016
1017
|
width: n,
|
|
1017
1018
|
height: r,
|
|
@@ -1023,8 +1024,8 @@ function sn(e) {
|
|
|
1023
1024
|
}
|
|
1024
1025
|
function Xe(e) {
|
|
1025
1026
|
const t = sn(e);
|
|
1026
|
-
if (!
|
|
1027
|
-
return
|
|
1027
|
+
if (!re(t))
|
|
1028
|
+
return Ce(1);
|
|
1028
1029
|
const n = t.getBoundingClientRect(), {
|
|
1029
1030
|
width: r,
|
|
1030
1031
|
height: o,
|
|
@@ -1036,33 +1037,33 @@ function Xe(e) {
|
|
|
1036
1037
|
y: c
|
|
1037
1038
|
};
|
|
1038
1039
|
}
|
|
1039
|
-
const
|
|
1040
|
+
const co = /* @__PURE__ */ Ce(0);
|
|
1040
1041
|
function lr(e) {
|
|
1041
1042
|
const t = he(e);
|
|
1042
|
-
return !St() || !t.visualViewport ?
|
|
1043
|
+
return !St() || !t.visualViewport ? co : {
|
|
1043
1044
|
x: t.visualViewport.offsetLeft,
|
|
1044
1045
|
y: t.visualViewport.offsetTop
|
|
1045
1046
|
};
|
|
1046
1047
|
}
|
|
1047
|
-
function
|
|
1048
|
+
function uo(e, t, n) {
|
|
1048
1049
|
return t === void 0 && (t = !1), !n || t && n !== he(e) ? !1 : t;
|
|
1049
1050
|
}
|
|
1050
|
-
function
|
|
1051
|
+
function Ue(e, t, n, r) {
|
|
1051
1052
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1052
1053
|
const o = e.getBoundingClientRect(), s = sn(e);
|
|
1053
|
-
let i =
|
|
1054
|
+
let i = Ce(1);
|
|
1054
1055
|
t && (r ? Y(r) && (i = Xe(r)) : i = Xe(e));
|
|
1055
|
-
const c =
|
|
1056
|
+
const c = uo(s, n, r) ? lr(s) : Ce(0);
|
|
1056
1057
|
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
1058
|
if (s) {
|
|
1058
1059
|
const g = he(s), d = r && Y(r) ? he(r) : r;
|
|
1059
1060
|
let h = g, m = Jt(h);
|
|
1060
1061
|
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 +=
|
|
1062
|
+
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;
|
|
1063
|
+
a *= y.x, u *= y.y, l *= y.x, p *= y.y, a += x, u += C, h = he(m), m = Jt(h);
|
|
1063
1064
|
}
|
|
1064
1065
|
}
|
|
1065
|
-
return
|
|
1066
|
+
return Ct({
|
|
1066
1067
|
width: l,
|
|
1067
1068
|
height: p,
|
|
1068
1069
|
x: a,
|
|
@@ -1071,7 +1072,7 @@ function ze(e, t, n, r) {
|
|
|
1071
1072
|
}
|
|
1072
1073
|
function cn(e, t) {
|
|
1073
1074
|
const n = Dt(e).scrollLeft;
|
|
1074
|
-
return t ? t.left + n :
|
|
1075
|
+
return t ? t.left + n : Ue(Oe(e)).left + n;
|
|
1075
1076
|
}
|
|
1076
1077
|
function ar(e, t, n) {
|
|
1077
1078
|
n === void 0 && (n = !1);
|
|
@@ -1084,26 +1085,26 @@ function ar(e, t, n) {
|
|
|
1084
1085
|
y: s
|
|
1085
1086
|
};
|
|
1086
1087
|
}
|
|
1087
|
-
function
|
|
1088
|
+
function lo(e) {
|
|
1088
1089
|
let {
|
|
1089
1090
|
elements: t,
|
|
1090
1091
|
rect: n,
|
|
1091
1092
|
offsetParent: r,
|
|
1092
1093
|
strategy: o
|
|
1093
1094
|
} = e;
|
|
1094
|
-
const s = o === "fixed", i =
|
|
1095
|
+
const s = o === "fixed", i = Oe(r), c = t ? Pt(t.floating) : !1;
|
|
1095
1096
|
if (r === i || c && s)
|
|
1096
1097
|
return n;
|
|
1097
1098
|
let a = {
|
|
1098
1099
|
scrollLeft: 0,
|
|
1099
1100
|
scrollTop: 0
|
|
1100
|
-
}, u =
|
|
1101
|
-
const l =
|
|
1102
|
-
if ((p || !p && !s) && ((
|
|
1103
|
-
const d =
|
|
1101
|
+
}, u = Ce(1);
|
|
1102
|
+
const l = Ce(0), p = re(r);
|
|
1103
|
+
if ((p || !p && !s) && ((We(r) !== "body" || ut(i)) && (a = Dt(r)), re(r))) {
|
|
1104
|
+
const d = Ue(r);
|
|
1104
1105
|
u = Xe(r), l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
1105
1106
|
}
|
|
1106
|
-
const g = i && !p && !s ? ar(i, a, !0) :
|
|
1107
|
+
const g = i && !p && !s ? ar(i, a, !0) : Ce(0);
|
|
1107
1108
|
return {
|
|
1108
1109
|
width: n.width * u.x,
|
|
1109
1110
|
height: n.height * u.y,
|
|
@@ -1111,11 +1112,11 @@ function co(e) {
|
|
|
1111
1112
|
y: n.y * u.y - a.scrollTop * u.y + l.y + g.y
|
|
1112
1113
|
};
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function ao(e) {
|
|
1115
1116
|
return Array.from(e.getClientRects());
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const t =
|
|
1118
|
+
function fo(e) {
|
|
1119
|
+
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
1120
|
let i = -n.scrollLeft + cn(e);
|
|
1120
1121
|
const c = -n.scrollTop;
|
|
1121
1122
|
return we(r).direction === "rtl" && (i += be(t.clientWidth, r.clientWidth) - o), {
|
|
@@ -1125,8 +1126,8 @@ function lo(e) {
|
|
|
1125
1126
|
y: c
|
|
1126
1127
|
};
|
|
1127
1128
|
}
|
|
1128
|
-
function
|
|
1129
|
-
const n = he(e), r =
|
|
1129
|
+
function mo(e, t) {
|
|
1130
|
+
const n = he(e), r = Oe(e), o = n.visualViewport;
|
|
1130
1131
|
let s = r.clientWidth, i = r.clientHeight, c = 0, a = 0;
|
|
1131
1132
|
if (o) {
|
|
1132
1133
|
s = o.width, i = o.height;
|
|
@@ -1140,8 +1141,8 @@ function ao(e, t) {
|
|
|
1140
1141
|
y: a
|
|
1141
1142
|
};
|
|
1142
1143
|
}
|
|
1143
|
-
function
|
|
1144
|
-
const n =
|
|
1144
|
+
function po(e, t) {
|
|
1145
|
+
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
1146
|
return {
|
|
1146
1147
|
width: i,
|
|
1147
1148
|
height: c,
|
|
@@ -1152,11 +1153,11 @@ function fo(e, t) {
|
|
|
1152
1153
|
function yn(e, t, n) {
|
|
1153
1154
|
let r;
|
|
1154
1155
|
if (t === "viewport")
|
|
1155
|
-
r =
|
|
1156
|
+
r = mo(e, n);
|
|
1156
1157
|
else if (t === "document")
|
|
1157
|
-
r =
|
|
1158
|
+
r = fo(Oe(e));
|
|
1158
1159
|
else if (Y(t))
|
|
1159
|
-
r =
|
|
1160
|
+
r = po(t, n);
|
|
1160
1161
|
else {
|
|
1161
1162
|
const o = lr(e);
|
|
1162
1163
|
r = {
|
|
@@ -1166,35 +1167,35 @@ function yn(e, t, n) {
|
|
|
1166
1167
|
height: t.height
|
|
1167
1168
|
};
|
|
1168
1169
|
}
|
|
1169
|
-
return
|
|
1170
|
+
return Ct(r);
|
|
1170
1171
|
}
|
|
1171
1172
|
function fr(e, t) {
|
|
1172
|
-
const n =
|
|
1173
|
-
return n === t || !Y(n) ||
|
|
1173
|
+
const n = De(e);
|
|
1174
|
+
return n === t || !Y(n) || Se(n) ? !1 : we(n).position === "fixed" || fr(n, t);
|
|
1174
1175
|
}
|
|
1175
|
-
function
|
|
1176
|
+
function go(e, t) {
|
|
1176
1177
|
const n = t.get(e);
|
|
1177
1178
|
if (n)
|
|
1178
1179
|
return n;
|
|
1179
|
-
let r =
|
|
1180
|
+
let r = Le(e, [], !1).filter((c) => Y(c) && We(c) !== "body"), o = null;
|
|
1180
1181
|
const s = we(e).position === "fixed";
|
|
1181
|
-
let i = s ?
|
|
1182
|
-
for (; Y(i) && !
|
|
1182
|
+
let i = s ? De(e) : e;
|
|
1183
|
+
for (; Y(i) && !Se(i); ) {
|
|
1183
1184
|
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 =
|
|
1185
|
+
!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 = De(i);
|
|
1185
1186
|
}
|
|
1186
1187
|
return t.set(e, r), r;
|
|
1187
1188
|
}
|
|
1188
|
-
function
|
|
1189
|
+
function ho(e) {
|
|
1189
1190
|
let {
|
|
1190
1191
|
element: t,
|
|
1191
1192
|
boundary: n,
|
|
1192
1193
|
rootBoundary: r,
|
|
1193
1194
|
strategy: o
|
|
1194
1195
|
} = e;
|
|
1195
|
-
const i = [...n === "clippingAncestors" ? Pt(t) ? [] :
|
|
1196
|
+
const i = [...n === "clippingAncestors" ? Pt(t) ? [] : go(t, this._c) : [].concat(n), r], c = i[0], a = i.reduce((u, l) => {
|
|
1196
1197
|
const p = yn(t, l, o);
|
|
1197
|
-
return u.top = be(p.top, u.top), u.right =
|
|
1198
|
+
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
1199
|
}, yn(t, c, o));
|
|
1199
1200
|
return {
|
|
1200
1201
|
width: a.right - a.left,
|
|
@@ -1203,7 +1204,7 @@ function po(e) {
|
|
|
1203
1204
|
y: a.top
|
|
1204
1205
|
};
|
|
1205
1206
|
}
|
|
1206
|
-
function
|
|
1207
|
+
function vo(e) {
|
|
1207
1208
|
const {
|
|
1208
1209
|
width: t,
|
|
1209
1210
|
height: n
|
|
@@ -1213,19 +1214,19 @@ function go(e) {
|
|
|
1213
1214
|
height: n
|
|
1214
1215
|
};
|
|
1215
1216
|
}
|
|
1216
|
-
function
|
|
1217
|
-
const r =
|
|
1217
|
+
function bo(e, t, n) {
|
|
1218
|
+
const r = re(t), o = Oe(t), s = n === "fixed", i = Ue(e, !0, s, t);
|
|
1218
1219
|
let c = {
|
|
1219
1220
|
scrollLeft: 0,
|
|
1220
1221
|
scrollTop: 0
|
|
1221
1222
|
};
|
|
1222
|
-
const a =
|
|
1223
|
+
const a = Ce(0);
|
|
1223
1224
|
if (r || !r && !s)
|
|
1224
|
-
if ((
|
|
1225
|
-
const g =
|
|
1225
|
+
if ((We(t) !== "body" || ut(o)) && (c = Dt(t)), r) {
|
|
1226
|
+
const g = Ue(t, !0, s, t);
|
|
1226
1227
|
a.x = g.x + t.clientLeft, a.y = g.y + t.clientTop;
|
|
1227
1228
|
} else o && (a.x = cn(o));
|
|
1228
|
-
const u = o && !r && !s ? ar(o, c) :
|
|
1229
|
+
const u = o && !r && !s ? ar(o, c) : Ce(0), l = i.left + c.scrollLeft - a.x - u.x, p = i.top + c.scrollTop - a.y - u.y;
|
|
1229
1230
|
return {
|
|
1230
1231
|
x: l,
|
|
1231
1232
|
y: p,
|
|
@@ -1233,39 +1234,39 @@ function ho(e, t, n) {
|
|
|
1233
1234
|
height: i.height
|
|
1234
1235
|
};
|
|
1235
1236
|
}
|
|
1236
|
-
function
|
|
1237
|
+
function Vt(e) {
|
|
1237
1238
|
return we(e).position === "static";
|
|
1238
1239
|
}
|
|
1239
1240
|
function xn(e, t) {
|
|
1240
|
-
if (!
|
|
1241
|
+
if (!re(e) || we(e).position === "fixed")
|
|
1241
1242
|
return null;
|
|
1242
1243
|
if (t)
|
|
1243
1244
|
return t(e);
|
|
1244
1245
|
let n = e.offsetParent;
|
|
1245
|
-
return
|
|
1246
|
+
return Oe(e) === n && (n = n.ownerDocument.body), n;
|
|
1246
1247
|
}
|
|
1247
1248
|
function dr(e, t) {
|
|
1248
1249
|
const n = he(e);
|
|
1249
1250
|
if (Pt(e))
|
|
1250
1251
|
return n;
|
|
1251
|
-
if (!
|
|
1252
|
-
let o =
|
|
1253
|
-
for (; o && !
|
|
1254
|
-
if (Y(o) && !
|
|
1252
|
+
if (!re(e)) {
|
|
1253
|
+
let o = De(e);
|
|
1254
|
+
for (; o && !Se(o); ) {
|
|
1255
|
+
if (Y(o) && !Vt(o))
|
|
1255
1256
|
return o;
|
|
1256
|
-
o =
|
|
1257
|
+
o = De(o);
|
|
1257
1258
|
}
|
|
1258
1259
|
return n;
|
|
1259
1260
|
}
|
|
1260
1261
|
let r = xn(e, t);
|
|
1261
|
-
for (; r && Mr(r) &&
|
|
1262
|
+
for (; r && Mr(r) && Vt(r); )
|
|
1262
1263
|
r = xn(r, t);
|
|
1263
|
-
return r &&
|
|
1264
|
+
return r && Se(r) && Vt(r) && !nn(r) ? n : r || Pr(e) || n;
|
|
1264
1265
|
}
|
|
1265
|
-
const
|
|
1266
|
+
const yo = async function(e) {
|
|
1266
1267
|
const t = this.getOffsetParent || dr, n = this.getDimensions, r = await n(e.floating);
|
|
1267
1268
|
return {
|
|
1268
|
-
reference:
|
|
1269
|
+
reference: bo(e.reference, await t(e.floating), e.strategy),
|
|
1269
1270
|
floating: {
|
|
1270
1271
|
x: 0,
|
|
1271
1272
|
y: 0,
|
|
@@ -1274,27 +1275,27 @@ const vo = async function(e) {
|
|
|
1274
1275
|
}
|
|
1275
1276
|
};
|
|
1276
1277
|
};
|
|
1277
|
-
function
|
|
1278
|
+
function xo(e) {
|
|
1278
1279
|
return we(e).direction === "rtl";
|
|
1279
1280
|
}
|
|
1280
|
-
const
|
|
1281
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1282
|
-
getDocumentElement:
|
|
1283
|
-
getClippingRect:
|
|
1281
|
+
const wo = {
|
|
1282
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: lo,
|
|
1283
|
+
getDocumentElement: Oe,
|
|
1284
|
+
getClippingRect: ho,
|
|
1284
1285
|
getOffsetParent: dr,
|
|
1285
|
-
getElementRects:
|
|
1286
|
-
getClientRects:
|
|
1287
|
-
getDimensions:
|
|
1286
|
+
getElementRects: yo,
|
|
1287
|
+
getClientRects: ao,
|
|
1288
|
+
getDimensions: vo,
|
|
1288
1289
|
getScale: Xe,
|
|
1289
1290
|
isElement: Y,
|
|
1290
|
-
isRTL:
|
|
1291
|
+
isRTL: xo
|
|
1291
1292
|
};
|
|
1292
1293
|
function mr(e, t) {
|
|
1293
1294
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1294
1295
|
}
|
|
1295
|
-
function
|
|
1296
|
+
function Ro(e, t) {
|
|
1296
1297
|
let n = null, r;
|
|
1297
|
-
const o =
|
|
1298
|
+
const o = Oe(e);
|
|
1298
1299
|
function s() {
|
|
1299
1300
|
var c;
|
|
1300
1301
|
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -1311,19 +1312,19 @@ function xo(e, t) {
|
|
|
1311
1312
|
return;
|
|
1312
1313
|
const h = je(p), m = je(o.clientWidth - (l + g)), y = je(o.clientHeight - (p + d)), R = je(l), x = {
|
|
1313
1314
|
rootMargin: -h + "px " + -m + "px " + -y + "px " + -R + "px",
|
|
1314
|
-
threshold: be(0,
|
|
1315
|
+
threshold: be(0, Qe(1, a)) || 1
|
|
1315
1316
|
};
|
|
1316
|
-
let
|
|
1317
|
+
let C = !0;
|
|
1317
1318
|
function A(k) {
|
|
1318
1319
|
const N = k[0].intersectionRatio;
|
|
1319
1320
|
if (N !== a) {
|
|
1320
|
-
if (!
|
|
1321
|
+
if (!C)
|
|
1321
1322
|
return i();
|
|
1322
1323
|
N ? i(!1, N) : r = setTimeout(() => {
|
|
1323
1324
|
i(!1, 1e-7);
|
|
1324
1325
|
}, 1e3);
|
|
1325
1326
|
}
|
|
1326
|
-
N === 1 && !mr(u, e.getBoundingClientRect()) && i(),
|
|
1327
|
+
N === 1 && !mr(u, e.getBoundingClientRect()) && i(), C = !1;
|
|
1327
1328
|
}
|
|
1328
1329
|
try {
|
|
1329
1330
|
n = new IntersectionObserver(A, {
|
|
@@ -1338,7 +1339,7 @@ function xo(e, t) {
|
|
|
1338
1339
|
}
|
|
1339
1340
|
return i(!0), s;
|
|
1340
1341
|
}
|
|
1341
|
-
function
|
|
1342
|
+
function ui(e, t, n, r) {
|
|
1342
1343
|
r === void 0 && (r = {});
|
|
1343
1344
|
const {
|
|
1344
1345
|
ancestorScroll: o = !0,
|
|
@@ -1346,13 +1347,13 @@ function oi(e, t, n, r) {
|
|
|
1346
1347
|
elementResize: i = typeof ResizeObserver == "function",
|
|
1347
1348
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1348
1349
|
animationFrame: a = !1
|
|
1349
|
-
} = r, u = sn(e), l = o || s ? [...u ?
|
|
1350
|
+
} = r, u = sn(e), l = o || s ? [...u ? Le(u) : [], ...Le(t)] : [];
|
|
1350
1351
|
l.forEach((R) => {
|
|
1351
1352
|
o && R.addEventListener("scroll", n, {
|
|
1352
1353
|
passive: !0
|
|
1353
1354
|
}), s && R.addEventListener("resize", n);
|
|
1354
1355
|
});
|
|
1355
|
-
const p = u && c ?
|
|
1356
|
+
const p = u && c ? Ro(u, n) : null;
|
|
1356
1357
|
let g = -1, d = null;
|
|
1357
1358
|
i && (d = new ResizeObserver((R) => {
|
|
1358
1359
|
let [v] = R;
|
|
@@ -1361,10 +1362,10 @@ function oi(e, t, n, r) {
|
|
|
1361
1362
|
(x = d) == null || x.observe(t);
|
|
1362
1363
|
})), n();
|
|
1363
1364
|
}), u && !a && d.observe(u), d.observe(t));
|
|
1364
|
-
let h, m = a ?
|
|
1365
|
+
let h, m = a ? Ue(e) : null;
|
|
1365
1366
|
a && y();
|
|
1366
1367
|
function y() {
|
|
1367
|
-
const R =
|
|
1368
|
+
const R = Ue(e);
|
|
1368
1369
|
m && !mr(m, R) && n(), m = R, h = requestAnimationFrame(y);
|
|
1369
1370
|
}
|
|
1370
1371
|
return n(), () => {
|
|
@@ -1374,20 +1375,21 @@ function oi(e, t, n, r) {
|
|
|
1374
1375
|
}), p == null || p(), (R = d) == null || R.disconnect(), d = null, a && cancelAnimationFrame(h);
|
|
1375
1376
|
};
|
|
1376
1377
|
}
|
|
1377
|
-
const
|
|
1378
|
+
const Eo = oo, Co = to, Io = io, To = no, Oo = so, Ao = (e, t, n) => {
|
|
1378
1379
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1379
|
-
platform:
|
|
1380
|
+
platform: wo,
|
|
1380
1381
|
...n
|
|
1381
1382
|
}, s = {
|
|
1382
1383
|
...o.platform,
|
|
1383
1384
|
_c: r
|
|
1384
1385
|
};
|
|
1385
|
-
return
|
|
1386
|
+
return Zr(e, t, {
|
|
1386
1387
|
...o,
|
|
1387
1388
|
platform: s
|
|
1388
1389
|
});
|
|
1389
1390
|
};
|
|
1390
|
-
var
|
|
1391
|
+
var Mo = typeof document < "u", Po = function() {
|
|
1392
|
+
}, xt = Mo ? $n : Po;
|
|
1391
1393
|
function Tt(e, t) {
|
|
1392
1394
|
if (e === t)
|
|
1393
1395
|
return !0;
|
|
@@ -1431,7 +1433,7 @@ function $t(e) {
|
|
|
1431
1433
|
t.current = e;
|
|
1432
1434
|
}), t;
|
|
1433
1435
|
}
|
|
1434
|
-
function
|
|
1436
|
+
function So(e) {
|
|
1435
1437
|
e === void 0 && (e = {});
|
|
1436
1438
|
const {
|
|
1437
1439
|
placement: t = "bottom",
|
|
@@ -1458,7 +1460,7 @@ function Oo(e) {
|
|
|
1458
1460
|
b !== k.current && (k.current = b, m(b));
|
|
1459
1461
|
}, []), x = f.useCallback((b) => {
|
|
1460
1462
|
b !== N.current && (N.current = b, R(b));
|
|
1461
|
-
}, []),
|
|
1463
|
+
}, []), 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
1464
|
if (!k.current || !N.current)
|
|
1463
1465
|
return;
|
|
1464
1466
|
const b = {
|
|
@@ -1466,8 +1468,8 @@ function Oo(e) {
|
|
|
1466
1468
|
strategy: n,
|
|
1467
1469
|
middleware: g
|
|
1468
1470
|
};
|
|
1469
|
-
_.current && (b.platform = _.current),
|
|
1470
|
-
const
|
|
1471
|
+
_.current && (b.platform = _.current), Ao(k.current, N.current, b).then((E) => {
|
|
1472
|
+
const P = {
|
|
1471
1473
|
...E,
|
|
1472
1474
|
// The floating element's position may be recomputed while it's closed
|
|
1473
1475
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -1475,13 +1477,13 @@ function Oo(e) {
|
|
|
1475
1477
|
// setting it to `true` when `open === false` (must be specified).
|
|
1476
1478
|
isPositioned: U.current !== !1
|
|
1477
1479
|
};
|
|
1478
|
-
O.current && !Tt(
|
|
1479
|
-
p(
|
|
1480
|
+
O.current && !Tt(D.current, P) && (D.current = P, tn.flushSync(() => {
|
|
1481
|
+
p(P);
|
|
1480
1482
|
}));
|
|
1481
1483
|
});
|
|
1482
1484
|
}, [g, t, n, _, U]);
|
|
1483
1485
|
xt(() => {
|
|
1484
|
-
u === !1 &&
|
|
1486
|
+
u === !1 && D.current.isPositioned && (D.current.isPositioned = !1, p((b) => ({
|
|
1485
1487
|
...b,
|
|
1486
1488
|
isPositioned: !1
|
|
1487
1489
|
})));
|
|
@@ -1490,66 +1492,66 @@ function Oo(e) {
|
|
|
1490
1492
|
xt(() => (O.current = !0, () => {
|
|
1491
1493
|
O.current = !1;
|
|
1492
1494
|
}), []), xt(() => {
|
|
1493
|
-
if (
|
|
1495
|
+
if (C && (k.current = C), A && (N.current = A), C && A) {
|
|
1494
1496
|
if (F.current)
|
|
1495
|
-
return F.current(
|
|
1496
|
-
|
|
1497
|
+
return F.current(C, A, K);
|
|
1498
|
+
K();
|
|
1497
1499
|
}
|
|
1498
|
-
}, [
|
|
1500
|
+
}, [C, A, K, F, L]);
|
|
1499
1501
|
const w = f.useMemo(() => ({
|
|
1500
1502
|
reference: k,
|
|
1501
1503
|
floating: N,
|
|
1502
1504
|
setReference: v,
|
|
1503
1505
|
setFloating: x
|
|
1504
|
-
}), [v, x]),
|
|
1505
|
-
reference:
|
|
1506
|
+
}), [v, x]), W = f.useMemo(() => ({
|
|
1507
|
+
reference: C,
|
|
1506
1508
|
floating: A
|
|
1507
|
-
}), [
|
|
1509
|
+
}), [C, A]), T = f.useMemo(() => {
|
|
1508
1510
|
const b = {
|
|
1509
1511
|
position: n,
|
|
1510
1512
|
left: 0,
|
|
1511
1513
|
top: 0
|
|
1512
1514
|
};
|
|
1513
|
-
if (!
|
|
1515
|
+
if (!W.floating)
|
|
1514
1516
|
return b;
|
|
1515
|
-
const E = wn(
|
|
1517
|
+
const E = wn(W.floating, l.x), P = wn(W.floating, l.y);
|
|
1516
1518
|
return c ? {
|
|
1517
1519
|
...b,
|
|
1518
|
-
transform: "translate(" + E + "px, " +
|
|
1519
|
-
...pr(
|
|
1520
|
+
transform: "translate(" + E + "px, " + P + "px)",
|
|
1521
|
+
...pr(W.floating) >= 1.5 && {
|
|
1520
1522
|
willChange: "transform"
|
|
1521
1523
|
}
|
|
1522
1524
|
} : {
|
|
1523
1525
|
position: n,
|
|
1524
1526
|
left: E,
|
|
1525
|
-
top:
|
|
1527
|
+
top: P
|
|
1526
1528
|
};
|
|
1527
|
-
}, [n, c,
|
|
1529
|
+
}, [n, c, W.floating, l.x, l.y]);
|
|
1528
1530
|
return f.useMemo(() => ({
|
|
1529
1531
|
...l,
|
|
1530
|
-
update:
|
|
1532
|
+
update: K,
|
|
1531
1533
|
refs: w,
|
|
1532
|
-
elements:
|
|
1534
|
+
elements: W,
|
|
1533
1535
|
floatingStyles: T
|
|
1534
|
-
}), [l,
|
|
1536
|
+
}), [l, K, w, W, T]);
|
|
1535
1537
|
}
|
|
1536
|
-
const
|
|
1537
|
-
...wo(e),
|
|
1538
|
-
options: [e, t]
|
|
1539
|
-
}), si = (e, t) => ({
|
|
1538
|
+
const li = (e, t) => ({
|
|
1540
1539
|
...Eo(e),
|
|
1541
1540
|
options: [e, t]
|
|
1542
|
-
}),
|
|
1541
|
+
}), ai = (e, t) => ({
|
|
1543
1542
|
...Io(e),
|
|
1544
1543
|
options: [e, t]
|
|
1545
|
-
}),
|
|
1546
|
-
...
|
|
1544
|
+
}), fi = (e, t) => ({
|
|
1545
|
+
...To(e),
|
|
1547
1546
|
options: [e, t]
|
|
1548
|
-
}),
|
|
1549
|
-
...
|
|
1547
|
+
}), di = (e, t) => ({
|
|
1548
|
+
...Oo(e),
|
|
1549
|
+
options: [e, t]
|
|
1550
|
+
}), mi = (e, t) => ({
|
|
1551
|
+
...Co(e),
|
|
1550
1552
|
options: [e, t]
|
|
1551
1553
|
});
|
|
1552
|
-
function
|
|
1554
|
+
function Do(e) {
|
|
1553
1555
|
const t = f.useRef(void 0), n = f.useCallback((r) => {
|
|
1554
1556
|
const o = e.map((s) => {
|
|
1555
1557
|
if (s != null) {
|
|
@@ -1572,7 +1574,7 @@ function Ao(e) {
|
|
|
1572
1574
|
t.current && (t.current(), t.current = void 0), r != null && (t.current = n(r));
|
|
1573
1575
|
}, e);
|
|
1574
1576
|
}
|
|
1575
|
-
function
|
|
1577
|
+
function ko(e, t) {
|
|
1576
1578
|
const n = e.compareDocumentPosition(t);
|
|
1577
1579
|
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
1580
|
}
|
|
@@ -1586,7 +1588,7 @@ const gr = /* @__PURE__ */ f.createContext({
|
|
|
1586
1588
|
current: []
|
|
1587
1589
|
}
|
|
1588
1590
|
});
|
|
1589
|
-
function
|
|
1591
|
+
function Lo(e) {
|
|
1590
1592
|
const {
|
|
1591
1593
|
children: t,
|
|
1592
1594
|
elementsRef: n,
|
|
@@ -1600,7 +1602,7 @@ function Po(e) {
|
|
|
1600
1602
|
});
|
|
1601
1603
|
}, []), a = f.useMemo(() => {
|
|
1602
1604
|
const u = /* @__PURE__ */ new Map();
|
|
1603
|
-
return Array.from(o.keys()).sort(
|
|
1605
|
+
return Array.from(o.keys()).sort(ko).forEach((p, g) => {
|
|
1604
1606
|
u.set(p, g);
|
|
1605
1607
|
}), u;
|
|
1606
1608
|
}, [o]);
|
|
@@ -1615,7 +1617,7 @@ function Po(e) {
|
|
|
1615
1617
|
children: t
|
|
1616
1618
|
});
|
|
1617
1619
|
}
|
|
1618
|
-
function
|
|
1620
|
+
function Fo(e) {
|
|
1619
1621
|
e === void 0 && (e = {});
|
|
1620
1622
|
const {
|
|
1621
1623
|
label: t
|
|
@@ -1646,7 +1648,7 @@ function So(e) {
|
|
|
1646
1648
|
index: c ?? -1
|
|
1647
1649
|
}), [c, l]);
|
|
1648
1650
|
}
|
|
1649
|
-
const
|
|
1651
|
+
const No = "data-floating-ui-focusable", Rn = "active", En = "selected", Ne = "ArrowLeft", _e = "ArrowRight", st = "ArrowUp", Fe = "ArrowDown";
|
|
1650
1652
|
function hr(e, t) {
|
|
1651
1653
|
return typeof e == "function" ? e(t) : e ? /* @__PURE__ */ f.cloneElement(e, t) : /* @__PURE__ */ ge("div", {
|
|
1652
1654
|
...t
|
|
@@ -1656,7 +1658,7 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1656
1658
|
activeIndex: 0,
|
|
1657
1659
|
onNavigate: () => {
|
|
1658
1660
|
}
|
|
1659
|
-
}), br = [
|
|
1661
|
+
}), br = [Ne, _e], yr = [st, Fe], Bt = [...br, ...yr], pi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1660
1662
|
const {
|
|
1661
1663
|
render: r,
|
|
1662
1664
|
orientation: o = "both",
|
|
@@ -1669,32 +1671,32 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1669
1671
|
itemSizes: p,
|
|
1670
1672
|
dense: g = !1,
|
|
1671
1673
|
...d
|
|
1672
|
-
} = t, [h, m] = f.useState(0), y = u ?? h, R =
|
|
1674
|
+
} = 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
1675
|
activeIndex: y,
|
|
1674
1676
|
onNavigate: R
|
|
1675
1677
|
}), [y, R]), A = c > 1;
|
|
1676
|
-
function k(
|
|
1677
|
-
if (!Bt.includes(
|
|
1678
|
+
function k(D) {
|
|
1679
|
+
if (!Bt.includes(D.key)) return;
|
|
1678
1680
|
let L = y;
|
|
1679
|
-
const F = yt(v, a), _ = en(v, a), U = i ?
|
|
1681
|
+
const F = yt(v, a), _ = en(v, a), U = i ? Ne : _e, K = i ? _e : Ne;
|
|
1680
1682
|
if (A) {
|
|
1681
1683
|
const b = p || Array.from({
|
|
1682
1684
|
length: v.current.length
|
|
1683
1685
|
}, () => ({
|
|
1684
1686
|
width: 1,
|
|
1685
1687
|
height: 1
|
|
1686
|
-
})), E = nr(b, c, g),
|
|
1687
|
-
current: E.map((
|
|
1688
|
+
})), E = nr(b, c, g), P = E.findIndex((V) => V != null && !He(v, V, a)), G = E.reduce((V, ee, ae) => ee != null && !He(v, ee, a) ? ae : V, -1), I = E[tr({
|
|
1689
|
+
current: E.map((V) => V ? v.current[V] : null)
|
|
1688
1690
|
}, {
|
|
1689
|
-
event:
|
|
1691
|
+
event: D,
|
|
1690
1692
|
orientation: o,
|
|
1691
1693
|
loop: s,
|
|
1692
1694
|
rtl: i,
|
|
1693
1695
|
cols: c,
|
|
1694
1696
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
1695
1697
|
// don't end up in them
|
|
1696
|
-
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((
|
|
1697
|
-
minIndex:
|
|
1698
|
+
disabledIndices: or([...(typeof a != "function" ? a : null) || v.current.map((V, ee) => He(v, ee, a) ? ee : void 0), void 0], E),
|
|
1699
|
+
minIndex: P,
|
|
1698
1700
|
maxIndex: G,
|
|
1699
1701
|
prevIndex: rr(
|
|
1700
1702
|
y > _ ? F : y,
|
|
@@ -1704,31 +1706,31 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1704
1706
|
// use a corner matching the edge closest to the direction we're
|
|
1705
1707
|
// moving in so we don't end up in the same item. Prefer
|
|
1706
1708
|
// top/left over bottom/right.
|
|
1707
|
-
|
|
1709
|
+
D.key === Fe ? "bl" : D.key === U ? "tr" : "tl"
|
|
1708
1710
|
)
|
|
1709
1711
|
})];
|
|
1710
|
-
|
|
1712
|
+
I != null && (L = I);
|
|
1711
1713
|
}
|
|
1712
1714
|
const O = {
|
|
1713
1715
|
horizontal: [U],
|
|
1714
|
-
vertical: [
|
|
1715
|
-
both: [U,
|
|
1716
|
+
vertical: [Fe],
|
|
1717
|
+
both: [U, Fe]
|
|
1716
1718
|
}[o], w = {
|
|
1717
|
-
horizontal: [
|
|
1719
|
+
horizontal: [K],
|
|
1718
1720
|
vertical: [st],
|
|
1719
|
-
both: [
|
|
1720
|
-
}[o],
|
|
1721
|
+
both: [K, st]
|
|
1722
|
+
}[o], W = A ? Bt : {
|
|
1721
1723
|
horizontal: br,
|
|
1722
1724
|
vertical: yr,
|
|
1723
1725
|
both: Bt
|
|
1724
1726
|
}[o];
|
|
1725
|
-
if (L === y && [...O, ...w].includes(
|
|
1727
|
+
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
1728
|
startingIndex: L,
|
|
1727
|
-
decrement: w.includes(
|
|
1729
|
+
decrement: w.includes(D.key),
|
|
1728
1730
|
disabledIndices: a
|
|
1729
1731
|
})), L !== y && !Ye(v, L)) {
|
|
1730
1732
|
var T;
|
|
1731
|
-
|
|
1733
|
+
D.stopPropagation(), W.includes(D.key) && D.preventDefault(), R(L), (T = v.current[L]) == null || T.focus();
|
|
1732
1734
|
}
|
|
1733
1735
|
}
|
|
1734
1736
|
const N = {
|
|
@@ -1736,18 +1738,18 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1736
1738
|
...x,
|
|
1737
1739
|
ref: n,
|
|
1738
1740
|
"aria-orientation": o === "both" ? void 0 : o,
|
|
1739
|
-
onKeyDown(
|
|
1740
|
-
d.onKeyDown == null || d.onKeyDown(
|
|
1741
|
+
onKeyDown(D) {
|
|
1742
|
+
d.onKeyDown == null || d.onKeyDown(D), x.onKeyDown == null || x.onKeyDown(D), k(D);
|
|
1741
1743
|
}
|
|
1742
1744
|
};
|
|
1743
1745
|
return /* @__PURE__ */ ge(vr.Provider, {
|
|
1744
|
-
value:
|
|
1745
|
-
children: /* @__PURE__ */ ge(
|
|
1746
|
+
value: C,
|
|
1747
|
+
children: /* @__PURE__ */ ge(Lo, {
|
|
1746
1748
|
elementsRef: v,
|
|
1747
1749
|
children: hr(r, N)
|
|
1748
1750
|
})
|
|
1749
1751
|
});
|
|
1750
|
-
}),
|
|
1752
|
+
}), gi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
1751
1753
|
const {
|
|
1752
1754
|
render: r,
|
|
1753
1755
|
...o
|
|
@@ -1757,7 +1759,7 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1757
1759
|
} = f.useContext(vr), {
|
|
1758
1760
|
ref: a,
|
|
1759
1761
|
index: u
|
|
1760
|
-
} =
|
|
1762
|
+
} = Fo(), l = Do([a, n, s.ref]), p = i === u, g = {
|
|
1761
1763
|
...o,
|
|
1762
1764
|
...s,
|
|
1763
1765
|
ref: l,
|
|
@@ -1768,24 +1770,24 @@ const vr = /* @__PURE__ */ f.createContext({
|
|
|
1768
1770
|
}
|
|
1769
1771
|
};
|
|
1770
1772
|
return hr(r, g);
|
|
1771
|
-
}),
|
|
1773
|
+
}), _o = {
|
|
1772
1774
|
...f
|
|
1773
1775
|
};
|
|
1774
|
-
let
|
|
1775
|
-
const
|
|
1776
|
+
let Cn = !1, Wo = 0;
|
|
1777
|
+
const In = () => (
|
|
1776
1778
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
1777
1779
|
// on <React 18
|
|
1778
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
1780
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Wo++
|
|
1779
1781
|
);
|
|
1780
|
-
function
|
|
1781
|
-
const [e, t] = f.useState(() =>
|
|
1782
|
+
function Ko() {
|
|
1783
|
+
const [e, t] = f.useState(() => Cn ? In() : void 0);
|
|
1782
1784
|
return X(() => {
|
|
1783
|
-
e == null && t(
|
|
1785
|
+
e == null && t(In());
|
|
1784
1786
|
}, []), f.useEffect(() => {
|
|
1785
|
-
|
|
1787
|
+
Cn = !0;
|
|
1786
1788
|
}, []), e;
|
|
1787
1789
|
}
|
|
1788
|
-
const
|
|
1790
|
+
const Vo = _o.useId, Lt = Vo || Ko;
|
|
1789
1791
|
let ct;
|
|
1790
1792
|
process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
|
|
1791
1793
|
function Ht() {
|
|
@@ -1797,7 +1799,7 @@ function Ht() {
|
|
|
1797
1799
|
(s = ct) == null || s.add(o), console.warn(o);
|
|
1798
1800
|
}
|
|
1799
1801
|
}
|
|
1800
|
-
function
|
|
1802
|
+
function $o() {
|
|
1801
1803
|
for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
1802
1804
|
n[r] = arguments[r];
|
|
1803
1805
|
const o = "Floating UI: " + n.join(" ");
|
|
@@ -1822,12 +1824,12 @@ function xr() {
|
|
|
1822
1824
|
}
|
|
1823
1825
|
};
|
|
1824
1826
|
}
|
|
1825
|
-
const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null),
|
|
1827
|
+
const wr = /* @__PURE__ */ f.createContext(null), Rr = /* @__PURE__ */ f.createContext(null), et = () => {
|
|
1826
1828
|
var e;
|
|
1827
1829
|
return ((e = f.useContext(wr)) == null ? void 0 : e.id) || null;
|
|
1828
|
-
},
|
|
1829
|
-
function
|
|
1830
|
-
const t = Lt(), n =
|
|
1830
|
+
}, tt = () => f.useContext(Rr);
|
|
1831
|
+
function hi(e) {
|
|
1832
|
+
const t = Lt(), n = tt(), o = et();
|
|
1831
1833
|
return X(() => {
|
|
1832
1834
|
if (!t) return;
|
|
1833
1835
|
const s = {
|
|
@@ -1839,11 +1841,11 @@ function di(e) {
|
|
|
1839
1841
|
};
|
|
1840
1842
|
}, [n, t, o]), t;
|
|
1841
1843
|
}
|
|
1842
|
-
function
|
|
1844
|
+
function vi(e) {
|
|
1843
1845
|
const {
|
|
1844
1846
|
children: t,
|
|
1845
1847
|
id: n
|
|
1846
|
-
} = e, r =
|
|
1848
|
+
} = e, r = et();
|
|
1847
1849
|
return /* @__PURE__ */ ge(wr.Provider, {
|
|
1848
1850
|
value: f.useMemo(() => ({
|
|
1849
1851
|
id: n,
|
|
@@ -1852,7 +1854,7 @@ function mi(e) {
|
|
|
1852
1854
|
children: t
|
|
1853
1855
|
});
|
|
1854
1856
|
}
|
|
1855
|
-
function
|
|
1857
|
+
function bi(e) {
|
|
1856
1858
|
const {
|
|
1857
1859
|
children: t
|
|
1858
1860
|
} = e, n = f.useRef([]), r = f.useCallback((i) => {
|
|
@@ -1870,13 +1872,13 @@ function pi(e) {
|
|
|
1870
1872
|
children: t
|
|
1871
1873
|
});
|
|
1872
1874
|
}
|
|
1873
|
-
function
|
|
1875
|
+
function Ge(e) {
|
|
1874
1876
|
return "data-floating-ui-" + e;
|
|
1875
1877
|
}
|
|
1876
1878
|
function ve(e) {
|
|
1877
1879
|
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
1878
1880
|
}
|
|
1879
|
-
const Tn = /* @__PURE__ */
|
|
1881
|
+
const Tn = /* @__PURE__ */ Ge("safe-polygon");
|
|
1880
1882
|
function zt(e, t, n) {
|
|
1881
1883
|
if (n && !it(n))
|
|
1882
1884
|
return 0;
|
|
@@ -1891,7 +1893,7 @@ function zt(e, t, n) {
|
|
|
1891
1893
|
function Ut(e) {
|
|
1892
1894
|
return typeof e == "function" ? e() : e;
|
|
1893
1895
|
}
|
|
1894
|
-
function
|
|
1896
|
+
function yi(e, t) {
|
|
1895
1897
|
t === void 0 && (t = {});
|
|
1896
1898
|
const {
|
|
1897
1899
|
open: n,
|
|
@@ -1906,8 +1908,8 @@ function gi(e, t) {
|
|
|
1906
1908
|
mouseOnly: l = !1,
|
|
1907
1909
|
restMs: p = 0,
|
|
1908
1910
|
move: g = !0
|
|
1909
|
-
} = t, d =
|
|
1910
|
-
}), F = f.useRef(!1), _ =
|
|
1911
|
+
} = 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(() => {
|
|
1912
|
+
}), F = f.useRef(!1), _ = se(() => {
|
|
1911
1913
|
var T;
|
|
1912
1914
|
const b = (T = o.current.openEvent) == null ? void 0 : T.type;
|
|
1913
1915
|
return (b == null ? void 0 : b.includes("mouse")) && b !== "mousedown";
|
|
@@ -1918,7 +1920,7 @@ function gi(e, t) {
|
|
|
1918
1920
|
let {
|
|
1919
1921
|
open: E
|
|
1920
1922
|
} = b;
|
|
1921
|
-
E || (ve(
|
|
1923
|
+
E || (ve(C), ve(k), N.current = !0, F.current = !1);
|
|
1922
1924
|
}
|
|
1923
1925
|
return s.on("openchange", T), () => {
|
|
1924
1926
|
s.off("openchange", T);
|
|
@@ -1928,104 +1930,104 @@ function gi(e, t) {
|
|
|
1928
1930
|
function T(E) {
|
|
1929
1931
|
_() && r(!1, E, "hover");
|
|
1930
1932
|
}
|
|
1931
|
-
const b =
|
|
1933
|
+
const b = le(i.floating).documentElement;
|
|
1932
1934
|
return b.addEventListener("mouseleave", T), () => {
|
|
1933
1935
|
b.removeEventListener("mouseleave", T);
|
|
1934
1936
|
};
|
|
1935
1937
|
}, [i.floating, n, r, c, m, _]);
|
|
1936
1938
|
const U = f.useCallback(function(T, b, E) {
|
|
1937
1939
|
b === void 0 && (b = !0), E === void 0 && (E = "hover");
|
|
1938
|
-
const
|
|
1939
|
-
|
|
1940
|
-
}, [y, r]),
|
|
1940
|
+
const P = zt(y.current, "close", x.current);
|
|
1941
|
+
P && !A.current ? (ve(C), C.current = window.setTimeout(() => r(!1, T, E), P)) : b && (ve(C), r(!1, T, E));
|
|
1942
|
+
}, [y, r]), K = se(() => {
|
|
1941
1943
|
L.current(), A.current = void 0;
|
|
1942
|
-
}), O =
|
|
1943
|
-
if (
|
|
1944
|
-
const T =
|
|
1945
|
-
T.style.pointerEvents = "", T.removeAttribute(Tn),
|
|
1944
|
+
}), O = se(() => {
|
|
1945
|
+
if (D.current) {
|
|
1946
|
+
const T = le(i.floating).body;
|
|
1947
|
+
T.style.pointerEvents = "", T.removeAttribute(Tn), D.current = !1;
|
|
1946
1948
|
}
|
|
1947
|
-
}), w =
|
|
1949
|
+
}), w = se(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
|
|
1948
1950
|
f.useEffect(() => {
|
|
1949
1951
|
if (!c) return;
|
|
1950
|
-
function T(
|
|
1951
|
-
if (ve(
|
|
1952
|
+
function T(I) {
|
|
1953
|
+
if (ve(C), N.current = !1, l && !it(x.current) || Ut(v.current) > 0 && !zt(y.current, "open"))
|
|
1952
1954
|
return;
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
R.current || r(!0,
|
|
1956
|
-
},
|
|
1955
|
+
const V = zt(y.current, "open", x.current);
|
|
1956
|
+
V ? C.current = window.setTimeout(() => {
|
|
1957
|
+
R.current || r(!0, I, "hover");
|
|
1958
|
+
}, V) : n || r(!0, I, "hover");
|
|
1957
1959
|
}
|
|
1958
|
-
function b(
|
|
1960
|
+
function b(I) {
|
|
1959
1961
|
if (w()) {
|
|
1960
1962
|
O();
|
|
1961
1963
|
return;
|
|
1962
1964
|
}
|
|
1963
1965
|
L.current();
|
|
1964
|
-
const
|
|
1966
|
+
const V = le(i.floating);
|
|
1965
1967
|
if (ve(k), F.current = !1, m.current && o.current.floatingContext) {
|
|
1966
|
-
n || ve(
|
|
1968
|
+
n || ve(C), A.current = m.current({
|
|
1967
1969
|
...o.current.floatingContext,
|
|
1968
1970
|
tree: d,
|
|
1969
|
-
x:
|
|
1970
|
-
y:
|
|
1971
|
+
x: I.clientX,
|
|
1972
|
+
y: I.clientY,
|
|
1971
1973
|
onClose() {
|
|
1972
|
-
O(),
|
|
1974
|
+
O(), K(), w() || U(I, !0, "safe-polygon");
|
|
1973
1975
|
}
|
|
1974
1976
|
});
|
|
1975
|
-
const
|
|
1976
|
-
|
|
1977
|
-
|
|
1977
|
+
const ae = A.current;
|
|
1978
|
+
V.addEventListener("mousemove", ae), L.current = () => {
|
|
1979
|
+
V.removeEventListener("mousemove", ae);
|
|
1978
1980
|
};
|
|
1979
1981
|
return;
|
|
1980
1982
|
}
|
|
1981
|
-
(x.current === "touch" ? !
|
|
1983
|
+
(x.current === "touch" ? !ce(i.floating, I.relatedTarget) : !0) && U(I);
|
|
1982
1984
|
}
|
|
1983
|
-
function E(
|
|
1985
|
+
function E(I) {
|
|
1984
1986
|
w() || o.current.floatingContext && (m.current == null || m.current({
|
|
1985
1987
|
...o.current.floatingContext,
|
|
1986
1988
|
tree: d,
|
|
1987
|
-
x:
|
|
1988
|
-
y:
|
|
1989
|
+
x: I.clientX,
|
|
1990
|
+
y: I.clientY,
|
|
1989
1991
|
onClose() {
|
|
1990
|
-
O(),
|
|
1992
|
+
O(), K(), w() || U(I);
|
|
1991
1993
|
}
|
|
1992
|
-
})(
|
|
1994
|
+
})(I));
|
|
1993
1995
|
}
|
|
1994
|
-
function
|
|
1995
|
-
ve(
|
|
1996
|
+
function P() {
|
|
1997
|
+
ve(C);
|
|
1996
1998
|
}
|
|
1997
|
-
function G(
|
|
1998
|
-
w() || U(
|
|
1999
|
+
function G(I) {
|
|
2000
|
+
w() || U(I, !1);
|
|
1999
2001
|
}
|
|
2000
2002
|
if (Y(i.domReference)) {
|
|
2001
|
-
const
|
|
2002
|
-
return n &&
|
|
2003
|
+
const I = i.domReference, V = i.floating;
|
|
2004
|
+
return n && I.addEventListener("mouseleave", E), g && I.addEventListener("mousemove", T, {
|
|
2003
2005
|
once: !0
|
|
2004
|
-
}),
|
|
2005
|
-
n &&
|
|
2006
|
+
}), I.addEventListener("mouseenter", T), I.addEventListener("mouseleave", b), V && (V.addEventListener("mouseleave", E), V.addEventListener("mouseenter", P), V.addEventListener("mouseleave", G)), () => {
|
|
2007
|
+
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", P), V.removeEventListener("mouseleave", G));
|
|
2006
2008
|
};
|
|
2007
2009
|
}
|
|
2008
|
-
}, [i, c, e, l, g, U,
|
|
2010
|
+
}, [i, c, e, l, g, U, K, O, r, n, R, d, y, m, o, w, v]), X(() => {
|
|
2009
2011
|
var T;
|
|
2010
2012
|
if (c && n && (T = m.current) != null && (T = T.__options) != null && T.blockPointerEvents && _()) {
|
|
2011
|
-
|
|
2013
|
+
D.current = !0;
|
|
2012
2014
|
const E = i.floating;
|
|
2013
2015
|
if (Y(i.domReference) && E) {
|
|
2014
2016
|
var b;
|
|
2015
|
-
const
|
|
2016
|
-
|
|
2017
|
-
const G = i.domReference,
|
|
2018
|
-
return
|
|
2019
|
-
|
|
2017
|
+
const P = le(i.floating).body;
|
|
2018
|
+
P.setAttribute(Tn, "");
|
|
2019
|
+
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;
|
|
2020
|
+
return I && (I.style.pointerEvents = ""), P.style.pointerEvents = "none", G.style.pointerEvents = "auto", E.style.pointerEvents = "auto", () => {
|
|
2021
|
+
P.style.pointerEvents = "", G.style.pointerEvents = "", E.style.pointerEvents = "";
|
|
2020
2022
|
};
|
|
2021
2023
|
}
|
|
2022
2024
|
}
|
|
2023
2025
|
}, [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
|
|
2026
|
+
n || (x.current = void 0, F.current = !1, K(), O());
|
|
2027
|
+
}, [n, K, O]), f.useEffect(() => () => {
|
|
2028
|
+
K(), ve(C), ve(k), O();
|
|
2029
|
+
}, [c, i.domReference, K, O]);
|
|
2030
|
+
const W = f.useMemo(() => {
|
|
2029
2031
|
function T(b) {
|
|
2030
2032
|
x.current = b.pointerType;
|
|
2031
2033
|
}
|
|
@@ -2036,19 +2038,19 @@ function gi(e, t) {
|
|
|
2036
2038
|
const {
|
|
2037
2039
|
nativeEvent: E
|
|
2038
2040
|
} = b;
|
|
2039
|
-
function
|
|
2041
|
+
function P() {
|
|
2040
2042
|
!N.current && !R.current && r(!0, E, "hover");
|
|
2041
2043
|
}
|
|
2042
|
-
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ?
|
|
2044
|
+
l && !it(x.current) || n || Ut(v.current) === 0 || F.current && b.movementX ** 2 + b.movementY ** 2 < 2 || (ve(k), x.current === "touch" ? P() : (F.current = !0, k.current = window.setTimeout(P, Ut(v.current))));
|
|
2043
2045
|
}
|
|
2044
2046
|
};
|
|
2045
2047
|
}, [l, r, n, R, v]);
|
|
2046
2048
|
return f.useMemo(() => c ? {
|
|
2047
|
-
reference:
|
|
2048
|
-
} : {}, [c,
|
|
2049
|
+
reference: W
|
|
2050
|
+
} : {}, [c, W]);
|
|
2049
2051
|
}
|
|
2050
2052
|
let On = 0;
|
|
2051
|
-
function
|
|
2053
|
+
function $e(e, t) {
|
|
2052
2054
|
t === void 0 && (t = {});
|
|
2053
2055
|
const {
|
|
2054
2056
|
preventScroll: n = !1,
|
|
@@ -2061,18 +2063,26 @@ function We(e, t) {
|
|
|
2061
2063
|
});
|
|
2062
2064
|
o ? s() : On = requestAnimationFrame(s);
|
|
2063
2065
|
}
|
|
2064
|
-
function
|
|
2066
|
+
function Bo(e) {
|
|
2065
2067
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
2066
2068
|
}
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
+
const Je = {
|
|
2070
|
+
inert: /* @__PURE__ */ new WeakMap(),
|
|
2071
|
+
"aria-hidden": /* @__PURE__ */ new WeakMap(),
|
|
2072
|
+
none: /* @__PURE__ */ new WeakMap()
|
|
2073
|
+
};
|
|
2074
|
+
function An(e) {
|
|
2075
|
+
return e === "inert" ? Je.inert : e === "aria-hidden" ? Je["aria-hidden"] : Je.none;
|
|
2076
|
+
}
|
|
2077
|
+
let gt = /* @__PURE__ */ new WeakSet(), ht = {}, Gt = 0;
|
|
2078
|
+
const Ho = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, Er = (e) => e && (e.host || Er(e.parentNode)), zo = (e, t) => t.map((n) => {
|
|
2069
2079
|
if (e.contains(n))
|
|
2070
2080
|
return n;
|
|
2071
2081
|
const r = Er(n);
|
|
2072
2082
|
return e.contains(r) ? r : null;
|
|
2073
2083
|
}).filter((n) => n != null);
|
|
2074
|
-
function
|
|
2075
|
-
const o = "data-floating-ui-inert", s = r ? "inert" : n ? "aria-hidden" : null, i =
|
|
2084
|
+
function Uo(e, t, n, r) {
|
|
2085
|
+
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
2086
|
ht[o] || (ht[o] = /* @__PURE__ */ new WeakMap());
|
|
2077
2087
|
const l = ht[o];
|
|
2078
2088
|
i.forEach(p), g(t), c.clear();
|
|
@@ -2081,26 +2091,26 @@ function $o(e, t, n, r) {
|
|
|
2081
2091
|
}
|
|
2082
2092
|
function g(d) {
|
|
2083
2093
|
!d || a.has(d) || [].forEach.call(d.children, (h) => {
|
|
2084
|
-
if (
|
|
2094
|
+
if (We(h) !== "script")
|
|
2085
2095
|
if (c.has(h))
|
|
2086
2096
|
g(h);
|
|
2087
2097
|
else {
|
|
2088
|
-
const m = s ? h.getAttribute(s) : null, y = m !== null && m !== "false", R =
|
|
2089
|
-
|
|
2098
|
+
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;
|
|
2099
|
+
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
2100
|
}
|
|
2091
2101
|
});
|
|
2092
2102
|
}
|
|
2093
2103
|
return Gt++, () => {
|
|
2094
2104
|
u.forEach((d) => {
|
|
2095
|
-
const h =
|
|
2096
|
-
|
|
2097
|
-
}), Gt--, Gt || (
|
|
2105
|
+
const h = An(s), y = (h.get(d) || 0) - 1, R = (l.get(d) || 0) - 1;
|
|
2106
|
+
h.set(d, y), l.set(d, R), y || (!gt.has(d) && s && d.removeAttribute(s), gt.delete(d)), R || d.removeAttribute(o);
|
|
2107
|
+
}), Gt--, Gt || (Je.inert = /* @__PURE__ */ new WeakMap(), Je["aria-hidden"] = /* @__PURE__ */ new WeakMap(), Je.none = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), ht = {});
|
|
2098
2108
|
};
|
|
2099
2109
|
}
|
|
2100
|
-
function
|
|
2110
|
+
function Mn(e, t, n) {
|
|
2101
2111
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2102
|
-
const r =
|
|
2103
|
-
return
|
|
2112
|
+
const r = Bo(e[0]).body;
|
|
2113
|
+
return Uo(e.concat(Array.from(r.querySelectorAll("[aria-live]"))), r, t, n);
|
|
2104
2114
|
}
|
|
2105
2115
|
const Ft = {
|
|
2106
2116
|
border: 0,
|
|
@@ -2125,20 +2135,20 @@ const Ft = {
|
|
|
2125
2135
|
// Role is only for VoiceOver
|
|
2126
2136
|
role: r,
|
|
2127
2137
|
"aria-hidden": r ? void 0 : !0,
|
|
2128
|
-
[
|
|
2138
|
+
[Ge("focus-guard")]: "",
|
|
2129
2139
|
style: Ft
|
|
2130
2140
|
};
|
|
2131
2141
|
return /* @__PURE__ */ ge("span", {
|
|
2132
2142
|
...t,
|
|
2133
2143
|
...s
|
|
2134
2144
|
});
|
|
2135
|
-
}),
|
|
2136
|
-
function
|
|
2145
|
+
}), Cr = /* @__PURE__ */ f.createContext(null), Pn = /* @__PURE__ */ Ge("portal");
|
|
2146
|
+
function Go(e) {
|
|
2137
2147
|
e === void 0 && (e = {});
|
|
2138
2148
|
const {
|
|
2139
2149
|
id: t,
|
|
2140
2150
|
root: n
|
|
2141
|
-
} = e, r = Lt(), o =
|
|
2151
|
+
} = e, r = Lt(), o = Ir(), [s, i] = f.useState(null), c = f.useRef(null);
|
|
2142
2152
|
return X(() => () => {
|
|
2143
2153
|
s == null || s.remove(), queueMicrotask(() => {
|
|
2144
2154
|
c.current = null;
|
|
@@ -2148,7 +2158,7 @@ function Bo(e) {
|
|
|
2148
2158
|
const a = t ? document.getElementById(t) : null;
|
|
2149
2159
|
if (!a) return;
|
|
2150
2160
|
const u = document.createElement("div");
|
|
2151
|
-
u.id = r, u.setAttribute(
|
|
2161
|
+
u.id = r, u.setAttribute(Pn, ""), a.appendChild(u), c.current = u, i(u);
|
|
2152
2162
|
}, [t, r]), X(() => {
|
|
2153
2163
|
if (n === null || !r || c.current) return;
|
|
2154
2164
|
let a = n || (o == null ? void 0 : o.portalNode);
|
|
@@ -2156,16 +2166,16 @@ function Bo(e) {
|
|
|
2156
2166
|
let u = null;
|
|
2157
2167
|
t && (u = document.createElement("div"), u.id = t, a.appendChild(u));
|
|
2158
2168
|
const l = document.createElement("div");
|
|
2159
|
-
l.id = r, l.setAttribute(
|
|
2169
|
+
l.id = r, l.setAttribute(Pn, ""), a = u || a, a.appendChild(l), c.current = l, i(l);
|
|
2160
2170
|
}, [t, n, r, o]), s;
|
|
2161
2171
|
}
|
|
2162
|
-
function
|
|
2172
|
+
function xi(e) {
|
|
2163
2173
|
const {
|
|
2164
2174
|
children: t,
|
|
2165
2175
|
id: n,
|
|
2166
2176
|
root: r,
|
|
2167
2177
|
preserveTabOrder: o = !0
|
|
2168
|
-
} = e, s =
|
|
2178
|
+
} = e, s = Go({
|
|
2169
2179
|
id: n,
|
|
2170
2180
|
root: r
|
|
2171
2181
|
}), [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 +2189,14 @@ function hi(e) {
|
|
|
2179
2189
|
if (!s || !o || g)
|
|
2180
2190
|
return;
|
|
2181
2191
|
function m(y) {
|
|
2182
|
-
s && ot(y) && (y.type === "focusin" ? vn :
|
|
2192
|
+
s && ot(y) && (y.type === "focusin" ? vn : Qr)(s);
|
|
2183
2193
|
}
|
|
2184
2194
|
return s.addEventListener("focusin", m, !0), s.addEventListener("focusout", m, !0), () => {
|
|
2185
2195
|
s.removeEventListener("focusin", m, !0), s.removeEventListener("focusout", m, !0);
|
|
2186
2196
|
};
|
|
2187
2197
|
}, [s, o, g]), f.useEffect(() => {
|
|
2188
2198
|
s && (d || vn(s));
|
|
2189
|
-
}, [d, s]), /* @__PURE__ */ Hn(
|
|
2199
|
+
}, [d, s]), /* @__PURE__ */ Hn(Cr.Provider, {
|
|
2190
2200
|
value: f.useMemo(() => ({
|
|
2191
2201
|
preserveTabOrder: o,
|
|
2192
2202
|
beforeOutsideRef: a,
|
|
@@ -2226,27 +2236,27 @@ function hi(e) {
|
|
|
2226
2236
|
})]
|
|
2227
2237
|
});
|
|
2228
2238
|
}
|
|
2229
|
-
const
|
|
2230
|
-
function
|
|
2239
|
+
const Ir = () => f.useContext(Cr);
|
|
2240
|
+
function Sn(e) {
|
|
2231
2241
|
return f.useMemo(() => (t) => {
|
|
2232
2242
|
e.forEach((n) => {
|
|
2233
2243
|
n && (n.current = t);
|
|
2234
2244
|
});
|
|
2235
2245
|
}, e);
|
|
2236
2246
|
}
|
|
2237
|
-
const
|
|
2238
|
-
let
|
|
2239
|
-
function
|
|
2240
|
-
|
|
2247
|
+
const jo = 20;
|
|
2248
|
+
let Be = [];
|
|
2249
|
+
function qo(e) {
|
|
2250
|
+
Be = Be.filter((t) => t.isConnected), e && We(e) !== "body" && (Be.push(e), Be.length > jo && (Be = Be.slice(-20)));
|
|
2241
2251
|
}
|
|
2242
|
-
function
|
|
2243
|
-
return
|
|
2252
|
+
function Dn() {
|
|
2253
|
+
return Be.slice().reverse().find((e) => e.isConnected);
|
|
2244
2254
|
}
|
|
2245
|
-
function
|
|
2255
|
+
function Yo(e) {
|
|
2246
2256
|
const t = lt();
|
|
2247
2257
|
return Bn(e, t) ? e : At(e, t)[0] || e;
|
|
2248
2258
|
}
|
|
2249
|
-
function
|
|
2259
|
+
function kn(e, t) {
|
|
2250
2260
|
var n;
|
|
2251
2261
|
if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog")))
|
|
2252
2262
|
return;
|
|
@@ -2256,7 +2266,7 @@ function Dn(e, t) {
|
|
|
2256
2266
|
}), i = e.getAttribute("tabindex");
|
|
2257
2267
|
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
2268
|
}
|
|
2259
|
-
const
|
|
2269
|
+
const Xo = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2260
2270
|
return /* @__PURE__ */ ge("button", {
|
|
2261
2271
|
...t,
|
|
2262
2272
|
type: "button",
|
|
@@ -2265,7 +2275,7 @@ const Go = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
|
2265
2275
|
style: Ft
|
|
2266
2276
|
});
|
|
2267
2277
|
});
|
|
2268
|
-
function
|
|
2278
|
+
function wi(e) {
|
|
2269
2279
|
const {
|
|
2270
2280
|
context: t,
|
|
2271
2281
|
children: n,
|
|
@@ -2289,147 +2299,147 @@ function vi(e) {
|
|
|
2289
2299
|
domReference: v,
|
|
2290
2300
|
floating: x
|
|
2291
2301
|
}
|
|
2292
|
-
} = t,
|
|
2293
|
-
var
|
|
2294
|
-
return (
|
|
2295
|
-
}), A =
|
|
2296
|
-
return
|
|
2297
|
-
}),
|
|
2298
|
-
const z =
|
|
2299
|
-
return _.current.map((
|
|
2302
|
+
} = t, C = se(() => {
|
|
2303
|
+
var H;
|
|
2304
|
+
return (H = R.current.floatingContext) == null ? void 0 : H.nodeId;
|
|
2305
|
+
}), 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), P = f.useRef(-1), G = w != null, I = It(x), V = se(function(H) {
|
|
2306
|
+
return H === void 0 && (H = I), H ? At(H, lt()) : [];
|
|
2307
|
+
}), ee = se((H) => {
|
|
2308
|
+
const z = V(H);
|
|
2309
|
+
return _.current.map(($) => v && $ === "reference" ? v : I && $ === "floating" ? I : z).filter(Boolean).flat();
|
|
2300
2310
|
});
|
|
2301
2311
|
f.useEffect(() => {
|
|
2302
2312
|
if (r || !u) return;
|
|
2303
|
-
function
|
|
2304
|
-
if (
|
|
2305
|
-
|
|
2306
|
-
const
|
|
2307
|
-
_.current[0] === "reference" &&
|
|
2313
|
+
function H($) {
|
|
2314
|
+
if ($.key === "Tab") {
|
|
2315
|
+
ce(I, Ee(le(I))) && V().length === 0 && !N && pe($);
|
|
2316
|
+
const B = ee(), oe = Pe($);
|
|
2317
|
+
_.current[0] === "reference" && oe === v && (pe($), $.shiftKey ? $e(B[B.length - 1]) : $e(B[1])), _.current[1] === "floating" && oe === I && $.shiftKey && (pe($), $e(B[0]));
|
|
2308
2318
|
}
|
|
2309
2319
|
}
|
|
2310
|
-
const z =
|
|
2311
|
-
return z.addEventListener("keydown",
|
|
2312
|
-
z.removeEventListener("keydown",
|
|
2320
|
+
const z = le(I);
|
|
2321
|
+
return z.addEventListener("keydown", H), () => {
|
|
2322
|
+
z.removeEventListener("keydown", H);
|
|
2313
2323
|
};
|
|
2314
|
-
}, [r, v,
|
|
2324
|
+
}, [r, v, I, u, _, N, V, ee]), f.useEffect(() => {
|
|
2315
2325
|
if (r || !x) return;
|
|
2316
|
-
function
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2326
|
+
function H(z) {
|
|
2327
|
+
const $ = Pe(z), oe = V().indexOf($);
|
|
2328
|
+
oe !== -1 && (P.current = oe);
|
|
2319
2329
|
}
|
|
2320
|
-
return x.addEventListener("focusin",
|
|
2321
|
-
x.removeEventListener("focusin",
|
|
2330
|
+
return x.addEventListener("focusin", H), () => {
|
|
2331
|
+
x.removeEventListener("focusin", H);
|
|
2322
2332
|
};
|
|
2323
|
-
}, [r, x,
|
|
2333
|
+
}, [r, x, V]), f.useEffect(() => {
|
|
2324
2334
|
if (r || !p) return;
|
|
2325
|
-
function
|
|
2335
|
+
function H() {
|
|
2326
2336
|
E.current = !0, setTimeout(() => {
|
|
2327
2337
|
E.current = !1;
|
|
2328
2338
|
});
|
|
2329
2339
|
}
|
|
2330
|
-
function z(
|
|
2331
|
-
const
|
|
2340
|
+
function z($) {
|
|
2341
|
+
const B = $.relatedTarget, oe = $.currentTarget, ne = Pe($);
|
|
2332
2342
|
queueMicrotask(() => {
|
|
2333
|
-
const
|
|
2334
|
-
var
|
|
2335
|
-
return
|
|
2336
|
-
}) || hn(O.nodesRef.current,
|
|
2337
|
-
var
|
|
2338
|
-
return [(
|
|
2343
|
+
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) => {
|
|
2344
|
+
var J, Re;
|
|
2345
|
+
return ce((J = q.context) == null ? void 0 : J.elements.floating, B) || ce((Re = q.context) == null ? void 0 : Re.elements.domReference, B);
|
|
2346
|
+
}) || hn(O.nodesRef.current, de).find((q) => {
|
|
2347
|
+
var J, Re, M;
|
|
2348
|
+
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
2349
|
})));
|
|
2340
|
-
if (
|
|
2341
|
-
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2350
|
+
if (oe === v && I && kn(I, _), a && oe !== v && !(ne != null && ne.isConnected) && Ee(le(I)) === le(I).body) {
|
|
2351
|
+
re(I) && I.focus();
|
|
2352
|
+
const q = P.current, J = V(), Re = J[q] || J[J.length - 1] || I;
|
|
2353
|
+
re(Re) && Re.focus();
|
|
2344
2354
|
}
|
|
2345
2355
|
if (R.current.insideReactTree) {
|
|
2346
2356
|
R.current.insideReactTree = !1;
|
|
2347
2357
|
return;
|
|
2348
2358
|
}
|
|
2349
|
-
(N || !u) &&
|
|
2350
|
-
|
|
2359
|
+
(N || !u) && B && me && !E.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
|
|
2360
|
+
B !== Dn() && (b.current = !0, m(!1, $, "focus-out"));
|
|
2351
2361
|
});
|
|
2352
2362
|
}
|
|
2353
|
-
if (x &&
|
|
2354
|
-
return v.addEventListener("focusout", z), v.addEventListener("pointerdown",
|
|
2355
|
-
v.removeEventListener("focusout", z), v.removeEventListener("pointerdown",
|
|
2363
|
+
if (x && re(v))
|
|
2364
|
+
return v.addEventListener("focusout", z), v.addEventListener("pointerdown", H), x.addEventListener("focusout", z), () => {
|
|
2365
|
+
v.removeEventListener("focusout", z), v.removeEventListener("pointerdown", H), x.removeEventListener("focusout", z);
|
|
2356
2366
|
};
|
|
2357
|
-
}, [r, v, x,
|
|
2358
|
-
const
|
|
2367
|
+
}, [r, v, x, I, u, O, w, m, p, a, V, N, C, _, R]);
|
|
2368
|
+
const ae = f.useRef(null), te = f.useRef(null), fe = Sn([ae, w == null ? void 0 : w.beforeInsideRef]), Ae = Sn([te, w == null ? void 0 : w.afterInsideRef]);
|
|
2359
2369
|
f.useEffect(() => {
|
|
2360
|
-
var
|
|
2370
|
+
var H, z;
|
|
2361
2371
|
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,
|
|
2372
|
+
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) => {
|
|
2373
|
+
var J;
|
|
2374
|
+
return (J = q.context) == null ? void 0 : J.elements.floating;
|
|
2375
|
+
}) : [], ne = (z = B.find((q) => {
|
|
2376
|
+
var J;
|
|
2377
|
+
return Zt(((J = q.context) == null ? void 0 : J.elements.domReference) || null);
|
|
2378
|
+
})) == 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
2379
|
return () => {
|
|
2370
|
-
|
|
2380
|
+
me();
|
|
2371
2381
|
};
|
|
2372
|
-
}, [r, v, x, u, _, w, N, L, F, O,
|
|
2373
|
-
if (r || !
|
|
2374
|
-
const
|
|
2382
|
+
}, [r, v, x, u, _, w, N, L, F, O, C, A]), X(() => {
|
|
2383
|
+
if (r || !re(I)) return;
|
|
2384
|
+
const H = le(I), z = Ee(H);
|
|
2375
2385
|
queueMicrotask(() => {
|
|
2376
|
-
const
|
|
2377
|
-
!k && !
|
|
2378
|
-
preventScroll:
|
|
2386
|
+
const $ = ee(I), B = U.current, oe = (typeof B == "number" ? $[B] : B.current) || I, ne = ce(I, z);
|
|
2387
|
+
!k && !ne && h && $e(oe, {
|
|
2388
|
+
preventScroll: oe === I
|
|
2379
2389
|
});
|
|
2380
2390
|
});
|
|
2381
|
-
}, [r, h,
|
|
2382
|
-
if (r || !
|
|
2383
|
-
const
|
|
2384
|
-
|
|
2385
|
-
function
|
|
2391
|
+
}, [r, h, I, k, ee, U]), X(() => {
|
|
2392
|
+
if (r || !I) return;
|
|
2393
|
+
const H = le(I), z = Ee(H);
|
|
2394
|
+
qo(z);
|
|
2395
|
+
function $(ne) {
|
|
2386
2396
|
let {
|
|
2387
|
-
reason:
|
|
2388
|
-
event:
|
|
2389
|
-
nested:
|
|
2390
|
-
} =
|
|
2391
|
-
if (["hover", "safe-polygon"].includes(
|
|
2392
|
-
if (
|
|
2397
|
+
reason: de,
|
|
2398
|
+
event: me,
|
|
2399
|
+
nested: q
|
|
2400
|
+
} = ne;
|
|
2401
|
+
if (["hover", "safe-polygon"].includes(de) && me.type === "mouseleave" && (b.current = !0), de === "outside-press")
|
|
2402
|
+
if (q)
|
|
2393
2403
|
b.current = !1;
|
|
2394
|
-
else if (Zn(
|
|
2404
|
+
else if (Zn(me) || er(me))
|
|
2395
2405
|
b.current = !1;
|
|
2396
2406
|
else {
|
|
2397
|
-
let
|
|
2407
|
+
let J = !1;
|
|
2398
2408
|
document.createElement("div").focus({
|
|
2399
2409
|
get preventScroll() {
|
|
2400
|
-
return
|
|
2410
|
+
return J = !0, !1;
|
|
2401
2411
|
}
|
|
2402
|
-
}),
|
|
2412
|
+
}), J ? b.current = !1 : b.current = !0;
|
|
2403
2413
|
}
|
|
2404
2414
|
}
|
|
2405
|
-
y.on("openchange",
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2408
|
-
function
|
|
2409
|
-
if (typeof
|
|
2410
|
-
const
|
|
2411
|
-
return
|
|
2415
|
+
y.on("openchange", $);
|
|
2416
|
+
const B = H.createElement("span");
|
|
2417
|
+
B.setAttribute("tabindex", "-1"), B.setAttribute("aria-hidden", "true"), Object.assign(B.style, Ft), G && v && v.insertAdjacentElement("afterend", B);
|
|
2418
|
+
function oe() {
|
|
2419
|
+
if (typeof K.current == "boolean") {
|
|
2420
|
+
const ne = v || Dn();
|
|
2421
|
+
return ne && ne.isConnected ? ne : B;
|
|
2412
2422
|
}
|
|
2413
|
-
return
|
|
2423
|
+
return K.current.current || B;
|
|
2414
2424
|
}
|
|
2415
2425
|
return () => {
|
|
2416
|
-
y.off("openchange",
|
|
2417
|
-
const
|
|
2418
|
-
var
|
|
2419
|
-
return
|
|
2420
|
-
}),
|
|
2426
|
+
y.off("openchange", $);
|
|
2427
|
+
const ne = Ee(H), de = ce(x, ne) || O && qe(O.nodesRef.current, C()).some((q) => {
|
|
2428
|
+
var J;
|
|
2429
|
+
return ce((J = q.context) == null ? void 0 : J.elements.floating, ne);
|
|
2430
|
+
}), me = oe();
|
|
2421
2431
|
queueMicrotask(() => {
|
|
2422
|
-
const
|
|
2432
|
+
const q = Yo(me);
|
|
2423
2433
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2424
|
-
|
|
2434
|
+
K.current && !b.current && re(q) && // If the focus moved somewhere else after mount, avoid returning focus
|
|
2425
2435
|
// since it likely entered a different element which should be
|
|
2426
2436
|
// respected: https://github.com/floating-ui/floating-ui/issues/2607
|
|
2427
|
-
(!(
|
|
2437
|
+
(!(q !== ne && ne !== H.body) || de) && q.focus({
|
|
2428
2438
|
preventScroll: !0
|
|
2429
|
-
}),
|
|
2439
|
+
}), B.remove();
|
|
2430
2440
|
});
|
|
2431
2441
|
};
|
|
2432
|
-
}, [r, x,
|
|
2442
|
+
}, [r, x, I, K, R, y, O, G, v, C]), f.useEffect(() => {
|
|
2433
2443
|
queueMicrotask(() => {
|
|
2434
2444
|
b.current = !1;
|
|
2435
2445
|
});
|
|
@@ -2445,43 +2455,43 @@ function vi(e) {
|
|
|
2445
2455
|
w.setFocusManagerState(null);
|
|
2446
2456
|
};
|
|
2447
2457
|
}, [r, w, u, h, m, p, v]), X(() => {
|
|
2448
|
-
r ||
|
|
2449
|
-
}, [r,
|
|
2450
|
-
function Ke(
|
|
2451
|
-
return r || !l || !u ? null : /* @__PURE__ */ ge(
|
|
2452
|
-
ref:
|
|
2458
|
+
r || I && kn(I, _);
|
|
2459
|
+
}, [r, I, _]);
|
|
2460
|
+
function Ke(H) {
|
|
2461
|
+
return r || !l || !u ? null : /* @__PURE__ */ ge(Xo, {
|
|
2462
|
+
ref: H === "start" ? W : T,
|
|
2453
2463
|
onClick: (z) => m(!1, z.nativeEvent),
|
|
2454
2464
|
children: typeof l == "string" ? l : "Dismiss"
|
|
2455
2465
|
});
|
|
2456
2466
|
}
|
|
2457
|
-
const
|
|
2467
|
+
const Me = !r && L && (u ? !N : !0) && (G || u);
|
|
2458
2468
|
return /* @__PURE__ */ Hn(Ar, {
|
|
2459
|
-
children: [
|
|
2469
|
+
children: [Me && /* @__PURE__ */ ge(Ot, {
|
|
2460
2470
|
"data-type": "inside",
|
|
2461
|
-
ref:
|
|
2462
|
-
onFocus: (
|
|
2471
|
+
ref: fe,
|
|
2472
|
+
onFocus: (H) => {
|
|
2463
2473
|
if (u) {
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2474
|
+
const $ = ee();
|
|
2475
|
+
$e(o[0] === "reference" ? $[0] : $[$.length - 1]);
|
|
2466
2476
|
} else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2467
|
-
if (b.current = !1, ot(
|
|
2468
|
-
const
|
|
2469
|
-
|
|
2477
|
+
if (b.current = !1, ot(H, w.portalNode)) {
|
|
2478
|
+
const $ = sr(v);
|
|
2479
|
+
$ == null || $.focus();
|
|
2470
2480
|
} else {
|
|
2471
2481
|
var z;
|
|
2472
2482
|
(z = w.beforeOutsideRef.current) == null || z.focus();
|
|
2473
2483
|
}
|
|
2474
2484
|
}
|
|
2475
|
-
}), !N && Ke("start"), n, Ke("end"),
|
|
2485
|
+
}), !N && Ke("start"), n, Ke("end"), Me && /* @__PURE__ */ ge(Ot, {
|
|
2476
2486
|
"data-type": "inside",
|
|
2477
|
-
ref:
|
|
2478
|
-
onFocus: (
|
|
2487
|
+
ref: Ae,
|
|
2488
|
+
onFocus: (H) => {
|
|
2479
2489
|
if (u)
|
|
2480
|
-
|
|
2490
|
+
$e(ee()[0]);
|
|
2481
2491
|
else if (w != null && w.preserveTabOrder && w.portalNode)
|
|
2482
|
-
if (p && (b.current = !0), ot(
|
|
2483
|
-
const
|
|
2484
|
-
|
|
2492
|
+
if (p && (b.current = !0), ot(H, w.portalNode)) {
|
|
2493
|
+
const $ = cr(v);
|
|
2494
|
+
$ == null || $.focus();
|
|
2485
2495
|
} else {
|
|
2486
2496
|
var z;
|
|
2487
2497
|
(z = w.afterOutsideRef.current) == null || z.focus();
|
|
@@ -2491,11 +2501,11 @@ function vi(e) {
|
|
|
2491
2501
|
});
|
|
2492
2502
|
}
|
|
2493
2503
|
let vt = 0;
|
|
2494
|
-
const
|
|
2495
|
-
function
|
|
2504
|
+
const Ln = "--floating-ui-scrollbar-width";
|
|
2505
|
+
function Jo() {
|
|
2496
2506
|
const e = rn(), t = /iP(hone|ad|od)|iOS/.test(e) || // iPads can claim to be MacIntel
|
|
2497
2507
|
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(
|
|
2508
|
+
if (n.overflow = "hidden", n.setProperty(Ln, s + "px"), s && (n[o] = s + "px"), t) {
|
|
2499
2509
|
var a, u;
|
|
2500
2510
|
const l = ((a = window.visualViewport) == null ? void 0 : a.offsetLeft) || 0, p = ((u = window.visualViewport) == null ? void 0 : u.offsetTop) || 0;
|
|
2501
2511
|
Object.assign(n, {
|
|
@@ -2509,7 +2519,7 @@ function jo() {
|
|
|
2509
2519
|
Object.assign(n, {
|
|
2510
2520
|
overflow: "",
|
|
2511
2521
|
[o]: ""
|
|
2512
|
-
}), n.removeProperty(
|
|
2522
|
+
}), n.removeProperty(Ln), t && (Object.assign(n, {
|
|
2513
2523
|
position: "",
|
|
2514
2524
|
top: "",
|
|
2515
2525
|
left: "",
|
|
@@ -2517,17 +2527,17 @@ function jo() {
|
|
|
2517
2527
|
}), window.scrollTo(i, c));
|
|
2518
2528
|
};
|
|
2519
2529
|
}
|
|
2520
|
-
let
|
|
2530
|
+
let Fn = () => {
|
|
2521
2531
|
};
|
|
2522
|
-
const
|
|
2532
|
+
const Ri = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
2523
2533
|
const {
|
|
2524
2534
|
lockScroll: r = !1,
|
|
2525
2535
|
...o
|
|
2526
2536
|
} = t;
|
|
2527
2537
|
return X(() => {
|
|
2528
2538
|
if (r)
|
|
2529
|
-
return vt++, vt === 1 && (
|
|
2530
|
-
vt--, vt === 0 &&
|
|
2539
|
+
return vt++, vt === 1 && (Fn = Jo()), () => {
|
|
2540
|
+
vt--, vt === 0 && Fn();
|
|
2531
2541
|
};
|
|
2532
2542
|
}, [r]), /* @__PURE__ */ ge("div", {
|
|
2533
2543
|
ref: n,
|
|
@@ -2543,16 +2553,16 @@ const bi = /* @__PURE__ */ f.forwardRef(function(t, n) {
|
|
|
2543
2553
|
}
|
|
2544
2554
|
});
|
|
2545
2555
|
});
|
|
2546
|
-
function
|
|
2547
|
-
return
|
|
2556
|
+
function Nn(e) {
|
|
2557
|
+
return re(e.target) && e.target.tagName === "BUTTON";
|
|
2548
2558
|
}
|
|
2549
|
-
function
|
|
2550
|
-
return
|
|
2559
|
+
function Qo(e) {
|
|
2560
|
+
return re(e.target) && e.target.tagName === "A";
|
|
2551
2561
|
}
|
|
2552
|
-
function
|
|
2562
|
+
function _n(e) {
|
|
2553
2563
|
return on(e);
|
|
2554
2564
|
}
|
|
2555
|
-
function
|
|
2565
|
+
function Ei(e, t) {
|
|
2556
2566
|
t === void 0 && (t = {});
|
|
2557
2567
|
const {
|
|
2558
2568
|
open: n,
|
|
@@ -2585,32 +2595,32 @@ function yi(e, t) {
|
|
|
2585
2595
|
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
2596
|
},
|
|
2587
2597
|
onKeyDown(m) {
|
|
2588
|
-
g.current = void 0, !(m.defaultPrevented || !l ||
|
|
2598
|
+
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
2599
|
},
|
|
2590
2600
|
onKeyUp(m) {
|
|
2591
|
-
m.defaultPrevented || !l ||
|
|
2601
|
+
m.defaultPrevented || !l || Nn(m) || _n(s) || m.key === " " && d.current && (d.current = !1, r(!(n && a), m.nativeEvent, "click"));
|
|
2592
2602
|
}
|
|
2593
2603
|
}), [o, s, c, u, l, r, n, p, a]);
|
|
2594
2604
|
return f.useMemo(() => i ? {
|
|
2595
2605
|
reference: h
|
|
2596
2606
|
} : {}, [i, h]);
|
|
2597
2607
|
}
|
|
2598
|
-
const
|
|
2608
|
+
const Zo = {
|
|
2599
2609
|
pointerdown: "onPointerDown",
|
|
2600
2610
|
mousedown: "onMouseDown",
|
|
2601
2611
|
click: "onClick"
|
|
2602
|
-
},
|
|
2612
|
+
}, ei = {
|
|
2603
2613
|
pointerdown: "onPointerDownCapture",
|
|
2604
2614
|
mousedown: "onMouseDownCapture",
|
|
2605
2615
|
click: "onClickCapture"
|
|
2606
|
-
},
|
|
2616
|
+
}, Wn = (e) => {
|
|
2607
2617
|
var t, n;
|
|
2608
2618
|
return {
|
|
2609
2619
|
escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
|
|
2610
2620
|
outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
|
|
2611
2621
|
};
|
|
2612
2622
|
};
|
|
2613
|
-
function
|
|
2623
|
+
function Ci(e, t) {
|
|
2614
2624
|
t === void 0 && (t = {});
|
|
2615
2625
|
const {
|
|
2616
2626
|
open: n,
|
|
@@ -2627,22 +2637,22 @@ function xi(e, t) {
|
|
|
2627
2637
|
ancestorScroll: g = !1,
|
|
2628
2638
|
bubbles: d,
|
|
2629
2639
|
capture: h
|
|
2630
|
-
} = t, m =
|
|
2640
|
+
} = t, m = tt(), y = se(typeof a == "function" ? a : () => !1), R = typeof a == "function" ? y : a, v = f.useRef(!1), {
|
|
2631
2641
|
escapeKey: x,
|
|
2632
|
-
outsidePress:
|
|
2633
|
-
} =
|
|
2642
|
+
outsidePress: C
|
|
2643
|
+
} = Wn(d), {
|
|
2634
2644
|
escapeKey: A,
|
|
2635
2645
|
outsidePress: k
|
|
2636
|
-
} =
|
|
2637
|
-
var
|
|
2646
|
+
} = Wn(h), N = f.useRef(!1), D = f.useRef(-1), L = se((w) => {
|
|
2647
|
+
var W;
|
|
2638
2648
|
if (!n || !i || !c || w.key !== "Escape" || N.current)
|
|
2639
2649
|
return;
|
|
2640
|
-
const T = (
|
|
2650
|
+
const T = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, b = m ? qe(m.nodesRef.current, T) : [];
|
|
2641
2651
|
if (!x && (w.stopPropagation(), b.length > 0)) {
|
|
2642
2652
|
let E = !0;
|
|
2643
|
-
if (b.forEach((
|
|
2653
|
+
if (b.forEach((P) => {
|
|
2644
2654
|
var G;
|
|
2645
|
-
if ((G =
|
|
2655
|
+
if ((G = P.context) != null && G.open && !P.context.dataRef.current.__escapeKeyBubbles) {
|
|
2646
2656
|
E = !1;
|
|
2647
2657
|
return;
|
|
2648
2658
|
}
|
|
@@ -2650,50 +2660,50 @@ function xi(e, t) {
|
|
|
2650
2660
|
return;
|
|
2651
2661
|
}
|
|
2652
2662
|
r(!1, Gr(w) ? w.nativeEvent : w, "escape-key");
|
|
2653
|
-
}), F =
|
|
2654
|
-
var
|
|
2663
|
+
}), F = se((w) => {
|
|
2664
|
+
var W;
|
|
2655
2665
|
const T = () => {
|
|
2656
2666
|
var b;
|
|
2657
|
-
L(w), (b =
|
|
2667
|
+
L(w), (b = Pe(w)) == null || b.removeEventListener("keydown", T);
|
|
2658
2668
|
};
|
|
2659
|
-
(
|
|
2660
|
-
}), _ =
|
|
2661
|
-
var
|
|
2669
|
+
(W = Pe(w)) == null || W.addEventListener("keydown", T);
|
|
2670
|
+
}), _ = se((w) => {
|
|
2671
|
+
var W;
|
|
2662
2672
|
const T = s.current.insideReactTree;
|
|
2663
2673
|
s.current.insideReactTree = !1;
|
|
2664
2674
|
const b = v.current;
|
|
2665
2675
|
if (v.current = !1, u === "click" && b || T || typeof R == "function" && !R(w))
|
|
2666
2676
|
return;
|
|
2667
|
-
const E =
|
|
2668
|
-
let
|
|
2669
|
-
for (;
|
|
2670
|
-
const te =
|
|
2671
|
-
if (
|
|
2677
|
+
const E = Pe(w), P = "[" + Ge("inert") + "]", G = le(o.floating).querySelectorAll(P);
|
|
2678
|
+
let I = Y(E) ? E : null;
|
|
2679
|
+
for (; I && !Se(I); ) {
|
|
2680
|
+
const te = De(I);
|
|
2681
|
+
if (Se(te) || !Y(te))
|
|
2672
2682
|
break;
|
|
2673
|
-
|
|
2683
|
+
I = te;
|
|
2674
2684
|
}
|
|
2675
2685
|
if (G.length && Y(E) && !Hr(E) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2676
|
-
!
|
|
2686
|
+
!ce(E, o.floating) && // If the target root element contains none of the markers, then the
|
|
2677
2687
|
// element was injected after the floating element rendered.
|
|
2678
|
-
Array.from(G).every((te) => !
|
|
2688
|
+
Array.from(G).every((te) => !ce(I, te)))
|
|
2679
2689
|
return;
|
|
2680
|
-
if (
|
|
2681
|
-
const te =
|
|
2682
|
-
if (
|
|
2690
|
+
if (re(E) && O) {
|
|
2691
|
+
const te = Se(E), fe = we(E), Ae = /auto|scroll/, Ke = te || Ae.test(fe.overflowX), Me = te || Ae.test(fe.overflowY), H = Ke && 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;
|
|
2692
|
+
if (B || oe)
|
|
2683
2693
|
return;
|
|
2684
2694
|
}
|
|
2685
|
-
const
|
|
2686
|
-
var
|
|
2687
|
-
return
|
|
2695
|
+
const V = (W = s.current.floatingContext) == null ? void 0 : W.nodeId, ee = m && qe(m.nodesRef.current, V).some((te) => {
|
|
2696
|
+
var fe;
|
|
2697
|
+
return Kt(w, (fe = te.context) == null ? void 0 : fe.elements.floating);
|
|
2688
2698
|
});
|
|
2689
|
-
if (
|
|
2699
|
+
if (Kt(w, o.floating) || Kt(w, o.domReference) || ee)
|
|
2690
2700
|
return;
|
|
2691
|
-
const
|
|
2692
|
-
if (
|
|
2701
|
+
const ae = m ? qe(m.nodesRef.current, V) : [];
|
|
2702
|
+
if (ae.length > 0) {
|
|
2693
2703
|
let te = !0;
|
|
2694
|
-
if (
|
|
2695
|
-
var
|
|
2696
|
-
if ((
|
|
2704
|
+
if (ae.forEach((fe) => {
|
|
2705
|
+
var Ae;
|
|
2706
|
+
if ((Ae = fe.context) != null && Ae.open && !fe.context.dataRef.current.__outsidePressBubbles) {
|
|
2697
2707
|
te = !1;
|
|
2698
2708
|
return;
|
|
2699
2709
|
}
|
|
@@ -2701,20 +2711,20 @@ function xi(e, t) {
|
|
|
2701
2711
|
return;
|
|
2702
2712
|
}
|
|
2703
2713
|
r(!1, w, "outside-press");
|
|
2704
|
-
}), U =
|
|
2705
|
-
var
|
|
2714
|
+
}), U = se((w) => {
|
|
2715
|
+
var W;
|
|
2706
2716
|
const T = () => {
|
|
2707
2717
|
var b;
|
|
2708
|
-
_(w), (b =
|
|
2718
|
+
_(w), (b = Pe(w)) == null || b.removeEventListener(u, T);
|
|
2709
2719
|
};
|
|
2710
|
-
(
|
|
2720
|
+
(W = Pe(w)) == null || W.addEventListener(u, T);
|
|
2711
2721
|
});
|
|
2712
2722
|
f.useEffect(() => {
|
|
2713
2723
|
if (!n || !i)
|
|
2714
2724
|
return;
|
|
2715
|
-
s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles =
|
|
2725
|
+
s.current.__escapeKeyBubbles = x, s.current.__outsidePressBubbles = C;
|
|
2716
2726
|
let w = -1;
|
|
2717
|
-
function
|
|
2727
|
+
function W(G) {
|
|
2718
2728
|
r(!1, G, "ancestor-scroll");
|
|
2719
2729
|
}
|
|
2720
2730
|
function T() {
|
|
@@ -2730,28 +2740,28 @@ function xi(e, t) {
|
|
|
2730
2740
|
St() ? 5 : 0
|
|
2731
2741
|
);
|
|
2732
2742
|
}
|
|
2733
|
-
const E =
|
|
2743
|
+
const E = le(o.floating);
|
|
2734
2744
|
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",
|
|
2745
|
+
let P = [];
|
|
2746
|
+
return g && (Y(o.domReference) && (P = Le(o.domReference)), Y(o.floating) && (P = P.concat(Le(o.floating))), !Y(o.reference) && o.reference && o.reference.contextElement && (P = P.concat(Le(o.reference.contextElement)))), P = P.filter((G) => {
|
|
2747
|
+
var I;
|
|
2748
|
+
return G !== ((I = E.defaultView) == null ? void 0 : I.visualViewport);
|
|
2749
|
+
}), P.forEach((G) => {
|
|
2750
|
+
G.addEventListener("scroll", W, {
|
|
2741
2751
|
passive: !0
|
|
2742
2752
|
});
|
|
2743
2753
|
}), () => {
|
|
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",
|
|
2754
|
+
c && (E.removeEventListener("keydown", A ? F : L, A), E.removeEventListener("compositionstart", T), E.removeEventListener("compositionend", b)), R && E.removeEventListener(u, k ? U : _, k), P.forEach((G) => {
|
|
2755
|
+
G.removeEventListener("scroll", W);
|
|
2746
2756
|
}), window.clearTimeout(w);
|
|
2747
2757
|
};
|
|
2748
|
-
}, [s, o, c, R, u, n, r, g, i, x,
|
|
2758
|
+
}, [s, o, c, R, u, n, r, g, i, x, C, L, A, F, _, k, U]), f.useEffect(() => {
|
|
2749
2759
|
s.current.insideReactTree = !1;
|
|
2750
2760
|
}, [s, R, u]);
|
|
2751
|
-
const
|
|
2761
|
+
const K = f.useMemo(() => ({
|
|
2752
2762
|
onKeyDown: L,
|
|
2753
2763
|
...l && {
|
|
2754
|
-
[
|
|
2764
|
+
[Zo[p]]: (w) => {
|
|
2755
2765
|
r(!1, w.nativeEvent, "reference-press");
|
|
2756
2766
|
},
|
|
2757
2767
|
...p !== "click" && {
|
|
@@ -2768,31 +2778,31 @@ function xi(e, t) {
|
|
|
2768
2778
|
onMouseUp() {
|
|
2769
2779
|
v.current = !0;
|
|
2770
2780
|
},
|
|
2771
|
-
[
|
|
2781
|
+
[ei[u]]: () => {
|
|
2772
2782
|
s.current.insideReactTree = !0;
|
|
2773
2783
|
},
|
|
2774
2784
|
onBlurCapture() {
|
|
2775
|
-
m || (ve(
|
|
2785
|
+
m || (ve(D), s.current.insideReactTree = !0, D.current = window.setTimeout(() => {
|
|
2776
2786
|
s.current.insideReactTree = !1;
|
|
2777
2787
|
}));
|
|
2778
2788
|
}
|
|
2779
2789
|
}), [L, u, s, m]);
|
|
2780
2790
|
return f.useMemo(() => i ? {
|
|
2781
|
-
reference:
|
|
2791
|
+
reference: K,
|
|
2782
2792
|
floating: O
|
|
2783
|
-
} : {}, [i,
|
|
2793
|
+
} : {}, [i, K, O]);
|
|
2784
2794
|
}
|
|
2785
|
-
function
|
|
2795
|
+
function ti(e) {
|
|
2786
2796
|
const {
|
|
2787
2797
|
open: t = !1,
|
|
2788
2798
|
onOpenChange: n,
|
|
2789
2799
|
elements: r
|
|
2790
|
-
} = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c =
|
|
2800
|
+
} = e, o = Lt(), s = f.useRef({}), [i] = f.useState(() => xr()), c = et() != null;
|
|
2791
2801
|
if (process.env.NODE_ENV !== "production") {
|
|
2792
2802
|
const d = r.reference;
|
|
2793
|
-
d && !Y(d) &&
|
|
2803
|
+
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
2804
|
}
|
|
2795
|
-
const [a, u] = f.useState(r.reference), l =
|
|
2805
|
+
const [a, u] = f.useState(r.reference), l = se((d, h, m) => {
|
|
2796
2806
|
s.current.openEvent = d ? h : void 0, i.emit("openchange", {
|
|
2797
2807
|
open: d,
|
|
2798
2808
|
event: h,
|
|
@@ -2816,22 +2826,22 @@ function Jo(e) {
|
|
|
2816
2826
|
refs: p
|
|
2817
2827
|
}), [t, l, g, i, o, p]);
|
|
2818
2828
|
}
|
|
2819
|
-
function
|
|
2829
|
+
function Ii(e) {
|
|
2820
2830
|
e === void 0 && (e = {});
|
|
2821
2831
|
const {
|
|
2822
2832
|
nodeId: t
|
|
2823
|
-
} = e, n =
|
|
2833
|
+
} = e, n = ti({
|
|
2824
2834
|
...e,
|
|
2825
2835
|
elements: {
|
|
2826
2836
|
reference: null,
|
|
2827
2837
|
floating: null,
|
|
2828
2838
|
...e.elements
|
|
2829
2839
|
}
|
|
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 =
|
|
2840
|
+
}), 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
2841
|
X(() => {
|
|
2832
2842
|
l && (p.current = l);
|
|
2833
2843
|
}, [l]);
|
|
2834
|
-
const d =
|
|
2844
|
+
const d = So({
|
|
2835
2845
|
...e,
|
|
2836
2846
|
elements: {
|
|
2837
2847
|
...o,
|
|
@@ -2840,12 +2850,12 @@ function wi(e) {
|
|
|
2840
2850
|
}
|
|
2841
2851
|
}
|
|
2842
2852
|
}), h = f.useCallback((x) => {
|
|
2843
|
-
const
|
|
2853
|
+
const C = Y(x) ? {
|
|
2844
2854
|
getBoundingClientRect: () => x.getBoundingClientRect(),
|
|
2845
2855
|
getClientRects: () => x.getClientRects(),
|
|
2846
2856
|
contextElement: x
|
|
2847
2857
|
} : x;
|
|
2848
|
-
a(
|
|
2858
|
+
a(C), d.refs.setReference(C);
|
|
2849
2859
|
}, [d.refs]), m = f.useCallback((x) => {
|
|
2850
2860
|
(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
2861
|
// `null` to support `positionReference` + an unstable `reference`
|
|
@@ -2868,7 +2878,7 @@ function wi(e) {
|
|
|
2868
2878
|
}), [d, y, R, t, r]);
|
|
2869
2879
|
return X(() => {
|
|
2870
2880
|
r.dataRef.current.floatingContext = v;
|
|
2871
|
-
const x = g == null ? void 0 : g.nodesRef.current.find((
|
|
2881
|
+
const x = g == null ? void 0 : g.nodesRef.current.find((C) => C.id === t);
|
|
2872
2882
|
x && (x.context = v);
|
|
2873
2883
|
}), f.useMemo(() => ({
|
|
2874
2884
|
...d,
|
|
@@ -2878,9 +2888,9 @@ function wi(e) {
|
|
|
2878
2888
|
}), [d, y, R, v]);
|
|
2879
2889
|
}
|
|
2880
2890
|
function jt() {
|
|
2881
|
-
return
|
|
2891
|
+
return Kr() && Jn();
|
|
2882
2892
|
}
|
|
2883
|
-
function
|
|
2893
|
+
function Ti(e, t) {
|
|
2884
2894
|
t === void 0 && (t = {});
|
|
2885
2895
|
const {
|
|
2886
2896
|
open: n,
|
|
@@ -2896,7 +2906,7 @@ function Ri(e, t) {
|
|
|
2896
2906
|
if (!c) return;
|
|
2897
2907
|
const d = he(i.domReference);
|
|
2898
2908
|
function h() {
|
|
2899
|
-
!n &&
|
|
2909
|
+
!n && re(i.domReference) && i.domReference === Ee(le(i.domReference)) && (u.current = !0);
|
|
2900
2910
|
}
|
|
2901
2911
|
function m() {
|
|
2902
2912
|
p.current = !0;
|
|
@@ -2927,7 +2937,7 @@ function Ri(e, t) {
|
|
|
2927
2937
|
},
|
|
2928
2938
|
onFocus(d) {
|
|
2929
2939
|
if (u.current) return;
|
|
2930
|
-
const h =
|
|
2940
|
+
const h = Pe(d.nativeEvent);
|
|
2931
2941
|
if (a && Y(h)) {
|
|
2932
2942
|
if (jt() && !d.relatedTarget) {
|
|
2933
2943
|
if (!p.current && !on(h))
|
|
@@ -2939,11 +2949,11 @@ function Ri(e, t) {
|
|
|
2939
2949
|
},
|
|
2940
2950
|
onBlur(d) {
|
|
2941
2951
|
u.current = !1;
|
|
2942
|
-
const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(
|
|
2952
|
+
const h = d.relatedTarget, m = d.nativeEvent, y = Y(h) && h.hasAttribute(Ge("focus-guard")) && h.getAttribute("data-type") === "outside";
|
|
2943
2953
|
l.current = window.setTimeout(() => {
|
|
2944
2954
|
var R;
|
|
2945
|
-
const v =
|
|
2946
|
-
!h && v === i.domReference ||
|
|
2955
|
+
const v = Ee(i.domReference ? i.domReference.ownerDocument : document);
|
|
2956
|
+
!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
2957
|
});
|
|
2948
2958
|
}
|
|
2949
2959
|
}), [s, i.domReference, r, a]);
|
|
@@ -2965,7 +2975,7 @@ function qt(e, t, n) {
|
|
|
2965
2975
|
return {
|
|
2966
2976
|
...n === "floating" && {
|
|
2967
2977
|
tabIndex: -1,
|
|
2968
|
-
[
|
|
2978
|
+
[No]: ""
|
|
2969
2979
|
},
|
|
2970
2980
|
...s,
|
|
2971
2981
|
...t.map((i) => {
|
|
@@ -2988,7 +2998,7 @@ function qt(e, t, n) {
|
|
|
2988
2998
|
}), i), {})
|
|
2989
2999
|
};
|
|
2990
3000
|
}
|
|
2991
|
-
function
|
|
3001
|
+
function Oi(e) {
|
|
2992
3002
|
e === void 0 && (e = []);
|
|
2993
3003
|
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
3004
|
(c) => qt(c, e, "reference"),
|
|
@@ -3009,7 +3019,7 @@ function Ei(e) {
|
|
|
3009
3019
|
getItemProps: i
|
|
3010
3020
|
}), [o, s, i]);
|
|
3011
3021
|
}
|
|
3012
|
-
const
|
|
3022
|
+
const ni = "Escape";
|
|
3013
3023
|
function Nt(e, t, n) {
|
|
3014
3024
|
switch (e) {
|
|
3015
3025
|
case "vertical":
|
|
@@ -3021,19 +3031,19 @@ function Nt(e, t, n) {
|
|
|
3021
3031
|
}
|
|
3022
3032
|
}
|
|
3023
3033
|
function bt(e, t) {
|
|
3024
|
-
return Nt(t, e === st || e ===
|
|
3034
|
+
return Nt(t, e === st || e === Fe, e === Ne || e === _e);
|
|
3025
3035
|
}
|
|
3026
3036
|
function Yt(e, t, n) {
|
|
3027
|
-
return Nt(t, e ===
|
|
3037
|
+
return Nt(t, e === Fe, n ? e === Ne : e === _e) || e === "Enter" || e === " " || e === "";
|
|
3028
3038
|
}
|
|
3029
3039
|
function Kn(e, t, n) {
|
|
3030
|
-
return Nt(t, n ? e ===
|
|
3040
|
+
return Nt(t, n ? e === Ne : e === _e, e === Fe);
|
|
3031
3041
|
}
|
|
3032
3042
|
function Vn(e, t, n, r) {
|
|
3033
|
-
const o = n ? e ===
|
|
3034
|
-
return t === "both" || t === "horizontal" && r && r > 1 ? e ===
|
|
3043
|
+
const o = n ? e === _e : e === Ne, s = e === st;
|
|
3044
|
+
return t === "both" || t === "horizontal" && r && r > 1 ? e === ni : Nt(t, o, s);
|
|
3035
3045
|
}
|
|
3036
|
-
function
|
|
3046
|
+
function Ai(e, t) {
|
|
3037
3047
|
const {
|
|
3038
3048
|
open: n,
|
|
3039
3049
|
onOpenChange: r,
|
|
@@ -3055,258 +3065,258 @@ function Ii(e, t) {
|
|
|
3055
3065
|
focusItemOnHover: R = !0,
|
|
3056
3066
|
openOnArrowKeyDown: v = !0,
|
|
3057
3067
|
disabledIndices: x = void 0,
|
|
3058
|
-
orientation:
|
|
3068
|
+
orientation: C = "vertical",
|
|
3059
3069
|
parentOrientation: A,
|
|
3060
3070
|
cols: k = 1,
|
|
3061
3071
|
scrollItemIntoView: N = !0,
|
|
3062
|
-
virtualItemRef:
|
|
3072
|
+
virtualItemRef: D,
|
|
3063
3073
|
itemSizes: L,
|
|
3064
3074
|
dense: F = !1
|
|
3065
3075
|
} = 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 _ =
|
|
3076
|
+
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".'));
|
|
3077
|
+
const _ = It(o.floating), U = xe(_), K = et(), O = tt();
|
|
3068
3078
|
X(() => {
|
|
3069
|
-
e.dataRef.current.orientation =
|
|
3070
|
-
}, [e,
|
|
3071
|
-
const w =
|
|
3079
|
+
e.dataRef.current.orientation = C;
|
|
3080
|
+
}, [e, C]);
|
|
3081
|
+
const w = se(() => {
|
|
3072
3082
|
a(b.current === -1 ? null : b.current);
|
|
3073
|
-
}),
|
|
3074
|
-
function
|
|
3083
|
+
}), W = Zt(o.domReference), T = f.useRef(y), b = f.useRef(l ?? -1), E = f.useRef(null), P = 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), Ke = xe(l), [Me, H] = f.useState(), [z, $] = f.useState(), B = se(() => {
|
|
3084
|
+
function M(Z) {
|
|
3075
3085
|
if (m) {
|
|
3076
3086
|
var ie;
|
|
3077
|
-
(ie =
|
|
3087
|
+
(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
3088
|
} else
|
|
3079
|
-
|
|
3080
|
-
sync:
|
|
3089
|
+
$e(Z, {
|
|
3090
|
+
sync: ee.current,
|
|
3081
3091
|
preventScroll: !0
|
|
3082
3092
|
});
|
|
3083
3093
|
}
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3086
|
-
const
|
|
3087
|
-
if (!
|
|
3088
|
-
|
|
3089
|
-
const ie =
|
|
3090
|
-
ie &&
|
|
3094
|
+
const j = i.current[b.current], S = ae.current;
|
|
3095
|
+
j && M(j), (ee.current ? (Z) => Z() : requestAnimationFrame)(() => {
|
|
3096
|
+
const Z = i.current[b.current] || j;
|
|
3097
|
+
if (!Z) return;
|
|
3098
|
+
j || M(Z);
|
|
3099
|
+
const ie = Ae.current;
|
|
3100
|
+
ie && ne && (S || !P.current) && (Z.scrollIntoView == null || Z.scrollIntoView(typeof ie == "boolean" ? {
|
|
3091
3101
|
block: "nearest",
|
|
3092
3102
|
inline: "nearest"
|
|
3093
3103
|
} : ie));
|
|
3094
3104
|
});
|
|
3095
3105
|
});
|
|
3096
3106
|
X(() => {
|
|
3097
|
-
u && (n && o.floating ? T.current && l != null && (
|
|
3107
|
+
u && (n && o.floating ? T.current && l != null && (ae.current = !0, b.current = l, w()) : I.current && (b.current = -1, G.current()));
|
|
3098
3108
|
}, [u, n, o.floating, l, w]), X(() => {
|
|
3099
3109
|
if (u && n && o.floating)
|
|
3100
3110
|
if (c == null) {
|
|
3101
|
-
if (
|
|
3111
|
+
if (ee.current = !1, Ke.current != null)
|
|
3102
3112
|
return;
|
|
3103
|
-
if (
|
|
3104
|
-
let
|
|
3105
|
-
const
|
|
3106
|
-
i.current[0] == null ? (
|
|
3113
|
+
if (I.current && (b.current = -1, B()), (!V.current || !I.current) && T.current && (E.current != null || T.current === !0 && E.current == null)) {
|
|
3114
|
+
let M = 0;
|
|
3115
|
+
const j = () => {
|
|
3116
|
+
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
3117
|
};
|
|
3108
|
-
|
|
3118
|
+
j();
|
|
3109
3119
|
}
|
|
3110
|
-
} else Ye(i, c) || (b.current = c,
|
|
3111
|
-
}, [u, n, o.floating, c, Ke, d, i,
|
|
3112
|
-
var
|
|
3113
|
-
if (!u || o.floating || !O || m || !
|
|
3120
|
+
} else Ye(i, c) || (b.current = c, B(), ae.current = !1);
|
|
3121
|
+
}, [u, n, o.floating, c, Ke, d, i, C, h, w, B, te]), X(() => {
|
|
3122
|
+
var M;
|
|
3123
|
+
if (!u || o.floating || !O || m || !I.current)
|
|
3114
3124
|
return;
|
|
3115
|
-
const
|
|
3116
|
-
|
|
3125
|
+
const j = O.nodesRef.current, S = (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));
|
|
3126
|
+
S && !Z && P.current && S.focus({
|
|
3117
3127
|
preventScroll: !0
|
|
3118
3128
|
});
|
|
3119
|
-
}, [u, o.floating, O,
|
|
3120
|
-
if (!u || !O || !m ||
|
|
3121
|
-
function
|
|
3122
|
-
|
|
3129
|
+
}, [u, o.floating, O, K, m]), X(() => {
|
|
3130
|
+
if (!u || !O || !m || K) return;
|
|
3131
|
+
function M(j) {
|
|
3132
|
+
$(j.id), D && (D.current = j);
|
|
3123
3133
|
}
|
|
3124
|
-
return O.events.on("virtualfocus",
|
|
3125
|
-
O.events.off("virtualfocus",
|
|
3134
|
+
return O.events.on("virtualfocus", M), () => {
|
|
3135
|
+
O.events.off("virtualfocus", M);
|
|
3126
3136
|
};
|
|
3127
|
-
}, [u, O, m,
|
|
3128
|
-
G.current = w,
|
|
3137
|
+
}, [u, O, m, K, D]), X(() => {
|
|
3138
|
+
G.current = w, V.current = n, I.current = !!o.floating;
|
|
3129
3139
|
}), X(() => {
|
|
3130
3140
|
n || (E.current = null, T.current = y);
|
|
3131
3141
|
}, [n, y]);
|
|
3132
|
-
const
|
|
3133
|
-
function
|
|
3134
|
-
if (!
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3142
|
+
const oe = c != null, ne = f.useMemo(() => {
|
|
3143
|
+
function M(S) {
|
|
3144
|
+
if (!fe.current) return;
|
|
3145
|
+
const Q = i.current.indexOf(S);
|
|
3146
|
+
Q !== -1 && b.current !== Q && (b.current = Q, w());
|
|
3137
3147
|
}
|
|
3138
3148
|
return {
|
|
3139
|
-
onFocus(
|
|
3149
|
+
onFocus(S) {
|
|
3140
3150
|
let {
|
|
3141
|
-
currentTarget:
|
|
3142
|
-
} =
|
|
3143
|
-
|
|
3151
|
+
currentTarget: Q
|
|
3152
|
+
} = S;
|
|
3153
|
+
ee.current = !0, M(Q);
|
|
3144
3154
|
},
|
|
3145
|
-
onClick: (
|
|
3155
|
+
onClick: (S) => {
|
|
3146
3156
|
let {
|
|
3147
|
-
currentTarget:
|
|
3148
|
-
} =
|
|
3149
|
-
return
|
|
3157
|
+
currentTarget: Q
|
|
3158
|
+
} = S;
|
|
3159
|
+
return Q.focus({
|
|
3150
3160
|
preventScroll: !0
|
|
3151
3161
|
});
|
|
3152
3162
|
},
|
|
3153
3163
|
// Safari
|
|
3154
3164
|
...R && {
|
|
3155
|
-
onMouseMove(
|
|
3165
|
+
onMouseMove(S) {
|
|
3156
3166
|
let {
|
|
3157
|
-
currentTarget:
|
|
3158
|
-
} =
|
|
3159
|
-
|
|
3167
|
+
currentTarget: Q
|
|
3168
|
+
} = S;
|
|
3169
|
+
ee.current = !0, ae.current = !1, M(Q);
|
|
3160
3170
|
},
|
|
3161
|
-
onPointerLeave(
|
|
3171
|
+
onPointerLeave(S) {
|
|
3162
3172
|
let {
|
|
3163
|
-
pointerType:
|
|
3164
|
-
} =
|
|
3165
|
-
if (!(!
|
|
3166
|
-
var
|
|
3167
|
-
(
|
|
3173
|
+
pointerType: Q
|
|
3174
|
+
} = S;
|
|
3175
|
+
if (!(!P.current || Q === "touch") && (ee.current = !0, b.current = -1, w(), !m)) {
|
|
3176
|
+
var Z;
|
|
3177
|
+
(Z = U.current) == null || Z.focus({
|
|
3168
3178
|
preventScroll: !0
|
|
3169
3179
|
});
|
|
3170
3180
|
}
|
|
3171
3181
|
}
|
|
3172
3182
|
}
|
|
3173
3183
|
};
|
|
3174
|
-
}, [
|
|
3175
|
-
var
|
|
3176
|
-
return A ?? (O == null || (
|
|
3177
|
-
}, [
|
|
3178
|
-
if (
|
|
3184
|
+
}, [fe, U, R, i, w, m]), de = f.useCallback(() => {
|
|
3185
|
+
var M;
|
|
3186
|
+
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);
|
|
3187
|
+
}, [K, O, A]), me = se((M) => {
|
|
3188
|
+
if (P.current = !1, ee.current = !0, M.which === 229 || !fe.current && M.currentTarget === U.current)
|
|
3179
3189
|
return;
|
|
3180
|
-
if (d && Vn(
|
|
3181
|
-
bt(
|
|
3190
|
+
if (d && Vn(M.key, C, h, k)) {
|
|
3191
|
+
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
3192
|
return;
|
|
3183
3193
|
}
|
|
3184
|
-
const
|
|
3185
|
-
if (
|
|
3186
|
-
const
|
|
3194
|
+
const j = b.current, S = yt(i, x), Q = en(i, x);
|
|
3195
|
+
if (W || (M.key === "Home" && (pe(M), b.current = S, w()), M.key === "End" && (pe(M), b.current = Q, w())), k > 1) {
|
|
3196
|
+
const Z = L || Array.from({
|
|
3187
3197
|
length: i.current.length
|
|
3188
3198
|
}, () => ({
|
|
3189
3199
|
width: 1,
|
|
3190
3200
|
height: 1
|
|
3191
|
-
})), ie = nr(
|
|
3201
|
+
})), ie = nr(Z, k, F), nt = ie.findIndex((ye) => ye != null && !He(i, ye, x)), at = ie.reduce((ye, Ve, ft) => Ve != null && !He(i, Ve, x) ? ft : ye, -1), rt = ie[tr({
|
|
3192
3202
|
current: ie.map((ye) => ye != null ? i.current[ye] : null)
|
|
3193
3203
|
}, {
|
|
3194
|
-
event:
|
|
3195
|
-
orientation:
|
|
3204
|
+
event: M,
|
|
3205
|
+
orientation: C,
|
|
3196
3206
|
loop: g,
|
|
3197
3207
|
rtl: h,
|
|
3198
3208
|
cols: k,
|
|
3199
3209
|
// treat undefined (empty grid spaces) as disabled indices so we
|
|
3200
3210
|
// don't end up in them
|
|
3201
|
-
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, Ve) =>
|
|
3211
|
+
disabledIndices: or([...(typeof x != "function" ? x : null) || i.current.map((ye, Ve) => He(i, Ve, x) ? Ve : void 0), void 0], ie),
|
|
3202
3212
|
minIndex: nt,
|
|
3203
3213
|
maxIndex: at,
|
|
3204
3214
|
prevIndex: rr(
|
|
3205
|
-
b.current >
|
|
3206
|
-
|
|
3215
|
+
b.current > Q ? S : b.current,
|
|
3216
|
+
Z,
|
|
3207
3217
|
ie,
|
|
3208
3218
|
k,
|
|
3209
3219
|
// use a corner matching the edge closest to the direction
|
|
3210
3220
|
// we're moving in so we don't end up in the same item. Prefer
|
|
3211
3221
|
// top/left over bottom/right.
|
|
3212
|
-
|
|
3222
|
+
M.key === Fe ? "bl" : M.key === (h ? Ne : _e) ? "tr" : "tl"
|
|
3213
3223
|
),
|
|
3214
3224
|
stopEvent: !0
|
|
3215
3225
|
})];
|
|
3216
|
-
if (rt != null && (b.current = rt, w()),
|
|
3226
|
+
if (rt != null && (b.current = rt, w()), C === "both")
|
|
3217
3227
|
return;
|
|
3218
3228
|
}
|
|
3219
|
-
if (bt(
|
|
3220
|
-
if (pe(
|
|
3221
|
-
b.current = Yt(
|
|
3229
|
+
if (bt(M.key, C)) {
|
|
3230
|
+
if (pe(M), n && !m && Ee(M.currentTarget.ownerDocument) === M.currentTarget) {
|
|
3231
|
+
b.current = Yt(M.key, C, h) ? S : Q, w();
|
|
3222
3232
|
return;
|
|
3223
3233
|
}
|
|
3224
|
-
Yt(
|
|
3225
|
-
startingIndex:
|
|
3234
|
+
Yt(M.key, C, h) ? g ? b.current = j >= Q ? p && j !== i.current.length ? -1 : S : ue(i, {
|
|
3235
|
+
startingIndex: j,
|
|
3226
3236
|
disabledIndices: x
|
|
3227
|
-
}) : b.current = Math.min(
|
|
3228
|
-
startingIndex:
|
|
3237
|
+
}) : b.current = Math.min(Q, ue(i, {
|
|
3238
|
+
startingIndex: j,
|
|
3229
3239
|
disabledIndices: x
|
|
3230
|
-
})) : g ? b.current =
|
|
3231
|
-
startingIndex:
|
|
3240
|
+
})) : g ? b.current = j <= S ? p && j !== -1 ? i.current.length : Q : ue(i, {
|
|
3241
|
+
startingIndex: j,
|
|
3232
3242
|
decrement: !0,
|
|
3233
3243
|
disabledIndices: x
|
|
3234
|
-
}) : b.current = Math.max(
|
|
3235
|
-
startingIndex:
|
|
3244
|
+
}) : b.current = Math.max(S, ue(i, {
|
|
3245
|
+
startingIndex: j,
|
|
3236
3246
|
decrement: !0,
|
|
3237
3247
|
disabledIndices: x
|
|
3238
3248
|
})), Ye(i, b.current) && (b.current = -1), w();
|
|
3239
3249
|
}
|
|
3240
|
-
}),
|
|
3241
|
-
"aria-activedescendant": z ||
|
|
3242
|
-
}, [m, n,
|
|
3243
|
-
"aria-orientation":
|
|
3244
|
-
...
|
|
3245
|
-
onKeyDown:
|
|
3250
|
+
}), q = f.useMemo(() => m && n && oe && {
|
|
3251
|
+
"aria-activedescendant": z || Me
|
|
3252
|
+
}, [m, n, oe, z, Me]), J = f.useMemo(() => ({
|
|
3253
|
+
"aria-orientation": C === "both" ? void 0 : C,
|
|
3254
|
+
...W ? {} : q,
|
|
3255
|
+
onKeyDown: me,
|
|
3246
3256
|
onPointerMove() {
|
|
3247
|
-
|
|
3257
|
+
P.current = !0;
|
|
3248
3258
|
}
|
|
3249
|
-
}), [
|
|
3250
|
-
function
|
|
3251
|
-
y === "auto" && Zn(
|
|
3259
|
+
}), [q, me, C, W]), Re = f.useMemo(() => {
|
|
3260
|
+
function M(S) {
|
|
3261
|
+
y === "auto" && Zn(S.nativeEvent) && (T.current = !0);
|
|
3252
3262
|
}
|
|
3253
|
-
function
|
|
3254
|
-
T.current = y, y === "auto" && er(
|
|
3263
|
+
function j(S) {
|
|
3264
|
+
T.current = y, y === "auto" && er(S.nativeEvent) && (T.current = !0);
|
|
3255
3265
|
}
|
|
3256
3266
|
return {
|
|
3257
|
-
...
|
|
3258
|
-
onKeyDown(
|
|
3259
|
-
|
|
3260
|
-
const
|
|
3267
|
+
...q,
|
|
3268
|
+
onKeyDown(S) {
|
|
3269
|
+
P.current = !1;
|
|
3270
|
+
const Q = S.key.startsWith("Arrow"), Z = ["Home", "End"].includes(S.key), ie = Q || Z, nt = Kn(S.key, C, h), at = Vn(S.key, C, h, k), rt = Kn(S.key, de(), h), ye = bt(S.key, C), Ve = (d ? rt : ye) || S.key === "Enter" || S.key.trim() === "";
|
|
3261
3271
|
if (m && n) {
|
|
3262
|
-
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null),
|
|
3263
|
-
if (ie &&
|
|
3272
|
+
const dt = O == null ? void 0 : O.nodesRef.current.find((mt) => mt.parentId == null), ke = O && dt ? Ur(O.nodesRef.current, dt.id) : null;
|
|
3273
|
+
if (ie && ke && D) {
|
|
3264
3274
|
const mt = new KeyboardEvent("keydown", {
|
|
3265
|
-
key:
|
|
3275
|
+
key: S.key,
|
|
3266
3276
|
bubbles: !0
|
|
3267
3277
|
});
|
|
3268
3278
|
if (nt || at) {
|
|
3269
3279
|
var ft, un;
|
|
3270
|
-
const Tr = ((ft =
|
|
3271
|
-
an && (pe(
|
|
3280
|
+
const Tr = ((ft = ke.context) == null ? void 0 : ft.elements.domReference) === S.currentTarget, an = at && !Tr ? (un = ke.context) == null ? void 0 : un.elements.domReference : nt ? i.current.find((fn) => (fn == null ? void 0 : fn.id) === Me) : null;
|
|
3281
|
+
an && (pe(S), an.dispatchEvent(mt), $(void 0));
|
|
3272
3282
|
}
|
|
3273
|
-
if ((ye ||
|
|
3283
|
+
if ((ye || Z) && ke.context && ke.context.open && ke.parentId && S.currentTarget !== ke.context.elements.domReference) {
|
|
3274
3284
|
var ln;
|
|
3275
|
-
pe(
|
|
3285
|
+
pe(S), (ln = ke.context.elements.domReference) == null || ln.dispatchEvent(mt);
|
|
3276
3286
|
return;
|
|
3277
3287
|
}
|
|
3278
3288
|
}
|
|
3279
|
-
return
|
|
3289
|
+
return me(S);
|
|
3280
3290
|
}
|
|
3281
|
-
if (!(!n && !v &&
|
|
3291
|
+
if (!(!n && !v && Q)) {
|
|
3282
3292
|
if (Ve) {
|
|
3283
|
-
const dt = bt(
|
|
3284
|
-
E.current = d && dt ? null :
|
|
3293
|
+
const dt = bt(S.key, de());
|
|
3294
|
+
E.current = d && dt ? null : S.key;
|
|
3285
3295
|
}
|
|
3286
3296
|
if (d) {
|
|
3287
|
-
rt && (pe(
|
|
3297
|
+
rt && (pe(S), n ? (b.current = yt(i, te.current), w()) : r(!0, S.nativeEvent, "list-navigation"));
|
|
3288
3298
|
return;
|
|
3289
3299
|
}
|
|
3290
|
-
ye && (l != null && (b.current = l), pe(
|
|
3300
|
+
ye && (l != null && (b.current = l), pe(S), !n && v ? r(!0, S.nativeEvent, "list-navigation") : me(S), n && w());
|
|
3291
3301
|
}
|
|
3292
3302
|
},
|
|
3293
3303
|
onFocus() {
|
|
3294
3304
|
n && !m && (b.current = -1, w());
|
|
3295
3305
|
},
|
|
3296
|
-
onPointerDown:
|
|
3297
|
-
onPointerEnter:
|
|
3298
|
-
onMouseDown:
|
|
3299
|
-
onClick:
|
|
3306
|
+
onPointerDown: j,
|
|
3307
|
+
onPointerEnter: j,
|
|
3308
|
+
onMouseDown: M,
|
|
3309
|
+
onClick: M
|
|
3300
3310
|
};
|
|
3301
|
-
}, [
|
|
3311
|
+
}, [Me, q, k, me, te, y, i, d, w, r, n, v, C, de, h, l, O, m, D]);
|
|
3302
3312
|
return f.useMemo(() => u ? {
|
|
3303
|
-
reference:
|
|
3304
|
-
floating:
|
|
3305
|
-
item:
|
|
3306
|
-
} : {}, [u,
|
|
3313
|
+
reference: Re,
|
|
3314
|
+
floating: J,
|
|
3315
|
+
item: ne
|
|
3316
|
+
} : {}, [u, Re, J, ne]);
|
|
3307
3317
|
}
|
|
3308
|
-
const
|
|
3309
|
-
function
|
|
3318
|
+
const ri = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
3319
|
+
function Mi(e, t) {
|
|
3310
3320
|
var n, r;
|
|
3311
3321
|
t === void 0 && (t = {});
|
|
3312
3322
|
const {
|
|
@@ -3318,8 +3328,8 @@ function Ci(e, t) {
|
|
|
3318
3328
|
role: a = "dialog"
|
|
3319
3329
|
} = t, u = Lt(), l = ((n = s.domReference) == null ? void 0 : n.id) || u, p = f.useMemo(() => {
|
|
3320
3330
|
var v;
|
|
3321
|
-
return ((v =
|
|
3322
|
-
}, [s.floating, i]), g = (r =
|
|
3331
|
+
return ((v = It(s.floating)) == null ? void 0 : v.id) || i;
|
|
3332
|
+
}, [s.floating, i]), g = (r = ri.get(a)) != null ? r : a, h = et() != null, m = f.useMemo(() => g === "tooltip" || a === "label" ? {
|
|
3323
3333
|
["aria-" + (a === "label" ? "labelledby" : "describedby")]: o ? p : void 0
|
|
3324
3334
|
} : {
|
|
3325
3335
|
"aria-expanded": o ? "true" : "false",
|
|
@@ -3356,7 +3366,7 @@ function Ci(e, t) {
|
|
|
3356
3366
|
}, [g, p, l, a]), R = f.useCallback((v) => {
|
|
3357
3367
|
let {
|
|
3358
3368
|
active: x,
|
|
3359
|
-
selected:
|
|
3369
|
+
selected: C
|
|
3360
3370
|
} = v;
|
|
3361
3371
|
const A = {
|
|
3362
3372
|
role: "option",
|
|
@@ -3368,12 +3378,12 @@ function Ci(e, t) {
|
|
|
3368
3378
|
case "select":
|
|
3369
3379
|
return {
|
|
3370
3380
|
...A,
|
|
3371
|
-
"aria-selected": x &&
|
|
3381
|
+
"aria-selected": x && C
|
|
3372
3382
|
};
|
|
3373
3383
|
case "combobox":
|
|
3374
3384
|
return {
|
|
3375
3385
|
...A,
|
|
3376
|
-
"aria-selected":
|
|
3386
|
+
"aria-selected": C
|
|
3377
3387
|
};
|
|
3378
3388
|
}
|
|
3379
3389
|
return {};
|
|
@@ -3384,7 +3394,7 @@ function Ci(e, t) {
|
|
|
3384
3394
|
item: R
|
|
3385
3395
|
} : {}, [c, m, y, R]);
|
|
3386
3396
|
}
|
|
3387
|
-
function
|
|
3397
|
+
function oi(e, t) {
|
|
3388
3398
|
const [n, r] = f.useState(e);
|
|
3389
3399
|
return e && !n && r(!0), f.useEffect(() => {
|
|
3390
3400
|
if (!e && n) {
|
|
@@ -3393,7 +3403,7 @@ function ei(e, t) {
|
|
|
3393
3403
|
}
|
|
3394
3404
|
}, [e, n, t]), n;
|
|
3395
3405
|
}
|
|
3396
|
-
function
|
|
3406
|
+
function Pi(e, t) {
|
|
3397
3407
|
t === void 0 && (t = {});
|
|
3398
3408
|
const {
|
|
3399
3409
|
open: n,
|
|
@@ -3402,7 +3412,7 @@ function Ti(e, t) {
|
|
|
3402
3412
|
}
|
|
3403
3413
|
} = e, {
|
|
3404
3414
|
duration: o = 250
|
|
3405
|
-
} = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u =
|
|
3415
|
+
} = t, i = (typeof o == "number" ? o : o.close) || 0, [c, a] = f.useState("unmounted"), u = oi(n, i);
|
|
3406
3416
|
return !u && c === "close" && a("unmounted"), X(() => {
|
|
3407
3417
|
if (r) {
|
|
3408
3418
|
if (n) {
|
|
@@ -3424,30 +3434,30 @@ function Ti(e, t) {
|
|
|
3424
3434
|
};
|
|
3425
3435
|
}
|
|
3426
3436
|
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
|
-
|
|
3437
|
+
pi as C,
|
|
3438
|
+
bi as F,
|
|
3439
|
+
gi as a,
|
|
3440
|
+
mi as b,
|
|
3441
|
+
di as c,
|
|
3442
|
+
Ii as d,
|
|
3443
|
+
Ei as e,
|
|
3444
|
+
fi as f,
|
|
3445
|
+
Ci as g,
|
|
3446
|
+
Mi as h,
|
|
3447
|
+
Oi as i,
|
|
3448
|
+
ui as j,
|
|
3449
|
+
et as k,
|
|
3450
|
+
hi as l,
|
|
3451
|
+
vi as m,
|
|
3452
|
+
xi as n,
|
|
3453
|
+
li as o,
|
|
3454
|
+
Lo as p,
|
|
3455
|
+
wi as q,
|
|
3456
|
+
Ai as r,
|
|
3457
|
+
ai as s,
|
|
3458
|
+
yi as t,
|
|
3459
|
+
Fo as u,
|
|
3460
|
+
Ti as v,
|
|
3461
|
+
Pi as w,
|
|
3462
|
+
Ri as x
|
|
3453
3463
|
};
|