@wrdagency/blockout 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2NBKRL7C-DnAMmXv4.js +81 -0
- package/dist/CaretDown.es-eySGHzTJ.js +32 -0
- package/dist/CaretUp.es-Cy8czlHG.js +32 -0
- package/dist/P7GR5CS5-BryEvRCz.js +621 -0
- package/dist/SSRBase.es-BUXS72ra.js +33 -0
- package/dist/T7VMP3TM--1s529fr.js +3544 -0
- package/dist/UQQRIHDV-Bfi_RJby.js +1046 -0
- package/dist/VIIRIBF3-XWA2y8Hu.js +21 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/index10.css +1 -0
- package/dist/assets/index11.css +1 -0
- package/dist/assets/index2.css +1 -0
- package/dist/assets/index3.css +1 -0
- package/dist/assets/index4.css +1 -0
- package/dist/assets/index5.css +1 -0
- package/dist/assets/index6.css +1 -0
- package/dist/assets/index7.css +1 -0
- package/dist/assets/index8.css +1 -0
- package/dist/assets/index9.css +1 -0
- package/dist/components/button/index.d.ts +9 -0
- package/dist/components/button/index.js +28 -0
- package/dist/components/button-group/index.d.ts +6 -0
- package/dist/components/button-group/index.js +6 -0
- package/dist/components/controls/base-control/index.d.ts +3 -0
- package/dist/components/controls/base-control/index.js +26 -0
- package/dist/components/controls/base-control/props.d.ts +23 -0
- package/dist/components/controls/base-control/props.js +21 -0
- package/dist/components/controls/index.d.ts +6 -0
- package/dist/components/controls/index.js +14 -0
- package/dist/components/controls/number-control/index.d.ts +6 -0
- package/dist/components/controls/number-control/index.js +52 -0
- package/dist/components/controls/select-control/index.d.ts +9 -0
- package/dist/components/controls/select-control/index.js +591 -0
- package/dist/components/controls/select-control/options.d.ts +11 -0
- package/dist/components/controls/select-control/options.js +12 -0
- package/dist/components/controls/text-control/index.d.ts +6 -0
- package/dist/components/controls/text-control/index.js +12 -0
- package/dist/components/controls/textarea-control/index.d.ts +6 -0
- package/dist/components/controls/textarea-control/index.js +18 -0
- package/dist/components/controls/toggle-control/index.d.ts +8 -0
- package/dist/components/controls/toggle-control/index.js +46 -0
- package/dist/components/data-table/column.d.ts +4 -0
- package/dist/components/data-table/column.js +874 -0
- package/dist/components/data-table/context.d.ts +7 -0
- package/dist/components/data-table/context.js +36 -0
- package/dist/components/data-table/example.d.ts +1 -0
- package/dist/components/data-table/example.js +5 -0
- package/dist/components/data-table/footer.d.ts +2 -0
- package/dist/components/data-table/footer.js +23 -0
- package/dist/components/data-table/header.d.ts +7 -0
- package/dist/components/data-table/header.js +408 -0
- package/dist/components/data-table/index.d.ts +10 -0
- package/dist/components/data-table/index.js +86 -0
- package/dist/components/data-table/types.d.ts +75 -0
- package/dist/components/data-table/types.js +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +23 -0
- package/dist/components/menu/icon.d.ts +4 -0
- package/dist/components/menu/icon.js +6 -0
- package/dist/components/menu/index.d.ts +8 -0
- package/dist/components/menu/index.js +131 -0
- package/dist/components/menu/item.d.ts +7 -0
- package/dist/components/menu/item.js +8 -0
- package/dist/components/menu/items/action.d.ts +7 -0
- package/dist/components/menu/items/action.js +23 -0
- package/dist/components/menu/items/spacer.d.ts +2 -0
- package/dist/components/menu/items/spacer.js +46 -0
- package/dist/components/menu/items/submenu.d.ts +7 -0
- package/dist/components/menu/items/submenu.js +7 -0
- package/dist/components/menu/items/toggle.d.ts +7 -0
- package/dist/components/menu/items/toggle.js +109 -0
- package/dist/components/menu/types.d.ts +28 -0
- package/dist/components/menu/types.js +1 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/index.js +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +25 -0
- package/dist/item-CPVd5mKo.js +758 -0
- package/dist/primitives/draggable/index.d.ts +17 -0
- package/dist/primitives/draggable/index.js +52 -0
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.js +4 -0
- package/dist/primitives/resizable/index.d.ts +7 -0
- package/dist/primitives/resizable/index.js +76 -0
- package/dist/types/component.d.ts +4 -0
- package/dist/types/component.js +1 -0
- package/dist/types/math.d.ts +10 -0
- package/dist/types/math.js +1 -0
- package/dist/utils/css.d.ts +1 -0
- package/dist/utils/css.js +6 -0
- package/dist/utils/noop.d.ts +1 -0
- package/dist/utils/noop.js +5 -0
- package/package.json +61 -0
- package/readme.md +3 -0
|
@@ -0,0 +1,3544 @@
|
|
|
1
|
+
import { z as j, y as _e, M as De, A as ce, ai as kn, n as G, B as qt, r as Ut, j as C, c as Dr, P as Yt, C as Ar, o as Tr, a as $n, b as ee, _ as se, aj as _r, i as Fe, I as Cr, v as z, ak as Ue, a1 as Gt, e as ue, H as Ne, u as rt, $ as Xt, E as fe, h as W, s as Be, al as Rr, f as K, d as Q, am as Jt, an as Vn, t as Hn, x as Ir, ao as gn, a6 as nt, N as Zt, R as de, a2 as Fr, ap as Lr, w as Bn, aq as Mr, ar as Nr, Y as Ct, as as Pt, K as Wn, a5 as $t, at as kr, au as $r, D as Vr, a8 as Hr, av as Dt, a7 as Br, a9 as Wr, F as jr, p as zr, aw as Kr } from "./P7GR5CS5-BryEvRCz.js";
|
|
2
|
+
import { t as Qt, c as it, s as $e, k as qr, e as vn, g as re, d as bt, l as ke, n as Ur, q as Yr, r as Gr, v as Rt, j as jn, w as Xr, x as Jr, u as he, m as zn, o as Kn, y as Zr, f as qn, z as It, A as hn, B as Qr, C as eo, F as to, D as no, E as ro, G as oo, H as ot, I as io, J as so, K as ao } from "./UQQRIHDV-Bfi_RJby.js";
|
|
3
|
+
import Un, { createContext as Je, useRef as Y, useEffect as U, useState as le, useCallback as st, useMemo as Yn, useContext as en, isValidElement as co } from "react";
|
|
4
|
+
import { jsx as H, jsxs as ht, Fragment as yt } from "react/jsx-runtime";
|
|
5
|
+
function uo(e) {
|
|
6
|
+
var t;
|
|
7
|
+
const r = e.find((s) => !!s.element), n = [...e].reverse().find((s) => !!s.element);
|
|
8
|
+
let o = (t = r == null ? void 0 : r.element) == null ? void 0 : t.parentElement;
|
|
9
|
+
for (; o && (n != null && n.element); ) {
|
|
10
|
+
if (n && o.contains(n.element))
|
|
11
|
+
return o;
|
|
12
|
+
o = o.parentElement;
|
|
13
|
+
}
|
|
14
|
+
return G(o).body;
|
|
15
|
+
}
|
|
16
|
+
function lo(e) {
|
|
17
|
+
return e == null ? void 0 : e.__unstablePrivateStore;
|
|
18
|
+
}
|
|
19
|
+
function fo(e = {}) {
|
|
20
|
+
var t;
|
|
21
|
+
Qt(e, e.store);
|
|
22
|
+
const r = (t = e.store) == null ? void 0 : t.getState(), n = j(
|
|
23
|
+
e.items,
|
|
24
|
+
r == null ? void 0 : r.items,
|
|
25
|
+
e.defaultItems,
|
|
26
|
+
[]
|
|
27
|
+
), o = new Map(n.map((i) => [i.id, i])), s = {
|
|
28
|
+
items: n,
|
|
29
|
+
renderedItems: j(r == null ? void 0 : r.renderedItems, [])
|
|
30
|
+
}, c = lo(e.store), l = it(
|
|
31
|
+
{ items: n, renderedItems: s.renderedItems },
|
|
32
|
+
c
|
|
33
|
+
), a = it(s, e.store), u = (i) => {
|
|
34
|
+
const d = kn(i, (p) => p.element);
|
|
35
|
+
l.setState("renderedItems", d), a.setState("renderedItems", d);
|
|
36
|
+
};
|
|
37
|
+
$e(a, () => qr(l)), $e(l, () => vn(l, ["items"], (i) => {
|
|
38
|
+
a.setState("items", i.items);
|
|
39
|
+
})), $e(l, () => vn(l, ["renderedItems"], (i) => {
|
|
40
|
+
let d = !0, p = requestAnimationFrame(() => {
|
|
41
|
+
const { renderedItems: b } = a.getState();
|
|
42
|
+
i.renderedItems !== b && u(i.renderedItems);
|
|
43
|
+
});
|
|
44
|
+
if (typeof IntersectionObserver != "function")
|
|
45
|
+
return () => cancelAnimationFrame(p);
|
|
46
|
+
const h = () => {
|
|
47
|
+
if (d) {
|
|
48
|
+
d = !1;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
cancelAnimationFrame(p), p = requestAnimationFrame(() => u(i.renderedItems));
|
|
52
|
+
}, x = uo(i.renderedItems), w = new IntersectionObserver(h, { root: x });
|
|
53
|
+
for (const b of i.renderedItems)
|
|
54
|
+
b.element && w.observe(b.element);
|
|
55
|
+
return () => {
|
|
56
|
+
cancelAnimationFrame(p), w.disconnect();
|
|
57
|
+
};
|
|
58
|
+
}));
|
|
59
|
+
const m = (i, d, p = !1) => {
|
|
60
|
+
let h;
|
|
61
|
+
return d((w) => {
|
|
62
|
+
const b = w.findIndex(({ id: g }) => g === i.id), E = w.slice();
|
|
63
|
+
if (b !== -1) {
|
|
64
|
+
h = w[b];
|
|
65
|
+
const g = ce(ce({}, h), i);
|
|
66
|
+
E[b] = g, o.set(i.id, g);
|
|
67
|
+
} else
|
|
68
|
+
E.push(i), o.set(i.id, i);
|
|
69
|
+
return E;
|
|
70
|
+
}), () => {
|
|
71
|
+
d((w) => {
|
|
72
|
+
if (!h)
|
|
73
|
+
return p && o.delete(i.id), w.filter(({ id: g }) => g !== i.id);
|
|
74
|
+
const b = w.findIndex(({ id: g }) => g === i.id);
|
|
75
|
+
if (b === -1) return w;
|
|
76
|
+
const E = w.slice();
|
|
77
|
+
return E[b] = h, o.set(i.id, h), E;
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
}, f = (i) => m(
|
|
81
|
+
i,
|
|
82
|
+
(d) => l.setState("items", d),
|
|
83
|
+
!0
|
|
84
|
+
);
|
|
85
|
+
return _e(ce({}, a), {
|
|
86
|
+
registerItem: f,
|
|
87
|
+
renderItem: (i) => De(
|
|
88
|
+
f(i),
|
|
89
|
+
m(
|
|
90
|
+
i,
|
|
91
|
+
(d) => l.setState("renderedItems", d)
|
|
92
|
+
)
|
|
93
|
+
),
|
|
94
|
+
item: (i) => {
|
|
95
|
+
if (!i) return null;
|
|
96
|
+
let d = o.get(i);
|
|
97
|
+
if (!d) {
|
|
98
|
+
const { items: p } = l.getState();
|
|
99
|
+
d = p.find((h) => h.id === i), d && o.set(i, d);
|
|
100
|
+
}
|
|
101
|
+
return d || null;
|
|
102
|
+
},
|
|
103
|
+
// @ts-expect-error Internal
|
|
104
|
+
__unstablePrivateStore: l
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function mo(e, t, r) {
|
|
108
|
+
return qt(t, [r.store]), re(e, r, "items", "setItems"), e;
|
|
109
|
+
}
|
|
110
|
+
function As(e) {
|
|
111
|
+
return Array.isArray(e) ? e : typeof e < "u" ? [e] : [];
|
|
112
|
+
}
|
|
113
|
+
function Gn(e) {
|
|
114
|
+
const t = [];
|
|
115
|
+
for (const r of e)
|
|
116
|
+
t.push(...r);
|
|
117
|
+
return t;
|
|
118
|
+
}
|
|
119
|
+
function Vt(e) {
|
|
120
|
+
return e.slice().reverse();
|
|
121
|
+
}
|
|
122
|
+
var po = { id: null };
|
|
123
|
+
function Se(e, t) {
|
|
124
|
+
return e.find((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
|
125
|
+
}
|
|
126
|
+
function go(e, t) {
|
|
127
|
+
return e.filter((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
|
128
|
+
}
|
|
129
|
+
function yn(e, t) {
|
|
130
|
+
return e.filter((r) => r.rowId === t);
|
|
131
|
+
}
|
|
132
|
+
function vo(e, t, r = !1) {
|
|
133
|
+
const n = e.findIndex((o) => o.id === t);
|
|
134
|
+
return [
|
|
135
|
+
...e.slice(n + 1),
|
|
136
|
+
...r ? [po] : [],
|
|
137
|
+
...e.slice(0, n)
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
function Xn(e) {
|
|
141
|
+
const t = [];
|
|
142
|
+
for (const r of e) {
|
|
143
|
+
const n = t.find((o) => {
|
|
144
|
+
var s;
|
|
145
|
+
return ((s = o[0]) == null ? void 0 : s.rowId) === r.rowId;
|
|
146
|
+
});
|
|
147
|
+
n ? n.push(r) : t.push([r]);
|
|
148
|
+
}
|
|
149
|
+
return t;
|
|
150
|
+
}
|
|
151
|
+
function Jn(e) {
|
|
152
|
+
let t = 0;
|
|
153
|
+
for (const { length: r } of e)
|
|
154
|
+
r > t && (t = r);
|
|
155
|
+
return t;
|
|
156
|
+
}
|
|
157
|
+
function ho(e) {
|
|
158
|
+
return {
|
|
159
|
+
id: "__EMPTY_ITEM__",
|
|
160
|
+
disabled: !0,
|
|
161
|
+
rowId: e
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function yo(e, t, r) {
|
|
165
|
+
const n = Jn(e);
|
|
166
|
+
for (const o of e)
|
|
167
|
+
for (let s = 0; s < n; s += 1) {
|
|
168
|
+
const c = o[s];
|
|
169
|
+
if (!c || r && c.disabled) {
|
|
170
|
+
const a = s === 0 && r ? Se(o) : o[s - 1];
|
|
171
|
+
o[s] = a && t !== a.id && r ? a : ho(a == null ? void 0 : a.rowId);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return e;
|
|
175
|
+
}
|
|
176
|
+
function wo(e) {
|
|
177
|
+
const t = Xn(e), r = Jn(t), n = [];
|
|
178
|
+
for (let o = 0; o < r; o += 1)
|
|
179
|
+
for (const s of t) {
|
|
180
|
+
const c = s[o];
|
|
181
|
+
c && n.push(_e(ce({}, c), {
|
|
182
|
+
// If there's no rowId, it means that it's not a grid composite, but
|
|
183
|
+
// a single row instead. So, instead of verticalizing it, that is,
|
|
184
|
+
// assigning a different rowId based on the column index, we keep it
|
|
185
|
+
// undefined so they will be part of the same row. This is useful
|
|
186
|
+
// when using up/down on one-dimensional composites.
|
|
187
|
+
rowId: c.rowId ? `${o}` : void 0
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
return n;
|
|
191
|
+
}
|
|
192
|
+
function Ts(e = {}) {
|
|
193
|
+
var t;
|
|
194
|
+
const r = (t = e.store) == null ? void 0 : t.getState(), n = fo(e), o = j(
|
|
195
|
+
e.activeId,
|
|
196
|
+
r == null ? void 0 : r.activeId,
|
|
197
|
+
e.defaultActiveId
|
|
198
|
+
), s = _e(ce({}, n.getState()), {
|
|
199
|
+
id: j(
|
|
200
|
+
e.id,
|
|
201
|
+
r == null ? void 0 : r.id,
|
|
202
|
+
`id-${Math.random().toString(36).slice(2, 8)}`
|
|
203
|
+
),
|
|
204
|
+
activeId: o,
|
|
205
|
+
baseElement: j(r == null ? void 0 : r.baseElement, null),
|
|
206
|
+
includesBaseElement: j(
|
|
207
|
+
e.includesBaseElement,
|
|
208
|
+
r == null ? void 0 : r.includesBaseElement,
|
|
209
|
+
o === null
|
|
210
|
+
),
|
|
211
|
+
moves: j(r == null ? void 0 : r.moves, 0),
|
|
212
|
+
orientation: j(
|
|
213
|
+
e.orientation,
|
|
214
|
+
r == null ? void 0 : r.orientation,
|
|
215
|
+
"both"
|
|
216
|
+
),
|
|
217
|
+
rtl: j(e.rtl, r == null ? void 0 : r.rtl, !1),
|
|
218
|
+
virtualFocus: j(
|
|
219
|
+
e.virtualFocus,
|
|
220
|
+
r == null ? void 0 : r.virtualFocus,
|
|
221
|
+
!1
|
|
222
|
+
),
|
|
223
|
+
focusLoop: j(e.focusLoop, r == null ? void 0 : r.focusLoop, !1),
|
|
224
|
+
focusWrap: j(e.focusWrap, r == null ? void 0 : r.focusWrap, !1),
|
|
225
|
+
focusShift: j(e.focusShift, r == null ? void 0 : r.focusShift, !1)
|
|
226
|
+
}), c = it(s, n, e.store);
|
|
227
|
+
$e(
|
|
228
|
+
c,
|
|
229
|
+
() => bt(c, ["renderedItems", "activeId"], (a) => {
|
|
230
|
+
c.setState("activeId", (u) => {
|
|
231
|
+
var m;
|
|
232
|
+
return u !== void 0 ? u : (m = Se(a.renderedItems)) == null ? void 0 : m.id;
|
|
233
|
+
});
|
|
234
|
+
})
|
|
235
|
+
);
|
|
236
|
+
const l = (a = "next", u = {}) => {
|
|
237
|
+
var m, f;
|
|
238
|
+
const i = c.getState(), {
|
|
239
|
+
skip: d = 0,
|
|
240
|
+
activeId: p = i.activeId,
|
|
241
|
+
focusShift: h = i.focusShift,
|
|
242
|
+
focusLoop: x = i.focusLoop,
|
|
243
|
+
focusWrap: w = i.focusWrap,
|
|
244
|
+
includesBaseElement: b = i.includesBaseElement,
|
|
245
|
+
renderedItems: E = i.renderedItems,
|
|
246
|
+
rtl: g = i.rtl
|
|
247
|
+
} = u, v = a === "up" || a === "down", O = a === "next" || a === "down", S = O ? g && !v : !g || v, $ = h && !d;
|
|
248
|
+
let A = v ? Gn(
|
|
249
|
+
yo(Xn(E), p, $)
|
|
250
|
+
) : E;
|
|
251
|
+
if (A = S ? Vt(A) : A, A = v ? wo(A) : A, p == null)
|
|
252
|
+
return (m = Se(A)) == null ? void 0 : m.id;
|
|
253
|
+
const R = A.find((_) => _.id === p);
|
|
254
|
+
if (!R)
|
|
255
|
+
return (f = Se(A)) == null ? void 0 : f.id;
|
|
256
|
+
const B = A.some((_) => _.rowId), L = A.indexOf(R), y = A.slice(L + 1), D = yn(y, R.rowId);
|
|
257
|
+
if (d) {
|
|
258
|
+
const _ = go(D, p), k = _.slice(d)[0] || // If we can't find an item, just return the last one.
|
|
259
|
+
_[_.length - 1];
|
|
260
|
+
return k == null ? void 0 : k.id;
|
|
261
|
+
}
|
|
262
|
+
const T = x && (v ? x !== "horizontal" : x !== "vertical"), M = B && w && (v ? w !== "horizontal" : w !== "vertical"), I = O ? (!B || v) && T && b : v ? b : !1;
|
|
263
|
+
if (T) {
|
|
264
|
+
const _ = M && !I ? A : yn(A, R.rowId), k = vo(_, p, I), q = Se(k, p);
|
|
265
|
+
return q == null ? void 0 : q.id;
|
|
266
|
+
}
|
|
267
|
+
if (M) {
|
|
268
|
+
const _ = Se(
|
|
269
|
+
// We can use nextItems, which contains all the next items, including
|
|
270
|
+
// items from other rows, to wrap between rows. However, if there is a
|
|
271
|
+
// null item (the composite container), we'll only use the next items in
|
|
272
|
+
// the row. So moving next from the last item will focus on the
|
|
273
|
+
// composite container. On grid composites, horizontal navigation never
|
|
274
|
+
// focuses on the composite container, only vertical.
|
|
275
|
+
I ? D : y,
|
|
276
|
+
p
|
|
277
|
+
);
|
|
278
|
+
return I ? (_ == null ? void 0 : _.id) || null : _ == null ? void 0 : _.id;
|
|
279
|
+
}
|
|
280
|
+
const V = Se(D, p);
|
|
281
|
+
return !V && I ? null : V == null ? void 0 : V.id;
|
|
282
|
+
};
|
|
283
|
+
return _e(ce(ce({}, n), c), {
|
|
284
|
+
setBaseElement: (a) => c.setState("baseElement", a),
|
|
285
|
+
setActiveId: (a) => c.setState("activeId", a),
|
|
286
|
+
move: (a) => {
|
|
287
|
+
a !== void 0 && (c.setState("activeId", a), c.setState("moves", (u) => u + 1));
|
|
288
|
+
},
|
|
289
|
+
first: () => {
|
|
290
|
+
var a;
|
|
291
|
+
return (a = Se(c.getState().renderedItems)) == null ? void 0 : a.id;
|
|
292
|
+
},
|
|
293
|
+
last: () => {
|
|
294
|
+
var a;
|
|
295
|
+
return (a = Se(Vt(c.getState().renderedItems))) == null ? void 0 : a.id;
|
|
296
|
+
},
|
|
297
|
+
next: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("next", a)),
|
|
298
|
+
previous: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("previous", a)),
|
|
299
|
+
down: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("down", a)),
|
|
300
|
+
up: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), l("up", a))
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function _s(e) {
|
|
304
|
+
const t = Ut(e.id);
|
|
305
|
+
return C({ id: t }, e);
|
|
306
|
+
}
|
|
307
|
+
function Cs(e, t, r) {
|
|
308
|
+
return e = mo(e, t, r), re(e, r, "activeId", "setActiveId"), re(e, r, "includesBaseElement"), re(e, r, "virtualFocus"), re(e, r, "orientation"), re(e, r, "rtl"), re(e, r, "focusLoop"), re(e, r, "focusWrap"), re(e, r, "focusShift"), e;
|
|
309
|
+
}
|
|
310
|
+
Je(
|
|
311
|
+
void 0
|
|
312
|
+
);
|
|
313
|
+
var bo = Dr(
|
|
314
|
+
[Tr, $n],
|
|
315
|
+
[Yt, Ar]
|
|
316
|
+
), Rs = bo.useProviderContext;
|
|
317
|
+
Je(
|
|
318
|
+
void 0
|
|
319
|
+
);
|
|
320
|
+
Je(!1);
|
|
321
|
+
var xo = "div";
|
|
322
|
+
function Eo(e) {
|
|
323
|
+
return e.some((t) => !!t.rowId);
|
|
324
|
+
}
|
|
325
|
+
function So(e) {
|
|
326
|
+
const t = e.target;
|
|
327
|
+
return t && !Xt(t) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
|
|
328
|
+
}
|
|
329
|
+
function Oo(e) {
|
|
330
|
+
return e.key === "Shift" || e.key === "Control" || e.key === "Alt" || e.key === "Meta";
|
|
331
|
+
}
|
|
332
|
+
function wn(e, t, r) {
|
|
333
|
+
return ue((n) => {
|
|
334
|
+
var o;
|
|
335
|
+
if (t == null || t(n), n.defaultPrevented || n.isPropagationStopped() || !Ne(n) || Oo(n) || So(n)) return;
|
|
336
|
+
const s = e.getState(), c = (o = ke(e, s.activeId)) == null ? void 0 : o.element;
|
|
337
|
+
if (!c) return;
|
|
338
|
+
const l = n, { view: a } = l, u = se(l, ["view"]), m = r == null ? void 0 : r.current;
|
|
339
|
+
c !== m && c.focus(), Rr(c, n.type, u) || n.preventDefault(), n.currentTarget.contains(c) && n.stopPropagation();
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
function Po(e) {
|
|
343
|
+
return Xr(
|
|
344
|
+
Gn(Vt(Jr(e)))
|
|
345
|
+
);
|
|
346
|
+
}
|
|
347
|
+
function Do(e) {
|
|
348
|
+
const [t, r] = le(!1), n = st(() => r(!0), []), o = e.useState(
|
|
349
|
+
(s) => ke(e, s.activeId)
|
|
350
|
+
);
|
|
351
|
+
return U(() => {
|
|
352
|
+
const s = o == null ? void 0 : o.element;
|
|
353
|
+
t && s && (r(!1), s.focus({ preventScroll: !0 }));
|
|
354
|
+
}, [o, t]), n;
|
|
355
|
+
}
|
|
356
|
+
var Ao = ee(
|
|
357
|
+
function(t) {
|
|
358
|
+
var r = t, {
|
|
359
|
+
store: n,
|
|
360
|
+
composite: o = !0,
|
|
361
|
+
focusOnMove: s = o,
|
|
362
|
+
moveOnKeyPress: c = !0
|
|
363
|
+
} = r, l = se(r, [
|
|
364
|
+
"store",
|
|
365
|
+
"composite",
|
|
366
|
+
"focusOnMove",
|
|
367
|
+
"moveOnKeyPress"
|
|
368
|
+
]);
|
|
369
|
+
const a = _r();
|
|
370
|
+
n = n || a, Fe(
|
|
371
|
+
n,
|
|
372
|
+
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
|
373
|
+
);
|
|
374
|
+
const u = Y(null), m = Y(null), f = Do(n), i = n.useState("moves"), [, d] = Cr(
|
|
375
|
+
o ? n.setBaseElement : null
|
|
376
|
+
);
|
|
377
|
+
U(() => {
|
|
378
|
+
var y;
|
|
379
|
+
if (!n || !i || !o || !s) return;
|
|
380
|
+
const { activeId: D } = n.getState(), T = (y = ke(n, D)) == null ? void 0 : y.element;
|
|
381
|
+
T && Ur(T);
|
|
382
|
+
}, [n, i, o, s]), z(() => {
|
|
383
|
+
if (!n || !i || !o) return;
|
|
384
|
+
const { baseElement: y, activeId: D } = n.getState();
|
|
385
|
+
if (!(D === null) || !y) return;
|
|
386
|
+
const M = m.current;
|
|
387
|
+
m.current = null, M && Ue(M, { relatedTarget: y }), Yr(y) || y.focus();
|
|
388
|
+
}, [n, i, o]);
|
|
389
|
+
const p = n.useState("activeId"), h = n.useState("virtualFocus");
|
|
390
|
+
z(() => {
|
|
391
|
+
var y;
|
|
392
|
+
if (!n || !o || !h) return;
|
|
393
|
+
const D = m.current;
|
|
394
|
+
if (m.current = null, !D) return;
|
|
395
|
+
const M = ((y = ke(n, p)) == null ? void 0 : y.element) || Gt(D);
|
|
396
|
+
M !== D && Ue(D, { relatedTarget: M });
|
|
397
|
+
}, [n, p, h, o]);
|
|
398
|
+
const x = wn(
|
|
399
|
+
n,
|
|
400
|
+
l.onKeyDownCapture,
|
|
401
|
+
m
|
|
402
|
+
), w = wn(
|
|
403
|
+
n,
|
|
404
|
+
l.onKeyUpCapture,
|
|
405
|
+
m
|
|
406
|
+
), b = l.onFocusCapture, E = ue((y) => {
|
|
407
|
+
if (b == null || b(y), y.defaultPrevented || !n) return;
|
|
408
|
+
const { virtualFocus: D } = n.getState();
|
|
409
|
+
if (!D) return;
|
|
410
|
+
const T = y.relatedTarget, M = Gr(y.currentTarget);
|
|
411
|
+
Ne(y) && M && (y.stopPropagation(), m.current = T);
|
|
412
|
+
}), g = l.onFocus, v = ue((y) => {
|
|
413
|
+
if (g == null || g(y), y.defaultPrevented || !o || !n) return;
|
|
414
|
+
const { relatedTarget: D } = y, { virtualFocus: T } = n.getState();
|
|
415
|
+
T ? Ne(y) && !Rt(n, D) && queueMicrotask(f) : Ne(y) && n.setActiveId(null);
|
|
416
|
+
}), O = l.onBlurCapture, S = ue((y) => {
|
|
417
|
+
var D;
|
|
418
|
+
if (O == null || O(y), y.defaultPrevented || !n) return;
|
|
419
|
+
const { virtualFocus: T, activeId: M } = n.getState();
|
|
420
|
+
if (!T) return;
|
|
421
|
+
const I = (D = ke(n, M)) == null ? void 0 : D.element, V = y.relatedTarget, _ = Rt(n, V), k = m.current;
|
|
422
|
+
m.current = null, Ne(y) && _ ? (V === I ? k && k !== V && Ue(k, y) : I ? Ue(I, y) : k && Ue(k, y), y.stopPropagation()) : !Rt(n, y.target) && I && Ue(I, y);
|
|
423
|
+
}), $ = l.onKeyDown, A = rt(c), R = ue((y) => {
|
|
424
|
+
var D;
|
|
425
|
+
if ($ == null || $(y), y.nativeEvent.isComposing || y.defaultPrevented || !n || !Ne(y)) return;
|
|
426
|
+
const { orientation: T, renderedItems: M, activeId: I } = n.getState(), V = ke(n, I);
|
|
427
|
+
if ((D = V == null ? void 0 : V.element) != null && D.isConnected) return;
|
|
428
|
+
const _ = T !== "horizontal", k = T !== "vertical", q = Eo(M);
|
|
429
|
+
if ((y.key === "ArrowLeft" || y.key === "ArrowRight" || y.key === "Home" || y.key === "End") && Xt(y.currentTarget)) return;
|
|
430
|
+
const te = {
|
|
431
|
+
ArrowUp: (q || _) && (() => {
|
|
432
|
+
if (q) {
|
|
433
|
+
const xe = Po(M);
|
|
434
|
+
return xe == null ? void 0 : xe.id;
|
|
435
|
+
}
|
|
436
|
+
return n == null ? void 0 : n.last();
|
|
437
|
+
}),
|
|
438
|
+
ArrowRight: (q || k) && n.first,
|
|
439
|
+
ArrowDown: (q || _) && n.first,
|
|
440
|
+
ArrowLeft: (q || k) && n.last,
|
|
441
|
+
Home: n.first,
|
|
442
|
+
End: n.last,
|
|
443
|
+
PageUp: n.first,
|
|
444
|
+
PageDown: n.last
|
|
445
|
+
}[y.key];
|
|
446
|
+
if (te) {
|
|
447
|
+
const xe = te();
|
|
448
|
+
if (xe !== void 0) {
|
|
449
|
+
if (!A(y)) return;
|
|
450
|
+
y.preventDefault(), n.move(xe);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
l = fe(
|
|
455
|
+
l,
|
|
456
|
+
(y) => /* @__PURE__ */ H($n, { value: n, children: y }),
|
|
457
|
+
[n]
|
|
458
|
+
);
|
|
459
|
+
const B = n.useState((y) => {
|
|
460
|
+
var D;
|
|
461
|
+
if (n && o && y.virtualFocus)
|
|
462
|
+
return (D = ke(n, y.activeId)) == null ? void 0 : D.id;
|
|
463
|
+
});
|
|
464
|
+
l = W(C({
|
|
465
|
+
"aria-activedescendant": B
|
|
466
|
+
}, l), {
|
|
467
|
+
ref: Be(u, d, l.ref),
|
|
468
|
+
onKeyDownCapture: x,
|
|
469
|
+
onKeyUpCapture: w,
|
|
470
|
+
onFocusCapture: E,
|
|
471
|
+
onFocus: v,
|
|
472
|
+
onBlurCapture: S,
|
|
473
|
+
onKeyDown: R
|
|
474
|
+
});
|
|
475
|
+
const L = n.useState(
|
|
476
|
+
(y) => o && (y.virtualFocus || y.activeId === null)
|
|
477
|
+
);
|
|
478
|
+
return l = jn(C({ focusable: L }, l)), l;
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
K(function(t) {
|
|
482
|
+
const r = Ao(t);
|
|
483
|
+
return Q(xo, r);
|
|
484
|
+
});
|
|
485
|
+
var pt = { exports: {} }, J = {};
|
|
486
|
+
/**
|
|
487
|
+
* @license React
|
|
488
|
+
* react-dom.production.js
|
|
489
|
+
*
|
|
490
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
491
|
+
*
|
|
492
|
+
* This source code is licensed under the MIT license found in the
|
|
493
|
+
* LICENSE file in the root directory of this source tree.
|
|
494
|
+
*/
|
|
495
|
+
var bn;
|
|
496
|
+
function To() {
|
|
497
|
+
if (bn) return J;
|
|
498
|
+
bn = 1;
|
|
499
|
+
var e = Un;
|
|
500
|
+
function t(a) {
|
|
501
|
+
var u = "https://react.dev/errors/" + a;
|
|
502
|
+
if (1 < arguments.length) {
|
|
503
|
+
u += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
504
|
+
for (var m = 2; m < arguments.length; m++)
|
|
505
|
+
u += "&args[]=" + encodeURIComponent(arguments[m]);
|
|
506
|
+
}
|
|
507
|
+
return "Minified React error #" + a + "; visit " + u + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
508
|
+
}
|
|
509
|
+
function r() {
|
|
510
|
+
}
|
|
511
|
+
var n = {
|
|
512
|
+
d: {
|
|
513
|
+
f: r,
|
|
514
|
+
r: function() {
|
|
515
|
+
throw Error(t(522));
|
|
516
|
+
},
|
|
517
|
+
D: r,
|
|
518
|
+
C: r,
|
|
519
|
+
L: r,
|
|
520
|
+
m: r,
|
|
521
|
+
X: r,
|
|
522
|
+
S: r,
|
|
523
|
+
M: r
|
|
524
|
+
},
|
|
525
|
+
p: 0,
|
|
526
|
+
findDOMNode: null
|
|
527
|
+
}, o = Symbol.for("react.portal");
|
|
528
|
+
function s(a, u, m) {
|
|
529
|
+
var f = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
530
|
+
return {
|
|
531
|
+
$$typeof: o,
|
|
532
|
+
key: f == null ? null : "" + f,
|
|
533
|
+
children: a,
|
|
534
|
+
containerInfo: u,
|
|
535
|
+
implementation: m
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
var c = e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
539
|
+
function l(a, u) {
|
|
540
|
+
if (a === "font") return "";
|
|
541
|
+
if (typeof u == "string")
|
|
542
|
+
return u === "use-credentials" ? u : "";
|
|
543
|
+
}
|
|
544
|
+
return J.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, J.createPortal = function(a, u) {
|
|
545
|
+
var m = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
546
|
+
if (!u || u.nodeType !== 1 && u.nodeType !== 9 && u.nodeType !== 11)
|
|
547
|
+
throw Error(t(299));
|
|
548
|
+
return s(a, u, null, m);
|
|
549
|
+
}, J.flushSync = function(a) {
|
|
550
|
+
var u = c.T, m = n.p;
|
|
551
|
+
try {
|
|
552
|
+
if (c.T = null, n.p = 2, a) return a();
|
|
553
|
+
} finally {
|
|
554
|
+
c.T = u, n.p = m, n.d.f();
|
|
555
|
+
}
|
|
556
|
+
}, J.preconnect = function(a, u) {
|
|
557
|
+
typeof a == "string" && (u ? (u = u.crossOrigin, u = typeof u == "string" ? u === "use-credentials" ? u : "" : void 0) : u = null, n.d.C(a, u));
|
|
558
|
+
}, J.prefetchDNS = function(a) {
|
|
559
|
+
typeof a == "string" && n.d.D(a);
|
|
560
|
+
}, J.preinit = function(a, u) {
|
|
561
|
+
if (typeof a == "string" && u && typeof u.as == "string") {
|
|
562
|
+
var m = u.as, f = l(m, u.crossOrigin), i = typeof u.integrity == "string" ? u.integrity : void 0, d = typeof u.fetchPriority == "string" ? u.fetchPriority : void 0;
|
|
563
|
+
m === "style" ? n.d.S(
|
|
564
|
+
a,
|
|
565
|
+
typeof u.precedence == "string" ? u.precedence : void 0,
|
|
566
|
+
{
|
|
567
|
+
crossOrigin: f,
|
|
568
|
+
integrity: i,
|
|
569
|
+
fetchPriority: d
|
|
570
|
+
}
|
|
571
|
+
) : m === "script" && n.d.X(a, {
|
|
572
|
+
crossOrigin: f,
|
|
573
|
+
integrity: i,
|
|
574
|
+
fetchPriority: d,
|
|
575
|
+
nonce: typeof u.nonce == "string" ? u.nonce : void 0
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}, J.preinitModule = function(a, u) {
|
|
579
|
+
if (typeof a == "string")
|
|
580
|
+
if (typeof u == "object" && u !== null) {
|
|
581
|
+
if (u.as == null || u.as === "script") {
|
|
582
|
+
var m = l(
|
|
583
|
+
u.as,
|
|
584
|
+
u.crossOrigin
|
|
585
|
+
);
|
|
586
|
+
n.d.M(a, {
|
|
587
|
+
crossOrigin: m,
|
|
588
|
+
integrity: typeof u.integrity == "string" ? u.integrity : void 0,
|
|
589
|
+
nonce: typeof u.nonce == "string" ? u.nonce : void 0
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
} else u == null && n.d.M(a);
|
|
593
|
+
}, J.preload = function(a, u) {
|
|
594
|
+
if (typeof a == "string" && typeof u == "object" && u !== null && typeof u.as == "string") {
|
|
595
|
+
var m = u.as, f = l(m, u.crossOrigin);
|
|
596
|
+
n.d.L(a, m, {
|
|
597
|
+
crossOrigin: f,
|
|
598
|
+
integrity: typeof u.integrity == "string" ? u.integrity : void 0,
|
|
599
|
+
nonce: typeof u.nonce == "string" ? u.nonce : void 0,
|
|
600
|
+
type: typeof u.type == "string" ? u.type : void 0,
|
|
601
|
+
fetchPriority: typeof u.fetchPriority == "string" ? u.fetchPriority : void 0,
|
|
602
|
+
referrerPolicy: typeof u.referrerPolicy == "string" ? u.referrerPolicy : void 0,
|
|
603
|
+
imageSrcSet: typeof u.imageSrcSet == "string" ? u.imageSrcSet : void 0,
|
|
604
|
+
imageSizes: typeof u.imageSizes == "string" ? u.imageSizes : void 0,
|
|
605
|
+
media: typeof u.media == "string" ? u.media : void 0
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
}, J.preloadModule = function(a, u) {
|
|
609
|
+
if (typeof a == "string")
|
|
610
|
+
if (u) {
|
|
611
|
+
var m = l(u.as, u.crossOrigin);
|
|
612
|
+
n.d.m(a, {
|
|
613
|
+
as: typeof u.as == "string" && u.as !== "script" ? u.as : void 0,
|
|
614
|
+
crossOrigin: m,
|
|
615
|
+
integrity: typeof u.integrity == "string" ? u.integrity : void 0
|
|
616
|
+
});
|
|
617
|
+
} else n.d.m(a);
|
|
618
|
+
}, J.requestFormReset = function(a) {
|
|
619
|
+
n.d.r(a);
|
|
620
|
+
}, J.unstable_batchedUpdates = function(a, u) {
|
|
621
|
+
return a(u);
|
|
622
|
+
}, J.useFormState = function(a, u, m) {
|
|
623
|
+
return c.H.useFormState(a, u, m);
|
|
624
|
+
}, J.useFormStatus = function() {
|
|
625
|
+
return c.H.useHostTransitionStatus();
|
|
626
|
+
}, J.version = "19.1.0", J;
|
|
627
|
+
}
|
|
628
|
+
var Z = {};
|
|
629
|
+
/**
|
|
630
|
+
* @license React
|
|
631
|
+
* react-dom.development.js
|
|
632
|
+
*
|
|
633
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
634
|
+
*
|
|
635
|
+
* This source code is licensed under the MIT license found in the
|
|
636
|
+
* LICENSE file in the root directory of this source tree.
|
|
637
|
+
*/
|
|
638
|
+
var xn;
|
|
639
|
+
function _o() {
|
|
640
|
+
return xn || (xn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
641
|
+
function e() {
|
|
642
|
+
}
|
|
643
|
+
function t(f) {
|
|
644
|
+
return "" + f;
|
|
645
|
+
}
|
|
646
|
+
function r(f, i, d) {
|
|
647
|
+
var p = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
648
|
+
try {
|
|
649
|
+
t(p);
|
|
650
|
+
var h = !1;
|
|
651
|
+
} catch {
|
|
652
|
+
h = !0;
|
|
653
|
+
}
|
|
654
|
+
return h && (console.error(
|
|
655
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
656
|
+
typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object"
|
|
657
|
+
), t(p)), {
|
|
658
|
+
$$typeof: u,
|
|
659
|
+
key: p == null ? null : "" + p,
|
|
660
|
+
children: f,
|
|
661
|
+
containerInfo: i,
|
|
662
|
+
implementation: d
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
function n(f, i) {
|
|
666
|
+
if (f === "font") return "";
|
|
667
|
+
if (typeof i == "string")
|
|
668
|
+
return i === "use-credentials" ? i : "";
|
|
669
|
+
}
|
|
670
|
+
function o(f) {
|
|
671
|
+
return f === null ? "`null`" : f === void 0 ? "`undefined`" : f === "" ? "an empty string" : 'something with type "' + typeof f + '"';
|
|
672
|
+
}
|
|
673
|
+
function s(f) {
|
|
674
|
+
return f === null ? "`null`" : f === void 0 ? "`undefined`" : f === "" ? "an empty string" : typeof f == "string" ? JSON.stringify(f) : typeof f == "number" ? "`" + f + "`" : 'something with type "' + typeof f + '"';
|
|
675
|
+
}
|
|
676
|
+
function c() {
|
|
677
|
+
var f = m.H;
|
|
678
|
+
return f === null && console.error(
|
|
679
|
+
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
680
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
681
|
+
2. You might be breaking the Rules of Hooks
|
|
682
|
+
3. You might have more than one copy of React in the same app
|
|
683
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
684
|
+
), f;
|
|
685
|
+
}
|
|
686
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
687
|
+
var l = Un, a = {
|
|
688
|
+
d: {
|
|
689
|
+
f: e,
|
|
690
|
+
r: function() {
|
|
691
|
+
throw Error(
|
|
692
|
+
"Invalid form element. requestFormReset must be passed a form that was rendered by React."
|
|
693
|
+
);
|
|
694
|
+
},
|
|
695
|
+
D: e,
|
|
696
|
+
C: e,
|
|
697
|
+
L: e,
|
|
698
|
+
m: e,
|
|
699
|
+
X: e,
|
|
700
|
+
S: e,
|
|
701
|
+
M: e
|
|
702
|
+
},
|
|
703
|
+
p: 0,
|
|
704
|
+
findDOMNode: null
|
|
705
|
+
}, u = Symbol.for("react.portal"), m = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
706
|
+
typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
|
|
707
|
+
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
708
|
+
), Z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = a, Z.createPortal = function(f, i) {
|
|
709
|
+
var d = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
710
|
+
if (!i || i.nodeType !== 1 && i.nodeType !== 9 && i.nodeType !== 11)
|
|
711
|
+
throw Error("Target container is not a DOM element.");
|
|
712
|
+
return r(f, i, null, d);
|
|
713
|
+
}, Z.flushSync = function(f) {
|
|
714
|
+
var i = m.T, d = a.p;
|
|
715
|
+
try {
|
|
716
|
+
if (m.T = null, a.p = 2, f)
|
|
717
|
+
return f();
|
|
718
|
+
} finally {
|
|
719
|
+
m.T = i, a.p = d, a.d.f() && console.error(
|
|
720
|
+
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
}, Z.preconnect = function(f, i) {
|
|
724
|
+
typeof f == "string" && f ? i != null && typeof i != "object" ? console.error(
|
|
725
|
+
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
|
|
726
|
+
s(i)
|
|
727
|
+
) : i != null && typeof i.crossOrigin != "string" && console.error(
|
|
728
|
+
"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
|
|
729
|
+
o(i.crossOrigin)
|
|
730
|
+
) : console.error(
|
|
731
|
+
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
732
|
+
o(f)
|
|
733
|
+
), typeof f == "string" && (i ? (i = i.crossOrigin, i = typeof i == "string" ? i === "use-credentials" ? i : "" : void 0) : i = null, a.d.C(f, i));
|
|
734
|
+
}, Z.prefetchDNS = function(f) {
|
|
735
|
+
if (typeof f != "string" || !f)
|
|
736
|
+
console.error(
|
|
737
|
+
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
738
|
+
o(f)
|
|
739
|
+
);
|
|
740
|
+
else if (1 < arguments.length) {
|
|
741
|
+
var i = arguments[1];
|
|
742
|
+
typeof i == "object" && i.hasOwnProperty("crossOrigin") ? console.error(
|
|
743
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
744
|
+
s(i)
|
|
745
|
+
) : console.error(
|
|
746
|
+
"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
|
|
747
|
+
s(i)
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
typeof f == "string" && a.d.D(f);
|
|
751
|
+
}, Z.preinit = function(f, i) {
|
|
752
|
+
if (typeof f == "string" && f ? i == null || typeof i != "object" ? console.error(
|
|
753
|
+
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
|
|
754
|
+
s(i)
|
|
755
|
+
) : i.as !== "style" && i.as !== "script" && console.error(
|
|
756
|
+
'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
|
|
757
|
+
s(i.as)
|
|
758
|
+
) : console.error(
|
|
759
|
+
"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
760
|
+
o(f)
|
|
761
|
+
), typeof f == "string" && i && typeof i.as == "string") {
|
|
762
|
+
var d = i.as, p = n(d, i.crossOrigin), h = typeof i.integrity == "string" ? i.integrity : void 0, x = typeof i.fetchPriority == "string" ? i.fetchPriority : void 0;
|
|
763
|
+
d === "style" ? a.d.S(
|
|
764
|
+
f,
|
|
765
|
+
typeof i.precedence == "string" ? i.precedence : void 0,
|
|
766
|
+
{
|
|
767
|
+
crossOrigin: p,
|
|
768
|
+
integrity: h,
|
|
769
|
+
fetchPriority: x
|
|
770
|
+
}
|
|
771
|
+
) : d === "script" && a.d.X(f, {
|
|
772
|
+
crossOrigin: p,
|
|
773
|
+
integrity: h,
|
|
774
|
+
fetchPriority: x,
|
|
775
|
+
nonce: typeof i.nonce == "string" ? i.nonce : void 0
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
}, Z.preinitModule = function(f, i) {
|
|
779
|
+
var d = "";
|
|
780
|
+
if (typeof f == "string" && f || (d += " The `href` argument encountered was " + o(f) + "."), i !== void 0 && typeof i != "object" ? d += " The `options` argument encountered was " + o(i) + "." : i && "as" in i && i.as !== "script" && (d += " The `as` option encountered was " + s(i.as) + "."), d)
|
|
781
|
+
console.error(
|
|
782
|
+
"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
|
|
783
|
+
d
|
|
784
|
+
);
|
|
785
|
+
else
|
|
786
|
+
switch (d = i && typeof i.as == "string" ? i.as : "script", d) {
|
|
787
|
+
case "script":
|
|
788
|
+
break;
|
|
789
|
+
default:
|
|
790
|
+
d = s(d), console.error(
|
|
791
|
+
'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
|
|
792
|
+
d,
|
|
793
|
+
f
|
|
794
|
+
);
|
|
795
|
+
}
|
|
796
|
+
typeof f == "string" && (typeof i == "object" && i !== null ? (i.as == null || i.as === "script") && (d = n(
|
|
797
|
+
i.as,
|
|
798
|
+
i.crossOrigin
|
|
799
|
+
), a.d.M(f, {
|
|
800
|
+
crossOrigin: d,
|
|
801
|
+
integrity: typeof i.integrity == "string" ? i.integrity : void 0,
|
|
802
|
+
nonce: typeof i.nonce == "string" ? i.nonce : void 0
|
|
803
|
+
})) : i == null && a.d.M(f));
|
|
804
|
+
}, Z.preload = function(f, i) {
|
|
805
|
+
var d = "";
|
|
806
|
+
if (typeof f == "string" && f || (d += " The `href` argument encountered was " + o(f) + "."), i == null || typeof i != "object" ? d += " The `options` argument encountered was " + o(i) + "." : typeof i.as == "string" && i.as || (d += " The `as` option encountered was " + o(i.as) + "."), d && console.error(
|
|
807
|
+
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
|
|
808
|
+
d
|
|
809
|
+
), typeof f == "string" && typeof i == "object" && i !== null && typeof i.as == "string") {
|
|
810
|
+
d = i.as;
|
|
811
|
+
var p = n(
|
|
812
|
+
d,
|
|
813
|
+
i.crossOrigin
|
|
814
|
+
);
|
|
815
|
+
a.d.L(f, d, {
|
|
816
|
+
crossOrigin: p,
|
|
817
|
+
integrity: typeof i.integrity == "string" ? i.integrity : void 0,
|
|
818
|
+
nonce: typeof i.nonce == "string" ? i.nonce : void 0,
|
|
819
|
+
type: typeof i.type == "string" ? i.type : void 0,
|
|
820
|
+
fetchPriority: typeof i.fetchPriority == "string" ? i.fetchPriority : void 0,
|
|
821
|
+
referrerPolicy: typeof i.referrerPolicy == "string" ? i.referrerPolicy : void 0,
|
|
822
|
+
imageSrcSet: typeof i.imageSrcSet == "string" ? i.imageSrcSet : void 0,
|
|
823
|
+
imageSizes: typeof i.imageSizes == "string" ? i.imageSizes : void 0,
|
|
824
|
+
media: typeof i.media == "string" ? i.media : void 0
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
}, Z.preloadModule = function(f, i) {
|
|
828
|
+
var d = "";
|
|
829
|
+
typeof f == "string" && f || (d += " The `href` argument encountered was " + o(f) + "."), i !== void 0 && typeof i != "object" ? d += " The `options` argument encountered was " + o(i) + "." : i && "as" in i && typeof i.as != "string" && (d += " The `as` option encountered was " + o(i.as) + "."), d && console.error(
|
|
830
|
+
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
|
|
831
|
+
d
|
|
832
|
+
), typeof f == "string" && (i ? (d = n(
|
|
833
|
+
i.as,
|
|
834
|
+
i.crossOrigin
|
|
835
|
+
), a.d.m(f, {
|
|
836
|
+
as: typeof i.as == "string" && i.as !== "script" ? i.as : void 0,
|
|
837
|
+
crossOrigin: d,
|
|
838
|
+
integrity: typeof i.integrity == "string" ? i.integrity : void 0
|
|
839
|
+
})) : a.d.m(f));
|
|
840
|
+
}, Z.requestFormReset = function(f) {
|
|
841
|
+
a.d.r(f);
|
|
842
|
+
}, Z.unstable_batchedUpdates = function(f, i) {
|
|
843
|
+
return f(i);
|
|
844
|
+
}, Z.useFormState = function(f, i, d) {
|
|
845
|
+
return c().useFormState(f, i, d);
|
|
846
|
+
}, Z.useFormStatus = function() {
|
|
847
|
+
return c().useHostTransitionStatus();
|
|
848
|
+
}, Z.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
849
|
+
}()), Z;
|
|
850
|
+
}
|
|
851
|
+
var En;
|
|
852
|
+
function Co() {
|
|
853
|
+
if (En) return pt.exports;
|
|
854
|
+
En = 1;
|
|
855
|
+
function e() {
|
|
856
|
+
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
857
|
+
if (process.env.NODE_ENV !== "production")
|
|
858
|
+
throw new Error("^_^");
|
|
859
|
+
try {
|
|
860
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
|
|
861
|
+
} catch (t) {
|
|
862
|
+
console.error(t);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return process.env.NODE_ENV === "production" ? (e(), pt.exports = To()) : pt.exports = _o(), pt.exports;
|
|
867
|
+
}
|
|
868
|
+
var xt = Co(), Ro = "div";
|
|
869
|
+
function Sn(e, t) {
|
|
870
|
+
const r = setTimeout(t, e);
|
|
871
|
+
return () => clearTimeout(r);
|
|
872
|
+
}
|
|
873
|
+
function Io(e) {
|
|
874
|
+
let t = requestAnimationFrame(() => {
|
|
875
|
+
t = requestAnimationFrame(e);
|
|
876
|
+
});
|
|
877
|
+
return () => cancelAnimationFrame(t);
|
|
878
|
+
}
|
|
879
|
+
function On(...e) {
|
|
880
|
+
return e.join(", ").split(", ").reduce((t, r) => {
|
|
881
|
+
const n = r.endsWith("ms") ? 1 : 1e3, o = Number.parseFloat(r || "0s") * n;
|
|
882
|
+
return o > t ? o : t;
|
|
883
|
+
}, 0);
|
|
884
|
+
}
|
|
885
|
+
function Zn(e, t, r) {
|
|
886
|
+
return !r && t !== !1 && (!e || !!t);
|
|
887
|
+
}
|
|
888
|
+
var tn = ee(function(t) {
|
|
889
|
+
var r = t, { store: n, alwaysVisible: o } = r, s = se(r, ["store", "alwaysVisible"]);
|
|
890
|
+
const c = Jt();
|
|
891
|
+
n = n || c, Fe(
|
|
892
|
+
n,
|
|
893
|
+
process.env.NODE_ENV !== "production" && "DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
894
|
+
);
|
|
895
|
+
const l = Y(null), a = Ut(s.id), [u, m] = le(null), f = n.useState("open"), i = n.useState("mounted"), d = n.useState("animated"), p = n.useState("contentElement"), h = he(n.disclosure, "contentElement");
|
|
896
|
+
z(() => {
|
|
897
|
+
l.current && (n == null || n.setContentElement(l.current));
|
|
898
|
+
}, [n]), z(() => {
|
|
899
|
+
let E;
|
|
900
|
+
return n == null || n.setState("animated", (g) => (E = g, !0)), () => {
|
|
901
|
+
E !== void 0 && (n == null || n.setState("animated", E));
|
|
902
|
+
};
|
|
903
|
+
}, [n]), z(() => {
|
|
904
|
+
if (d) {
|
|
905
|
+
if (!(p != null && p.isConnected)) {
|
|
906
|
+
m(null);
|
|
907
|
+
return;
|
|
908
|
+
}
|
|
909
|
+
return Io(() => {
|
|
910
|
+
m(f ? "enter" : i ? "leave" : null);
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
}, [d, p, f, i]), z(() => {
|
|
914
|
+
if (!n || !d || !u || !p) return;
|
|
915
|
+
const E = () => n == null ? void 0 : n.setState("animating", !1), g = () => xt.flushSync(E);
|
|
916
|
+
if (u === "leave" && f || u === "enter" && !f) return;
|
|
917
|
+
if (typeof d == "number")
|
|
918
|
+
return Sn(d, g);
|
|
919
|
+
const {
|
|
920
|
+
transitionDuration: v,
|
|
921
|
+
animationDuration: O,
|
|
922
|
+
transitionDelay: S,
|
|
923
|
+
animationDelay: $
|
|
924
|
+
} = getComputedStyle(p), {
|
|
925
|
+
transitionDuration: A = "0",
|
|
926
|
+
animationDuration: R = "0",
|
|
927
|
+
transitionDelay: B = "0",
|
|
928
|
+
animationDelay: L = "0"
|
|
929
|
+
} = h ? getComputedStyle(h) : {}, y = On(
|
|
930
|
+
S,
|
|
931
|
+
$,
|
|
932
|
+
B,
|
|
933
|
+
L
|
|
934
|
+
), D = On(
|
|
935
|
+
v,
|
|
936
|
+
O,
|
|
937
|
+
A,
|
|
938
|
+
R
|
|
939
|
+
), T = y + D;
|
|
940
|
+
if (!T) {
|
|
941
|
+
u === "enter" && n.setState("animated", !1), E();
|
|
942
|
+
return;
|
|
943
|
+
}
|
|
944
|
+
const M = 1e3 / 60, I = Math.max(T - M, 0);
|
|
945
|
+
return Sn(I, g);
|
|
946
|
+
}, [n, d, p, h, f, u]), s = fe(
|
|
947
|
+
s,
|
|
948
|
+
(E) => /* @__PURE__ */ H(Vn, { value: n, children: E }),
|
|
949
|
+
[n]
|
|
950
|
+
);
|
|
951
|
+
const x = Zn(i, s.hidden, o), w = s.style, b = Yn(() => x ? W(C({}, w), { display: "none" }) : w, [x, w]);
|
|
952
|
+
return s = W(C({
|
|
953
|
+
id: a,
|
|
954
|
+
"data-open": f || void 0,
|
|
955
|
+
"data-enter": u === "enter" || void 0,
|
|
956
|
+
"data-leave": u === "leave" || void 0,
|
|
957
|
+
hidden: x
|
|
958
|
+
}, s), {
|
|
959
|
+
ref: Be(a ? n.setContentElement : null, l, s.ref),
|
|
960
|
+
style: b
|
|
961
|
+
}), Hn(s);
|
|
962
|
+
}), Fo = K(function(t) {
|
|
963
|
+
const r = tn(t);
|
|
964
|
+
return Q(Ro, r);
|
|
965
|
+
});
|
|
966
|
+
K(function(t) {
|
|
967
|
+
var r = t, {
|
|
968
|
+
unmountOnHide: n
|
|
969
|
+
} = r, o = se(r, [
|
|
970
|
+
"unmountOnHide"
|
|
971
|
+
]);
|
|
972
|
+
const s = Jt(), c = o.store || s;
|
|
973
|
+
return he(
|
|
974
|
+
c,
|
|
975
|
+
(a) => !n || (a == null ? void 0 : a.mounted)
|
|
976
|
+
) === !1 ? null : /* @__PURE__ */ H(Fo, C({}, o));
|
|
977
|
+
});
|
|
978
|
+
function Qn(e = {}) {
|
|
979
|
+
const t = zn(
|
|
980
|
+
e.store,
|
|
981
|
+
Kn(e.disclosure, ["contentElement", "disclosureElement"])
|
|
982
|
+
);
|
|
983
|
+
Qt(e, t);
|
|
984
|
+
const r = t == null ? void 0 : t.getState(), n = j(
|
|
985
|
+
e.open,
|
|
986
|
+
r == null ? void 0 : r.open,
|
|
987
|
+
e.defaultOpen,
|
|
988
|
+
!1
|
|
989
|
+
), o = j(e.animated, r == null ? void 0 : r.animated, !1), s = {
|
|
990
|
+
open: n,
|
|
991
|
+
animated: o,
|
|
992
|
+
animating: !!o && n,
|
|
993
|
+
mounted: n,
|
|
994
|
+
contentElement: j(r == null ? void 0 : r.contentElement, null),
|
|
995
|
+
disclosureElement: j(r == null ? void 0 : r.disclosureElement, null)
|
|
996
|
+
}, c = it(s, t);
|
|
997
|
+
return $e(
|
|
998
|
+
c,
|
|
999
|
+
() => bt(c, ["animated", "animating"], (l) => {
|
|
1000
|
+
l.animated || c.setState("animating", !1);
|
|
1001
|
+
})
|
|
1002
|
+
), $e(
|
|
1003
|
+
c,
|
|
1004
|
+
() => Zr(c, ["open"], () => {
|
|
1005
|
+
c.getState().animated && c.setState("animating", !0);
|
|
1006
|
+
})
|
|
1007
|
+
), $e(
|
|
1008
|
+
c,
|
|
1009
|
+
() => bt(c, ["open", "animating"], (l) => {
|
|
1010
|
+
c.setState("mounted", l.open || l.animating);
|
|
1011
|
+
})
|
|
1012
|
+
), _e(ce({}, c), {
|
|
1013
|
+
disclosure: e.disclosure,
|
|
1014
|
+
setOpen: (l) => c.setState("open", l),
|
|
1015
|
+
show: () => c.setState("open", !0),
|
|
1016
|
+
hide: () => c.setState("open", !1),
|
|
1017
|
+
toggle: () => c.setState("open", (l) => !l),
|
|
1018
|
+
stopAnimation: () => c.setState("animating", !1),
|
|
1019
|
+
setContentElement: (l) => c.setState("contentElement", l),
|
|
1020
|
+
setDisclosureElement: (l) => c.setState("disclosureElement", l)
|
|
1021
|
+
});
|
|
1022
|
+
}
|
|
1023
|
+
function er(e, t, r) {
|
|
1024
|
+
return qt(t, [r.store, r.disclosure]), re(e, r, "open", "setOpen"), re(e, r, "mounted", "setMounted"), re(e, r, "animated"), Object.assign(e, { disclosure: r.disclosure });
|
|
1025
|
+
}
|
|
1026
|
+
function Lo(e = {}) {
|
|
1027
|
+
const [t, r] = qn(Qn, e);
|
|
1028
|
+
return er(t, r, e);
|
|
1029
|
+
}
|
|
1030
|
+
function tr(e = {}) {
|
|
1031
|
+
return Qn(e);
|
|
1032
|
+
}
|
|
1033
|
+
function nr(e, t, r) {
|
|
1034
|
+
return er(e, t, r);
|
|
1035
|
+
}
|
|
1036
|
+
function Mo(e = {}) {
|
|
1037
|
+
const [t, r] = qn(tr, e);
|
|
1038
|
+
return nr(t, r, e);
|
|
1039
|
+
}
|
|
1040
|
+
function Is(e = {}) {
|
|
1041
|
+
var t = e, {
|
|
1042
|
+
popover: r
|
|
1043
|
+
} = t, n = Ir(t, [
|
|
1044
|
+
"popover"
|
|
1045
|
+
]);
|
|
1046
|
+
const o = zn(
|
|
1047
|
+
n.store,
|
|
1048
|
+
Kn(r, [
|
|
1049
|
+
"arrowElement",
|
|
1050
|
+
"anchorElement",
|
|
1051
|
+
"contentElement",
|
|
1052
|
+
"popoverElement",
|
|
1053
|
+
"disclosureElement"
|
|
1054
|
+
])
|
|
1055
|
+
);
|
|
1056
|
+
Qt(n, o);
|
|
1057
|
+
const s = o == null ? void 0 : o.getState(), c = tr(_e(ce({}, n), { store: o })), l = j(
|
|
1058
|
+
n.placement,
|
|
1059
|
+
s == null ? void 0 : s.placement,
|
|
1060
|
+
"bottom"
|
|
1061
|
+
), a = _e(ce({}, c.getState()), {
|
|
1062
|
+
placement: l,
|
|
1063
|
+
currentPlacement: l,
|
|
1064
|
+
anchorElement: j(s == null ? void 0 : s.anchorElement, null),
|
|
1065
|
+
popoverElement: j(s == null ? void 0 : s.popoverElement, null),
|
|
1066
|
+
arrowElement: j(s == null ? void 0 : s.arrowElement, null),
|
|
1067
|
+
rendered: Symbol("rendered")
|
|
1068
|
+
}), u = it(a, c, o);
|
|
1069
|
+
return _e(ce(ce({}, c), u), {
|
|
1070
|
+
setAnchorElement: (m) => u.setState("anchorElement", m),
|
|
1071
|
+
setPopoverElement: (m) => u.setState("popoverElement", m),
|
|
1072
|
+
setArrowElement: (m) => u.setState("arrowElement", m),
|
|
1073
|
+
render: () => u.setState("rendered", Symbol("rendered"))
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
function Fs(e, t, r) {
|
|
1077
|
+
return qt(t, [r.popover]), re(e, r, "placement"), nr(e, t, r);
|
|
1078
|
+
}
|
|
1079
|
+
var Pn = Je(null), No = "span", rr = ee(
|
|
1080
|
+
function(t) {
|
|
1081
|
+
return t = W(C({}, t), {
|
|
1082
|
+
style: C({
|
|
1083
|
+
border: 0,
|
|
1084
|
+
clip: "rect(0 0 0 0)",
|
|
1085
|
+
height: "1px",
|
|
1086
|
+
margin: "-1px",
|
|
1087
|
+
overflow: "hidden",
|
|
1088
|
+
padding: 0,
|
|
1089
|
+
position: "absolute",
|
|
1090
|
+
whiteSpace: "nowrap",
|
|
1091
|
+
width: "1px"
|
|
1092
|
+
}, t.style)
|
|
1093
|
+
}), t;
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
K(function(t) {
|
|
1097
|
+
const r = rr(t);
|
|
1098
|
+
return Q(No, r);
|
|
1099
|
+
});
|
|
1100
|
+
var ko = "span", $o = ee(
|
|
1101
|
+
function(t) {
|
|
1102
|
+
return t = W(C({
|
|
1103
|
+
"data-focus-trap": "",
|
|
1104
|
+
tabIndex: 0,
|
|
1105
|
+
"aria-hidden": !0
|
|
1106
|
+
}, t), {
|
|
1107
|
+
style: C({
|
|
1108
|
+
// Prevents unintended scroll jumps.
|
|
1109
|
+
position: "fixed",
|
|
1110
|
+
top: 0,
|
|
1111
|
+
left: 0
|
|
1112
|
+
}, t.style)
|
|
1113
|
+
}), t = rr(t), t;
|
|
1114
|
+
}
|
|
1115
|
+
), gt = K(function(t) {
|
|
1116
|
+
const r = $o(t);
|
|
1117
|
+
return Q(ko, r);
|
|
1118
|
+
}), Vo = "div";
|
|
1119
|
+
function Ho(e) {
|
|
1120
|
+
return G(e).body;
|
|
1121
|
+
}
|
|
1122
|
+
function Bo(e, t) {
|
|
1123
|
+
return t ? typeof t == "function" ? t(e) : t : G(e).createElement("div");
|
|
1124
|
+
}
|
|
1125
|
+
function Wo(e = "id") {
|
|
1126
|
+
return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
|
|
1127
|
+
}
|
|
1128
|
+
function Te(e) {
|
|
1129
|
+
queueMicrotask(() => {
|
|
1130
|
+
e == null || e.focus();
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
var or = ee(function(t) {
|
|
1134
|
+
var r = t, {
|
|
1135
|
+
preserveTabOrder: n,
|
|
1136
|
+
preserveTabOrderAnchor: o,
|
|
1137
|
+
portalElement: s,
|
|
1138
|
+
portalRef: c,
|
|
1139
|
+
portal: l = !0
|
|
1140
|
+
} = r, a = se(r, [
|
|
1141
|
+
"preserveTabOrder",
|
|
1142
|
+
"preserveTabOrderAnchor",
|
|
1143
|
+
"portalElement",
|
|
1144
|
+
"portalRef",
|
|
1145
|
+
"portal"
|
|
1146
|
+
]);
|
|
1147
|
+
const u = Y(null), m = Be(u, a.ref), f = en(Pn), [i, d] = le(null), [p, h] = le(
|
|
1148
|
+
null
|
|
1149
|
+
), x = Y(null), w = Y(null), b = Y(null), E = Y(null);
|
|
1150
|
+
return z(() => {
|
|
1151
|
+
const g = u.current;
|
|
1152
|
+
if (!g || !l) {
|
|
1153
|
+
d(null);
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1156
|
+
const v = Bo(g, s);
|
|
1157
|
+
if (!v) {
|
|
1158
|
+
d(null);
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
const O = v.isConnected;
|
|
1162
|
+
if (O || (f || Ho(g)).appendChild(v), v.id || (v.id = g.id ? `portal/${g.id}` : Wo()), d(v), gn(c, v), !O)
|
|
1163
|
+
return () => {
|
|
1164
|
+
v.remove(), gn(c, null);
|
|
1165
|
+
};
|
|
1166
|
+
}, [l, s, f, c]), z(() => {
|
|
1167
|
+
if (!l || !n || !o) return;
|
|
1168
|
+
const v = G(o).createElement("span");
|
|
1169
|
+
return v.style.position = "fixed", o.insertAdjacentElement("afterend", v), h(v), () => {
|
|
1170
|
+
v.remove(), h(null);
|
|
1171
|
+
};
|
|
1172
|
+
}, [l, n, o]), U(() => {
|
|
1173
|
+
if (!i || !n) return;
|
|
1174
|
+
let g = 0;
|
|
1175
|
+
const v = (O) => {
|
|
1176
|
+
if (!nt(O)) return;
|
|
1177
|
+
const S = O.type === "focusin";
|
|
1178
|
+
if (cancelAnimationFrame(g), S)
|
|
1179
|
+
return Qr(i);
|
|
1180
|
+
g = requestAnimationFrame(() => {
|
|
1181
|
+
eo(i, !0);
|
|
1182
|
+
});
|
|
1183
|
+
};
|
|
1184
|
+
return i.addEventListener("focusin", v, !0), i.addEventListener("focusout", v, !0), () => {
|
|
1185
|
+
cancelAnimationFrame(g), i.removeEventListener("focusin", v, !0), i.removeEventListener("focusout", v, !0);
|
|
1186
|
+
};
|
|
1187
|
+
}, [i, n]), a = fe(
|
|
1188
|
+
a,
|
|
1189
|
+
(g) => {
|
|
1190
|
+
if (g = // While the portal node is not in the DOM, we need to pass the
|
|
1191
|
+
// current context to the portal context, otherwise it's going to
|
|
1192
|
+
// reset to the body element on nested portals.
|
|
1193
|
+
/* @__PURE__ */ H(Pn.Provider, { value: i || f, children: g }), !l) return g;
|
|
1194
|
+
if (!i)
|
|
1195
|
+
return /* @__PURE__ */ H(
|
|
1196
|
+
"span",
|
|
1197
|
+
{
|
|
1198
|
+
ref: m,
|
|
1199
|
+
id: a.id,
|
|
1200
|
+
style: { position: "fixed" },
|
|
1201
|
+
hidden: !0
|
|
1202
|
+
}
|
|
1203
|
+
);
|
|
1204
|
+
g = /* @__PURE__ */ ht(yt, { children: [
|
|
1205
|
+
n && i && /* @__PURE__ */ H(
|
|
1206
|
+
gt,
|
|
1207
|
+
{
|
|
1208
|
+
ref: w,
|
|
1209
|
+
"data-focus-trap": a.id,
|
|
1210
|
+
className: "__focus-trap-inner-before",
|
|
1211
|
+
onFocus: (O) => {
|
|
1212
|
+
nt(O, i) ? Te(It()) : Te(x.current);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
),
|
|
1216
|
+
g,
|
|
1217
|
+
n && i && /* @__PURE__ */ H(
|
|
1218
|
+
gt,
|
|
1219
|
+
{
|
|
1220
|
+
ref: b,
|
|
1221
|
+
"data-focus-trap": a.id,
|
|
1222
|
+
className: "__focus-trap-inner-after",
|
|
1223
|
+
onFocus: (O) => {
|
|
1224
|
+
nt(O, i) ? Te(hn()) : Te(E.current);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
] }), i && (g = xt.createPortal(g, i));
|
|
1229
|
+
let v = /* @__PURE__ */ ht(yt, { children: [
|
|
1230
|
+
n && i && /* @__PURE__ */ H(
|
|
1231
|
+
gt,
|
|
1232
|
+
{
|
|
1233
|
+
ref: x,
|
|
1234
|
+
"data-focus-trap": a.id,
|
|
1235
|
+
className: "__focus-trap-outer-before",
|
|
1236
|
+
onFocus: (O) => {
|
|
1237
|
+
!(O.relatedTarget === E.current) && nt(O, i) ? Te(w.current) : Te(hn());
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
),
|
|
1241
|
+
n && // We're using position: fixed here so that the browser doesn't
|
|
1242
|
+
// add margin to the element when setting gap on a parent element.
|
|
1243
|
+
/* @__PURE__ */ H("span", { "aria-owns": i == null ? void 0 : i.id, style: { position: "fixed" } }),
|
|
1244
|
+
n && i && /* @__PURE__ */ H(
|
|
1245
|
+
gt,
|
|
1246
|
+
{
|
|
1247
|
+
ref: E,
|
|
1248
|
+
"data-focus-trap": a.id,
|
|
1249
|
+
className: "__focus-trap-outer-after",
|
|
1250
|
+
onFocus: (O) => {
|
|
1251
|
+
if (nt(O, i))
|
|
1252
|
+
Te(b.current);
|
|
1253
|
+
else {
|
|
1254
|
+
const S = It();
|
|
1255
|
+
if (S === w.current) {
|
|
1256
|
+
requestAnimationFrame(() => {
|
|
1257
|
+
var $;
|
|
1258
|
+
return ($ = It()) == null ? void 0 : $.focus();
|
|
1259
|
+
});
|
|
1260
|
+
return;
|
|
1261
|
+
}
|
|
1262
|
+
Te(S);
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
)
|
|
1267
|
+
] });
|
|
1268
|
+
return p && n && (v = xt.createPortal(
|
|
1269
|
+
v,
|
|
1270
|
+
p
|
|
1271
|
+
)), /* @__PURE__ */ ht(yt, { children: [
|
|
1272
|
+
v,
|
|
1273
|
+
g
|
|
1274
|
+
] });
|
|
1275
|
+
},
|
|
1276
|
+
[i, f, l, a.id, n, p]
|
|
1277
|
+
), a = W(C({}, a), {
|
|
1278
|
+
ref: m
|
|
1279
|
+
}), a;
|
|
1280
|
+
});
|
|
1281
|
+
K(function(t) {
|
|
1282
|
+
const r = or(t);
|
|
1283
|
+
return Q(Vo, r);
|
|
1284
|
+
});
|
|
1285
|
+
var Dn = Je(0);
|
|
1286
|
+
function jo({ level: e, children: t }) {
|
|
1287
|
+
const r = en(Dn), n = Math.max(
|
|
1288
|
+
Math.min(e || r + 1, 6),
|
|
1289
|
+
1
|
|
1290
|
+
);
|
|
1291
|
+
return /* @__PURE__ */ H(Dn.Provider, { value: n, children: t });
|
|
1292
|
+
}
|
|
1293
|
+
var zo = "div", ir = ee(function(t) {
|
|
1294
|
+
var r = t, { autoFocusOnShow: n = !0 } = r, o = se(r, ["autoFocusOnShow"]);
|
|
1295
|
+
return o = fe(
|
|
1296
|
+
o,
|
|
1297
|
+
(s) => /* @__PURE__ */ H(to.Provider, { value: n, children: s }),
|
|
1298
|
+
[n]
|
|
1299
|
+
), o;
|
|
1300
|
+
});
|
|
1301
|
+
K(function(t) {
|
|
1302
|
+
const r = ir(t);
|
|
1303
|
+
return Q(zo, r);
|
|
1304
|
+
});
|
|
1305
|
+
function Ko(e, t) {
|
|
1306
|
+
const n = G(e).createElement("button");
|
|
1307
|
+
return n.type = "button", n.tabIndex = -1, n.textContent = "Dismiss popup", Object.assign(n.style, {
|
|
1308
|
+
border: "0px",
|
|
1309
|
+
clip: "rect(0 0 0 0)",
|
|
1310
|
+
height: "1px",
|
|
1311
|
+
margin: "-1px",
|
|
1312
|
+
overflow: "hidden",
|
|
1313
|
+
padding: "0px",
|
|
1314
|
+
position: "absolute",
|
|
1315
|
+
whiteSpace: "nowrap",
|
|
1316
|
+
width: "1px"
|
|
1317
|
+
}), n.addEventListener("click", t), e.prepend(n), () => {
|
|
1318
|
+
n.removeEventListener("click", t), n.remove();
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
function qo(e) {
|
|
1322
|
+
const t = Y();
|
|
1323
|
+
return U(() => {
|
|
1324
|
+
if (!e) {
|
|
1325
|
+
t.current = null;
|
|
1326
|
+
return;
|
|
1327
|
+
}
|
|
1328
|
+
return Zt("mousedown", (n) => {
|
|
1329
|
+
t.current = n.target;
|
|
1330
|
+
}, !0);
|
|
1331
|
+
}, [e]), t;
|
|
1332
|
+
}
|
|
1333
|
+
var Ft = /* @__PURE__ */ new WeakMap();
|
|
1334
|
+
function ct(e, t, r) {
|
|
1335
|
+
Ft.has(e) || Ft.set(e, /* @__PURE__ */ new Map());
|
|
1336
|
+
const n = Ft.get(e), o = n.get(t);
|
|
1337
|
+
if (!o)
|
|
1338
|
+
return n.set(t, r()), () => {
|
|
1339
|
+
var l;
|
|
1340
|
+
(l = n.get(t)) == null || l(), n.delete(t);
|
|
1341
|
+
};
|
|
1342
|
+
const s = r(), c = () => {
|
|
1343
|
+
s(), o(), n.delete(t);
|
|
1344
|
+
};
|
|
1345
|
+
return n.set(t, c), () => {
|
|
1346
|
+
n.get(t) === c && (s(), n.set(t, o));
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
function nn(e, t, r) {
|
|
1350
|
+
return ct(e, t, () => {
|
|
1351
|
+
const o = e.getAttribute(t);
|
|
1352
|
+
return e.setAttribute(t, r), () => {
|
|
1353
|
+
o == null ? e.removeAttribute(t) : e.setAttribute(t, o);
|
|
1354
|
+
};
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
function Ve(e, t, r) {
|
|
1358
|
+
return ct(e, t, () => {
|
|
1359
|
+
const o = t in e, s = e[t];
|
|
1360
|
+
return e[t] = r, () => {
|
|
1361
|
+
o ? e[t] = s : delete e[t];
|
|
1362
|
+
};
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
function Ht(e, t) {
|
|
1366
|
+
return e ? ct(e, "style", () => {
|
|
1367
|
+
const n = e.style.cssText;
|
|
1368
|
+
return Object.assign(e.style, t), () => {
|
|
1369
|
+
e.style.cssText = n;
|
|
1370
|
+
};
|
|
1371
|
+
}) : () => {
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
function Uo(e, t, r) {
|
|
1375
|
+
return e ? ct(e, t, () => {
|
|
1376
|
+
const o = e.style.getPropertyValue(t);
|
|
1377
|
+
return e.style.setProperty(t, r), () => {
|
|
1378
|
+
o ? e.style.setProperty(t, o) : e.style.removeProperty(t);
|
|
1379
|
+
};
|
|
1380
|
+
}) : () => {
|
|
1381
|
+
};
|
|
1382
|
+
}
|
|
1383
|
+
var Yo = ["SCRIPT", "STYLE"];
|
|
1384
|
+
function Bt(e) {
|
|
1385
|
+
return `__ariakit-dialog-snapshot-${e}`;
|
|
1386
|
+
}
|
|
1387
|
+
function Go(e, t) {
|
|
1388
|
+
const r = G(t), n = Bt(e);
|
|
1389
|
+
if (!r.body[n]) return !0;
|
|
1390
|
+
do {
|
|
1391
|
+
if (t === r.body) return !1;
|
|
1392
|
+
if (t[n]) return !0;
|
|
1393
|
+
if (!t.parentElement) return !1;
|
|
1394
|
+
t = t.parentElement;
|
|
1395
|
+
} while (!0);
|
|
1396
|
+
}
|
|
1397
|
+
function Xo(e, t, r) {
|
|
1398
|
+
return Yo.includes(t.tagName) || !Go(e, t) ? !1 : !r.some(
|
|
1399
|
+
(n) => n && de(t, n)
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function rn(e, t, r, n) {
|
|
1403
|
+
for (let o of t) {
|
|
1404
|
+
if (!(o != null && o.isConnected)) continue;
|
|
1405
|
+
const s = t.some((a) => !a || a === o ? !1 : a.contains(o)), c = G(o), l = o;
|
|
1406
|
+
for (; o.parentElement && o !== c.body; ) {
|
|
1407
|
+
if (n == null || n(o.parentElement, l), !s)
|
|
1408
|
+
for (const a of o.parentElement.children)
|
|
1409
|
+
Xo(e, a, t) && r(a, l);
|
|
1410
|
+
o = o.parentElement;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
function Jo(e, t) {
|
|
1415
|
+
const { body: r } = G(t[0]), n = [];
|
|
1416
|
+
return rn(e, t, (s) => {
|
|
1417
|
+
n.push(Ve(s, Bt(e), !0));
|
|
1418
|
+
}), De(Ve(r, Bt(e), !0), () => {
|
|
1419
|
+
for (const s of n)
|
|
1420
|
+
s();
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
function sr(e, ...t) {
|
|
1424
|
+
if (!e) return !1;
|
|
1425
|
+
const r = e.getAttribute("data-backdrop");
|
|
1426
|
+
return r == null ? !1 : r === "" || r === "true" || !t.length ? !0 : t.some((n) => r === n);
|
|
1427
|
+
}
|
|
1428
|
+
function Ge(e = "", t = !1) {
|
|
1429
|
+
return `__ariakit-dialog-${t ? "ancestor" : "outside"}${e ? `-${e}` : ""}`;
|
|
1430
|
+
}
|
|
1431
|
+
function Zo(e, t = "") {
|
|
1432
|
+
return De(
|
|
1433
|
+
Ve(e, Ge(), !0),
|
|
1434
|
+
Ve(e, Ge(t), !0)
|
|
1435
|
+
);
|
|
1436
|
+
}
|
|
1437
|
+
function ar(e, t = "") {
|
|
1438
|
+
return De(
|
|
1439
|
+
Ve(e, Ge("", !0), !0),
|
|
1440
|
+
Ve(e, Ge(t, !0), !0)
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function on(e, t) {
|
|
1444
|
+
const r = Ge(t, !0);
|
|
1445
|
+
if (e[r]) return !0;
|
|
1446
|
+
const n = Ge(t);
|
|
1447
|
+
do {
|
|
1448
|
+
if (e[n]) return !0;
|
|
1449
|
+
if (!e.parentElement) return !1;
|
|
1450
|
+
e = e.parentElement;
|
|
1451
|
+
} while (!0);
|
|
1452
|
+
}
|
|
1453
|
+
function An(e, t) {
|
|
1454
|
+
const r = [], n = t.map((s) => s == null ? void 0 : s.id);
|
|
1455
|
+
return rn(
|
|
1456
|
+
e,
|
|
1457
|
+
t,
|
|
1458
|
+
(s) => {
|
|
1459
|
+
sr(s, ...n) || r.unshift(Zo(s, e));
|
|
1460
|
+
},
|
|
1461
|
+
(s, c) => {
|
|
1462
|
+
c.hasAttribute("data-dialog") && c.id !== e || r.unshift(ar(s, e));
|
|
1463
|
+
}
|
|
1464
|
+
), () => {
|
|
1465
|
+
for (const s of r)
|
|
1466
|
+
s();
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
function Qo(e) {
|
|
1470
|
+
return e.tagName === "HTML" ? !0 : de(G(e).body, e);
|
|
1471
|
+
}
|
|
1472
|
+
function ei(e, t) {
|
|
1473
|
+
if (!e) return !1;
|
|
1474
|
+
if (de(e, t)) return !0;
|
|
1475
|
+
const r = t.getAttribute("aria-activedescendant");
|
|
1476
|
+
if (r) {
|
|
1477
|
+
const n = G(e).getElementById(r);
|
|
1478
|
+
if (n)
|
|
1479
|
+
return de(e, n);
|
|
1480
|
+
}
|
|
1481
|
+
return !1;
|
|
1482
|
+
}
|
|
1483
|
+
function ti(e, t) {
|
|
1484
|
+
if (!("clientY" in e)) return !1;
|
|
1485
|
+
const r = t.getBoundingClientRect();
|
|
1486
|
+
return r.width === 0 || r.height === 0 ? !1 : r.top <= e.clientY && e.clientY <= r.top + r.height && r.left <= e.clientX && e.clientX <= r.left + r.width;
|
|
1487
|
+
}
|
|
1488
|
+
function Lt({
|
|
1489
|
+
store: e,
|
|
1490
|
+
type: t,
|
|
1491
|
+
listener: r,
|
|
1492
|
+
capture: n,
|
|
1493
|
+
domReady: o
|
|
1494
|
+
}) {
|
|
1495
|
+
const s = ue(r), c = he(e, "open"), l = Y(!1);
|
|
1496
|
+
z(() => {
|
|
1497
|
+
if (!c || !o) return;
|
|
1498
|
+
const { contentElement: a } = e.getState();
|
|
1499
|
+
if (!a) return;
|
|
1500
|
+
const u = () => {
|
|
1501
|
+
l.current = !0;
|
|
1502
|
+
};
|
|
1503
|
+
return a.addEventListener("focusin", u, !0), () => a.removeEventListener("focusin", u, !0);
|
|
1504
|
+
}, [e, c, o]), U(() => c ? Zt(t, (u) => {
|
|
1505
|
+
const { contentElement: m, disclosureElement: f } = e.getState(), i = u.target;
|
|
1506
|
+
!m || !i || !Qo(i) || de(m, i) || ei(f, i) || i.hasAttribute("data-focus-trap") || ti(u, m) || l.current && !on(i, m.id) || no(i) || s(u);
|
|
1507
|
+
}, n) : void 0, [c, n]);
|
|
1508
|
+
}
|
|
1509
|
+
function Mt(e, t) {
|
|
1510
|
+
return typeof e == "function" ? e(t) : !!e;
|
|
1511
|
+
}
|
|
1512
|
+
function ni(e, t, r) {
|
|
1513
|
+
const n = he(e, "open"), o = qo(n), s = { store: e, domReady: r, capture: !0 };
|
|
1514
|
+
Lt(W(C({}, s), {
|
|
1515
|
+
type: "click",
|
|
1516
|
+
listener: (c) => {
|
|
1517
|
+
const { contentElement: l } = e.getState(), a = o.current;
|
|
1518
|
+
a && Fr(a) && on(a, l == null ? void 0 : l.id) && Mt(t, c) && e.hide();
|
|
1519
|
+
}
|
|
1520
|
+
})), Lt(W(C({}, s), {
|
|
1521
|
+
type: "focusin",
|
|
1522
|
+
listener: (c) => {
|
|
1523
|
+
const { contentElement: l } = e.getState();
|
|
1524
|
+
l && c.target !== G(l) && Mt(t, c) && e.hide();
|
|
1525
|
+
}
|
|
1526
|
+
})), Lt(W(C({}, s), {
|
|
1527
|
+
type: "contextmenu",
|
|
1528
|
+
listener: (c) => {
|
|
1529
|
+
Mt(t, c) && e.hide();
|
|
1530
|
+
}
|
|
1531
|
+
}));
|
|
1532
|
+
}
|
|
1533
|
+
var Tn = Je({});
|
|
1534
|
+
function ri(e) {
|
|
1535
|
+
const t = en(Tn), [r, n] = le([]), o = st(
|
|
1536
|
+
(l) => {
|
|
1537
|
+
var a;
|
|
1538
|
+
return n((u) => [...u, l]), De((a = t.add) == null ? void 0 : a.call(t, l), () => {
|
|
1539
|
+
n((u) => u.filter((m) => m !== l));
|
|
1540
|
+
});
|
|
1541
|
+
},
|
|
1542
|
+
[t]
|
|
1543
|
+
);
|
|
1544
|
+
z(() => bt(e, ["open", "contentElement"], (l) => {
|
|
1545
|
+
var a;
|
|
1546
|
+
if (l.open && l.contentElement)
|
|
1547
|
+
return (a = t.add) == null ? void 0 : a.call(t, e);
|
|
1548
|
+
}), [e, t]);
|
|
1549
|
+
const s = Yn(() => ({ store: e, add: o }), [e, o]);
|
|
1550
|
+
return { wrapElement: st(
|
|
1551
|
+
(l) => /* @__PURE__ */ H(Tn.Provider, { value: s, children: l }),
|
|
1552
|
+
[s]
|
|
1553
|
+
), nestedDialogs: r };
|
|
1554
|
+
}
|
|
1555
|
+
function oi({
|
|
1556
|
+
attribute: e,
|
|
1557
|
+
contentId: t,
|
|
1558
|
+
contentElement: r,
|
|
1559
|
+
enabled: n
|
|
1560
|
+
}) {
|
|
1561
|
+
const [o, s] = Lr(), c = st(() => {
|
|
1562
|
+
if (!n || !r) return !1;
|
|
1563
|
+
const { body: l } = G(r), a = l.getAttribute(e);
|
|
1564
|
+
return !a || a === t;
|
|
1565
|
+
}, [o, n, r, e, t]);
|
|
1566
|
+
return U(() => {
|
|
1567
|
+
if (!n || !t || !r) return;
|
|
1568
|
+
const { body: l } = G(r);
|
|
1569
|
+
if (c())
|
|
1570
|
+
return l.setAttribute(e, t), () => l.removeAttribute(e);
|
|
1571
|
+
const a = new MutationObserver(() => xt.flushSync(s));
|
|
1572
|
+
return a.observe(l, { attributeFilter: [e] }), () => a.disconnect();
|
|
1573
|
+
}, [o, n, t, r, c, e]), c;
|
|
1574
|
+
}
|
|
1575
|
+
function ii(e) {
|
|
1576
|
+
const t = e.getBoundingClientRect().left;
|
|
1577
|
+
return Math.round(t) + e.scrollLeft ? "paddingLeft" : "paddingRight";
|
|
1578
|
+
}
|
|
1579
|
+
function si(e, t, r) {
|
|
1580
|
+
const n = oi({
|
|
1581
|
+
attribute: "data-dialog-prevent-body-scroll",
|
|
1582
|
+
contentElement: e,
|
|
1583
|
+
contentId: t,
|
|
1584
|
+
enabled: r
|
|
1585
|
+
});
|
|
1586
|
+
U(() => {
|
|
1587
|
+
if (!n() || !e) return;
|
|
1588
|
+
const o = G(e), s = Bn(e), { documentElement: c, body: l } = o, a = c.style.getPropertyValue("--scrollbar-width"), u = a ? Number.parseInt(a) : s.innerWidth - c.clientWidth, m = () => Uo(
|
|
1589
|
+
c,
|
|
1590
|
+
"--scrollbar-width",
|
|
1591
|
+
`${u}px`
|
|
1592
|
+
), f = ii(c), i = () => Ht(l, {
|
|
1593
|
+
overflow: "hidden",
|
|
1594
|
+
[f]: `${u}px`
|
|
1595
|
+
}), d = () => {
|
|
1596
|
+
var h, x;
|
|
1597
|
+
const { scrollX: w, scrollY: b, visualViewport: E } = s, g = (h = E == null ? void 0 : E.offsetLeft) != null ? h : 0, v = (x = E == null ? void 0 : E.offsetTop) != null ? x : 0, O = Ht(l, {
|
|
1598
|
+
position: "fixed",
|
|
1599
|
+
overflow: "hidden",
|
|
1600
|
+
top: `${-(b - Math.floor(v))}px`,
|
|
1601
|
+
left: `${-(w - Math.floor(g))}px`,
|
|
1602
|
+
right: "0",
|
|
1603
|
+
[f]: `${u}px`
|
|
1604
|
+
});
|
|
1605
|
+
return () => {
|
|
1606
|
+
O(), process.env.NODE_ENV !== "test" && s.scrollTo({ left: w, top: b, behavior: "instant" });
|
|
1607
|
+
};
|
|
1608
|
+
}, p = Mr() && !Nr();
|
|
1609
|
+
return De(
|
|
1610
|
+
m(),
|
|
1611
|
+
p ? d() : i()
|
|
1612
|
+
);
|
|
1613
|
+
}, [n, e]);
|
|
1614
|
+
}
|
|
1615
|
+
function ai(e, ...t) {
|
|
1616
|
+
if (!e) return !1;
|
|
1617
|
+
const r = e.getAttribute("data-focus-trap");
|
|
1618
|
+
return r == null ? !1 : t.length ? r === "" ? !1 : t.some((n) => r === n) : !0;
|
|
1619
|
+
}
|
|
1620
|
+
function cr() {
|
|
1621
|
+
return "inert" in HTMLElement.prototype;
|
|
1622
|
+
}
|
|
1623
|
+
function ci(e) {
|
|
1624
|
+
return nn(e, "aria-hidden", "true");
|
|
1625
|
+
}
|
|
1626
|
+
function ur(e, t) {
|
|
1627
|
+
if (!("style" in e)) return Ct;
|
|
1628
|
+
if (cr())
|
|
1629
|
+
return Ve(e, "inert", !0);
|
|
1630
|
+
const n = ro(e, !0).map((o) => {
|
|
1631
|
+
if (t != null && t.some((c) => c && de(c, o))) return Ct;
|
|
1632
|
+
const s = ct(o, "focus", () => (o.focus = Ct, () => {
|
|
1633
|
+
delete o.focus;
|
|
1634
|
+
}));
|
|
1635
|
+
return De(nn(o, "tabindex", "-1"), s);
|
|
1636
|
+
});
|
|
1637
|
+
return De(
|
|
1638
|
+
...n,
|
|
1639
|
+
ci(e),
|
|
1640
|
+
Ht(e, {
|
|
1641
|
+
pointerEvents: "none",
|
|
1642
|
+
userSelect: "none",
|
|
1643
|
+
cursor: "default"
|
|
1644
|
+
})
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
function ui(e, t) {
|
|
1648
|
+
const r = [], n = t.map((s) => s == null ? void 0 : s.id);
|
|
1649
|
+
return rn(
|
|
1650
|
+
e,
|
|
1651
|
+
t,
|
|
1652
|
+
(s) => {
|
|
1653
|
+
sr(s, ...n) || ai(s, ...n) || r.unshift(ur(s, t));
|
|
1654
|
+
},
|
|
1655
|
+
(s) => {
|
|
1656
|
+
s.hasAttribute("role") && (t.some((c) => c && de(c, s)) || r.unshift(nn(s, "role", "none")));
|
|
1657
|
+
}
|
|
1658
|
+
), () => {
|
|
1659
|
+
for (const s of r)
|
|
1660
|
+
s();
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
var li = "div", fi = [
|
|
1664
|
+
"a",
|
|
1665
|
+
"button",
|
|
1666
|
+
"details",
|
|
1667
|
+
"dialog",
|
|
1668
|
+
"div",
|
|
1669
|
+
"form",
|
|
1670
|
+
"h1",
|
|
1671
|
+
"h2",
|
|
1672
|
+
"h3",
|
|
1673
|
+
"h4",
|
|
1674
|
+
"h5",
|
|
1675
|
+
"h6",
|
|
1676
|
+
"header",
|
|
1677
|
+
"img",
|
|
1678
|
+
"input",
|
|
1679
|
+
"label",
|
|
1680
|
+
"li",
|
|
1681
|
+
"nav",
|
|
1682
|
+
"ol",
|
|
1683
|
+
"p",
|
|
1684
|
+
"section",
|
|
1685
|
+
"select",
|
|
1686
|
+
"span",
|
|
1687
|
+
"summary",
|
|
1688
|
+
"textarea",
|
|
1689
|
+
"ul",
|
|
1690
|
+
"svg"
|
|
1691
|
+
];
|
|
1692
|
+
ee(
|
|
1693
|
+
function(t) {
|
|
1694
|
+
return t;
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
var Wt = K(
|
|
1698
|
+
// @ts-expect-error
|
|
1699
|
+
function(t) {
|
|
1700
|
+
return Q(li, t);
|
|
1701
|
+
}
|
|
1702
|
+
);
|
|
1703
|
+
Object.assign(
|
|
1704
|
+
Wt,
|
|
1705
|
+
fi.reduce((e, t) => (e[t] = K(function(n) {
|
|
1706
|
+
return Q(t, n);
|
|
1707
|
+
}), e), {})
|
|
1708
|
+
);
|
|
1709
|
+
function di({
|
|
1710
|
+
store: e,
|
|
1711
|
+
backdrop: t,
|
|
1712
|
+
alwaysVisible: r,
|
|
1713
|
+
hidden: n
|
|
1714
|
+
}) {
|
|
1715
|
+
const o = Y(null), s = Lo({ disclosure: e }), c = he(e, "contentElement");
|
|
1716
|
+
U(() => {
|
|
1717
|
+
const u = o.current, m = c;
|
|
1718
|
+
u && m && (u.style.zIndex = getComputedStyle(m).zIndex);
|
|
1719
|
+
}, [c]), z(() => {
|
|
1720
|
+
const u = c == null ? void 0 : c.id;
|
|
1721
|
+
if (!u) return;
|
|
1722
|
+
const m = o.current;
|
|
1723
|
+
if (m)
|
|
1724
|
+
return ar(m, u);
|
|
1725
|
+
}, [c]);
|
|
1726
|
+
const l = tn({
|
|
1727
|
+
ref: o,
|
|
1728
|
+
store: s,
|
|
1729
|
+
role: "presentation",
|
|
1730
|
+
"data-backdrop": (c == null ? void 0 : c.id) || "",
|
|
1731
|
+
alwaysVisible: r,
|
|
1732
|
+
hidden: n ?? void 0,
|
|
1733
|
+
style: {
|
|
1734
|
+
position: "fixed",
|
|
1735
|
+
top: 0,
|
|
1736
|
+
right: 0,
|
|
1737
|
+
bottom: 0,
|
|
1738
|
+
left: 0
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
if (!t) return null;
|
|
1742
|
+
if (co(t))
|
|
1743
|
+
return /* @__PURE__ */ H(Wt, W(C({}, l), { render: t }));
|
|
1744
|
+
const a = typeof t != "boolean" ? t : "div";
|
|
1745
|
+
return /* @__PURE__ */ H(Wt, W(C({}, l), { render: /* @__PURE__ */ H(a, {}) }));
|
|
1746
|
+
}
|
|
1747
|
+
var mi = "div", _n = Hr();
|
|
1748
|
+
function pi(e) {
|
|
1749
|
+
const t = Gt();
|
|
1750
|
+
return !t || e && de(e, t) ? !1 : !!ot(t);
|
|
1751
|
+
}
|
|
1752
|
+
function Cn(e, t = !1) {
|
|
1753
|
+
if (!e) return null;
|
|
1754
|
+
const r = "current" in e ? e.current : e;
|
|
1755
|
+
return r ? t ? ot(r) ? r : null : r : null;
|
|
1756
|
+
}
|
|
1757
|
+
var lr = ee(function(t) {
|
|
1758
|
+
var r = t, {
|
|
1759
|
+
store: n,
|
|
1760
|
+
open: o,
|
|
1761
|
+
onClose: s,
|
|
1762
|
+
focusable: c = !0,
|
|
1763
|
+
modal: l = !0,
|
|
1764
|
+
portal: a = !!l,
|
|
1765
|
+
backdrop: u = !!l,
|
|
1766
|
+
hideOnEscape: m = !0,
|
|
1767
|
+
hideOnInteractOutside: f = !0,
|
|
1768
|
+
getPersistentElements: i,
|
|
1769
|
+
preventBodyScroll: d = !!l,
|
|
1770
|
+
autoFocusOnShow: p = !0,
|
|
1771
|
+
autoFocusOnHide: h = !0,
|
|
1772
|
+
initialFocus: x,
|
|
1773
|
+
finalFocus: w,
|
|
1774
|
+
unmountOnHide: b,
|
|
1775
|
+
unstable_treeSnapshotKey: E
|
|
1776
|
+
} = r, g = se(r, [
|
|
1777
|
+
"store",
|
|
1778
|
+
"open",
|
|
1779
|
+
"onClose",
|
|
1780
|
+
"focusable",
|
|
1781
|
+
"modal",
|
|
1782
|
+
"portal",
|
|
1783
|
+
"backdrop",
|
|
1784
|
+
"hideOnEscape",
|
|
1785
|
+
"hideOnInteractOutside",
|
|
1786
|
+
"getPersistentElements",
|
|
1787
|
+
"preventBodyScroll",
|
|
1788
|
+
"autoFocusOnShow",
|
|
1789
|
+
"autoFocusOnHide",
|
|
1790
|
+
"initialFocus",
|
|
1791
|
+
"finalFocus",
|
|
1792
|
+
"unmountOnHide",
|
|
1793
|
+
"unstable_treeSnapshotKey"
|
|
1794
|
+
]);
|
|
1795
|
+
const v = Pt(), O = Y(null), S = Mo({
|
|
1796
|
+
store: n || v,
|
|
1797
|
+
open: o,
|
|
1798
|
+
setOpen(P) {
|
|
1799
|
+
if (P) return;
|
|
1800
|
+
const F = O.current;
|
|
1801
|
+
if (!F) return;
|
|
1802
|
+
const X = new Event("close", { bubbles: !1, cancelable: !0 });
|
|
1803
|
+
s && F.addEventListener("close", s, { once: !0 }), F.dispatchEvent(X), X.defaultPrevented && S.setOpen(!0);
|
|
1804
|
+
}
|
|
1805
|
+
}), { portalRef: $, domReady: A } = Wn(a, g.portalRef), R = g.preserveTabOrder, B = he(
|
|
1806
|
+
S,
|
|
1807
|
+
(P) => R && !l && P.mounted
|
|
1808
|
+
), L = Ut(g.id), y = he(S, "open"), D = he(S, "mounted"), T = he(S, "contentElement"), M = Zn(D, g.hidden, g.alwaysVisible);
|
|
1809
|
+
si(T, L, d && !M), ni(S, f, A);
|
|
1810
|
+
const { wrapElement: I, nestedDialogs: V } = ri(S);
|
|
1811
|
+
g = fe(g, I, [I]), z(() => {
|
|
1812
|
+
if (!y) return;
|
|
1813
|
+
const P = O.current, F = Gt(P, !0);
|
|
1814
|
+
F && F.tagName !== "BODY" && (P && de(P, F) || S.setDisclosureElement(F));
|
|
1815
|
+
}, [S, y]), _n && U(() => {
|
|
1816
|
+
if (!D) return;
|
|
1817
|
+
const { disclosureElement: P } = S.getState();
|
|
1818
|
+
if (!P || !$t(P)) return;
|
|
1819
|
+
const F = () => {
|
|
1820
|
+
let X = !1;
|
|
1821
|
+
const N = () => {
|
|
1822
|
+
X = !0;
|
|
1823
|
+
}, ne = { capture: !0, once: !0 };
|
|
1824
|
+
P.addEventListener("focusin", N, ne), Vr(P, "mouseup", () => {
|
|
1825
|
+
P.removeEventListener("focusin", N, !0), !X && io(P);
|
|
1826
|
+
});
|
|
1827
|
+
};
|
|
1828
|
+
return P.addEventListener("mousedown", F), () => {
|
|
1829
|
+
P.removeEventListener("mousedown", F);
|
|
1830
|
+
};
|
|
1831
|
+
}, [S, D]), U(() => {
|
|
1832
|
+
if (!D || !A) return;
|
|
1833
|
+
const P = O.current;
|
|
1834
|
+
if (!P) return;
|
|
1835
|
+
const F = Bn(P), X = F.visualViewport || F, N = () => {
|
|
1836
|
+
var ne, ve;
|
|
1837
|
+
const tt = (ve = (ne = F.visualViewport) == null ? void 0 : ne.height) != null ? ve : F.innerHeight;
|
|
1838
|
+
P.style.setProperty("--dialog-viewport-height", `${tt}px`);
|
|
1839
|
+
};
|
|
1840
|
+
return N(), X.addEventListener("resize", N), () => {
|
|
1841
|
+
X.removeEventListener("resize", N);
|
|
1842
|
+
};
|
|
1843
|
+
}, [D, A]), U(() => {
|
|
1844
|
+
if (!l || !D || !A) return;
|
|
1845
|
+
const P = O.current;
|
|
1846
|
+
if (!(!P || P.querySelector("[data-dialog-dismiss]")))
|
|
1847
|
+
return Ko(P, S.hide);
|
|
1848
|
+
}, [S, l, D, A]), z(() => {
|
|
1849
|
+
if (!cr() || y || !D || !A) return;
|
|
1850
|
+
const P = O.current;
|
|
1851
|
+
if (P)
|
|
1852
|
+
return ur(P);
|
|
1853
|
+
}, [y, D, A]);
|
|
1854
|
+
const _ = y && A;
|
|
1855
|
+
z(() => {
|
|
1856
|
+
if (!L || !_) return;
|
|
1857
|
+
const P = O.current;
|
|
1858
|
+
return Jo(L, [P]);
|
|
1859
|
+
}, [L, _, E]);
|
|
1860
|
+
const k = ue(i);
|
|
1861
|
+
z(() => {
|
|
1862
|
+
if (!L || !_) return;
|
|
1863
|
+
const { disclosureElement: P } = S.getState(), F = O.current, X = k() || [], N = [
|
|
1864
|
+
F,
|
|
1865
|
+
...X,
|
|
1866
|
+
...V.map((ne) => ne.getState().contentElement)
|
|
1867
|
+
];
|
|
1868
|
+
return l ? De(
|
|
1869
|
+
An(L, N),
|
|
1870
|
+
ui(L, N)
|
|
1871
|
+
) : An(L, [P, ...N]);
|
|
1872
|
+
}, [
|
|
1873
|
+
L,
|
|
1874
|
+
S,
|
|
1875
|
+
_,
|
|
1876
|
+
k,
|
|
1877
|
+
V,
|
|
1878
|
+
l,
|
|
1879
|
+
E
|
|
1880
|
+
]);
|
|
1881
|
+
const q = !!p, We = rt(p), [et, ae] = le(!1);
|
|
1882
|
+
U(() => {
|
|
1883
|
+
if (!y || !q || !A || !(T != null && T.isConnected)) return;
|
|
1884
|
+
const P = Cn(x, !0) || // If no initial focus is specified, we try to focus the first element
|
|
1885
|
+
// with the autofocus attribute. If it's an Ariakit component, the
|
|
1886
|
+
// Focusable component will consume the autoFocus prop and add the
|
|
1887
|
+
// data-autofocus attribute to the element instead.
|
|
1888
|
+
T.querySelector(
|
|
1889
|
+
"[data-autofocus=true],[autofocus]"
|
|
1890
|
+
) || // We have to fallback to the first focusable element otherwise portaled
|
|
1891
|
+
// dialogs with preserveTabOrder set to true will not receive focus
|
|
1892
|
+
// properly because the elements aren't tabbable until the dialog receives
|
|
1893
|
+
// focus.
|
|
1894
|
+
oo(T, !0, a && B) || // Finally, we fallback to the dialog element itself.
|
|
1895
|
+
T, F = ot(P);
|
|
1896
|
+
We(F ? P : null) && (ae(!0), queueMicrotask(() => {
|
|
1897
|
+
P.focus(), _n && F && P.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
1898
|
+
}));
|
|
1899
|
+
}, [
|
|
1900
|
+
y,
|
|
1901
|
+
q,
|
|
1902
|
+
A,
|
|
1903
|
+
T,
|
|
1904
|
+
x,
|
|
1905
|
+
a,
|
|
1906
|
+
B,
|
|
1907
|
+
We
|
|
1908
|
+
]);
|
|
1909
|
+
const te = !!h, xe = rt(h), [je, Ee] = le(!1);
|
|
1910
|
+
U(() => {
|
|
1911
|
+
if (y)
|
|
1912
|
+
return Ee(!0), () => Ee(!1);
|
|
1913
|
+
}, [y]);
|
|
1914
|
+
const Le = st(
|
|
1915
|
+
(P, F = !0) => {
|
|
1916
|
+
const { disclosureElement: X } = S.getState();
|
|
1917
|
+
if (pi(P)) return;
|
|
1918
|
+
let N = Cn(w) || X;
|
|
1919
|
+
if (N != null && N.id) {
|
|
1920
|
+
const ve = G(N), tt = `[aria-activedescendant="${N.id}"]`, mt = ve.querySelector(tt);
|
|
1921
|
+
mt && (N = mt);
|
|
1922
|
+
}
|
|
1923
|
+
if (N && !ot(N)) {
|
|
1924
|
+
const ve = N.closest("[data-dialog]");
|
|
1925
|
+
if (ve != null && ve.id) {
|
|
1926
|
+
const tt = G(ve), mt = `[aria-controls~="${ve.id}"]`, pn = tt.querySelector(mt);
|
|
1927
|
+
pn && (N = pn);
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
const ne = N && ot(N);
|
|
1931
|
+
if (!ne && F) {
|
|
1932
|
+
requestAnimationFrame(() => Le(P, !1));
|
|
1933
|
+
return;
|
|
1934
|
+
}
|
|
1935
|
+
xe(ne ? N : null) && ne && (N == null || N.focus({ preventScroll: !0 }));
|
|
1936
|
+
},
|
|
1937
|
+
[S, w, xe]
|
|
1938
|
+
), ge = Y(!1);
|
|
1939
|
+
z(() => {
|
|
1940
|
+
if (y || !je || !te) return;
|
|
1941
|
+
const P = O.current;
|
|
1942
|
+
ge.current = !0, Le(P);
|
|
1943
|
+
}, [y, je, A, te, Le]), U(() => {
|
|
1944
|
+
if (!je || !te) return;
|
|
1945
|
+
const P = O.current;
|
|
1946
|
+
return () => {
|
|
1947
|
+
if (ge.current) {
|
|
1948
|
+
ge.current = !1;
|
|
1949
|
+
return;
|
|
1950
|
+
}
|
|
1951
|
+
Le(P);
|
|
1952
|
+
};
|
|
1953
|
+
}, [je, te, Le]);
|
|
1954
|
+
const lt = rt(m);
|
|
1955
|
+
U(() => !A || !D ? void 0 : Zt("keydown", (F) => {
|
|
1956
|
+
if (F.key !== "Escape" || F.defaultPrevented) return;
|
|
1957
|
+
const X = O.current;
|
|
1958
|
+
if (!X || on(X)) return;
|
|
1959
|
+
const N = F.target;
|
|
1960
|
+
if (!N) return;
|
|
1961
|
+
const { disclosureElement: ne } = S.getState();
|
|
1962
|
+
!!(N.tagName === "BODY" || de(X, N) || !ne || de(ne, N)) && lt(F) && S.hide();
|
|
1963
|
+
}, !0), [S, A, D, lt]), g = fe(
|
|
1964
|
+
g,
|
|
1965
|
+
(P) => /* @__PURE__ */ H(jo, { level: l ? 1 : void 0, children: P }),
|
|
1966
|
+
[l]
|
|
1967
|
+
);
|
|
1968
|
+
const ft = g.hidden, Me = g.alwaysVisible;
|
|
1969
|
+
g = fe(
|
|
1970
|
+
g,
|
|
1971
|
+
(P) => u ? /* @__PURE__ */ ht(yt, { children: [
|
|
1972
|
+
/* @__PURE__ */ H(
|
|
1973
|
+
di,
|
|
1974
|
+
{
|
|
1975
|
+
store: S,
|
|
1976
|
+
backdrop: u,
|
|
1977
|
+
hidden: ft,
|
|
1978
|
+
alwaysVisible: Me
|
|
1979
|
+
}
|
|
1980
|
+
),
|
|
1981
|
+
P
|
|
1982
|
+
] }) : P,
|
|
1983
|
+
[S, u, ft, Me]
|
|
1984
|
+
);
|
|
1985
|
+
const [ze, dt] = le(), [Ke, qe] = le();
|
|
1986
|
+
return g = fe(
|
|
1987
|
+
g,
|
|
1988
|
+
(P) => /* @__PURE__ */ H(Vn, { value: S, children: /* @__PURE__ */ H(kr.Provider, { value: dt, children: /* @__PURE__ */ H($r.Provider, { value: qe, children: P }) }) }),
|
|
1989
|
+
[S]
|
|
1990
|
+
), g = W(C({
|
|
1991
|
+
id: L,
|
|
1992
|
+
"data-dialog": "",
|
|
1993
|
+
role: "dialog",
|
|
1994
|
+
tabIndex: c ? -1 : void 0,
|
|
1995
|
+
"aria-labelledby": ze,
|
|
1996
|
+
"aria-describedby": Ke
|
|
1997
|
+
}, g), {
|
|
1998
|
+
ref: Be(O, g.ref)
|
|
1999
|
+
}), g = ir(W(C({}, g), {
|
|
2000
|
+
autoFocusOnShow: et
|
|
2001
|
+
})), g = tn(C({ store: S }, g)), g = jn(W(C({}, g), { focusable: c })), g = or(W(C({ portal: a }, g), { portalRef: $, preserveTabOrder: B })), g;
|
|
2002
|
+
});
|
|
2003
|
+
function fr(e, t = Pt) {
|
|
2004
|
+
return K(function(n) {
|
|
2005
|
+
const o = t(), s = n.store || o;
|
|
2006
|
+
return he(
|
|
2007
|
+
s,
|
|
2008
|
+
(l) => !n.unmountOnHide || (l == null ? void 0 : l.mounted) || !!n.open
|
|
2009
|
+
) ? /* @__PURE__ */ H(e, C({}, n)) : null;
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
fr(
|
|
2013
|
+
K(function(t) {
|
|
2014
|
+
const r = lr(t);
|
|
2015
|
+
return Q(mi, r);
|
|
2016
|
+
}),
|
|
2017
|
+
Pt
|
|
2018
|
+
);
|
|
2019
|
+
const Ce = Math.min, oe = Math.max, Et = Math.round, vt = Math.floor, ye = (e) => ({
|
|
2020
|
+
x: e,
|
|
2021
|
+
y: e
|
|
2022
|
+
}), gi = {
|
|
2023
|
+
left: "right",
|
|
2024
|
+
right: "left",
|
|
2025
|
+
bottom: "top",
|
|
2026
|
+
top: "bottom"
|
|
2027
|
+
}, vi = {
|
|
2028
|
+
start: "end",
|
|
2029
|
+
end: "start"
|
|
2030
|
+
};
|
|
2031
|
+
function jt(e, t, r) {
|
|
2032
|
+
return oe(e, Ce(t, r));
|
|
2033
|
+
}
|
|
2034
|
+
function Re(e, t) {
|
|
2035
|
+
return typeof e == "function" ? e(t) : e;
|
|
2036
|
+
}
|
|
2037
|
+
function Ae(e) {
|
|
2038
|
+
return e.split("-")[0];
|
|
2039
|
+
}
|
|
2040
|
+
function Ze(e) {
|
|
2041
|
+
return e.split("-")[1];
|
|
2042
|
+
}
|
|
2043
|
+
function sn(e) {
|
|
2044
|
+
return e === "x" ? "y" : "x";
|
|
2045
|
+
}
|
|
2046
|
+
function an(e) {
|
|
2047
|
+
return e === "y" ? "height" : "width";
|
|
2048
|
+
}
|
|
2049
|
+
function Pe(e) {
|
|
2050
|
+
return ["top", "bottom"].includes(Ae(e)) ? "y" : "x";
|
|
2051
|
+
}
|
|
2052
|
+
function cn(e) {
|
|
2053
|
+
return sn(Pe(e));
|
|
2054
|
+
}
|
|
2055
|
+
function hi(e, t, r) {
|
|
2056
|
+
r === void 0 && (r = !1);
|
|
2057
|
+
const n = Ze(e), o = cn(e), s = an(o);
|
|
2058
|
+
let c = o === "x" ? n === (r ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
2059
|
+
return t.reference[s] > t.floating[s] && (c = St(c)), [c, St(c)];
|
|
2060
|
+
}
|
|
2061
|
+
function yi(e) {
|
|
2062
|
+
const t = St(e);
|
|
2063
|
+
return [zt(e), t, zt(t)];
|
|
2064
|
+
}
|
|
2065
|
+
function zt(e) {
|
|
2066
|
+
return e.replace(/start|end/g, (t) => vi[t]);
|
|
2067
|
+
}
|
|
2068
|
+
function wi(e, t, r) {
|
|
2069
|
+
const n = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], c = ["bottom", "top"];
|
|
2070
|
+
switch (e) {
|
|
2071
|
+
case "top":
|
|
2072
|
+
case "bottom":
|
|
2073
|
+
return r ? t ? o : n : t ? n : o;
|
|
2074
|
+
case "left":
|
|
2075
|
+
case "right":
|
|
2076
|
+
return t ? s : c;
|
|
2077
|
+
default:
|
|
2078
|
+
return [];
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
function bi(e, t, r, n) {
|
|
2082
|
+
const o = Ze(e);
|
|
2083
|
+
let s = wi(Ae(e), r === "start", n);
|
|
2084
|
+
return o && (s = s.map((c) => c + "-" + o), t && (s = s.concat(s.map(zt)))), s;
|
|
2085
|
+
}
|
|
2086
|
+
function St(e) {
|
|
2087
|
+
return e.replace(/left|right|bottom|top/g, (t) => gi[t]);
|
|
2088
|
+
}
|
|
2089
|
+
function xi(e) {
|
|
2090
|
+
return {
|
|
2091
|
+
top: 0,
|
|
2092
|
+
right: 0,
|
|
2093
|
+
bottom: 0,
|
|
2094
|
+
left: 0,
|
|
2095
|
+
...e
|
|
2096
|
+
};
|
|
2097
|
+
}
|
|
2098
|
+
function dr(e) {
|
|
2099
|
+
return typeof e != "number" ? xi(e) : {
|
|
2100
|
+
top: e,
|
|
2101
|
+
right: e,
|
|
2102
|
+
bottom: e,
|
|
2103
|
+
left: e
|
|
2104
|
+
};
|
|
2105
|
+
}
|
|
2106
|
+
function Ot(e) {
|
|
2107
|
+
const {
|
|
2108
|
+
x: t,
|
|
2109
|
+
y: r,
|
|
2110
|
+
width: n,
|
|
2111
|
+
height: o
|
|
2112
|
+
} = e;
|
|
2113
|
+
return {
|
|
2114
|
+
width: n,
|
|
2115
|
+
height: o,
|
|
2116
|
+
top: r,
|
|
2117
|
+
left: t,
|
|
2118
|
+
right: t + n,
|
|
2119
|
+
bottom: r + o,
|
|
2120
|
+
x: t,
|
|
2121
|
+
y: r
|
|
2122
|
+
};
|
|
2123
|
+
}
|
|
2124
|
+
function Rn(e, t, r) {
|
|
2125
|
+
let {
|
|
2126
|
+
reference: n,
|
|
2127
|
+
floating: o
|
|
2128
|
+
} = e;
|
|
2129
|
+
const s = Pe(t), c = cn(t), l = an(c), a = Ae(t), u = s === "y", m = n.x + n.width / 2 - o.width / 2, f = n.y + n.height / 2 - o.height / 2, i = n[l] / 2 - o[l] / 2;
|
|
2130
|
+
let d;
|
|
2131
|
+
switch (a) {
|
|
2132
|
+
case "top":
|
|
2133
|
+
d = {
|
|
2134
|
+
x: m,
|
|
2135
|
+
y: n.y - o.height
|
|
2136
|
+
};
|
|
2137
|
+
break;
|
|
2138
|
+
case "bottom":
|
|
2139
|
+
d = {
|
|
2140
|
+
x: m,
|
|
2141
|
+
y: n.y + n.height
|
|
2142
|
+
};
|
|
2143
|
+
break;
|
|
2144
|
+
case "right":
|
|
2145
|
+
d = {
|
|
2146
|
+
x: n.x + n.width,
|
|
2147
|
+
y: f
|
|
2148
|
+
};
|
|
2149
|
+
break;
|
|
2150
|
+
case "left":
|
|
2151
|
+
d = {
|
|
2152
|
+
x: n.x - o.width,
|
|
2153
|
+
y: f
|
|
2154
|
+
};
|
|
2155
|
+
break;
|
|
2156
|
+
default:
|
|
2157
|
+
d = {
|
|
2158
|
+
x: n.x,
|
|
2159
|
+
y: n.y
|
|
2160
|
+
};
|
|
2161
|
+
}
|
|
2162
|
+
switch (Ze(t)) {
|
|
2163
|
+
case "start":
|
|
2164
|
+
d[c] -= i * (r && u ? -1 : 1);
|
|
2165
|
+
break;
|
|
2166
|
+
case "end":
|
|
2167
|
+
d[c] += i * (r && u ? -1 : 1);
|
|
2168
|
+
break;
|
|
2169
|
+
}
|
|
2170
|
+
return d;
|
|
2171
|
+
}
|
|
2172
|
+
const Ei = async (e, t, r) => {
|
|
2173
|
+
const {
|
|
2174
|
+
placement: n = "bottom",
|
|
2175
|
+
strategy: o = "absolute",
|
|
2176
|
+
middleware: s = [],
|
|
2177
|
+
platform: c
|
|
2178
|
+
} = r, l = s.filter(Boolean), a = await (c.isRTL == null ? void 0 : c.isRTL(t));
|
|
2179
|
+
let u = await c.getElementRects({
|
|
2180
|
+
reference: e,
|
|
2181
|
+
floating: t,
|
|
2182
|
+
strategy: o
|
|
2183
|
+
}), {
|
|
2184
|
+
x: m,
|
|
2185
|
+
y: f
|
|
2186
|
+
} = Rn(u, n, a), i = n, d = {}, p = 0;
|
|
2187
|
+
for (let h = 0; h < l.length; h++) {
|
|
2188
|
+
const {
|
|
2189
|
+
name: x,
|
|
2190
|
+
fn: w
|
|
2191
|
+
} = l[h], {
|
|
2192
|
+
x: b,
|
|
2193
|
+
y: E,
|
|
2194
|
+
data: g,
|
|
2195
|
+
reset: v
|
|
2196
|
+
} = await w({
|
|
2197
|
+
x: m,
|
|
2198
|
+
y: f,
|
|
2199
|
+
initialPlacement: n,
|
|
2200
|
+
placement: i,
|
|
2201
|
+
strategy: o,
|
|
2202
|
+
middlewareData: d,
|
|
2203
|
+
rects: u,
|
|
2204
|
+
platform: c,
|
|
2205
|
+
elements: {
|
|
2206
|
+
reference: e,
|
|
2207
|
+
floating: t
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
m = b ?? m, f = E ?? f, d = {
|
|
2211
|
+
...d,
|
|
2212
|
+
[x]: {
|
|
2213
|
+
...d[x],
|
|
2214
|
+
...g
|
|
2215
|
+
}
|
|
2216
|
+
}, v && p <= 50 && (p++, typeof v == "object" && (v.placement && (i = v.placement), v.rects && (u = v.rects === !0 ? await c.getElementRects({
|
|
2217
|
+
reference: e,
|
|
2218
|
+
floating: t,
|
|
2219
|
+
strategy: o
|
|
2220
|
+
}) : v.rects), {
|
|
2221
|
+
x: m,
|
|
2222
|
+
y: f
|
|
2223
|
+
} = Rn(u, i, a)), h = -1);
|
|
2224
|
+
}
|
|
2225
|
+
return {
|
|
2226
|
+
x: m,
|
|
2227
|
+
y: f,
|
|
2228
|
+
placement: i,
|
|
2229
|
+
strategy: o,
|
|
2230
|
+
middlewareData: d
|
|
2231
|
+
};
|
|
2232
|
+
};
|
|
2233
|
+
async function un(e, t) {
|
|
2234
|
+
var r;
|
|
2235
|
+
t === void 0 && (t = {});
|
|
2236
|
+
const {
|
|
2237
|
+
x: n,
|
|
2238
|
+
y: o,
|
|
2239
|
+
platform: s,
|
|
2240
|
+
rects: c,
|
|
2241
|
+
elements: l,
|
|
2242
|
+
strategy: a
|
|
2243
|
+
} = e, {
|
|
2244
|
+
boundary: u = "clippingAncestors",
|
|
2245
|
+
rootBoundary: m = "viewport",
|
|
2246
|
+
elementContext: f = "floating",
|
|
2247
|
+
altBoundary: i = !1,
|
|
2248
|
+
padding: d = 0
|
|
2249
|
+
} = Re(t, e), p = dr(d), x = l[i ? f === "floating" ? "reference" : "floating" : f], w = Ot(await s.getClippingRect({
|
|
2250
|
+
element: (r = await (s.isElement == null ? void 0 : s.isElement(x))) == null || r ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
2251
|
+
boundary: u,
|
|
2252
|
+
rootBoundary: m,
|
|
2253
|
+
strategy: a
|
|
2254
|
+
})), b = f === "floating" ? {
|
|
2255
|
+
x: n,
|
|
2256
|
+
y: o,
|
|
2257
|
+
width: c.floating.width,
|
|
2258
|
+
height: c.floating.height
|
|
2259
|
+
} : c.reference, E = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), g = await (s.isElement == null ? void 0 : s.isElement(E)) ? await (s.getScale == null ? void 0 : s.getScale(E)) || {
|
|
2260
|
+
x: 1,
|
|
2261
|
+
y: 1
|
|
2262
|
+
} : {
|
|
2263
|
+
x: 1,
|
|
2264
|
+
y: 1
|
|
2265
|
+
}, v = Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2266
|
+
elements: l,
|
|
2267
|
+
rect: b,
|
|
2268
|
+
offsetParent: E,
|
|
2269
|
+
strategy: a
|
|
2270
|
+
}) : b);
|
|
2271
|
+
return {
|
|
2272
|
+
top: (w.top - v.top + p.top) / g.y,
|
|
2273
|
+
bottom: (v.bottom - w.bottom + p.bottom) / g.y,
|
|
2274
|
+
left: (w.left - v.left + p.left) / g.x,
|
|
2275
|
+
right: (v.right - w.right + p.right) / g.x
|
|
2276
|
+
};
|
|
2277
|
+
}
|
|
2278
|
+
const Si = (e) => ({
|
|
2279
|
+
name: "arrow",
|
|
2280
|
+
options: e,
|
|
2281
|
+
async fn(t) {
|
|
2282
|
+
const {
|
|
2283
|
+
x: r,
|
|
2284
|
+
y: n,
|
|
2285
|
+
placement: o,
|
|
2286
|
+
rects: s,
|
|
2287
|
+
platform: c,
|
|
2288
|
+
elements: l,
|
|
2289
|
+
middlewareData: a
|
|
2290
|
+
} = t, {
|
|
2291
|
+
element: u,
|
|
2292
|
+
padding: m = 0
|
|
2293
|
+
} = Re(e, t) || {};
|
|
2294
|
+
if (u == null)
|
|
2295
|
+
return {};
|
|
2296
|
+
const f = dr(m), i = {
|
|
2297
|
+
x: r,
|
|
2298
|
+
y: n
|
|
2299
|
+
}, d = cn(o), p = an(d), h = await c.getDimensions(u), x = d === "y", w = x ? "top" : "left", b = x ? "bottom" : "right", E = x ? "clientHeight" : "clientWidth", g = s.reference[p] + s.reference[d] - i[d] - s.floating[p], v = i[d] - s.reference[d], O = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(u));
|
|
2300
|
+
let S = O ? O[E] : 0;
|
|
2301
|
+
(!S || !await (c.isElement == null ? void 0 : c.isElement(O))) && (S = l.floating[E] || s.floating[p]);
|
|
2302
|
+
const $ = g / 2 - v / 2, A = S / 2 - h[p] / 2 - 1, R = Ce(f[w], A), B = Ce(f[b], A), L = R, y = S - h[p] - B, D = S / 2 - h[p] / 2 + $, T = jt(L, D, y), M = !a.arrow && Ze(o) != null && D !== T && s.reference[p] / 2 - (D < L ? R : B) - h[p] / 2 < 0, I = M ? D < L ? D - L : D - y : 0;
|
|
2303
|
+
return {
|
|
2304
|
+
[d]: i[d] + I,
|
|
2305
|
+
data: {
|
|
2306
|
+
[d]: T,
|
|
2307
|
+
centerOffset: D - T - I,
|
|
2308
|
+
...M && {
|
|
2309
|
+
alignmentOffset: I
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
reset: M
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
}), Oi = function(e) {
|
|
2316
|
+
return e === void 0 && (e = {}), {
|
|
2317
|
+
name: "flip",
|
|
2318
|
+
options: e,
|
|
2319
|
+
async fn(t) {
|
|
2320
|
+
var r, n;
|
|
2321
|
+
const {
|
|
2322
|
+
placement: o,
|
|
2323
|
+
middlewareData: s,
|
|
2324
|
+
rects: c,
|
|
2325
|
+
initialPlacement: l,
|
|
2326
|
+
platform: a,
|
|
2327
|
+
elements: u
|
|
2328
|
+
} = t, {
|
|
2329
|
+
mainAxis: m = !0,
|
|
2330
|
+
crossAxis: f = !0,
|
|
2331
|
+
fallbackPlacements: i,
|
|
2332
|
+
fallbackStrategy: d = "bestFit",
|
|
2333
|
+
fallbackAxisSideDirection: p = "none",
|
|
2334
|
+
flipAlignment: h = !0,
|
|
2335
|
+
...x
|
|
2336
|
+
} = Re(e, t);
|
|
2337
|
+
if ((r = s.arrow) != null && r.alignmentOffset)
|
|
2338
|
+
return {};
|
|
2339
|
+
const w = Ae(o), b = Pe(l), E = Ae(l) === l, g = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), v = i || (E || !h ? [St(l)] : yi(l)), O = p !== "none";
|
|
2340
|
+
!i && O && v.push(...bi(l, h, p, g));
|
|
2341
|
+
const S = [l, ...v], $ = await un(t, x), A = [];
|
|
2342
|
+
let R = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
2343
|
+
if (m && A.push($[w]), f) {
|
|
2344
|
+
const T = hi(o, c, g);
|
|
2345
|
+
A.push($[T[0]], $[T[1]]);
|
|
2346
|
+
}
|
|
2347
|
+
if (R = [...R, {
|
|
2348
|
+
placement: o,
|
|
2349
|
+
overflows: A
|
|
2350
|
+
}], !A.every((T) => T <= 0)) {
|
|
2351
|
+
var B, L;
|
|
2352
|
+
const T = (((B = s.flip) == null ? void 0 : B.index) || 0) + 1, M = S[T];
|
|
2353
|
+
if (M) {
|
|
2354
|
+
var y;
|
|
2355
|
+
const V = f === "alignment" ? b !== Pe(M) : !1, _ = ((y = R[0]) == null ? void 0 : y.overflows[0]) > 0;
|
|
2356
|
+
if (!V || _)
|
|
2357
|
+
return {
|
|
2358
|
+
data: {
|
|
2359
|
+
index: T,
|
|
2360
|
+
overflows: R
|
|
2361
|
+
},
|
|
2362
|
+
reset: {
|
|
2363
|
+
placement: M
|
|
2364
|
+
}
|
|
2365
|
+
};
|
|
2366
|
+
}
|
|
2367
|
+
let I = (L = R.filter((V) => V.overflows[0] <= 0).sort((V, _) => V.overflows[1] - _.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
2368
|
+
if (!I)
|
|
2369
|
+
switch (d) {
|
|
2370
|
+
case "bestFit": {
|
|
2371
|
+
var D;
|
|
2372
|
+
const V = (D = R.filter((_) => {
|
|
2373
|
+
if (O) {
|
|
2374
|
+
const k = Pe(_.placement);
|
|
2375
|
+
return k === b || // Create a bias to the `y` side axis due to horizontal
|
|
2376
|
+
// reading directions favoring greater width.
|
|
2377
|
+
k === "y";
|
|
2378
|
+
}
|
|
2379
|
+
return !0;
|
|
2380
|
+
}).map((_) => [_.placement, _.overflows.filter((k) => k > 0).reduce((k, q) => k + q, 0)]).sort((_, k) => _[1] - k[1])[0]) == null ? void 0 : D[0];
|
|
2381
|
+
V && (I = V);
|
|
2382
|
+
break;
|
|
2383
|
+
}
|
|
2384
|
+
case "initialPlacement":
|
|
2385
|
+
I = l;
|
|
2386
|
+
break;
|
|
2387
|
+
}
|
|
2388
|
+
if (o !== I)
|
|
2389
|
+
return {
|
|
2390
|
+
reset: {
|
|
2391
|
+
placement: I
|
|
2392
|
+
}
|
|
2393
|
+
};
|
|
2394
|
+
}
|
|
2395
|
+
return {};
|
|
2396
|
+
}
|
|
2397
|
+
};
|
|
2398
|
+
};
|
|
2399
|
+
async function Pi(e, t) {
|
|
2400
|
+
const {
|
|
2401
|
+
placement: r,
|
|
2402
|
+
platform: n,
|
|
2403
|
+
elements: o
|
|
2404
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), c = Ae(r), l = Ze(r), a = Pe(r) === "y", u = ["left", "top"].includes(c) ? -1 : 1, m = s && a ? -1 : 1, f = Re(t, e);
|
|
2405
|
+
let {
|
|
2406
|
+
mainAxis: i,
|
|
2407
|
+
crossAxis: d,
|
|
2408
|
+
alignmentAxis: p
|
|
2409
|
+
} = typeof f == "number" ? {
|
|
2410
|
+
mainAxis: f,
|
|
2411
|
+
crossAxis: 0,
|
|
2412
|
+
alignmentAxis: null
|
|
2413
|
+
} : {
|
|
2414
|
+
mainAxis: f.mainAxis || 0,
|
|
2415
|
+
crossAxis: f.crossAxis || 0,
|
|
2416
|
+
alignmentAxis: f.alignmentAxis
|
|
2417
|
+
};
|
|
2418
|
+
return l && typeof p == "number" && (d = l === "end" ? p * -1 : p), a ? {
|
|
2419
|
+
x: d * m,
|
|
2420
|
+
y: i * u
|
|
2421
|
+
} : {
|
|
2422
|
+
x: i * u,
|
|
2423
|
+
y: d * m
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
const Di = function(e) {
|
|
2427
|
+
return e === void 0 && (e = 0), {
|
|
2428
|
+
name: "offset",
|
|
2429
|
+
options: e,
|
|
2430
|
+
async fn(t) {
|
|
2431
|
+
var r, n;
|
|
2432
|
+
const {
|
|
2433
|
+
x: o,
|
|
2434
|
+
y: s,
|
|
2435
|
+
placement: c,
|
|
2436
|
+
middlewareData: l
|
|
2437
|
+
} = t, a = await Pi(t, e);
|
|
2438
|
+
return c === ((r = l.offset) == null ? void 0 : r.placement) && (n = l.arrow) != null && n.alignmentOffset ? {} : {
|
|
2439
|
+
x: o + a.x,
|
|
2440
|
+
y: s + a.y,
|
|
2441
|
+
data: {
|
|
2442
|
+
...a,
|
|
2443
|
+
placement: c
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
};
|
|
2448
|
+
}, Ai = function(e) {
|
|
2449
|
+
return e === void 0 && (e = {}), {
|
|
2450
|
+
name: "shift",
|
|
2451
|
+
options: e,
|
|
2452
|
+
async fn(t) {
|
|
2453
|
+
const {
|
|
2454
|
+
x: r,
|
|
2455
|
+
y: n,
|
|
2456
|
+
placement: o
|
|
2457
|
+
} = t, {
|
|
2458
|
+
mainAxis: s = !0,
|
|
2459
|
+
crossAxis: c = !1,
|
|
2460
|
+
limiter: l = {
|
|
2461
|
+
fn: (x) => {
|
|
2462
|
+
let {
|
|
2463
|
+
x: w,
|
|
2464
|
+
y: b
|
|
2465
|
+
} = x;
|
|
2466
|
+
return {
|
|
2467
|
+
x: w,
|
|
2468
|
+
y: b
|
|
2469
|
+
};
|
|
2470
|
+
}
|
|
2471
|
+
},
|
|
2472
|
+
...a
|
|
2473
|
+
} = Re(e, t), u = {
|
|
2474
|
+
x: r,
|
|
2475
|
+
y: n
|
|
2476
|
+
}, m = await un(t, a), f = Pe(Ae(o)), i = sn(f);
|
|
2477
|
+
let d = u[i], p = u[f];
|
|
2478
|
+
if (s) {
|
|
2479
|
+
const x = i === "y" ? "top" : "left", w = i === "y" ? "bottom" : "right", b = d + m[x], E = d - m[w];
|
|
2480
|
+
d = jt(b, d, E);
|
|
2481
|
+
}
|
|
2482
|
+
if (c) {
|
|
2483
|
+
const x = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", b = p + m[x], E = p - m[w];
|
|
2484
|
+
p = jt(b, p, E);
|
|
2485
|
+
}
|
|
2486
|
+
const h = l.fn({
|
|
2487
|
+
...t,
|
|
2488
|
+
[i]: d,
|
|
2489
|
+
[f]: p
|
|
2490
|
+
});
|
|
2491
|
+
return {
|
|
2492
|
+
...h,
|
|
2493
|
+
data: {
|
|
2494
|
+
x: h.x - r,
|
|
2495
|
+
y: h.y - n,
|
|
2496
|
+
enabled: {
|
|
2497
|
+
[i]: s,
|
|
2498
|
+
[f]: c
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
};
|
|
2504
|
+
}, Ti = function(e) {
|
|
2505
|
+
return e === void 0 && (e = {}), {
|
|
2506
|
+
options: e,
|
|
2507
|
+
fn(t) {
|
|
2508
|
+
const {
|
|
2509
|
+
x: r,
|
|
2510
|
+
y: n,
|
|
2511
|
+
placement: o,
|
|
2512
|
+
rects: s,
|
|
2513
|
+
middlewareData: c
|
|
2514
|
+
} = t, {
|
|
2515
|
+
offset: l = 0,
|
|
2516
|
+
mainAxis: a = !0,
|
|
2517
|
+
crossAxis: u = !0
|
|
2518
|
+
} = Re(e, t), m = {
|
|
2519
|
+
x: r,
|
|
2520
|
+
y: n
|
|
2521
|
+
}, f = Pe(o), i = sn(f);
|
|
2522
|
+
let d = m[i], p = m[f];
|
|
2523
|
+
const h = Re(l, t), x = typeof h == "number" ? {
|
|
2524
|
+
mainAxis: h,
|
|
2525
|
+
crossAxis: 0
|
|
2526
|
+
} : {
|
|
2527
|
+
mainAxis: 0,
|
|
2528
|
+
crossAxis: 0,
|
|
2529
|
+
...h
|
|
2530
|
+
};
|
|
2531
|
+
if (a) {
|
|
2532
|
+
const E = i === "y" ? "height" : "width", g = s.reference[i] - s.floating[E] + x.mainAxis, v = s.reference[i] + s.reference[E] - x.mainAxis;
|
|
2533
|
+
d < g ? d = g : d > v && (d = v);
|
|
2534
|
+
}
|
|
2535
|
+
if (u) {
|
|
2536
|
+
var w, b;
|
|
2537
|
+
const E = i === "y" ? "width" : "height", g = ["top", "left"].includes(Ae(o)), v = s.reference[f] - s.floating[E] + (g && ((w = c.offset) == null ? void 0 : w[f]) || 0) + (g ? 0 : x.crossAxis), O = s.reference[f] + s.reference[E] + (g ? 0 : ((b = c.offset) == null ? void 0 : b[f]) || 0) - (g ? x.crossAxis : 0);
|
|
2538
|
+
p < v ? p = v : p > O && (p = O);
|
|
2539
|
+
}
|
|
2540
|
+
return {
|
|
2541
|
+
[i]: d,
|
|
2542
|
+
[f]: p
|
|
2543
|
+
};
|
|
2544
|
+
}
|
|
2545
|
+
};
|
|
2546
|
+
}, _i = function(e) {
|
|
2547
|
+
return e === void 0 && (e = {}), {
|
|
2548
|
+
name: "size",
|
|
2549
|
+
options: e,
|
|
2550
|
+
async fn(t) {
|
|
2551
|
+
var r, n;
|
|
2552
|
+
const {
|
|
2553
|
+
placement: o,
|
|
2554
|
+
rects: s,
|
|
2555
|
+
platform: c,
|
|
2556
|
+
elements: l
|
|
2557
|
+
} = t, {
|
|
2558
|
+
apply: a = () => {
|
|
2559
|
+
},
|
|
2560
|
+
...u
|
|
2561
|
+
} = Re(e, t), m = await un(t, u), f = Ae(o), i = Ze(o), d = Pe(o) === "y", {
|
|
2562
|
+
width: p,
|
|
2563
|
+
height: h
|
|
2564
|
+
} = s.floating;
|
|
2565
|
+
let x, w;
|
|
2566
|
+
f === "top" || f === "bottom" ? (x = f, w = i === (await (c.isRTL == null ? void 0 : c.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = f, x = i === "end" ? "top" : "bottom");
|
|
2567
|
+
const b = h - m.top - m.bottom, E = p - m.left - m.right, g = Ce(h - m[x], b), v = Ce(p - m[w], E), O = !t.middlewareData.shift;
|
|
2568
|
+
let S = g, $ = v;
|
|
2569
|
+
if ((r = t.middlewareData.shift) != null && r.enabled.x && ($ = E), (n = t.middlewareData.shift) != null && n.enabled.y && (S = b), O && !i) {
|
|
2570
|
+
const R = oe(m.left, 0), B = oe(m.right, 0), L = oe(m.top, 0), y = oe(m.bottom, 0);
|
|
2571
|
+
d ? $ = p - 2 * (R !== 0 || B !== 0 ? R + B : oe(m.left, m.right)) : S = h - 2 * (L !== 0 || y !== 0 ? L + y : oe(m.top, m.bottom));
|
|
2572
|
+
}
|
|
2573
|
+
await a({
|
|
2574
|
+
...t,
|
|
2575
|
+
availableWidth: $,
|
|
2576
|
+
availableHeight: S
|
|
2577
|
+
});
|
|
2578
|
+
const A = await c.getDimensions(l.floating);
|
|
2579
|
+
return p !== A.width || h !== A.height ? {
|
|
2580
|
+
reset: {
|
|
2581
|
+
rects: !0
|
|
2582
|
+
}
|
|
2583
|
+
} : {};
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
};
|
|
2587
|
+
function At() {
|
|
2588
|
+
return typeof window < "u";
|
|
2589
|
+
}
|
|
2590
|
+
function Qe(e) {
|
|
2591
|
+
return mr(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
2592
|
+
}
|
|
2593
|
+
function ie(e) {
|
|
2594
|
+
var t;
|
|
2595
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
2596
|
+
}
|
|
2597
|
+
function be(e) {
|
|
2598
|
+
var t;
|
|
2599
|
+
return (t = (mr(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
2600
|
+
}
|
|
2601
|
+
function mr(e) {
|
|
2602
|
+
return At() ? e instanceof Node || e instanceof ie(e).Node : !1;
|
|
2603
|
+
}
|
|
2604
|
+
function me(e) {
|
|
2605
|
+
return At() ? e instanceof Element || e instanceof ie(e).Element : !1;
|
|
2606
|
+
}
|
|
2607
|
+
function we(e) {
|
|
2608
|
+
return At() ? e instanceof HTMLElement || e instanceof ie(e).HTMLElement : !1;
|
|
2609
|
+
}
|
|
2610
|
+
function In(e) {
|
|
2611
|
+
return !At() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ie(e).ShadowRoot;
|
|
2612
|
+
}
|
|
2613
|
+
function ut(e) {
|
|
2614
|
+
const {
|
|
2615
|
+
overflow: t,
|
|
2616
|
+
overflowX: r,
|
|
2617
|
+
overflowY: n,
|
|
2618
|
+
display: o
|
|
2619
|
+
} = pe(e);
|
|
2620
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + n + r) && !["inline", "contents"].includes(o);
|
|
2621
|
+
}
|
|
2622
|
+
function Ci(e) {
|
|
2623
|
+
return ["table", "td", "th"].includes(Qe(e));
|
|
2624
|
+
}
|
|
2625
|
+
function Tt(e) {
|
|
2626
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
2627
|
+
try {
|
|
2628
|
+
return e.matches(t);
|
|
2629
|
+
} catch {
|
|
2630
|
+
return !1;
|
|
2631
|
+
}
|
|
2632
|
+
});
|
|
2633
|
+
}
|
|
2634
|
+
function ln(e) {
|
|
2635
|
+
const t = fn(), r = me(e) ? pe(e) : e;
|
|
2636
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => r[n] ? r[n] !== "none" : !1) || (r.containerType ? r.containerType !== "normal" : !1) || !t && (r.backdropFilter ? r.backdropFilter !== "none" : !1) || !t && (r.filter ? r.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (r.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (r.contain || "").includes(n));
|
|
2637
|
+
}
|
|
2638
|
+
function Ri(e) {
|
|
2639
|
+
let t = Ie(e);
|
|
2640
|
+
for (; we(t) && !Xe(t); ) {
|
|
2641
|
+
if (ln(t))
|
|
2642
|
+
return t;
|
|
2643
|
+
if (Tt(t))
|
|
2644
|
+
return null;
|
|
2645
|
+
t = Ie(t);
|
|
2646
|
+
}
|
|
2647
|
+
return null;
|
|
2648
|
+
}
|
|
2649
|
+
function fn() {
|
|
2650
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
2651
|
+
}
|
|
2652
|
+
function Xe(e) {
|
|
2653
|
+
return ["html", "body", "#document"].includes(Qe(e));
|
|
2654
|
+
}
|
|
2655
|
+
function pe(e) {
|
|
2656
|
+
return ie(e).getComputedStyle(e);
|
|
2657
|
+
}
|
|
2658
|
+
function _t(e) {
|
|
2659
|
+
return me(e) ? {
|
|
2660
|
+
scrollLeft: e.scrollLeft,
|
|
2661
|
+
scrollTop: e.scrollTop
|
|
2662
|
+
} : {
|
|
2663
|
+
scrollLeft: e.scrollX,
|
|
2664
|
+
scrollTop: e.scrollY
|
|
2665
|
+
};
|
|
2666
|
+
}
|
|
2667
|
+
function Ie(e) {
|
|
2668
|
+
if (Qe(e) === "html")
|
|
2669
|
+
return e;
|
|
2670
|
+
const t = (
|
|
2671
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
2672
|
+
e.assignedSlot || // DOM Element detected.
|
|
2673
|
+
e.parentNode || // ShadowRoot detected.
|
|
2674
|
+
In(e) && e.host || // Fallback.
|
|
2675
|
+
be(e)
|
|
2676
|
+
);
|
|
2677
|
+
return In(t) ? t.host : t;
|
|
2678
|
+
}
|
|
2679
|
+
function pr(e) {
|
|
2680
|
+
const t = Ie(e);
|
|
2681
|
+
return Xe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : we(t) && ut(t) ? t : pr(t);
|
|
2682
|
+
}
|
|
2683
|
+
function at(e, t, r) {
|
|
2684
|
+
var n;
|
|
2685
|
+
t === void 0 && (t = []), r === void 0 && (r = !0);
|
|
2686
|
+
const o = pr(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), c = ie(o);
|
|
2687
|
+
if (s) {
|
|
2688
|
+
const l = Kt(c);
|
|
2689
|
+
return t.concat(c, c.visualViewport || [], ut(o) ? o : [], l && r ? at(l) : []);
|
|
2690
|
+
}
|
|
2691
|
+
return t.concat(o, at(o, [], r));
|
|
2692
|
+
}
|
|
2693
|
+
function Kt(e) {
|
|
2694
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
2695
|
+
}
|
|
2696
|
+
function gr(e) {
|
|
2697
|
+
const t = pe(e);
|
|
2698
|
+
let r = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
2699
|
+
const o = we(e), s = o ? e.offsetWidth : r, c = o ? e.offsetHeight : n, l = Et(r) !== s || Et(n) !== c;
|
|
2700
|
+
return l && (r = s, n = c), {
|
|
2701
|
+
width: r,
|
|
2702
|
+
height: n,
|
|
2703
|
+
$: l
|
|
2704
|
+
};
|
|
2705
|
+
}
|
|
2706
|
+
function dn(e) {
|
|
2707
|
+
return me(e) ? e : e.contextElement;
|
|
2708
|
+
}
|
|
2709
|
+
function Ye(e) {
|
|
2710
|
+
const t = dn(e);
|
|
2711
|
+
if (!we(t))
|
|
2712
|
+
return ye(1);
|
|
2713
|
+
const r = t.getBoundingClientRect(), {
|
|
2714
|
+
width: n,
|
|
2715
|
+
height: o,
|
|
2716
|
+
$: s
|
|
2717
|
+
} = gr(t);
|
|
2718
|
+
let c = (s ? Et(r.width) : r.width) / n, l = (s ? Et(r.height) : r.height) / o;
|
|
2719
|
+
return (!c || !Number.isFinite(c)) && (c = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
2720
|
+
x: c,
|
|
2721
|
+
y: l
|
|
2722
|
+
};
|
|
2723
|
+
}
|
|
2724
|
+
const Ii = /* @__PURE__ */ ye(0);
|
|
2725
|
+
function vr(e) {
|
|
2726
|
+
const t = ie(e);
|
|
2727
|
+
return !fn() || !t.visualViewport ? Ii : {
|
|
2728
|
+
x: t.visualViewport.offsetLeft,
|
|
2729
|
+
y: t.visualViewport.offsetTop
|
|
2730
|
+
};
|
|
2731
|
+
}
|
|
2732
|
+
function Fi(e, t, r) {
|
|
2733
|
+
return t === void 0 && (t = !1), !r || t && r !== ie(e) ? !1 : t;
|
|
2734
|
+
}
|
|
2735
|
+
function He(e, t, r, n) {
|
|
2736
|
+
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
2737
|
+
const o = e.getBoundingClientRect(), s = dn(e);
|
|
2738
|
+
let c = ye(1);
|
|
2739
|
+
t && (n ? me(n) && (c = Ye(n)) : c = Ye(e));
|
|
2740
|
+
const l = Fi(s, r, n) ? vr(s) : ye(0);
|
|
2741
|
+
let a = (o.left + l.x) / c.x, u = (o.top + l.y) / c.y, m = o.width / c.x, f = o.height / c.y;
|
|
2742
|
+
if (s) {
|
|
2743
|
+
const i = ie(s), d = n && me(n) ? ie(n) : n;
|
|
2744
|
+
let p = i, h = Kt(p);
|
|
2745
|
+
for (; h && n && d !== p; ) {
|
|
2746
|
+
const x = Ye(h), w = h.getBoundingClientRect(), b = pe(h), E = w.left + (h.clientLeft + parseFloat(b.paddingLeft)) * x.x, g = w.top + (h.clientTop + parseFloat(b.paddingTop)) * x.y;
|
|
2747
|
+
a *= x.x, u *= x.y, m *= x.x, f *= x.y, a += E, u += g, p = ie(h), h = Kt(p);
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
return Ot({
|
|
2751
|
+
width: m,
|
|
2752
|
+
height: f,
|
|
2753
|
+
x: a,
|
|
2754
|
+
y: u
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
function mn(e, t) {
|
|
2758
|
+
const r = _t(e).scrollLeft;
|
|
2759
|
+
return t ? t.left + r : He(be(e)).left + r;
|
|
2760
|
+
}
|
|
2761
|
+
function hr(e, t, r) {
|
|
2762
|
+
r === void 0 && (r = !1);
|
|
2763
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (r ? 0 : (
|
|
2764
|
+
// RTL <body> scrollbar.
|
|
2765
|
+
mn(e, n)
|
|
2766
|
+
)), s = n.top + t.scrollTop;
|
|
2767
|
+
return {
|
|
2768
|
+
x: o,
|
|
2769
|
+
y: s
|
|
2770
|
+
};
|
|
2771
|
+
}
|
|
2772
|
+
function Li(e) {
|
|
2773
|
+
let {
|
|
2774
|
+
elements: t,
|
|
2775
|
+
rect: r,
|
|
2776
|
+
offsetParent: n,
|
|
2777
|
+
strategy: o
|
|
2778
|
+
} = e;
|
|
2779
|
+
const s = o === "fixed", c = be(n), l = t ? Tt(t.floating) : !1;
|
|
2780
|
+
if (n === c || l && s)
|
|
2781
|
+
return r;
|
|
2782
|
+
let a = {
|
|
2783
|
+
scrollLeft: 0,
|
|
2784
|
+
scrollTop: 0
|
|
2785
|
+
}, u = ye(1);
|
|
2786
|
+
const m = ye(0), f = we(n);
|
|
2787
|
+
if ((f || !f && !s) && ((Qe(n) !== "body" || ut(c)) && (a = _t(n)), we(n))) {
|
|
2788
|
+
const d = He(n);
|
|
2789
|
+
u = Ye(n), m.x = d.x + n.clientLeft, m.y = d.y + n.clientTop;
|
|
2790
|
+
}
|
|
2791
|
+
const i = c && !f && !s ? hr(c, a, !0) : ye(0);
|
|
2792
|
+
return {
|
|
2793
|
+
width: r.width * u.x,
|
|
2794
|
+
height: r.height * u.y,
|
|
2795
|
+
x: r.x * u.x - a.scrollLeft * u.x + m.x + i.x,
|
|
2796
|
+
y: r.y * u.y - a.scrollTop * u.y + m.y + i.y
|
|
2797
|
+
};
|
|
2798
|
+
}
|
|
2799
|
+
function Mi(e) {
|
|
2800
|
+
return Array.from(e.getClientRects());
|
|
2801
|
+
}
|
|
2802
|
+
function Ni(e) {
|
|
2803
|
+
const t = be(e), r = _t(e), n = e.ownerDocument.body, o = oe(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = oe(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
2804
|
+
let c = -r.scrollLeft + mn(e);
|
|
2805
|
+
const l = -r.scrollTop;
|
|
2806
|
+
return pe(n).direction === "rtl" && (c += oe(t.clientWidth, n.clientWidth) - o), {
|
|
2807
|
+
width: o,
|
|
2808
|
+
height: s,
|
|
2809
|
+
x: c,
|
|
2810
|
+
y: l
|
|
2811
|
+
};
|
|
2812
|
+
}
|
|
2813
|
+
function ki(e, t) {
|
|
2814
|
+
const r = ie(e), n = be(e), o = r.visualViewport;
|
|
2815
|
+
let s = n.clientWidth, c = n.clientHeight, l = 0, a = 0;
|
|
2816
|
+
if (o) {
|
|
2817
|
+
s = o.width, c = o.height;
|
|
2818
|
+
const u = fn();
|
|
2819
|
+
(!u || u && t === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
|
|
2820
|
+
}
|
|
2821
|
+
return {
|
|
2822
|
+
width: s,
|
|
2823
|
+
height: c,
|
|
2824
|
+
x: l,
|
|
2825
|
+
y: a
|
|
2826
|
+
};
|
|
2827
|
+
}
|
|
2828
|
+
function $i(e, t) {
|
|
2829
|
+
const r = He(e, !0, t === "fixed"), n = r.top + e.clientTop, o = r.left + e.clientLeft, s = we(e) ? Ye(e) : ye(1), c = e.clientWidth * s.x, l = e.clientHeight * s.y, a = o * s.x, u = n * s.y;
|
|
2830
|
+
return {
|
|
2831
|
+
width: c,
|
|
2832
|
+
height: l,
|
|
2833
|
+
x: a,
|
|
2834
|
+
y: u
|
|
2835
|
+
};
|
|
2836
|
+
}
|
|
2837
|
+
function Fn(e, t, r) {
|
|
2838
|
+
let n;
|
|
2839
|
+
if (t === "viewport")
|
|
2840
|
+
n = ki(e, r);
|
|
2841
|
+
else if (t === "document")
|
|
2842
|
+
n = Ni(be(e));
|
|
2843
|
+
else if (me(t))
|
|
2844
|
+
n = $i(t, r);
|
|
2845
|
+
else {
|
|
2846
|
+
const o = vr(e);
|
|
2847
|
+
n = {
|
|
2848
|
+
x: t.x - o.x,
|
|
2849
|
+
y: t.y - o.y,
|
|
2850
|
+
width: t.width,
|
|
2851
|
+
height: t.height
|
|
2852
|
+
};
|
|
2853
|
+
}
|
|
2854
|
+
return Ot(n);
|
|
2855
|
+
}
|
|
2856
|
+
function yr(e, t) {
|
|
2857
|
+
const r = Ie(e);
|
|
2858
|
+
return r === t || !me(r) || Xe(r) ? !1 : pe(r).position === "fixed" || yr(r, t);
|
|
2859
|
+
}
|
|
2860
|
+
function Vi(e, t) {
|
|
2861
|
+
const r = t.get(e);
|
|
2862
|
+
if (r)
|
|
2863
|
+
return r;
|
|
2864
|
+
let n = at(e, [], !1).filter((l) => me(l) && Qe(l) !== "body"), o = null;
|
|
2865
|
+
const s = pe(e).position === "fixed";
|
|
2866
|
+
let c = s ? Ie(e) : e;
|
|
2867
|
+
for (; me(c) && !Xe(c); ) {
|
|
2868
|
+
const l = pe(c), a = ln(c);
|
|
2869
|
+
!a && l.position === "fixed" && (o = null), (s ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ut(c) && !a && yr(e, c)) ? n = n.filter((m) => m !== c) : o = l, c = Ie(c);
|
|
2870
|
+
}
|
|
2871
|
+
return t.set(e, n), n;
|
|
2872
|
+
}
|
|
2873
|
+
function Hi(e) {
|
|
2874
|
+
let {
|
|
2875
|
+
element: t,
|
|
2876
|
+
boundary: r,
|
|
2877
|
+
rootBoundary: n,
|
|
2878
|
+
strategy: o
|
|
2879
|
+
} = e;
|
|
2880
|
+
const c = [...r === "clippingAncestors" ? Tt(t) ? [] : Vi(t, this._c) : [].concat(r), n], l = c[0], a = c.reduce((u, m) => {
|
|
2881
|
+
const f = Fn(t, m, o);
|
|
2882
|
+
return u.top = oe(f.top, u.top), u.right = Ce(f.right, u.right), u.bottom = Ce(f.bottom, u.bottom), u.left = oe(f.left, u.left), u;
|
|
2883
|
+
}, Fn(t, l, o));
|
|
2884
|
+
return {
|
|
2885
|
+
width: a.right - a.left,
|
|
2886
|
+
height: a.bottom - a.top,
|
|
2887
|
+
x: a.left,
|
|
2888
|
+
y: a.top
|
|
2889
|
+
};
|
|
2890
|
+
}
|
|
2891
|
+
function Bi(e) {
|
|
2892
|
+
const {
|
|
2893
|
+
width: t,
|
|
2894
|
+
height: r
|
|
2895
|
+
} = gr(e);
|
|
2896
|
+
return {
|
|
2897
|
+
width: t,
|
|
2898
|
+
height: r
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
function Wi(e, t, r) {
|
|
2902
|
+
const n = we(t), o = be(t), s = r === "fixed", c = He(e, !0, s, t);
|
|
2903
|
+
let l = {
|
|
2904
|
+
scrollLeft: 0,
|
|
2905
|
+
scrollTop: 0
|
|
2906
|
+
};
|
|
2907
|
+
const a = ye(0);
|
|
2908
|
+
function u() {
|
|
2909
|
+
a.x = mn(o);
|
|
2910
|
+
}
|
|
2911
|
+
if (n || !n && !s)
|
|
2912
|
+
if ((Qe(t) !== "body" || ut(o)) && (l = _t(t)), n) {
|
|
2913
|
+
const d = He(t, !0, s, t);
|
|
2914
|
+
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
2915
|
+
} else o && u();
|
|
2916
|
+
s && !n && o && u();
|
|
2917
|
+
const m = o && !n && !s ? hr(o, l) : ye(0), f = c.left + l.scrollLeft - a.x - m.x, i = c.top + l.scrollTop - a.y - m.y;
|
|
2918
|
+
return {
|
|
2919
|
+
x: f,
|
|
2920
|
+
y: i,
|
|
2921
|
+
width: c.width,
|
|
2922
|
+
height: c.height
|
|
2923
|
+
};
|
|
2924
|
+
}
|
|
2925
|
+
function Nt(e) {
|
|
2926
|
+
return pe(e).position === "static";
|
|
2927
|
+
}
|
|
2928
|
+
function Ln(e, t) {
|
|
2929
|
+
if (!we(e) || pe(e).position === "fixed")
|
|
2930
|
+
return null;
|
|
2931
|
+
if (t)
|
|
2932
|
+
return t(e);
|
|
2933
|
+
let r = e.offsetParent;
|
|
2934
|
+
return be(e) === r && (r = r.ownerDocument.body), r;
|
|
2935
|
+
}
|
|
2936
|
+
function wr(e, t) {
|
|
2937
|
+
const r = ie(e);
|
|
2938
|
+
if (Tt(e))
|
|
2939
|
+
return r;
|
|
2940
|
+
if (!we(e)) {
|
|
2941
|
+
let o = Ie(e);
|
|
2942
|
+
for (; o && !Xe(o); ) {
|
|
2943
|
+
if (me(o) && !Nt(o))
|
|
2944
|
+
return o;
|
|
2945
|
+
o = Ie(o);
|
|
2946
|
+
}
|
|
2947
|
+
return r;
|
|
2948
|
+
}
|
|
2949
|
+
let n = Ln(e, t);
|
|
2950
|
+
for (; n && Ci(n) && Nt(n); )
|
|
2951
|
+
n = Ln(n, t);
|
|
2952
|
+
return n && Xe(n) && Nt(n) && !ln(n) ? r : n || Ri(e) || r;
|
|
2953
|
+
}
|
|
2954
|
+
const ji = async function(e) {
|
|
2955
|
+
const t = this.getOffsetParent || wr, r = this.getDimensions, n = await r(e.floating);
|
|
2956
|
+
return {
|
|
2957
|
+
reference: Wi(e.reference, await t(e.floating), e.strategy),
|
|
2958
|
+
floating: {
|
|
2959
|
+
x: 0,
|
|
2960
|
+
y: 0,
|
|
2961
|
+
width: n.width,
|
|
2962
|
+
height: n.height
|
|
2963
|
+
}
|
|
2964
|
+
};
|
|
2965
|
+
};
|
|
2966
|
+
function zi(e) {
|
|
2967
|
+
return pe(e).direction === "rtl";
|
|
2968
|
+
}
|
|
2969
|
+
const Ki = {
|
|
2970
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Li,
|
|
2971
|
+
getDocumentElement: be,
|
|
2972
|
+
getClippingRect: Hi,
|
|
2973
|
+
getOffsetParent: wr,
|
|
2974
|
+
getElementRects: ji,
|
|
2975
|
+
getClientRects: Mi,
|
|
2976
|
+
getDimensions: Bi,
|
|
2977
|
+
getScale: Ye,
|
|
2978
|
+
isElement: me,
|
|
2979
|
+
isRTL: zi
|
|
2980
|
+
};
|
|
2981
|
+
function br(e, t) {
|
|
2982
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2983
|
+
}
|
|
2984
|
+
function qi(e, t) {
|
|
2985
|
+
let r = null, n;
|
|
2986
|
+
const o = be(e);
|
|
2987
|
+
function s() {
|
|
2988
|
+
var l;
|
|
2989
|
+
clearTimeout(n), (l = r) == null || l.disconnect(), r = null;
|
|
2990
|
+
}
|
|
2991
|
+
function c(l, a) {
|
|
2992
|
+
l === void 0 && (l = !1), a === void 0 && (a = 1), s();
|
|
2993
|
+
const u = e.getBoundingClientRect(), {
|
|
2994
|
+
left: m,
|
|
2995
|
+
top: f,
|
|
2996
|
+
width: i,
|
|
2997
|
+
height: d
|
|
2998
|
+
} = u;
|
|
2999
|
+
if (l || t(), !i || !d)
|
|
3000
|
+
return;
|
|
3001
|
+
const p = vt(f), h = vt(o.clientWidth - (m + i)), x = vt(o.clientHeight - (f + d)), w = vt(m), E = {
|
|
3002
|
+
rootMargin: -p + "px " + -h + "px " + -x + "px " + -w + "px",
|
|
3003
|
+
threshold: oe(0, Ce(1, a)) || 1
|
|
3004
|
+
};
|
|
3005
|
+
let g = !0;
|
|
3006
|
+
function v(O) {
|
|
3007
|
+
const S = O[0].intersectionRatio;
|
|
3008
|
+
if (S !== a) {
|
|
3009
|
+
if (!g)
|
|
3010
|
+
return c();
|
|
3011
|
+
S ? c(!1, S) : n = setTimeout(() => {
|
|
3012
|
+
c(!1, 1e-7);
|
|
3013
|
+
}, 1e3);
|
|
3014
|
+
}
|
|
3015
|
+
S === 1 && !br(u, e.getBoundingClientRect()) && c(), g = !1;
|
|
3016
|
+
}
|
|
3017
|
+
try {
|
|
3018
|
+
r = new IntersectionObserver(v, {
|
|
3019
|
+
...E,
|
|
3020
|
+
// Handle <iframe>s
|
|
3021
|
+
root: o.ownerDocument
|
|
3022
|
+
});
|
|
3023
|
+
} catch {
|
|
3024
|
+
r = new IntersectionObserver(v, E);
|
|
3025
|
+
}
|
|
3026
|
+
r.observe(e);
|
|
3027
|
+
}
|
|
3028
|
+
return c(!0), s;
|
|
3029
|
+
}
|
|
3030
|
+
function Ui(e, t, r, n) {
|
|
3031
|
+
n === void 0 && (n = {});
|
|
3032
|
+
const {
|
|
3033
|
+
ancestorScroll: o = !0,
|
|
3034
|
+
ancestorResize: s = !0,
|
|
3035
|
+
elementResize: c = typeof ResizeObserver == "function",
|
|
3036
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
3037
|
+
animationFrame: a = !1
|
|
3038
|
+
} = n, u = dn(e), m = o || s ? [...u ? at(u) : [], ...at(t)] : [];
|
|
3039
|
+
m.forEach((w) => {
|
|
3040
|
+
o && w.addEventListener("scroll", r, {
|
|
3041
|
+
passive: !0
|
|
3042
|
+
}), s && w.addEventListener("resize", r);
|
|
3043
|
+
});
|
|
3044
|
+
const f = u && l ? qi(u, r) : null;
|
|
3045
|
+
let i = -1, d = null;
|
|
3046
|
+
c && (d = new ResizeObserver((w) => {
|
|
3047
|
+
let [b] = w;
|
|
3048
|
+
b && b.target === u && d && (d.unobserve(t), cancelAnimationFrame(i), i = requestAnimationFrame(() => {
|
|
3049
|
+
var E;
|
|
3050
|
+
(E = d) == null || E.observe(t);
|
|
3051
|
+
})), r();
|
|
3052
|
+
}), u && !a && d.observe(u), d.observe(t));
|
|
3053
|
+
let p, h = a ? He(e) : null;
|
|
3054
|
+
a && x();
|
|
3055
|
+
function x() {
|
|
3056
|
+
const w = He(e);
|
|
3057
|
+
h && !br(h, w) && r(), h = w, p = requestAnimationFrame(x);
|
|
3058
|
+
}
|
|
3059
|
+
return r(), () => {
|
|
3060
|
+
var w;
|
|
3061
|
+
m.forEach((b) => {
|
|
3062
|
+
o && b.removeEventListener("scroll", r), s && b.removeEventListener("resize", r);
|
|
3063
|
+
}), f == null || f(), (w = d) == null || w.disconnect(), d = null, a && cancelAnimationFrame(p);
|
|
3064
|
+
};
|
|
3065
|
+
}
|
|
3066
|
+
const Yi = Di, Gi = Ai, Xi = Oi, Ji = _i, Zi = Si, Qi = Ti, es = (e, t, r) => {
|
|
3067
|
+
const n = /* @__PURE__ */ new Map(), o = {
|
|
3068
|
+
platform: Ki,
|
|
3069
|
+
...r
|
|
3070
|
+
}, s = {
|
|
3071
|
+
...o.platform,
|
|
3072
|
+
_c: n
|
|
3073
|
+
};
|
|
3074
|
+
return Ei(e, t, {
|
|
3075
|
+
...o,
|
|
3076
|
+
platform: s
|
|
3077
|
+
});
|
|
3078
|
+
};
|
|
3079
|
+
var ts = "div";
|
|
3080
|
+
function Mn(e = 0, t = 0, r = 0, n = 0) {
|
|
3081
|
+
if (typeof DOMRect == "function")
|
|
3082
|
+
return new DOMRect(e, t, r, n);
|
|
3083
|
+
const o = {
|
|
3084
|
+
x: e,
|
|
3085
|
+
y: t,
|
|
3086
|
+
width: r,
|
|
3087
|
+
height: n,
|
|
3088
|
+
top: t,
|
|
3089
|
+
right: e + r,
|
|
3090
|
+
bottom: t + n,
|
|
3091
|
+
left: e
|
|
3092
|
+
};
|
|
3093
|
+
return W(C({}, o), { toJSON: () => o });
|
|
3094
|
+
}
|
|
3095
|
+
function ns(e) {
|
|
3096
|
+
if (!e) return Mn();
|
|
3097
|
+
const { x: t, y: r, width: n, height: o } = e;
|
|
3098
|
+
return Mn(t, r, n, o);
|
|
3099
|
+
}
|
|
3100
|
+
function rs(e, t) {
|
|
3101
|
+
return {
|
|
3102
|
+
contextElement: e || void 0,
|
|
3103
|
+
getBoundingClientRect: () => {
|
|
3104
|
+
const n = e, o = t == null ? void 0 : t(n);
|
|
3105
|
+
return o || !n ? ns(o) : n.getBoundingClientRect();
|
|
3106
|
+
}
|
|
3107
|
+
};
|
|
3108
|
+
}
|
|
3109
|
+
function os(e) {
|
|
3110
|
+
return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e);
|
|
3111
|
+
}
|
|
3112
|
+
function Nn(e) {
|
|
3113
|
+
const t = window.devicePixelRatio || 1;
|
|
3114
|
+
return Math.round(e * t) / t;
|
|
3115
|
+
}
|
|
3116
|
+
function is(e, t) {
|
|
3117
|
+
return Yi(({ placement: r }) => {
|
|
3118
|
+
var n;
|
|
3119
|
+
const o = ((e == null ? void 0 : e.clientHeight) || 0) / 2, s = typeof t.gutter == "number" ? t.gutter + o : (n = t.gutter) != null ? n : o;
|
|
3120
|
+
return {
|
|
3121
|
+
crossAxis: !!r.split("-")[1] ? void 0 : t.shift,
|
|
3122
|
+
mainAxis: s,
|
|
3123
|
+
alignmentAxis: t.shift
|
|
3124
|
+
};
|
|
3125
|
+
});
|
|
3126
|
+
}
|
|
3127
|
+
function ss(e) {
|
|
3128
|
+
if (e.flip === !1) return;
|
|
3129
|
+
const t = typeof e.flip == "string" ? e.flip.split(" ") : void 0;
|
|
3130
|
+
return Fe(
|
|
3131
|
+
!t || t.every(os),
|
|
3132
|
+
process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
|
|
3133
|
+
), Xi({
|
|
3134
|
+
padding: e.overflowPadding,
|
|
3135
|
+
fallbackPlacements: t
|
|
3136
|
+
});
|
|
3137
|
+
}
|
|
3138
|
+
function as(e) {
|
|
3139
|
+
if (!(!e.slide && !e.overlap))
|
|
3140
|
+
return Gi({
|
|
3141
|
+
mainAxis: e.slide,
|
|
3142
|
+
crossAxis: e.overlap,
|
|
3143
|
+
padding: e.overflowPadding,
|
|
3144
|
+
limiter: Qi()
|
|
3145
|
+
});
|
|
3146
|
+
}
|
|
3147
|
+
function cs(e) {
|
|
3148
|
+
return Ji({
|
|
3149
|
+
padding: e.overflowPadding,
|
|
3150
|
+
apply({ elements: t, availableWidth: r, availableHeight: n, rects: o }) {
|
|
3151
|
+
const s = t.floating, c = Math.round(o.reference.width);
|
|
3152
|
+
r = Math.floor(r), n = Math.floor(n), s.style.setProperty(
|
|
3153
|
+
"--popover-anchor-width",
|
|
3154
|
+
`${c}px`
|
|
3155
|
+
), s.style.setProperty(
|
|
3156
|
+
"--popover-available-width",
|
|
3157
|
+
`${r}px`
|
|
3158
|
+
), s.style.setProperty(
|
|
3159
|
+
"--popover-available-height",
|
|
3160
|
+
`${n}px`
|
|
3161
|
+
), e.sameWidth && (s.style.width = `${c}px`), e.fitViewport && (s.style.maxWidth = `${r}px`, s.style.maxHeight = `${n}px`);
|
|
3162
|
+
}
|
|
3163
|
+
});
|
|
3164
|
+
}
|
|
3165
|
+
function us(e, t) {
|
|
3166
|
+
if (e)
|
|
3167
|
+
return Zi({
|
|
3168
|
+
element: e,
|
|
3169
|
+
padding: t.arrowPadding
|
|
3170
|
+
});
|
|
3171
|
+
}
|
|
3172
|
+
var ls = ee(
|
|
3173
|
+
function(t) {
|
|
3174
|
+
var r = t, {
|
|
3175
|
+
store: n,
|
|
3176
|
+
modal: o = !1,
|
|
3177
|
+
portal: s = !!o,
|
|
3178
|
+
preserveTabOrder: c = !0,
|
|
3179
|
+
autoFocusOnShow: l = !0,
|
|
3180
|
+
wrapperProps: a,
|
|
3181
|
+
fixed: u = !1,
|
|
3182
|
+
flip: m = !0,
|
|
3183
|
+
shift: f = 0,
|
|
3184
|
+
slide: i = !0,
|
|
3185
|
+
overlap: d = !1,
|
|
3186
|
+
sameWidth: p = !1,
|
|
3187
|
+
fitViewport: h = !1,
|
|
3188
|
+
gutter: x,
|
|
3189
|
+
arrowPadding: w = 4,
|
|
3190
|
+
overflowPadding: b = 8,
|
|
3191
|
+
getAnchorRect: E,
|
|
3192
|
+
updatePosition: g
|
|
3193
|
+
} = r, v = se(r, [
|
|
3194
|
+
"store",
|
|
3195
|
+
"modal",
|
|
3196
|
+
"portal",
|
|
3197
|
+
"preserveTabOrder",
|
|
3198
|
+
"autoFocusOnShow",
|
|
3199
|
+
"wrapperProps",
|
|
3200
|
+
"fixed",
|
|
3201
|
+
"flip",
|
|
3202
|
+
"shift",
|
|
3203
|
+
"slide",
|
|
3204
|
+
"overlap",
|
|
3205
|
+
"sameWidth",
|
|
3206
|
+
"fitViewport",
|
|
3207
|
+
"gutter",
|
|
3208
|
+
"arrowPadding",
|
|
3209
|
+
"overflowPadding",
|
|
3210
|
+
"getAnchorRect",
|
|
3211
|
+
"updatePosition"
|
|
3212
|
+
]);
|
|
3213
|
+
const O = Dt();
|
|
3214
|
+
n = n || O, Fe(
|
|
3215
|
+
n,
|
|
3216
|
+
process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
3217
|
+
);
|
|
3218
|
+
const S = n.useState("arrowElement"), $ = n.useState("anchorElement"), A = n.useState("disclosureElement"), R = n.useState("popoverElement"), B = n.useState("contentElement"), L = n.useState("placement"), y = n.useState("mounted"), D = n.useState("rendered"), T = Y(null), [M, I] = le(!1), { portalRef: V, domReady: _ } = Wn(s, v.portalRef), k = ue(E), q = ue(g), We = !!g;
|
|
3219
|
+
z(() => {
|
|
3220
|
+
if (!(R != null && R.isConnected)) return;
|
|
3221
|
+
R.style.setProperty(
|
|
3222
|
+
"--popover-overflow-padding",
|
|
3223
|
+
`${b}px`
|
|
3224
|
+
);
|
|
3225
|
+
const ae = rs($, k), te = async () => {
|
|
3226
|
+
if (!y) return;
|
|
3227
|
+
S || (T.current = T.current || document.createElement("div"));
|
|
3228
|
+
const Ee = S || T.current, Le = [
|
|
3229
|
+
is(Ee, { gutter: x, shift: f }),
|
|
3230
|
+
ss({ flip: m, overflowPadding: b }),
|
|
3231
|
+
as({ slide: i, overlap: d, overflowPadding: b }),
|
|
3232
|
+
us(Ee, { arrowPadding: w }),
|
|
3233
|
+
cs({
|
|
3234
|
+
sameWidth: p,
|
|
3235
|
+
fitViewport: h,
|
|
3236
|
+
overflowPadding: b
|
|
3237
|
+
})
|
|
3238
|
+
], ge = await es(ae, R, {
|
|
3239
|
+
placement: L,
|
|
3240
|
+
strategy: u ? "fixed" : "absolute",
|
|
3241
|
+
middleware: Le
|
|
3242
|
+
});
|
|
3243
|
+
n == null || n.setState("currentPlacement", ge.placement), I(!0);
|
|
3244
|
+
const lt = Nn(ge.x), ft = Nn(ge.y);
|
|
3245
|
+
if (Object.assign(R.style, {
|
|
3246
|
+
top: "0",
|
|
3247
|
+
left: "0",
|
|
3248
|
+
transform: `translate3d(${lt}px,${ft}px,0)`
|
|
3249
|
+
}), Ee && ge.middlewareData.arrow) {
|
|
3250
|
+
const { x: Me, y: ze } = ge.middlewareData.arrow, dt = ge.placement.split("-")[0], Ke = Ee.clientWidth / 2, qe = Ee.clientHeight / 2, P = Me != null ? Me + Ke : -Ke, F = ze != null ? ze + qe : -qe;
|
|
3251
|
+
R.style.setProperty(
|
|
3252
|
+
"--popover-transform-origin",
|
|
3253
|
+
{
|
|
3254
|
+
top: `${P}px calc(100% + ${qe}px)`,
|
|
3255
|
+
bottom: `${P}px ${-qe}px`,
|
|
3256
|
+
left: `calc(100% + ${Ke}px) ${F}px`,
|
|
3257
|
+
right: `${-Ke}px ${F}px`
|
|
3258
|
+
}[dt]
|
|
3259
|
+
), Object.assign(Ee.style, {
|
|
3260
|
+
left: Me != null ? `${Me}px` : "",
|
|
3261
|
+
top: ze != null ? `${ze}px` : "",
|
|
3262
|
+
[dt]: "100%"
|
|
3263
|
+
});
|
|
3264
|
+
}
|
|
3265
|
+
}, je = Ui(ae, R, async () => {
|
|
3266
|
+
We ? (await q({ updatePosition: te }), I(!0)) : await te();
|
|
3267
|
+
}, {
|
|
3268
|
+
// JSDOM doesn't support ResizeObserver
|
|
3269
|
+
elementResize: typeof ResizeObserver == "function"
|
|
3270
|
+
});
|
|
3271
|
+
return () => {
|
|
3272
|
+
I(!1), je();
|
|
3273
|
+
};
|
|
3274
|
+
}, [
|
|
3275
|
+
n,
|
|
3276
|
+
D,
|
|
3277
|
+
R,
|
|
3278
|
+
S,
|
|
3279
|
+
$,
|
|
3280
|
+
R,
|
|
3281
|
+
L,
|
|
3282
|
+
y,
|
|
3283
|
+
_,
|
|
3284
|
+
u,
|
|
3285
|
+
m,
|
|
3286
|
+
f,
|
|
3287
|
+
i,
|
|
3288
|
+
d,
|
|
3289
|
+
p,
|
|
3290
|
+
h,
|
|
3291
|
+
x,
|
|
3292
|
+
w,
|
|
3293
|
+
b,
|
|
3294
|
+
k,
|
|
3295
|
+
We,
|
|
3296
|
+
q
|
|
3297
|
+
]), z(() => {
|
|
3298
|
+
if (!y || !_ || !(R != null && R.isConnected) || !(B != null && B.isConnected)) return;
|
|
3299
|
+
const ae = () => {
|
|
3300
|
+
R.style.zIndex = getComputedStyle(B).zIndex;
|
|
3301
|
+
};
|
|
3302
|
+
ae();
|
|
3303
|
+
let te = requestAnimationFrame(() => {
|
|
3304
|
+
te = requestAnimationFrame(ae);
|
|
3305
|
+
});
|
|
3306
|
+
return () => cancelAnimationFrame(te);
|
|
3307
|
+
}, [y, _, R, B]);
|
|
3308
|
+
const et = u ? "fixed" : "absolute";
|
|
3309
|
+
return v = fe(
|
|
3310
|
+
v,
|
|
3311
|
+
(ae) => /* @__PURE__ */ H(
|
|
3312
|
+
"div",
|
|
3313
|
+
W(C({}, a), {
|
|
3314
|
+
style: C({
|
|
3315
|
+
// https://floating-ui.com/docs/computeposition#initial-layout
|
|
3316
|
+
position: et,
|
|
3317
|
+
top: 0,
|
|
3318
|
+
left: 0,
|
|
3319
|
+
width: "max-content"
|
|
3320
|
+
}, a == null ? void 0 : a.style),
|
|
3321
|
+
ref: n == null ? void 0 : n.setPopoverElement,
|
|
3322
|
+
children: ae
|
|
3323
|
+
})
|
|
3324
|
+
),
|
|
3325
|
+
[n, et, a]
|
|
3326
|
+
), v = fe(
|
|
3327
|
+
v,
|
|
3328
|
+
(ae) => /* @__PURE__ */ H(Yt, { value: n, children: ae }),
|
|
3329
|
+
[n]
|
|
3330
|
+
), v = W(C({
|
|
3331
|
+
// data-placing is not part of the public API. We're setting this here so
|
|
3332
|
+
// we can wait for the popover to be positioned before other components
|
|
3333
|
+
// move focus into it. For example, this attribute is observed by the
|
|
3334
|
+
// Combobox component with the autoSelect behavior.
|
|
3335
|
+
"data-placing": !M || void 0
|
|
3336
|
+
}, v), {
|
|
3337
|
+
style: C({
|
|
3338
|
+
position: "relative"
|
|
3339
|
+
}, v.style)
|
|
3340
|
+
}), v = lr(W(C({
|
|
3341
|
+
store: n,
|
|
3342
|
+
modal: o,
|
|
3343
|
+
portal: s,
|
|
3344
|
+
preserveTabOrder: c,
|
|
3345
|
+
preserveTabOrderAnchor: A || $,
|
|
3346
|
+
autoFocusOnShow: M && l
|
|
3347
|
+
}, v), {
|
|
3348
|
+
portalRef: V
|
|
3349
|
+
})), v;
|
|
3350
|
+
}
|
|
3351
|
+
);
|
|
3352
|
+
fr(
|
|
3353
|
+
K(function(t) {
|
|
3354
|
+
const r = ls(t);
|
|
3355
|
+
return Q(ts, r);
|
|
3356
|
+
}),
|
|
3357
|
+
Dt
|
|
3358
|
+
);
|
|
3359
|
+
var fs = "div", xr = ee(
|
|
3360
|
+
function(t) {
|
|
3361
|
+
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3362
|
+
const s = Dt();
|
|
3363
|
+
return n = n || s, o = W(C({}, o), {
|
|
3364
|
+
ref: Be(n == null ? void 0 : n.setAnchorElement, o.ref)
|
|
3365
|
+
}), o;
|
|
3366
|
+
}
|
|
3367
|
+
);
|
|
3368
|
+
K(function(t) {
|
|
3369
|
+
const r = xr(t);
|
|
3370
|
+
return Q(fs, r);
|
|
3371
|
+
});
|
|
3372
|
+
var Er = "button", Sr = ee(
|
|
3373
|
+
function(t) {
|
|
3374
|
+
const r = Y(null), n = Br(r, Er), [o, s] = le(
|
|
3375
|
+
() => !!n && $t({ tagName: n, type: t.type })
|
|
3376
|
+
);
|
|
3377
|
+
return U(() => {
|
|
3378
|
+
r.current && s($t(r.current));
|
|
3379
|
+
}, []), t = W(C({
|
|
3380
|
+
role: !o && n !== "a" ? "button" : void 0
|
|
3381
|
+
}, t), {
|
|
3382
|
+
ref: Be(r, t.ref)
|
|
3383
|
+
}), t = so(t), t;
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3386
|
+
K(function(t) {
|
|
3387
|
+
const r = Sr(t);
|
|
3388
|
+
return Q(Er, r);
|
|
3389
|
+
});
|
|
3390
|
+
var ds = "button", ms = Symbol("disclosure"), Or = ee(
|
|
3391
|
+
function(t) {
|
|
3392
|
+
var r = t, { store: n, toggleOnClick: o = !0 } = r, s = se(r, ["store", "toggleOnClick"]);
|
|
3393
|
+
const c = Jt();
|
|
3394
|
+
n = n || c, Fe(
|
|
3395
|
+
n,
|
|
3396
|
+
process.env.NODE_ENV !== "production" && "Disclosure must receive a `store` prop or be wrapped in a DisclosureProvider component."
|
|
3397
|
+
);
|
|
3398
|
+
const l = Y(null), [a, u] = le(!1), m = n.useState("disclosureElement"), f = n.useState("open");
|
|
3399
|
+
U(() => {
|
|
3400
|
+
let b = m === l.current;
|
|
3401
|
+
m != null && m.isConnected || (n == null || n.setDisclosureElement(l.current), b = !0), u(f && b);
|
|
3402
|
+
}, [m, n, f]);
|
|
3403
|
+
const i = s.onClick, d = rt(o), [p, h] = Wr(s, ms, !0), x = ue((b) => {
|
|
3404
|
+
i == null || i(b), !b.defaultPrevented && (p || d(b) && (n == null || n.setDisclosureElement(b.currentTarget), n == null || n.toggle()));
|
|
3405
|
+
}), w = n.useState("contentElement");
|
|
3406
|
+
return s = W(C(C({
|
|
3407
|
+
"aria-expanded": a,
|
|
3408
|
+
"aria-controls": w == null ? void 0 : w.id
|
|
3409
|
+
}, h), s), {
|
|
3410
|
+
ref: Be(l, s.ref),
|
|
3411
|
+
onClick: x
|
|
3412
|
+
}), s = Sr(s), s;
|
|
3413
|
+
}
|
|
3414
|
+
);
|
|
3415
|
+
K(function(t) {
|
|
3416
|
+
const r = Or(t);
|
|
3417
|
+
return Q(ds, r);
|
|
3418
|
+
});
|
|
3419
|
+
var ps = "button", Pr = ee(
|
|
3420
|
+
function(t) {
|
|
3421
|
+
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3422
|
+
const s = Pt();
|
|
3423
|
+
n = n || s, Fe(
|
|
3424
|
+
n,
|
|
3425
|
+
process.env.NODE_ENV !== "production" && "DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component."
|
|
3426
|
+
);
|
|
3427
|
+
const c = n.useState("contentElement");
|
|
3428
|
+
return o = C({
|
|
3429
|
+
"aria-haspopup": jr(c, "dialog")
|
|
3430
|
+
}, o), o = Or(C({ store: n }, o)), o;
|
|
3431
|
+
}
|
|
3432
|
+
);
|
|
3433
|
+
K(function(t) {
|
|
3434
|
+
const r = Pr(t);
|
|
3435
|
+
return Q(ps, r);
|
|
3436
|
+
});
|
|
3437
|
+
var gs = "button", vs = ee(function(t) {
|
|
3438
|
+
var r = t, { store: n } = r, o = se(r, ["store"]);
|
|
3439
|
+
const s = Dt();
|
|
3440
|
+
n = n || s, Fe(
|
|
3441
|
+
n,
|
|
3442
|
+
process.env.NODE_ENV !== "production" && "PopoverDisclosure must receive a `store` prop or be wrapped in a PopoverProvider component."
|
|
3443
|
+
);
|
|
3444
|
+
const c = o.onClick, l = ue((a) => {
|
|
3445
|
+
n == null || n.setAnchorElement(a.currentTarget), c == null || c(a);
|
|
3446
|
+
});
|
|
3447
|
+
return o = fe(
|
|
3448
|
+
o,
|
|
3449
|
+
(a) => /* @__PURE__ */ H(Yt, { value: n, children: a }),
|
|
3450
|
+
[n]
|
|
3451
|
+
), o = W(C({}, o), {
|
|
3452
|
+
onClick: l
|
|
3453
|
+
}), o = xr(C({ store: n }, o)), o = Pr(C({ store: n }, o)), o;
|
|
3454
|
+
});
|
|
3455
|
+
K(function(t) {
|
|
3456
|
+
const r = vs(t);
|
|
3457
|
+
return Q(gs, r);
|
|
3458
|
+
});
|
|
3459
|
+
var hs = "div", Oe = "";
|
|
3460
|
+
function kt() {
|
|
3461
|
+
Oe = "";
|
|
3462
|
+
}
|
|
3463
|
+
function ys(e) {
|
|
3464
|
+
const t = e.target;
|
|
3465
|
+
return t && Xt(t) ? !1 : e.key === " " && Oe.length ? !0 : e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey && /^[\p{Letter}\p{Number}]$/u.test(e.key);
|
|
3466
|
+
}
|
|
3467
|
+
function ws(e, t) {
|
|
3468
|
+
if (Ne(e)) return !0;
|
|
3469
|
+
const r = e.target;
|
|
3470
|
+
return r ? t.some((o) => o.element === r) : !1;
|
|
3471
|
+
}
|
|
3472
|
+
function bs(e) {
|
|
3473
|
+
return e.filter((t) => !t.disabled);
|
|
3474
|
+
}
|
|
3475
|
+
function wt(e, t) {
|
|
3476
|
+
var r;
|
|
3477
|
+
const n = ((r = e.element) == null ? void 0 : r.textContent) || e.children || // The composite item object itself doesn't include a value property, but
|
|
3478
|
+
// other components like Select do. Since CompositeTypeahead is a generic
|
|
3479
|
+
// component that can be used with those as well, we also consider the value
|
|
3480
|
+
// property as a fallback for the typeahead text content.
|
|
3481
|
+
"value" in e && e.value;
|
|
3482
|
+
return n ? Kr(n).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
|
|
3483
|
+
}
|
|
3484
|
+
function xs(e, t, r) {
|
|
3485
|
+
if (!r) return e;
|
|
3486
|
+
const n = e.find((o) => o.id === r);
|
|
3487
|
+
return !n || !wt(n, t) || Oe !== t && wt(n, Oe) ? e : (Oe = t, ao(
|
|
3488
|
+
e.filter((o) => wt(o, Oe)),
|
|
3489
|
+
r
|
|
3490
|
+
).filter((o) => o.id !== r));
|
|
3491
|
+
}
|
|
3492
|
+
var Es = ee(function(t) {
|
|
3493
|
+
var r = t, { store: n, typeahead: o = !0 } = r, s = se(r, ["store", "typeahead"]);
|
|
3494
|
+
const c = zr();
|
|
3495
|
+
n = n || c, Fe(
|
|
3496
|
+
n,
|
|
3497
|
+
process.env.NODE_ENV !== "production" && "CompositeTypeahead must be a Composite component"
|
|
3498
|
+
);
|
|
3499
|
+
const l = s.onKeyDownCapture, a = Y(0), u = ue((m) => {
|
|
3500
|
+
if (l == null || l(m), m.defaultPrevented || !o || !n) return;
|
|
3501
|
+
if (!ys(m))
|
|
3502
|
+
return kt();
|
|
3503
|
+
const { renderedItems: f, items: i, activeId: d, id: p } = n.getState();
|
|
3504
|
+
let h = bs(
|
|
3505
|
+
i.length > f.length ? i : f
|
|
3506
|
+
);
|
|
3507
|
+
const x = G(m.currentTarget), w = `[data-offscreen-id="${p}"]`, b = x.querySelectorAll(w);
|
|
3508
|
+
for (const v of b) {
|
|
3509
|
+
const O = v.ariaDisabled === "true" || "disabled" in v && !!v.disabled;
|
|
3510
|
+
h.push({ id: v.id, element: v, disabled: O });
|
|
3511
|
+
}
|
|
3512
|
+
if (b.length && (h = kn(h, (v) => v.element)), !ws(m, h)) return kt();
|
|
3513
|
+
m.preventDefault(), window.clearTimeout(a.current), a.current = window.setTimeout(() => {
|
|
3514
|
+
Oe = "";
|
|
3515
|
+
}, 500);
|
|
3516
|
+
const E = m.key.toLowerCase();
|
|
3517
|
+
Oe += E, h = xs(h, E, d);
|
|
3518
|
+
const g = h.find((v) => wt(v, Oe));
|
|
3519
|
+
g ? n.move(g.id) : kt();
|
|
3520
|
+
});
|
|
3521
|
+
return s = W(C({}, s), {
|
|
3522
|
+
onKeyDownCapture: u
|
|
3523
|
+
}), Hn(s);
|
|
3524
|
+
});
|
|
3525
|
+
K(function(t) {
|
|
3526
|
+
const r = Es(t);
|
|
3527
|
+
return Q(hs, r);
|
|
3528
|
+
});
|
|
3529
|
+
export {
|
|
3530
|
+
Wt as R,
|
|
3531
|
+
Is as a,
|
|
3532
|
+
_s as b,
|
|
3533
|
+
Ts as c,
|
|
3534
|
+
Fs as d,
|
|
3535
|
+
Cs as e,
|
|
3536
|
+
vs as f,
|
|
3537
|
+
Es as g,
|
|
3538
|
+
Ao as h,
|
|
3539
|
+
Zn as i,
|
|
3540
|
+
fr as j,
|
|
3541
|
+
ls as k,
|
|
3542
|
+
As as t,
|
|
3543
|
+
Rs as u
|
|
3544
|
+
};
|