@cfx-dev/ui-components 0.0.19 → 0.0.21
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/Combination-Dp_plIQU.js +793 -0
- package/dist/{Icons-B26SczGZ.js → Icons-BlBKvJD8.js} +40 -98
- package/dist/{Rail-BCY3h7eP.js → Rail-CCuyJpf6.js} +11 -11
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/assets/InputDropzone.css +1 -0
- package/dist/assets/ItemPreview.css +1 -0
- package/dist/assets/Table.css +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.d.ts +1 -0
- package/dist/components/BackdropPortal/BackdropPortal.js +9 -7
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.js +27 -25
- package/dist/components/Button/ButtonBar.d.ts +0 -1
- package/dist/components/Button/LinkButton.js +13 -13
- package/dist/components/Flyout/Flyout.d.ts +1 -0
- package/dist/components/Flyout/Flyout.js +28 -27
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/RichInput.js +2 -2
- package/dist/components/InputDropzone/InputDropzone.d.ts +14 -0
- package/dist/components/InputDropzone/InputDropzone.js +1103 -0
- package/dist/components/InputDropzone/ItemPreview.d.ts +8 -0
- package/dist/components/InputDropzone/ItemPreview.js +24 -0
- package/dist/components/Layout/Scrollable/Rail.js +3 -3
- package/dist/components/Layout/Scrollable/Scrollable.js +2 -2
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +3 -4
- package/dist/components/Modal/Modal.d.ts +0 -2
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/NavList/NavList.js +5 -5
- package/dist/components/OnScreenSensor.js +6 -6
- package/dist/components/Overlay/Overlay.d.ts +1 -0
- package/dist/components/Overlay/Overlay.js +16 -15
- package/dist/components/Select/Select.js +652 -663
- package/dist/components/Shroud/Shroud.js +20 -19
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/Table.d.ts +17 -0
- package/dist/components/Table/Table.js +61 -0
- package/dist/components/Tabular/Tabular.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +1 -0
- package/dist/components/Title/Title.js +26 -25
- package/dist/{extends-Dk_bSU3E.js → extends-hS2Bh-Yp.js} +1 -2
- package/dist/{index-C75OpfGQ.js → index-2hJuj4UN.js} +2018 -2526
- package/dist/index-DQMInta3.js +663 -0
- package/dist/index.esm-BkynlSN6.js +72 -0
- package/dist/main.d.ts +17 -26
- package/dist/main.js +145 -122
- package/dist/{medium-Dc7QRuE0.js → medium-JVtzoF2c.js} +3 -3
- package/dist/style-guide/Colours/DarkThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/DarkThemeSwatches.js +110 -0
- package/dist/style-guide/Colours/LightThemeSwatches.d.ts +2 -0
- package/dist/style-guide/Colours/LightThemeSwatches.js +105 -0
- package/dist/style-guide/Colours/Swatches.d.ts +6 -0
- package/dist/style-guide/Colours/Swatches.js +48 -0
- package/dist/style-guide/Icons/IconDisplayGrid.d.ts +2 -0
- package/dist/style-guide/Icons/IconDisplayGrid.js +42 -0
- package/dist/style-guide/Icons/Icons.js +7 -0
- package/dist/tslib.es6-CBKHJX9H.js +151 -0
- package/dist/utils/functional.js +19 -6
- package/dist/utils/hooks.d.ts +2 -1
- package/dist/utils/hooks.js +77 -10
- package/dist/utils/links.js +1128 -12
- package/dist/utils/math.js +8 -3
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +2 -2
- package/dist/utils/outlet.js +19 -4
- package/dist/utils/string.js +42 -7
- package/package.json +7 -13
- package/dist/Combination-Dj-a6dCZ.js +0 -1462
- package/dist/components/Icons.js +0 -6
- package/dist/functional-C0pE183N.js +0 -30
- package/dist/hooks-GAujvL7d.js +0 -86
- package/dist/links-CgOD-Vfj.js +0 -1142
- package/dist/math-i2ceybzU.js +0 -16
- package/dist/outlet-B11a3Kgw.js +0 -27
- package/dist/string-NVxCUbqk.js +0 -54
- package/dist/tslib.es6-Dd_EkEfR.js +0 -48
- /package/dist/{components → style-guide/Icons}/Icons.d.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as Ze, jsx as te } from "react/jsx-runtime";
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as W } from "../../extends-hS2Bh-Yp.js";
|
|
3
3
|
import * as C from "react";
|
|
4
|
-
import ne, { createContext as st, useMemo as
|
|
5
|
-
import { r as pt,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as Ut, b as so, I as ao } from "../../Icons-
|
|
4
|
+
import ne, { createContext as st, useMemo as Me, createElement as S, useContext as It, useCallback as q, forwardRef as U, Children as Ke, isValidElement as at, cloneElement as wn, Fragment as Nt, useEffect as Y, useRef as j, useState as k, useLayoutEffect as $n } from "react";
|
|
5
|
+
import { r as pt, R as oo } from "../../index-2hJuj4UN.js";
|
|
6
|
+
import { f as bn, _ as Ce, c as ro } from "../../tslib.es6-CBKHJX9H.js";
|
|
7
|
+
import { a as io, u as co } from "../../medium-JVtzoF2c.js";
|
|
8
|
+
import { a as Ut, b as so, I as ao } from "../../Icons-BlBKvJD8.js";
|
|
9
9
|
import { clsx as xn } from "../../utils/clsx.js";
|
|
10
10
|
import '../../assets/Select.css';var yn = function(e) {
|
|
11
11
|
var t = e.sideCar, n = bn(e, ["sideCar"]);
|
|
@@ -14,7 +14,7 @@ import '../../assets/Select.css';var yn = function(e) {
|
|
|
14
14
|
var o = t.read();
|
|
15
15
|
if (!o)
|
|
16
16
|
throw new Error("Sidecar medium not found");
|
|
17
|
-
return C.createElement(o,
|
|
17
|
+
return C.createElement(o, Ce({}, n));
|
|
18
18
|
};
|
|
19
19
|
yn.isSideCarExport = !0;
|
|
20
20
|
function lo(e, t) {
|
|
@@ -23,13 +23,12 @@ function lo(e, t) {
|
|
|
23
23
|
function Kt(e, [t, n]) {
|
|
24
24
|
return Math.min(n, Math.max(t, e));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function X(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
27
27
|
return function(r) {
|
|
28
|
-
if (e == null || e(r), n === !1 || !r.defaultPrevented)
|
|
29
|
-
return t == null ? void 0 : t(r);
|
|
28
|
+
if (e == null || e(r), n === !1 || !r.defaultPrevented) return t == null ? void 0 : t(r);
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
|
-
function
|
|
31
|
+
function Mt(e, t = []) {
|
|
33
32
|
let n = [];
|
|
34
33
|
function o(c, s) {
|
|
35
34
|
const i = /* @__PURE__ */ st(s), a = n.length;
|
|
@@ -38,7 +37,7 @@ function Nt(e, t = []) {
|
|
|
38
37
|
s
|
|
39
38
|
];
|
|
40
39
|
function l(u) {
|
|
41
|
-
const { scope: w, children: p, ...h } = u, d = (w == null ? void 0 : w[e][a]) || i, v =
|
|
40
|
+
const { scope: w, children: p, ...h } = u, d = (w == null ? void 0 : w[e][a]) || i, v = Me(
|
|
42
41
|
() => h,
|
|
43
42
|
Object.values(h)
|
|
44
43
|
);
|
|
@@ -47,11 +46,9 @@ function Nt(e, t = []) {
|
|
|
47
46
|
}, p);
|
|
48
47
|
}
|
|
49
48
|
function f(u, w) {
|
|
50
|
-
const p = (w == null ? void 0 : w[e][a]) || i, h =
|
|
51
|
-
if (h)
|
|
52
|
-
|
|
53
|
-
if (s !== void 0)
|
|
54
|
-
return s;
|
|
49
|
+
const p = (w == null ? void 0 : w[e][a]) || i, h = It(p);
|
|
50
|
+
if (h) return h;
|
|
51
|
+
if (s !== void 0) return s;
|
|
55
52
|
throw new Error(`\`${u}\` must be used within \`${c}\``);
|
|
56
53
|
}
|
|
57
54
|
return l.displayName = c + "Provider", [
|
|
@@ -63,7 +60,7 @@ function Nt(e, t = []) {
|
|
|
63
60
|
const c = n.map((s) => /* @__PURE__ */ st(s));
|
|
64
61
|
return function(i) {
|
|
65
62
|
const a = (i == null ? void 0 : i[e]) || c;
|
|
66
|
-
return
|
|
63
|
+
return Me(
|
|
67
64
|
() => ({
|
|
68
65
|
[`__scope${e}`]: {
|
|
69
66
|
...i,
|
|
@@ -84,8 +81,7 @@ function Nt(e, t = []) {
|
|
|
84
81
|
}
|
|
85
82
|
function uo(...e) {
|
|
86
83
|
const t = e[0];
|
|
87
|
-
if (e.length === 1)
|
|
88
|
-
return t;
|
|
84
|
+
if (e.length === 1) return t;
|
|
89
85
|
const n = () => {
|
|
90
86
|
const o = e.map(
|
|
91
87
|
(r) => ({
|
|
@@ -101,7 +97,7 @@ function uo(...e) {
|
|
|
101
97
|
...u
|
|
102
98
|
};
|
|
103
99
|
}, {});
|
|
104
|
-
return
|
|
100
|
+
return Me(
|
|
105
101
|
() => ({
|
|
106
102
|
[`__scope${t.scopeName}`]: s
|
|
107
103
|
}),
|
|
@@ -124,28 +120,28 @@ function Sn(...e) {
|
|
|
124
120
|
function G(...e) {
|
|
125
121
|
return q(Sn(...e), e);
|
|
126
122
|
}
|
|
127
|
-
const Ye = /* @__PURE__ */
|
|
123
|
+
const Ye = /* @__PURE__ */ U((e, t) => {
|
|
128
124
|
const { children: n, ...o } = e, r = Ke.toArray(n), c = r.find(ho);
|
|
129
125
|
if (c) {
|
|
130
126
|
const s = c.props.children, i = r.map((a) => a === c ? Ke.count(s) > 1 ? Ke.only(null) : /* @__PURE__ */ at(s) ? s.props.children : null : a);
|
|
131
|
-
return /* @__PURE__ */ S(
|
|
127
|
+
return /* @__PURE__ */ S(Tt, W({}, o, {
|
|
132
128
|
ref: t
|
|
133
129
|
}), /* @__PURE__ */ at(s) ? /* @__PURE__ */ wn(s, void 0, i) : null);
|
|
134
130
|
}
|
|
135
|
-
return /* @__PURE__ */ S(
|
|
131
|
+
return /* @__PURE__ */ S(Tt, W({}, o, {
|
|
136
132
|
ref: t
|
|
137
133
|
}), n);
|
|
138
134
|
});
|
|
139
135
|
Ye.displayName = "Slot";
|
|
140
|
-
const
|
|
136
|
+
const Tt = /* @__PURE__ */ U((e, t) => {
|
|
141
137
|
const { children: n, ...o } = e;
|
|
142
138
|
return /* @__PURE__ */ at(n) ? /* @__PURE__ */ wn(n, {
|
|
143
139
|
...mo(o, n.props),
|
|
144
140
|
ref: t ? Sn(t, n.ref) : n.ref
|
|
145
141
|
}) : Ke.count(n) > 1 ? Ke.only(null) : null;
|
|
146
142
|
});
|
|
147
|
-
|
|
148
|
-
const po = ({ children: e }) => /* @__PURE__ */ S(
|
|
143
|
+
Tt.displayName = "SlotClone";
|
|
144
|
+
const po = ({ children: e }) => /* @__PURE__ */ S(Nt, null, e);
|
|
149
145
|
function ho(e) {
|
|
150
146
|
return /* @__PURE__ */ at(e) && e.type === po;
|
|
151
147
|
}
|
|
@@ -171,7 +167,7 @@ function mo(e, t) {
|
|
|
171
167
|
};
|
|
172
168
|
}
|
|
173
169
|
function vo(e) {
|
|
174
|
-
const t = e + "CollectionProvider", [n, o] =
|
|
170
|
+
const t = e + "CollectionProvider", [n, o] = Mt(t), [r, c] = n(t, {
|
|
175
171
|
collectionRef: {
|
|
176
172
|
current: null
|
|
177
173
|
},
|
|
@@ -202,8 +198,7 @@ function vo(e) {
|
|
|
202
198
|
const h = c(e + "CollectionConsumer", p);
|
|
203
199
|
return ne.useCallback(() => {
|
|
204
200
|
const v = h.collectionRef.current;
|
|
205
|
-
if (!v)
|
|
206
|
-
return [];
|
|
201
|
+
if (!v) return [];
|
|
207
202
|
const m = Array.from(v.querySelectorAll(`[${f}]`));
|
|
208
203
|
return Array.from(h.itemMap.values()).sort(
|
|
209
204
|
(b, x) => m.indexOf(b.ref.current) - m.indexOf(x.ref.current)
|
|
@@ -225,7 +220,7 @@ function vo(e) {
|
|
|
225
220
|
}
|
|
226
221
|
const go = /* @__PURE__ */ st(void 0);
|
|
227
222
|
function wo(e) {
|
|
228
|
-
const t =
|
|
223
|
+
const t = It(go);
|
|
229
224
|
return e || t || "ltr";
|
|
230
225
|
}
|
|
231
226
|
const $o = [
|
|
@@ -246,11 +241,11 @@ const $o = [
|
|
|
246
241
|
"svg",
|
|
247
242
|
"ul"
|
|
248
243
|
], J = $o.reduce((e, t) => {
|
|
249
|
-
const n = /* @__PURE__ */
|
|
244
|
+
const n = /* @__PURE__ */ U((o, r) => {
|
|
250
245
|
const { asChild: c, ...s } = o, i = c ? Ye : t;
|
|
251
|
-
return
|
|
246
|
+
return Y(() => {
|
|
252
247
|
window[Symbol.for("radix-ui")] = !0;
|
|
253
|
-
}, []), /* @__PURE__ */ S(i,
|
|
248
|
+
}, []), /* @__PURE__ */ S(i, W({}, s, {
|
|
254
249
|
ref: r
|
|
255
250
|
}));
|
|
256
251
|
});
|
|
@@ -264,11 +259,11 @@ function bo(e, t) {
|
|
|
264
259
|
() => e.dispatchEvent(t)
|
|
265
260
|
);
|
|
266
261
|
}
|
|
267
|
-
function
|
|
268
|
-
const t =
|
|
269
|
-
return
|
|
262
|
+
function me(e) {
|
|
263
|
+
const t = j(e);
|
|
264
|
+
return Y(() => {
|
|
270
265
|
t.current = e;
|
|
271
|
-
}),
|
|
266
|
+
}), Me(
|
|
272
267
|
() => (...n) => {
|
|
273
268
|
var o;
|
|
274
269
|
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
@@ -277,8 +272,8 @@ function he(e) {
|
|
|
277
272
|
);
|
|
278
273
|
}
|
|
279
274
|
function xo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
280
|
-
const n =
|
|
281
|
-
|
|
275
|
+
const n = me(e);
|
|
276
|
+
Y(() => {
|
|
282
277
|
const o = (r) => {
|
|
283
278
|
r.key === "Escape" && n(r);
|
|
284
279
|
};
|
|
@@ -288,37 +283,37 @@ function xo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
288
283
|
t
|
|
289
284
|
]);
|
|
290
285
|
}
|
|
291
|
-
const
|
|
286
|
+
const At = "dismissableLayer.update", yo = "dismissableLayer.pointerDownOutside", So = "dismissableLayer.focusOutside";
|
|
292
287
|
let Yt;
|
|
293
288
|
const Co = /* @__PURE__ */ st({
|
|
294
289
|
layers: /* @__PURE__ */ new Set(),
|
|
295
290
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
296
291
|
branches: /* @__PURE__ */ new Set()
|
|
297
|
-
}), Eo = /* @__PURE__ */
|
|
292
|
+
}), Eo = /* @__PURE__ */ U((e, t) => {
|
|
298
293
|
var n;
|
|
299
|
-
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: c, onFocusOutside: s, onInteractOutside: i, onDismiss: a, ...l } = e, f =
|
|
294
|
+
const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: r, onPointerDownOutside: c, onFocusOutside: s, onInteractOutside: i, onDismiss: a, ...l } = e, f = It(Co), [u, w] = k(null), p = (n = u == null ? void 0 : u.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = k({}), d = G(
|
|
300
295
|
t,
|
|
301
296
|
(y) => w(y)
|
|
302
297
|
), v = Array.from(f.layers), [m] = [
|
|
303
298
|
...f.layersWithOutsidePointerEventsDisabled
|
|
304
299
|
].slice(-1), g = v.indexOf(m), $ = u ? v.indexOf(u) : -1, b = f.layersWithOutsidePointerEventsDisabled.size > 0, x = $ >= g, T = Po((y) => {
|
|
305
|
-
const
|
|
300
|
+
const R = y.target, L = [
|
|
306
301
|
...f.branches
|
|
307
302
|
].some(
|
|
308
|
-
(D) => D.contains(
|
|
303
|
+
(D) => D.contains(R)
|
|
309
304
|
);
|
|
310
|
-
!x ||
|
|
305
|
+
!x || L || (c == null || c(y), i == null || i(y), y.defaultPrevented || a == null || a());
|
|
311
306
|
}, p), E = To((y) => {
|
|
312
|
-
const
|
|
307
|
+
const R = y.target;
|
|
313
308
|
[
|
|
314
309
|
...f.branches
|
|
315
310
|
].some(
|
|
316
|
-
(D) => D.contains(
|
|
311
|
+
(D) => D.contains(R)
|
|
317
312
|
) || (s == null || s(y), i == null || i(y), y.defaultPrevented || a == null || a());
|
|
318
313
|
}, p);
|
|
319
314
|
return xo((y) => {
|
|
320
315
|
$ === f.layers.size - 1 && (r == null || r(y), !y.defaultPrevented && a && (y.preventDefault(), a()));
|
|
321
|
-
}, p),
|
|
316
|
+
}, p), Y(() => {
|
|
322
317
|
if (u)
|
|
323
318
|
return o && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (Yt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(u)), f.layers.add(u), Xt(), () => {
|
|
324
319
|
o && f.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Yt);
|
|
@@ -328,29 +323,29 @@ const Co = /* @__PURE__ */ st({
|
|
|
328
323
|
p,
|
|
329
324
|
o,
|
|
330
325
|
f
|
|
331
|
-
]),
|
|
326
|
+
]), Y(() => () => {
|
|
332
327
|
u && (f.layers.delete(u), f.layersWithOutsidePointerEventsDisabled.delete(u), Xt());
|
|
333
328
|
}, [
|
|
334
329
|
u,
|
|
335
330
|
f
|
|
336
|
-
]),
|
|
331
|
+
]), Y(() => {
|
|
337
332
|
const y = () => h({});
|
|
338
|
-
return document.addEventListener(
|
|
339
|
-
}, []), /* @__PURE__ */ S(J.div,
|
|
333
|
+
return document.addEventListener(At, y), () => document.removeEventListener(At, y);
|
|
334
|
+
}, []), /* @__PURE__ */ S(J.div, W({}, l, {
|
|
340
335
|
ref: d,
|
|
341
336
|
style: {
|
|
342
337
|
pointerEvents: b ? x ? "auto" : "none" : void 0,
|
|
343
338
|
...e.style
|
|
344
339
|
},
|
|
345
|
-
onFocusCapture:
|
|
346
|
-
onBlurCapture:
|
|
347
|
-
onPointerDownCapture:
|
|
340
|
+
onFocusCapture: X(e.onFocusCapture, E.onFocusCapture),
|
|
341
|
+
onBlurCapture: X(e.onBlurCapture, E.onBlurCapture),
|
|
342
|
+
onPointerDownCapture: X(e.onPointerDownCapture, T.onPointerDownCapture)
|
|
348
343
|
}));
|
|
349
344
|
});
|
|
350
345
|
function Po(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
351
|
-
const n =
|
|
346
|
+
const n = me(e), o = j(!1), r = j(() => {
|
|
352
347
|
});
|
|
353
|
-
return
|
|
348
|
+
return Y(() => {
|
|
354
349
|
const c = (i) => {
|
|
355
350
|
if (i.target && !o.current) {
|
|
356
351
|
let l = function() {
|
|
@@ -381,8 +376,8 @@ function Po(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
381
376
|
};
|
|
382
377
|
}
|
|
383
378
|
function To(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
384
|
-
const n =
|
|
385
|
-
return
|
|
379
|
+
const n = me(e), o = j(!1);
|
|
380
|
+
return Y(() => {
|
|
386
381
|
const r = (c) => {
|
|
387
382
|
c.target && !o.current && Cn(So, n, {
|
|
388
383
|
originalEvent: c
|
|
@@ -400,7 +395,7 @@ function To(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
400
395
|
};
|
|
401
396
|
}
|
|
402
397
|
function Xt() {
|
|
403
|
-
const e = new CustomEvent(
|
|
398
|
+
const e = new CustomEvent(At);
|
|
404
399
|
document.dispatchEvent(e);
|
|
405
400
|
}
|
|
406
401
|
function Cn(e, t, n, { discrete: o }) {
|
|
@@ -413,15 +408,15 @@ function Cn(e, t, n, { discrete: o }) {
|
|
|
413
408
|
once: !0
|
|
414
409
|
}), o ? bo(r, c) : r.dispatchEvent(c);
|
|
415
410
|
}
|
|
416
|
-
let
|
|
411
|
+
let bt = 0;
|
|
417
412
|
function Ao() {
|
|
418
|
-
|
|
413
|
+
Y(() => {
|
|
419
414
|
var e, t;
|
|
420
415
|
const n = document.querySelectorAll("[data-radix-focus-guard]");
|
|
421
|
-
return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : jt()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : jt()),
|
|
422
|
-
|
|
416
|
+
return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : jt()), document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : jt()), bt++, () => {
|
|
417
|
+
bt === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
|
|
423
418
|
(o) => o.remove()
|
|
424
|
-
),
|
|
419
|
+
), bt--;
|
|
425
420
|
};
|
|
426
421
|
}, []);
|
|
427
422
|
}
|
|
@@ -429,14 +424,14 @@ function jt() {
|
|
|
429
424
|
const e = document.createElement("span");
|
|
430
425
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
|
|
431
426
|
}
|
|
432
|
-
const
|
|
427
|
+
const xt = "focusScope.autoFocusOnMount", yt = "focusScope.autoFocusOnUnmount", qt = {
|
|
433
428
|
bubbles: !1,
|
|
434
429
|
cancelable: !0
|
|
435
|
-
}, Oo = /* @__PURE__ */
|
|
436
|
-
const { loop: n = !1, trapped: o = !1, onMountAutoFocus: r, onUnmountAutoFocus: c, ...s } = e, [i, a] = k(null), l =
|
|
430
|
+
}, Oo = /* @__PURE__ */ U((e, t) => {
|
|
431
|
+
const { loop: n = !1, trapped: o = !1, onMountAutoFocus: r, onUnmountAutoFocus: c, ...s } = e, [i, a] = k(null), l = me(r), f = me(c), u = j(null), w = G(
|
|
437
432
|
t,
|
|
438
433
|
(d) => a(d)
|
|
439
|
-
), p =
|
|
434
|
+
), p = j({
|
|
440
435
|
paused: !1,
|
|
441
436
|
pause() {
|
|
442
437
|
this.paused = !0;
|
|
@@ -445,26 +440,24 @@ const bt = "focusScope.autoFocusOnMount", xt = "focusScope.autoFocusOnUnmount",
|
|
|
445
440
|
this.paused = !1;
|
|
446
441
|
}
|
|
447
442
|
}).current;
|
|
448
|
-
|
|
443
|
+
Y(() => {
|
|
449
444
|
if (o) {
|
|
450
445
|
let d = function($) {
|
|
451
|
-
if (p.paused || !i)
|
|
452
|
-
return;
|
|
446
|
+
if (p.paused || !i) return;
|
|
453
447
|
const b = $.target;
|
|
454
|
-
i.contains(b) ? u.current = b :
|
|
448
|
+
i.contains(b) ? u.current = b : be(u.current, {
|
|
455
449
|
select: !0
|
|
456
450
|
});
|
|
457
451
|
}, v = function($) {
|
|
458
|
-
if (p.paused || !i)
|
|
459
|
-
return;
|
|
452
|
+
if (p.paused || !i) return;
|
|
460
453
|
const b = $.relatedTarget;
|
|
461
|
-
b !== null && (i.contains(b) ||
|
|
454
|
+
b !== null && (i.contains(b) || be(u.current, {
|
|
462
455
|
select: !0
|
|
463
456
|
}));
|
|
464
457
|
}, m = function($) {
|
|
465
458
|
const b = document.activeElement;
|
|
466
459
|
for (const x of $)
|
|
467
|
-
x.removedNodes.length > 0 && (i != null && i.contains(b) ||
|
|
460
|
+
x.removedNodes.length > 0 && (i != null && i.contains(b) || be(i));
|
|
468
461
|
};
|
|
469
462
|
document.addEventListener("focusin", d), document.addEventListener("focusout", v);
|
|
470
463
|
const g = new MutationObserver(m);
|
|
@@ -479,22 +472,22 @@ const bt = "focusScope.autoFocusOnMount", xt = "focusScope.autoFocusOnUnmount",
|
|
|
479
472
|
o,
|
|
480
473
|
i,
|
|
481
474
|
p.paused
|
|
482
|
-
]),
|
|
475
|
+
]), Y(() => {
|
|
483
476
|
if (i) {
|
|
484
477
|
Zt.add(p);
|
|
485
478
|
const d = document.activeElement;
|
|
486
479
|
if (!i.contains(d)) {
|
|
487
|
-
const m = new CustomEvent(
|
|
488
|
-
i.addEventListener(
|
|
480
|
+
const m = new CustomEvent(xt, qt);
|
|
481
|
+
i.addEventListener(xt, l), i.dispatchEvent(m), m.defaultPrevented || (Ro(Mo(En(i)), {
|
|
489
482
|
select: !0
|
|
490
|
-
}), document.activeElement === d &&
|
|
483
|
+
}), document.activeElement === d && be(i));
|
|
491
484
|
}
|
|
492
485
|
return () => {
|
|
493
|
-
i.removeEventListener(
|
|
494
|
-
const m = new CustomEvent(
|
|
495
|
-
i.addEventListener(
|
|
486
|
+
i.removeEventListener(xt, l), setTimeout(() => {
|
|
487
|
+
const m = new CustomEvent(yt, qt);
|
|
488
|
+
i.addEventListener(yt, f), i.dispatchEvent(m), m.defaultPrevented || be(d ?? document.body, {
|
|
496
489
|
select: !0
|
|
497
|
-
}), i.removeEventListener(
|
|
490
|
+
}), i.removeEventListener(yt, f), Zt.remove(p);
|
|
498
491
|
}, 0);
|
|
499
492
|
};
|
|
500
493
|
}
|
|
@@ -505,14 +498,13 @@ const bt = "focusScope.autoFocusOnMount", xt = "focusScope.autoFocusOnUnmount",
|
|
|
505
498
|
p
|
|
506
499
|
]);
|
|
507
500
|
const h = q((d) => {
|
|
508
|
-
if (!n && !o || p.paused)
|
|
509
|
-
return;
|
|
501
|
+
if (!n && !o || p.paused) return;
|
|
510
502
|
const v = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, m = document.activeElement;
|
|
511
503
|
if (v && m) {
|
|
512
504
|
const g = d.currentTarget, [$, b] = _o(g);
|
|
513
|
-
$ && b ? !d.shiftKey && m === b ? (d.preventDefault(), n &&
|
|
505
|
+
$ && b ? !d.shiftKey && m === b ? (d.preventDefault(), n && be($, {
|
|
514
506
|
select: !0
|
|
515
|
-
})) : d.shiftKey && m === $ && (d.preventDefault(), n &&
|
|
507
|
+
})) : d.shiftKey && m === $ && (d.preventDefault(), n && be(b, {
|
|
516
508
|
select: !0
|
|
517
509
|
})) : m === g && d.preventDefault();
|
|
518
510
|
}
|
|
@@ -521,7 +513,7 @@ const bt = "focusScope.autoFocusOnMount", xt = "focusScope.autoFocusOnUnmount",
|
|
|
521
513
|
o,
|
|
522
514
|
p.paused
|
|
523
515
|
]);
|
|
524
|
-
return /* @__PURE__ */ S(J.div,
|
|
516
|
+
return /* @__PURE__ */ S(J.div, W({
|
|
525
517
|
tabIndex: -1
|
|
526
518
|
}, s, {
|
|
527
519
|
ref: w,
|
|
@@ -531,10 +523,9 @@ const bt = "focusScope.autoFocusOnMount", xt = "focusScope.autoFocusOnUnmount",
|
|
|
531
523
|
function Ro(e, { select: t = !1 } = {}) {
|
|
532
524
|
const n = document.activeElement;
|
|
533
525
|
for (const o of e)
|
|
534
|
-
if (
|
|
526
|
+
if (be(o, {
|
|
535
527
|
select: t
|
|
536
|
-
}), document.activeElement !== n)
|
|
537
|
-
return;
|
|
528
|
+
}), document.activeElement !== n) return;
|
|
538
529
|
}
|
|
539
530
|
function _o(e) {
|
|
540
531
|
const t = En(e), n = Gt(t, e), o = Gt(t.reverse(), e);
|
|
@@ -550,25 +541,20 @@ function En(e) {
|
|
|
550
541
|
return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
551
542
|
}
|
|
552
543
|
});
|
|
553
|
-
for (; n.nextNode(); )
|
|
554
|
-
t.push(n.currentNode);
|
|
544
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
555
545
|
return t;
|
|
556
546
|
}
|
|
557
547
|
function Gt(e, t) {
|
|
558
548
|
for (const n of e)
|
|
559
549
|
if (!Do(n, {
|
|
560
550
|
upTo: t
|
|
561
|
-
}))
|
|
562
|
-
return n;
|
|
551
|
+
})) return n;
|
|
563
552
|
}
|
|
564
553
|
function Do(e, { upTo: t }) {
|
|
565
|
-
if (getComputedStyle(e).visibility === "hidden")
|
|
566
|
-
return !0;
|
|
554
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
567
555
|
for (; e; ) {
|
|
568
|
-
if (t !== void 0 && e === t)
|
|
569
|
-
|
|
570
|
-
if (getComputedStyle(e).display === "none")
|
|
571
|
-
return !0;
|
|
556
|
+
if (t !== void 0 && e === t) return !1;
|
|
557
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
572
558
|
e = e.parentElement;
|
|
573
559
|
}
|
|
574
560
|
return !1;
|
|
@@ -576,7 +562,7 @@ function Do(e, { upTo: t }) {
|
|
|
576
562
|
function Io(e) {
|
|
577
563
|
return e instanceof HTMLInputElement && "select" in e;
|
|
578
564
|
}
|
|
579
|
-
function
|
|
565
|
+
function be(e, { select: t = !1 } = {}) {
|
|
580
566
|
if (e && e.focus) {
|
|
581
567
|
const n = document.activeElement;
|
|
582
568
|
e.focus({
|
|
@@ -604,17 +590,17 @@ function Qt(e, t) {
|
|
|
604
590
|
], o = n.indexOf(t);
|
|
605
591
|
return o !== -1 && n.splice(o, 1), n;
|
|
606
592
|
}
|
|
607
|
-
function
|
|
593
|
+
function Mo(e) {
|
|
608
594
|
return e.filter(
|
|
609
595
|
(t) => t.tagName !== "A"
|
|
610
596
|
);
|
|
611
597
|
}
|
|
612
598
|
const ie = globalThis != null && globalThis.document ? $n : () => {
|
|
613
|
-
},
|
|
599
|
+
}, Lo = C.useId || (() => {
|
|
614
600
|
});
|
|
615
601
|
let ko = 0;
|
|
616
602
|
function Pn(e) {
|
|
617
|
-
const [t, n] = C.useState(
|
|
603
|
+
const [t, n] = C.useState(Lo());
|
|
618
604
|
return ie(() => {
|
|
619
605
|
e || n(
|
|
620
606
|
(o) => o ?? String(ko++)
|
|
@@ -623,7 +609,7 @@ function Pn(e) {
|
|
|
623
609
|
e
|
|
624
610
|
]), e || (t ? `radix-${t}` : "");
|
|
625
611
|
}
|
|
626
|
-
const Fo = ["top", "right", "bottom", "left"], de = Math.min, oe = Math.max, lt = Math.round, Qe = Math.floor,
|
|
612
|
+
const Fo = ["top", "right", "bottom", "left"], de = Math.min, oe = Math.max, lt = Math.round, Qe = Math.floor, xe = (e) => ({
|
|
627
613
|
x: e,
|
|
628
614
|
y: e
|
|
629
615
|
}), Bo = {
|
|
@@ -635,41 +621,41 @@ const Fo = ["top", "right", "bottom", "left"], de = Math.min, oe = Math.max, lt
|
|
|
635
621
|
start: "end",
|
|
636
622
|
end: "start"
|
|
637
623
|
};
|
|
638
|
-
function
|
|
624
|
+
function Ot(e, t, n) {
|
|
639
625
|
return oe(e, de(t, n));
|
|
640
626
|
}
|
|
641
|
-
function
|
|
627
|
+
function ve(e, t) {
|
|
642
628
|
return typeof e == "function" ? e(t) : e;
|
|
643
629
|
}
|
|
644
|
-
function
|
|
630
|
+
function ge(e) {
|
|
645
631
|
return e.split("-")[0];
|
|
646
632
|
}
|
|
647
|
-
function
|
|
633
|
+
function Fe(e) {
|
|
648
634
|
return e.split("-")[1];
|
|
649
635
|
}
|
|
650
636
|
function Lt(e) {
|
|
651
637
|
return e === "x" ? "y" : "x";
|
|
652
638
|
}
|
|
653
|
-
function
|
|
639
|
+
function kt(e) {
|
|
654
640
|
return e === "y" ? "height" : "width";
|
|
655
641
|
}
|
|
656
|
-
function
|
|
657
|
-
return ["top", "bottom"].includes(
|
|
642
|
+
function ye(e) {
|
|
643
|
+
return ["top", "bottom"].includes(ge(e)) ? "y" : "x";
|
|
658
644
|
}
|
|
659
|
-
function
|
|
660
|
-
return Lt(
|
|
645
|
+
function Ft(e) {
|
|
646
|
+
return Lt(ye(e));
|
|
661
647
|
}
|
|
662
648
|
function Ho(e, t, n) {
|
|
663
649
|
n === void 0 && (n = !1);
|
|
664
|
-
const o =
|
|
650
|
+
const o = Fe(e), r = Ft(e), c = kt(r);
|
|
665
651
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
666
652
|
return t.reference[c] > t.floating[c] && (s = dt(s)), [s, dt(s)];
|
|
667
653
|
}
|
|
668
654
|
function Vo(e) {
|
|
669
655
|
const t = dt(e);
|
|
670
|
-
return [
|
|
656
|
+
return [Rt(e), t, Rt(t)];
|
|
671
657
|
}
|
|
672
|
-
function
|
|
658
|
+
function Rt(e) {
|
|
673
659
|
return e.replace(/start|end/g, (t) => Wo[t]);
|
|
674
660
|
}
|
|
675
661
|
function zo(e, t, n) {
|
|
@@ -686,9 +672,9 @@ function zo(e, t, n) {
|
|
|
686
672
|
}
|
|
687
673
|
}
|
|
688
674
|
function Uo(e, t, n, o) {
|
|
689
|
-
const r =
|
|
690
|
-
let c = zo(
|
|
691
|
-
return r && (c = c.map((s) => s + "-" + r), t && (c = c.concat(c.map(
|
|
675
|
+
const r = Fe(e);
|
|
676
|
+
let c = zo(ge(e), n === "start", o);
|
|
677
|
+
return r && (c = c.map((s) => s + "-" + r), t && (c = c.concat(c.map(Rt)))), c;
|
|
692
678
|
}
|
|
693
679
|
function dt(e) {
|
|
694
680
|
return e.replace(/left|right|bottom|top/g, (t) => Bo[t]);
|
|
@@ -733,7 +719,7 @@ function Jt(e, t, n) {
|
|
|
733
719
|
reference: o,
|
|
734
720
|
floating: r
|
|
735
721
|
} = e;
|
|
736
|
-
const c =
|
|
722
|
+
const c = ye(t), s = Ft(t), i = kt(s), a = ge(t), l = c === "y", f = o.x + o.width / 2 - r.width / 2, u = o.y + o.height / 2 - r.height / 2, w = o[i] / 2 - r[i] / 2;
|
|
737
723
|
let p;
|
|
738
724
|
switch (a) {
|
|
739
725
|
case "top":
|
|
@@ -766,7 +752,7 @@ function Jt(e, t, n) {
|
|
|
766
752
|
y: o.y
|
|
767
753
|
};
|
|
768
754
|
}
|
|
769
|
-
switch (
|
|
755
|
+
switch (Fe(t)) {
|
|
770
756
|
case "start":
|
|
771
757
|
p[s] -= w * (n && l ? -1 : 1);
|
|
772
758
|
break;
|
|
@@ -853,7 +839,7 @@ async function Xe(e, t) {
|
|
|
853
839
|
elementContext: u = "floating",
|
|
854
840
|
altBoundary: w = !1,
|
|
855
841
|
padding: p = 0
|
|
856
|
-
} =
|
|
842
|
+
} = ve(t, e), h = Tn(p), v = i[w ? u === "floating" ? "reference" : "floating" : u], m = ut(await c.getClippingRect({
|
|
857
843
|
element: (n = await (c.isElement == null ? void 0 : c.isElement(v))) == null || n ? v : v.contextElement || await (c.getDocumentElement == null ? void 0 : c.getDocumentElement(i.floating)),
|
|
858
844
|
boundary: l,
|
|
859
845
|
rootBoundary: f,
|
|
@@ -897,26 +883,26 @@ const Xo = (e) => ({
|
|
|
897
883
|
} = t, {
|
|
898
884
|
element: l,
|
|
899
885
|
padding: f = 0
|
|
900
|
-
} =
|
|
886
|
+
} = ve(e, t) || {};
|
|
901
887
|
if (l == null)
|
|
902
888
|
return {};
|
|
903
889
|
const u = Tn(f), w = {
|
|
904
890
|
x: n,
|
|
905
891
|
y: o
|
|
906
|
-
}, p =
|
|
892
|
+
}, p = Ft(r), h = kt(p), d = await s.getDimensions(l), v = p === "y", m = v ? "top" : "left", g = v ? "bottom" : "right", $ = v ? "clientHeight" : "clientWidth", b = c.reference[h] + c.reference[p] - w[p] - c.floating[h], x = w[p] - c.reference[p], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
907
893
|
let E = T ? T[$] : 0;
|
|
908
894
|
(!E || !await (s.isElement == null ? void 0 : s.isElement(T))) && (E = i.floating[$] || c.floating[h]);
|
|
909
|
-
const y = b / 2 - x / 2,
|
|
895
|
+
const y = b / 2 - x / 2, R = E / 2 - d[h] / 2 - 1, L = de(u[m], R), D = de(u[g], R), F = L, H = E - d[h] - D, _ = E / 2 - d[h] / 2 + y, O = Ot(F, _, H), V = !a.arrow && Fe(r) != null && _ !== O && c.reference[h] / 2 - (_ < F ? L : D) - d[h] / 2 < 0, A = V ? _ < F ? _ - F : _ - H : 0;
|
|
910
896
|
return {
|
|
911
|
-
[p]: w[p] +
|
|
897
|
+
[p]: w[p] + A,
|
|
912
898
|
data: {
|
|
913
|
-
[p]:
|
|
914
|
-
centerOffset:
|
|
915
|
-
...
|
|
916
|
-
alignmentOffset:
|
|
899
|
+
[p]: O,
|
|
900
|
+
centerOffset: _ - O - A,
|
|
901
|
+
...V && {
|
|
902
|
+
alignmentOffset: A
|
|
917
903
|
}
|
|
918
904
|
},
|
|
919
|
-
reset:
|
|
905
|
+
reset: V
|
|
920
906
|
};
|
|
921
907
|
}
|
|
922
908
|
}), jo = function(e) {
|
|
@@ -940,50 +926,58 @@ const Xo = (e) => ({
|
|
|
940
926
|
fallbackAxisSideDirection: h = "none",
|
|
941
927
|
flipAlignment: d = !0,
|
|
942
928
|
...v
|
|
943
|
-
} =
|
|
929
|
+
} = ve(e, t);
|
|
944
930
|
if ((n = c.arrow) != null && n.alignmentOffset)
|
|
945
931
|
return {};
|
|
946
|
-
const m =
|
|
947
|
-
!w &&
|
|
948
|
-
const
|
|
949
|
-
let
|
|
950
|
-
if (f &&
|
|
951
|
-
const
|
|
952
|
-
|
|
932
|
+
const m = ge(r), g = ye(i), $ = ge(i) === i, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = w || ($ || !d ? [dt(i)] : Vo(i)), T = h !== "none";
|
|
933
|
+
!w && T && x.push(...Uo(i, d, h, b));
|
|
934
|
+
const E = [i, ...x], y = await Xe(t, v), R = [];
|
|
935
|
+
let L = ((o = c.flip) == null ? void 0 : o.overflows) || [];
|
|
936
|
+
if (f && R.push(y[m]), u) {
|
|
937
|
+
const _ = Ho(r, s, b);
|
|
938
|
+
R.push(y[_[0]], y[_[1]]);
|
|
953
939
|
}
|
|
954
|
-
if (
|
|
940
|
+
if (L = [...L, {
|
|
955
941
|
placement: r,
|
|
956
|
-
overflows:
|
|
957
|
-
}], !
|
|
958
|
-
var
|
|
959
|
-
const
|
|
960
|
-
if (
|
|
942
|
+
overflows: R
|
|
943
|
+
}], !R.every((_) => _ <= 0)) {
|
|
944
|
+
var D, F;
|
|
945
|
+
const _ = (((D = c.flip) == null ? void 0 : D.index) || 0) + 1, O = E[_];
|
|
946
|
+
if (O)
|
|
961
947
|
return {
|
|
962
948
|
data: {
|
|
963
|
-
index:
|
|
964
|
-
overflows:
|
|
949
|
+
index: _,
|
|
950
|
+
overflows: L
|
|
965
951
|
},
|
|
966
952
|
reset: {
|
|
967
|
-
placement:
|
|
953
|
+
placement: O
|
|
968
954
|
}
|
|
969
955
|
};
|
|
970
|
-
let
|
|
971
|
-
if (!
|
|
956
|
+
let V = (F = L.filter((A) => A.overflows[0] <= 0).sort((A, K) => A.overflows[1] - K.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
957
|
+
if (!V)
|
|
972
958
|
switch (p) {
|
|
973
959
|
case "bestFit": {
|
|
974
|
-
var
|
|
975
|
-
const A = (
|
|
976
|
-
|
|
960
|
+
var H;
|
|
961
|
+
const A = (H = L.filter((K) => {
|
|
962
|
+
if (T) {
|
|
963
|
+
const B = ye(K.placement);
|
|
964
|
+
return B === g || // Create a bias to the `y` side axis due to horizontal
|
|
965
|
+
// reading directions favoring greater width.
|
|
966
|
+
B === "y";
|
|
967
|
+
}
|
|
968
|
+
return !0;
|
|
969
|
+
}).map((K) => [K.placement, K.overflows.filter((B) => B > 0).reduce((B, pe) => B + pe, 0)]).sort((K, B) => K[1] - B[1])[0]) == null ? void 0 : H[0];
|
|
970
|
+
A && (V = A);
|
|
977
971
|
break;
|
|
978
972
|
}
|
|
979
973
|
case "initialPlacement":
|
|
980
|
-
|
|
974
|
+
V = i;
|
|
981
975
|
break;
|
|
982
976
|
}
|
|
983
|
-
if (r !==
|
|
977
|
+
if (r !== V)
|
|
984
978
|
return {
|
|
985
979
|
reset: {
|
|
986
|
-
placement:
|
|
980
|
+
placement: V
|
|
987
981
|
}
|
|
988
982
|
};
|
|
989
983
|
}
|
|
@@ -1012,7 +1006,7 @@ const qo = function(e) {
|
|
|
1012
1006
|
} = t, {
|
|
1013
1007
|
strategy: o = "referenceHidden",
|
|
1014
1008
|
...r
|
|
1015
|
-
} =
|
|
1009
|
+
} = ve(e, t);
|
|
1016
1010
|
switch (o) {
|
|
1017
1011
|
case "referenceHidden": {
|
|
1018
1012
|
const c = await Xe(t, {
|
|
@@ -1049,7 +1043,7 @@ async function Go(e, t) {
|
|
|
1049
1043
|
placement: n,
|
|
1050
1044
|
platform: o,
|
|
1051
1045
|
elements: r
|
|
1052
|
-
} = e, c = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s =
|
|
1046
|
+
} = e, c = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = ge(n), i = Fe(n), a = ye(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = c && a ? -1 : 1, u = ve(t, e);
|
|
1053
1047
|
let {
|
|
1054
1048
|
mainAxis: w,
|
|
1055
1049
|
crossAxis: p,
|
|
@@ -1119,18 +1113,18 @@ const Zo = function(e) {
|
|
|
1119
1113
|
}
|
|
1120
1114
|
},
|
|
1121
1115
|
...a
|
|
1122
|
-
} =
|
|
1116
|
+
} = ve(e, t), l = {
|
|
1123
1117
|
x: n,
|
|
1124
1118
|
y: o
|
|
1125
|
-
}, f = await Xe(t, a), u =
|
|
1119
|
+
}, f = await Xe(t, a), u = ye(ge(r)), w = Lt(u);
|
|
1126
1120
|
let p = l[w], h = l[u];
|
|
1127
1121
|
if (c) {
|
|
1128
1122
|
const v = w === "y" ? "top" : "left", m = w === "y" ? "bottom" : "right", g = p + f[v], $ = p - f[m];
|
|
1129
|
-
p =
|
|
1123
|
+
p = Ot(g, p, $);
|
|
1130
1124
|
}
|
|
1131
1125
|
if (s) {
|
|
1132
1126
|
const v = u === "y" ? "top" : "left", m = u === "y" ? "bottom" : "right", g = h + f[v], $ = h - f[m];
|
|
1133
|
-
h =
|
|
1127
|
+
h = Ot(g, h, $);
|
|
1134
1128
|
}
|
|
1135
1129
|
const d = i.fn({
|
|
1136
1130
|
...t,
|
|
@@ -1160,12 +1154,12 @@ const Zo = function(e) {
|
|
|
1160
1154
|
offset: i = 0,
|
|
1161
1155
|
mainAxis: a = !0,
|
|
1162
1156
|
crossAxis: l = !0
|
|
1163
|
-
} =
|
|
1157
|
+
} = ve(e, t), f = {
|
|
1164
1158
|
x: n,
|
|
1165
1159
|
y: o
|
|
1166
|
-
}, u =
|
|
1160
|
+
}, u = ye(r), w = Lt(u);
|
|
1167
1161
|
let p = f[w], h = f[u];
|
|
1168
|
-
const d =
|
|
1162
|
+
const d = ve(i, t), v = typeof d == "number" ? {
|
|
1169
1163
|
mainAxis: d,
|
|
1170
1164
|
crossAxis: 0
|
|
1171
1165
|
} : {
|
|
@@ -1179,7 +1173,7 @@ const Zo = function(e) {
|
|
|
1179
1173
|
}
|
|
1180
1174
|
if (l) {
|
|
1181
1175
|
var m, g;
|
|
1182
|
-
const $ = w === "y" ? "width" : "height", b = ["top", "left"].includes(
|
|
1176
|
+
const $ = w === "y" ? "width" : "height", b = ["top", "left"].includes(ge(r)), x = c.reference[u] - c.floating[$] + (b && ((m = s.offset) == null ? void 0 : m[u]) || 0) + (b ? 0 : v.crossAxis), T = c.reference[u] + c.reference[$] + (b ? 0 : ((g = s.offset) == null ? void 0 : g[u]) || 0) - (b ? v.crossAxis : 0);
|
|
1183
1177
|
h < x ? h = x : h > T && (h = T);
|
|
1184
1178
|
}
|
|
1185
1179
|
return {
|
|
@@ -1202,7 +1196,7 @@ const Zo = function(e) {
|
|
|
1202
1196
|
apply: s = () => {
|
|
1203
1197
|
},
|
|
1204
1198
|
...i
|
|
1205
|
-
} =
|
|
1199
|
+
} = ve(e, t), a = await Xe(t, i), l = ge(n), f = Fe(n), u = ye(n) === "y", {
|
|
1206
1200
|
width: w,
|
|
1207
1201
|
height: p
|
|
1208
1202
|
} = o.floating;
|
|
@@ -1211,8 +1205,8 @@ const Zo = function(e) {
|
|
|
1211
1205
|
const v = p - a.top - a.bottom, m = w - a.left - a.right, g = de(p - a[h], v), $ = de(w - a[d], m), b = !t.middlewareData.shift;
|
|
1212
1206
|
let x = g, T = $;
|
|
1213
1207
|
if (u ? T = f || b ? de($, m) : m : x = f || b ? de(g, v) : v, b && !f) {
|
|
1214
|
-
const y = oe(a.left, 0),
|
|
1215
|
-
u ? T = w - 2 * (y !== 0 ||
|
|
1208
|
+
const y = oe(a.left, 0), R = oe(a.right, 0), L = oe(a.top, 0), D = oe(a.bottom, 0);
|
|
1209
|
+
u ? T = w - 2 * (y !== 0 || R !== 0 ? y + R : oe(a.left, a.right)) : x = p - 2 * (L !== 0 || D !== 0 ? L + D : oe(a.top, a.bottom));
|
|
1216
1210
|
}
|
|
1217
1211
|
await s({
|
|
1218
1212
|
...t,
|
|
@@ -1235,7 +1229,7 @@ function re(e) {
|
|
|
1235
1229
|
var t;
|
|
1236
1230
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1237
1231
|
}
|
|
1238
|
-
function
|
|
1232
|
+
function we(e) {
|
|
1239
1233
|
var t;
|
|
1240
1234
|
return (t = (An(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1241
1235
|
}
|
|
@@ -1263,20 +1257,31 @@ function qe(e) {
|
|
|
1263
1257
|
function tr(e) {
|
|
1264
1258
|
return ["table", "td", "th"].includes(Be(e));
|
|
1265
1259
|
}
|
|
1266
|
-
function
|
|
1267
|
-
|
|
1260
|
+
function ht(e) {
|
|
1261
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
1262
|
+
try {
|
|
1263
|
+
return e.matches(t);
|
|
1264
|
+
} catch {
|
|
1265
|
+
return !1;
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
function Bt(e) {
|
|
1270
|
+
const t = Wt(), n = le(e);
|
|
1268
1271
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
1269
1272
|
}
|
|
1270
1273
|
function nr(e) {
|
|
1271
|
-
let t =
|
|
1274
|
+
let t = Se(e);
|
|
1272
1275
|
for (; fe(t) && !Le(t); ) {
|
|
1273
|
-
if (
|
|
1276
|
+
if (ht(t))
|
|
1277
|
+
return null;
|
|
1278
|
+
if (Bt(t))
|
|
1274
1279
|
return t;
|
|
1275
|
-
t =
|
|
1280
|
+
t = Se(t);
|
|
1276
1281
|
}
|
|
1277
1282
|
return null;
|
|
1278
1283
|
}
|
|
1279
|
-
function
|
|
1284
|
+
function Wt() {
|
|
1280
1285
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1281
1286
|
}
|
|
1282
1287
|
function Le(e) {
|
|
@@ -1285,16 +1290,16 @@ function Le(e) {
|
|
|
1285
1290
|
function le(e) {
|
|
1286
1291
|
return re(e).getComputedStyle(e);
|
|
1287
1292
|
}
|
|
1288
|
-
function
|
|
1293
|
+
function mt(e) {
|
|
1289
1294
|
return ue(e) ? {
|
|
1290
1295
|
scrollLeft: e.scrollLeft,
|
|
1291
1296
|
scrollTop: e.scrollTop
|
|
1292
1297
|
} : {
|
|
1293
|
-
scrollLeft: e.
|
|
1294
|
-
scrollTop: e.
|
|
1298
|
+
scrollLeft: e.scrollX,
|
|
1299
|
+
scrollTop: e.scrollY
|
|
1295
1300
|
};
|
|
1296
1301
|
}
|
|
1297
|
-
function
|
|
1302
|
+
function Se(e) {
|
|
1298
1303
|
if (Be(e) === "html")
|
|
1299
1304
|
return e;
|
|
1300
1305
|
const t = (
|
|
@@ -1302,12 +1307,12 @@ function xe(e) {
|
|
|
1302
1307
|
e.assignedSlot || // DOM Element detected.
|
|
1303
1308
|
e.parentNode || // ShadowRoot detected.
|
|
1304
1309
|
nn(e) && e.host || // Fallback.
|
|
1305
|
-
|
|
1310
|
+
we(e)
|
|
1306
1311
|
);
|
|
1307
1312
|
return nn(t) ? t.host : t;
|
|
1308
1313
|
}
|
|
1309
1314
|
function On(e) {
|
|
1310
|
-
const t =
|
|
1315
|
+
const t = Se(e);
|
|
1311
1316
|
return Le(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : fe(t) && qe(t) ? t : On(t);
|
|
1312
1317
|
}
|
|
1313
1318
|
function je(e, t, n) {
|
|
@@ -1326,13 +1331,13 @@ function Rn(e) {
|
|
|
1326
1331
|
$: i
|
|
1327
1332
|
};
|
|
1328
1333
|
}
|
|
1329
|
-
function
|
|
1334
|
+
function Ht(e) {
|
|
1330
1335
|
return ue(e) ? e : e.contextElement;
|
|
1331
1336
|
}
|
|
1332
|
-
function
|
|
1333
|
-
const t =
|
|
1337
|
+
function Ie(e) {
|
|
1338
|
+
const t = Ht(e);
|
|
1334
1339
|
if (!fe(t))
|
|
1335
|
-
return
|
|
1340
|
+
return xe(1);
|
|
1336
1341
|
const n = t.getBoundingClientRect(), {
|
|
1337
1342
|
width: o,
|
|
1338
1343
|
height: r,
|
|
@@ -1344,10 +1349,10 @@ function De(e) {
|
|
|
1344
1349
|
y: i
|
|
1345
1350
|
};
|
|
1346
1351
|
}
|
|
1347
|
-
const or = /* @__PURE__ */
|
|
1352
|
+
const or = /* @__PURE__ */ xe(0);
|
|
1348
1353
|
function _n(e) {
|
|
1349
1354
|
const t = re(e);
|
|
1350
|
-
return !
|
|
1355
|
+
return !Wt() || !t.visualViewport ? or : {
|
|
1351
1356
|
x: t.visualViewport.offsetLeft,
|
|
1352
1357
|
y: t.visualViewport.offsetTop
|
|
1353
1358
|
};
|
|
@@ -1355,18 +1360,18 @@ function _n(e) {
|
|
|
1355
1360
|
function rr(e, t, n) {
|
|
1356
1361
|
return t === void 0 && (t = !1), !n || t && n !== re(e) ? !1 : t;
|
|
1357
1362
|
}
|
|
1358
|
-
function
|
|
1363
|
+
function Ee(e, t, n, o) {
|
|
1359
1364
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1360
|
-
const r = e.getBoundingClientRect(), c =
|
|
1361
|
-
let s =
|
|
1362
|
-
t && (o ? ue(o) && (s =
|
|
1363
|
-
const i = rr(c, n, o) ? _n(c) :
|
|
1365
|
+
const r = e.getBoundingClientRect(), c = Ht(e);
|
|
1366
|
+
let s = xe(1);
|
|
1367
|
+
t && (o ? ue(o) && (s = Ie(o)) : s = Ie(e));
|
|
1368
|
+
const i = rr(c, n, o) ? _n(c) : xe(0);
|
|
1364
1369
|
let a = (r.left + i.x) / s.x, l = (r.top + i.y) / s.y, f = r.width / s.x, u = r.height / s.y;
|
|
1365
1370
|
if (c) {
|
|
1366
1371
|
const w = re(c), p = o && ue(o) ? re(o) : o;
|
|
1367
1372
|
let h = w, d = h.frameElement;
|
|
1368
1373
|
for (; d && o && p !== h; ) {
|
|
1369
|
-
const v =
|
|
1374
|
+
const v = Ie(d), m = d.getBoundingClientRect(), g = le(d), $ = m.left + (d.clientLeft + parseFloat(g.paddingLeft)) * v.x, b = m.top + (d.clientTop + parseFloat(g.paddingTop)) * v.y;
|
|
1370
1375
|
a *= v.x, l *= v.y, f *= v.x, u *= v.y, a += $, l += b, h = re(d), d = h.frameElement;
|
|
1371
1376
|
}
|
|
1372
1377
|
}
|
|
@@ -1377,34 +1382,24 @@ function Ce(e, t, n, o) {
|
|
|
1377
1382
|
y: l
|
|
1378
1383
|
});
|
|
1379
1384
|
}
|
|
1380
|
-
|
|
1381
|
-
function Ht(e) {
|
|
1382
|
-
return ir.some((t) => {
|
|
1383
|
-
try {
|
|
1384
|
-
return e.matches(t);
|
|
1385
|
-
} catch {
|
|
1386
|
-
return !1;
|
|
1387
|
-
}
|
|
1388
|
-
});
|
|
1389
|
-
}
|
|
1390
|
-
function cr(e) {
|
|
1385
|
+
function ir(e) {
|
|
1391
1386
|
let {
|
|
1392
1387
|
elements: t,
|
|
1393
1388
|
rect: n,
|
|
1394
1389
|
offsetParent: o,
|
|
1395
1390
|
strategy: r
|
|
1396
1391
|
} = e;
|
|
1397
|
-
const c = r === "fixed", s =
|
|
1392
|
+
const c = r === "fixed", s = we(o), i = t ? ht(t.floating) : !1;
|
|
1398
1393
|
if (o === s || i && c)
|
|
1399
1394
|
return n;
|
|
1400
1395
|
let a = {
|
|
1401
1396
|
scrollLeft: 0,
|
|
1402
1397
|
scrollTop: 0
|
|
1403
|
-
}, l =
|
|
1404
|
-
const f =
|
|
1405
|
-
if ((u || !u && !c) && ((Be(o) !== "body" || qe(s)) && (a =
|
|
1406
|
-
const w =
|
|
1407
|
-
l =
|
|
1398
|
+
}, l = xe(1);
|
|
1399
|
+
const f = xe(0), u = fe(o);
|
|
1400
|
+
if ((u || !u && !c) && ((Be(o) !== "body" || qe(s)) && (a = mt(o)), fe(o))) {
|
|
1401
|
+
const w = Ee(o);
|
|
1402
|
+
l = Ie(o), f.x = w.x + o.clientLeft, f.y = w.y + o.clientTop;
|
|
1408
1403
|
}
|
|
1409
1404
|
return {
|
|
1410
1405
|
width: n.width * l.x,
|
|
@@ -1413,14 +1408,14 @@ function cr(e) {
|
|
|
1413
1408
|
y: n.y * l.y - a.scrollTop * l.y + f.y
|
|
1414
1409
|
};
|
|
1415
1410
|
}
|
|
1416
|
-
function
|
|
1411
|
+
function cr(e) {
|
|
1417
1412
|
return Array.from(e.getClientRects());
|
|
1418
1413
|
}
|
|
1419
1414
|
function Dn(e) {
|
|
1420
|
-
return
|
|
1415
|
+
return Ee(we(e)).left + mt(e).scrollLeft;
|
|
1421
1416
|
}
|
|
1422
|
-
function
|
|
1423
|
-
const t =
|
|
1417
|
+
function sr(e) {
|
|
1418
|
+
const t = we(e), n = mt(e), o = e.ownerDocument.body, r = oe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), c = oe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1424
1419
|
let s = -n.scrollLeft + Dn(e);
|
|
1425
1420
|
const i = -n.scrollTop;
|
|
1426
1421
|
return le(o).direction === "rtl" && (s += oe(t.clientWidth, o.clientWidth) - r), {
|
|
@@ -1430,12 +1425,12 @@ function ar(e) {
|
|
|
1430
1425
|
y: i
|
|
1431
1426
|
};
|
|
1432
1427
|
}
|
|
1433
|
-
function
|
|
1434
|
-
const n = re(e), o =
|
|
1428
|
+
function ar(e, t) {
|
|
1429
|
+
const n = re(e), o = we(e), r = n.visualViewport;
|
|
1435
1430
|
let c = o.clientWidth, s = o.clientHeight, i = 0, a = 0;
|
|
1436
1431
|
if (r) {
|
|
1437
1432
|
c = r.width, s = r.height;
|
|
1438
|
-
const l =
|
|
1433
|
+
const l = Wt();
|
|
1439
1434
|
(!l || l && t === "fixed") && (i = r.offsetLeft, a = r.offsetTop);
|
|
1440
1435
|
}
|
|
1441
1436
|
return {
|
|
@@ -1445,8 +1440,8 @@ function lr(e, t) {
|
|
|
1445
1440
|
y: a
|
|
1446
1441
|
};
|
|
1447
1442
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const n =
|
|
1443
|
+
function lr(e, t) {
|
|
1444
|
+
const n = Ee(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, c = fe(e) ? Ie(e) : xe(1), s = e.clientWidth * c.x, i = e.clientHeight * c.y, a = r * c.x, l = o * c.y;
|
|
1450
1445
|
return {
|
|
1451
1446
|
width: s,
|
|
1452
1447
|
height: i,
|
|
@@ -1457,11 +1452,11 @@ function dr(e, t) {
|
|
|
1457
1452
|
function on(e, t, n) {
|
|
1458
1453
|
let o;
|
|
1459
1454
|
if (t === "viewport")
|
|
1460
|
-
o =
|
|
1455
|
+
o = ar(e, n);
|
|
1461
1456
|
else if (t === "document")
|
|
1462
|
-
o =
|
|
1457
|
+
o = sr(we(e));
|
|
1463
1458
|
else if (ue(t))
|
|
1464
|
-
o =
|
|
1459
|
+
o = lr(t, n);
|
|
1465
1460
|
else {
|
|
1466
1461
|
const r = _n(e);
|
|
1467
1462
|
o = {
|
|
@@ -1473,30 +1468,30 @@ function on(e, t, n) {
|
|
|
1473
1468
|
return ut(o);
|
|
1474
1469
|
}
|
|
1475
1470
|
function In(e, t) {
|
|
1476
|
-
const n =
|
|
1471
|
+
const n = Se(e);
|
|
1477
1472
|
return n === t || !ue(n) || Le(n) ? !1 : le(n).position === "fixed" || In(n, t);
|
|
1478
1473
|
}
|
|
1479
|
-
function
|
|
1474
|
+
function dr(e, t) {
|
|
1480
1475
|
const n = t.get(e);
|
|
1481
1476
|
if (n)
|
|
1482
1477
|
return n;
|
|
1483
1478
|
let o = je(e, [], !1).filter((i) => ue(i) && Be(i) !== "body"), r = null;
|
|
1484
1479
|
const c = le(e).position === "fixed";
|
|
1485
|
-
let s = c ?
|
|
1480
|
+
let s = c ? Se(e) : e;
|
|
1486
1481
|
for (; ue(s) && !Le(s); ) {
|
|
1487
|
-
const i = le(s), a =
|
|
1488
|
-
!a && i.position === "fixed" && (r = null), (c ? !a && !r : !a && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || qe(s) && !a && In(e, s)) ? o = o.filter((f) => f !== s) : r = i, s =
|
|
1482
|
+
const i = le(s), a = Bt(s);
|
|
1483
|
+
!a && i.position === "fixed" && (r = null), (c ? !a && !r : !a && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || qe(s) && !a && In(e, s)) ? o = o.filter((f) => f !== s) : r = i, s = Se(s);
|
|
1489
1484
|
}
|
|
1490
1485
|
return t.set(e, o), o;
|
|
1491
1486
|
}
|
|
1492
|
-
function
|
|
1487
|
+
function ur(e) {
|
|
1493
1488
|
let {
|
|
1494
1489
|
element: t,
|
|
1495
1490
|
boundary: n,
|
|
1496
1491
|
rootBoundary: o,
|
|
1497
1492
|
strategy: r
|
|
1498
1493
|
} = e;
|
|
1499
|
-
const s = [...n === "clippingAncestors" ?
|
|
1494
|
+
const s = [...n === "clippingAncestors" ? ht(t) ? [] : dr(t, this._c) : [].concat(n), o], i = s[0], a = s.reduce((l, f) => {
|
|
1500
1495
|
const u = on(t, f, r);
|
|
1501
1496
|
return l.top = oe(u.top, l.top), l.right = de(u.right, l.right), l.bottom = de(u.bottom, l.bottom), l.left = oe(u.left, l.left), l;
|
|
1502
1497
|
}, on(t, i, r));
|
|
@@ -1507,7 +1502,7 @@ function fr(e) {
|
|
|
1507
1502
|
y: a.top
|
|
1508
1503
|
};
|
|
1509
1504
|
}
|
|
1510
|
-
function
|
|
1505
|
+
function fr(e) {
|
|
1511
1506
|
const {
|
|
1512
1507
|
width: t,
|
|
1513
1508
|
height: n
|
|
@@ -1517,19 +1512,18 @@ function pr(e) {
|
|
|
1517
1512
|
height: n
|
|
1518
1513
|
};
|
|
1519
1514
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const o = fe(t), r =
|
|
1515
|
+
function pr(e, t, n) {
|
|
1516
|
+
const o = fe(t), r = we(t), c = n === "fixed", s = Ee(e, !0, c, t);
|
|
1522
1517
|
let i = {
|
|
1523
1518
|
scrollLeft: 0,
|
|
1524
1519
|
scrollTop: 0
|
|
1525
1520
|
};
|
|
1526
|
-
const a =
|
|
1521
|
+
const a = xe(0);
|
|
1527
1522
|
if (o || !o && !c)
|
|
1528
|
-
if ((Be(t) !== "body" || qe(r)) && (i =
|
|
1529
|
-
const u =
|
|
1523
|
+
if ((Be(t) !== "body" || qe(r)) && (i = mt(t)), o) {
|
|
1524
|
+
const u = Ee(t, !0, c, t);
|
|
1530
1525
|
a.x = u.x + t.clientLeft, a.y = u.y + t.clientTop;
|
|
1531
|
-
} else
|
|
1532
|
-
r && (a.x = Dn(r));
|
|
1526
|
+
} else r && (a.x = Dn(r));
|
|
1533
1527
|
const l = s.left + i.scrollLeft - a.x, f = s.top + i.scrollTop - a.y;
|
|
1534
1528
|
return {
|
|
1535
1529
|
x: l,
|
|
@@ -1538,7 +1532,7 @@ function hr(e, t, n) {
|
|
|
1538
1532
|
height: s.height
|
|
1539
1533
|
};
|
|
1540
1534
|
}
|
|
1541
|
-
function
|
|
1535
|
+
function St(e) {
|
|
1542
1536
|
return le(e).position === "static";
|
|
1543
1537
|
}
|
|
1544
1538
|
function rn(e, t) {
|
|
@@ -1546,26 +1540,26 @@ function rn(e, t) {
|
|
|
1546
1540
|
}
|
|
1547
1541
|
function Nn(e, t) {
|
|
1548
1542
|
const n = re(e);
|
|
1549
|
-
if (
|
|
1543
|
+
if (ht(e))
|
|
1550
1544
|
return n;
|
|
1551
1545
|
if (!fe(e)) {
|
|
1552
|
-
let r =
|
|
1546
|
+
let r = Se(e);
|
|
1553
1547
|
for (; r && !Le(r); ) {
|
|
1554
|
-
if (ue(r) && !
|
|
1548
|
+
if (ue(r) && !St(r))
|
|
1555
1549
|
return r;
|
|
1556
|
-
r =
|
|
1550
|
+
r = Se(r);
|
|
1557
1551
|
}
|
|
1558
1552
|
return n;
|
|
1559
1553
|
}
|
|
1560
1554
|
let o = rn(e, t);
|
|
1561
|
-
for (; o && tr(o) &&
|
|
1555
|
+
for (; o && tr(o) && St(o); )
|
|
1562
1556
|
o = rn(o, t);
|
|
1563
|
-
return o && Le(o) &&
|
|
1557
|
+
return o && Le(o) && St(o) && !Bt(o) ? n : o || nr(e) || n;
|
|
1564
1558
|
}
|
|
1565
|
-
const
|
|
1559
|
+
const hr = async function(e) {
|
|
1566
1560
|
const t = this.getOffsetParent || Nn, n = this.getDimensions, o = await n(e.floating);
|
|
1567
1561
|
return {
|
|
1568
|
-
reference:
|
|
1562
|
+
reference: pr(e.reference, await t(e.floating), e.strategy),
|
|
1569
1563
|
floating: {
|
|
1570
1564
|
x: 0,
|
|
1571
1565
|
y: 0,
|
|
@@ -1574,24 +1568,24 @@ const mr = async function(e) {
|
|
|
1574
1568
|
}
|
|
1575
1569
|
};
|
|
1576
1570
|
};
|
|
1577
|
-
function
|
|
1571
|
+
function mr(e) {
|
|
1578
1572
|
return le(e).direction === "rtl";
|
|
1579
1573
|
}
|
|
1580
|
-
const
|
|
1581
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1582
|
-
getDocumentElement:
|
|
1583
|
-
getClippingRect:
|
|
1574
|
+
const vr = {
|
|
1575
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ir,
|
|
1576
|
+
getDocumentElement: we,
|
|
1577
|
+
getClippingRect: ur,
|
|
1584
1578
|
getOffsetParent: Nn,
|
|
1585
|
-
getElementRects:
|
|
1586
|
-
getClientRects:
|
|
1587
|
-
getDimensions:
|
|
1588
|
-
getScale:
|
|
1579
|
+
getElementRects: hr,
|
|
1580
|
+
getClientRects: cr,
|
|
1581
|
+
getDimensions: fr,
|
|
1582
|
+
getScale: Ie,
|
|
1589
1583
|
isElement: ue,
|
|
1590
|
-
isRTL:
|
|
1584
|
+
isRTL: mr
|
|
1591
1585
|
};
|
|
1592
|
-
function
|
|
1586
|
+
function gr(e, t) {
|
|
1593
1587
|
let n = null, o;
|
|
1594
|
-
const r =
|
|
1588
|
+
const r = we(e);
|
|
1595
1589
|
function c() {
|
|
1596
1590
|
var i;
|
|
1597
1591
|
clearTimeout(o), (i = n) == null || i.disconnect(), n = null;
|
|
@@ -1635,7 +1629,7 @@ function wr(e, t) {
|
|
|
1635
1629
|
}
|
|
1636
1630
|
return s(!0), c;
|
|
1637
1631
|
}
|
|
1638
|
-
function
|
|
1632
|
+
function wr(e, t, n, o) {
|
|
1639
1633
|
o === void 0 && (o = {});
|
|
1640
1634
|
const {
|
|
1641
1635
|
ancestorScroll: r = !0,
|
|
@@ -1643,13 +1637,13 @@ function $r(e, t, n, o) {
|
|
|
1643
1637
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1644
1638
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
1645
1639
|
animationFrame: a = !1
|
|
1646
|
-
} = o, l =
|
|
1640
|
+
} = o, l = Ht(e), f = r || c ? [...l ? je(l) : [], ...je(t)] : [];
|
|
1647
1641
|
f.forEach((m) => {
|
|
1648
1642
|
r && m.addEventListener("scroll", n, {
|
|
1649
1643
|
passive: !0
|
|
1650
1644
|
}), c && m.addEventListener("resize", n);
|
|
1651
1645
|
});
|
|
1652
|
-
const u = l && i ?
|
|
1646
|
+
const u = l && i ? gr(l, n) : null;
|
|
1653
1647
|
let w = -1, p = null;
|
|
1654
1648
|
s && (p = new ResizeObserver((m) => {
|
|
1655
1649
|
let [g] = m;
|
|
@@ -1658,10 +1652,10 @@ function $r(e, t, n, o) {
|
|
|
1658
1652
|
($ = p) == null || $.observe(t);
|
|
1659
1653
|
})), n();
|
|
1660
1654
|
}), l && !a && p.observe(l), p.observe(t));
|
|
1661
|
-
let h, d = a ?
|
|
1655
|
+
let h, d = a ? Ee(e) : null;
|
|
1662
1656
|
a && v();
|
|
1663
1657
|
function v() {
|
|
1664
|
-
const m =
|
|
1658
|
+
const m = Ee(e);
|
|
1665
1659
|
d && (m.x !== d.x || m.y !== d.y || m.width !== d.width || m.height !== d.height) && n(), d = m, h = requestAnimationFrame(v);
|
|
1666
1660
|
}
|
|
1667
1661
|
return n(), () => {
|
|
@@ -1671,9 +1665,9 @@ function $r(e, t, n, o) {
|
|
|
1671
1665
|
}), u == null || u(), (m = p) == null || m.disconnect(), p = null, a && cancelAnimationFrame(h);
|
|
1672
1666
|
};
|
|
1673
1667
|
}
|
|
1674
|
-
const
|
|
1668
|
+
const $r = Zo, br = Qo, xr = jo, yr = er, Sr = qo, cn = Xo, Cr = Jo, Er = (e, t, n) => {
|
|
1675
1669
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1676
|
-
platform:
|
|
1670
|
+
platform: vr,
|
|
1677
1671
|
...n
|
|
1678
1672
|
}, c = {
|
|
1679
1673
|
...r.platform,
|
|
@@ -1684,7 +1678,7 @@ const br = Zo, xr = Qo, yr = jo, Sr = er, Cr = qo, cn = Xo, Er = Jo, Pr = (e, t,
|
|
|
1684
1678
|
platform: c
|
|
1685
1679
|
});
|
|
1686
1680
|
};
|
|
1687
|
-
var rt = typeof document < "u" ? $n :
|
|
1681
|
+
var rt = typeof document < "u" ? $n : Y;
|
|
1688
1682
|
function ft(e, t) {
|
|
1689
1683
|
if (e === t)
|
|
1690
1684
|
return !0;
|
|
@@ -1695,8 +1689,7 @@ function ft(e, t) {
|
|
|
1695
1689
|
let n, o, r;
|
|
1696
1690
|
if (e && t && typeof e == "object") {
|
|
1697
1691
|
if (Array.isArray(e)) {
|
|
1698
|
-
if (n = e.length, n !== t.length)
|
|
1699
|
-
return !1;
|
|
1692
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1700
1693
|
for (o = n; o-- !== 0; )
|
|
1701
1694
|
if (!ft(e[o], t[o]))
|
|
1702
1695
|
return !1;
|
|
@@ -1716,11 +1709,11 @@ function ft(e, t) {
|
|
|
1716
1709
|
}
|
|
1717
1710
|
return e !== e && t !== t;
|
|
1718
1711
|
}
|
|
1719
|
-
function
|
|
1712
|
+
function Mn(e) {
|
|
1720
1713
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1721
1714
|
}
|
|
1722
1715
|
function sn(e, t) {
|
|
1723
|
-
const n =
|
|
1716
|
+
const n = Mn(e);
|
|
1724
1717
|
return Math.round(t * n) / n;
|
|
1725
1718
|
}
|
|
1726
1719
|
function an(e) {
|
|
@@ -1729,7 +1722,7 @@ function an(e) {
|
|
|
1729
1722
|
t.current = e;
|
|
1730
1723
|
}), t;
|
|
1731
1724
|
}
|
|
1732
|
-
function
|
|
1725
|
+
function Pr(e) {
|
|
1733
1726
|
e === void 0 && (e = {});
|
|
1734
1727
|
const {
|
|
1735
1728
|
placement: t = "bottom",
|
|
@@ -1752,82 +1745,82 @@ function Tr(e) {
|
|
|
1752
1745
|
isPositioned: !1
|
|
1753
1746
|
}), [w, p] = C.useState(o);
|
|
1754
1747
|
ft(w, o) || p(o);
|
|
1755
|
-
const [h, d] = C.useState(null), [v, m] = C.useState(null), g = C.useCallback((
|
|
1756
|
-
|
|
1757
|
-
}, []), $ = C.useCallback((
|
|
1758
|
-
|
|
1759
|
-
}, []), b = c || h, x = s || v, T = C.useRef(null), E = C.useRef(null), y = C.useRef(f),
|
|
1748
|
+
const [h, d] = C.useState(null), [v, m] = C.useState(null), g = C.useCallback((A) => {
|
|
1749
|
+
A !== T.current && (T.current = A, d(A));
|
|
1750
|
+
}, []), $ = C.useCallback((A) => {
|
|
1751
|
+
A !== E.current && (E.current = A, m(A));
|
|
1752
|
+
}, []), b = c || h, x = s || v, T = C.useRef(null), E = C.useRef(null), y = C.useRef(f), R = a != null, L = an(a), D = an(r), F = C.useCallback(() => {
|
|
1760
1753
|
if (!T.current || !E.current)
|
|
1761
1754
|
return;
|
|
1762
|
-
const
|
|
1755
|
+
const A = {
|
|
1763
1756
|
placement: t,
|
|
1764
1757
|
strategy: n,
|
|
1765
1758
|
middleware: w
|
|
1766
1759
|
};
|
|
1767
|
-
D.current && (
|
|
1768
|
-
const
|
|
1769
|
-
...
|
|
1760
|
+
D.current && (A.platform = D.current), Er(T.current, E.current, A).then((K) => {
|
|
1761
|
+
const B = {
|
|
1762
|
+
...K,
|
|
1770
1763
|
isPositioned: !0
|
|
1771
1764
|
};
|
|
1772
|
-
|
|
1773
|
-
u(
|
|
1765
|
+
H.current && !ft(y.current, B) && (y.current = B, pt.flushSync(() => {
|
|
1766
|
+
u(B);
|
|
1774
1767
|
}));
|
|
1775
1768
|
});
|
|
1776
1769
|
}, [w, t, n, D]);
|
|
1777
1770
|
rt(() => {
|
|
1778
|
-
l === !1 && y.current.isPositioned && (y.current.isPositioned = !1, u((
|
|
1779
|
-
...
|
|
1771
|
+
l === !1 && y.current.isPositioned && (y.current.isPositioned = !1, u((A) => ({
|
|
1772
|
+
...A,
|
|
1780
1773
|
isPositioned: !1
|
|
1781
1774
|
})));
|
|
1782
1775
|
}, [l]);
|
|
1783
|
-
const
|
|
1784
|
-
rt(() => (
|
|
1785
|
-
|
|
1776
|
+
const H = C.useRef(!1);
|
|
1777
|
+
rt(() => (H.current = !0, () => {
|
|
1778
|
+
H.current = !1;
|
|
1786
1779
|
}), []), rt(() => {
|
|
1787
1780
|
if (b && (T.current = b), x && (E.current = x), b && x) {
|
|
1788
|
-
if (
|
|
1789
|
-
return
|
|
1790
|
-
|
|
1781
|
+
if (L.current)
|
|
1782
|
+
return L.current(b, x, F);
|
|
1783
|
+
F();
|
|
1791
1784
|
}
|
|
1792
|
-
}, [b, x,
|
|
1793
|
-
const
|
|
1785
|
+
}, [b, x, F, L, R]);
|
|
1786
|
+
const _ = C.useMemo(() => ({
|
|
1794
1787
|
reference: T,
|
|
1795
1788
|
floating: E,
|
|
1796
1789
|
setReference: g,
|
|
1797
1790
|
setFloating: $
|
|
1798
|
-
}), [g, $]),
|
|
1791
|
+
}), [g, $]), O = C.useMemo(() => ({
|
|
1799
1792
|
reference: b,
|
|
1800
1793
|
floating: x
|
|
1801
|
-
}), [b, x]),
|
|
1802
|
-
const
|
|
1794
|
+
}), [b, x]), V = C.useMemo(() => {
|
|
1795
|
+
const A = {
|
|
1803
1796
|
position: n,
|
|
1804
1797
|
left: 0,
|
|
1805
1798
|
top: 0
|
|
1806
1799
|
};
|
|
1807
|
-
if (!
|
|
1808
|
-
return
|
|
1809
|
-
const
|
|
1800
|
+
if (!O.floating)
|
|
1801
|
+
return A;
|
|
1802
|
+
const K = sn(O.floating, f.x), B = sn(O.floating, f.y);
|
|
1810
1803
|
return i ? {
|
|
1811
|
-
...
|
|
1812
|
-
transform: "translate(" +
|
|
1813
|
-
...
|
|
1804
|
+
...A,
|
|
1805
|
+
transform: "translate(" + K + "px, " + B + "px)",
|
|
1806
|
+
...Mn(O.floating) >= 1.5 && {
|
|
1814
1807
|
willChange: "transform"
|
|
1815
1808
|
}
|
|
1816
1809
|
} : {
|
|
1817
1810
|
position: n,
|
|
1818
|
-
left:
|
|
1819
|
-
top:
|
|
1811
|
+
left: K,
|
|
1812
|
+
top: B
|
|
1820
1813
|
};
|
|
1821
|
-
}, [n, i,
|
|
1814
|
+
}, [n, i, O.floating, f.x, f.y]);
|
|
1822
1815
|
return C.useMemo(() => ({
|
|
1823
1816
|
...f,
|
|
1824
|
-
update:
|
|
1825
|
-
refs:
|
|
1826
|
-
elements:
|
|
1827
|
-
floatingStyles:
|
|
1828
|
-
}), [f,
|
|
1817
|
+
update: F,
|
|
1818
|
+
refs: _,
|
|
1819
|
+
elements: O,
|
|
1820
|
+
floatingStyles: V
|
|
1821
|
+
}), [f, F, _, O, V]);
|
|
1829
1822
|
}
|
|
1830
|
-
const
|
|
1823
|
+
const Tr = (e) => {
|
|
1831
1824
|
function t(n) {
|
|
1832
1825
|
return {}.hasOwnProperty.call(n, "current");
|
|
1833
1826
|
}
|
|
@@ -1848,14 +1841,17 @@ const Ar = (e) => {
|
|
|
1848
1841
|
}).fn(n) : {};
|
|
1849
1842
|
}
|
|
1850
1843
|
};
|
|
1851
|
-
},
|
|
1844
|
+
}, Ar = (e, t) => ({
|
|
1845
|
+
...$r(e),
|
|
1846
|
+
options: [e, t]
|
|
1847
|
+
}), Or = (e, t) => ({
|
|
1852
1848
|
...br(e),
|
|
1853
1849
|
options: [e, t]
|
|
1854
1850
|
}), Rr = (e, t) => ({
|
|
1855
|
-
...
|
|
1851
|
+
...Cr(e),
|
|
1856
1852
|
options: [e, t]
|
|
1857
1853
|
}), _r = (e, t) => ({
|
|
1858
|
-
...
|
|
1854
|
+
...xr(e),
|
|
1859
1855
|
options: [e, t]
|
|
1860
1856
|
}), Dr = (e, t) => ({
|
|
1861
1857
|
...yr(e),
|
|
@@ -1864,10 +1860,7 @@ const Ar = (e) => {
|
|
|
1864
1860
|
...Sr(e),
|
|
1865
1861
|
options: [e, t]
|
|
1866
1862
|
}), Nr = (e, t) => ({
|
|
1867
|
-
...
|
|
1868
|
-
options: [e, t]
|
|
1869
|
-
}), Lr = (e, t) => ({
|
|
1870
|
-
...Ar(e),
|
|
1863
|
+
...Tr(e),
|
|
1871
1864
|
options: [e, t]
|
|
1872
1865
|
});
|
|
1873
1866
|
function Mr(e) {
|
|
@@ -1879,8 +1872,7 @@ function Mr(e) {
|
|
|
1879
1872
|
height: e.offsetHeight
|
|
1880
1873
|
});
|
|
1881
1874
|
const o = new ResizeObserver((r) => {
|
|
1882
|
-
if (!Array.isArray(r) || !r.length)
|
|
1883
|
-
return;
|
|
1875
|
+
if (!Array.isArray(r) || !r.length) return;
|
|
1884
1876
|
const c = r[0];
|
|
1885
1877
|
let s, i;
|
|
1886
1878
|
if ("borderBoxSize" in c) {
|
|
@@ -1902,118 +1894,118 @@ function Mr(e) {
|
|
|
1902
1894
|
e
|
|
1903
1895
|
]), t;
|
|
1904
1896
|
}
|
|
1905
|
-
const
|
|
1897
|
+
const Ln = "Popper", [kn, Fn] = Mt(Ln), [Lr, Bn] = kn(Ln), kr = (e) => {
|
|
1906
1898
|
const { __scopePopper: t, children: n } = e, [o, r] = k(null);
|
|
1907
|
-
return /* @__PURE__ */ S(
|
|
1899
|
+
return /* @__PURE__ */ S(Lr, {
|
|
1908
1900
|
scope: t,
|
|
1909
1901
|
anchor: o,
|
|
1910
1902
|
onAnchorChange: r
|
|
1911
1903
|
}, n);
|
|
1912
|
-
},
|
|
1913
|
-
const { __scopePopper: n, virtualRef: o, ...r } = e, c = Bn(
|
|
1914
|
-
return
|
|
1904
|
+
}, Fr = "PopperAnchor", Br = /* @__PURE__ */ U((e, t) => {
|
|
1905
|
+
const { __scopePopper: n, virtualRef: o, ...r } = e, c = Bn(Fr, n), s = j(null), i = G(t, s);
|
|
1906
|
+
return Y(() => {
|
|
1915
1907
|
c.onAnchorChange((o == null ? void 0 : o.current) || s.current);
|
|
1916
|
-
}), o ? null : /* @__PURE__ */ S(J.div,
|
|
1908
|
+
}), o ? null : /* @__PURE__ */ S(J.div, W({}, r, {
|
|
1917
1909
|
ref: i
|
|
1918
1910
|
}));
|
|
1919
|
-
}), Wn = "PopperContent", [
|
|
1911
|
+
}), Wn = "PopperContent", [Wr, Oc] = kn(Wn), Hr = /* @__PURE__ */ U((e, t) => {
|
|
1920
1912
|
var n, o, r, c, s, i, a, l;
|
|
1921
|
-
const { __scopePopper: f, side: u = "bottom", sideOffset: w = 0, align: p = "center", alignOffset: h = 0, arrowPadding: d = 0, collisionBoundary: v = [], collisionPadding: m = 0, sticky: g = "partial", hideWhenDetached: $ = !1, avoidCollisions: b = !0, onPlaced: x, ...T } = e, E = Bn(Wn, f), [y,
|
|
1913
|
+
const { __scopePopper: f, side: u = "bottom", sideOffset: w = 0, align: p = "center", alignOffset: h = 0, arrowPadding: d = 0, collisionBoundary: v = [], collisionPadding: m = 0, sticky: g = "partial", hideWhenDetached: $ = !1, avoidCollisions: b = !0, onPlaced: x, ...T } = e, E = Bn(Wn, f), [y, R] = k(null), L = G(
|
|
1922
1914
|
t,
|
|
1923
|
-
(Q) =>
|
|
1924
|
-
), [D,
|
|
1915
|
+
(Q) => R(Q)
|
|
1916
|
+
), [D, F] = k(null), H = Mr(D), _ = (n = H == null ? void 0 : H.width) !== null && n !== void 0 ? n : 0, O = (o = H == null ? void 0 : H.height) !== null && o !== void 0 ? o : 0, V = u + (p !== "center" ? "-" + p : ""), A = typeof m == "number" ? m : {
|
|
1925
1917
|
top: 0,
|
|
1926
1918
|
right: 0,
|
|
1927
1919
|
bottom: 0,
|
|
1928
1920
|
left: 0,
|
|
1929
1921
|
...m
|
|
1930
|
-
},
|
|
1922
|
+
}, K = Array.isArray(v) ? v : [
|
|
1931
1923
|
v
|
|
1932
|
-
],
|
|
1933
|
-
padding:
|
|
1934
|
-
boundary:
|
|
1924
|
+
], B = K.length > 0, pe = {
|
|
1925
|
+
padding: A,
|
|
1926
|
+
boundary: K.filter(Vr),
|
|
1935
1927
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1936
|
-
altBoundary:
|
|
1937
|
-
}, { refs:
|
|
1928
|
+
altBoundary: B
|
|
1929
|
+
}, { refs: Ae, floatingStyles: Oe, placement: He, isPositioned: ce, middlewareData: se } = Pr({
|
|
1938
1930
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1939
1931
|
strategy: "fixed",
|
|
1940
|
-
placement:
|
|
1941
|
-
whileElementsMounted:
|
|
1932
|
+
placement: V,
|
|
1933
|
+
whileElementsMounted: wr,
|
|
1942
1934
|
elements: {
|
|
1943
1935
|
reference: E.anchor
|
|
1944
1936
|
},
|
|
1945
1937
|
middleware: [
|
|
1946
|
-
|
|
1947
|
-
mainAxis: w +
|
|
1938
|
+
Ar({
|
|
1939
|
+
mainAxis: w + O,
|
|
1948
1940
|
alignmentAxis: h
|
|
1949
1941
|
}),
|
|
1950
|
-
b &&
|
|
1942
|
+
b && Or({
|
|
1951
1943
|
mainAxis: !0,
|
|
1952
1944
|
crossAxis: !1,
|
|
1953
|
-
limiter: g === "partial" ?
|
|
1954
|
-
...
|
|
1945
|
+
limiter: g === "partial" ? Rr() : void 0,
|
|
1946
|
+
...pe
|
|
1955
1947
|
}),
|
|
1956
|
-
b &&
|
|
1957
|
-
...
|
|
1948
|
+
b && _r({
|
|
1949
|
+
...pe
|
|
1958
1950
|
}),
|
|
1959
|
-
|
|
1960
|
-
...
|
|
1951
|
+
Dr({
|
|
1952
|
+
...pe,
|
|
1961
1953
|
apply: ({ elements: Q, rects: Ve, availableWidth: ze, availableHeight: Ue }) => {
|
|
1962
1954
|
const { width: to, height: no } = Ve.reference, Ge = Q.floating.style;
|
|
1963
1955
|
Ge.setProperty("--radix-popper-available-width", `${ze}px`), Ge.setProperty("--radix-popper-available-height", `${Ue}px`), Ge.setProperty("--radix-popper-anchor-width", `${to}px`), Ge.setProperty("--radix-popper-anchor-height", `${no}px`);
|
|
1964
1956
|
}
|
|
1965
1957
|
}),
|
|
1966
|
-
D &&
|
|
1958
|
+
D && Nr({
|
|
1967
1959
|
element: D,
|
|
1968
1960
|
padding: d
|
|
1969
1961
|
}),
|
|
1970
|
-
|
|
1971
|
-
arrowWidth:
|
|
1972
|
-
arrowHeight:
|
|
1962
|
+
zr({
|
|
1963
|
+
arrowWidth: _,
|
|
1964
|
+
arrowHeight: O
|
|
1973
1965
|
}),
|
|
1974
|
-
$ &&
|
|
1966
|
+
$ && Ir({
|
|
1975
1967
|
strategy: "referenceHidden"
|
|
1976
1968
|
})
|
|
1977
1969
|
]
|
|
1978
|
-
}), [
|
|
1970
|
+
}), [$e, P] = Hn(He), I = me(x);
|
|
1979
1971
|
ie(() => {
|
|
1980
1972
|
ce && (I == null || I());
|
|
1981
1973
|
}, [
|
|
1982
1974
|
ce,
|
|
1983
1975
|
I
|
|
1984
1976
|
]);
|
|
1985
|
-
const Z = (r = se.arrow) === null || r === void 0 ? void 0 : r.x,
|
|
1977
|
+
const Z = (r = se.arrow) === null || r === void 0 ? void 0 : r.x, z = (c = se.arrow) === null || c === void 0 ? void 0 : c.y, N = ((s = se.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [M, ee] = k();
|
|
1986
1978
|
return ie(() => {
|
|
1987
1979
|
y && ee(window.getComputedStyle(y).zIndex);
|
|
1988
1980
|
}, [
|
|
1989
1981
|
y
|
|
1990
1982
|
]), /* @__PURE__ */ S("div", {
|
|
1991
|
-
ref:
|
|
1983
|
+
ref: Ae.setFloating,
|
|
1992
1984
|
"data-radix-popper-content-wrapper": "",
|
|
1993
1985
|
style: {
|
|
1994
|
-
...
|
|
1995
|
-
transform: ce ?
|
|
1986
|
+
...Oe,
|
|
1987
|
+
transform: ce ? Oe.transform : "translate(0, -200%)",
|
|
1996
1988
|
// keep off the page when measuring
|
|
1997
1989
|
minWidth: "max-content",
|
|
1998
|
-
zIndex:
|
|
1990
|
+
zIndex: M,
|
|
1999
1991
|
"--radix-popper-transform-origin": [
|
|
2000
1992
|
(i = se.transformOrigin) === null || i === void 0 ? void 0 : i.x,
|
|
2001
1993
|
(a = se.transformOrigin) === null || a === void 0 ? void 0 : a.y
|
|
2002
1994
|
].join(" ")
|
|
2003
1995
|
},
|
|
2004
1996
|
dir: e.dir
|
|
2005
|
-
}, /* @__PURE__ */ S(
|
|
1997
|
+
}, /* @__PURE__ */ S(Wr, {
|
|
2006
1998
|
scope: f,
|
|
2007
|
-
placedSide:
|
|
2008
|
-
onArrowChange:
|
|
1999
|
+
placedSide: $e,
|
|
2000
|
+
onArrowChange: F,
|
|
2009
2001
|
arrowX: Z,
|
|
2010
|
-
arrowY:
|
|
2002
|
+
arrowY: z,
|
|
2011
2003
|
shouldHideArrow: N
|
|
2012
|
-
}, /* @__PURE__ */ S(J.div,
|
|
2013
|
-
"data-side":
|
|
2004
|
+
}, /* @__PURE__ */ S(J.div, W({
|
|
2005
|
+
"data-side": $e,
|
|
2014
2006
|
"data-align": P
|
|
2015
2007
|
}, T, {
|
|
2016
|
-
ref:
|
|
2008
|
+
ref: L,
|
|
2017
2009
|
style: {
|
|
2018
2010
|
...T.style,
|
|
2019
2011
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -2024,10 +2016,10 @@ const Mn = "Popper", [kn, Fn] = Nt(Mn), [kr, Bn] = kn(Mn), Fr = (e) => {
|
|
|
2024
2016
|
}
|
|
2025
2017
|
}))));
|
|
2026
2018
|
});
|
|
2027
|
-
function
|
|
2019
|
+
function Vr(e) {
|
|
2028
2020
|
return e !== null;
|
|
2029
2021
|
}
|
|
2030
|
-
const
|
|
2022
|
+
const zr = (e) => ({
|
|
2031
2023
|
name: "transformOrigin",
|
|
2032
2024
|
options: e,
|
|
2033
2025
|
fn(t) {
|
|
@@ -2053,24 +2045,23 @@ function Hn(e) {
|
|
|
2053
2045
|
n
|
|
2054
2046
|
];
|
|
2055
2047
|
}
|
|
2056
|
-
const
|
|
2048
|
+
const Ur = kr, Kr = Br, Yr = Hr, Xr = /* @__PURE__ */ U((e, t) => {
|
|
2057
2049
|
var n;
|
|
2058
2050
|
const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...r } = e;
|
|
2059
|
-
return o ? /* @__PURE__ */ oo.createPortal(/* @__PURE__ */ S(J.div,
|
|
2051
|
+
return o ? /* @__PURE__ */ oo.createPortal(/* @__PURE__ */ S(J.div, W({}, r, {
|
|
2060
2052
|
ref: t
|
|
2061
2053
|
})), o) : null;
|
|
2062
2054
|
});
|
|
2063
2055
|
function ln({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2064
2056
|
} }) {
|
|
2065
|
-
const [o, r] =
|
|
2057
|
+
const [o, r] = jr({
|
|
2066
2058
|
defaultProp: t,
|
|
2067
2059
|
onChange: n
|
|
2068
|
-
}), c = e !== void 0, s = c ? e : o, i =
|
|
2060
|
+
}), c = e !== void 0, s = c ? e : o, i = me(n), a = q((l) => {
|
|
2069
2061
|
if (c) {
|
|
2070
2062
|
const u = typeof l == "function" ? l(e) : l;
|
|
2071
2063
|
u !== e && i(u);
|
|
2072
|
-
} else
|
|
2073
|
-
r(l);
|
|
2064
|
+
} else r(l);
|
|
2074
2065
|
}, [
|
|
2075
2066
|
c,
|
|
2076
2067
|
e,
|
|
@@ -2082,9 +2073,9 @@ function ln({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2082
2073
|
a
|
|
2083
2074
|
];
|
|
2084
2075
|
}
|
|
2085
|
-
function
|
|
2086
|
-
const n = k(e), [o] = n, r =
|
|
2087
|
-
return
|
|
2076
|
+
function jr({ defaultProp: e, onChange: t }) {
|
|
2077
|
+
const n = k(e), [o] = n, r = j(o), c = me(t);
|
|
2078
|
+
return Y(() => {
|
|
2088
2079
|
r.current !== o && (c(o), r.current = o);
|
|
2089
2080
|
}, [
|
|
2090
2081
|
o,
|
|
@@ -2092,16 +2083,16 @@ function qr({ defaultProp: e, onChange: t }) {
|
|
|
2092
2083
|
c
|
|
2093
2084
|
]), n;
|
|
2094
2085
|
}
|
|
2095
|
-
function
|
|
2096
|
-
const t =
|
|
2086
|
+
function qr(e) {
|
|
2087
|
+
const t = j({
|
|
2097
2088
|
value: e,
|
|
2098
2089
|
previous: e
|
|
2099
2090
|
});
|
|
2100
|
-
return
|
|
2091
|
+
return Me(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [
|
|
2101
2092
|
e
|
|
2102
2093
|
]);
|
|
2103
2094
|
}
|
|
2104
|
-
const
|
|
2095
|
+
const Gr = /* @__PURE__ */ U((e, t) => /* @__PURE__ */ S(J.span, W({}, e, {
|
|
2105
2096
|
ref: t,
|
|
2106
2097
|
style: {
|
|
2107
2098
|
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
@@ -2118,14 +2109,14 @@ const Zr = /* @__PURE__ */ z((e, t) => /* @__PURE__ */ S(J.span, B({}, e, {
|
|
|
2118
2109
|
...e.style
|
|
2119
2110
|
}
|
|
2120
2111
|
})));
|
|
2121
|
-
var
|
|
2112
|
+
var Zr = function(e) {
|
|
2122
2113
|
if (typeof document > "u")
|
|
2123
2114
|
return null;
|
|
2124
2115
|
var t = Array.isArray(e) ? e[0] : e;
|
|
2125
2116
|
return t.ownerDocument.body;
|
|
2126
|
-
},
|
|
2117
|
+
}, Re = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), et = {}, Ct = 0, Vn = function(e) {
|
|
2127
2118
|
return e && (e.host || Vn(e.parentNode));
|
|
2128
|
-
},
|
|
2119
|
+
}, Qr = function(e, t) {
|
|
2129
2120
|
return t.map(function(n) {
|
|
2130
2121
|
if (e.contains(n))
|
|
2131
2122
|
return n;
|
|
@@ -2134,8 +2125,8 @@ var Qr = function(e) {
|
|
|
2134
2125
|
}).filter(function(n) {
|
|
2135
2126
|
return !!n;
|
|
2136
2127
|
});
|
|
2137
|
-
},
|
|
2138
|
-
var r =
|
|
2128
|
+
}, Jr = function(e, t, n, o) {
|
|
2129
|
+
var r = Qr(t, Array.isArray(e) ? e : [e]);
|
|
2139
2130
|
et[n] || (et[n] = /* @__PURE__ */ new WeakMap());
|
|
2140
2131
|
var c = et[n], s = [], i = /* @__PURE__ */ new Set(), a = new Set(r), l = function(u) {
|
|
2141
2132
|
!u || i.has(u) || (i.add(u), l(u.parentNode));
|
|
@@ -2147,79 +2138,79 @@ var Qr = function(e) {
|
|
|
2147
2138
|
f(w);
|
|
2148
2139
|
else
|
|
2149
2140
|
try {
|
|
2150
|
-
var p = w.getAttribute(o), h = p !== null && p !== "false", d = (
|
|
2151
|
-
|
|
2141
|
+
var p = w.getAttribute(o), h = p !== null && p !== "false", d = (Re.get(w) || 0) + 1, v = (c.get(w) || 0) + 1;
|
|
2142
|
+
Re.set(w, d), c.set(w, v), s.push(w), d === 1 && h && Je.set(w, !0), v === 1 && w.setAttribute(n, "true"), h || w.setAttribute(o, "true");
|
|
2152
2143
|
} catch (m) {
|
|
2153
2144
|
console.error("aria-hidden: cannot operate on ", w, m);
|
|
2154
2145
|
}
|
|
2155
2146
|
});
|
|
2156
2147
|
};
|
|
2157
|
-
return f(t), i.clear(),
|
|
2148
|
+
return f(t), i.clear(), Ct++, function() {
|
|
2158
2149
|
s.forEach(function(u) {
|
|
2159
|
-
var w =
|
|
2160
|
-
|
|
2161
|
-
}),
|
|
2150
|
+
var w = Re.get(u) - 1, p = c.get(u) - 1;
|
|
2151
|
+
Re.set(u, w), c.set(u, p), w || (Je.has(u) || u.removeAttribute(o), Je.delete(u)), p || u.removeAttribute(n);
|
|
2152
|
+
}), Ct--, Ct || (Re = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), et = {});
|
|
2162
2153
|
};
|
|
2163
|
-
},
|
|
2154
|
+
}, ei = function(e, t, n) {
|
|
2164
2155
|
n === void 0 && (n = "data-aria-hidden");
|
|
2165
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), r =
|
|
2166
|
-
return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live]"))),
|
|
2156
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), r = Zr(e);
|
|
2157
|
+
return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live]"))), Jr(o, r, n, "aria-hidden")) : function() {
|
|
2167
2158
|
return null;
|
|
2168
2159
|
};
|
|
2169
|
-
}, it = "right-scroll-bar-position", ct = "width-before-scroll-bar",
|
|
2170
|
-
},
|
|
2160
|
+
}, it = "right-scroll-bar-position", ct = "width-before-scroll-bar", ti = "with-scroll-bars-hidden", ni = "--removed-body-scroll-bar-size", zn = io(), Et = function() {
|
|
2161
|
+
}, vt = C.forwardRef(function(e, t) {
|
|
2171
2162
|
var n = C.useRef(null), o = C.useState({
|
|
2172
|
-
onScrollCapture:
|
|
2173
|
-
onWheelCapture:
|
|
2174
|
-
onTouchMoveCapture:
|
|
2175
|
-
}), r = o[0], c = o[1], s = e.forwardProps, i = e.children, a = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, w = e.sideCar, p = e.noIsolation, h = e.inert, d = e.allowPinchZoom, v = e.as, m = v === void 0 ? "div" : v, g = bn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), $ = w, b = co([n, t]), x =
|
|
2163
|
+
onScrollCapture: Et,
|
|
2164
|
+
onWheelCapture: Et,
|
|
2165
|
+
onTouchMoveCapture: Et
|
|
2166
|
+
}), r = o[0], c = o[1], s = e.forwardProps, i = e.children, a = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, w = e.sideCar, p = e.noIsolation, h = e.inert, d = e.allowPinchZoom, v = e.as, m = v === void 0 ? "div" : v, g = bn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), $ = w, b = co([n, t]), x = Ce(Ce({}, g), r);
|
|
2176
2167
|
return C.createElement(
|
|
2177
2168
|
C.Fragment,
|
|
2178
2169
|
null,
|
|
2179
2170
|
f && C.createElement($, { sideCar: zn, removeScrollBar: l, shards: u, noIsolation: p, inert: h, setCallbacks: c, allowPinchZoom: !!d, lockRef: n }),
|
|
2180
|
-
s ? C.cloneElement(C.Children.only(i),
|
|
2171
|
+
s ? C.cloneElement(C.Children.only(i), Ce(Ce({}, x), { ref: b })) : C.createElement(m, Ce({}, x, { className: a, ref: b }), i)
|
|
2181
2172
|
);
|
|
2182
2173
|
});
|
|
2183
|
-
|
|
2174
|
+
vt.defaultProps = {
|
|
2184
2175
|
enabled: !0,
|
|
2185
2176
|
removeScrollBar: !0,
|
|
2186
2177
|
inert: !1
|
|
2187
2178
|
};
|
|
2188
|
-
|
|
2179
|
+
vt.classNames = {
|
|
2189
2180
|
fullWidth: ct,
|
|
2190
2181
|
zeroRight: it
|
|
2191
2182
|
};
|
|
2192
|
-
var
|
|
2183
|
+
var oi = function() {
|
|
2193
2184
|
if (typeof __webpack_nonce__ < "u")
|
|
2194
2185
|
return __webpack_nonce__;
|
|
2195
2186
|
};
|
|
2196
|
-
function
|
|
2187
|
+
function ri() {
|
|
2197
2188
|
if (!document)
|
|
2198
2189
|
return null;
|
|
2199
2190
|
var e = document.createElement("style");
|
|
2200
2191
|
e.type = "text/css";
|
|
2201
|
-
var t =
|
|
2192
|
+
var t = oi();
|
|
2202
2193
|
return t && e.setAttribute("nonce", t), e;
|
|
2203
2194
|
}
|
|
2204
|
-
function
|
|
2195
|
+
function ii(e, t) {
|
|
2205
2196
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
2206
2197
|
}
|
|
2207
|
-
function
|
|
2198
|
+
function ci(e) {
|
|
2208
2199
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
2209
2200
|
t.appendChild(e);
|
|
2210
2201
|
}
|
|
2211
|
-
var
|
|
2202
|
+
var si = function() {
|
|
2212
2203
|
var e = 0, t = null;
|
|
2213
2204
|
return {
|
|
2214
2205
|
add: function(n) {
|
|
2215
|
-
e == 0 && (t =
|
|
2206
|
+
e == 0 && (t = ri()) && (ii(t, n), ci(t)), e++;
|
|
2216
2207
|
},
|
|
2217
2208
|
remove: function() {
|
|
2218
2209
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
2219
2210
|
}
|
|
2220
2211
|
};
|
|
2221
|
-
},
|
|
2222
|
-
var e =
|
|
2212
|
+
}, ai = function() {
|
|
2213
|
+
var e = si();
|
|
2223
2214
|
return function(t, n) {
|
|
2224
2215
|
C.useEffect(function() {
|
|
2225
2216
|
return e.add(t), function() {
|
|
@@ -2228,39 +2219,39 @@ var ai = function() {
|
|
|
2228
2219
|
}, [t && n]);
|
|
2229
2220
|
};
|
|
2230
2221
|
}, Un = function() {
|
|
2231
|
-
var e =
|
|
2222
|
+
var e = ai(), t = function(n) {
|
|
2232
2223
|
var o = n.styles, r = n.dynamic;
|
|
2233
2224
|
return e(o, r), null;
|
|
2234
2225
|
};
|
|
2235
2226
|
return t;
|
|
2236
|
-
},
|
|
2227
|
+
}, li = {
|
|
2237
2228
|
left: 0,
|
|
2238
2229
|
top: 0,
|
|
2239
2230
|
right: 0,
|
|
2240
2231
|
gap: 0
|
|
2241
|
-
},
|
|
2232
|
+
}, Pt = function(e) {
|
|
2242
2233
|
return parseInt(e || "", 10) || 0;
|
|
2243
|
-
},
|
|
2234
|
+
}, di = function(e) {
|
|
2244
2235
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2245
|
-
return [
|
|
2246
|
-
},
|
|
2236
|
+
return [Pt(n), Pt(o), Pt(r)];
|
|
2237
|
+
}, ui = function(e) {
|
|
2247
2238
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2248
|
-
return
|
|
2249
|
-
var t =
|
|
2239
|
+
return li;
|
|
2240
|
+
var t = di(e), n = document.documentElement.clientWidth, o = window.innerWidth;
|
|
2250
2241
|
return {
|
|
2251
2242
|
left: t[0],
|
|
2252
2243
|
top: t[1],
|
|
2253
2244
|
right: t[2],
|
|
2254
2245
|
gap: Math.max(0, o - n + t[2] - t[0])
|
|
2255
2246
|
};
|
|
2256
|
-
},
|
|
2247
|
+
}, fi = Un(), Ne = "data-scroll-locked", pi = function(e, t, n, o) {
|
|
2257
2248
|
var r = e.left, c = e.top, s = e.right, i = e.gap;
|
|
2258
2249
|
return n === void 0 && (n = "margin"), `
|
|
2259
|
-
.`.concat(
|
|
2250
|
+
.`.concat(ti, ` {
|
|
2260
2251
|
overflow: hidden `).concat(o, `;
|
|
2261
2252
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
2262
2253
|
}
|
|
2263
|
-
body[`).concat(
|
|
2254
|
+
body[`).concat(Ne, `] {
|
|
2264
2255
|
overflow: hidden `).concat(o, `;
|
|
2265
2256
|
overscroll-behavior: contain;
|
|
2266
2257
|
`).concat([
|
|
@@ -2293,51 +2284,51 @@ var ai = function() {
|
|
|
2293
2284
|
margin-right: 0 `).concat(o, `;
|
|
2294
2285
|
}
|
|
2295
2286
|
|
|
2296
|
-
body[`).concat(
|
|
2297
|
-
`).concat(
|
|
2287
|
+
body[`).concat(Ne, `] {
|
|
2288
|
+
`).concat(ni, ": ").concat(i, `px;
|
|
2298
2289
|
}
|
|
2299
2290
|
`);
|
|
2300
2291
|
}, dn = function() {
|
|
2301
|
-
var e = parseInt(document.body.getAttribute(
|
|
2292
|
+
var e = parseInt(document.body.getAttribute(Ne) || "0", 10);
|
|
2302
2293
|
return isFinite(e) ? e : 0;
|
|
2303
|
-
},
|
|
2294
|
+
}, hi = function() {
|
|
2304
2295
|
C.useEffect(function() {
|
|
2305
|
-
return document.body.setAttribute(
|
|
2296
|
+
return document.body.setAttribute(Ne, (dn() + 1).toString()), function() {
|
|
2306
2297
|
var e = dn() - 1;
|
|
2307
|
-
e <= 0 ? document.body.removeAttribute(
|
|
2298
|
+
e <= 0 ? document.body.removeAttribute(Ne) : document.body.setAttribute(Ne, e.toString());
|
|
2308
2299
|
};
|
|
2309
2300
|
}, []);
|
|
2310
|
-
},
|
|
2301
|
+
}, mi = function(e) {
|
|
2311
2302
|
var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
|
|
2312
|
-
|
|
2303
|
+
hi();
|
|
2313
2304
|
var c = C.useMemo(function() {
|
|
2314
|
-
return
|
|
2305
|
+
return ui(r);
|
|
2315
2306
|
}, [r]);
|
|
2316
|
-
return C.createElement(
|
|
2317
|
-
},
|
|
2307
|
+
return C.createElement(fi, { styles: pi(c, !t, r, n ? "" : "!important") });
|
|
2308
|
+
}, _t = !1;
|
|
2318
2309
|
if (typeof window < "u")
|
|
2319
2310
|
try {
|
|
2320
2311
|
var tt = Object.defineProperty({}, "passive", {
|
|
2321
2312
|
get: function() {
|
|
2322
|
-
return
|
|
2313
|
+
return _t = !0, !0;
|
|
2323
2314
|
}
|
|
2324
2315
|
});
|
|
2325
2316
|
window.addEventListener("test", tt, tt), window.removeEventListener("test", tt, tt);
|
|
2326
2317
|
} catch {
|
|
2327
|
-
|
|
2318
|
+
_t = !1;
|
|
2328
2319
|
}
|
|
2329
|
-
var
|
|
2320
|
+
var _e = _t ? { passive: !1 } : !1, vi = function(e) {
|
|
2330
2321
|
return e.tagName === "TEXTAREA";
|
|
2331
2322
|
}, Kn = function(e, t) {
|
|
2332
2323
|
var n = window.getComputedStyle(e);
|
|
2333
2324
|
return (
|
|
2334
2325
|
// not-not-scrollable
|
|
2335
2326
|
n[t] !== "hidden" && // contains scroll inside self
|
|
2336
|
-
!(n.overflowY === n.overflowX && !
|
|
2327
|
+
!(n.overflowY === n.overflowX && !vi(e) && n[t] === "visible")
|
|
2337
2328
|
);
|
|
2338
|
-
},
|
|
2329
|
+
}, gi = function(e) {
|
|
2339
2330
|
return Kn(e, "overflowY");
|
|
2340
|
-
},
|
|
2331
|
+
}, wi = function(e) {
|
|
2341
2332
|
return Kn(e, "overflowX");
|
|
2342
2333
|
}, un = function(e, t) {
|
|
2343
2334
|
var n = t;
|
|
@@ -2352,14 +2343,14 @@ var Re = Rt ? { passive: !1 } : !1, gi = function(e) {
|
|
|
2352
2343
|
n = n.parentNode;
|
|
2353
2344
|
} while (n && n !== document.body);
|
|
2354
2345
|
return !1;
|
|
2355
|
-
},
|
|
2346
|
+
}, $i = function(e) {
|
|
2356
2347
|
var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
|
|
2357
2348
|
return [
|
|
2358
2349
|
t,
|
|
2359
2350
|
n,
|
|
2360
2351
|
o
|
|
2361
2352
|
];
|
|
2362
|
-
},
|
|
2353
|
+
}, bi = function(e) {
|
|
2363
2354
|
var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
|
|
2364
2355
|
return [
|
|
2365
2356
|
t,
|
|
@@ -2367,13 +2358,13 @@ var Re = Rt ? { passive: !1 } : !1, gi = function(e) {
|
|
|
2367
2358
|
o
|
|
2368
2359
|
];
|
|
2369
2360
|
}, Yn = function(e, t) {
|
|
2370
|
-
return e === "v" ?
|
|
2361
|
+
return e === "v" ? gi(t) : wi(t);
|
|
2371
2362
|
}, Xn = function(e, t) {
|
|
2372
|
-
return e === "v" ?
|
|
2373
|
-
},
|
|
2363
|
+
return e === "v" ? $i(t) : bi(t);
|
|
2364
|
+
}, xi = function(e, t) {
|
|
2374
2365
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2375
|
-
},
|
|
2376
|
-
var c =
|
|
2366
|
+
}, yi = function(e, t, n, o, r) {
|
|
2367
|
+
var c = xi(e, window.getComputedStyle(t).direction), s = c * o, i = n.target, a = t.contains(i), l = !1, f = s > 0, u = 0, w = 0;
|
|
2377
2368
|
do {
|
|
2378
2369
|
var p = Xn(e, i), h = p[0], d = p[1], v = p[2], m = d - v - c * h;
|
|
2379
2370
|
(h || m) && Yn(e, i) && (u += m, w += h), i = i.parentNode;
|
|
@@ -2389,16 +2380,16 @@ var Re = Rt ? { passive: !1 } : !1, gi = function(e) {
|
|
|
2389
2380
|
return [e.deltaX, e.deltaY];
|
|
2390
2381
|
}, pn = function(e) {
|
|
2391
2382
|
return e && "current" in e ? e.current : e;
|
|
2392
|
-
},
|
|
2383
|
+
}, Si = function(e, t) {
|
|
2393
2384
|
return e[0] === t[0] && e[1] === t[1];
|
|
2394
|
-
},
|
|
2385
|
+
}, Ci = function(e) {
|
|
2395
2386
|
return `
|
|
2396
2387
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2397
2388
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2398
2389
|
`);
|
|
2399
|
-
},
|
|
2400
|
-
function
|
|
2401
|
-
var t = C.useRef([]), n = C.useRef([0, 0]), o = C.useRef(), r = C.useState(
|
|
2390
|
+
}, Ei = 0, De = [];
|
|
2391
|
+
function Pi(e) {
|
|
2392
|
+
var t = C.useRef([]), n = C.useRef([0, 0]), o = C.useRef(), r = C.useState(Ei++)[0], c = C.useState(function() {
|
|
2402
2393
|
return Un();
|
|
2403
2394
|
})[0], s = C.useRef(e);
|
|
2404
2395
|
C.useEffect(function() {
|
|
@@ -2429,13 +2420,13 @@ function Ti(e) {
|
|
|
2429
2420
|
return !1;
|
|
2430
2421
|
if (!o.current && "changedTouches" in d && ($ || b) && (o.current = x), !x)
|
|
2431
2422
|
return !0;
|
|
2432
|
-
var
|
|
2433
|
-
return
|
|
2423
|
+
var R = o.current || x;
|
|
2424
|
+
return yi(R, v, d, R === "h" ? $ : b, !0);
|
|
2434
2425
|
}, []), a = C.useCallback(function(d) {
|
|
2435
2426
|
var v = d;
|
|
2436
|
-
if (!(!
|
|
2427
|
+
if (!(!De.length || De[De.length - 1] !== c)) {
|
|
2437
2428
|
var m = "deltaY" in v ? fn(v) : nt(v), g = t.current.filter(function(x) {
|
|
2438
|
-
return x.name === v.type && x.target === v.target &&
|
|
2429
|
+
return x.name === v.type && x.target === v.target && Si(x.delta, m);
|
|
2439
2430
|
})[0];
|
|
2440
2431
|
if (g && g.should) {
|
|
2441
2432
|
v.cancelable && v.preventDefault();
|
|
@@ -2463,53 +2454,53 @@ function Ti(e) {
|
|
|
2463
2454
|
l(d.type, nt(d), d.target, i(d, e.lockRef.current));
|
|
2464
2455
|
}, []);
|
|
2465
2456
|
C.useEffect(function() {
|
|
2466
|
-
return
|
|
2457
|
+
return De.push(c), e.setCallbacks({
|
|
2467
2458
|
onScrollCapture: u,
|
|
2468
2459
|
onWheelCapture: u,
|
|
2469
2460
|
onTouchMoveCapture: w
|
|
2470
|
-
}), document.addEventListener("wheel", a,
|
|
2471
|
-
|
|
2461
|
+
}), document.addEventListener("wheel", a, _e), document.addEventListener("touchmove", a, _e), document.addEventListener("touchstart", f, _e), function() {
|
|
2462
|
+
De = De.filter(function(d) {
|
|
2472
2463
|
return d !== c;
|
|
2473
|
-
}), document.removeEventListener("wheel", a,
|
|
2464
|
+
}), document.removeEventListener("wheel", a, _e), document.removeEventListener("touchmove", a, _e), document.removeEventListener("touchstart", f, _e);
|
|
2474
2465
|
};
|
|
2475
2466
|
}, []);
|
|
2476
2467
|
var p = e.removeScrollBar, h = e.inert;
|
|
2477
2468
|
return C.createElement(
|
|
2478
2469
|
C.Fragment,
|
|
2479
2470
|
null,
|
|
2480
|
-
h ? C.createElement(c, { styles:
|
|
2481
|
-
p ? C.createElement(
|
|
2471
|
+
h ? C.createElement(c, { styles: Ci(r) }) : null,
|
|
2472
|
+
p ? C.createElement(mi, { gapMode: "margin" }) : null
|
|
2482
2473
|
);
|
|
2483
2474
|
}
|
|
2484
|
-
const
|
|
2475
|
+
const Ti = lo(zn, Pi);
|
|
2485
2476
|
var jn = C.forwardRef(function(e, t) {
|
|
2486
|
-
return C.createElement(
|
|
2477
|
+
return C.createElement(vt, Ce({}, e, { ref: t, sideCar: Ti }));
|
|
2487
2478
|
});
|
|
2488
|
-
jn.classNames =
|
|
2489
|
-
const
|
|
2479
|
+
jn.classNames = vt.classNames;
|
|
2480
|
+
const Ai = [
|
|
2490
2481
|
" ",
|
|
2491
2482
|
"Enter",
|
|
2492
2483
|
"ArrowUp",
|
|
2493
2484
|
"ArrowDown"
|
|
2494
|
-
],
|
|
2485
|
+
], Oi = [
|
|
2495
2486
|
" ",
|
|
2496
2487
|
"Enter"
|
|
2497
|
-
],
|
|
2498
|
-
|
|
2488
|
+
], gt = "Select", [wt, $t, Ri] = vo(gt), [We, Rc] = Mt(gt, [
|
|
2489
|
+
Ri,
|
|
2499
2490
|
Fn
|
|
2500
|
-
]), Vt = Fn(), [
|
|
2491
|
+
]), Vt = Fn(), [_i, Pe] = We(gt), [Di, Ii] = We(gt), Ni = (e) => {
|
|
2501
2492
|
const { __scopeSelect: t, children: n, open: o, defaultOpen: r, onOpenChange: c, value: s, defaultValue: i, onValueChange: a, dir: l, name: f, autoComplete: u, disabled: w, required: p } = e, h = Vt(t), [d, v] = k(null), [m, g] = k(null), [$, b] = k(!1), x = wo(l), [T = !1, E] = ln({
|
|
2502
2493
|
prop: o,
|
|
2503
2494
|
defaultProp: r,
|
|
2504
2495
|
onChange: c
|
|
2505
|
-
}), [y,
|
|
2496
|
+
}), [y, R] = ln({
|
|
2506
2497
|
prop: s,
|
|
2507
2498
|
defaultProp: i,
|
|
2508
2499
|
onChange: a
|
|
2509
|
-
}),
|
|
2510
|
-
(
|
|
2500
|
+
}), L = j(null), D = d ? !!d.closest("form") : !0, [F, H] = k(/* @__PURE__ */ new Set()), _ = Array.from(F).map(
|
|
2501
|
+
(O) => O.props.value
|
|
2511
2502
|
).join(";");
|
|
2512
|
-
return /* @__PURE__ */ S(
|
|
2503
|
+
return /* @__PURE__ */ S(Ur, h, /* @__PURE__ */ S(_i, {
|
|
2513
2504
|
required: p,
|
|
2514
2505
|
scope: t,
|
|
2515
2506
|
trigger: d,
|
|
@@ -2520,42 +2511,42 @@ const Oi = [
|
|
|
2520
2511
|
onValueNodeHasChildrenChange: b,
|
|
2521
2512
|
contentId: Pn(),
|
|
2522
2513
|
value: y,
|
|
2523
|
-
onValueChange:
|
|
2514
|
+
onValueChange: R,
|
|
2524
2515
|
open: T,
|
|
2525
2516
|
onOpenChange: E,
|
|
2526
2517
|
dir: x,
|
|
2527
|
-
triggerPointerDownPosRef:
|
|
2518
|
+
triggerPointerDownPosRef: L,
|
|
2528
2519
|
disabled: w
|
|
2529
|
-
}, /* @__PURE__ */ S(
|
|
2520
|
+
}, /* @__PURE__ */ S(wt.Provider, {
|
|
2530
2521
|
scope: t
|
|
2531
|
-
}, /* @__PURE__ */ S(
|
|
2522
|
+
}, /* @__PURE__ */ S(Di, {
|
|
2532
2523
|
scope: e.__scopeSelect,
|
|
2533
|
-
onNativeOptionAdd: q((
|
|
2534
|
-
|
|
2535
|
-
(
|
|
2524
|
+
onNativeOptionAdd: q((O) => {
|
|
2525
|
+
H(
|
|
2526
|
+
(V) => new Set(V).add(O)
|
|
2536
2527
|
);
|
|
2537
2528
|
}, []),
|
|
2538
|
-
onNativeOptionRemove: q((
|
|
2539
|
-
|
|
2540
|
-
const
|
|
2541
|
-
return
|
|
2529
|
+
onNativeOptionRemove: q((O) => {
|
|
2530
|
+
H((V) => {
|
|
2531
|
+
const A = new Set(V);
|
|
2532
|
+
return A.delete(O), A;
|
|
2542
2533
|
});
|
|
2543
2534
|
}, [])
|
|
2544
2535
|
}, n)), D ? /* @__PURE__ */ S(Qn, {
|
|
2545
|
-
key:
|
|
2536
|
+
key: _,
|
|
2546
2537
|
"aria-hidden": !0,
|
|
2547
2538
|
required: p,
|
|
2548
2539
|
tabIndex: -1,
|
|
2549
2540
|
name: f,
|
|
2550
2541
|
autoComplete: u,
|
|
2551
2542
|
value: y,
|
|
2552
|
-
onChange: (
|
|
2543
|
+
onChange: (O) => R(O.target.value),
|
|
2553
2544
|
disabled: w
|
|
2554
2545
|
}, y === void 0 ? /* @__PURE__ */ S("option", {
|
|
2555
2546
|
value: ""
|
|
2556
|
-
}) : null, Array.from(
|
|
2557
|
-
}, Mi = "SelectTrigger",
|
|
2558
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, c = Vt(n), s =
|
|
2547
|
+
}) : null, Array.from(F)) : null));
|
|
2548
|
+
}, Mi = "SelectTrigger", Li = /* @__PURE__ */ U((e, t) => {
|
|
2549
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, c = Vt(n), s = Pe(Mi, n), i = s.disabled || o, a = G(t, s.onTriggerChange), l = $t(n), [f, u, w] = Jn((h) => {
|
|
2559
2550
|
const d = l().filter(
|
|
2560
2551
|
(g) => !g.disabled
|
|
2561
2552
|
), v = d.find(
|
|
@@ -2565,9 +2556,9 @@ const Oi = [
|
|
|
2565
2556
|
}), p = () => {
|
|
2566
2557
|
i || (s.onOpenChange(!0), w());
|
|
2567
2558
|
};
|
|
2568
|
-
return /* @__PURE__ */ S(
|
|
2559
|
+
return /* @__PURE__ */ S(Kr, W({
|
|
2569
2560
|
asChild: !0
|
|
2570
|
-
}, c), /* @__PURE__ */ S(J.button,
|
|
2561
|
+
}, c), /* @__PURE__ */ S(J.button, W({
|
|
2571
2562
|
type: "button",
|
|
2572
2563
|
role: "combobox",
|
|
2573
2564
|
"aria-controls": s.contentId,
|
|
@@ -2581,59 +2572,59 @@ const Oi = [
|
|
|
2581
2572
|
"data-placeholder": s.value === void 0 ? "" : void 0
|
|
2582
2573
|
}, r, {
|
|
2583
2574
|
ref: a,
|
|
2584
|
-
onClick:
|
|
2575
|
+
onClick: X(r.onClick, (h) => {
|
|
2585
2576
|
h.currentTarget.focus();
|
|
2586
2577
|
}),
|
|
2587
|
-
onPointerDown:
|
|
2578
|
+
onPointerDown: X(r.onPointerDown, (h) => {
|
|
2588
2579
|
const d = h.target;
|
|
2589
2580
|
d.hasPointerCapture(h.pointerId) && d.releasePointerCapture(h.pointerId), h.button === 0 && h.ctrlKey === !1 && (p(), s.triggerPointerDownPosRef.current = {
|
|
2590
2581
|
x: Math.round(h.pageX),
|
|
2591
2582
|
y: Math.round(h.pageY)
|
|
2592
2583
|
}, h.preventDefault());
|
|
2593
2584
|
}),
|
|
2594
|
-
onKeyDown:
|
|
2585
|
+
onKeyDown: X(r.onKeyDown, (h) => {
|
|
2595
2586
|
const d = f.current !== "";
|
|
2596
|
-
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && u(h.key), !(d && h.key === " ") &&
|
|
2587
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && u(h.key), !(d && h.key === " ") && Ai.includes(h.key) && (p(), h.preventDefault());
|
|
2597
2588
|
})
|
|
2598
2589
|
})));
|
|
2599
|
-
}),
|
|
2600
|
-
const { __scopeSelect: n, className: o, style: r, children: c, placeholder: s, ...i } = e, a =
|
|
2590
|
+
}), ki = "SelectValue", Fi = /* @__PURE__ */ U((e, t) => {
|
|
2591
|
+
const { __scopeSelect: n, className: o, style: r, children: c, placeholder: s, ...i } = e, a = Pe(ki, n), { onValueNodeHasChildrenChange: l } = a, f = c !== void 0, u = G(t, a.onValueNodeChange);
|
|
2601
2592
|
return ie(() => {
|
|
2602
2593
|
l(f);
|
|
2603
2594
|
}, [
|
|
2604
2595
|
l,
|
|
2605
2596
|
f
|
|
2606
|
-
]), /* @__PURE__ */ S(J.span,
|
|
2597
|
+
]), /* @__PURE__ */ S(J.span, W({}, i, {
|
|
2607
2598
|
ref: u,
|
|
2608
2599
|
style: {
|
|
2609
2600
|
pointerEvents: "none"
|
|
2610
2601
|
}
|
|
2611
2602
|
}), a.value === void 0 && s !== void 0 ? s : c);
|
|
2612
|
-
}),
|
|
2603
|
+
}), Bi = /* @__PURE__ */ U((e, t) => {
|
|
2613
2604
|
const { __scopeSelect: n, children: o, ...r } = e;
|
|
2614
|
-
return /* @__PURE__ */ S(J.span,
|
|
2605
|
+
return /* @__PURE__ */ S(J.span, W({
|
|
2615
2606
|
"aria-hidden": !0
|
|
2616
2607
|
}, r, {
|
|
2617
2608
|
ref: t
|
|
2618
2609
|
}), o || "▼");
|
|
2619
|
-
}),
|
|
2610
|
+
}), Wi = (e) => /* @__PURE__ */ S(Xr, W({
|
|
2620
2611
|
asChild: !0
|
|
2621
|
-
}, e)),
|
|
2622
|
-
const n =
|
|
2612
|
+
}, e)), ke = "SelectContent", Hi = /* @__PURE__ */ U((e, t) => {
|
|
2613
|
+
const n = Pe(ke, e.__scopeSelect), [o, r] = k();
|
|
2623
2614
|
if (ie(() => {
|
|
2624
2615
|
r(new DocumentFragment());
|
|
2625
2616
|
}, []), !n.open) {
|
|
2626
2617
|
const c = o;
|
|
2627
2618
|
return c ? /* @__PURE__ */ pt.createPortal(/* @__PURE__ */ S(qn, {
|
|
2628
2619
|
scope: e.__scopeSelect
|
|
2629
|
-
}, /* @__PURE__ */ S(
|
|
2620
|
+
}, /* @__PURE__ */ S(wt.Slot, {
|
|
2630
2621
|
scope: e.__scopeSelect
|
|
2631
2622
|
}, /* @__PURE__ */ S("div", null, e.children))), c) : null;
|
|
2632
2623
|
}
|
|
2633
|
-
return /* @__PURE__ */ S(
|
|
2624
|
+
return /* @__PURE__ */ S(Vi, W({}, e, {
|
|
2634
2625
|
ref: t
|
|
2635
2626
|
}));
|
|
2636
|
-
}),
|
|
2627
|
+
}), he = 10, [qn, Te] = We(ke), Vi = /* @__PURE__ */ U((e, t) => {
|
|
2637
2628
|
const {
|
|
2638
2629
|
__scopeSelect: n,
|
|
2639
2630
|
position: o = "item-aligned",
|
|
@@ -2652,62 +2643,60 @@ const Oi = [
|
|
|
2652
2643
|
avoidCollisions: v,
|
|
2653
2644
|
//
|
|
2654
2645
|
...m
|
|
2655
|
-
} = e, g =
|
|
2646
|
+
} = e, g = Pe(ke, n), [$, b] = k(null), [x, T] = k(null), E = G(
|
|
2656
2647
|
t,
|
|
2657
2648
|
(P) => b(P)
|
|
2658
|
-
), [y,
|
|
2659
|
-
|
|
2660
|
-
if ($)
|
|
2661
|
-
return ti($);
|
|
2649
|
+
), [y, R] = k(null), [L, D] = k(null), F = $t(n), [H, _] = k(!1), O = j(!1);
|
|
2650
|
+
Y(() => {
|
|
2651
|
+
if ($) return ei($);
|
|
2662
2652
|
}, [
|
|
2663
2653
|
$
|
|
2664
2654
|
]), Ao();
|
|
2665
|
-
const
|
|
2666
|
-
const [I, ...Z] =
|
|
2667
|
-
(
|
|
2668
|
-
), [
|
|
2669
|
-
for (const
|
|
2670
|
-
if (
|
|
2655
|
+
const V = q((P) => {
|
|
2656
|
+
const [I, ...Z] = F().map(
|
|
2657
|
+
(M) => M.ref.current
|
|
2658
|
+
), [z] = Z.slice(-1), N = document.activeElement;
|
|
2659
|
+
for (const M of P)
|
|
2660
|
+
if (M === N || (M == null || M.scrollIntoView({
|
|
2671
2661
|
block: "nearest"
|
|
2672
|
-
}),
|
|
2673
|
-
return;
|
|
2662
|
+
}), M === I && x && (x.scrollTop = 0), M === z && x && (x.scrollTop = x.scrollHeight), M == null || M.focus(), document.activeElement !== N)) return;
|
|
2674
2663
|
}, [
|
|
2675
|
-
|
|
2664
|
+
F,
|
|
2676
2665
|
x
|
|
2677
|
-
]),
|
|
2678
|
-
() =>
|
|
2666
|
+
]), A = q(
|
|
2667
|
+
() => V([
|
|
2679
2668
|
y,
|
|
2680
2669
|
$
|
|
2681
2670
|
]),
|
|
2682
2671
|
[
|
|
2683
|
-
|
|
2672
|
+
V,
|
|
2684
2673
|
y,
|
|
2685
2674
|
$
|
|
2686
2675
|
]
|
|
2687
2676
|
);
|
|
2688
|
-
|
|
2689
|
-
|
|
2677
|
+
Y(() => {
|
|
2678
|
+
H && A();
|
|
2690
2679
|
}, [
|
|
2691
|
-
|
|
2692
|
-
|
|
2680
|
+
H,
|
|
2681
|
+
A
|
|
2693
2682
|
]);
|
|
2694
|
-
const { onOpenChange:
|
|
2695
|
-
|
|
2683
|
+
const { onOpenChange: K, triggerPointerDownPosRef: B } = g;
|
|
2684
|
+
Y(() => {
|
|
2696
2685
|
if ($) {
|
|
2697
2686
|
let P = {
|
|
2698
2687
|
x: 0,
|
|
2699
2688
|
y: 0
|
|
2700
2689
|
};
|
|
2701
|
-
const I = (
|
|
2702
|
-
var N,
|
|
2690
|
+
const I = (z) => {
|
|
2691
|
+
var N, M, ee, Q;
|
|
2703
2692
|
P = {
|
|
2704
|
-
x: Math.abs(Math.round(
|
|
2705
|
-
y: Math.abs(Math.round(
|
|
2693
|
+
x: Math.abs(Math.round(z.pageX) - ((N = (M = B.current) === null || M === void 0 ? void 0 : M.x) !== null && N !== void 0 ? N : 0)),
|
|
2694
|
+
y: Math.abs(Math.round(z.pageY) - ((ee = (Q = B.current) === null || Q === void 0 ? void 0 : Q.y) !== null && ee !== void 0 ? ee : 0))
|
|
2706
2695
|
};
|
|
2707
|
-
}, Z = (
|
|
2708
|
-
P.x <= 10 && P.y <= 10 ?
|
|
2696
|
+
}, Z = (z) => {
|
|
2697
|
+
P.x <= 10 && P.y <= 10 ? z.preventDefault() : $.contains(z.target) || K(!1), document.removeEventListener("pointermove", I), B.current = null;
|
|
2709
2698
|
};
|
|
2710
|
-
return
|
|
2699
|
+
return B.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", Z, {
|
|
2711
2700
|
capture: !0,
|
|
2712
2701
|
once: !0
|
|
2713
2702
|
})), () => {
|
|
@@ -2718,28 +2707,28 @@ const Oi = [
|
|
|
2718
2707
|
}
|
|
2719
2708
|
}, [
|
|
2720
2709
|
$,
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
]),
|
|
2724
|
-
const P = () =>
|
|
2710
|
+
K,
|
|
2711
|
+
B
|
|
2712
|
+
]), Y(() => {
|
|
2713
|
+
const P = () => K(!1);
|
|
2725
2714
|
return window.addEventListener("blur", P), window.addEventListener("resize", P), () => {
|
|
2726
2715
|
window.removeEventListener("blur", P), window.removeEventListener("resize", P);
|
|
2727
2716
|
};
|
|
2728
2717
|
}, [
|
|
2729
|
-
|
|
2718
|
+
K
|
|
2730
2719
|
]);
|
|
2731
|
-
const [
|
|
2732
|
-
const I =
|
|
2720
|
+
const [pe, Ae] = Jn((P) => {
|
|
2721
|
+
const I = F().filter(
|
|
2733
2722
|
(N) => !N.disabled
|
|
2734
2723
|
), Z = I.find(
|
|
2735
2724
|
(N) => N.ref.current === document.activeElement
|
|
2736
|
-
),
|
|
2737
|
-
|
|
2738
|
-
() =>
|
|
2725
|
+
), z = eo(I, P, Z);
|
|
2726
|
+
z && setTimeout(
|
|
2727
|
+
() => z.ref.current.focus()
|
|
2739
2728
|
);
|
|
2740
|
-
}),
|
|
2741
|
-
const
|
|
2742
|
-
(g.value !== void 0 && g.value === I ||
|
|
2729
|
+
}), Oe = q((P, I, Z) => {
|
|
2730
|
+
const z = !O.current && !Z;
|
|
2731
|
+
(g.value !== void 0 && g.value === I || z) && (R(P), z && (O.current = !0));
|
|
2743
2732
|
}, [
|
|
2744
2733
|
g.value
|
|
2745
2734
|
]), He = q(
|
|
@@ -2748,11 +2737,11 @@ const Oi = [
|
|
|
2748
2737
|
$
|
|
2749
2738
|
]
|
|
2750
2739
|
), ce = q((P, I, Z) => {
|
|
2751
|
-
const
|
|
2752
|
-
(g.value !== void 0 && g.value === I ||
|
|
2740
|
+
const z = !O.current && !Z;
|
|
2741
|
+
(g.value !== void 0 && g.value === I || z) && D(P);
|
|
2753
2742
|
}, [
|
|
2754
2743
|
g.value
|
|
2755
|
-
]), se = o === "popper" ? hn :
|
|
2744
|
+
]), se = o === "popper" ? hn : zi, $e = se === hn ? {
|
|
2756
2745
|
side: i,
|
|
2757
2746
|
sideOffset: a,
|
|
2758
2747
|
align: l,
|
|
@@ -2769,15 +2758,15 @@ const Oi = [
|
|
|
2769
2758
|
content: $,
|
|
2770
2759
|
viewport: x,
|
|
2771
2760
|
onViewportChange: T,
|
|
2772
|
-
itemRefCallback:
|
|
2761
|
+
itemRefCallback: Oe,
|
|
2773
2762
|
selectedItem: y,
|
|
2774
2763
|
onItemLeave: He,
|
|
2775
2764
|
itemTextRefCallback: ce,
|
|
2776
|
-
focusSelectedItem:
|
|
2777
|
-
selectedItemText:
|
|
2765
|
+
focusSelectedItem: A,
|
|
2766
|
+
selectedItemText: L,
|
|
2778
2767
|
position: o,
|
|
2779
|
-
isPositioned:
|
|
2780
|
-
searchRef:
|
|
2768
|
+
isPositioned: H,
|
|
2769
|
+
searchRef: pe
|
|
2781
2770
|
}, /* @__PURE__ */ S(jn, {
|
|
2782
2771
|
as: Ye,
|
|
2783
2772
|
allowPinchZoom: !0
|
|
@@ -2787,7 +2776,7 @@ const Oi = [
|
|
|
2787
2776
|
onMountAutoFocus: (P) => {
|
|
2788
2777
|
P.preventDefault();
|
|
2789
2778
|
},
|
|
2790
|
-
onUnmountAutoFocus:
|
|
2779
|
+
onUnmountAutoFocus: X(r, (P) => {
|
|
2791
2780
|
var I;
|
|
2792
2781
|
(I = g.trigger) === null || I === void 0 || I.focus({
|
|
2793
2782
|
preventScroll: !0
|
|
@@ -2800,14 +2789,14 @@ const Oi = [
|
|
|
2800
2789
|
onPointerDownOutside: s,
|
|
2801
2790
|
onFocusOutside: (P) => P.preventDefault(),
|
|
2802
2791
|
onDismiss: () => g.onOpenChange(!1)
|
|
2803
|
-
}, /* @__PURE__ */ S(se,
|
|
2792
|
+
}, /* @__PURE__ */ S(se, W({
|
|
2804
2793
|
role: "listbox",
|
|
2805
2794
|
id: g.contentId,
|
|
2806
2795
|
"data-state": g.open ? "open" : "closed",
|
|
2807
2796
|
dir: g.dir,
|
|
2808
2797
|
onContextMenu: (P) => P.preventDefault()
|
|
2809
|
-
}, m,
|
|
2810
|
-
onPlaced: () =>
|
|
2798
|
+
}, m, $e, {
|
|
2799
|
+
onPlaced: () => _(!0),
|
|
2811
2800
|
ref: E,
|
|
2812
2801
|
style: {
|
|
2813
2802
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -2817,15 +2806,15 @@ const Oi = [
|
|
|
2817
2806
|
outline: "none",
|
|
2818
2807
|
...m.style
|
|
2819
2808
|
},
|
|
2820
|
-
onKeyDown:
|
|
2809
|
+
onKeyDown: X(m.onKeyDown, (P) => {
|
|
2821
2810
|
const I = P.ctrlKey || P.altKey || P.metaKey;
|
|
2822
|
-
if (P.key === "Tab" && P.preventDefault(), !I && P.key.length === 1 &&
|
|
2811
|
+
if (P.key === "Tab" && P.preventDefault(), !I && P.key.length === 1 && Ae(P.key), [
|
|
2823
2812
|
"ArrowUp",
|
|
2824
2813
|
"ArrowDown",
|
|
2825
2814
|
"Home",
|
|
2826
2815
|
"End"
|
|
2827
2816
|
].includes(P.key)) {
|
|
2828
|
-
let
|
|
2817
|
+
let z = F().filter(
|
|
2829
2818
|
(N) => !N.disabled
|
|
2830
2819
|
).map(
|
|
2831
2820
|
(N) => N.ref.current
|
|
@@ -2833,52 +2822,52 @@ const Oi = [
|
|
|
2833
2822
|
if ([
|
|
2834
2823
|
"ArrowUp",
|
|
2835
2824
|
"End"
|
|
2836
|
-
].includes(P.key) && (
|
|
2825
|
+
].includes(P.key) && (z = z.slice().reverse()), [
|
|
2837
2826
|
"ArrowUp",
|
|
2838
2827
|
"ArrowDown"
|
|
2839
2828
|
].includes(P.key)) {
|
|
2840
|
-
const N = P.target,
|
|
2841
|
-
|
|
2829
|
+
const N = P.target, M = z.indexOf(N);
|
|
2830
|
+
z = z.slice(M + 1);
|
|
2842
2831
|
}
|
|
2843
2832
|
setTimeout(
|
|
2844
|
-
() =>
|
|
2833
|
+
() => V(z)
|
|
2845
2834
|
), P.preventDefault();
|
|
2846
2835
|
}
|
|
2847
2836
|
})
|
|
2848
2837
|
}))))));
|
|
2849
|
-
}),
|
|
2850
|
-
const { __scopeSelect: n, onPlaced: o, ...r } = e, c =
|
|
2838
|
+
}), zi = /* @__PURE__ */ U((e, t) => {
|
|
2839
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, c = Pe(ke, n), s = Te(ke, n), [i, a] = k(null), [l, f] = k(null), u = G(
|
|
2851
2840
|
t,
|
|
2852
2841
|
(E) => f(E)
|
|
2853
|
-
), w =
|
|
2842
|
+
), w = $t(n), p = j(!1), h = j(!0), { viewport: d, selectedItem: v, selectedItemText: m, focusSelectedItem: g } = s, $ = q(() => {
|
|
2854
2843
|
if (c.trigger && c.valueNode && i && l && d && v && m) {
|
|
2855
|
-
const E = c.trigger.getBoundingClientRect(), y = l.getBoundingClientRect(),
|
|
2844
|
+
const E = c.trigger.getBoundingClientRect(), y = l.getBoundingClientRect(), R = c.valueNode.getBoundingClientRect(), L = m.getBoundingClientRect();
|
|
2856
2845
|
if (c.dir !== "rtl") {
|
|
2857
|
-
const N =
|
|
2858
|
-
|
|
2846
|
+
const N = L.left - y.left, M = R.left - N, ee = E.left - M, Q = E.width + ee, Ve = Math.max(Q, y.width), ze = window.innerWidth - he, Ue = Kt(M, [
|
|
2847
|
+
he,
|
|
2859
2848
|
ze - Ve
|
|
2860
2849
|
]);
|
|
2861
2850
|
i.style.minWidth = Q + "px", i.style.left = Ue + "px";
|
|
2862
2851
|
} else {
|
|
2863
|
-
const N = y.right -
|
|
2864
|
-
|
|
2852
|
+
const N = y.right - L.right, M = window.innerWidth - R.right - N, ee = window.innerWidth - E.right - M, Q = E.width + ee, Ve = Math.max(Q, y.width), ze = window.innerWidth - he, Ue = Kt(M, [
|
|
2853
|
+
he,
|
|
2865
2854
|
ze - Ve
|
|
2866
2855
|
]);
|
|
2867
2856
|
i.style.minWidth = Q + "px", i.style.right = Ue + "px";
|
|
2868
2857
|
}
|
|
2869
|
-
const D = w(),
|
|
2858
|
+
const D = w(), F = window.innerHeight - he * 2, H = d.scrollHeight, _ = window.getComputedStyle(l), O = parseInt(_.borderTopWidth, 10), V = parseInt(_.paddingTop, 10), A = parseInt(_.borderBottomWidth, 10), K = parseInt(_.paddingBottom, 10), B = O + V + H + K + A, pe = Math.min(v.offsetHeight * 5, B), Ae = window.getComputedStyle(d), Oe = parseInt(Ae.paddingTop, 10), He = parseInt(Ae.paddingBottom, 10), ce = E.top + E.height / 2 - he, se = F - ce, $e = v.offsetHeight / 2, P = v.offsetTop + $e, I = O + V + P, Z = B - I;
|
|
2870
2859
|
if (I <= ce) {
|
|
2871
2860
|
const N = v === D[D.length - 1].ref.current;
|
|
2872
2861
|
i.style.bottom = "0px";
|
|
2873
|
-
const
|
|
2862
|
+
const M = l.clientHeight - d.offsetTop - d.offsetHeight, ee = Math.max(se, $e + (N ? He : 0) + M + A), Q = I + ee;
|
|
2874
2863
|
i.style.height = Q + "px";
|
|
2875
2864
|
} else {
|
|
2876
2865
|
const N = v === D[0].ref.current;
|
|
2877
2866
|
i.style.top = "0px";
|
|
2878
|
-
const ee = Math.max(ce,
|
|
2867
|
+
const ee = Math.max(ce, O + d.offsetTop + (N ? Oe : 0) + $e) + Z;
|
|
2879
2868
|
i.style.height = ee + "px", d.scrollTop = I - ce + d.offsetTop;
|
|
2880
2869
|
}
|
|
2881
|
-
i.style.margin = `${
|
|
2870
|
+
i.style.margin = `${he}px 0`, i.style.minHeight = pe + "px", i.style.maxHeight = F + "px", o == null || o(), requestAnimationFrame(
|
|
2882
2871
|
() => p.current = !0
|
|
2883
2872
|
);
|
|
2884
2873
|
}
|
|
@@ -2912,7 +2901,7 @@ const Oi = [
|
|
|
2912
2901
|
$,
|
|
2913
2902
|
g
|
|
2914
2903
|
]);
|
|
2915
|
-
return /* @__PURE__ */ S(
|
|
2904
|
+
return /* @__PURE__ */ S(Ui, {
|
|
2916
2905
|
scope: n,
|
|
2917
2906
|
contentWrapper: i,
|
|
2918
2907
|
shouldExpandOnScrollRef: p,
|
|
@@ -2925,7 +2914,7 @@ const Oi = [
|
|
|
2925
2914
|
position: "fixed",
|
|
2926
2915
|
zIndex: b
|
|
2927
2916
|
}
|
|
2928
|
-
}, /* @__PURE__ */ S(J.div,
|
|
2917
|
+
}, /* @__PURE__ */ S(J.div, W({}, r, {
|
|
2929
2918
|
ref: u,
|
|
2930
2919
|
style: {
|
|
2931
2920
|
// When we get the height of the content, it includes borders. If we were to set
|
|
@@ -2936,9 +2925,9 @@ const Oi = [
|
|
|
2936
2925
|
...r.style
|
|
2937
2926
|
}
|
|
2938
2927
|
}))));
|
|
2939
|
-
}), hn = /* @__PURE__ */
|
|
2940
|
-
const { __scopeSelect: n, align: o = "start", collisionPadding: r =
|
|
2941
|
-
return /* @__PURE__ */ S(
|
|
2928
|
+
}), hn = /* @__PURE__ */ U((e, t) => {
|
|
2929
|
+
const { __scopeSelect: n, align: o = "start", collisionPadding: r = he, ...c } = e, s = Vt(n);
|
|
2930
|
+
return /* @__PURE__ */ S(Yr, W({}, s, c, {
|
|
2942
2931
|
ref: t,
|
|
2943
2932
|
align: o,
|
|
2944
2933
|
collisionPadding: r,
|
|
@@ -2953,15 +2942,15 @@ const Oi = [
|
|
|
2953
2942
|
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2954
2943
|
}
|
|
2955
2944
|
}));
|
|
2956
|
-
}), [
|
|
2957
|
-
const { __scopeSelect: n, ...o } = e, r =
|
|
2958
|
-
return /* @__PURE__ */ S(
|
|
2945
|
+
}), [Ui, zt] = We(ke, {}), mn = "SelectViewport", Ki = /* @__PURE__ */ U((e, t) => {
|
|
2946
|
+
const { __scopeSelect: n, ...o } = e, r = Te(mn, n), c = zt(mn, n), s = G(t, r.onViewportChange), i = j(0);
|
|
2947
|
+
return /* @__PURE__ */ S(Nt, null, /* @__PURE__ */ S("style", {
|
|
2959
2948
|
dangerouslySetInnerHTML: {
|
|
2960
2949
|
__html: "[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"
|
|
2961
2950
|
}
|
|
2962
|
-
}), /* @__PURE__ */ S(
|
|
2951
|
+
}), /* @__PURE__ */ S(wt.Slot, {
|
|
2963
2952
|
scope: n
|
|
2964
|
-
}, /* @__PURE__ */ S(J.div,
|
|
2953
|
+
}, /* @__PURE__ */ S(J.div, W({
|
|
2965
2954
|
"data-radix-select-viewport": "",
|
|
2966
2955
|
role: "presentation"
|
|
2967
2956
|
}, o, {
|
|
@@ -2975,12 +2964,12 @@ const Oi = [
|
|
|
2975
2964
|
overflow: "auto",
|
|
2976
2965
|
...o.style
|
|
2977
2966
|
},
|
|
2978
|
-
onScroll:
|
|
2967
|
+
onScroll: X(o.onScroll, (a) => {
|
|
2979
2968
|
const l = a.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: u } = c;
|
|
2980
2969
|
if (u != null && u.current && f) {
|
|
2981
2970
|
const w = Math.abs(i.current - l.scrollTop);
|
|
2982
2971
|
if (w > 0) {
|
|
2983
|
-
const p = window.innerHeight -
|
|
2972
|
+
const p = window.innerHeight - he * 2, h = parseFloat(f.style.minHeight), d = parseFloat(f.style.height), v = Math.max(h, d);
|
|
2984
2973
|
if (v < p) {
|
|
2985
2974
|
const m = v + w, g = Math.min(p, m), $ = m - g;
|
|
2986
2975
|
f.style.height = g + "px", f.style.bottom === "0px" && (l.scrollTop = $ > 0 ? $ : 0, f.style.justifyContent = "flex-end");
|
|
@@ -2990,16 +2979,16 @@ const Oi = [
|
|
|
2990
2979
|
i.current = l.scrollTop;
|
|
2991
2980
|
})
|
|
2992
2981
|
}))));
|
|
2993
|
-
}),
|
|
2994
|
-
We(
|
|
2995
|
-
const
|
|
2996
|
-
const { __scopeSelect: n, value: o, disabled: r = !1, textValue: c, ...s } = e, i =
|
|
2982
|
+
}), Yi = "SelectGroup";
|
|
2983
|
+
We(Yi);
|
|
2984
|
+
const Dt = "SelectItem", [Xi, Gn] = We(Dt), ji = /* @__PURE__ */ U((e, t) => {
|
|
2985
|
+
const { __scopeSelect: n, value: o, disabled: r = !1, textValue: c, ...s } = e, i = Pe(Dt, n), a = Te(Dt, n), l = i.value === o, [f, u] = k(c ?? ""), [w, p] = k(!1), h = G(t, (m) => {
|
|
2997
2986
|
var g;
|
|
2998
2987
|
return (g = a.itemRefCallback) === null || g === void 0 ? void 0 : g.call(a, m, o, r);
|
|
2999
2988
|
}), d = Pn(), v = () => {
|
|
3000
2989
|
r || (i.onValueChange(o), i.onOpenChange(!1));
|
|
3001
2990
|
};
|
|
3002
|
-
return /* @__PURE__ */ S(
|
|
2991
|
+
return /* @__PURE__ */ S(Xi, {
|
|
3003
2992
|
scope: n,
|
|
3004
2993
|
value: o,
|
|
3005
2994
|
disabled: r,
|
|
@@ -3011,12 +3000,12 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3011
3000
|
return g || (($ = m == null ? void 0 : m.textContent) !== null && $ !== void 0 ? $ : "").trim();
|
|
3012
3001
|
});
|
|
3013
3002
|
}, [])
|
|
3014
|
-
}, /* @__PURE__ */ S(
|
|
3003
|
+
}, /* @__PURE__ */ S(wt.ItemSlot, {
|
|
3015
3004
|
scope: n,
|
|
3016
3005
|
value: o,
|
|
3017
3006
|
disabled: r,
|
|
3018
3007
|
textValue: f
|
|
3019
|
-
}, /* @__PURE__ */ S(J.div,
|
|
3008
|
+
}, /* @__PURE__ */ S(J.div, W({
|
|
3020
3009
|
role: "option",
|
|
3021
3010
|
"aria-labelledby": d,
|
|
3022
3011
|
"data-highlighted": w ? "" : void 0,
|
|
@@ -3027,16 +3016,16 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3027
3016
|
tabIndex: r ? void 0 : -1
|
|
3028
3017
|
}, s, {
|
|
3029
3018
|
ref: h,
|
|
3030
|
-
onFocus:
|
|
3019
|
+
onFocus: X(
|
|
3031
3020
|
s.onFocus,
|
|
3032
3021
|
() => p(!0)
|
|
3033
3022
|
),
|
|
3034
|
-
onBlur:
|
|
3023
|
+
onBlur: X(
|
|
3035
3024
|
s.onBlur,
|
|
3036
3025
|
() => p(!1)
|
|
3037
3026
|
),
|
|
3038
|
-
onPointerUp:
|
|
3039
|
-
onPointerMove:
|
|
3027
|
+
onPointerUp: X(s.onPointerUp, v),
|
|
3028
|
+
onPointerMove: X(s.onPointerMove, (m) => {
|
|
3040
3029
|
if (r) {
|
|
3041
3030
|
var g;
|
|
3042
3031
|
(g = a.onItemLeave) === null || g === void 0 || g.call(a);
|
|
@@ -3045,19 +3034,19 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3045
3034
|
preventScroll: !0
|
|
3046
3035
|
});
|
|
3047
3036
|
}),
|
|
3048
|
-
onPointerLeave:
|
|
3037
|
+
onPointerLeave: X(s.onPointerLeave, (m) => {
|
|
3049
3038
|
if (m.currentTarget === document.activeElement) {
|
|
3050
3039
|
var g;
|
|
3051
3040
|
(g = a.onItemLeave) === null || g === void 0 || g.call(a);
|
|
3052
3041
|
}
|
|
3053
3042
|
}),
|
|
3054
|
-
onKeyDown:
|
|
3043
|
+
onKeyDown: X(s.onKeyDown, (m) => {
|
|
3055
3044
|
var g;
|
|
3056
|
-
((g = a.searchRef) === null || g === void 0 ? void 0 : g.current) !== "" && m.key === " " || (
|
|
3045
|
+
((g = a.searchRef) === null || g === void 0 ? void 0 : g.current) !== "" && m.key === " " || (Oi.includes(m.key) && v(), m.key === " " && m.preventDefault());
|
|
3057
3046
|
})
|
|
3058
3047
|
}))));
|
|
3059
|
-
}), ot = "SelectItemText",
|
|
3060
|
-
const { __scopeSelect: n, className: o, style: r, ...c } = e, s =
|
|
3048
|
+
}), ot = "SelectItemText", qi = /* @__PURE__ */ U((e, t) => {
|
|
3049
|
+
const { __scopeSelect: n, className: o, style: r, ...c } = e, s = Pe(ot, n), i = Te(ot, n), a = Gn(ot, n), l = Ii(ot, n), [f, u] = k(null), w = G(
|
|
3061
3050
|
t,
|
|
3062
3051
|
(m) => u(m),
|
|
3063
3052
|
a.onItemTextChange,
|
|
@@ -3065,7 +3054,7 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3065
3054
|
var g;
|
|
3066
3055
|
return (g = i.itemTextRefCallback) === null || g === void 0 ? void 0 : g.call(i, m, a.value, a.disabled);
|
|
3067
3056
|
}
|
|
3068
|
-
), p = f == null ? void 0 : f.textContent, h =
|
|
3057
|
+
), p = f == null ? void 0 : f.textContent, h = Me(
|
|
3069
3058
|
() => /* @__PURE__ */ S("option", {
|
|
3070
3059
|
key: a.value,
|
|
3071
3060
|
value: a.value,
|
|
@@ -3081,20 +3070,20 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3081
3070
|
d,
|
|
3082
3071
|
v,
|
|
3083
3072
|
h
|
|
3084
|
-
]), /* @__PURE__ */ S(
|
|
3073
|
+
]), /* @__PURE__ */ S(Nt, null, /* @__PURE__ */ S(J.span, W({
|
|
3085
3074
|
id: a.textId
|
|
3086
3075
|
}, c, {
|
|
3087
3076
|
ref: w
|
|
3088
3077
|
})), a.isSelected && s.valueNode && !s.valueNodeHasChildren ? /* @__PURE__ */ pt.createPortal(c.children, s.valueNode) : null);
|
|
3089
|
-
}),
|
|
3078
|
+
}), Gi = "SelectItemIndicator", Zi = /* @__PURE__ */ U((e, t) => {
|
|
3090
3079
|
const { __scopeSelect: n, ...o } = e;
|
|
3091
|
-
return Gn(
|
|
3080
|
+
return Gn(Gi, n).isSelected ? /* @__PURE__ */ S(J.span, W({
|
|
3092
3081
|
"aria-hidden": !0
|
|
3093
3082
|
}, o, {
|
|
3094
3083
|
ref: t
|
|
3095
3084
|
})) : null;
|
|
3096
|
-
}), vn = "SelectScrollUpButton",
|
|
3097
|
-
const n =
|
|
3085
|
+
}), vn = "SelectScrollUpButton", Qi = /* @__PURE__ */ U((e, t) => {
|
|
3086
|
+
const n = Te(vn, e.__scopeSelect), o = zt(vn, e.__scopeSelect), [r, c] = k(!1), s = G(t, o.onScrollButtonChange);
|
|
3098
3087
|
return ie(() => {
|
|
3099
3088
|
if (n.viewport && n.isPositioned) {
|
|
3100
3089
|
let a = function() {
|
|
@@ -3107,15 +3096,15 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3107
3096
|
}, [
|
|
3108
3097
|
n.viewport,
|
|
3109
3098
|
n.isPositioned
|
|
3110
|
-
]), r ? /* @__PURE__ */ S(Zn,
|
|
3099
|
+
]), r ? /* @__PURE__ */ S(Zn, W({}, e, {
|
|
3111
3100
|
ref: s,
|
|
3112
3101
|
onAutoScroll: () => {
|
|
3113
3102
|
const { viewport: i, selectedItem: a } = n;
|
|
3114
3103
|
i && a && (i.scrollTop = i.scrollTop - a.offsetHeight);
|
|
3115
3104
|
}
|
|
3116
3105
|
})) : null;
|
|
3117
|
-
}), gn = "SelectScrollDownButton",
|
|
3118
|
-
const n =
|
|
3106
|
+
}), gn = "SelectScrollDownButton", Ji = /* @__PURE__ */ U((e, t) => {
|
|
3107
|
+
const n = Te(gn, e.__scopeSelect), o = zt(gn, e.__scopeSelect), [r, c] = k(!1), s = G(t, o.onScrollButtonChange);
|
|
3119
3108
|
return ie(() => {
|
|
3120
3109
|
if (n.viewport && n.isPositioned) {
|
|
3121
3110
|
let a = function() {
|
|
@@ -3128,18 +3117,18 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3128
3117
|
}, [
|
|
3129
3118
|
n.viewport,
|
|
3130
3119
|
n.isPositioned
|
|
3131
|
-
]), r ? /* @__PURE__ */ S(Zn,
|
|
3120
|
+
]), r ? /* @__PURE__ */ S(Zn, W({}, e, {
|
|
3132
3121
|
ref: s,
|
|
3133
3122
|
onAutoScroll: () => {
|
|
3134
3123
|
const { viewport: i, selectedItem: a } = n;
|
|
3135
3124
|
i && a && (i.scrollTop = i.scrollTop + a.offsetHeight);
|
|
3136
3125
|
}
|
|
3137
3126
|
})) : null;
|
|
3138
|
-
}), Zn = /* @__PURE__ */
|
|
3139
|
-
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, c =
|
|
3127
|
+
}), Zn = /* @__PURE__ */ U((e, t) => {
|
|
3128
|
+
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, c = Te("SelectScrollButton", n), s = j(null), i = $t(n), a = q(() => {
|
|
3140
3129
|
s.current !== null && (window.clearInterval(s.current), s.current = null);
|
|
3141
3130
|
}, []);
|
|
3142
|
-
return
|
|
3131
|
+
return Y(() => () => a(), [
|
|
3143
3132
|
a
|
|
3144
3133
|
]), ie(() => {
|
|
3145
3134
|
var l;
|
|
@@ -3151,7 +3140,7 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3151
3140
|
});
|
|
3152
3141
|
}, [
|
|
3153
3142
|
i
|
|
3154
|
-
]), /* @__PURE__ */ S(J.div,
|
|
3143
|
+
]), /* @__PURE__ */ S(J.div, W({
|
|
3155
3144
|
"aria-hidden": !0
|
|
3156
3145
|
}, r, {
|
|
3157
3146
|
ref: t,
|
|
@@ -3159,20 +3148,20 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3159
3148
|
flexShrink: 0,
|
|
3160
3149
|
...r.style
|
|
3161
3150
|
},
|
|
3162
|
-
onPointerDown:
|
|
3151
|
+
onPointerDown: X(r.onPointerDown, () => {
|
|
3163
3152
|
s.current === null && (s.current = window.setInterval(o, 50));
|
|
3164
3153
|
}),
|
|
3165
|
-
onPointerMove:
|
|
3154
|
+
onPointerMove: X(r.onPointerMove, () => {
|
|
3166
3155
|
var l;
|
|
3167
3156
|
(l = c.onItemLeave) === null || l === void 0 || l.call(c), s.current === null && (s.current = window.setInterval(o, 50));
|
|
3168
3157
|
}),
|
|
3169
|
-
onPointerLeave:
|
|
3158
|
+
onPointerLeave: X(r.onPointerLeave, () => {
|
|
3170
3159
|
a();
|
|
3171
3160
|
})
|
|
3172
3161
|
}));
|
|
3173
|
-
}), Qn = /* @__PURE__ */
|
|
3174
|
-
const { value: n, ...o } = e, r =
|
|
3175
|
-
return
|
|
3162
|
+
}), Qn = /* @__PURE__ */ U((e, t) => {
|
|
3163
|
+
const { value: n, ...o } = e, r = j(null), c = G(t, r), s = qr(n);
|
|
3164
|
+
return Y(() => {
|
|
3176
3165
|
const i = r.current, a = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(a, "value").set;
|
|
3177
3166
|
if (s !== n && f) {
|
|
3178
3167
|
const u = new Event("change", {
|
|
@@ -3183,16 +3172,16 @@ const _t = "SelectItem", [ji, Gn] = We(_t), qi = /* @__PURE__ */ z((e, t) => {
|
|
|
3183
3172
|
}, [
|
|
3184
3173
|
s,
|
|
3185
3174
|
n
|
|
3186
|
-
]), /* @__PURE__ */ S(
|
|
3175
|
+
]), /* @__PURE__ */ S(Gr, {
|
|
3187
3176
|
asChild: !0
|
|
3188
|
-
}, /* @__PURE__ */ S("select",
|
|
3177
|
+
}, /* @__PURE__ */ S("select", W({}, o, {
|
|
3189
3178
|
ref: c,
|
|
3190
3179
|
defaultValue: n
|
|
3191
3180
|
})));
|
|
3192
3181
|
});
|
|
3193
3182
|
Qn.displayName = "BubbleSelect";
|
|
3194
3183
|
function Jn(e) {
|
|
3195
|
-
const t =
|
|
3184
|
+
const t = me(e), n = j(""), o = j(0), r = q((s) => {
|
|
3196
3185
|
const i = n.current + s;
|
|
3197
3186
|
t(i), function a(l) {
|
|
3198
3187
|
n.current = l, window.clearTimeout(o.current), l !== "" && (o.current = window.setTimeout(
|
|
@@ -3205,7 +3194,7 @@ function Jn(e) {
|
|
|
3205
3194
|
]), c = q(() => {
|
|
3206
3195
|
n.current = "", window.clearTimeout(o.current);
|
|
3207
3196
|
}, []);
|
|
3208
|
-
return
|
|
3197
|
+
return Y(() => () => window.clearTimeout(o.current), []), [
|
|
3209
3198
|
n,
|
|
3210
3199
|
r,
|
|
3211
3200
|
c
|
|
@@ -3215,7 +3204,7 @@ function eo(e, t, n) {
|
|
|
3215
3204
|
const r = t.length > 1 && Array.from(t).every(
|
|
3216
3205
|
(l) => l === t[0]
|
|
3217
3206
|
) ? t[0] : t, c = n ? e.indexOf(n) : -1;
|
|
3218
|
-
let s =
|
|
3207
|
+
let s = ec(e, Math.max(c, 0));
|
|
3219
3208
|
r.length === 1 && (s = s.filter(
|
|
3220
3209
|
(l) => l !== n
|
|
3221
3210
|
));
|
|
@@ -3224,21 +3213,21 @@ function eo(e, t, n) {
|
|
|
3224
3213
|
);
|
|
3225
3214
|
return a !== n ? a : void 0;
|
|
3226
3215
|
}
|
|
3227
|
-
function
|
|
3216
|
+
function ec(e, t) {
|
|
3228
3217
|
return e.map(
|
|
3229
3218
|
(n, o) => e[(t + o) % e.length]
|
|
3230
3219
|
);
|
|
3231
3220
|
}
|
|
3232
|
-
const nc = Li, oc =
|
|
3233
|
-
root:
|
|
3234
|
-
small:
|
|
3235
|
-
radTrigger:
|
|
3236
|
-
radContent:
|
|
3237
|
-
app:
|
|
3238
|
-
radArrow:
|
|
3239
|
-
radOption:
|
|
3240
|
-
radIcon:
|
|
3241
|
-
},
|
|
3221
|
+
const tc = Ni, nc = Li, oc = Fi, rc = Bi, ic = Wi, cc = Hi, sc = Ki, ac = ji, lc = qi, dc = Zi, uc = Qi, fc = Ji, pc = "_root_1inq5_1", hc = "_small_1inq5_26", mc = "_radTrigger_1inq5_38", vc = "_radContent_1inq5_73", gc = "_app_1inq5_1", wc = "_radArrow_1inq5_89", $c = "_radOption_1inq5_97", bc = "_radIcon_1inq5_111", ae = {
|
|
3222
|
+
root: pc,
|
|
3223
|
+
small: hc,
|
|
3224
|
+
radTrigger: mc,
|
|
3225
|
+
radContent: vc,
|
|
3226
|
+
app: gc,
|
|
3227
|
+
radArrow: wc,
|
|
3228
|
+
radOption: $c,
|
|
3229
|
+
radIcon: bc
|
|
3230
|
+
}, _c = ne.forwardRef(function(t) {
|
|
3242
3231
|
const {
|
|
3243
3232
|
value: n,
|
|
3244
3233
|
options: o,
|
|
@@ -3249,21 +3238,21 @@ const nc = Li, oc = ki, rc = Bi, ic = Wi, cc = Hi, sc = Vi, ac = Yi, lc = qi, dc
|
|
|
3249
3238
|
} = t, [a, l] = ne.useState(!1), f = xn(ae.radTrigger, ae[c], i, {
|
|
3250
3239
|
[ae.disabled]: s
|
|
3251
3240
|
});
|
|
3252
|
-
return /* @__PURE__ */ Ze(
|
|
3253
|
-
/* @__PURE__ */ Ze(
|
|
3254
|
-
/* @__PURE__ */ te(
|
|
3255
|
-
/* @__PURE__ */ te(
|
|
3241
|
+
return /* @__PURE__ */ Ze(tc, { value: n, onValueChange: r, onOpenChange: l, open: a, children: [
|
|
3242
|
+
/* @__PURE__ */ Ze(nc, { disabled: s, className: f, children: [
|
|
3243
|
+
/* @__PURE__ */ te(oc, {}),
|
|
3244
|
+
/* @__PURE__ */ te(rc, { children: /* @__PURE__ */ te(Ut, {}) })
|
|
3256
3245
|
] }),
|
|
3257
|
-
/* @__PURE__ */ te(
|
|
3258
|
-
/* @__PURE__ */ te(
|
|
3259
|
-
/* @__PURE__ */ te(
|
|
3260
|
-
/* @__PURE__ */ te(
|
|
3261
|
-
/* @__PURE__ */ te(
|
|
3246
|
+
/* @__PURE__ */ te(ic, { children: /* @__PURE__ */ Ze(cc, { className: ae.radContent, children: [
|
|
3247
|
+
/* @__PURE__ */ te(uc, { className: ae.radArrow, children: /* @__PURE__ */ te(so, {}) }),
|
|
3248
|
+
/* @__PURE__ */ te(sc, { children: o.map((u) => /* @__PURE__ */ Ze(ac, { value: u.value, className: ae.radOption, children: [
|
|
3249
|
+
/* @__PURE__ */ te(lc, { children: u.label }),
|
|
3250
|
+
/* @__PURE__ */ te(dc, { className: ae.radIcon, children: ao.checkmark })
|
|
3262
3251
|
] }, u.value)) }),
|
|
3263
|
-
/* @__PURE__ */ te(
|
|
3252
|
+
/* @__PURE__ */ te(fc, { className: ae.radArrow, children: /* @__PURE__ */ te(Ut, {}) })
|
|
3264
3253
|
] }) })
|
|
3265
3254
|
] });
|
|
3266
|
-
}),
|
|
3255
|
+
}), Dc = function(t) {
|
|
3267
3256
|
const {
|
|
3268
3257
|
value: n,
|
|
3269
3258
|
options: o,
|
|
@@ -3279,6 +3268,6 @@ const nc = Li, oc = ki, rc = Bi, ic = Wi, cc = Hi, sc = Vi, ac = Yi, lc = qi, dc
|
|
|
3279
3268
|
return /* @__PURE__ */ te("select", { disabled: s, className: l, value: n, onChange: a, children: o.map((f) => /* @__PURE__ */ te("option", { value: f.value, children: f.label }, f.value)) });
|
|
3280
3269
|
};
|
|
3281
3270
|
export {
|
|
3282
|
-
|
|
3283
|
-
|
|
3271
|
+
_c as Select,
|
|
3272
|
+
Dc as Select2
|
|
3284
3273
|
};
|