@cfx-dev/ui-components 5.0.22 → 5.0.24
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/CarouselControls-CJ3tupLr.js +41 -0
- package/dist/Combination-BNueeiCk.js +2227 -0
- package/dist/{Combination-N-vN9BB-.js → Combination-DFRGuWx2.js} +50 -48
- package/dist/{DropdownContent-BTzahw95.js → DropdownContent-DCqFWnzj.js} +10 -10
- package/dist/assets/all_css.css +2 -1
- package/dist/assets/css/Button.css +1 -1
- package/dist/assets/css/CarouselControls.css +1 -0
- package/dist/assets/css/CarouselItem.css +1 -0
- package/dist/assets/css/RangeInput.css +1 -1
- package/dist/assets/css/Text.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/assets/general/themes.css +1 -1
- package/dist/cfxIcons-YyDWNxmM.js +110 -0
- package/dist/cfxIconsXLarge-Dw37ZSw2.js +110 -0
- package/dist/components/Accordion/AccordionShowcase.js +2 -2
- package/dist/components/Badge/BadgeShowcase.js +3 -3
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +4 -4
- package/dist/components/Carousel/Carousel.d.ts +24 -0
- package/dist/components/Carousel/Carousel.js +125 -0
- package/dist/components/Carousel/Carousel.types.d.ts +41 -0
- package/dist/components/Carousel/Carousel.types.js +1 -0
- package/dist/components/Carousel/CarouselControls.d.ts +8 -0
- package/dist/components/Carousel/CarouselControls.js +8 -0
- package/dist/components/Carousel/CarouselItem.d.ts +11 -0
- package/dist/components/Carousel/CarouselItem.js +85 -0
- package/dist/components/Carousel/CarouselShowcase.d.ts +6 -0
- package/dist/components/Carousel/CarouselShowcase.js +177 -0
- package/dist/components/Carousel/index.d.ts +4 -0
- package/dist/components/Carousel/index.js +6 -0
- package/dist/components/Carousel/playIcon.d.ts +6 -0
- package/dist/components/Carousel/playIcon.js +25 -0
- package/dist/components/Checkbox/Checkbox.js +7 -7
- package/dist/components/Checkbox/CheckboxShowcase.js +5 -5
- package/dist/components/ClipboardButton/ClipboardButton.js +9 -9
- package/dist/components/ControlBox/ControlBox.js +10 -10
- package/dist/components/Decorate/Decorate.js +5 -5
- package/dist/components/DropdownContent/DropdownContent.js +1 -1
- package/dist/components/DropdownContent/index.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +12 -12
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +4 -4
- package/dist/components/Flex/FlexShowcase.js +4 -4
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Flyout/FlyoutShowcase.js +3 -3
- package/dist/components/FormField/FormFieldShowcase.js +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Close.js +2 -2
- package/dist/components/Icons/cfx-icons/Copy.js +3 -3
- package/dist/components/Icons/cfx-icons/DownChevron.js +2 -2
- package/dist/components/Icons/cfx-icons/Filter.js +6 -6
- package/dist/components/Icons/cfx-icons/Heart.js +2 -2
- package/dist/components/Icons/cfx-icons/HeartFilled.js +2 -2
- package/dist/components/Icons/cfx-icons/LeftArrow.js +2 -2
- package/dist/components/Icons/cfx-icons/LeftChevron.js +2 -2
- package/dist/components/Icons/cfx-icons/MoreInfo.js +4 -4
- package/dist/components/Icons/cfx-icons/Play.js +5 -5
- package/dist/components/Icons/cfx-icons/Plus.js +2 -2
- package/dist/components/Icons/cfx-icons/Refresh.js +3 -3
- package/dist/components/Icons/cfx-icons/Search.js +2 -2
- package/dist/components/Icons/cfx-icons/ServerList.js +2 -2
- package/dist/components/Icons/cfx-icons/ServerReconnect.js +7 -7
- package/dist/components/Icons/cfx-icons/Square.js +3 -3
- package/dist/components/Icons/cfx-icons/SquareFilled.js +7 -7
- package/dist/components/Icons/cfx-icons/Trash.js +2 -2
- package/dist/components/Icons/cfx-icons/Undo.js +3 -3
- package/dist/components/Icons/cfx-icons/User.js +5 -5
- package/dist/components/Icons/cfx-icons/Users.js +3 -3
- package/dist/components/Icons/cfx-icons/Verified.js +4 -4
- package/dist/components/Icons/cfx-icons/Warning.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Close.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Copy.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/DownChevron.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Filter.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Heart.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/HeartFilled.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/LeftArrow.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/LeftChevron.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/MoreInfo.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/Play.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/Plus.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Refresh.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/Search.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/ServerList.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/ServerReconnect.js +7 -7
- package/dist/components/Icons/cfx-iconsXLarge/Square.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/SquareFilled.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/Trash.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Undo.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/User.js +5 -5
- package/dist/components/Icons/cfx-iconsXLarge/Users.js +3 -3
- package/dist/components/Icons/cfx-iconsXLarge/Verified.js +4 -4
- package/dist/components/Icons/cfx-iconsXLarge/VisibilityOff.js +2 -2
- package/dist/components/Icons/cfx-iconsXLarge/Warning.js +2 -2
- package/dist/components/Icons/index.js +2 -2
- package/dist/components/InfoPanel/InfoPanelShowcase.js +9 -9
- package/dist/components/Input/InputShowcase.js +19 -19
- package/dist/components/Input/RichInput.js +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +340 -304
- package/dist/components/Link/LinkShowcase.js +5 -5
- package/dist/components/Logos/LogosShowcase.js +2 -2
- package/dist/components/Logos/cfx/Icon.js +7 -7
- package/dist/components/Logos/cfx/Logo.js +3 -3
- package/dist/components/Logos/cfx/Wordmark.js +2 -2
- package/dist/components/Logos/discord/Icon.js +5 -5
- package/dist/components/Logos/fivem/Icon.js +2 -2
- package/dist/components/Logos/fivem/WhiteLogo.js +2 -2
- package/dist/components/Logos/github/Icon.js +7 -7
- package/dist/components/Logos/google/Icon.js +6 -6
- package/dist/components/Logos/google/Wordmark.js +3 -3
- package/dist/components/Logos/index.js +7 -7
- package/dist/components/Logos/patreon/Icon.js +7 -7
- package/dist/components/Logos/patreon/Wordmark.js +5 -5
- package/dist/components/Logos/redm/CompositeLogo.js +2 -2
- package/dist/components/Logos/rockstar/Icon.js +2 -2
- package/dist/components/Logos/tebex/Icon.js +7 -7
- package/dist/components/Logos/tebex/Wordmark.js +2 -2
- package/dist/components/Logos/x/Icon.js +3 -3
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalShowcase.js +3 -3
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Popover/PopoverShowcase.js +6 -6
- package/dist/components/Prose/Prose.js +3 -3
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Scrollable/ScrollableShowcase.js +2 -2
- package/dist/components/Select/Select.js +109 -109
- package/dist/components/Select/SelectShowcase.js +21 -21
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +14 -14
- package/dist/components/TableResponsiveText/TableResponsiveText.js +2 -2
- package/dist/components/Tabular/TabularShowcase.js +12 -12
- package/dist/components/Title/Title.js +81 -77
- package/dist/{index-CfQtbUfi.js → index-8cuIcSMB.js} +5 -5
- package/dist/index-BcJ929FX.js +20 -0
- package/dist/{index-kbBuAY0m.js → index-BcnrbBqR.js} +2 -2
- package/dist/{index-BgyFvlVL.js → index-Bg26abkD.js} +2 -2
- package/dist/{index-9LBuZ7x4.js → index-BzirdFxK.js} +5 -5
- package/dist/{index-Cl_RnsqN.js → index-CUyjBl1Y.js} +2 -2
- package/dist/index-CZVyC53C.js +20 -0
- package/dist/{index-DwfZyjnS.js → index-CaQzR2YA.js} +2 -2
- package/dist/{index-D5SMGei3.js → index-CzUzkeQx.js} +9 -9
- package/dist/{index-Cy4ZbWBL.js → index-DqqOUOlj.js} +2 -2
- package/dist/{index-3ctv5u9o.js → index-DwdZ_SPo.js} +2 -2
- package/dist/{index-Bj7QGXdt.js → index-DxFgF-nY.js} +2 -2
- package/dist/main.d.ts +11 -2
- package/dist/main.js +279 -257
- package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.d.ts +12 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsContext.js +9 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.d.ts +9 -0
- package/dist/utils/contexts/AnalyticsContext/AnalyticsProvider.js +33 -0
- package/dist/utils/contexts/AnalyticsContext/index.d.ts +6 -0
- package/dist/utils/contexts/AnalyticsContext/index.js +10 -0
- package/dist/utils/contexts/AnalyticsContext/useAnalytics.d.ts +1 -0
- package/dist/utils/contexts/AnalyticsContext/useAnalytics.js +8 -0
- package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.d.ts +7 -0
- package/dist/utils/contexts/AnalyticsContext/useSiteLinkClick.js +22 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.d.ts +11 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContext.js +11 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.d.ts +6 -0
- package/dist/utils/contexts/MediaQueryContext/MediaQueryContextProvider.js +38 -0
- package/dist/utils/contexts/MediaQueryContext/index.d.ts +4 -0
- package/dist/utils/contexts/MediaQueryContext/index.js +8 -0
- package/dist/utils/contexts/MediaQueryContext/useMediaQuery.d.ts +2 -0
- package/dist/utils/contexts/MediaQueryContext/useMediaQuery.js +8 -0
- package/dist/utils/contexts/StoreContext/StoreContext.d.ts +15 -0
- package/dist/utils/contexts/StoreContext/StoreContext.js +21 -0
- package/dist/utils/contexts/StoreContext/index.d.ts +2 -0
- package/dist/utils/contexts/StoreContext/index.js +4 -0
- package/dist/utils/formatBytes.d.ts +1 -0
- package/dist/utils/formatBytes.js +12 -0
- package/dist/utils/hooks/useCarousel.d.ts +11 -0
- package/dist/utils/hooks/useCarousel.js +1276 -0
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/truncateWithEllipsis.d.ts +1 -0
- package/dist/utils/truncateWithEllipsis.js +6 -0
- package/package.json +2 -1
- package/dist/Combination-CcTTSYNP.js +0 -2209
- package/dist/assets/css/CountryFlag.css +0 -1
- package/dist/cfxIcons-0xD_EEXT.js +0 -110
- package/dist/cfxIconsXLarge-D0vz6Yd_.js +0 -110
- package/dist/components/CountryFlag/CountryFlag.d.ts +0 -12
- package/dist/components/CountryFlag/CountryFlag.js +0 -25
- package/dist/components/CountryFlag/index.d.ts +0 -2
- package/dist/components/CountryFlag/index.js +0 -4
- package/dist/index-B_NGoq0d.js +0 -20
- package/dist/index-Cn_D8a9-.js +0 -20
|
@@ -1,2209 +0,0 @@
|
|
|
1
|
-
import * as m from "react";
|
|
2
|
-
import { useLayoutEffect as vn } from "react";
|
|
3
|
-
import { b as he, P as ce, a as Ne, g as gn, e as Ve, c as yn, d as wn } from "./index-CfQtbUfi.js";
|
|
4
|
-
import { jsx as _ } from "react/jsx-runtime";
|
|
5
|
-
import { r as xn } from "./index-Cl_RnsqN.js";
|
|
6
|
-
import { c as Tt, _ as Q, d as bn } from "./tslib.es6-CtHwNPxX.js";
|
|
7
|
-
import { c as En, u as Cn } from "./medium-Bq5NvyU7.js";
|
|
8
|
-
var Lt = function(e) {
|
|
9
|
-
var t = e.sideCar, n = Tt(e, ["sideCar"]);
|
|
10
|
-
if (!t)
|
|
11
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
12
|
-
var r = t.read();
|
|
13
|
-
if (!r)
|
|
14
|
-
throw new Error("Sidecar medium not found");
|
|
15
|
-
return m.createElement(r, Q({}, n));
|
|
16
|
-
};
|
|
17
|
-
Lt.isSideCarExport = !0;
|
|
18
|
-
function An(e, t) {
|
|
19
|
-
return e.useMedium(t), Lt;
|
|
20
|
-
}
|
|
21
|
-
function ie(e) {
|
|
22
|
-
const t = m.useRef(e);
|
|
23
|
-
return m.useEffect(() => {
|
|
24
|
-
t.current = e;
|
|
25
|
-
}), m.useMemo(() => (...n) => {
|
|
26
|
-
var r;
|
|
27
|
-
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
28
|
-
}, []);
|
|
29
|
-
}
|
|
30
|
-
function Sn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
31
|
-
const n = ie(e);
|
|
32
|
-
m.useEffect(() => {
|
|
33
|
-
const r = (o) => {
|
|
34
|
-
o.key === "Escape" && n(o);
|
|
35
|
-
};
|
|
36
|
-
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
37
|
-
}, [n, t]);
|
|
38
|
-
}
|
|
39
|
-
var Rn = "DismissableLayer", ze = "dismissableLayer.update", Pn = "dismissableLayer.pointerDownOutside", On = "dismissableLayer.focusOutside", ut, Dt = m.createContext({
|
|
40
|
-
layers: /* @__PURE__ */ new Set(),
|
|
41
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
42
|
-
branches: /* @__PURE__ */ new Set()
|
|
43
|
-
}), Tn = m.forwardRef(
|
|
44
|
-
(e, t) => {
|
|
45
|
-
const {
|
|
46
|
-
disableOutsidePointerEvents: n = !1,
|
|
47
|
-
onEscapeKeyDown: r,
|
|
48
|
-
onPointerDownOutside: o,
|
|
49
|
-
onFocusOutside: i,
|
|
50
|
-
onInteractOutside: s,
|
|
51
|
-
onDismiss: c,
|
|
52
|
-
...d
|
|
53
|
-
} = e, l = m.useContext(Dt), [f, u] = m.useState(null), p = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = m.useState({}), y = he(t, (C) => u(C)), a = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = a.indexOf(v), w = f ? a.indexOf(f) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, x = w >= g, E = Mn((C) => {
|
|
54
|
-
const R = C.target, T = [...l.branches].some((P) => P.contains(R));
|
|
55
|
-
!x || T || (o == null || o(C), s == null || s(C), C.defaultPrevented || c == null || c());
|
|
56
|
-
}, p), A = Nn((C) => {
|
|
57
|
-
const R = C.target;
|
|
58
|
-
[...l.branches].some((P) => P.contains(R)) || (i == null || i(C), s == null || s(C), C.defaultPrevented || c == null || c());
|
|
59
|
-
}, p);
|
|
60
|
-
return Sn((C) => {
|
|
61
|
-
w === l.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && c && (C.preventDefault(), c()));
|
|
62
|
-
}, p), m.useEffect(() => {
|
|
63
|
-
if (f)
|
|
64
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), ft(), () => {
|
|
65
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = ut);
|
|
66
|
-
};
|
|
67
|
-
}, [f, p, n, l]), m.useEffect(() => () => {
|
|
68
|
-
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), ft());
|
|
69
|
-
}, [f, l]), m.useEffect(() => {
|
|
70
|
-
const C = () => h({});
|
|
71
|
-
return document.addEventListener(ze, C), () => document.removeEventListener(ze, C);
|
|
72
|
-
}, []), /* @__PURE__ */ _(
|
|
73
|
-
ce.div,
|
|
74
|
-
{
|
|
75
|
-
...d,
|
|
76
|
-
ref: y,
|
|
77
|
-
style: {
|
|
78
|
-
pointerEvents: b ? x ? "auto" : "none" : void 0,
|
|
79
|
-
...e.style
|
|
80
|
-
},
|
|
81
|
-
onFocusCapture: Ne(e.onFocusCapture, A.onFocusCapture),
|
|
82
|
-
onBlurCapture: Ne(e.onBlurCapture, A.onBlurCapture),
|
|
83
|
-
onPointerDownCapture: Ne(
|
|
84
|
-
e.onPointerDownCapture,
|
|
85
|
-
E.onPointerDownCapture
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
Tn.displayName = Rn;
|
|
92
|
-
var Ln = "DismissableLayerBranch", Dn = m.forwardRef((e, t) => {
|
|
93
|
-
const n = m.useContext(Dt), r = m.useRef(null), o = he(t, r);
|
|
94
|
-
return m.useEffect(() => {
|
|
95
|
-
const i = r.current;
|
|
96
|
-
if (i)
|
|
97
|
-
return n.branches.add(i), () => {
|
|
98
|
-
n.branches.delete(i);
|
|
99
|
-
};
|
|
100
|
-
}, [n.branches]), /* @__PURE__ */ _(ce.div, { ...e, ref: o });
|
|
101
|
-
});
|
|
102
|
-
Dn.displayName = Ln;
|
|
103
|
-
function Mn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
104
|
-
const n = ie(e), r = m.useRef(!1), o = m.useRef(() => {
|
|
105
|
-
});
|
|
106
|
-
return m.useEffect(() => {
|
|
107
|
-
const i = (c) => {
|
|
108
|
-
if (c.target && !r.current) {
|
|
109
|
-
let d = function() {
|
|
110
|
-
Mt(
|
|
111
|
-
Pn,
|
|
112
|
-
n,
|
|
113
|
-
l,
|
|
114
|
-
{ discrete: !0 }
|
|
115
|
-
);
|
|
116
|
-
};
|
|
117
|
-
const l = { originalEvent: c };
|
|
118
|
-
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
|
|
119
|
-
} else
|
|
120
|
-
t.removeEventListener("click", o.current);
|
|
121
|
-
r.current = !1;
|
|
122
|
-
}, s = window.setTimeout(() => {
|
|
123
|
-
t.addEventListener("pointerdown", i);
|
|
124
|
-
}, 0);
|
|
125
|
-
return () => {
|
|
126
|
-
window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
|
|
127
|
-
};
|
|
128
|
-
}, [t, n]), {
|
|
129
|
-
// ensures we check React component tree (not just DOM tree)
|
|
130
|
-
onPointerDownCapture: () => r.current = !0
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function Nn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
134
|
-
const n = ie(e), r = m.useRef(!1);
|
|
135
|
-
return m.useEffect(() => {
|
|
136
|
-
const o = (i) => {
|
|
137
|
-
i.target && !r.current && Mt(On, n, { originalEvent: i }, {
|
|
138
|
-
discrete: !1
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
142
|
-
}, [t, n]), {
|
|
143
|
-
onFocusCapture: () => r.current = !0,
|
|
144
|
-
onBlurCapture: () => r.current = !1
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function ft() {
|
|
148
|
-
const e = new CustomEvent(ze);
|
|
149
|
-
document.dispatchEvent(e);
|
|
150
|
-
}
|
|
151
|
-
function Mt(e, t, n, { discrete: r }) {
|
|
152
|
-
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
153
|
-
t && o.addEventListener(e, t, { once: !0 }), r ? gn(o, i) : o.dispatchEvent(i);
|
|
154
|
-
}
|
|
155
|
-
var ke = 0;
|
|
156
|
-
function Wo() {
|
|
157
|
-
m.useEffect(() => {
|
|
158
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
159
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), ke++, () => {
|
|
160
|
-
ke === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ke--;
|
|
161
|
-
};
|
|
162
|
-
}, []);
|
|
163
|
-
}
|
|
164
|
-
function dt() {
|
|
165
|
-
const e = document.createElement("span");
|
|
166
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
167
|
-
}
|
|
168
|
-
var Fe = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", ht = { bubbles: !1, cancelable: !0 }, kn = "FocusScope", Fn = m.forwardRef((e, t) => {
|
|
169
|
-
const {
|
|
170
|
-
loop: n = !1,
|
|
171
|
-
trapped: r = !1,
|
|
172
|
-
onMountAutoFocus: o,
|
|
173
|
-
onUnmountAutoFocus: i,
|
|
174
|
-
...s
|
|
175
|
-
} = e, [c, d] = m.useState(null), l = ie(o), f = ie(i), u = m.useRef(null), p = he(t, (a) => d(a)), h = m.useRef({
|
|
176
|
-
paused: !1,
|
|
177
|
-
pause() {
|
|
178
|
-
this.paused = !0;
|
|
179
|
-
},
|
|
180
|
-
resume() {
|
|
181
|
-
this.paused = !1;
|
|
182
|
-
}
|
|
183
|
-
}).current;
|
|
184
|
-
m.useEffect(() => {
|
|
185
|
-
if (r) {
|
|
186
|
-
let a = function(b) {
|
|
187
|
-
if (h.paused || !c) return;
|
|
188
|
-
const x = b.target;
|
|
189
|
-
c.contains(x) ? u.current = x : q(u.current, { select: !0 });
|
|
190
|
-
}, v = function(b) {
|
|
191
|
-
if (h.paused || !c) return;
|
|
192
|
-
const x = b.relatedTarget;
|
|
193
|
-
x !== null && (c.contains(x) || q(u.current, { select: !0 }));
|
|
194
|
-
}, g = function(b) {
|
|
195
|
-
if (document.activeElement === document.body)
|
|
196
|
-
for (const E of b)
|
|
197
|
-
E.removedNodes.length > 0 && q(c);
|
|
198
|
-
};
|
|
199
|
-
document.addEventListener("focusin", a), document.addEventListener("focusout", v);
|
|
200
|
-
const w = new MutationObserver(g);
|
|
201
|
-
return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
202
|
-
document.removeEventListener("focusin", a), document.removeEventListener("focusout", v), w.disconnect();
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
}, [r, c, h.paused]), m.useEffect(() => {
|
|
206
|
-
if (c) {
|
|
207
|
-
pt.add(h);
|
|
208
|
-
const a = document.activeElement;
|
|
209
|
-
if (!c.contains(a)) {
|
|
210
|
-
const g = new CustomEvent(Fe, ht);
|
|
211
|
-
c.addEventListener(Fe, l), c.dispatchEvent(g), g.defaultPrevented || (Wn($n(Nt(c)), { select: !0 }), document.activeElement === a && q(c));
|
|
212
|
-
}
|
|
213
|
-
return () => {
|
|
214
|
-
c.removeEventListener(Fe, l), setTimeout(() => {
|
|
215
|
-
const g = new CustomEvent(We, ht);
|
|
216
|
-
c.addEventListener(We, f), c.dispatchEvent(g), g.defaultPrevented || q(a ?? document.body, { select: !0 }), c.removeEventListener(We, f), pt.remove(h);
|
|
217
|
-
}, 0);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
}, [c, l, f, h]);
|
|
221
|
-
const y = m.useCallback(
|
|
222
|
-
(a) => {
|
|
223
|
-
if (!n && !r || h.paused) return;
|
|
224
|
-
const v = a.key === "Tab" && !a.altKey && !a.ctrlKey && !a.metaKey, g = document.activeElement;
|
|
225
|
-
if (v && g) {
|
|
226
|
-
const w = a.currentTarget, [b, x] = Bn(w);
|
|
227
|
-
b && x ? !a.shiftKey && g === x ? (a.preventDefault(), n && q(b, { select: !0 })) : a.shiftKey && g === b && (a.preventDefault(), n && q(x, { select: !0 })) : g === w && a.preventDefault();
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
[n, r, h.paused]
|
|
231
|
-
);
|
|
232
|
-
return /* @__PURE__ */ _(ce.div, { tabIndex: -1, ...s, ref: p, onKeyDown: y });
|
|
233
|
-
});
|
|
234
|
-
Fn.displayName = kn;
|
|
235
|
-
function Wn(e, { select: t = !1 } = {}) {
|
|
236
|
-
const n = document.activeElement;
|
|
237
|
-
for (const r of e)
|
|
238
|
-
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
239
|
-
}
|
|
240
|
-
function Bn(e) {
|
|
241
|
-
const t = Nt(e), n = mt(t, e), r = mt(t.reverse(), e);
|
|
242
|
-
return [n, r];
|
|
243
|
-
}
|
|
244
|
-
function Nt(e) {
|
|
245
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
246
|
-
acceptNode: (r) => {
|
|
247
|
-
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
248
|
-
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
252
|
-
return t;
|
|
253
|
-
}
|
|
254
|
-
function mt(e, t) {
|
|
255
|
-
for (const n of e)
|
|
256
|
-
if (!In(n, { upTo: t })) return n;
|
|
257
|
-
}
|
|
258
|
-
function In(e, { upTo: t }) {
|
|
259
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
260
|
-
for (; e; ) {
|
|
261
|
-
if (t !== void 0 && e === t) return !1;
|
|
262
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
263
|
-
e = e.parentElement;
|
|
264
|
-
}
|
|
265
|
-
return !1;
|
|
266
|
-
}
|
|
267
|
-
function _n(e) {
|
|
268
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
269
|
-
}
|
|
270
|
-
function q(e, { select: t = !1 } = {}) {
|
|
271
|
-
if (e && e.focus) {
|
|
272
|
-
const n = document.activeElement;
|
|
273
|
-
e.focus({ preventScroll: !0 }), e !== n && _n(e) && t && e.select();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
var pt = Hn();
|
|
277
|
-
function Hn() {
|
|
278
|
-
let e = [];
|
|
279
|
-
return {
|
|
280
|
-
add(t) {
|
|
281
|
-
const n = e[0];
|
|
282
|
-
t !== n && (n == null || n.pause()), e = vt(e, t), e.unshift(t);
|
|
283
|
-
},
|
|
284
|
-
remove(t) {
|
|
285
|
-
var n;
|
|
286
|
-
e = vt(e, t), (n = e[0]) == null || n.resume();
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
function vt(e, t) {
|
|
291
|
-
const n = [...e], r = n.indexOf(t);
|
|
292
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
293
|
-
}
|
|
294
|
-
function $n(e) {
|
|
295
|
-
return e.filter((t) => t.tagName !== "A");
|
|
296
|
-
}
|
|
297
|
-
var Vn = m[" useId ".trim().toString()] || (() => {
|
|
298
|
-
}), zn = 0;
|
|
299
|
-
function Bo(e) {
|
|
300
|
-
const [t, n] = m.useState(Vn());
|
|
301
|
-
return Ve(() => {
|
|
302
|
-
n((r) => r ?? String(zn++));
|
|
303
|
-
}, [e]), t ? `radix-${t}` : "";
|
|
304
|
-
}
|
|
305
|
-
const Un = ["top", "right", "bottom", "left"], Z = Math.min, B = Math.max, Se = Math.round, ge = Math.floor, U = (e) => ({
|
|
306
|
-
x: e,
|
|
307
|
-
y: e
|
|
308
|
-
}), Yn = {
|
|
309
|
-
left: "right",
|
|
310
|
-
right: "left",
|
|
311
|
-
bottom: "top",
|
|
312
|
-
top: "bottom"
|
|
313
|
-
}, Xn = {
|
|
314
|
-
start: "end",
|
|
315
|
-
end: "start"
|
|
316
|
-
};
|
|
317
|
-
function Ue(e, t, n) {
|
|
318
|
-
return B(e, Z(t, n));
|
|
319
|
-
}
|
|
320
|
-
function j(e, t) {
|
|
321
|
-
return typeof e == "function" ? e(t) : e;
|
|
322
|
-
}
|
|
323
|
-
function K(e) {
|
|
324
|
-
return e.split("-")[0];
|
|
325
|
-
}
|
|
326
|
-
function ae(e) {
|
|
327
|
-
return e.split("-")[1];
|
|
328
|
-
}
|
|
329
|
-
function Ke(e) {
|
|
330
|
-
return e === "x" ? "y" : "x";
|
|
331
|
-
}
|
|
332
|
-
function qe(e) {
|
|
333
|
-
return e === "y" ? "height" : "width";
|
|
334
|
-
}
|
|
335
|
-
function z(e) {
|
|
336
|
-
return ["top", "bottom"].includes(K(e)) ? "y" : "x";
|
|
337
|
-
}
|
|
338
|
-
function Ze(e) {
|
|
339
|
-
return Ke(z(e));
|
|
340
|
-
}
|
|
341
|
-
function jn(e, t, n) {
|
|
342
|
-
n === void 0 && (n = !1);
|
|
343
|
-
const r = ae(e), o = Ze(e), i = qe(o);
|
|
344
|
-
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
345
|
-
return t.reference[i] > t.floating[i] && (s = Re(s)), [s, Re(s)];
|
|
346
|
-
}
|
|
347
|
-
function Kn(e) {
|
|
348
|
-
const t = Re(e);
|
|
349
|
-
return [Ye(e), t, Ye(t)];
|
|
350
|
-
}
|
|
351
|
-
function Ye(e) {
|
|
352
|
-
return e.replace(/start|end/g, (t) => Xn[t]);
|
|
353
|
-
}
|
|
354
|
-
function qn(e, t, n) {
|
|
355
|
-
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
356
|
-
switch (e) {
|
|
357
|
-
case "top":
|
|
358
|
-
case "bottom":
|
|
359
|
-
return n ? t ? o : r : t ? r : o;
|
|
360
|
-
case "left":
|
|
361
|
-
case "right":
|
|
362
|
-
return t ? i : s;
|
|
363
|
-
default:
|
|
364
|
-
return [];
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
function Zn(e, t, n, r) {
|
|
368
|
-
const o = ae(e);
|
|
369
|
-
let i = qn(K(e), n === "start", r);
|
|
370
|
-
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(Ye)))), i;
|
|
371
|
-
}
|
|
372
|
-
function Re(e) {
|
|
373
|
-
return e.replace(/left|right|bottom|top/g, (t) => Yn[t]);
|
|
374
|
-
}
|
|
375
|
-
function Gn(e) {
|
|
376
|
-
return {
|
|
377
|
-
top: 0,
|
|
378
|
-
right: 0,
|
|
379
|
-
bottom: 0,
|
|
380
|
-
left: 0,
|
|
381
|
-
...e
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
function kt(e) {
|
|
385
|
-
return typeof e != "number" ? Gn(e) : {
|
|
386
|
-
top: e,
|
|
387
|
-
right: e,
|
|
388
|
-
bottom: e,
|
|
389
|
-
left: e
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
function Pe(e) {
|
|
393
|
-
const {
|
|
394
|
-
x: t,
|
|
395
|
-
y: n,
|
|
396
|
-
width: r,
|
|
397
|
-
height: o
|
|
398
|
-
} = e;
|
|
399
|
-
return {
|
|
400
|
-
width: r,
|
|
401
|
-
height: o,
|
|
402
|
-
top: n,
|
|
403
|
-
left: t,
|
|
404
|
-
right: t + r,
|
|
405
|
-
bottom: n + o,
|
|
406
|
-
x: t,
|
|
407
|
-
y: n
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function gt(e, t, n) {
|
|
411
|
-
let {
|
|
412
|
-
reference: r,
|
|
413
|
-
floating: o
|
|
414
|
-
} = e;
|
|
415
|
-
const i = z(t), s = Ze(t), c = qe(s), d = K(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
|
|
416
|
-
let h;
|
|
417
|
-
switch (d) {
|
|
418
|
-
case "top":
|
|
419
|
-
h = {
|
|
420
|
-
x: f,
|
|
421
|
-
y: r.y - o.height
|
|
422
|
-
};
|
|
423
|
-
break;
|
|
424
|
-
case "bottom":
|
|
425
|
-
h = {
|
|
426
|
-
x: f,
|
|
427
|
-
y: r.y + r.height
|
|
428
|
-
};
|
|
429
|
-
break;
|
|
430
|
-
case "right":
|
|
431
|
-
h = {
|
|
432
|
-
x: r.x + r.width,
|
|
433
|
-
y: u
|
|
434
|
-
};
|
|
435
|
-
break;
|
|
436
|
-
case "left":
|
|
437
|
-
h = {
|
|
438
|
-
x: r.x - o.width,
|
|
439
|
-
y: u
|
|
440
|
-
};
|
|
441
|
-
break;
|
|
442
|
-
default:
|
|
443
|
-
h = {
|
|
444
|
-
x: r.x,
|
|
445
|
-
y: r.y
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
switch (ae(t)) {
|
|
449
|
-
case "start":
|
|
450
|
-
h[s] -= p * (n && l ? -1 : 1);
|
|
451
|
-
break;
|
|
452
|
-
case "end":
|
|
453
|
-
h[s] += p * (n && l ? -1 : 1);
|
|
454
|
-
break;
|
|
455
|
-
}
|
|
456
|
-
return h;
|
|
457
|
-
}
|
|
458
|
-
const Qn = async (e, t, n) => {
|
|
459
|
-
const {
|
|
460
|
-
placement: r = "bottom",
|
|
461
|
-
strategy: o = "absolute",
|
|
462
|
-
middleware: i = [],
|
|
463
|
-
platform: s
|
|
464
|
-
} = n, c = i.filter(Boolean), d = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
465
|
-
let l = await s.getElementRects({
|
|
466
|
-
reference: e,
|
|
467
|
-
floating: t,
|
|
468
|
-
strategy: o
|
|
469
|
-
}), {
|
|
470
|
-
x: f,
|
|
471
|
-
y: u
|
|
472
|
-
} = gt(l, r, d), p = r, h = {}, y = 0;
|
|
473
|
-
for (let a = 0; a < c.length; a++) {
|
|
474
|
-
const {
|
|
475
|
-
name: v,
|
|
476
|
-
fn: g
|
|
477
|
-
} = c[a], {
|
|
478
|
-
x: w,
|
|
479
|
-
y: b,
|
|
480
|
-
data: x,
|
|
481
|
-
reset: E
|
|
482
|
-
} = await g({
|
|
483
|
-
x: f,
|
|
484
|
-
y: u,
|
|
485
|
-
initialPlacement: r,
|
|
486
|
-
placement: p,
|
|
487
|
-
strategy: o,
|
|
488
|
-
middlewareData: h,
|
|
489
|
-
rects: l,
|
|
490
|
-
platform: s,
|
|
491
|
-
elements: {
|
|
492
|
-
reference: e,
|
|
493
|
-
floating: t
|
|
494
|
-
}
|
|
495
|
-
});
|
|
496
|
-
f = w ?? f, u = b ?? u, h = {
|
|
497
|
-
...h,
|
|
498
|
-
[v]: {
|
|
499
|
-
...h[v],
|
|
500
|
-
...x
|
|
501
|
-
}
|
|
502
|
-
}, E && y <= 50 && (y++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (l = E.rects === !0 ? await s.getElementRects({
|
|
503
|
-
reference: e,
|
|
504
|
-
floating: t,
|
|
505
|
-
strategy: o
|
|
506
|
-
}) : E.rects), {
|
|
507
|
-
x: f,
|
|
508
|
-
y: u
|
|
509
|
-
} = gt(l, p, d)), a = -1);
|
|
510
|
-
}
|
|
511
|
-
return {
|
|
512
|
-
x: f,
|
|
513
|
-
y: u,
|
|
514
|
-
placement: p,
|
|
515
|
-
strategy: o,
|
|
516
|
-
middlewareData: h
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
|
-
async function fe(e, t) {
|
|
520
|
-
var n;
|
|
521
|
-
t === void 0 && (t = {});
|
|
522
|
-
const {
|
|
523
|
-
x: r,
|
|
524
|
-
y: o,
|
|
525
|
-
platform: i,
|
|
526
|
-
rects: s,
|
|
527
|
-
elements: c,
|
|
528
|
-
strategy: d
|
|
529
|
-
} = e, {
|
|
530
|
-
boundary: l = "clippingAncestors",
|
|
531
|
-
rootBoundary: f = "viewport",
|
|
532
|
-
elementContext: u = "floating",
|
|
533
|
-
altBoundary: p = !1,
|
|
534
|
-
padding: h = 0
|
|
535
|
-
} = j(t, e), y = kt(h), v = c[p ? u === "floating" ? "reference" : "floating" : u], g = Pe(await i.getClippingRect({
|
|
536
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
537
|
-
boundary: l,
|
|
538
|
-
rootBoundary: f,
|
|
539
|
-
strategy: d
|
|
540
|
-
})), w = u === "floating" ? {
|
|
541
|
-
x: r,
|
|
542
|
-
y: o,
|
|
543
|
-
width: s.floating.width,
|
|
544
|
-
height: s.floating.height
|
|
545
|
-
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
546
|
-
x: 1,
|
|
547
|
-
y: 1
|
|
548
|
-
} : {
|
|
549
|
-
x: 1,
|
|
550
|
-
y: 1
|
|
551
|
-
}, E = Pe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
552
|
-
elements: c,
|
|
553
|
-
rect: w,
|
|
554
|
-
offsetParent: b,
|
|
555
|
-
strategy: d
|
|
556
|
-
}) : w);
|
|
557
|
-
return {
|
|
558
|
-
top: (g.top - E.top + y.top) / x.y,
|
|
559
|
-
bottom: (E.bottom - g.bottom + y.bottom) / x.y,
|
|
560
|
-
left: (g.left - E.left + y.left) / x.x,
|
|
561
|
-
right: (E.right - g.right + y.right) / x.x
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
const Jn = (e) => ({
|
|
565
|
-
name: "arrow",
|
|
566
|
-
options: e,
|
|
567
|
-
async fn(t) {
|
|
568
|
-
const {
|
|
569
|
-
x: n,
|
|
570
|
-
y: r,
|
|
571
|
-
placement: o,
|
|
572
|
-
rects: i,
|
|
573
|
-
platform: s,
|
|
574
|
-
elements: c,
|
|
575
|
-
middlewareData: d
|
|
576
|
-
} = t, {
|
|
577
|
-
element: l,
|
|
578
|
-
padding: f = 0
|
|
579
|
-
} = j(e, t) || {};
|
|
580
|
-
if (l == null)
|
|
581
|
-
return {};
|
|
582
|
-
const u = kt(f), p = {
|
|
583
|
-
x: n,
|
|
584
|
-
y: r
|
|
585
|
-
}, h = Ze(o), y = qe(h), a = await s.getDimensions(l), v = h === "y", g = v ? "top" : "left", w = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", x = i.reference[y] + i.reference[h] - p[h] - i.floating[y], E = p[h] - i.reference[h], A = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
586
|
-
let C = A ? A[b] : 0;
|
|
587
|
-
(!C || !await (s.isElement == null ? void 0 : s.isElement(A))) && (C = c.floating[b] || i.floating[y]);
|
|
588
|
-
const R = x / 2 - E / 2, T = C / 2 - a[y] / 2 - 1, P = Z(u[g], T), k = Z(u[w], T), F = P, L = C - a[y] - k, O = C / 2 - a[y] / 2 + R, W = Ue(F, O, L), D = !d.arrow && ae(o) != null && O !== W && i.reference[y] / 2 - (O < F ? P : k) - a[y] / 2 < 0, M = D ? O < F ? O - F : O - L : 0;
|
|
589
|
-
return {
|
|
590
|
-
[h]: p[h] + M,
|
|
591
|
-
data: {
|
|
592
|
-
[h]: W,
|
|
593
|
-
centerOffset: O - W - M,
|
|
594
|
-
...D && {
|
|
595
|
-
alignmentOffset: M
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
reset: D
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
}), er = function(e) {
|
|
602
|
-
return e === void 0 && (e = {}), {
|
|
603
|
-
name: "flip",
|
|
604
|
-
options: e,
|
|
605
|
-
async fn(t) {
|
|
606
|
-
var n, r;
|
|
607
|
-
const {
|
|
608
|
-
placement: o,
|
|
609
|
-
middlewareData: i,
|
|
610
|
-
rects: s,
|
|
611
|
-
initialPlacement: c,
|
|
612
|
-
platform: d,
|
|
613
|
-
elements: l
|
|
614
|
-
} = t, {
|
|
615
|
-
mainAxis: f = !0,
|
|
616
|
-
crossAxis: u = !0,
|
|
617
|
-
fallbackPlacements: p,
|
|
618
|
-
fallbackStrategy: h = "bestFit",
|
|
619
|
-
fallbackAxisSideDirection: y = "none",
|
|
620
|
-
flipAlignment: a = !0,
|
|
621
|
-
...v
|
|
622
|
-
} = j(e, t);
|
|
623
|
-
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
624
|
-
return {};
|
|
625
|
-
const g = K(o), w = z(c), b = K(c) === c, x = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), E = p || (b || !a ? [Re(c)] : Kn(c)), A = y !== "none";
|
|
626
|
-
!p && A && E.push(...Zn(c, a, y, x));
|
|
627
|
-
const C = [c, ...E], R = await fe(t, v), T = [];
|
|
628
|
-
let P = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
629
|
-
if (f && T.push(R[g]), u) {
|
|
630
|
-
const O = jn(o, s, x);
|
|
631
|
-
T.push(R[O[0]], R[O[1]]);
|
|
632
|
-
}
|
|
633
|
-
if (P = [...P, {
|
|
634
|
-
placement: o,
|
|
635
|
-
overflows: T
|
|
636
|
-
}], !T.every((O) => O <= 0)) {
|
|
637
|
-
var k, F;
|
|
638
|
-
const O = (((k = i.flip) == null ? void 0 : k.index) || 0) + 1, W = C[O];
|
|
639
|
-
if (W && (!(u === "alignment" ? w !== z(W) : !1) || // We leave the current main axis only if every placement on that axis
|
|
640
|
-
// overflows the main axis.
|
|
641
|
-
P.every((S) => S.overflows[0] > 0 && z(S.placement) === w)))
|
|
642
|
-
return {
|
|
643
|
-
data: {
|
|
644
|
-
index: O,
|
|
645
|
-
overflows: P
|
|
646
|
-
},
|
|
647
|
-
reset: {
|
|
648
|
-
placement: W
|
|
649
|
-
}
|
|
650
|
-
};
|
|
651
|
-
let D = (F = P.filter((M) => M.overflows[0] <= 0).sort((M, S) => M.overflows[1] - S.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
652
|
-
if (!D)
|
|
653
|
-
switch (h) {
|
|
654
|
-
case "bestFit": {
|
|
655
|
-
var L;
|
|
656
|
-
const M = (L = P.filter((S) => {
|
|
657
|
-
if (A) {
|
|
658
|
-
const N = z(S.placement);
|
|
659
|
-
return N === w || // Create a bias to the `y` side axis due to horizontal
|
|
660
|
-
// reading directions favoring greater width.
|
|
661
|
-
N === "y";
|
|
662
|
-
}
|
|
663
|
-
return !0;
|
|
664
|
-
}).map((S) => [S.placement, S.overflows.filter((N) => N > 0).reduce((N, V) => N + V, 0)]).sort((S, N) => S[1] - N[1])[0]) == null ? void 0 : L[0];
|
|
665
|
-
M && (D = M);
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
case "initialPlacement":
|
|
669
|
-
D = c;
|
|
670
|
-
break;
|
|
671
|
-
}
|
|
672
|
-
if (o !== D)
|
|
673
|
-
return {
|
|
674
|
-
reset: {
|
|
675
|
-
placement: D
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
return {};
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
};
|
|
683
|
-
function yt(e, t) {
|
|
684
|
-
return {
|
|
685
|
-
top: e.top - t.height,
|
|
686
|
-
right: e.right - t.width,
|
|
687
|
-
bottom: e.bottom - t.height,
|
|
688
|
-
left: e.left - t.width
|
|
689
|
-
};
|
|
690
|
-
}
|
|
691
|
-
function wt(e) {
|
|
692
|
-
return Un.some((t) => e[t] >= 0);
|
|
693
|
-
}
|
|
694
|
-
const tr = function(e) {
|
|
695
|
-
return e === void 0 && (e = {}), {
|
|
696
|
-
name: "hide",
|
|
697
|
-
options: e,
|
|
698
|
-
async fn(t) {
|
|
699
|
-
const {
|
|
700
|
-
rects: n
|
|
701
|
-
} = t, {
|
|
702
|
-
strategy: r = "referenceHidden",
|
|
703
|
-
...o
|
|
704
|
-
} = j(e, t);
|
|
705
|
-
switch (r) {
|
|
706
|
-
case "referenceHidden": {
|
|
707
|
-
const i = await fe(t, {
|
|
708
|
-
...o,
|
|
709
|
-
elementContext: "reference"
|
|
710
|
-
}), s = yt(i, n.reference);
|
|
711
|
-
return {
|
|
712
|
-
data: {
|
|
713
|
-
referenceHiddenOffsets: s,
|
|
714
|
-
referenceHidden: wt(s)
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
case "escaped": {
|
|
719
|
-
const i = await fe(t, {
|
|
720
|
-
...o,
|
|
721
|
-
altBoundary: !0
|
|
722
|
-
}), s = yt(i, n.floating);
|
|
723
|
-
return {
|
|
724
|
-
data: {
|
|
725
|
-
escapedOffsets: s,
|
|
726
|
-
escaped: wt(s)
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
default:
|
|
731
|
-
return {};
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
};
|
|
735
|
-
};
|
|
736
|
-
async function nr(e, t) {
|
|
737
|
-
const {
|
|
738
|
-
placement: n,
|
|
739
|
-
platform: r,
|
|
740
|
-
elements: o
|
|
741
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = K(n), c = ae(n), d = z(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && d ? -1 : 1, u = j(t, e);
|
|
742
|
-
let {
|
|
743
|
-
mainAxis: p,
|
|
744
|
-
crossAxis: h,
|
|
745
|
-
alignmentAxis: y
|
|
746
|
-
} = typeof u == "number" ? {
|
|
747
|
-
mainAxis: u,
|
|
748
|
-
crossAxis: 0,
|
|
749
|
-
alignmentAxis: null
|
|
750
|
-
} : {
|
|
751
|
-
mainAxis: u.mainAxis || 0,
|
|
752
|
-
crossAxis: u.crossAxis || 0,
|
|
753
|
-
alignmentAxis: u.alignmentAxis
|
|
754
|
-
};
|
|
755
|
-
return c && typeof y == "number" && (h = c === "end" ? y * -1 : y), d ? {
|
|
756
|
-
x: h * f,
|
|
757
|
-
y: p * l
|
|
758
|
-
} : {
|
|
759
|
-
x: p * l,
|
|
760
|
-
y: h * f
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
const rr = function(e) {
|
|
764
|
-
return e === void 0 && (e = 0), {
|
|
765
|
-
name: "offset",
|
|
766
|
-
options: e,
|
|
767
|
-
async fn(t) {
|
|
768
|
-
var n, r;
|
|
769
|
-
const {
|
|
770
|
-
x: o,
|
|
771
|
-
y: i,
|
|
772
|
-
placement: s,
|
|
773
|
-
middlewareData: c
|
|
774
|
-
} = t, d = await nr(t, e);
|
|
775
|
-
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
776
|
-
x: o + d.x,
|
|
777
|
-
y: i + d.y,
|
|
778
|
-
data: {
|
|
779
|
-
...d,
|
|
780
|
-
placement: s
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
}
|
|
784
|
-
};
|
|
785
|
-
}, or = function(e) {
|
|
786
|
-
return e === void 0 && (e = {}), {
|
|
787
|
-
name: "shift",
|
|
788
|
-
options: e,
|
|
789
|
-
async fn(t) {
|
|
790
|
-
const {
|
|
791
|
-
x: n,
|
|
792
|
-
y: r,
|
|
793
|
-
placement: o
|
|
794
|
-
} = t, {
|
|
795
|
-
mainAxis: i = !0,
|
|
796
|
-
crossAxis: s = !1,
|
|
797
|
-
limiter: c = {
|
|
798
|
-
fn: (v) => {
|
|
799
|
-
let {
|
|
800
|
-
x: g,
|
|
801
|
-
y: w
|
|
802
|
-
} = v;
|
|
803
|
-
return {
|
|
804
|
-
x: g,
|
|
805
|
-
y: w
|
|
806
|
-
};
|
|
807
|
-
}
|
|
808
|
-
},
|
|
809
|
-
...d
|
|
810
|
-
} = j(e, t), l = {
|
|
811
|
-
x: n,
|
|
812
|
-
y: r
|
|
813
|
-
}, f = await fe(t, d), u = z(K(o)), p = Ke(u);
|
|
814
|
-
let h = l[p], y = l[u];
|
|
815
|
-
if (i) {
|
|
816
|
-
const v = p === "y" ? "top" : "left", g = p === "y" ? "bottom" : "right", w = h + f[v], b = h - f[g];
|
|
817
|
-
h = Ue(w, h, b);
|
|
818
|
-
}
|
|
819
|
-
if (s) {
|
|
820
|
-
const v = u === "y" ? "top" : "left", g = u === "y" ? "bottom" : "right", w = y + f[v], b = y - f[g];
|
|
821
|
-
y = Ue(w, y, b);
|
|
822
|
-
}
|
|
823
|
-
const a = c.fn({
|
|
824
|
-
...t,
|
|
825
|
-
[p]: h,
|
|
826
|
-
[u]: y
|
|
827
|
-
});
|
|
828
|
-
return {
|
|
829
|
-
...a,
|
|
830
|
-
data: {
|
|
831
|
-
x: a.x - n,
|
|
832
|
-
y: a.y - r,
|
|
833
|
-
enabled: {
|
|
834
|
-
[p]: i,
|
|
835
|
-
[u]: s
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
};
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
}, ir = function(e) {
|
|
842
|
-
return e === void 0 && (e = {}), {
|
|
843
|
-
options: e,
|
|
844
|
-
fn(t) {
|
|
845
|
-
const {
|
|
846
|
-
x: n,
|
|
847
|
-
y: r,
|
|
848
|
-
placement: o,
|
|
849
|
-
rects: i,
|
|
850
|
-
middlewareData: s
|
|
851
|
-
} = t, {
|
|
852
|
-
offset: c = 0,
|
|
853
|
-
mainAxis: d = !0,
|
|
854
|
-
crossAxis: l = !0
|
|
855
|
-
} = j(e, t), f = {
|
|
856
|
-
x: n,
|
|
857
|
-
y: r
|
|
858
|
-
}, u = z(o), p = Ke(u);
|
|
859
|
-
let h = f[p], y = f[u];
|
|
860
|
-
const a = j(c, t), v = typeof a == "number" ? {
|
|
861
|
-
mainAxis: a,
|
|
862
|
-
crossAxis: 0
|
|
863
|
-
} : {
|
|
864
|
-
mainAxis: 0,
|
|
865
|
-
crossAxis: 0,
|
|
866
|
-
...a
|
|
867
|
-
};
|
|
868
|
-
if (d) {
|
|
869
|
-
const b = p === "y" ? "height" : "width", x = i.reference[p] - i.floating[b] + v.mainAxis, E = i.reference[p] + i.reference[b] - v.mainAxis;
|
|
870
|
-
h < x ? h = x : h > E && (h = E);
|
|
871
|
-
}
|
|
872
|
-
if (l) {
|
|
873
|
-
var g, w;
|
|
874
|
-
const b = p === "y" ? "width" : "height", x = ["top", "left"].includes(K(o)), E = i.reference[u] - i.floating[b] + (x && ((g = s.offset) == null ? void 0 : g[u]) || 0) + (x ? 0 : v.crossAxis), A = i.reference[u] + i.reference[b] + (x ? 0 : ((w = s.offset) == null ? void 0 : w[u]) || 0) - (x ? v.crossAxis : 0);
|
|
875
|
-
y < E ? y = E : y > A && (y = A);
|
|
876
|
-
}
|
|
877
|
-
return {
|
|
878
|
-
[p]: h,
|
|
879
|
-
[u]: y
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
};
|
|
883
|
-
}, sr = function(e) {
|
|
884
|
-
return e === void 0 && (e = {}), {
|
|
885
|
-
name: "size",
|
|
886
|
-
options: e,
|
|
887
|
-
async fn(t) {
|
|
888
|
-
var n, r;
|
|
889
|
-
const {
|
|
890
|
-
placement: o,
|
|
891
|
-
rects: i,
|
|
892
|
-
platform: s,
|
|
893
|
-
elements: c
|
|
894
|
-
} = t, {
|
|
895
|
-
apply: d = () => {
|
|
896
|
-
},
|
|
897
|
-
...l
|
|
898
|
-
} = j(e, t), f = await fe(t, l), u = K(o), p = ae(o), h = z(o) === "y", {
|
|
899
|
-
width: y,
|
|
900
|
-
height: a
|
|
901
|
-
} = i.floating;
|
|
902
|
-
let v, g;
|
|
903
|
-
u === "top" || u === "bottom" ? (v = u, g = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (g = u, v = p === "end" ? "top" : "bottom");
|
|
904
|
-
const w = a - f.top - f.bottom, b = y - f.left - f.right, x = Z(a - f[v], w), E = Z(y - f[g], b), A = !t.middlewareData.shift;
|
|
905
|
-
let C = x, R = E;
|
|
906
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = b), (r = t.middlewareData.shift) != null && r.enabled.y && (C = w), A && !p) {
|
|
907
|
-
const P = B(f.left, 0), k = B(f.right, 0), F = B(f.top, 0), L = B(f.bottom, 0);
|
|
908
|
-
h ? R = y - 2 * (P !== 0 || k !== 0 ? P + k : B(f.left, f.right)) : C = a - 2 * (F !== 0 || L !== 0 ? F + L : B(f.top, f.bottom));
|
|
909
|
-
}
|
|
910
|
-
await d({
|
|
911
|
-
...t,
|
|
912
|
-
availableWidth: R,
|
|
913
|
-
availableHeight: C
|
|
914
|
-
});
|
|
915
|
-
const T = await s.getDimensions(c.floating);
|
|
916
|
-
return y !== T.width || a !== T.height ? {
|
|
917
|
-
reset: {
|
|
918
|
-
rects: !0
|
|
919
|
-
}
|
|
920
|
-
} : {};
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
};
|
|
924
|
-
function Te() {
|
|
925
|
-
return typeof window < "u";
|
|
926
|
-
}
|
|
927
|
-
function le(e) {
|
|
928
|
-
return Ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
929
|
-
}
|
|
930
|
-
function I(e) {
|
|
931
|
-
var t;
|
|
932
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
933
|
-
}
|
|
934
|
-
function X(e) {
|
|
935
|
-
var t;
|
|
936
|
-
return (t = (Ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
937
|
-
}
|
|
938
|
-
function Ft(e) {
|
|
939
|
-
return Te() ? e instanceof Node || e instanceof I(e).Node : !1;
|
|
940
|
-
}
|
|
941
|
-
function H(e) {
|
|
942
|
-
return Te() ? e instanceof Element || e instanceof I(e).Element : !1;
|
|
943
|
-
}
|
|
944
|
-
function Y(e) {
|
|
945
|
-
return Te() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
|
|
946
|
-
}
|
|
947
|
-
function xt(e) {
|
|
948
|
-
return !Te() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
|
|
949
|
-
}
|
|
950
|
-
function me(e) {
|
|
951
|
-
const {
|
|
952
|
-
overflow: t,
|
|
953
|
-
overflowX: n,
|
|
954
|
-
overflowY: r,
|
|
955
|
-
display: o
|
|
956
|
-
} = $(e);
|
|
957
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
958
|
-
}
|
|
959
|
-
function cr(e) {
|
|
960
|
-
return ["table", "td", "th"].includes(le(e));
|
|
961
|
-
}
|
|
962
|
-
function Le(e) {
|
|
963
|
-
return [":popover-open", ":modal"].some((t) => {
|
|
964
|
-
try {
|
|
965
|
-
return e.matches(t);
|
|
966
|
-
} catch {
|
|
967
|
-
return !1;
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
function Ge(e) {
|
|
972
|
-
const t = Qe(), n = H(e) ? $(e) : e;
|
|
973
|
-
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));
|
|
974
|
-
}
|
|
975
|
-
function ar(e) {
|
|
976
|
-
let t = G(e);
|
|
977
|
-
for (; Y(t) && !se(t); ) {
|
|
978
|
-
if (Ge(t))
|
|
979
|
-
return t;
|
|
980
|
-
if (Le(t))
|
|
981
|
-
return null;
|
|
982
|
-
t = G(t);
|
|
983
|
-
}
|
|
984
|
-
return null;
|
|
985
|
-
}
|
|
986
|
-
function Qe() {
|
|
987
|
-
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
988
|
-
}
|
|
989
|
-
function se(e) {
|
|
990
|
-
return ["html", "body", "#document"].includes(le(e));
|
|
991
|
-
}
|
|
992
|
-
function $(e) {
|
|
993
|
-
return I(e).getComputedStyle(e);
|
|
994
|
-
}
|
|
995
|
-
function De(e) {
|
|
996
|
-
return H(e) ? {
|
|
997
|
-
scrollLeft: e.scrollLeft,
|
|
998
|
-
scrollTop: e.scrollTop
|
|
999
|
-
} : {
|
|
1000
|
-
scrollLeft: e.scrollX,
|
|
1001
|
-
scrollTop: e.scrollY
|
|
1002
|
-
};
|
|
1003
|
-
}
|
|
1004
|
-
function G(e) {
|
|
1005
|
-
if (le(e) === "html")
|
|
1006
|
-
return e;
|
|
1007
|
-
const t = (
|
|
1008
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
1009
|
-
e.assignedSlot || // DOM Element detected.
|
|
1010
|
-
e.parentNode || // ShadowRoot detected.
|
|
1011
|
-
xt(e) && e.host || // Fallback.
|
|
1012
|
-
X(e)
|
|
1013
|
-
);
|
|
1014
|
-
return xt(t) ? t.host : t;
|
|
1015
|
-
}
|
|
1016
|
-
function Wt(e) {
|
|
1017
|
-
const t = G(e);
|
|
1018
|
-
return se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && me(t) ? t : Wt(t);
|
|
1019
|
-
}
|
|
1020
|
-
function de(e, t, n) {
|
|
1021
|
-
var r;
|
|
1022
|
-
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1023
|
-
const o = Wt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = I(o);
|
|
1024
|
-
if (i) {
|
|
1025
|
-
const c = Xe(s);
|
|
1026
|
-
return t.concat(s, s.visualViewport || [], me(o) ? o : [], c && n ? de(c) : []);
|
|
1027
|
-
}
|
|
1028
|
-
return t.concat(o, de(o, [], n));
|
|
1029
|
-
}
|
|
1030
|
-
function Xe(e) {
|
|
1031
|
-
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1032
|
-
}
|
|
1033
|
-
function Bt(e) {
|
|
1034
|
-
const t = $(e);
|
|
1035
|
-
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1036
|
-
const o = Y(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Se(n) !== i || Se(r) !== s;
|
|
1037
|
-
return c && (n = i, r = s), {
|
|
1038
|
-
width: n,
|
|
1039
|
-
height: r,
|
|
1040
|
-
$: c
|
|
1041
|
-
};
|
|
1042
|
-
}
|
|
1043
|
-
function Je(e) {
|
|
1044
|
-
return H(e) ? e : e.contextElement;
|
|
1045
|
-
}
|
|
1046
|
-
function re(e) {
|
|
1047
|
-
const t = Je(e);
|
|
1048
|
-
if (!Y(t))
|
|
1049
|
-
return U(1);
|
|
1050
|
-
const n = t.getBoundingClientRect(), {
|
|
1051
|
-
width: r,
|
|
1052
|
-
height: o,
|
|
1053
|
-
$: i
|
|
1054
|
-
} = Bt(t);
|
|
1055
|
-
let s = (i ? Se(n.width) : n.width) / r, c = (i ? Se(n.height) : n.height) / o;
|
|
1056
|
-
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1057
|
-
x: s,
|
|
1058
|
-
y: c
|
|
1059
|
-
};
|
|
1060
|
-
}
|
|
1061
|
-
const lr = /* @__PURE__ */ U(0);
|
|
1062
|
-
function It(e) {
|
|
1063
|
-
const t = I(e);
|
|
1064
|
-
return !Qe() || !t.visualViewport ? lr : {
|
|
1065
|
-
x: t.visualViewport.offsetLeft,
|
|
1066
|
-
y: t.visualViewport.offsetTop
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
function ur(e, t, n) {
|
|
1070
|
-
return t === void 0 && (t = !1), !n || t && n !== I(e) ? !1 : t;
|
|
1071
|
-
}
|
|
1072
|
-
function J(e, t, n, r) {
|
|
1073
|
-
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1074
|
-
const o = e.getBoundingClientRect(), i = Je(e);
|
|
1075
|
-
let s = U(1);
|
|
1076
|
-
t && (r ? H(r) && (s = re(r)) : s = re(e));
|
|
1077
|
-
const c = ur(i, n, r) ? It(i) : U(0);
|
|
1078
|
-
let d = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, f = o.width / s.x, u = o.height / s.y;
|
|
1079
|
-
if (i) {
|
|
1080
|
-
const p = I(i), h = r && H(r) ? I(r) : r;
|
|
1081
|
-
let y = p, a = Xe(y);
|
|
1082
|
-
for (; a && r && h !== y; ) {
|
|
1083
|
-
const v = re(a), g = a.getBoundingClientRect(), w = $(a), b = g.left + (a.clientLeft + parseFloat(w.paddingLeft)) * v.x, x = g.top + (a.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
1084
|
-
d *= v.x, l *= v.y, f *= v.x, u *= v.y, d += b, l += x, y = I(a), a = Xe(y);
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
return Pe({
|
|
1088
|
-
width: f,
|
|
1089
|
-
height: u,
|
|
1090
|
-
x: d,
|
|
1091
|
-
y: l
|
|
1092
|
-
});
|
|
1093
|
-
}
|
|
1094
|
-
function et(e, t) {
|
|
1095
|
-
const n = De(e).scrollLeft;
|
|
1096
|
-
return t ? t.left + n : J(X(e)).left + n;
|
|
1097
|
-
}
|
|
1098
|
-
function _t(e, t, n) {
|
|
1099
|
-
n === void 0 && (n = !1);
|
|
1100
|
-
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1101
|
-
// RTL <body> scrollbar.
|
|
1102
|
-
et(e, r)
|
|
1103
|
-
)), i = r.top + t.scrollTop;
|
|
1104
|
-
return {
|
|
1105
|
-
x: o,
|
|
1106
|
-
y: i
|
|
1107
|
-
};
|
|
1108
|
-
}
|
|
1109
|
-
function fr(e) {
|
|
1110
|
-
let {
|
|
1111
|
-
elements: t,
|
|
1112
|
-
rect: n,
|
|
1113
|
-
offsetParent: r,
|
|
1114
|
-
strategy: o
|
|
1115
|
-
} = e;
|
|
1116
|
-
const i = o === "fixed", s = X(r), c = t ? Le(t.floating) : !1;
|
|
1117
|
-
if (r === s || c && i)
|
|
1118
|
-
return n;
|
|
1119
|
-
let d = {
|
|
1120
|
-
scrollLeft: 0,
|
|
1121
|
-
scrollTop: 0
|
|
1122
|
-
}, l = U(1);
|
|
1123
|
-
const f = U(0), u = Y(r);
|
|
1124
|
-
if ((u || !u && !i) && ((le(r) !== "body" || me(s)) && (d = De(r)), Y(r))) {
|
|
1125
|
-
const h = J(r);
|
|
1126
|
-
l = re(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
|
|
1127
|
-
}
|
|
1128
|
-
const p = s && !u && !i ? _t(s, d, !0) : U(0);
|
|
1129
|
-
return {
|
|
1130
|
-
width: n.width * l.x,
|
|
1131
|
-
height: n.height * l.y,
|
|
1132
|
-
x: n.x * l.x - d.scrollLeft * l.x + f.x + p.x,
|
|
1133
|
-
y: n.y * l.y - d.scrollTop * l.y + f.y + p.y
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
function dr(e) {
|
|
1137
|
-
return Array.from(e.getClientRects());
|
|
1138
|
-
}
|
|
1139
|
-
function hr(e) {
|
|
1140
|
-
const t = X(e), n = De(e), r = e.ownerDocument.body, o = B(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = B(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1141
|
-
let s = -n.scrollLeft + et(e);
|
|
1142
|
-
const c = -n.scrollTop;
|
|
1143
|
-
return $(r).direction === "rtl" && (s += B(t.clientWidth, r.clientWidth) - o), {
|
|
1144
|
-
width: o,
|
|
1145
|
-
height: i,
|
|
1146
|
-
x: s,
|
|
1147
|
-
y: c
|
|
1148
|
-
};
|
|
1149
|
-
}
|
|
1150
|
-
function mr(e, t) {
|
|
1151
|
-
const n = I(e), r = X(e), o = n.visualViewport;
|
|
1152
|
-
let i = r.clientWidth, s = r.clientHeight, c = 0, d = 0;
|
|
1153
|
-
if (o) {
|
|
1154
|
-
i = o.width, s = o.height;
|
|
1155
|
-
const l = Qe();
|
|
1156
|
-
(!l || l && t === "fixed") && (c = o.offsetLeft, d = o.offsetTop);
|
|
1157
|
-
}
|
|
1158
|
-
return {
|
|
1159
|
-
width: i,
|
|
1160
|
-
height: s,
|
|
1161
|
-
x: c,
|
|
1162
|
-
y: d
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
|
-
function pr(e, t) {
|
|
1166
|
-
const n = J(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ? re(e) : U(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, d = o * i.x, l = r * i.y;
|
|
1167
|
-
return {
|
|
1168
|
-
width: s,
|
|
1169
|
-
height: c,
|
|
1170
|
-
x: d,
|
|
1171
|
-
y: l
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
|
-
function bt(e, t, n) {
|
|
1175
|
-
let r;
|
|
1176
|
-
if (t === "viewport")
|
|
1177
|
-
r = mr(e, n);
|
|
1178
|
-
else if (t === "document")
|
|
1179
|
-
r = hr(X(e));
|
|
1180
|
-
else if (H(t))
|
|
1181
|
-
r = pr(t, n);
|
|
1182
|
-
else {
|
|
1183
|
-
const o = It(e);
|
|
1184
|
-
r = {
|
|
1185
|
-
x: t.x - o.x,
|
|
1186
|
-
y: t.y - o.y,
|
|
1187
|
-
width: t.width,
|
|
1188
|
-
height: t.height
|
|
1189
|
-
};
|
|
1190
|
-
}
|
|
1191
|
-
return Pe(r);
|
|
1192
|
-
}
|
|
1193
|
-
function Ht(e, t) {
|
|
1194
|
-
const n = G(e);
|
|
1195
|
-
return n === t || !H(n) || se(n) ? !1 : $(n).position === "fixed" || Ht(n, t);
|
|
1196
|
-
}
|
|
1197
|
-
function vr(e, t) {
|
|
1198
|
-
const n = t.get(e);
|
|
1199
|
-
if (n)
|
|
1200
|
-
return n;
|
|
1201
|
-
let r = de(e, [], !1).filter((c) => H(c) && le(c) !== "body"), o = null;
|
|
1202
|
-
const i = $(e).position === "fixed";
|
|
1203
|
-
let s = i ? G(e) : e;
|
|
1204
|
-
for (; H(s) && !se(s); ) {
|
|
1205
|
-
const c = $(s), d = Ge(s);
|
|
1206
|
-
!d && c.position === "fixed" && (o = null), (i ? !d && !o : !d && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || me(s) && !d && Ht(e, s)) ? r = r.filter((f) => f !== s) : o = c, s = G(s);
|
|
1207
|
-
}
|
|
1208
|
-
return t.set(e, r), r;
|
|
1209
|
-
}
|
|
1210
|
-
function gr(e) {
|
|
1211
|
-
let {
|
|
1212
|
-
element: t,
|
|
1213
|
-
boundary: n,
|
|
1214
|
-
rootBoundary: r,
|
|
1215
|
-
strategy: o
|
|
1216
|
-
} = e;
|
|
1217
|
-
const s = [...n === "clippingAncestors" ? Le(t) ? [] : vr(t, this._c) : [].concat(n), r], c = s[0], d = s.reduce((l, f) => {
|
|
1218
|
-
const u = bt(t, f, o);
|
|
1219
|
-
return l.top = B(u.top, l.top), l.right = Z(u.right, l.right), l.bottom = Z(u.bottom, l.bottom), l.left = B(u.left, l.left), l;
|
|
1220
|
-
}, bt(t, c, o));
|
|
1221
|
-
return {
|
|
1222
|
-
width: d.right - d.left,
|
|
1223
|
-
height: d.bottom - d.top,
|
|
1224
|
-
x: d.left,
|
|
1225
|
-
y: d.top
|
|
1226
|
-
};
|
|
1227
|
-
}
|
|
1228
|
-
function yr(e) {
|
|
1229
|
-
const {
|
|
1230
|
-
width: t,
|
|
1231
|
-
height: n
|
|
1232
|
-
} = Bt(e);
|
|
1233
|
-
return {
|
|
1234
|
-
width: t,
|
|
1235
|
-
height: n
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
function wr(e, t, n) {
|
|
1239
|
-
const r = Y(t), o = X(t), i = n === "fixed", s = J(e, !0, i, t);
|
|
1240
|
-
let c = {
|
|
1241
|
-
scrollLeft: 0,
|
|
1242
|
-
scrollTop: 0
|
|
1243
|
-
};
|
|
1244
|
-
const d = U(0);
|
|
1245
|
-
function l() {
|
|
1246
|
-
d.x = et(o);
|
|
1247
|
-
}
|
|
1248
|
-
if (r || !r && !i)
|
|
1249
|
-
if ((le(t) !== "body" || me(o)) && (c = De(t)), r) {
|
|
1250
|
-
const h = J(t, !0, i, t);
|
|
1251
|
-
d.x = h.x + t.clientLeft, d.y = h.y + t.clientTop;
|
|
1252
|
-
} else o && l();
|
|
1253
|
-
i && !r && o && l();
|
|
1254
|
-
const f = o && !r && !i ? _t(o, c) : U(0), u = s.left + c.scrollLeft - d.x - f.x, p = s.top + c.scrollTop - d.y - f.y;
|
|
1255
|
-
return {
|
|
1256
|
-
x: u,
|
|
1257
|
-
y: p,
|
|
1258
|
-
width: s.width,
|
|
1259
|
-
height: s.height
|
|
1260
|
-
};
|
|
1261
|
-
}
|
|
1262
|
-
function Be(e) {
|
|
1263
|
-
return $(e).position === "static";
|
|
1264
|
-
}
|
|
1265
|
-
function Et(e, t) {
|
|
1266
|
-
if (!Y(e) || $(e).position === "fixed")
|
|
1267
|
-
return null;
|
|
1268
|
-
if (t)
|
|
1269
|
-
return t(e);
|
|
1270
|
-
let n = e.offsetParent;
|
|
1271
|
-
return X(e) === n && (n = n.ownerDocument.body), n;
|
|
1272
|
-
}
|
|
1273
|
-
function $t(e, t) {
|
|
1274
|
-
const n = I(e);
|
|
1275
|
-
if (Le(e))
|
|
1276
|
-
return n;
|
|
1277
|
-
if (!Y(e)) {
|
|
1278
|
-
let o = G(e);
|
|
1279
|
-
for (; o && !se(o); ) {
|
|
1280
|
-
if (H(o) && !Be(o))
|
|
1281
|
-
return o;
|
|
1282
|
-
o = G(o);
|
|
1283
|
-
}
|
|
1284
|
-
return n;
|
|
1285
|
-
}
|
|
1286
|
-
let r = Et(e, t);
|
|
1287
|
-
for (; r && cr(r) && Be(r); )
|
|
1288
|
-
r = Et(r, t);
|
|
1289
|
-
return r && se(r) && Be(r) && !Ge(r) ? n : r || ar(e) || n;
|
|
1290
|
-
}
|
|
1291
|
-
const xr = async function(e) {
|
|
1292
|
-
const t = this.getOffsetParent || $t, n = this.getDimensions, r = await n(e.floating);
|
|
1293
|
-
return {
|
|
1294
|
-
reference: wr(e.reference, await t(e.floating), e.strategy),
|
|
1295
|
-
floating: {
|
|
1296
|
-
x: 0,
|
|
1297
|
-
y: 0,
|
|
1298
|
-
width: r.width,
|
|
1299
|
-
height: r.height
|
|
1300
|
-
}
|
|
1301
|
-
};
|
|
1302
|
-
};
|
|
1303
|
-
function br(e) {
|
|
1304
|
-
return $(e).direction === "rtl";
|
|
1305
|
-
}
|
|
1306
|
-
const Er = {
|
|
1307
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: fr,
|
|
1308
|
-
getDocumentElement: X,
|
|
1309
|
-
getClippingRect: gr,
|
|
1310
|
-
getOffsetParent: $t,
|
|
1311
|
-
getElementRects: xr,
|
|
1312
|
-
getClientRects: dr,
|
|
1313
|
-
getDimensions: yr,
|
|
1314
|
-
getScale: re,
|
|
1315
|
-
isElement: H,
|
|
1316
|
-
isRTL: br
|
|
1317
|
-
};
|
|
1318
|
-
function Vt(e, t) {
|
|
1319
|
-
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1320
|
-
}
|
|
1321
|
-
function Cr(e, t) {
|
|
1322
|
-
let n = null, r;
|
|
1323
|
-
const o = X(e);
|
|
1324
|
-
function i() {
|
|
1325
|
-
var c;
|
|
1326
|
-
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
1327
|
-
}
|
|
1328
|
-
function s(c, d) {
|
|
1329
|
-
c === void 0 && (c = !1), d === void 0 && (d = 1), i();
|
|
1330
|
-
const l = e.getBoundingClientRect(), {
|
|
1331
|
-
left: f,
|
|
1332
|
-
top: u,
|
|
1333
|
-
width: p,
|
|
1334
|
-
height: h
|
|
1335
|
-
} = l;
|
|
1336
|
-
if (c || t(), !p || !h)
|
|
1337
|
-
return;
|
|
1338
|
-
const y = ge(u), a = ge(o.clientWidth - (f + p)), v = ge(o.clientHeight - (u + h)), g = ge(f), b = {
|
|
1339
|
-
rootMargin: -y + "px " + -a + "px " + -v + "px " + -g + "px",
|
|
1340
|
-
threshold: B(0, Z(1, d)) || 1
|
|
1341
|
-
};
|
|
1342
|
-
let x = !0;
|
|
1343
|
-
function E(A) {
|
|
1344
|
-
const C = A[0].intersectionRatio;
|
|
1345
|
-
if (C !== d) {
|
|
1346
|
-
if (!x)
|
|
1347
|
-
return s();
|
|
1348
|
-
C ? s(!1, C) : r = setTimeout(() => {
|
|
1349
|
-
s(!1, 1e-7);
|
|
1350
|
-
}, 1e3);
|
|
1351
|
-
}
|
|
1352
|
-
C === 1 && !Vt(l, e.getBoundingClientRect()) && s(), x = !1;
|
|
1353
|
-
}
|
|
1354
|
-
try {
|
|
1355
|
-
n = new IntersectionObserver(E, {
|
|
1356
|
-
...b,
|
|
1357
|
-
// Handle <iframe>s
|
|
1358
|
-
root: o.ownerDocument
|
|
1359
|
-
});
|
|
1360
|
-
} catch {
|
|
1361
|
-
n = new IntersectionObserver(E, b);
|
|
1362
|
-
}
|
|
1363
|
-
n.observe(e);
|
|
1364
|
-
}
|
|
1365
|
-
return s(!0), i;
|
|
1366
|
-
}
|
|
1367
|
-
function Ar(e, t, n, r) {
|
|
1368
|
-
r === void 0 && (r = {});
|
|
1369
|
-
const {
|
|
1370
|
-
ancestorScroll: o = !0,
|
|
1371
|
-
ancestorResize: i = !0,
|
|
1372
|
-
elementResize: s = typeof ResizeObserver == "function",
|
|
1373
|
-
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1374
|
-
animationFrame: d = !1
|
|
1375
|
-
} = r, l = Je(e), f = o || i ? [...l ? de(l) : [], ...de(t)] : [];
|
|
1376
|
-
f.forEach((g) => {
|
|
1377
|
-
o && g.addEventListener("scroll", n, {
|
|
1378
|
-
passive: !0
|
|
1379
|
-
}), i && g.addEventListener("resize", n);
|
|
1380
|
-
});
|
|
1381
|
-
const u = l && c ? Cr(l, n) : null;
|
|
1382
|
-
let p = -1, h = null;
|
|
1383
|
-
s && (h = new ResizeObserver((g) => {
|
|
1384
|
-
let [w] = g;
|
|
1385
|
-
w && w.target === l && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1386
|
-
var b;
|
|
1387
|
-
(b = h) == null || b.observe(t);
|
|
1388
|
-
})), n();
|
|
1389
|
-
}), l && !d && h.observe(l), h.observe(t));
|
|
1390
|
-
let y, a = d ? J(e) : null;
|
|
1391
|
-
d && v();
|
|
1392
|
-
function v() {
|
|
1393
|
-
const g = J(e);
|
|
1394
|
-
a && !Vt(a, g) && n(), a = g, y = requestAnimationFrame(v);
|
|
1395
|
-
}
|
|
1396
|
-
return n(), () => {
|
|
1397
|
-
var g;
|
|
1398
|
-
f.forEach((w) => {
|
|
1399
|
-
o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
1400
|
-
}), u == null || u(), (g = h) == null || g.disconnect(), h = null, d && cancelAnimationFrame(y);
|
|
1401
|
-
};
|
|
1402
|
-
}
|
|
1403
|
-
const Sr = rr, Rr = or, Pr = er, Or = sr, Tr = tr, Ct = Jn, Lr = ir, Dr = (e, t, n) => {
|
|
1404
|
-
const r = /* @__PURE__ */ new Map(), o = {
|
|
1405
|
-
platform: Er,
|
|
1406
|
-
...n
|
|
1407
|
-
}, i = {
|
|
1408
|
-
...o.platform,
|
|
1409
|
-
_c: r
|
|
1410
|
-
};
|
|
1411
|
-
return Qn(e, t, {
|
|
1412
|
-
...o,
|
|
1413
|
-
platform: i
|
|
1414
|
-
});
|
|
1415
|
-
};
|
|
1416
|
-
var Mr = typeof document < "u", Nr = function() {
|
|
1417
|
-
}, Ee = Mr ? vn : Nr;
|
|
1418
|
-
function Oe(e, t) {
|
|
1419
|
-
if (e === t)
|
|
1420
|
-
return !0;
|
|
1421
|
-
if (typeof e != typeof t)
|
|
1422
|
-
return !1;
|
|
1423
|
-
if (typeof e == "function" && e.toString() === t.toString())
|
|
1424
|
-
return !0;
|
|
1425
|
-
let n, r, o;
|
|
1426
|
-
if (e && t && typeof e == "object") {
|
|
1427
|
-
if (Array.isArray(e)) {
|
|
1428
|
-
if (n = e.length, n !== t.length) return !1;
|
|
1429
|
-
for (r = n; r-- !== 0; )
|
|
1430
|
-
if (!Oe(e[r], t[r]))
|
|
1431
|
-
return !1;
|
|
1432
|
-
return !0;
|
|
1433
|
-
}
|
|
1434
|
-
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
1435
|
-
return !1;
|
|
1436
|
-
for (r = n; r-- !== 0; )
|
|
1437
|
-
if (!{}.hasOwnProperty.call(t, o[r]))
|
|
1438
|
-
return !1;
|
|
1439
|
-
for (r = n; r-- !== 0; ) {
|
|
1440
|
-
const i = o[r];
|
|
1441
|
-
if (!(i === "_owner" && e.$$typeof) && !Oe(e[i], t[i]))
|
|
1442
|
-
return !1;
|
|
1443
|
-
}
|
|
1444
|
-
return !0;
|
|
1445
|
-
}
|
|
1446
|
-
return e !== e && t !== t;
|
|
1447
|
-
}
|
|
1448
|
-
function zt(e) {
|
|
1449
|
-
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1450
|
-
}
|
|
1451
|
-
function At(e, t) {
|
|
1452
|
-
const n = zt(e);
|
|
1453
|
-
return Math.round(t * n) / n;
|
|
1454
|
-
}
|
|
1455
|
-
function Ie(e) {
|
|
1456
|
-
const t = m.useRef(e);
|
|
1457
|
-
return Ee(() => {
|
|
1458
|
-
t.current = e;
|
|
1459
|
-
}), t;
|
|
1460
|
-
}
|
|
1461
|
-
function kr(e) {
|
|
1462
|
-
e === void 0 && (e = {});
|
|
1463
|
-
const {
|
|
1464
|
-
placement: t = "bottom",
|
|
1465
|
-
strategy: n = "absolute",
|
|
1466
|
-
middleware: r = [],
|
|
1467
|
-
platform: o,
|
|
1468
|
-
elements: {
|
|
1469
|
-
reference: i,
|
|
1470
|
-
floating: s
|
|
1471
|
-
} = {},
|
|
1472
|
-
transform: c = !0,
|
|
1473
|
-
whileElementsMounted: d,
|
|
1474
|
-
open: l
|
|
1475
|
-
} = e, [f, u] = m.useState({
|
|
1476
|
-
x: 0,
|
|
1477
|
-
y: 0,
|
|
1478
|
-
strategy: n,
|
|
1479
|
-
placement: t,
|
|
1480
|
-
middlewareData: {},
|
|
1481
|
-
isPositioned: !1
|
|
1482
|
-
}), [p, h] = m.useState(r);
|
|
1483
|
-
Oe(p, r) || h(r);
|
|
1484
|
-
const [y, a] = m.useState(null), [v, g] = m.useState(null), w = m.useCallback((S) => {
|
|
1485
|
-
S !== A.current && (A.current = S, a(S));
|
|
1486
|
-
}, []), b = m.useCallback((S) => {
|
|
1487
|
-
S !== C.current && (C.current = S, g(S));
|
|
1488
|
-
}, []), x = i || y, E = s || v, A = m.useRef(null), C = m.useRef(null), R = m.useRef(f), T = d != null, P = Ie(d), k = Ie(o), F = Ie(l), L = m.useCallback(() => {
|
|
1489
|
-
if (!A.current || !C.current)
|
|
1490
|
-
return;
|
|
1491
|
-
const S = {
|
|
1492
|
-
placement: t,
|
|
1493
|
-
strategy: n,
|
|
1494
|
-
middleware: p
|
|
1495
|
-
};
|
|
1496
|
-
k.current && (S.platform = k.current), Dr(A.current, C.current, S).then((N) => {
|
|
1497
|
-
const V = {
|
|
1498
|
-
...N,
|
|
1499
|
-
// The floating element's position may be recomputed while it's closed
|
|
1500
|
-
// but still mounted (such as when transitioning out). To ensure
|
|
1501
|
-
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1502
|
-
// setting it to `true` when `open === false` (must be specified).
|
|
1503
|
-
isPositioned: F.current !== !1
|
|
1504
|
-
};
|
|
1505
|
-
O.current && !Oe(R.current, V) && (R.current = V, xn.flushSync(() => {
|
|
1506
|
-
u(V);
|
|
1507
|
-
}));
|
|
1508
|
-
});
|
|
1509
|
-
}, [p, t, n, k, F]);
|
|
1510
|
-
Ee(() => {
|
|
1511
|
-
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, u((S) => ({
|
|
1512
|
-
...S,
|
|
1513
|
-
isPositioned: !1
|
|
1514
|
-
})));
|
|
1515
|
-
}, [l]);
|
|
1516
|
-
const O = m.useRef(!1);
|
|
1517
|
-
Ee(() => (O.current = !0, () => {
|
|
1518
|
-
O.current = !1;
|
|
1519
|
-
}), []), Ee(() => {
|
|
1520
|
-
if (x && (A.current = x), E && (C.current = E), x && E) {
|
|
1521
|
-
if (P.current)
|
|
1522
|
-
return P.current(x, E, L);
|
|
1523
|
-
L();
|
|
1524
|
-
}
|
|
1525
|
-
}, [x, E, L, P, T]);
|
|
1526
|
-
const W = m.useMemo(() => ({
|
|
1527
|
-
reference: A,
|
|
1528
|
-
floating: C,
|
|
1529
|
-
setReference: w,
|
|
1530
|
-
setFloating: b
|
|
1531
|
-
}), [w, b]), D = m.useMemo(() => ({
|
|
1532
|
-
reference: x,
|
|
1533
|
-
floating: E
|
|
1534
|
-
}), [x, E]), M = m.useMemo(() => {
|
|
1535
|
-
const S = {
|
|
1536
|
-
position: n,
|
|
1537
|
-
left: 0,
|
|
1538
|
-
top: 0
|
|
1539
|
-
};
|
|
1540
|
-
if (!D.floating)
|
|
1541
|
-
return S;
|
|
1542
|
-
const N = At(D.floating, f.x), V = At(D.floating, f.y);
|
|
1543
|
-
return c ? {
|
|
1544
|
-
...S,
|
|
1545
|
-
transform: "translate(" + N + "px, " + V + "px)",
|
|
1546
|
-
...zt(D.floating) >= 1.5 && {
|
|
1547
|
-
willChange: "transform"
|
|
1548
|
-
}
|
|
1549
|
-
} : {
|
|
1550
|
-
position: n,
|
|
1551
|
-
left: N,
|
|
1552
|
-
top: V
|
|
1553
|
-
};
|
|
1554
|
-
}, [n, c, D.floating, f.x, f.y]);
|
|
1555
|
-
return m.useMemo(() => ({
|
|
1556
|
-
...f,
|
|
1557
|
-
update: L,
|
|
1558
|
-
refs: W,
|
|
1559
|
-
elements: D,
|
|
1560
|
-
floatingStyles: M
|
|
1561
|
-
}), [f, L, W, D, M]);
|
|
1562
|
-
}
|
|
1563
|
-
const Fr = (e) => {
|
|
1564
|
-
function t(n) {
|
|
1565
|
-
return {}.hasOwnProperty.call(n, "current");
|
|
1566
|
-
}
|
|
1567
|
-
return {
|
|
1568
|
-
name: "arrow",
|
|
1569
|
-
options: e,
|
|
1570
|
-
fn(n) {
|
|
1571
|
-
const {
|
|
1572
|
-
element: r,
|
|
1573
|
-
padding: o
|
|
1574
|
-
} = typeof e == "function" ? e(n) : e;
|
|
1575
|
-
return r && t(r) ? r.current != null ? Ct({
|
|
1576
|
-
element: r.current,
|
|
1577
|
-
padding: o
|
|
1578
|
-
}).fn(n) : {} : r ? Ct({
|
|
1579
|
-
element: r,
|
|
1580
|
-
padding: o
|
|
1581
|
-
}).fn(n) : {};
|
|
1582
|
-
}
|
|
1583
|
-
};
|
|
1584
|
-
}, Wr = (e, t) => ({
|
|
1585
|
-
...Sr(e),
|
|
1586
|
-
options: [e, t]
|
|
1587
|
-
}), Br = (e, t) => ({
|
|
1588
|
-
...Rr(e),
|
|
1589
|
-
options: [e, t]
|
|
1590
|
-
}), Ir = (e, t) => ({
|
|
1591
|
-
...Lr(e),
|
|
1592
|
-
options: [e, t]
|
|
1593
|
-
}), _r = (e, t) => ({
|
|
1594
|
-
...Pr(e),
|
|
1595
|
-
options: [e, t]
|
|
1596
|
-
}), Hr = (e, t) => ({
|
|
1597
|
-
...Or(e),
|
|
1598
|
-
options: [e, t]
|
|
1599
|
-
}), $r = (e, t) => ({
|
|
1600
|
-
...Tr(e),
|
|
1601
|
-
options: [e, t]
|
|
1602
|
-
}), Vr = (e, t) => ({
|
|
1603
|
-
...Fr(e),
|
|
1604
|
-
options: [e, t]
|
|
1605
|
-
});
|
|
1606
|
-
var zr = "Arrow", Ut = m.forwardRef((e, t) => {
|
|
1607
|
-
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
1608
|
-
return /* @__PURE__ */ _(
|
|
1609
|
-
ce.svg,
|
|
1610
|
-
{
|
|
1611
|
-
...i,
|
|
1612
|
-
ref: t,
|
|
1613
|
-
width: r,
|
|
1614
|
-
height: o,
|
|
1615
|
-
viewBox: "0 0 30 10",
|
|
1616
|
-
preserveAspectRatio: "none",
|
|
1617
|
-
children: e.asChild ? n : /* @__PURE__ */ _("polygon", { points: "0,0 30,0 15,10" })
|
|
1618
|
-
}
|
|
1619
|
-
);
|
|
1620
|
-
});
|
|
1621
|
-
Ut.displayName = zr;
|
|
1622
|
-
var Ur = Ut, tt = "Popper", [Yt, Io] = yn(tt), [Yr, Xt] = Yt(tt), jt = (e) => {
|
|
1623
|
-
const { __scopePopper: t, children: n } = e, [r, o] = m.useState(null);
|
|
1624
|
-
return /* @__PURE__ */ _(Yr, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
1625
|
-
};
|
|
1626
|
-
jt.displayName = tt;
|
|
1627
|
-
var Kt = "PopperAnchor", qt = m.forwardRef(
|
|
1628
|
-
(e, t) => {
|
|
1629
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Xt(Kt, n), s = m.useRef(null), c = he(t, s);
|
|
1630
|
-
return m.useEffect(() => {
|
|
1631
|
-
i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
1632
|
-
}), r ? null : /* @__PURE__ */ _(ce.div, { ...o, ref: c });
|
|
1633
|
-
}
|
|
1634
|
-
);
|
|
1635
|
-
qt.displayName = Kt;
|
|
1636
|
-
var nt = "PopperContent", [Xr, jr] = Yt(nt), Zt = m.forwardRef(
|
|
1637
|
-
(e, t) => {
|
|
1638
|
-
var rt, ot, it, st, ct, at;
|
|
1639
|
-
const {
|
|
1640
|
-
__scopePopper: n,
|
|
1641
|
-
side: r = "bottom",
|
|
1642
|
-
sideOffset: o = 0,
|
|
1643
|
-
align: i = "center",
|
|
1644
|
-
alignOffset: s = 0,
|
|
1645
|
-
arrowPadding: c = 0,
|
|
1646
|
-
avoidCollisions: d = !0,
|
|
1647
|
-
collisionBoundary: l = [],
|
|
1648
|
-
collisionPadding: f = 0,
|
|
1649
|
-
sticky: u = "partial",
|
|
1650
|
-
hideWhenDetached: p = !1,
|
|
1651
|
-
updatePositionStrategy: h = "optimized",
|
|
1652
|
-
onPlaced: y,
|
|
1653
|
-
...a
|
|
1654
|
-
} = e, v = Xt(nt, n), [g, w] = m.useState(null), b = he(t, (ue) => w(ue)), [x, E] = m.useState(null), A = wn(x), C = (A == null ? void 0 : A.width) ?? 0, R = (A == null ? void 0 : A.height) ?? 0, T = r + (i !== "center" ? "-" + i : ""), P = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, k = Array.isArray(l) ? l : [l], F = k.length > 0, L = {
|
|
1655
|
-
padding: P,
|
|
1656
|
-
boundary: k.filter(qr),
|
|
1657
|
-
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1658
|
-
altBoundary: F
|
|
1659
|
-
}, { refs: O, floatingStyles: W, placement: D, isPositioned: M, middlewareData: S } = kr({
|
|
1660
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1661
|
-
strategy: "fixed",
|
|
1662
|
-
placement: T,
|
|
1663
|
-
whileElementsMounted: (...ue) => Ar(...ue, {
|
|
1664
|
-
animationFrame: h === "always"
|
|
1665
|
-
}),
|
|
1666
|
-
elements: {
|
|
1667
|
-
reference: v.anchor
|
|
1668
|
-
},
|
|
1669
|
-
middleware: [
|
|
1670
|
-
Wr({ mainAxis: o + R, alignmentAxis: s }),
|
|
1671
|
-
d && Br({
|
|
1672
|
-
mainAxis: !0,
|
|
1673
|
-
crossAxis: !1,
|
|
1674
|
-
limiter: u === "partial" ? Ir() : void 0,
|
|
1675
|
-
...L
|
|
1676
|
-
}),
|
|
1677
|
-
d && _r({ ...L }),
|
|
1678
|
-
Hr({
|
|
1679
|
-
...L,
|
|
1680
|
-
apply: ({ elements: ue, rects: lt, availableWidth: dn, availableHeight: hn }) => {
|
|
1681
|
-
const { width: mn, height: pn } = lt.reference, ve = ue.floating.style;
|
|
1682
|
-
ve.setProperty("--radix-popper-available-width", `${dn}px`), ve.setProperty("--radix-popper-available-height", `${hn}px`), ve.setProperty("--radix-popper-anchor-width", `${mn}px`), ve.setProperty("--radix-popper-anchor-height", `${pn}px`);
|
|
1683
|
-
}
|
|
1684
|
-
}),
|
|
1685
|
-
x && Vr({ element: x, padding: c }),
|
|
1686
|
-
Zr({ arrowWidth: C, arrowHeight: R }),
|
|
1687
|
-
p && $r({ strategy: "referenceHidden", ...L })
|
|
1688
|
-
]
|
|
1689
|
-
}), [N, V] = Jt(D), pe = ie(y);
|
|
1690
|
-
Ve(() => {
|
|
1691
|
-
M && (pe == null || pe());
|
|
1692
|
-
}, [M, pe]);
|
|
1693
|
-
const cn = (rt = S.arrow) == null ? void 0 : rt.x, an = (ot = S.arrow) == null ? void 0 : ot.y, ln = ((it = S.arrow) == null ? void 0 : it.centerOffset) !== 0, [un, fn] = m.useState();
|
|
1694
|
-
return Ve(() => {
|
|
1695
|
-
g && fn(window.getComputedStyle(g).zIndex);
|
|
1696
|
-
}, [g]), /* @__PURE__ */ _(
|
|
1697
|
-
"div",
|
|
1698
|
-
{
|
|
1699
|
-
ref: O.setFloating,
|
|
1700
|
-
"data-radix-popper-content-wrapper": "",
|
|
1701
|
-
style: {
|
|
1702
|
-
...W,
|
|
1703
|
-
transform: M ? W.transform : "translate(0, -200%)",
|
|
1704
|
-
// keep off the page when measuring
|
|
1705
|
-
minWidth: "max-content",
|
|
1706
|
-
zIndex: un,
|
|
1707
|
-
"--radix-popper-transform-origin": [
|
|
1708
|
-
(st = S.transformOrigin) == null ? void 0 : st.x,
|
|
1709
|
-
(ct = S.transformOrigin) == null ? void 0 : ct.y
|
|
1710
|
-
].join(" "),
|
|
1711
|
-
// hide the content if using the hide middleware and should be hidden
|
|
1712
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1713
|
-
// as if the PopperContent isn't there at all
|
|
1714
|
-
...((at = S.hide) == null ? void 0 : at.referenceHidden) && {
|
|
1715
|
-
visibility: "hidden",
|
|
1716
|
-
pointerEvents: "none"
|
|
1717
|
-
}
|
|
1718
|
-
},
|
|
1719
|
-
dir: e.dir,
|
|
1720
|
-
children: /* @__PURE__ */ _(
|
|
1721
|
-
Xr,
|
|
1722
|
-
{
|
|
1723
|
-
scope: n,
|
|
1724
|
-
placedSide: N,
|
|
1725
|
-
onArrowChange: E,
|
|
1726
|
-
arrowX: cn,
|
|
1727
|
-
arrowY: an,
|
|
1728
|
-
shouldHideArrow: ln,
|
|
1729
|
-
children: /* @__PURE__ */ _(
|
|
1730
|
-
ce.div,
|
|
1731
|
-
{
|
|
1732
|
-
"data-side": N,
|
|
1733
|
-
"data-align": V,
|
|
1734
|
-
...a,
|
|
1735
|
-
ref: b,
|
|
1736
|
-
style: {
|
|
1737
|
-
...a.style,
|
|
1738
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1739
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1740
|
-
animation: M ? void 0 : "none"
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
)
|
|
1744
|
-
}
|
|
1745
|
-
)
|
|
1746
|
-
}
|
|
1747
|
-
);
|
|
1748
|
-
}
|
|
1749
|
-
);
|
|
1750
|
-
Zt.displayName = nt;
|
|
1751
|
-
var Gt = "PopperArrow", Kr = {
|
|
1752
|
-
top: "bottom",
|
|
1753
|
-
right: "left",
|
|
1754
|
-
bottom: "top",
|
|
1755
|
-
left: "right"
|
|
1756
|
-
}, Qt = m.forwardRef(function(t, n) {
|
|
1757
|
-
const { __scopePopper: r, ...o } = t, i = jr(Gt, r), s = Kr[i.placedSide];
|
|
1758
|
-
return (
|
|
1759
|
-
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1760
|
-
// doesn't report size as we'd expect on SVG elements.
|
|
1761
|
-
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1762
|
-
/* @__PURE__ */ _(
|
|
1763
|
-
"span",
|
|
1764
|
-
{
|
|
1765
|
-
ref: i.onArrowChange,
|
|
1766
|
-
style: {
|
|
1767
|
-
position: "absolute",
|
|
1768
|
-
left: i.arrowX,
|
|
1769
|
-
top: i.arrowY,
|
|
1770
|
-
[s]: 0,
|
|
1771
|
-
transformOrigin: {
|
|
1772
|
-
top: "",
|
|
1773
|
-
right: "0 0",
|
|
1774
|
-
bottom: "center 0",
|
|
1775
|
-
left: "100% 0"
|
|
1776
|
-
}[i.placedSide],
|
|
1777
|
-
transform: {
|
|
1778
|
-
top: "translateY(100%)",
|
|
1779
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1780
|
-
bottom: "rotate(180deg)",
|
|
1781
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1782
|
-
}[i.placedSide],
|
|
1783
|
-
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1784
|
-
},
|
|
1785
|
-
children: /* @__PURE__ */ _(
|
|
1786
|
-
Ur,
|
|
1787
|
-
{
|
|
1788
|
-
...o,
|
|
1789
|
-
ref: n,
|
|
1790
|
-
style: {
|
|
1791
|
-
...o.style,
|
|
1792
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
1793
|
-
display: "block"
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
)
|
|
1797
|
-
}
|
|
1798
|
-
)
|
|
1799
|
-
);
|
|
1800
|
-
});
|
|
1801
|
-
Qt.displayName = Gt;
|
|
1802
|
-
function qr(e) {
|
|
1803
|
-
return e !== null;
|
|
1804
|
-
}
|
|
1805
|
-
var Zr = (e) => ({
|
|
1806
|
-
name: "transformOrigin",
|
|
1807
|
-
options: e,
|
|
1808
|
-
fn(t) {
|
|
1809
|
-
var v, g, w;
|
|
1810
|
-
const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [l, f] = Jt(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((g = o.arrow) == null ? void 0 : g.x) ?? 0) + c / 2, h = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + d / 2;
|
|
1811
|
-
let y = "", a = "";
|
|
1812
|
-
return l === "bottom" ? (y = s ? u : `${p}px`, a = `${-d}px`) : l === "top" ? (y = s ? u : `${p}px`, a = `${r.floating.height + d}px`) : l === "right" ? (y = `${-d}px`, a = s ? u : `${h}px`) : l === "left" && (y = `${r.floating.width + d}px`, a = s ? u : `${h}px`), { data: { x: y, y: a } };
|
|
1813
|
-
}
|
|
1814
|
-
});
|
|
1815
|
-
function Jt(e) {
|
|
1816
|
-
const [t, n = "center"] = e.split("-");
|
|
1817
|
-
return [t, n];
|
|
1818
|
-
}
|
|
1819
|
-
var _o = jt, Ho = qt, $o = Zt, Vo = Qt, Gr = function(e) {
|
|
1820
|
-
if (typeof document > "u")
|
|
1821
|
-
return null;
|
|
1822
|
-
var t = Array.isArray(e) ? e[0] : e;
|
|
1823
|
-
return t.ownerDocument.body;
|
|
1824
|
-
}, ee = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {}, _e = 0, en = function(e) {
|
|
1825
|
-
return e && (e.host || en(e.parentNode));
|
|
1826
|
-
}, Qr = function(e, t) {
|
|
1827
|
-
return t.map(function(n) {
|
|
1828
|
-
if (e.contains(n))
|
|
1829
|
-
return n;
|
|
1830
|
-
var r = en(n);
|
|
1831
|
-
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
1832
|
-
}).filter(function(n) {
|
|
1833
|
-
return !!n;
|
|
1834
|
-
});
|
|
1835
|
-
}, Jr = function(e, t, n, r) {
|
|
1836
|
-
var o = Qr(t, Array.isArray(e) ? e : [e]);
|
|
1837
|
-
we[n] || (we[n] = /* @__PURE__ */ new WeakMap());
|
|
1838
|
-
var i = we[n], s = [], c = /* @__PURE__ */ new Set(), d = new Set(o), l = function(u) {
|
|
1839
|
-
!u || c.has(u) || (c.add(u), l(u.parentNode));
|
|
1840
|
-
};
|
|
1841
|
-
o.forEach(l);
|
|
1842
|
-
var f = function(u) {
|
|
1843
|
-
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(p) {
|
|
1844
|
-
if (c.has(p))
|
|
1845
|
-
f(p);
|
|
1846
|
-
else
|
|
1847
|
-
try {
|
|
1848
|
-
var h = p.getAttribute(r), y = h !== null && h !== "false", a = (ee.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
|
|
1849
|
-
ee.set(p, a), i.set(p, v), s.push(p), a === 1 && y && ye.set(p, !0), v === 1 && p.setAttribute(n, "true"), y || p.setAttribute(r, "true");
|
|
1850
|
-
} catch (g) {
|
|
1851
|
-
console.error("aria-hidden: cannot operate on ", p, g);
|
|
1852
|
-
}
|
|
1853
|
-
});
|
|
1854
|
-
};
|
|
1855
|
-
return f(t), c.clear(), _e++, function() {
|
|
1856
|
-
s.forEach(function(u) {
|
|
1857
|
-
var p = ee.get(u) - 1, h = i.get(u) - 1;
|
|
1858
|
-
ee.set(u, p), i.set(u, h), p || (ye.has(u) || u.removeAttribute(r), ye.delete(u)), h || u.removeAttribute(n);
|
|
1859
|
-
}), _e--, _e || (ee = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), we = {});
|
|
1860
|
-
};
|
|
1861
|
-
}, zo = function(e, t, n) {
|
|
1862
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
1863
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o = Gr(e);
|
|
1864
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Jr(r, o, n, "aria-hidden")) : function() {
|
|
1865
|
-
return null;
|
|
1866
|
-
};
|
|
1867
|
-
}, Ce = "right-scroll-bar-position", Ae = "width-before-scroll-bar", eo = "with-scroll-bars-hidden", to = "--removed-body-scroll-bar-size", tn = En(), He = function() {
|
|
1868
|
-
}, Me = m.forwardRef(function(e, t) {
|
|
1869
|
-
var n = m.useRef(null), r = m.useState({
|
|
1870
|
-
onScrollCapture: He,
|
|
1871
|
-
onWheelCapture: He,
|
|
1872
|
-
onTouchMoveCapture: He
|
|
1873
|
-
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, p = e.sideCar, h = e.noRelative, y = e.noIsolation, a = e.inert, v = e.allowPinchZoom, g = e.as, w = g === void 0 ? "div" : g, b = e.gapMode, x = Tt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = p, A = Cn([n, t]), C = Q(Q({}, x), o);
|
|
1874
|
-
return m.createElement(
|
|
1875
|
-
m.Fragment,
|
|
1876
|
-
null,
|
|
1877
|
-
f && m.createElement(E, { sideCar: tn, removeScrollBar: l, shards: u, noRelative: h, noIsolation: y, inert: a, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: b }),
|
|
1878
|
-
s ? m.cloneElement(m.Children.only(c), Q(Q({}, C), { ref: A })) : m.createElement(w, Q({}, C, { className: d, ref: A }), c)
|
|
1879
|
-
);
|
|
1880
|
-
});
|
|
1881
|
-
Me.defaultProps = {
|
|
1882
|
-
enabled: !0,
|
|
1883
|
-
removeScrollBar: !0,
|
|
1884
|
-
inert: !1
|
|
1885
|
-
};
|
|
1886
|
-
Me.classNames = {
|
|
1887
|
-
fullWidth: Ae,
|
|
1888
|
-
zeroRight: Ce
|
|
1889
|
-
};
|
|
1890
|
-
var no = function() {
|
|
1891
|
-
if (typeof __webpack_nonce__ < "u")
|
|
1892
|
-
return __webpack_nonce__;
|
|
1893
|
-
};
|
|
1894
|
-
function ro() {
|
|
1895
|
-
if (!document)
|
|
1896
|
-
return null;
|
|
1897
|
-
var e = document.createElement("style");
|
|
1898
|
-
e.type = "text/css";
|
|
1899
|
-
var t = no();
|
|
1900
|
-
return t && e.setAttribute("nonce", t), e;
|
|
1901
|
-
}
|
|
1902
|
-
function oo(e, t) {
|
|
1903
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1904
|
-
}
|
|
1905
|
-
function io(e) {
|
|
1906
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1907
|
-
t.appendChild(e);
|
|
1908
|
-
}
|
|
1909
|
-
var so = function() {
|
|
1910
|
-
var e = 0, t = null;
|
|
1911
|
-
return {
|
|
1912
|
-
add: function(n) {
|
|
1913
|
-
e == 0 && (t = ro()) && (oo(t, n), io(t)), e++;
|
|
1914
|
-
},
|
|
1915
|
-
remove: function() {
|
|
1916
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1917
|
-
}
|
|
1918
|
-
};
|
|
1919
|
-
}, co = function() {
|
|
1920
|
-
var e = so();
|
|
1921
|
-
return function(t, n) {
|
|
1922
|
-
m.useEffect(function() {
|
|
1923
|
-
return e.add(t), function() {
|
|
1924
|
-
e.remove();
|
|
1925
|
-
};
|
|
1926
|
-
}, [t && n]);
|
|
1927
|
-
};
|
|
1928
|
-
}, nn = function() {
|
|
1929
|
-
var e = co(), t = function(n) {
|
|
1930
|
-
var r = n.styles, o = n.dynamic;
|
|
1931
|
-
return e(r, o), null;
|
|
1932
|
-
};
|
|
1933
|
-
return t;
|
|
1934
|
-
}, ao = {
|
|
1935
|
-
left: 0,
|
|
1936
|
-
top: 0,
|
|
1937
|
-
right: 0,
|
|
1938
|
-
gap: 0
|
|
1939
|
-
}, $e = function(e) {
|
|
1940
|
-
return parseInt(e || "", 10) || 0;
|
|
1941
|
-
}, lo = function(e) {
|
|
1942
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1943
|
-
return [$e(n), $e(r), $e(o)];
|
|
1944
|
-
}, uo = function(e) {
|
|
1945
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1946
|
-
return ao;
|
|
1947
|
-
var t = lo(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1948
|
-
return {
|
|
1949
|
-
left: t[0],
|
|
1950
|
-
top: t[1],
|
|
1951
|
-
right: t[2],
|
|
1952
|
-
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1953
|
-
};
|
|
1954
|
-
}, fo = nn(), oe = "data-scroll-locked", ho = function(e, t, n, r) {
|
|
1955
|
-
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
1956
|
-
return n === void 0 && (n = "margin"), `
|
|
1957
|
-
.`.concat(eo, ` {
|
|
1958
|
-
overflow: hidden `).concat(r, `;
|
|
1959
|
-
padding-right: `).concat(c, "px ").concat(r, `;
|
|
1960
|
-
}
|
|
1961
|
-
body[`).concat(oe, `] {
|
|
1962
|
-
overflow: hidden `).concat(r, `;
|
|
1963
|
-
overscroll-behavior: contain;
|
|
1964
|
-
`).concat([
|
|
1965
|
-
t && "position: relative ".concat(r, ";"),
|
|
1966
|
-
n === "margin" && `
|
|
1967
|
-
padding-left: `.concat(o, `px;
|
|
1968
|
-
padding-top: `).concat(i, `px;
|
|
1969
|
-
padding-right: `).concat(s, `px;
|
|
1970
|
-
margin-left:0;
|
|
1971
|
-
margin-top:0;
|
|
1972
|
-
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1973
|
-
`),
|
|
1974
|
-
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
1975
|
-
].filter(Boolean).join(""), `
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
.`).concat(Ce, ` {
|
|
1979
|
-
right: `).concat(c, "px ").concat(r, `;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
.`).concat(Ae, ` {
|
|
1983
|
-
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
.`).concat(Ce, " .").concat(Ce, ` {
|
|
1987
|
-
right: 0 `).concat(r, `;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
.`).concat(Ae, " .").concat(Ae, ` {
|
|
1991
|
-
margin-right: 0 `).concat(r, `;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
body[`).concat(oe, `] {
|
|
1995
|
-
`).concat(to, ": ").concat(c, `px;
|
|
1996
|
-
}
|
|
1997
|
-
`);
|
|
1998
|
-
}, St = function() {
|
|
1999
|
-
var e = parseInt(document.body.getAttribute(oe) || "0", 10);
|
|
2000
|
-
return isFinite(e) ? e : 0;
|
|
2001
|
-
}, mo = function() {
|
|
2002
|
-
m.useEffect(function() {
|
|
2003
|
-
return document.body.setAttribute(oe, (St() + 1).toString()), function() {
|
|
2004
|
-
var e = St() - 1;
|
|
2005
|
-
e <= 0 ? document.body.removeAttribute(oe) : document.body.setAttribute(oe, e.toString());
|
|
2006
|
-
};
|
|
2007
|
-
}, []);
|
|
2008
|
-
}, po = function(e) {
|
|
2009
|
-
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2010
|
-
mo();
|
|
2011
|
-
var i = m.useMemo(function() {
|
|
2012
|
-
return uo(o);
|
|
2013
|
-
}, [o]);
|
|
2014
|
-
return m.createElement(fo, { styles: ho(i, !t, o, n ? "" : "!important") });
|
|
2015
|
-
}, je = !1;
|
|
2016
|
-
if (typeof window < "u")
|
|
2017
|
-
try {
|
|
2018
|
-
var xe = Object.defineProperty({}, "passive", {
|
|
2019
|
-
get: function() {
|
|
2020
|
-
return je = !0, !0;
|
|
2021
|
-
}
|
|
2022
|
-
});
|
|
2023
|
-
window.addEventListener("test", xe, xe), window.removeEventListener("test", xe, xe);
|
|
2024
|
-
} catch {
|
|
2025
|
-
je = !1;
|
|
2026
|
-
}
|
|
2027
|
-
var te = je ? { passive: !1 } : !1, vo = function(e) {
|
|
2028
|
-
return e.tagName === "TEXTAREA";
|
|
2029
|
-
}, rn = function(e, t) {
|
|
2030
|
-
if (!(e instanceof Element))
|
|
2031
|
-
return !1;
|
|
2032
|
-
var n = window.getComputedStyle(e);
|
|
2033
|
-
return (
|
|
2034
|
-
// not-not-scrollable
|
|
2035
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
2036
|
-
!(n.overflowY === n.overflowX && !vo(e) && n[t] === "visible")
|
|
2037
|
-
);
|
|
2038
|
-
}, go = function(e) {
|
|
2039
|
-
return rn(e, "overflowY");
|
|
2040
|
-
}, yo = function(e) {
|
|
2041
|
-
return rn(e, "overflowX");
|
|
2042
|
-
}, Rt = function(e, t) {
|
|
2043
|
-
var n = t.ownerDocument, r = t;
|
|
2044
|
-
do {
|
|
2045
|
-
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
2046
|
-
var o = on(e, r);
|
|
2047
|
-
if (o) {
|
|
2048
|
-
var i = sn(e, r), s = i[1], c = i[2];
|
|
2049
|
-
if (s > c)
|
|
2050
|
-
return !0;
|
|
2051
|
-
}
|
|
2052
|
-
r = r.parentNode;
|
|
2053
|
-
} while (r && r !== n.body);
|
|
2054
|
-
return !1;
|
|
2055
|
-
}, wo = function(e) {
|
|
2056
|
-
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
2057
|
-
return [
|
|
2058
|
-
t,
|
|
2059
|
-
n,
|
|
2060
|
-
r
|
|
2061
|
-
];
|
|
2062
|
-
}, xo = function(e) {
|
|
2063
|
-
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
2064
|
-
return [
|
|
2065
|
-
t,
|
|
2066
|
-
n,
|
|
2067
|
-
r
|
|
2068
|
-
];
|
|
2069
|
-
}, on = function(e, t) {
|
|
2070
|
-
return e === "v" ? go(t) : yo(t);
|
|
2071
|
-
}, sn = function(e, t) {
|
|
2072
|
-
return e === "v" ? wo(t) : xo(t);
|
|
2073
|
-
}, bo = function(e, t) {
|
|
2074
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2075
|
-
}, Eo = function(e, t, n, r, o) {
|
|
2076
|
-
var i = bo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, d = t.contains(c), l = !1, f = s > 0, u = 0, p = 0;
|
|
2077
|
-
do {
|
|
2078
|
-
if (!c)
|
|
2079
|
-
break;
|
|
2080
|
-
var h = sn(e, c), y = h[0], a = h[1], v = h[2], g = a - v - i * y;
|
|
2081
|
-
(y || g) && on(e, c) && (u += g, p += y);
|
|
2082
|
-
var w = c.parentNode;
|
|
2083
|
-
c = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
2084
|
-
} while (
|
|
2085
|
-
// portaled content
|
|
2086
|
-
!d && c !== document.body || // self content
|
|
2087
|
-
d && (t.contains(c) || t === c)
|
|
2088
|
-
);
|
|
2089
|
-
return (f && Math.abs(u) < 1 || !f && Math.abs(p) < 1) && (l = !0), l;
|
|
2090
|
-
}, be = function(e) {
|
|
2091
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2092
|
-
}, Pt = function(e) {
|
|
2093
|
-
return [e.deltaX, e.deltaY];
|
|
2094
|
-
}, Ot = function(e) {
|
|
2095
|
-
return e && "current" in e ? e.current : e;
|
|
2096
|
-
}, Co = function(e, t) {
|
|
2097
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
2098
|
-
}, Ao = function(e) {
|
|
2099
|
-
return `
|
|
2100
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2101
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2102
|
-
`);
|
|
2103
|
-
}, So = 0, ne = [];
|
|
2104
|
-
function Ro(e) {
|
|
2105
|
-
var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(So++)[0], i = m.useState(nn)[0], s = m.useRef(e);
|
|
2106
|
-
m.useEffect(function() {
|
|
2107
|
-
s.current = e;
|
|
2108
|
-
}, [e]), m.useEffect(function() {
|
|
2109
|
-
if (e.inert) {
|
|
2110
|
-
document.body.classList.add("block-interactivity-".concat(o));
|
|
2111
|
-
var a = bn([e.lockRef.current], (e.shards || []).map(Ot), !0).filter(Boolean);
|
|
2112
|
-
return a.forEach(function(v) {
|
|
2113
|
-
return v.classList.add("allow-interactivity-".concat(o));
|
|
2114
|
-
}), function() {
|
|
2115
|
-
document.body.classList.remove("block-interactivity-".concat(o)), a.forEach(function(v) {
|
|
2116
|
-
return v.classList.remove("allow-interactivity-".concat(o));
|
|
2117
|
-
});
|
|
2118
|
-
};
|
|
2119
|
-
}
|
|
2120
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2121
|
-
var c = m.useCallback(function(a, v) {
|
|
2122
|
-
if ("touches" in a && a.touches.length === 2 || a.type === "wheel" && a.ctrlKey)
|
|
2123
|
-
return !s.current.allowPinchZoom;
|
|
2124
|
-
var g = be(a), w = n.current, b = "deltaX" in a ? a.deltaX : w[0] - g[0], x = "deltaY" in a ? a.deltaY : w[1] - g[1], E, A = a.target, C = Math.abs(b) > Math.abs(x) ? "h" : "v";
|
|
2125
|
-
if ("touches" in a && C === "h" && A.type === "range")
|
|
2126
|
-
return !1;
|
|
2127
|
-
var R = Rt(C, A);
|
|
2128
|
-
if (!R)
|
|
2129
|
-
return !0;
|
|
2130
|
-
if (R ? E = C : (E = C === "v" ? "h" : "v", R = Rt(C, A)), !R)
|
|
2131
|
-
return !1;
|
|
2132
|
-
if (!r.current && "changedTouches" in a && (b || x) && (r.current = E), !E)
|
|
2133
|
-
return !0;
|
|
2134
|
-
var T = r.current || E;
|
|
2135
|
-
return Eo(T, v, a, T === "h" ? b : x);
|
|
2136
|
-
}, []), d = m.useCallback(function(a) {
|
|
2137
|
-
var v = a;
|
|
2138
|
-
if (!(!ne.length || ne[ne.length - 1] !== i)) {
|
|
2139
|
-
var g = "deltaY" in v ? Pt(v) : be(v), w = t.current.filter(function(E) {
|
|
2140
|
-
return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && Co(E.delta, g);
|
|
2141
|
-
})[0];
|
|
2142
|
-
if (w && w.should) {
|
|
2143
|
-
v.cancelable && v.preventDefault();
|
|
2144
|
-
return;
|
|
2145
|
-
}
|
|
2146
|
-
if (!w) {
|
|
2147
|
-
var b = (s.current.shards || []).map(Ot).filter(Boolean).filter(function(E) {
|
|
2148
|
-
return E.contains(v.target);
|
|
2149
|
-
}), x = b.length > 0 ? c(v, b[0]) : !s.current.noIsolation;
|
|
2150
|
-
x && v.cancelable && v.preventDefault();
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
}, []), l = m.useCallback(function(a, v, g, w) {
|
|
2154
|
-
var b = { name: a, delta: v, target: g, should: w, shadowParent: Po(g) };
|
|
2155
|
-
t.current.push(b), setTimeout(function() {
|
|
2156
|
-
t.current = t.current.filter(function(x) {
|
|
2157
|
-
return x !== b;
|
|
2158
|
-
});
|
|
2159
|
-
}, 1);
|
|
2160
|
-
}, []), f = m.useCallback(function(a) {
|
|
2161
|
-
n.current = be(a), r.current = void 0;
|
|
2162
|
-
}, []), u = m.useCallback(function(a) {
|
|
2163
|
-
l(a.type, Pt(a), a.target, c(a, e.lockRef.current));
|
|
2164
|
-
}, []), p = m.useCallback(function(a) {
|
|
2165
|
-
l(a.type, be(a), a.target, c(a, e.lockRef.current));
|
|
2166
|
-
}, []);
|
|
2167
|
-
m.useEffect(function() {
|
|
2168
|
-
return ne.push(i), e.setCallbacks({
|
|
2169
|
-
onScrollCapture: u,
|
|
2170
|
-
onWheelCapture: u,
|
|
2171
|
-
onTouchMoveCapture: p
|
|
2172
|
-
}), document.addEventListener("wheel", d, te), document.addEventListener("touchmove", d, te), document.addEventListener("touchstart", f, te), function() {
|
|
2173
|
-
ne = ne.filter(function(a) {
|
|
2174
|
-
return a !== i;
|
|
2175
|
-
}), document.removeEventListener("wheel", d, te), document.removeEventListener("touchmove", d, te), document.removeEventListener("touchstart", f, te);
|
|
2176
|
-
};
|
|
2177
|
-
}, []);
|
|
2178
|
-
var h = e.removeScrollBar, y = e.inert;
|
|
2179
|
-
return m.createElement(
|
|
2180
|
-
m.Fragment,
|
|
2181
|
-
null,
|
|
2182
|
-
y ? m.createElement(i, { styles: Ao(o) }) : null,
|
|
2183
|
-
h ? m.createElement(po, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
2184
|
-
);
|
|
2185
|
-
}
|
|
2186
|
-
function Po(e) {
|
|
2187
|
-
for (var t = null; e !== null; )
|
|
2188
|
-
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
2189
|
-
return t;
|
|
2190
|
-
}
|
|
2191
|
-
const Oo = An(tn, Ro);
|
|
2192
|
-
var To = m.forwardRef(function(e, t) {
|
|
2193
|
-
return m.createElement(Me, Q({}, e, { ref: t, sideCar: Oo }));
|
|
2194
|
-
});
|
|
2195
|
-
To.classNames = Me.classNames;
|
|
2196
|
-
export {
|
|
2197
|
-
Ho as A,
|
|
2198
|
-
$o as C,
|
|
2199
|
-
Tn as D,
|
|
2200
|
-
Fn as F,
|
|
2201
|
-
To as R,
|
|
2202
|
-
ie as a,
|
|
2203
|
-
Wo as b,
|
|
2204
|
-
Io as c,
|
|
2205
|
-
_o as d,
|
|
2206
|
-
Vo as e,
|
|
2207
|
-
zo as h,
|
|
2208
|
-
Bo as u
|
|
2209
|
-
};
|