welcome-ui 8.0.0-alpha.0 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
- package/dist/Accordion.mjs +17 -17
- package/dist/Alert.mjs +19 -19
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
- package/dist/Badge.mjs +1 -1
- package/dist/Breadcrumb.mjs +27 -26
- package/dist/Button.mjs +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
- package/dist/DatePicker.mjs +4 -4
- package/dist/DateTimePicker.mjs +9 -9
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +7 -7
- package/dist/DropdownMenu.mjs +262 -262
- package/dist/Field.mjs +25 -25
- package/dist/FileDrop.mjs +273 -267
- package/dist/FileUpload.mjs +26 -26
- package/dist/Files.mjs +1 -1
- package/dist/Hint.mjs +1 -1
- package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
- package/dist/Icons.mjs +88 -88
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +1 -1
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
- package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
- package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
- package/dist/Label.mjs +2 -2
- package/dist/Link.mjs +3 -3
- package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
- package/dist/Modal.mjs +13 -13
- package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
- package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
- package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
- package/dist/Pagination.mjs +22 -22
- package/dist/Picker.mjs +2 -2
- package/dist/Popover.mjs +2 -2
- package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
- package/dist/Radio.mjs +18 -18
- package/dist/RadioGroup.mjs +15 -15
- package/dist/RadioTab.mjs +9 -9
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
- package/dist/Search.mjs +2 -2
- package/dist/Select.mjs +719 -716
- package/dist/Shape.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Swiper.mjs +284 -278
- package/dist/Tabs.mjs +128 -128
- package/dist/Tag.mjs +16 -16
- package/dist/Text.mjs +1 -1
- package/dist/Textarea.mjs +4 -4
- package/dist/TimePicker.mjs +6 -6
- package/dist/Toast.mjs +69 -69
- package/dist/Toggle.mjs +2 -2
- package/dist/Tooltip.mjs +60 -60
- package/dist/UniversalLink.mjs +8 -8
- package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
- package/dist/VariantIcon.mjs +4 -4
- package/dist/WelcomeLoader.mjs +4862 -9223
- package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
- package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
- package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
- package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
- package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
- package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +670 -615
- package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
- package/dist/utils.mjs +29 -91
- package/package.json +12 -15
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as kt, b as Nt,
|
|
3
|
-
import { m as Wt, o as Bt, t as jt, c as pt,
|
|
4
|
-
import { A as Yt, B as le, D as q, C as j, H as It, c as
|
|
5
|
-
import { u as
|
|
6
|
-
import { useRef as ce, useState as
|
|
2
|
+
import { a as kt, b as Nt, d as Vt, c as dt } from "./JC64G2H7-BzklVBKM.mjs";
|
|
3
|
+
import { m as Wt, o as Bt, t as jt, c as pt, b as Ee, a as mt, d as zt } from "./YV4JVR4I-Bh7B7TET.mjs";
|
|
4
|
+
import { A as Yt, B as le, D as q, C as j, H as It, c as je, _ as Ce, i as He, a6 as ht, b as me, F as Le, E as _e, t as Se, d as G, g as _, f as ze, h as Ye, v as Xt, a7 as vt, u as ke, Q as et, a8 as se, a5 as qt, e as gt, Y as Ut, Z as Ne, a9 as Gt, l as Zt, m as Jt } from "./LVA2YJMS-DDEmK0pp.mjs";
|
|
5
|
+
import { u as wt, P as xt, a as Qt } from "./MTZPJQMC-CMjAwC0N.mjs";
|
|
6
|
+
import { useRef as ce, useState as Ie, useEffect as U, useContext as Kt, createContext as en, useCallback as yt } from "react";
|
|
7
7
|
function bt(e = {}) {
|
|
8
8
|
var n = e, {
|
|
9
9
|
popover: o
|
|
@@ -21,13 +21,13 @@ function bt(e = {}) {
|
|
|
21
21
|
])
|
|
22
22
|
);
|
|
23
23
|
jt(t, i);
|
|
24
|
-
const r = i == null ? void 0 : i.getState(), l = kt(le(q({}, t), { store: i })),
|
|
24
|
+
const r = i == null ? void 0 : i.getState(), l = kt(le(q({}, t), { store: i })), a = j(
|
|
25
25
|
t.placement,
|
|
26
26
|
r == null ? void 0 : r.placement,
|
|
27
27
|
"bottom"
|
|
28
28
|
), c = le(q({}, l.getState()), {
|
|
29
|
-
placement:
|
|
30
|
-
currentPlacement:
|
|
29
|
+
placement: a,
|
|
30
|
+
currentPlacement: a,
|
|
31
31
|
anchorElement: j(r == null ? void 0 : r.anchorElement, null),
|
|
32
32
|
popoverElement: j(r == null ? void 0 : r.popoverElement, null),
|
|
33
33
|
arrowElement: j(r == null ? void 0 : r.arrowElement, null),
|
|
@@ -41,7 +41,7 @@ function bt(e = {}) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
function Pt(e, n, o) {
|
|
44
|
-
return It(n, [o.popover]),
|
|
44
|
+
return It(n, [o.popover]), Ee(e, o, "placement"), Nt(e, n, o);
|
|
45
45
|
}
|
|
46
46
|
function jn(e = {}) {
|
|
47
47
|
const [n, o] = mt(bt, e);
|
|
@@ -50,7 +50,7 @@ function jn(e = {}) {
|
|
|
50
50
|
function de(e) {
|
|
51
51
|
return e.split("-")[1];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Xe(e) {
|
|
54
54
|
return e === "y" ? "height" : "width";
|
|
55
55
|
}
|
|
56
56
|
function z(e) {
|
|
@@ -61,41 +61,41 @@ function ne(e) {
|
|
|
61
61
|
}
|
|
62
62
|
function tt(e, n, o) {
|
|
63
63
|
let { reference: t, floating: i } = e;
|
|
64
|
-
const r = t.x + t.width / 2 - i.width / 2, l = t.y + t.height / 2 - i.height / 2,
|
|
65
|
-
let
|
|
64
|
+
const r = t.x + t.width / 2 - i.width / 2, l = t.y + t.height / 2 - i.height / 2, a = ne(n), c = Xe(a), s = t[c] / 2 - i[c] / 2, f = a === "x";
|
|
65
|
+
let u;
|
|
66
66
|
switch (z(n)) {
|
|
67
67
|
case "top":
|
|
68
|
-
|
|
68
|
+
u = { x: r, y: t.y - i.height };
|
|
69
69
|
break;
|
|
70
70
|
case "bottom":
|
|
71
|
-
|
|
71
|
+
u = { x: r, y: t.y + t.height };
|
|
72
72
|
break;
|
|
73
73
|
case "right":
|
|
74
|
-
|
|
74
|
+
u = { x: t.x + t.width, y: l };
|
|
75
75
|
break;
|
|
76
76
|
case "left":
|
|
77
|
-
|
|
77
|
+
u = { x: t.x - i.width, y: l };
|
|
78
78
|
break;
|
|
79
79
|
default:
|
|
80
|
-
|
|
80
|
+
u = { x: t.x, y: t.y };
|
|
81
81
|
}
|
|
82
82
|
switch (de(n)) {
|
|
83
83
|
case "start":
|
|
84
|
-
a
|
|
84
|
+
u[a] -= s * (o && f ? -1 : 1);
|
|
85
85
|
break;
|
|
86
86
|
case "end":
|
|
87
|
-
a
|
|
87
|
+
u[a] += s * (o && f ? -1 : 1);
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return u;
|
|
90
90
|
}
|
|
91
91
|
const tn = async (e, n, o) => {
|
|
92
|
-
const { placement: t = "bottom", strategy: i = "absolute", middleware: r = [], platform: l } = o,
|
|
93
|
-
let s = await l.getElementRects({ reference: e, floating: n, strategy: i }), { x: f, y:
|
|
94
|
-
for (let h = 0; h <
|
|
95
|
-
const { name:
|
|
96
|
-
f =
|
|
92
|
+
const { placement: t = "bottom", strategy: i = "absolute", middleware: r = [], platform: l } = o, a = r.filter(Boolean), c = await (l.isRTL == null ? void 0 : l.isRTL(n));
|
|
93
|
+
let s = await l.getElementRects({ reference: e, floating: n, strategy: i }), { x: f, y: u } = tt(s, t, c), m = t, p = {}, d = 0;
|
|
94
|
+
for (let h = 0; h < a.length; h++) {
|
|
95
|
+
const { name: v, fn: g } = a[h], { x: w, y: b, data: P, reset: x } = await g({ x: f, y: u, initialPlacement: t, placement: m, strategy: i, middlewareData: p, rects: s, platform: l, elements: { reference: e, floating: n } });
|
|
96
|
+
f = w ?? f, u = b ?? u, p = { ...p, [v]: { ...p[v], ...P } }, x && d <= 50 && (d++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (s = x.rects === !0 ? await l.getElementRects({ reference: e, floating: n, strategy: i }) : x.rects), { x: f, y: u } = tt(s, m, c)), h = -1);
|
|
97
97
|
}
|
|
98
|
-
return { x: f, y:
|
|
98
|
+
return { x: f, y: u, placement: m, strategy: i, middlewareData: p };
|
|
99
99
|
};
|
|
100
100
|
function Z(e, n) {
|
|
101
101
|
return typeof e == "function" ? e(n) : e;
|
|
@@ -105,51 +105,51 @@ function Et(e) {
|
|
|
105
105
|
return { top: 0, right: 0, bottom: 0, left: 0, ...n };
|
|
106
106
|
}(e) : { top: e, right: e, bottom: e, left: e };
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Re(e) {
|
|
109
109
|
return { ...e, top: e.y, left: e.x, right: e.x + e.width, bottom: e.y + e.height };
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function qe(e, n) {
|
|
112
112
|
var o;
|
|
113
113
|
n === void 0 && (n = {});
|
|
114
|
-
const { x: t, y: i, platform: r, rects: l, elements:
|
|
115
|
-
return { top: (
|
|
114
|
+
const { x: t, y: i, platform: r, rects: l, elements: a, strategy: c } = e, { boundary: s = "clippingAncestors", rootBoundary: f = "viewport", elementContext: u = "floating", altBoundary: m = !1, padding: p = 0 } = Z(n, e), d = Et(p), h = a[m ? u === "floating" ? "reference" : "floating" : u], v = Re(await r.getClippingRect({ element: (o = await (r.isElement == null ? void 0 : r.isElement(h))) == null || o ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)), boundary: s, rootBoundary: f, strategy: c })), g = u === "floating" ? { ...l.floating, x: t, y: i } : l.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), b = await (r.isElement == null ? void 0 : r.isElement(w)) && await (r.getScale == null ? void 0 : r.getScale(w)) || { x: 1, y: 1 }, P = Re(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: g, offsetParent: w, strategy: c }) : g);
|
|
115
|
+
return { top: (v.top - P.top + d.top) / b.y, bottom: (P.bottom - v.bottom + d.bottom) / b.y, left: (v.left - P.left + d.left) / b.x, right: (P.right - v.right + d.right) / b.x };
|
|
116
116
|
}
|
|
117
117
|
const he = Math.min, K = Math.max;
|
|
118
|
-
function
|
|
118
|
+
function Ve(e, n, o) {
|
|
119
119
|
return K(e, he(n, o));
|
|
120
120
|
}
|
|
121
121
|
const nn = (e) => ({ name: "arrow", options: e, async fn(n) {
|
|
122
|
-
const { x: o, y: t, placement: i, rects: r, platform: l, elements:
|
|
122
|
+
const { x: o, y: t, placement: i, rects: r, platform: l, elements: a } = n, { element: c, padding: s = 0 } = Z(e, n) || {};
|
|
123
123
|
if (c == null) return {};
|
|
124
|
-
const f = Et(s),
|
|
125
|
-
let E = x ? x[
|
|
126
|
-
E && await (l.isElement == null ? void 0 : l.isElement(x)) || (E =
|
|
127
|
-
const
|
|
128
|
-
return { [m]:
|
|
124
|
+
const f = Et(s), u = { x: o, y: t }, m = ne(i), p = Xe(m), d = await l.getDimensions(c), h = m === "y", v = h ? "top" : "left", g = h ? "bottom" : "right", w = h ? "clientHeight" : "clientWidth", b = r.reference[p] + r.reference[m] - u[m] - r.floating[p], P = u[m] - r.reference[m], x = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(c));
|
|
125
|
+
let E = x ? x[w] : 0;
|
|
126
|
+
E && await (l.isElement == null ? void 0 : l.isElement(x)) || (E = a.floating[w] || r.floating[p]);
|
|
127
|
+
const C = b / 2 - P / 2, H = E / 2 - d[p] / 2 - 1, F = he(f[v], H), R = he(f[g], H), A = F, $ = E - d[p] - R, y = E / 2 - d[p] / 2 + C, O = Ve(A, y, $), S = de(i) != null && y != O && r.reference[p] / 2 - (y < A ? F : R) - d[p] / 2 < 0 ? y < A ? A - y : $ - y : 0;
|
|
128
|
+
return { [m]: u[m] - S, data: { [m]: O, centerOffset: y - O + S } };
|
|
129
129
|
} }), on = ["top", "right", "bottom", "left"];
|
|
130
130
|
on.reduce((e, n) => e.concat(n, n + "-start", n + "-end"), []);
|
|
131
131
|
const rn = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
132
|
-
function
|
|
132
|
+
function Ae(e) {
|
|
133
133
|
return e.replace(/left|right|bottom|top/g, (n) => rn[n]);
|
|
134
134
|
}
|
|
135
135
|
function sn(e, n, o) {
|
|
136
136
|
o === void 0 && (o = !1);
|
|
137
|
-
const t = de(e), i = ne(e), r =
|
|
137
|
+
const t = de(e), i = ne(e), r = Xe(i);
|
|
138
138
|
let l = i === "x" ? t === (o ? "end" : "start") ? "right" : "left" : t === "start" ? "bottom" : "top";
|
|
139
|
-
return n.reference[r] > n.floating[r] && (l =
|
|
139
|
+
return n.reference[r] > n.floating[r] && (l = Ae(l)), { main: l, cross: Ae(l) };
|
|
140
140
|
}
|
|
141
141
|
const ln = { start: "end", end: "start" };
|
|
142
|
-
function
|
|
142
|
+
function Fe(e) {
|
|
143
143
|
return e.replace(/start|end/g, (n) => ln[n]);
|
|
144
144
|
}
|
|
145
145
|
const cn = function(e) {
|
|
146
146
|
return e === void 0 && (e = {}), { name: "flip", options: e, async fn(n) {
|
|
147
147
|
var o;
|
|
148
|
-
const { placement: t, middlewareData: i, rects: r, initialPlacement: l, platform:
|
|
149
|
-
const
|
|
150
|
-
return [
|
|
148
|
+
const { placement: t, middlewareData: i, rects: r, initialPlacement: l, platform: a, elements: c } = n, { mainAxis: s = !0, crossAxis: f = !0, fallbackPlacements: u, fallbackStrategy: m = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: d = !0, ...h } = Z(e, n), v = z(t), g = z(l) === l, w = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = u || (g || !d ? [Ae(l)] : function(A) {
|
|
149
|
+
const $ = Ae(A);
|
|
150
|
+
return [Fe(A), $, Fe($)];
|
|
151
151
|
}(l));
|
|
152
|
-
|
|
152
|
+
u || p === "none" || b.push(...function(A, $, y, O) {
|
|
153
153
|
const S = de(A);
|
|
154
154
|
let T = function(M, L, X) {
|
|
155
155
|
const V = ["left", "right"], W = ["right", "left"], Q = ["top", "bottom"], oe = ["bottom", "top"];
|
|
@@ -164,23 +164,23 @@ const cn = function(e) {
|
|
|
164
164
|
return [];
|
|
165
165
|
}
|
|
166
166
|
}(z(A), y === "start", O);
|
|
167
|
-
return S && (T = T.map((M) => M + "-" + S),
|
|
168
|
-
}(l, d, p,
|
|
169
|
-
const P = [l, ...b], x = await
|
|
170
|
-
let
|
|
171
|
-
if (s && E.push(x[
|
|
172
|
-
const { main: A, cross:
|
|
173
|
-
E.push(x[A], x[
|
|
167
|
+
return S && (T = T.map((M) => M + "-" + S), $ && (T = T.concat(T.map(Fe)))), T;
|
|
168
|
+
}(l, d, p, w));
|
|
169
|
+
const P = [l, ...b], x = await qe(n, h), E = [];
|
|
170
|
+
let C = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
171
|
+
if (s && E.push(x[v]), f) {
|
|
172
|
+
const { main: A, cross: $ } = sn(t, r, w);
|
|
173
|
+
E.push(x[A], x[$]);
|
|
174
174
|
}
|
|
175
|
-
if (
|
|
176
|
-
var
|
|
177
|
-
const A = (((
|
|
178
|
-
if (
|
|
179
|
-
let y = (F =
|
|
175
|
+
if (C = [...C, { placement: t, overflows: E }], !E.every((A) => A <= 0)) {
|
|
176
|
+
var H, F;
|
|
177
|
+
const A = (((H = i.flip) == null ? void 0 : H.index) || 0) + 1, $ = P[A];
|
|
178
|
+
if ($) return { data: { index: A, overflows: C }, reset: { placement: $ } };
|
|
179
|
+
let y = (F = C.filter((O) => O.overflows[0] <= 0).sort((O, S) => O.overflows[1] - S.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
180
180
|
if (!y) switch (m) {
|
|
181
181
|
case "bestFit": {
|
|
182
182
|
var R;
|
|
183
|
-
const O = (R =
|
|
183
|
+
const O = (R = C.map((S) => [S.placement, S.overflows.filter((T) => T > 0).reduce((T, M) => T + M, 0)]).sort((S, T) => S[1] - T[1])[0]) == null ? void 0 : R[0];
|
|
184
184
|
O && (y = O);
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
@@ -191,12 +191,12 @@ const cn = function(e) {
|
|
|
191
191
|
}
|
|
192
192
|
return {};
|
|
193
193
|
} };
|
|
194
|
-
},
|
|
194
|
+
}, an = function(e) {
|
|
195
195
|
return e === void 0 && (e = 0), { name: "offset", options: e, async fn(n) {
|
|
196
196
|
const { x: o, y: t } = n, i = await async function(r, l) {
|
|
197
|
-
const { placement:
|
|
198
|
-
let { mainAxis:
|
|
199
|
-
return m && typeof b == "number" && (
|
|
197
|
+
const { placement: a, platform: c, elements: s } = r, f = await (c.isRTL == null ? void 0 : c.isRTL(s.floating)), u = z(a), m = de(a), p = ne(a) === "x", d = ["left", "top"].includes(u) ? -1 : 1, h = f && p ? -1 : 1, v = Z(l, r);
|
|
198
|
+
let { mainAxis: g, crossAxis: w, alignmentAxis: b } = typeof v == "number" ? { mainAxis: v, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...v };
|
|
199
|
+
return m && typeof b == "number" && (w = m === "end" ? -1 * b : b), p ? { x: w * h, y: g * d } : { x: g * d, y: w * h };
|
|
200
200
|
}(n, e);
|
|
201
201
|
return { x: o + i.x, y: t + i.y, data: i };
|
|
202
202
|
} };
|
|
@@ -204,58 +204,58 @@ const cn = function(e) {
|
|
|
204
204
|
function St(e) {
|
|
205
205
|
return e === "x" ? "y" : "x";
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const un = function(e) {
|
|
208
208
|
return e === void 0 && (e = {}), { name: "shift", options: e, async fn(n) {
|
|
209
|
-
const { x: o, y: t, placement: i } = n, { mainAxis: r = !0, crossAxis: l = !1, limiter:
|
|
210
|
-
let { x:
|
|
211
|
-
return { x:
|
|
212
|
-
} }, ...c } = Z(e, n), s = { x: o, y: t }, f = await
|
|
213
|
-
let p = s[
|
|
209
|
+
const { x: o, y: t, placement: i } = n, { mainAxis: r = !0, crossAxis: l = !1, limiter: a = { fn: (v) => {
|
|
210
|
+
let { x: g, y: w } = v;
|
|
211
|
+
return { x: g, y: w };
|
|
212
|
+
} }, ...c } = Z(e, n), s = { x: o, y: t }, f = await qe(n, c), u = ne(z(i)), m = St(u);
|
|
213
|
+
let p = s[u], d = s[m];
|
|
214
214
|
if (r) {
|
|
215
|
-
const
|
|
216
|
-
p =
|
|
215
|
+
const v = u === "y" ? "bottom" : "right";
|
|
216
|
+
p = Ve(p + f[u === "y" ? "top" : "left"], p, p - f[v]);
|
|
217
217
|
}
|
|
218
218
|
if (l) {
|
|
219
|
-
const
|
|
220
|
-
d =
|
|
219
|
+
const v = m === "y" ? "bottom" : "right";
|
|
220
|
+
d = Ve(d + f[m === "y" ? "top" : "left"], d, d - f[v]);
|
|
221
221
|
}
|
|
222
|
-
const h =
|
|
222
|
+
const h = a.fn({ ...n, [u]: p, [m]: d });
|
|
223
223
|
return { ...h, data: { x: h.x - o, y: h.y - t } };
|
|
224
224
|
} };
|
|
225
225
|
}, fn = function(e) {
|
|
226
226
|
return e === void 0 && (e = {}), { options: e, fn(n) {
|
|
227
|
-
const { x: o, y: t, placement: i, rects: r, middlewareData: l } = n, { offset:
|
|
228
|
-
let p = f[
|
|
229
|
-
const h = Z(
|
|
227
|
+
const { x: o, y: t, placement: i, rects: r, middlewareData: l } = n, { offset: a = 0, mainAxis: c = !0, crossAxis: s = !0 } = Z(e, n), f = { x: o, y: t }, u = ne(i), m = St(u);
|
|
228
|
+
let p = f[u], d = f[m];
|
|
229
|
+
const h = Z(a, n), v = typeof h == "number" ? { mainAxis: h, crossAxis: 0 } : { mainAxis: 0, crossAxis: 0, ...h };
|
|
230
230
|
if (c) {
|
|
231
|
-
const b =
|
|
231
|
+
const b = u === "y" ? "height" : "width", P = r.reference[u] - r.floating[b] + v.mainAxis, x = r.reference[u] + r.reference[b] - v.mainAxis;
|
|
232
232
|
p < P ? p = P : p > x && (p = x);
|
|
233
233
|
}
|
|
234
234
|
if (s) {
|
|
235
|
-
var
|
|
236
|
-
const b =
|
|
235
|
+
var g, w;
|
|
236
|
+
const b = u === "y" ? "width" : "height", P = ["top", "left"].includes(z(i)), x = r.reference[m] - r.floating[b] + (P && ((g = l.offset) == null ? void 0 : g[m]) || 0) + (P ? 0 : v.crossAxis), E = r.reference[m] + r.reference[b] + (P ? 0 : ((w = l.offset) == null ? void 0 : w[m]) || 0) - (P ? v.crossAxis : 0);
|
|
237
237
|
d < x ? d = x : d > E && (d = E);
|
|
238
238
|
}
|
|
239
|
-
return { [
|
|
239
|
+
return { [u]: p, [m]: d };
|
|
240
240
|
} };
|
|
241
241
|
}, dn = function(e) {
|
|
242
242
|
return e === void 0 && (e = {}), { name: "size", options: e, async fn(n) {
|
|
243
243
|
const { placement: o, rects: t, platform: i, elements: r } = n, { apply: l = () => {
|
|
244
|
-
}, ...
|
|
244
|
+
}, ...a } = Z(e, n), c = await qe(n, a), s = z(o), f = de(o), u = ne(o) === "x", { width: m, height: p } = t.floating;
|
|
245
245
|
let d, h;
|
|
246
246
|
s === "top" || s === "bottom" ? (d = s, h = f === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (h = s, d = f === "end" ? "top" : "bottom");
|
|
247
|
-
const
|
|
248
|
-
let b =
|
|
249
|
-
if (
|
|
247
|
+
const v = p - c[d], g = m - c[h], w = !n.middlewareData.shift;
|
|
248
|
+
let b = v, P = g;
|
|
249
|
+
if (u) {
|
|
250
250
|
const E = m - c.left - c.right;
|
|
251
|
-
P = f ||
|
|
251
|
+
P = f || w ? he(g, E) : E;
|
|
252
252
|
} else {
|
|
253
253
|
const E = p - c.top - c.bottom;
|
|
254
|
-
b = f ||
|
|
254
|
+
b = f || w ? he(v, E) : E;
|
|
255
255
|
}
|
|
256
|
-
if (
|
|
257
|
-
const E = K(c.left, 0),
|
|
258
|
-
|
|
256
|
+
if (w && !f) {
|
|
257
|
+
const E = K(c.left, 0), C = K(c.right, 0), H = K(c.top, 0), F = K(c.bottom, 0);
|
|
258
|
+
u ? P = m - 2 * (E !== 0 || C !== 0 ? E + C : K(c.left, c.right)) : b = p - 2 * (H !== 0 || F !== 0 ? H + F : K(c.top, c.bottom));
|
|
259
259
|
}
|
|
260
260
|
await l({ ...n, availableWidth: P, availableHeight: b });
|
|
261
261
|
const x = await i.getDimensions(r.floating);
|
|
@@ -284,119 +284,119 @@ function Y(e) {
|
|
|
284
284
|
function nt(e) {
|
|
285
285
|
return typeof ShadowRoot < "u" && (e instanceof D(e).ShadowRoot || e instanceof ShadowRoot);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ve(e) {
|
|
288
288
|
const { overflow: n, overflowX: o, overflowY: t, display: i } = k(e);
|
|
289
289
|
return /auto|scroll|overlay|hidden|clip/.test(n + t + o) && !["inline", "contents"].includes(i);
|
|
290
290
|
}
|
|
291
291
|
function pn(e) {
|
|
292
292
|
return ["table", "td", "th"].includes(J(e));
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
const n =
|
|
294
|
+
function We(e) {
|
|
295
|
+
const n = Ue(), o = k(e);
|
|
296
296
|
return o.transform !== "none" || o.perspective !== "none" || !n && !!o.backdropFilter && o.backdropFilter !== "none" || !n && !!o.filter && o.filter !== "none" || ["transform", "perspective", "filter"].some((t) => (o.willChange || "").includes(t)) || ["paint", "layout", "strict", "content"].some((t) => (o.contain || "").includes(t));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Ue() {
|
|
299
299
|
return !(typeof CSS > "u" || !CSS.supports) && CSS.supports("-webkit-backdrop-filter", "none");
|
|
300
300
|
}
|
|
301
301
|
function $e(e) {
|
|
302
302
|
return ["html", "body", "#document"].includes(J(e));
|
|
303
303
|
}
|
|
304
|
-
const
|
|
304
|
+
const Be = Math.min, ae = Math.max, Oe = Math.round, Pe = Math.floor, ee = (e) => ({ x: e, y: e });
|
|
305
305
|
function At(e) {
|
|
306
306
|
const n = k(e);
|
|
307
307
|
let o = parseFloat(n.width) || 0, t = parseFloat(n.height) || 0;
|
|
308
|
-
const i = N(e), r = i ? e.offsetWidth : o, l = i ? e.offsetHeight : t,
|
|
309
|
-
return
|
|
308
|
+
const i = N(e), r = i ? e.offsetWidth : o, l = i ? e.offsetHeight : t, a = Oe(o) !== r || Oe(t) !== l;
|
|
309
|
+
return a && (o = r, t = l), { width: o, height: t, $: a };
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Ge(e) {
|
|
312
312
|
return Y(e) ? e : e.contextElement;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
const n =
|
|
314
|
+
function ue(e) {
|
|
315
|
+
const n = Ge(e);
|
|
316
316
|
if (!N(n)) return ee(1);
|
|
317
317
|
const o = n.getBoundingClientRect(), { width: t, height: i, $: r } = At(n);
|
|
318
|
-
let l = (r ?
|
|
319
|
-
return l && Number.isFinite(l) || (l = 1),
|
|
318
|
+
let l = (r ? Oe(o.width) : o.width) / t, a = (r ? Oe(o.height) : o.height) / i;
|
|
319
|
+
return l && Number.isFinite(l) || (l = 1), a && Number.isFinite(a) || (a = 1), { x: l, y: a };
|
|
320
320
|
}
|
|
321
321
|
const ot = ee(0);
|
|
322
322
|
function Ot(e, n, o) {
|
|
323
323
|
var t, i;
|
|
324
|
-
if (n === void 0 && (n = !0), !
|
|
324
|
+
if (n === void 0 && (n = !0), !Ue()) return ot;
|
|
325
325
|
const r = e ? D(e) : window;
|
|
326
326
|
return !o || n && o !== r ? ot : { x: ((t = r.visualViewport) == null ? void 0 : t.offsetLeft) || 0, y: ((i = r.visualViewport) == null ? void 0 : i.offsetTop) || 0 };
|
|
327
327
|
}
|
|
328
328
|
function te(e, n, o, t) {
|
|
329
329
|
n === void 0 && (n = !1), o === void 0 && (o = !1);
|
|
330
|
-
const i = e.getBoundingClientRect(), r =
|
|
330
|
+
const i = e.getBoundingClientRect(), r = Ge(e);
|
|
331
331
|
let l = ee(1);
|
|
332
|
-
n && (t ? Y(t) && (l =
|
|
333
|
-
const
|
|
334
|
-
let c = (i.left +
|
|
332
|
+
n && (t ? Y(t) && (l = ue(t)) : l = ue(e));
|
|
333
|
+
const a = Ot(r, o, t);
|
|
334
|
+
let c = (i.left + a.x) / l.x, s = (i.top + a.y) / l.y, f = i.width / l.x, u = i.height / l.y;
|
|
335
335
|
if (r) {
|
|
336
336
|
const m = D(r), p = t && Y(t) ? D(t) : t;
|
|
337
337
|
let d = m.frameElement;
|
|
338
338
|
for (; d && t && p !== m; ) {
|
|
339
|
-
const h =
|
|
340
|
-
c *= h.x, s *= h.y, f *= h.x,
|
|
339
|
+
const h = ue(d), v = d.getBoundingClientRect(), g = getComputedStyle(d), w = v.left + (d.clientLeft + parseFloat(g.paddingLeft)) * h.x, b = v.top + (d.clientTop + parseFloat(g.paddingTop)) * h.y;
|
|
340
|
+
c *= h.x, s *= h.y, f *= h.x, u *= h.y, c += w, s += b, d = D(d).frameElement;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return Re({ width: f, height: u, x: c, y: s });
|
|
344
344
|
}
|
|
345
345
|
function I(e) {
|
|
346
346
|
return ((Rt(e) ? e.ownerDocument : e.document) || window.document).documentElement;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Me(e) {
|
|
349
349
|
return Y(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset };
|
|
350
350
|
}
|
|
351
351
|
function Tt(e) {
|
|
352
|
-
return te(I(e)).left +
|
|
352
|
+
return te(I(e)).left + Me(e).scrollLeft;
|
|
353
353
|
}
|
|
354
354
|
function fe(e) {
|
|
355
355
|
if (J(e) === "html") return e;
|
|
356
356
|
const n = e.assignedSlot || e.parentNode || nt(e) && e.host || I(e);
|
|
357
357
|
return nt(n) ? n.host : n;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function Ct(e) {
|
|
360
360
|
const n = fe(e);
|
|
361
|
-
return $e(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : N(n) &&
|
|
361
|
+
return $e(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : N(n) && ve(n) ? n : Ct(n);
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Te(e, n) {
|
|
364
364
|
var o;
|
|
365
365
|
n === void 0 && (n = []);
|
|
366
|
-
const t =
|
|
367
|
-
return i ? n.concat(r, r.visualViewport || [],
|
|
366
|
+
const t = Ct(e), i = t === ((o = e.ownerDocument) == null ? void 0 : o.body), r = D(t);
|
|
367
|
+
return i ? n.concat(r, r.visualViewport || [], ve(t) ? t : []) : n.concat(t, Te(t));
|
|
368
368
|
}
|
|
369
369
|
function rt(e, n, o) {
|
|
370
370
|
let t;
|
|
371
371
|
if (n === "viewport") t = function(i, r) {
|
|
372
|
-
const l = D(i),
|
|
373
|
-
let s =
|
|
372
|
+
const l = D(i), a = I(i), c = l.visualViewport;
|
|
373
|
+
let s = a.clientWidth, f = a.clientHeight, u = 0, m = 0;
|
|
374
374
|
if (c) {
|
|
375
375
|
s = c.width, f = c.height;
|
|
376
|
-
const p =
|
|
377
|
-
(!p || p && r === "fixed") && (
|
|
376
|
+
const p = Ue();
|
|
377
|
+
(!p || p && r === "fixed") && (u = c.offsetLeft, m = c.offsetTop);
|
|
378
378
|
}
|
|
379
|
-
return { width: s, height: f, x:
|
|
379
|
+
return { width: s, height: f, x: u, y: m };
|
|
380
380
|
}(e, o);
|
|
381
381
|
else if (n === "document") t = function(i) {
|
|
382
|
-
const r = I(i), l =
|
|
382
|
+
const r = I(i), l = Me(i), a = i.ownerDocument.body, c = ae(r.scrollWidth, r.clientWidth, a.scrollWidth, a.clientWidth), s = ae(r.scrollHeight, r.clientHeight, a.scrollHeight, a.clientHeight);
|
|
383
383
|
let f = -l.scrollLeft + Tt(i);
|
|
384
|
-
const
|
|
385
|
-
return k(
|
|
384
|
+
const u = -l.scrollTop;
|
|
385
|
+
return k(a).direction === "rtl" && (f += ae(r.clientWidth, a.clientWidth) - c), { width: c, height: s, x: f, y: u };
|
|
386
386
|
}(I(e));
|
|
387
387
|
else if (Y(n)) t = function(i, r) {
|
|
388
|
-
const l = te(i, !0, r === "fixed"),
|
|
389
|
-
return { width: i.clientWidth * s.x, height: i.clientHeight * s.y, x: c * s.x, y:
|
|
388
|
+
const l = te(i, !0, r === "fixed"), a = l.top + i.clientTop, c = l.left + i.clientLeft, s = N(i) ? ue(i) : ee(1);
|
|
389
|
+
return { width: i.clientWidth * s.x, height: i.clientHeight * s.y, x: c * s.x, y: a * s.y };
|
|
390
390
|
}(n, o);
|
|
391
391
|
else {
|
|
392
392
|
const i = Ot(e);
|
|
393
393
|
t = { ...n, x: n.x - i.x, y: n.y - i.y };
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return Re(t);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function Ht(e, n) {
|
|
398
398
|
const o = fe(e);
|
|
399
|
-
return !(o === n || !Y(o) || $e(o)) && (k(o).position === "fixed" ||
|
|
399
|
+
return !(o === n || !Y(o) || $e(o)) && (k(o).position === "fixed" || Ht(o, n));
|
|
400
400
|
}
|
|
401
401
|
function it(e, n) {
|
|
402
402
|
return N(e) && k(e).position !== "fixed" ? n ? n(e) : e.offsetParent : null;
|
|
@@ -406,10 +406,10 @@ function st(e, n) {
|
|
|
406
406
|
if (!N(e)) return o;
|
|
407
407
|
let t = it(e, n);
|
|
408
408
|
for (; t && pn(t) && k(t).position === "static"; ) t = it(t, n);
|
|
409
|
-
return t && (J(t) === "html" || J(t) === "body" && k(t).position === "static" && !
|
|
409
|
+
return t && (J(t) === "html" || J(t) === "body" && k(t).position === "static" && !We(t)) ? o : t || function(i) {
|
|
410
410
|
let r = fe(i);
|
|
411
411
|
for (; N(r) && !$e(r); ) {
|
|
412
|
-
if (
|
|
412
|
+
if (We(r)) return r;
|
|
413
413
|
r = fe(r);
|
|
414
414
|
}
|
|
415
415
|
return null;
|
|
@@ -417,97 +417,97 @@ function st(e, n) {
|
|
|
417
417
|
}
|
|
418
418
|
function mn(e, n, o) {
|
|
419
419
|
const t = N(n), i = I(n), r = o === "fixed", l = te(e, !0, r, n);
|
|
420
|
-
let
|
|
420
|
+
let a = { scrollLeft: 0, scrollTop: 0 };
|
|
421
421
|
const c = ee(0);
|
|
422
|
-
if (t || !t && !r) if ((J(n) !== "body" ||
|
|
422
|
+
if (t || !t && !r) if ((J(n) !== "body" || ve(i)) && (a = Me(n)), N(n)) {
|
|
423
423
|
const s = te(n, !0, r, n);
|
|
424
424
|
c.x = s.x + n.clientLeft, c.y = s.y + n.clientTop;
|
|
425
425
|
} else i && (c.x = Tt(i));
|
|
426
|
-
return { x: l.left +
|
|
426
|
+
return { x: l.left + a.scrollLeft - c.x, y: l.top + a.scrollTop - c.y, width: l.width, height: l.height };
|
|
427
427
|
}
|
|
428
428
|
const hn = { getClippingRect: function(e) {
|
|
429
429
|
let { element: n, boundary: o, rootBoundary: t, strategy: i } = e;
|
|
430
430
|
const r = o === "clippingAncestors" ? function(s, f) {
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
433
|
-
let m =
|
|
431
|
+
const u = f.get(s);
|
|
432
|
+
if (u) return u;
|
|
433
|
+
let m = Te(s).filter((v) => Y(v) && J(v) !== "body"), p = null;
|
|
434
434
|
const d = k(s).position === "fixed";
|
|
435
435
|
let h = d ? fe(s) : s;
|
|
436
436
|
for (; Y(h) && !$e(h); ) {
|
|
437
|
-
const
|
|
438
|
-
|
|
437
|
+
const v = k(h), g = We(h);
|
|
438
|
+
g || v.position !== "fixed" || (p = null), (d ? !g && !p : !g && v.position === "static" && p && ["absolute", "fixed"].includes(p.position) || ve(h) && !g && Ht(s, h)) ? m = m.filter((w) => w !== h) : p = v, h = fe(h);
|
|
439
439
|
}
|
|
440
440
|
return f.set(s, m), m;
|
|
441
|
-
}(n, this._c) : [].concat(o), l = [...r, t],
|
|
442
|
-
const
|
|
443
|
-
return s.top =
|
|
444
|
-
}, rt(n,
|
|
441
|
+
}(n, this._c) : [].concat(o), l = [...r, t], a = l[0], c = l.reduce((s, f) => {
|
|
442
|
+
const u = rt(n, f, i);
|
|
443
|
+
return s.top = ae(u.top, s.top), s.right = Be(u.right, s.right), s.bottom = Be(u.bottom, s.bottom), s.left = ae(u.left, s.left), s;
|
|
444
|
+
}, rt(n, a, i));
|
|
445
445
|
return { width: c.right - c.left, height: c.bottom - c.top, x: c.left, y: c.top };
|
|
446
446
|
}, convertOffsetParentRelativeRectToViewportRelativeRect: function(e) {
|
|
447
447
|
let { rect: n, offsetParent: o, strategy: t } = e;
|
|
448
448
|
const i = N(o), r = I(o);
|
|
449
449
|
if (o === r) return n;
|
|
450
|
-
let l = { scrollLeft: 0, scrollTop: 0 },
|
|
450
|
+
let l = { scrollLeft: 0, scrollTop: 0 }, a = ee(1);
|
|
451
451
|
const c = ee(0);
|
|
452
|
-
if ((i || !i && t !== "fixed") && ((J(o) !== "body" ||
|
|
452
|
+
if ((i || !i && t !== "fixed") && ((J(o) !== "body" || ve(r)) && (l = Me(o)), N(o))) {
|
|
453
453
|
const s = te(o);
|
|
454
|
-
|
|
454
|
+
a = ue(o), c.x = s.x + o.clientLeft, c.y = s.y + o.clientTop;
|
|
455
455
|
}
|
|
456
|
-
return { width: n.width *
|
|
456
|
+
return { width: n.width * a.x, height: n.height * a.y, x: n.x * a.x - l.scrollLeft * a.x + c.x, y: n.y * a.y - l.scrollTop * a.y + c.y };
|
|
457
457
|
}, isElement: Y, getDimensions: function(e) {
|
|
458
458
|
return At(e);
|
|
459
|
-
}, getOffsetParent: st, getDocumentElement: I, getScale:
|
|
459
|
+
}, getOffsetParent: st, getDocumentElement: I, getScale: ue, async getElementRects(e) {
|
|
460
460
|
let { reference: n, floating: o, strategy: t } = e;
|
|
461
461
|
const i = this.getOffsetParent || st, r = this.getDimensions;
|
|
462
462
|
return { reference: mn(n, await i(o), t), floating: { x: 0, y: 0, ...await r(o) } };
|
|
463
463
|
}, getClientRects: (e) => Array.from(e.getClientRects()), isRTL: (e) => k(e).direction === "rtl" };
|
|
464
|
-
function
|
|
464
|
+
function vn(e, n, o, t) {
|
|
465
465
|
t === void 0 && (t = {});
|
|
466
|
-
const { ancestorScroll: i = !0, ancestorResize: r = !0, elementResize: l = !0, layoutShift:
|
|
466
|
+
const { ancestorScroll: i = !0, ancestorResize: r = !0, elementResize: l = !0, layoutShift: a = typeof IntersectionObserver == "function", animationFrame: c = !1 } = t, s = Ge(e), f = i || r ? [...s ? Te(s) : [], ...Te(n)] : [];
|
|
467
467
|
f.forEach((h) => {
|
|
468
468
|
i && h.addEventListener("scroll", o, { passive: !0 }), r && h.addEventListener("resize", o);
|
|
469
469
|
});
|
|
470
|
-
const
|
|
471
|
-
let
|
|
470
|
+
const u = s && a ? function(h, v) {
|
|
471
|
+
let g, w = null;
|
|
472
472
|
const b = I(h);
|
|
473
473
|
function P() {
|
|
474
|
-
clearTimeout(
|
|
474
|
+
clearTimeout(g), w && w.disconnect(), w = null;
|
|
475
475
|
}
|
|
476
|
-
return function x(E,
|
|
477
|
-
E === void 0 && (E = !1),
|
|
478
|
-
const { left:
|
|
479
|
-
if (E ||
|
|
480
|
-
const
|
|
476
|
+
return function x(E, C) {
|
|
477
|
+
E === void 0 && (E = !1), C === void 0 && (C = 1), P();
|
|
478
|
+
const { left: H, top: F, width: R, height: A } = h.getBoundingClientRect();
|
|
479
|
+
if (E || v(), !R || !A) return;
|
|
480
|
+
const $ = Pe(F), y = Pe(b.clientWidth - (H + R)), O = Pe(b.clientHeight - (F + A)), S = Pe(H);
|
|
481
481
|
let T = !0;
|
|
482
|
-
|
|
482
|
+
w = new IntersectionObserver((M) => {
|
|
483
483
|
const L = M[0].intersectionRatio;
|
|
484
|
-
if (L !==
|
|
484
|
+
if (L !== C) {
|
|
485
485
|
if (!T) return x();
|
|
486
|
-
L ? x(!1, L) :
|
|
486
|
+
L ? x(!1, L) : g = setTimeout(() => {
|
|
487
487
|
x(!1, 1e-7);
|
|
488
488
|
}, 100);
|
|
489
489
|
}
|
|
490
490
|
T = !1;
|
|
491
|
-
}, { rootMargin:
|
|
491
|
+
}, { rootMargin: -$ + "px " + -y + "px " + -O + "px " + -S + "px", threshold: ae(0, Be(1, C)) || 1 }), w.observe(h);
|
|
492
492
|
}(!0), P;
|
|
493
493
|
}(s, o) : null;
|
|
494
494
|
let m, p = null;
|
|
495
495
|
l && (p = new ResizeObserver(o), s && !c && p.observe(s), p.observe(n));
|
|
496
496
|
let d = c ? te(e) : null;
|
|
497
497
|
return c && function h() {
|
|
498
|
-
const
|
|
499
|
-
!d ||
|
|
498
|
+
const v = te(e);
|
|
499
|
+
!d || v.x === d.x && v.y === d.y && v.width === d.width && v.height === d.height || o(), d = v, m = requestAnimationFrame(h);
|
|
500
500
|
}(), o(), () => {
|
|
501
501
|
f.forEach((h) => {
|
|
502
502
|
i && h.removeEventListener("scroll", o), r && h.removeEventListener("resize", o);
|
|
503
|
-
}),
|
|
503
|
+
}), u && u(), p && p.disconnect(), p = null, c && cancelAnimationFrame(m);
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const gn = (e, n, o) => {
|
|
507
507
|
const t = /* @__PURE__ */ new Map(), i = { platform: hn, ...o }, r = { ...i.platform, _c: t };
|
|
508
508
|
return tn(e, n, { ...i, platform: r });
|
|
509
509
|
};
|
|
510
|
-
var
|
|
510
|
+
var wn = "div";
|
|
511
511
|
function lt(e = 0, n = 0, o = 0, t = 0) {
|
|
512
512
|
if (typeof DOMRect == "function")
|
|
513
513
|
return new DOMRect(e, n, o, t);
|
|
@@ -545,7 +545,7 @@ function ct(e) {
|
|
|
545
545
|
return Math.round(e * n) / n;
|
|
546
546
|
}
|
|
547
547
|
function Pn(e, n) {
|
|
548
|
-
return
|
|
548
|
+
return an(({ placement: o }) => {
|
|
549
549
|
var t;
|
|
550
550
|
const i = ((e == null ? void 0 : e.clientHeight) || 0) / 2, r = typeof n.gutter == "number" ? n.gutter + i : (t = n.gutter) != null ? t : i;
|
|
551
551
|
return {
|
|
@@ -568,7 +568,7 @@ function En(e) {
|
|
|
568
568
|
}
|
|
569
569
|
function Sn(e) {
|
|
570
570
|
if (!(!e.slide && !e.overlap))
|
|
571
|
-
return
|
|
571
|
+
return un({
|
|
572
572
|
mainAxis: e.slide,
|
|
573
573
|
crossAxis: e.overlap,
|
|
574
574
|
padding: e.overflowPadding,
|
|
@@ -600,28 +600,28 @@ function An(e, n) {
|
|
|
600
600
|
padding: n.arrowPadding
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
|
-
var
|
|
603
|
+
var $t = je(
|
|
604
604
|
function(n) {
|
|
605
605
|
var o = n, {
|
|
606
606
|
store: t,
|
|
607
607
|
modal: i = !1,
|
|
608
608
|
portal: r = !!i,
|
|
609
609
|
preserveTabOrder: l = !0,
|
|
610
|
-
autoFocusOnShow:
|
|
610
|
+
autoFocusOnShow: a = !0,
|
|
611
611
|
wrapperProps: c,
|
|
612
612
|
fixed: s = !1,
|
|
613
613
|
flip: f = !0,
|
|
614
|
-
shift:
|
|
614
|
+
shift: u = 0,
|
|
615
615
|
slide: m = !0,
|
|
616
616
|
overlap: p = !1,
|
|
617
617
|
sameWidth: d = !1,
|
|
618
618
|
fitViewport: h = !1,
|
|
619
|
-
gutter:
|
|
620
|
-
arrowPadding:
|
|
621
|
-
overflowPadding:
|
|
619
|
+
gutter: v,
|
|
620
|
+
arrowPadding: g = 4,
|
|
621
|
+
overflowPadding: w = 8,
|
|
622
622
|
getAnchorRect: b,
|
|
623
623
|
updatePosition: P
|
|
624
|
-
} = o, x =
|
|
624
|
+
} = o, x = Ce(o, [
|
|
625
625
|
"store",
|
|
626
626
|
"modal",
|
|
627
627
|
"portal",
|
|
@@ -641,33 +641,33 @@ var Ct = Be(
|
|
|
641
641
|
"getAnchorRect",
|
|
642
642
|
"updatePosition"
|
|
643
643
|
]);
|
|
644
|
-
const E =
|
|
644
|
+
const E = wt();
|
|
645
645
|
t = t || E, He(
|
|
646
646
|
t,
|
|
647
647
|
process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
648
648
|
);
|
|
649
|
-
const
|
|
650
|
-
|
|
649
|
+
const C = t.useState("arrowElement"), H = t.useState("anchorElement"), F = t.useState("disclosureElement"), R = t.useState("popoverElement"), A = t.useState("contentElement"), $ = t.useState("placement"), y = t.useState("mounted"), O = t.useState("rendered"), S = ce(null), [T, M] = Ie(!1), { portalRef: L, domReady: X } = ht(r, x.portalRef), V = me(b), W = me(P), Q = !!P;
|
|
650
|
+
Le(() => {
|
|
651
651
|
if (!(R != null && R.isConnected)) return;
|
|
652
652
|
R.style.setProperty(
|
|
653
653
|
"--popover-overflow-padding",
|
|
654
|
-
`${
|
|
654
|
+
`${w}px`
|
|
655
655
|
);
|
|
656
|
-
const B = yn(
|
|
656
|
+
const B = yn(H, V), pe = async () => {
|
|
657
657
|
if (!y) return;
|
|
658
|
-
|
|
659
|
-
const re =
|
|
660
|
-
Pn(re, { gutter:
|
|
661
|
-
En({ flip: f, overflowPadding:
|
|
662
|
-
Sn({ slide: m,
|
|
663
|
-
An(re, { arrowPadding:
|
|
658
|
+
C || (S.current = S.current || document.createElement("div"));
|
|
659
|
+
const re = C || S.current, Dt = [
|
|
660
|
+
Pn(re, { gutter: v, shift: u }),
|
|
661
|
+
En({ flip: f, overflowPadding: w }),
|
|
662
|
+
Sn({ slide: m, overlap: p, overflowPadding: w }),
|
|
663
|
+
An(re, { arrowPadding: g }),
|
|
664
664
|
Rn({
|
|
665
665
|
sameWidth: d,
|
|
666
666
|
fitViewport: h,
|
|
667
|
-
overflowPadding:
|
|
667
|
+
overflowPadding: w
|
|
668
668
|
})
|
|
669
|
-
], ie = await
|
|
670
|
-
placement:
|
|
669
|
+
], ie = await gn(B, R, {
|
|
670
|
+
placement: $,
|
|
671
671
|
strategy: s ? "fixed" : "absolute",
|
|
672
672
|
middleware: Dt
|
|
673
673
|
});
|
|
@@ -678,22 +678,22 @@ var Ct = Be(
|
|
|
678
678
|
left: "0",
|
|
679
679
|
transform: `translate3d(${Lt}px,${_t}px,0)`
|
|
680
680
|
}), re && ie.middlewareData.arrow) {
|
|
681
|
-
const { x: we, y:
|
|
681
|
+
const { x: we, y: xe } = ie.middlewareData.arrow, Je = ie.placement.split("-")[0], ye = re.clientWidth / 2, be = re.clientHeight / 2, Qe = we != null ? we + ye : -ye, Ke = xe != null ? xe + be : -be;
|
|
682
682
|
R.style.setProperty(
|
|
683
683
|
"--popover-transform-origin",
|
|
684
684
|
{
|
|
685
|
-
top: `${Qe}px calc(100% + ${
|
|
686
|
-
bottom: `${Qe}px ${-
|
|
687
|
-
left: `calc(100% + ${
|
|
688
|
-
right: `${-
|
|
685
|
+
top: `${Qe}px calc(100% + ${be}px)`,
|
|
686
|
+
bottom: `${Qe}px ${-be}px`,
|
|
687
|
+
left: `calc(100% + ${ye}px) ${Ke}px`,
|
|
688
|
+
right: `${-ye}px ${Ke}px`
|
|
689
689
|
}[Je]
|
|
690
690
|
), Object.assign(re.style, {
|
|
691
691
|
left: we != null ? `${we}px` : "",
|
|
692
|
-
top:
|
|
692
|
+
top: xe != null ? `${xe}px` : "",
|
|
693
693
|
[Je]: "100%"
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
}, Ft =
|
|
696
|
+
}, Ft = vn(B, R, async () => {
|
|
697
697
|
Q ? (await W({ updatePosition: pe }), M(!0)) : await pe();
|
|
698
698
|
}, {
|
|
699
699
|
// JSDOM doesn't support ResizeObserver
|
|
@@ -706,26 +706,26 @@ var Ct = Be(
|
|
|
706
706
|
t,
|
|
707
707
|
O,
|
|
708
708
|
R,
|
|
709
|
+
C,
|
|
709
710
|
H,
|
|
710
|
-
$,
|
|
711
711
|
R,
|
|
712
|
-
|
|
712
|
+
$,
|
|
713
713
|
y,
|
|
714
714
|
X,
|
|
715
715
|
s,
|
|
716
716
|
f,
|
|
717
|
-
|
|
717
|
+
u,
|
|
718
718
|
m,
|
|
719
719
|
p,
|
|
720
720
|
d,
|
|
721
721
|
h,
|
|
722
|
+
v,
|
|
722
723
|
g,
|
|
723
724
|
w,
|
|
724
|
-
v,
|
|
725
725
|
V,
|
|
726
726
|
Q,
|
|
727
727
|
W
|
|
728
|
-
]),
|
|
728
|
+
]), Le(() => {
|
|
729
729
|
if (!y || !X || !(R != null && R.isConnected) || !(A != null && A.isConnected)) return;
|
|
730
730
|
const B = () => {
|
|
731
731
|
R.style.zIndex = getComputedStyle(A).zIndex;
|
|
@@ -737,9 +737,9 @@ var Ct = Be(
|
|
|
737
737
|
return () => cancelAnimationFrame(pe);
|
|
738
738
|
}, [y, X, R, A]);
|
|
739
739
|
const oe = s ? "fixed" : "absolute";
|
|
740
|
-
return x =
|
|
740
|
+
return x = _e(
|
|
741
741
|
x,
|
|
742
|
-
(B) => /* @__PURE__ */
|
|
742
|
+
(B) => /* @__PURE__ */ Se.jsx(
|
|
743
743
|
"div",
|
|
744
744
|
G(_({}, c), {
|
|
745
745
|
style: _({
|
|
@@ -754,9 +754,9 @@ var Ct = Be(
|
|
|
754
754
|
})
|
|
755
755
|
),
|
|
756
756
|
[t, oe, c]
|
|
757
|
-
), x =
|
|
757
|
+
), x = _e(
|
|
758
758
|
x,
|
|
759
|
-
(B) => /* @__PURE__ */
|
|
759
|
+
(B) => /* @__PURE__ */ Se.jsx(xt, { value: t, children: B }),
|
|
760
760
|
[t]
|
|
761
761
|
), x = G(_({
|
|
762
762
|
// data-placing is not part of the public API. We're setting this here so
|
|
@@ -773,22 +773,25 @@ var Ct = Be(
|
|
|
773
773
|
modal: i,
|
|
774
774
|
portal: r,
|
|
775
775
|
preserveTabOrder: l,
|
|
776
|
-
preserveTabOrderAnchor: F ||
|
|
777
|
-
autoFocusOnShow: T &&
|
|
776
|
+
preserveTabOrderAnchor: F || H,
|
|
777
|
+
autoFocusOnShow: T && a
|
|
778
778
|
}, x), {
|
|
779
779
|
portalRef: L
|
|
780
780
|
})), x;
|
|
781
781
|
}
|
|
782
782
|
), zn = dt(
|
|
783
|
-
|
|
784
|
-
const o =
|
|
785
|
-
return
|
|
783
|
+
ze(function(n) {
|
|
784
|
+
const o = $t(n);
|
|
785
|
+
return Ye(wn, o);
|
|
786
786
|
}),
|
|
787
|
-
|
|
788
|
-
),
|
|
787
|
+
wt
|
|
788
|
+
), ge = Xt(
|
|
789
789
|
[Qt],
|
|
790
790
|
[xt]
|
|
791
|
-
)
|
|
791
|
+
);
|
|
792
|
+
ge.useContext;
|
|
793
|
+
ge.useScopedContext;
|
|
794
|
+
var Ze = ge.useProviderContext, Yn = ge.ContextProvider, On = ge.ScopedContextProvider;
|
|
792
795
|
function Tn(e = {}) {
|
|
793
796
|
var n;
|
|
794
797
|
const o = (n = e.store) == null ? void 0 : n.getState(), t = bt(le(q({}, e), {
|
|
@@ -804,25 +807,25 @@ function Tn(e = {}) {
|
|
|
804
807
|
autoFocusOnShow: j(o == null ? void 0 : o.autoFocusOnShow, !1)
|
|
805
808
|
}), l = pt(r, t, e.store);
|
|
806
809
|
return le(q(q({}, t), l), {
|
|
807
|
-
setAutoFocusOnShow: (
|
|
810
|
+
setAutoFocusOnShow: (a) => l.setState("autoFocusOnShow", a)
|
|
808
811
|
});
|
|
809
812
|
}
|
|
810
|
-
function
|
|
811
|
-
return
|
|
813
|
+
function Cn(e, n, o) {
|
|
814
|
+
return Ee(e, o, "timeout"), Ee(e, o, "showTimeout"), Ee(e, o, "hideTimeout"), Pt(e, n, o);
|
|
812
815
|
}
|
|
813
816
|
function In(e = {}) {
|
|
814
817
|
const [n, o] = mt(Tn, e);
|
|
815
|
-
return
|
|
818
|
+
return Cn(n, o, e);
|
|
816
819
|
}
|
|
817
|
-
function
|
|
820
|
+
function De(e) {
|
|
818
821
|
return [e.clientX, e.clientY];
|
|
819
822
|
}
|
|
820
|
-
function
|
|
823
|
+
function at(e, n) {
|
|
821
824
|
const [o, t] = e;
|
|
822
825
|
let i = !1;
|
|
823
826
|
const r = n.length;
|
|
824
|
-
for (let l = r,
|
|
825
|
-
const [s, f] = n[
|
|
827
|
+
for (let l = r, a = 0, c = l - 1; a < l; c = a++) {
|
|
828
|
+
const [s, f] = n[a], [u, m] = n[c], [, p] = n[c === 0 ? l - 1 : c - 1] || [0, 0], d = (f - m) * (o - s) - (s - u) * (t - f);
|
|
826
829
|
if (m < f) {
|
|
827
830
|
if (t >= m && t < f) {
|
|
828
831
|
if (d === 0) return !0;
|
|
@@ -833,35 +836,35 @@ function ut(e, n) {
|
|
|
833
836
|
if (d === 0) return !0;
|
|
834
837
|
d < 0 && (t === m ? t < p && (i = !i) : i = !i);
|
|
835
838
|
}
|
|
836
|
-
} else if (t === f && (o >=
|
|
839
|
+
} else if (t === f && (o >= u && o <= s || o >= s && o <= u))
|
|
837
840
|
return !0;
|
|
838
841
|
}
|
|
839
842
|
return i;
|
|
840
843
|
}
|
|
841
|
-
function
|
|
842
|
-
const { top: o, right: t, bottom: i, left: r } = n, [l,
|
|
844
|
+
function Hn(e, n) {
|
|
845
|
+
const { top: o, right: t, bottom: i, left: r } = n, [l, a] = e, c = l < r ? "left" : l > t ? "right" : null, s = a < o ? "top" : a > i ? "bottom" : null;
|
|
843
846
|
return [c, s];
|
|
844
847
|
}
|
|
845
|
-
function
|
|
846
|
-
const o = e.getBoundingClientRect(), { top: t, right: i, bottom: r, left: l } = o, [
|
|
847
|
-
return
|
|
848
|
+
function ut(e, n) {
|
|
849
|
+
const o = e.getBoundingClientRect(), { top: t, right: i, bottom: r, left: l } = o, [a, c] = Hn(n, o), s = [n];
|
|
850
|
+
return a ? (c !== "top" && s.push([a === "left" ? l : i, t]), s.push([a === "left" ? i : l, t]), s.push([a === "left" ? i : l, r]), c !== "bottom" && s.push([a === "left" ? l : i, r])) : c === "top" ? (s.push([l, t]), s.push([l, r]), s.push([i, r]), s.push([i, t])) : (s.push([l, r]), s.push([l, t]), s.push([i, t]), s.push([i, r])), s;
|
|
848
851
|
}
|
|
849
|
-
var
|
|
852
|
+
var $n = "div";
|
|
850
853
|
function Mt(e, n, o, t) {
|
|
851
|
-
return Gt(n) ? !0 : e ? !!(
|
|
854
|
+
return Gt(n) ? !0 : e ? !!(Ne(n, e) || o && Ne(o, e) || t != null && t.some((i) => Mt(e, i, o))) : !1;
|
|
852
855
|
}
|
|
853
856
|
function Mn(e) {
|
|
854
857
|
var n = e, {
|
|
855
858
|
store: o
|
|
856
|
-
} = n, t =
|
|
859
|
+
} = n, t = Ce(n, [
|
|
857
860
|
"store"
|
|
858
861
|
]);
|
|
859
|
-
const [i, r] =
|
|
862
|
+
const [i, r] = Ie(!1), l = o.useState("mounted");
|
|
860
863
|
U(() => {
|
|
861
864
|
l || r(!1);
|
|
862
865
|
}, [l]);
|
|
863
|
-
const
|
|
864
|
-
|
|
866
|
+
const a = t.onFocus, c = me((f) => {
|
|
867
|
+
a == null || a(f), !f.defaultPrevented && r(!0);
|
|
865
868
|
}), s = ce(null);
|
|
866
869
|
return U(() => zt(o, ["anchorElement"], (f) => {
|
|
867
870
|
s.current = f.anchorElement;
|
|
@@ -872,16 +875,16 @@ function Mn(e) {
|
|
|
872
875
|
onFocus: c
|
|
873
876
|
}), t;
|
|
874
877
|
}
|
|
875
|
-
var ft =
|
|
878
|
+
var ft = en(null), Fn = je(
|
|
876
879
|
function(n) {
|
|
877
880
|
var o = n, {
|
|
878
881
|
store: t,
|
|
879
882
|
modal: i = !1,
|
|
880
883
|
portal: r = !!i,
|
|
881
884
|
hideOnEscape: l = !0,
|
|
882
|
-
hideOnHoverOutside:
|
|
883
|
-
disablePointerEventsOnApproach: c = !!
|
|
884
|
-
} = o, s =
|
|
885
|
+
hideOnHoverOutside: a = !0,
|
|
886
|
+
disablePointerEventsOnApproach: c = !!a
|
|
887
|
+
} = o, s = Ce(o, [
|
|
885
888
|
"store",
|
|
886
889
|
"modal",
|
|
887
890
|
"portal",
|
|
@@ -894,24 +897,24 @@ var ft = Kt(null), Fn = Be(
|
|
|
894
897
|
t,
|
|
895
898
|
process.env.NODE_ENV !== "production" && "Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component."
|
|
896
899
|
);
|
|
897
|
-
const
|
|
900
|
+
const u = ce(null), [m, p] = Ie([]), d = ce(0), h = ce(null), { portalRef: v, domReady: g } = ht(r, s.portalRef), w = vt(), b = !!a, P = ke(a), x = !!c, E = ke(
|
|
898
901
|
c
|
|
899
|
-
),
|
|
902
|
+
), C = t.useState("open"), H = t.useState("mounted");
|
|
900
903
|
U(() => {
|
|
901
|
-
if (!
|
|
902
|
-
const y =
|
|
904
|
+
if (!g || !H || !b && !x) return;
|
|
905
|
+
const y = u.current;
|
|
903
906
|
return y ? et(
|
|
904
907
|
se("mousemove", (S) => {
|
|
905
|
-
if (!t || !
|
|
908
|
+
if (!t || !w()) return;
|
|
906
909
|
const { anchorElement: T, hideTimeout: M, timeout: L } = t.getState(), X = h.current, [V] = S.composedPath(), W = T;
|
|
907
910
|
if (Mt(V, y, W, m)) {
|
|
908
|
-
h.current = V && W &&
|
|
911
|
+
h.current = V && W && Ne(W, V) ? De(S) : null, window.clearTimeout(d.current), d.current = 0;
|
|
909
912
|
return;
|
|
910
913
|
}
|
|
911
914
|
if (!d.current) {
|
|
912
915
|
if (X) {
|
|
913
|
-
const Q =
|
|
914
|
-
if (
|
|
916
|
+
const Q = De(S), oe = ut(y, X);
|
|
917
|
+
if (at(Q, oe)) {
|
|
915
918
|
if (h.current = Q, !E(S)) return;
|
|
916
919
|
S.preventDefault(), S.stopPropagation();
|
|
917
920
|
return;
|
|
@@ -926,23 +929,23 @@ var ft = Kt(null), Fn = Be(
|
|
|
926
929
|
) : void 0;
|
|
927
930
|
}, [
|
|
928
931
|
t,
|
|
929
|
-
v,
|
|
930
932
|
w,
|
|
931
|
-
|
|
933
|
+
g,
|
|
934
|
+
H,
|
|
932
935
|
b,
|
|
933
936
|
x,
|
|
934
937
|
m,
|
|
935
938
|
E,
|
|
936
939
|
P
|
|
937
940
|
]), U(() => {
|
|
938
|
-
if (!
|
|
941
|
+
if (!g || !H || !x) return;
|
|
939
942
|
const y = (O) => {
|
|
940
|
-
const S =
|
|
943
|
+
const S = u.current;
|
|
941
944
|
if (!S) return;
|
|
942
945
|
const T = h.current;
|
|
943
946
|
if (!T) return;
|
|
944
|
-
const M =
|
|
945
|
-
if (
|
|
947
|
+
const M = ut(S, T);
|
|
948
|
+
if (at(De(O), M)) {
|
|
946
949
|
if (!E(O)) return;
|
|
947
950
|
O.preventDefault(), O.stopPropagation();
|
|
948
951
|
}
|
|
@@ -954,23 +957,23 @@ var ft = Kt(null), Fn = Be(
|
|
|
954
957
|
se("mouseout", y, !0),
|
|
955
958
|
se("mouseleave", y, !0)
|
|
956
959
|
);
|
|
957
|
-
}, [
|
|
958
|
-
|
|
959
|
-
}, [t,
|
|
960
|
-
const F = qt(
|
|
960
|
+
}, [g, H, x, E]), U(() => {
|
|
961
|
+
g && (C || t == null || t.setAutoFocusOnShow(!1));
|
|
962
|
+
}, [t, g, C]);
|
|
963
|
+
const F = qt(C);
|
|
961
964
|
U(() => {
|
|
962
|
-
if (
|
|
965
|
+
if (g)
|
|
963
966
|
return () => {
|
|
964
967
|
F.current || t == null || t.setAutoFocusOnShow(!1);
|
|
965
968
|
};
|
|
966
|
-
}, [t,
|
|
967
|
-
const R =
|
|
968
|
-
|
|
969
|
-
if (i || !r ||
|
|
970
|
-
const y =
|
|
969
|
+
}, [t, g]);
|
|
970
|
+
const R = Kt(ft);
|
|
971
|
+
Le(() => {
|
|
972
|
+
if (i || !r || !H || !g) return;
|
|
973
|
+
const y = u.current;
|
|
971
974
|
if (y)
|
|
972
975
|
return R == null ? void 0 : R(y);
|
|
973
|
-
}, [i, r,
|
|
976
|
+
}, [i, r, H, g]);
|
|
974
977
|
const A = yt(
|
|
975
978
|
(y) => {
|
|
976
979
|
p((S) => [...S, y]);
|
|
@@ -983,23 +986,23 @@ var ft = Kt(null), Fn = Be(
|
|
|
983
986
|
},
|
|
984
987
|
[R]
|
|
985
988
|
);
|
|
986
|
-
s =
|
|
989
|
+
s = _e(
|
|
987
990
|
s,
|
|
988
|
-
(y) => /* @__PURE__ */
|
|
991
|
+
(y) => /* @__PURE__ */ Se.jsx(On, { value: t, children: /* @__PURE__ */ Se.jsx(ft.Provider, { value: A, children: y }) }),
|
|
989
992
|
[t, A]
|
|
990
993
|
), s = G(_({}, s), {
|
|
991
|
-
ref:
|
|
994
|
+
ref: gt(u, s.ref)
|
|
992
995
|
}), s = Mn(_({ store: t }, s));
|
|
993
|
-
const
|
|
996
|
+
const $ = t.useState(
|
|
994
997
|
(y) => i || y.autoFocusOnShow
|
|
995
998
|
);
|
|
996
|
-
return s =
|
|
999
|
+
return s = $t(G(_({
|
|
997
1000
|
store: t,
|
|
998
1001
|
modal: i,
|
|
999
1002
|
portal: r,
|
|
1000
|
-
autoFocusOnShow:
|
|
1003
|
+
autoFocusOnShow: $
|
|
1001
1004
|
}, s), {
|
|
1002
|
-
portalRef:
|
|
1005
|
+
portalRef: v,
|
|
1003
1006
|
hideOnEscape(y) {
|
|
1004
1007
|
return Ut(l, y) ? !1 : (requestAnimationFrame(() => {
|
|
1005
1008
|
requestAnimationFrame(() => {
|
|
@@ -1010,54 +1013,54 @@ var ft = Kt(null), Fn = Be(
|
|
|
1010
1013
|
})), s;
|
|
1011
1014
|
}
|
|
1012
1015
|
), Xn = dt(
|
|
1013
|
-
|
|
1016
|
+
ze(function(n) {
|
|
1014
1017
|
const o = Fn(n);
|
|
1015
|
-
return
|
|
1018
|
+
return Ye($n, o);
|
|
1016
1019
|
}),
|
|
1017
1020
|
Ze
|
|
1018
|
-
), Dn = "a", Ln =
|
|
1021
|
+
), Dn = "a", Ln = je(
|
|
1019
1022
|
function(n) {
|
|
1020
|
-
var o = n, { store: t, showOnHover: i = !0 } = o, r =
|
|
1023
|
+
var o = n, { store: t, showOnHover: i = !0 } = o, r = Ce(o, ["store", "showOnHover"]);
|
|
1021
1024
|
const l = Ze();
|
|
1022
1025
|
t = t || l, He(
|
|
1023
1026
|
t,
|
|
1024
1027
|
process.env.NODE_ENV !== "production" && "HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component."
|
|
1025
1028
|
);
|
|
1026
|
-
const
|
|
1027
|
-
U(() => () => window.clearTimeout(c.current), []), U(() => se("mouseleave", (
|
|
1029
|
+
const a = Zt(r), c = ce(0);
|
|
1030
|
+
U(() => () => window.clearTimeout(c.current), []), U(() => se("mouseleave", (g) => {
|
|
1028
1031
|
if (!t) return;
|
|
1029
|
-
const { anchorElement:
|
|
1030
|
-
|
|
1032
|
+
const { anchorElement: w } = t.getState();
|
|
1033
|
+
w && g.target === w && (window.clearTimeout(c.current), c.current = 0);
|
|
1031
1034
|
}, !0), [t]);
|
|
1032
|
-
const s = r.onMouseMove, f =
|
|
1033
|
-
if (s == null || s(
|
|
1034
|
-
const
|
|
1035
|
-
t.setAnchorElement(
|
|
1036
|
-
const { showTimeout:
|
|
1037
|
-
c.current = 0,
|
|
1038
|
-
t == null || t.setDisclosureElement(
|
|
1035
|
+
const s = r.onMouseMove, f = ke(i), u = vt(), m = me((v) => {
|
|
1036
|
+
if (s == null || s(v), a || !t || v.defaultPrevented || c.current || !u() || !f(v)) return;
|
|
1037
|
+
const g = v.currentTarget;
|
|
1038
|
+
t.setAnchorElement(g), t.setDisclosureElement(g);
|
|
1039
|
+
const { showTimeout: w, timeout: b } = t.getState(), P = () => {
|
|
1040
|
+
c.current = 0, u() && (t == null || t.setAnchorElement(g), t == null || t.show(), queueMicrotask(() => {
|
|
1041
|
+
t == null || t.setDisclosureElement(g);
|
|
1039
1042
|
}));
|
|
1040
|
-
}, x =
|
|
1043
|
+
}, x = w ?? b;
|
|
1041
1044
|
x === 0 ? P() : c.current = window.setTimeout(P, x);
|
|
1042
|
-
}), p = r.onClick, d = me((
|
|
1043
|
-
p == null || p(
|
|
1045
|
+
}), p = r.onClick, d = me((v) => {
|
|
1046
|
+
p == null || p(v), t && (window.clearTimeout(c.current), c.current = 0);
|
|
1044
1047
|
}), h = yt(
|
|
1045
|
-
(
|
|
1048
|
+
(v) => {
|
|
1046
1049
|
if (!t) return;
|
|
1047
|
-
const { anchorElement:
|
|
1048
|
-
|
|
1050
|
+
const { anchorElement: g } = t.getState();
|
|
1051
|
+
g != null && g.isConnected || t.setAnchorElement(v);
|
|
1049
1052
|
},
|
|
1050
1053
|
[t]
|
|
1051
1054
|
);
|
|
1052
1055
|
return r = G(_({}, r), {
|
|
1053
|
-
ref:
|
|
1056
|
+
ref: gt(h, r.ref),
|
|
1054
1057
|
onMouseMove: m,
|
|
1055
1058
|
onClick: d
|
|
1056
1059
|
}), r = Jt(r), r;
|
|
1057
1060
|
}
|
|
1058
|
-
), qn =
|
|
1061
|
+
), qn = ze(function(n) {
|
|
1059
1062
|
const o = Ln(n);
|
|
1060
|
-
return
|
|
1063
|
+
return Ye(Dn, o);
|
|
1061
1064
|
});
|
|
1062
1065
|
export {
|
|
1063
1066
|
qn as H,
|
|
@@ -1065,7 +1068,7 @@ export {
|
|
|
1065
1068
|
Xn as a,
|
|
1066
1069
|
In as b,
|
|
1067
1070
|
Tn as c,
|
|
1068
|
-
|
|
1071
|
+
Cn as d,
|
|
1069
1072
|
On as e,
|
|
1070
1073
|
Yn as f,
|
|
1071
1074
|
Fn as g,
|