@box/box-ai-agent-selector 0.48.4 → 0.48.6
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/esm/lib/box-ai-agent-selector.js +557 -555
- package/package.json +2 -2
@@ -1,26 +1,26 @@
|
|
1
1
|
import * as ce from "react";
|
2
2
|
import Gr, { isValidElement as Yr, useLayoutEffect as li, useEffect as W, useRef as Y, useCallback as xe, useState as X, useMemo as He, useReducer as fi, createContext as ge, useContext as et } from "react";
|
3
|
-
import { jsx as
|
3
|
+
import { jsx as N, jsxs as Fe, Fragment as mt } from "react/jsx-runtime";
|
4
4
|
import { flushSync as Xr, createPortal as fr } from "react-dom";
|
5
|
-
import { useFullTextTooltip as di, FilterChip as Nt,
|
6
|
-
import { AlertBadge as
|
5
|
+
import { useFullTextTooltip as di, FilterChip as Nt, TooltipProvider as pi, Tooltip as mi, Status as vi, LoadingIndicator as gi, Button as hi } from "@box/blueprint-web";
|
6
|
+
import { AlertBadge as bi } from "@box/blueprint-web-assets/icons/Fill";
|
7
7
|
import Mt from "clsx";
|
8
|
-
import { useIntl as
|
9
|
-
import { BoxAiAgent as
|
10
|
-
import { AI_AGENTS_LOCAL_STORAGE_KEY as
|
11
|
-
import { useAgentsDispatch as
|
12
|
-
import
|
8
|
+
import { useIntl as yi } from "react-intl";
|
9
|
+
import { BoxAiAgent as Si } from "./box-ai-agent.js";
|
10
|
+
import { AI_AGENTS_LOCAL_STORAGE_KEY as wi, LOGGER_BASE_CONFIG as an, LOGGER_ACTION_CLICK as cn, LOGGER_TARGET as ln } from "./constants.js";
|
11
|
+
import { useAgentsDispatch as Ei } from "./contexts/context.js";
|
12
|
+
import xi from "./hooks/useLocalStorageAIAgents.js";
|
13
13
|
import Qe from "./messages.js";
|
14
14
|
import { R as fn } from "../../chunks/types.js";
|
15
15
|
import { ACTIONS as dr } from "./contexts/actions.js";
|
16
|
-
import '../../styles/box-ai-agent-selector.css';var
|
16
|
+
import '../../styles/box-ai-agent-selector.css';var Pi = Object.defineProperty, Ii = Object.defineProperties, Ci = Object.getOwnPropertyDescriptors, Wt = Object.getOwnPropertySymbols, Jr = Object.prototype.hasOwnProperty, Qr = Object.prototype.propertyIsEnumerable, pr = (e, t, r) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, O = (e, t) => {
|
17
17
|
for (var r in t || (t = {}))
|
18
18
|
Jr.call(t, r) && pr(e, r, t[r]);
|
19
19
|
if (Wt)
|
20
20
|
for (var r of Wt(t))
|
21
21
|
Qr.call(t, r) && pr(e, r, t[r]);
|
22
22
|
return e;
|
23
|
-
}, $ = (e, t) =>
|
23
|
+
}, $ = (e, t) => Ii(e, Ci(t)), J = (e, t) => {
|
24
24
|
var r = {};
|
25
25
|
for (var n in e)
|
26
26
|
Jr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
@@ -28,14 +28,14 @@ import '../../styles/box-ai-agent-selector.css';var xi = Object.defineProperty,
|
|
28
28
|
for (var n of Wt(e))
|
29
29
|
t.indexOf(n) < 0 && Qr.call(e, n) && (r[n] = e[n]);
|
30
30
|
return r;
|
31
|
-
},
|
31
|
+
}, Oi = Object.defineProperty, _i = Object.defineProperties, Di = Object.getOwnPropertyDescriptors, qt = Object.getOwnPropertySymbols, Zr = Object.prototype.hasOwnProperty, eo = Object.prototype.propertyIsEnumerable, mr = (e, t, r) => t in e ? Oi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, te = (e, t) => {
|
32
32
|
for (var r in t || (t = {}))
|
33
33
|
Zr.call(t, r) && mr(e, r, t[r]);
|
34
34
|
if (qt)
|
35
35
|
for (var r of qt(t))
|
36
36
|
eo.call(t, r) && mr(e, r, t[r]);
|
37
37
|
return e;
|
38
|
-
}, ve = (e, t) =>
|
38
|
+
}, ve = (e, t) => _i(e, Di(t)), to = (e, t) => {
|
39
39
|
var r = {};
|
40
40
|
for (var n in e)
|
41
41
|
Zr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
|
@@ -46,17 +46,17 @@ import '../../styles/box-ai-agent-selector.css';var xi = Object.defineProperty,
|
|
46
46
|
};
|
47
47
|
function Kt(...e) {
|
48
48
|
}
|
49
|
-
function
|
50
|
-
if (
|
51
|
-
const r =
|
49
|
+
function Ai(e, t) {
|
50
|
+
if (Ti(e)) {
|
51
|
+
const r = Li(t) ? t() : t;
|
52
52
|
return e(r);
|
53
53
|
}
|
54
54
|
return e;
|
55
55
|
}
|
56
|
-
function
|
56
|
+
function Ti(e) {
|
57
57
|
return typeof e == "function";
|
58
58
|
}
|
59
|
-
function
|
59
|
+
function Li(e) {
|
60
60
|
return typeof e == "function";
|
61
61
|
}
|
62
62
|
function Ne(e, t) {
|
@@ -68,16 +68,16 @@ function Te(...e) {
|
|
68
68
|
typeof r == "function" && r(...t);
|
69
69
|
};
|
70
70
|
}
|
71
|
-
function
|
71
|
+
function Ri(e) {
|
72
72
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
73
73
|
}
|
74
|
-
function
|
74
|
+
function Fi(e, t) {
|
75
75
|
const r = te({}, e);
|
76
76
|
for (const n of t)
|
77
77
|
Ne(r, n) && delete r[n];
|
78
78
|
return r;
|
79
79
|
}
|
80
|
-
function
|
80
|
+
function Ni(e, t) {
|
81
81
|
const r = {};
|
82
82
|
for (const n of t)
|
83
83
|
Ne(e, n) && (r[n] = e[n]);
|
@@ -90,7 +90,7 @@ function he(e, t) {
|
|
90
90
|
if (!e)
|
91
91
|
throw typeof t != "string" ? new Error("Invariant failed") : new Error(t);
|
92
92
|
}
|
93
|
-
function
|
93
|
+
function Mi(e) {
|
94
94
|
return Object.keys(e);
|
95
95
|
}
|
96
96
|
function Xt(e) {
|
@@ -109,13 +109,13 @@ function z(...e) {
|
|
109
109
|
function wn(e, t) {
|
110
110
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
111
111
|
}
|
112
|
-
function
|
112
|
+
function ki(e) {
|
113
113
|
return !e || !Yr(e) ? !1 : "ref" in e.props || "ref" in e;
|
114
114
|
}
|
115
|
-
function
|
116
|
-
return
|
115
|
+
function Vi(e) {
|
116
|
+
return ki(e) ? O({}, e.props).ref || e.ref : null;
|
117
117
|
}
|
118
|
-
function
|
118
|
+
function $i(e, t) {
|
119
119
|
const r = O({}, e);
|
120
120
|
for (const n in t) {
|
121
121
|
if (!Ne(t, n)) continue;
|
@@ -143,8 +143,8 @@ function Vi(e, t) {
|
|
143
143
|
}
|
144
144
|
return r;
|
145
145
|
}
|
146
|
-
var yt =
|
147
|
-
function
|
146
|
+
var yt = Bi();
|
147
|
+
function Bi() {
|
148
148
|
var e;
|
149
149
|
return typeof window < "u" && !!((e = window.document) != null && e.createElement);
|
150
150
|
}
|
@@ -181,9 +181,9 @@ function Fn(e) {
|
|
181
181
|
}
|
182
182
|
function Xe(e) {
|
183
183
|
const t = e.tagName.toLowerCase();
|
184
|
-
return t === "button" ? !0 : t === "input" && e.type ?
|
184
|
+
return t === "button" ? !0 : t === "input" && e.type ? Ki.indexOf(e.type) !== -1 : !1;
|
185
185
|
}
|
186
|
-
var
|
186
|
+
var Ki = [
|
187
187
|
"button",
|
188
188
|
"color",
|
189
189
|
"file",
|
@@ -208,7 +208,7 @@ function qe(e) {
|
|
208
208
|
function En(e) {
|
209
209
|
return e.isContentEditable || qe(e);
|
210
210
|
}
|
211
|
-
function
|
211
|
+
function Hi(e) {
|
212
212
|
if (qe(e))
|
213
213
|
return e.value;
|
214
214
|
if (e.isContentEditable) {
|
@@ -217,7 +217,7 @@ function Ki(e) {
|
|
217
217
|
}
|
218
218
|
return "";
|
219
219
|
}
|
220
|
-
function
|
220
|
+
function Wi(e) {
|
221
221
|
let t = 0, r = 0;
|
222
222
|
if (qe(e))
|
223
223
|
t = e.selectionStart || 0, r = e.selectionEnd || 0;
|
@@ -234,7 +234,7 @@ function Nn(e, t) {
|
|
234
234
|
const r = ["dialog", "menu", "listbox", "tree", "grid"], n = e == null ? void 0 : e.getAttribute("role");
|
235
235
|
return n && r.indexOf(n) !== -1 ? n : t;
|
236
236
|
}
|
237
|
-
function
|
237
|
+
function qi(e, t) {
|
238
238
|
var r;
|
239
239
|
const n = {
|
240
240
|
menu: "menuitem",
|
@@ -260,13 +260,13 @@ function so(e, t) {
|
|
260
260
|
let n = !1;
|
261
261
|
return r.sort(([o, i], [s, u]) => {
|
262
262
|
const a = t(i), f = t(u);
|
263
|
-
return a === f || !a || !f ? 0 :
|
263
|
+
return a === f || !a || !f ? 0 : zi(a, f) ? (o > s && (n = !0), -1) : (o < s && (n = !0), 1);
|
264
264
|
}), n ? r.map(([o, i]) => i) : e;
|
265
265
|
}
|
266
|
-
function
|
266
|
+
function zi(e, t) {
|
267
267
|
return !!(t.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_PRECEDING);
|
268
268
|
}
|
269
|
-
function
|
269
|
+
function Ui() {
|
270
270
|
return yt && !!navigator.maxTouchPoints;
|
271
271
|
}
|
272
272
|
function Mn() {
|
@@ -275,11 +275,11 @@ function Mn() {
|
|
275
275
|
function kn() {
|
276
276
|
return yt && Mn() && /apple/i.test(navigator.vendor);
|
277
277
|
}
|
278
|
-
function
|
278
|
+
function ji() {
|
279
279
|
return yt && /firefox\//i.test(navigator.userAgent);
|
280
280
|
}
|
281
|
-
function
|
282
|
-
return yt && navigator.platform.startsWith("Mac") && !
|
281
|
+
function Gi() {
|
282
|
+
return yt && navigator.platform.startsWith("Mac") && !Ui();
|
283
283
|
}
|
284
284
|
function uo(e) {
|
285
285
|
return !!(e.currentTarget && !se(e.currentTarget, e.target));
|
@@ -287,7 +287,7 @@ function uo(e) {
|
|
287
287
|
function me(e) {
|
288
288
|
return e.target === e.currentTarget;
|
289
289
|
}
|
290
|
-
function
|
290
|
+
function Yi(e) {
|
291
291
|
const t = e.currentTarget;
|
292
292
|
if (!t) return !1;
|
293
293
|
const r = Mn();
|
@@ -295,7 +295,7 @@ function Gi(e) {
|
|
295
295
|
const n = t.tagName.toLowerCase();
|
296
296
|
return n === "a" || n === "button" && t.type === "submit" || n === "input" && t.type === "submit";
|
297
297
|
}
|
298
|
-
function
|
298
|
+
function Xi(e) {
|
299
299
|
const t = e.currentTarget;
|
300
300
|
if (!t) return !1;
|
301
301
|
const r = t.tagName.toLowerCase();
|
@@ -305,7 +305,7 @@ function dt(e, t) {
|
|
305
305
|
const r = new FocusEvent("blur", t), n = e.dispatchEvent(r), o = ve(te({}, t), { bubbles: !0 });
|
306
306
|
return e.dispatchEvent(new FocusEvent("focusout", o)), n;
|
307
307
|
}
|
308
|
-
function
|
308
|
+
function Ji(e, t, r) {
|
309
309
|
const n = new KeyboardEvent(t, r);
|
310
310
|
return e.dispatchEvent(n);
|
311
311
|
}
|
@@ -348,11 +348,11 @@ function Ce(e, t, r, n = window) {
|
|
348
348
|
var Vn = O({}, ce), gr = Vn.useId;
|
349
349
|
Vn.useDeferredValue;
|
350
350
|
var hr = Vn.useInsertionEffect, ee = yt ? li : W;
|
351
|
-
function
|
351
|
+
function Qi(e) {
|
352
352
|
const [t] = X(e);
|
353
353
|
return t;
|
354
354
|
}
|
355
|
-
function
|
355
|
+
function Zi(e) {
|
356
356
|
const t = Y(e);
|
357
357
|
return ee(() => {
|
358
358
|
t.current = e;
|
@@ -410,8 +410,8 @@ function co(e, t) {
|
|
410
410
|
o((i == null ? void 0 : i.tagName.toLowerCase()) || r(t));
|
411
411
|
}, [e, t]), n;
|
412
412
|
}
|
413
|
-
function
|
414
|
-
const n =
|
413
|
+
function es(e, t, r) {
|
414
|
+
const n = Qi(r), [o, i] = X(n);
|
415
415
|
return W(() => {
|
416
416
|
const s = e && "current" in e ? e.current : e;
|
417
417
|
if (!s) return;
|
@@ -435,7 +435,7 @@ function Jt(e, t) {
|
|
435
435
|
[]
|
436
436
|
);
|
437
437
|
}
|
438
|
-
function
|
438
|
+
function ts() {
|
439
439
|
return fi(() => [], []);
|
440
440
|
}
|
441
441
|
function fe(e) {
|
@@ -459,18 +459,18 @@ function fo(e, t, r) {
|
|
459
459
|
}, $(O({}, n), { [t]: r })), [n, t, r]);
|
460
460
|
return [n == null ? void 0 : n[t], { onLoadedMetadataCapture: o }];
|
461
461
|
}
|
462
|
-
function
|
462
|
+
function ns() {
|
463
463
|
return W(() => {
|
464
|
-
Ce("mousemove",
|
464
|
+
Ce("mousemove", os, !0), Ce("mousedown", kt, !0), Ce("mouseup", kt, !0), Ce("keydown", kt, !0), Ce("scroll", kt, !0);
|
465
465
|
}, []), U(() => $n);
|
466
466
|
}
|
467
467
|
var $n = !1, br = 0, yr = 0;
|
468
|
-
function
|
468
|
+
function rs(e) {
|
469
469
|
const t = e.movementX || e.screenX - br, r = e.movementY || e.screenY - yr;
|
470
470
|
return br = e.screenX, yr = e.screenY, t || r || process.env.NODE_ENV === "test";
|
471
471
|
}
|
472
|
-
function
|
473
|
-
|
472
|
+
function os(e) {
|
473
|
+
rs(e) && ($n = !0);
|
474
474
|
}
|
475
475
|
function kt() {
|
476
476
|
$n = !1;
|
@@ -483,12 +483,12 @@ function Bn(e, t) {
|
|
483
483
|
return ce.memo(e, t);
|
484
484
|
}
|
485
485
|
function Q(e, t) {
|
486
|
-
const r = t, { wrapElement: n, render: o } = r, i = J(r, ["wrapElement", "render"]), s = de(t.ref,
|
486
|
+
const r = t, { wrapElement: n, render: o } = r, i = J(r, ["wrapElement", "render"]), s = de(t.ref, Vi(o));
|
487
487
|
let u;
|
488
488
|
if (ce.isValidElement(o)) {
|
489
489
|
const a = $(O({}, o.props), { ref: s });
|
490
|
-
u = ce.cloneElement(o,
|
491
|
-
} else o ? u = o(i) : u = /* @__PURE__ */
|
490
|
+
u = ce.cloneElement(o, $i(i, a));
|
491
|
+
} else o ? u = o(i) : u = /* @__PURE__ */ N(e, O({}, i));
|
492
492
|
return n ? n(u) : u;
|
493
493
|
}
|
494
494
|
function Z(e) {
|
@@ -504,8 +504,8 @@ function it(e = [], t = []) {
|
|
504
504
|
if (!(f && f === d))
|
505
505
|
return d;
|
506
506
|
}, u = (f) => e.reduceRight(
|
507
|
-
(d, c) => /* @__PURE__ */
|
508
|
-
/* @__PURE__ */
|
507
|
+
(d, c) => /* @__PURE__ */ N(c, $(O({}, f), { children: d })),
|
508
|
+
/* @__PURE__ */ N(r.Provider, O({}, f))
|
509
509
|
);
|
510
510
|
return {
|
511
511
|
context: r,
|
@@ -514,43 +514,43 @@ function it(e = [], t = []) {
|
|
514
514
|
useScopedContext: i,
|
515
515
|
useProviderContext: s,
|
516
516
|
ContextProvider: u,
|
517
|
-
ScopedContextProvider: (f) => /* @__PURE__ */
|
518
|
-
(d, c) => /* @__PURE__ */
|
519
|
-
/* @__PURE__ */
|
517
|
+
ScopedContextProvider: (f) => /* @__PURE__ */ N(u, $(O({}, f), { children: t.reduceRight(
|
518
|
+
(d, c) => /* @__PURE__ */ N(c, $(O({}, f), { children: d })),
|
519
|
+
/* @__PURE__ */ N(n.Provider, O({}, f))
|
520
520
|
) }))
|
521
521
|
};
|
522
522
|
}
|
523
|
-
var _t = it(),
|
523
|
+
var _t = it(), is = _t.useContext;
|
524
524
|
_t.useScopedContext;
|
525
525
|
_t.useProviderContext;
|
526
|
-
var
|
527
|
-
[
|
528
|
-
[
|
526
|
+
var ss = _t.ContextProvider, us = _t.ScopedContextProvider, Dt = it(
|
527
|
+
[ss],
|
528
|
+
[us]
|
529
529
|
), Kn = Dt.useContext;
|
530
530
|
Dt.useScopedContext;
|
531
|
-
var
|
531
|
+
var as = Dt.useProviderContext, Hn = Dt.ContextProvider, po = Dt.ScopedContextProvider, cs = ge(
|
532
532
|
void 0
|
533
|
-
),
|
533
|
+
), ls = ge(
|
534
534
|
void 0
|
535
535
|
), At = it();
|
536
536
|
At.useContext;
|
537
537
|
At.useScopedContext;
|
538
|
-
var Wn = At.useProviderContext,
|
539
|
-
[
|
540
|
-
[
|
541
|
-
), Qt = qn.useProviderContext,
|
542
|
-
[
|
538
|
+
var Wn = At.useProviderContext, fs = At.ContextProvider, ds = At.ScopedContextProvider, qn = it(
|
539
|
+
[fs],
|
540
|
+
[ds]
|
541
|
+
), Qt = qn.useProviderContext, ps = qn.ContextProvider, zn = qn.ScopedContextProvider, ms = ge(void 0), vs = ge(void 0), Tt = it(
|
542
|
+
[ps],
|
543
543
|
[zn]
|
544
|
-
),
|
544
|
+
), gs = Tt.useContext;
|
545
545
|
Tt.useScopedContext;
|
546
546
|
var Zt = Tt.useProviderContext, mo = Tt.ContextProvider, en = Tt.ScopedContextProvider;
|
547
547
|
ge(
|
548
548
|
void 0
|
549
549
|
);
|
550
|
-
var
|
550
|
+
var hs = it(
|
551
551
|
[mo, Hn],
|
552
552
|
[en, po]
|
553
|
-
),
|
553
|
+
), bs = hs.useProviderContext;
|
554
554
|
ge(
|
555
555
|
void 0
|
556
556
|
);
|
@@ -568,7 +568,7 @@ function Ke(e, ...t) {
|
|
568
568
|
s.delete(w), !s.size && i();
|
569
569
|
};
|
570
570
|
if (A) return T;
|
571
|
-
const F =
|
571
|
+
const F = Mi(r).map(
|
572
572
|
(L) => Te(
|
573
573
|
...t.map((D) => {
|
574
574
|
var y;
|
@@ -585,30 +585,30 @@ function Ke(e, ...t) {
|
|
585
585
|
});
|
586
586
|
})
|
587
587
|
)
|
588
|
-
),
|
588
|
+
), M = [];
|
589
589
|
for (const L of a)
|
590
|
-
|
590
|
+
M.push(L());
|
591
591
|
const C = t.map(Un);
|
592
|
-
return i = Te(...F, ...
|
592
|
+
return i = Te(...F, ...M, ...C), T;
|
593
593
|
}, v = (A, w, T = f) => (T.add(w), l.set(w, A), () => {
|
594
594
|
var F;
|
595
595
|
(F = c.get(w)) == null || F(), c.delete(w), l.delete(w), T.delete(w);
|
596
|
-
}), E = (A, w) => v(A, w), x = (A, w) => (c.set(w, w(r, r)), v(A, w)), P = (A, w) => (c.set(w, w(r, n)), v(A, w, d)), g = (A) => Ke(
|
596
|
+
}), E = (A, w) => v(A, w), x = (A, w) => (c.set(w, w(r, r)), v(A, w)), P = (A, w) => (c.set(w, w(r, n)), v(A, w, d)), g = (A) => Ke(Ni(r, A), _), m = (A) => Ke(Fi(r, A), _), S = () => r, I = (A, w, T = !1) => {
|
597
597
|
var F;
|
598
598
|
if (!Ne(r, A)) return;
|
599
|
-
const
|
600
|
-
if (
|
599
|
+
const M = Ai(w, r[A]);
|
600
|
+
if (M === r[A]) return;
|
601
601
|
if (!T)
|
602
602
|
for (const y of t)
|
603
|
-
(F = y == null ? void 0 : y.setState) == null || F.call(y, A,
|
603
|
+
(F = y == null ? void 0 : y.setState) == null || F.call(y, A, M);
|
604
604
|
const C = r;
|
605
|
-
r = ve(te({}, r), { [A]:
|
605
|
+
r = ve(te({}, r), { [A]: M });
|
606
606
|
const L = Symbol();
|
607
607
|
o = L, u.add(A);
|
608
608
|
const D = (y, R, B) => {
|
609
609
|
var h;
|
610
|
-
const
|
611
|
-
(!
|
610
|
+
const k = l.get(y), K = (H) => B ? B.has(H) : H === A;
|
611
|
+
(!k || k.some(K)) && ((h = c.get(y)) == null || h(), c.set(y, y(r, R)));
|
612
612
|
};
|
613
613
|
for (const y of f)
|
614
614
|
D(y, C);
|
@@ -696,7 +696,7 @@ If there's a particular need for this, please submit a feature request at https:
|
|
696
696
|
`
|
697
697
|
);
|
698
698
|
}
|
699
|
-
function
|
699
|
+
function ys(e) {
|
700
700
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
701
701
|
}
|
702
702
|
var xn = { exports: {} }, dn = {};
|
@@ -710,7 +710,7 @@ var xn = { exports: {} }, dn = {};
|
|
710
710
|
* LICENSE file in the root directory of this source tree.
|
711
711
|
*/
|
712
712
|
var Sr;
|
713
|
-
function
|
713
|
+
function Ss() {
|
714
714
|
if (Sr) return dn;
|
715
715
|
Sr = 1;
|
716
716
|
var e = Gr;
|
@@ -755,7 +755,7 @@ var pn = {};
|
|
755
755
|
* LICENSE file in the root directory of this source tree.
|
756
756
|
*/
|
757
757
|
var wr;
|
758
|
-
function
|
758
|
+
function ws() {
|
759
759
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
760
760
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
761
761
|
var e = Gr, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
@@ -825,10 +825,10 @@ function Ss() {
|
|
825
825
|
pn.useSyncExternalStore = P, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
826
826
|
}()), pn;
|
827
827
|
}
|
828
|
-
process.env.NODE_ENV === "production" ? xn.exports =
|
829
|
-
var
|
830
|
-
const
|
831
|
-
var { useSyncExternalStore: vo } =
|
828
|
+
process.env.NODE_ENV === "production" ? xn.exports = Ss() : xn.exports = ws();
|
829
|
+
var Es = xn.exports;
|
830
|
+
const xs = /* @__PURE__ */ ys(Es);
|
831
|
+
var { useSyncExternalStore: vo } = xs, go = () => () => {
|
832
832
|
};
|
833
833
|
function _e(e, t = no) {
|
834
834
|
const r = ce.useCallback(
|
@@ -869,7 +869,7 @@ function ho(e, t) {
|
|
869
869
|
return vo(n, o, o);
|
870
870
|
}
|
871
871
|
function pe(e, t, r, n) {
|
872
|
-
const o = Ne(t, r) ? t[r] : void 0, i = n ? t[n] : void 0, s =
|
872
|
+
const o = Ne(t, r) ? t[r] : void 0, i = n ? t[n] : void 0, s = Zi({ value: o, setValue: i });
|
873
873
|
ee(() => $e(e, [r], (u, a) => {
|
874
874
|
const { value: f, setValue: d } = s.current;
|
875
875
|
d && u[r] !== a[r] && u[r] !== f && d(u[r]);
|
@@ -894,7 +894,7 @@ function Xn(e, t) {
|
|
894
894
|
});
|
895
895
|
return [i, s];
|
896
896
|
}
|
897
|
-
function
|
897
|
+
function Ps(e) {
|
898
898
|
var t;
|
899
899
|
const r = e.find((i) => !!i.element), n = [...e].reverse().find((i) => !!i.element);
|
900
900
|
let o = (t = r == null ? void 0 : r.element) == null ? void 0 : t.parentElement;
|
@@ -905,10 +905,10 @@ function xs(e) {
|
|
905
905
|
}
|
906
906
|
return ne(o).body;
|
907
907
|
}
|
908
|
-
function
|
908
|
+
function Is(e) {
|
909
909
|
return e == null ? void 0 : e.__unstablePrivateStore;
|
910
910
|
}
|
911
|
-
function
|
911
|
+
function Cs(e = {}) {
|
912
912
|
var t;
|
913
913
|
tn(e, e.store);
|
914
914
|
const r = (t = e.store) == null ? void 0 : t.getState(), n = z(
|
@@ -919,7 +919,7 @@ function Is(e = {}) {
|
|
919
919
|
), o = new Map(n.map((l) => [l.id, l])), i = {
|
920
920
|
items: n,
|
921
921
|
renderedItems: z(r == null ? void 0 : r.renderedItems, [])
|
922
|
-
}, s =
|
922
|
+
}, s = Is(e.store), u = Ke(
|
923
923
|
{ items: n, renderedItems: i.renderedItems },
|
924
924
|
s
|
925
925
|
), a = Ke(i, e.store), f = (l) => {
|
@@ -941,7 +941,7 @@ function Is(e = {}) {
|
|
941
941
|
return;
|
942
942
|
}
|
943
943
|
cancelAnimationFrame(b), b = requestAnimationFrame(() => f(l.renderedItems));
|
944
|
-
}, E =
|
944
|
+
}, E = Ps(l.renderedItems), x = new IntersectionObserver(v, { root: E });
|
945
945
|
for (const P of l.renderedItems)
|
946
946
|
P.element && x.observe(P.element);
|
947
947
|
return () => {
|
@@ -996,7 +996,7 @@ function Is(e = {}) {
|
|
996
996
|
__unstablePrivateStore: u
|
997
997
|
});
|
998
998
|
}
|
999
|
-
function
|
999
|
+
function Os(e, t, r) {
|
1000
1000
|
return Jt(t, [r.store]), pe(e, r, "items", "setItems"), e;
|
1001
1001
|
}
|
1002
1002
|
function bo(e) {
|
@@ -1011,21 +1011,21 @@ function yo(e) {
|
|
1011
1011
|
function Pn(e) {
|
1012
1012
|
return e.slice().reverse();
|
1013
1013
|
}
|
1014
|
-
var
|
1014
|
+
var _s = { id: null };
|
1015
1015
|
function ke(e, t) {
|
1016
1016
|
return e.find((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
1017
1017
|
}
|
1018
|
-
function
|
1018
|
+
function Ds(e, t) {
|
1019
1019
|
return e.filter((r) => t ? !r.disabled && r.id !== t : !r.disabled);
|
1020
1020
|
}
|
1021
1021
|
function Er(e, t) {
|
1022
1022
|
return e.filter((r) => r.rowId === t);
|
1023
1023
|
}
|
1024
|
-
function
|
1024
|
+
function As(e, t, r = !1) {
|
1025
1025
|
const n = e.findIndex((o) => o.id === t);
|
1026
1026
|
return [
|
1027
1027
|
...e.slice(n + 1),
|
1028
|
-
...r ? [
|
1028
|
+
...r ? [_s] : [],
|
1029
1029
|
...e.slice(0, n)
|
1030
1030
|
];
|
1031
1031
|
}
|
@@ -1046,26 +1046,26 @@ function wo(e) {
|
|
1046
1046
|
r > t && (t = r);
|
1047
1047
|
return t;
|
1048
1048
|
}
|
1049
|
-
function
|
1049
|
+
function Ts(e) {
|
1050
1050
|
return {
|
1051
1051
|
id: "__EMPTY_ITEM__",
|
1052
1052
|
disabled: !0,
|
1053
1053
|
rowId: e
|
1054
1054
|
};
|
1055
1055
|
}
|
1056
|
-
function
|
1056
|
+
function Ls(e, t, r) {
|
1057
1057
|
const n = wo(e);
|
1058
1058
|
for (const o of e)
|
1059
1059
|
for (let i = 0; i < n; i += 1) {
|
1060
1060
|
const s = o[i];
|
1061
1061
|
if (!s || r && s.disabled) {
|
1062
1062
|
const a = i === 0 && r ? ke(o) : o[i - 1];
|
1063
|
-
o[i] = a && t !== a.id && r ? a :
|
1063
|
+
o[i] = a && t !== a.id && r ? a : Ts(a == null ? void 0 : a.rowId);
|
1064
1064
|
}
|
1065
1065
|
}
|
1066
1066
|
return e;
|
1067
1067
|
}
|
1068
|
-
function
|
1068
|
+
function Rs(e) {
|
1069
1069
|
const t = So(e), r = wo(t), n = [];
|
1070
1070
|
for (let o = 0; o < r; o += 1)
|
1071
1071
|
for (const i of t) {
|
@@ -1081,9 +1081,9 @@ function Ls(e) {
|
|
1081
1081
|
}
|
1082
1082
|
return n;
|
1083
1083
|
}
|
1084
|
-
function
|
1084
|
+
function Fs(e = {}) {
|
1085
1085
|
var t;
|
1086
|
-
const r = (t = e.store) == null ? void 0 : t.getState(), n =
|
1086
|
+
const r = (t = e.store) == null ? void 0 : t.getState(), n = Cs(e), o = z(
|
1087
1087
|
e.activeId,
|
1088
1088
|
r == null ? void 0 : r.activeId,
|
1089
1089
|
e.defaultActiveId
|
@@ -1138,22 +1138,22 @@ function Rs(e = {}) {
|
|
1138
1138
|
rtl: m = l.rtl
|
1139
1139
|
} = f, S = a === "up" || a === "down", I = a === "next" || a === "down", _ = I ? m && !S : !m || S, A = v && !p;
|
1140
1140
|
let w = S ? yo(
|
1141
|
-
|
1141
|
+
Ls(So(g), b, A)
|
1142
1142
|
) : g;
|
1143
|
-
if (w = _ ? Pn(w) : w, w = S ?
|
1143
|
+
if (w = _ ? Pn(w) : w, w = S ? Rs(w) : w, b == null)
|
1144
1144
|
return (d = ke(w)) == null ? void 0 : d.id;
|
1145
1145
|
const T = w.find((h) => h.id === b);
|
1146
1146
|
if (!T)
|
1147
1147
|
return (c = ke(w)) == null ? void 0 : c.id;
|
1148
|
-
const F = w.some((h) => h.rowId),
|
1148
|
+
const F = w.some((h) => h.rowId), M = w.indexOf(T), C = w.slice(M + 1), L = Er(C, T.rowId);
|
1149
1149
|
if (p) {
|
1150
|
-
const h =
|
1150
|
+
const h = Ds(L, b), k = h.slice(p)[0] || // If we can't find an item, just return the last one.
|
1151
1151
|
h[h.length - 1];
|
1152
|
-
return
|
1152
|
+
return k == null ? void 0 : k.id;
|
1153
1153
|
}
|
1154
1154
|
const D = E && (S ? E !== "horizontal" : E !== "vertical"), y = F && x && (S ? x !== "horizontal" : x !== "vertical"), R = I ? (!F || S) && D && P : S ? P : !1;
|
1155
1155
|
if (D) {
|
1156
|
-
const h = y && !R ? w : Er(w, T.rowId),
|
1156
|
+
const h = y && !R ? w : Er(w, T.rowId), k = As(h, b, R), K = ke(k, b);
|
1157
1157
|
return K == null ? void 0 : K.id;
|
1158
1158
|
}
|
1159
1159
|
if (y) {
|
@@ -1192,12 +1192,12 @@ function Rs(e = {}) {
|
|
1192
1192
|
up: (a) => (a !== void 0 && typeof a == "number" && (a = { skip: a }), u("up", a))
|
1193
1193
|
});
|
1194
1194
|
}
|
1195
|
-
function
|
1195
|
+
function Ns(e) {
|
1196
1196
|
const t = ot(e.id);
|
1197
1197
|
return O({ id: t }, e);
|
1198
1198
|
}
|
1199
|
-
function
|
1200
|
-
return e =
|
1199
|
+
function Ms(e, t, r) {
|
1200
|
+
return e = Os(e, t, r), pe(e, r, "activeId", "setActiveId"), pe(e, r, "includesBaseElement"), pe(e, r, "virtualFocus"), pe(e, r, "orientation"), pe(e, r, "rtl"), pe(e, r, "focusLoop"), pe(e, r, "focusWrap"), pe(e, r, "focusShift"), e;
|
1201
1201
|
}
|
1202
1202
|
function Eo(e = {}) {
|
1203
1203
|
const t = Yn(
|
@@ -1247,7 +1247,7 @@ function Eo(e = {}) {
|
|
1247
1247
|
function xo(e, t, r) {
|
1248
1248
|
return Jt(t, [r.store, r.disclosure]), pe(e, r, "open", "setOpen"), pe(e, r, "mounted", "setMounted"), pe(e, r, "animated"), Object.assign(e, { disclosure: r.disclosure });
|
1249
1249
|
}
|
1250
|
-
function
|
1250
|
+
function ks(e = {}) {
|
1251
1251
|
const [t, r] = Xn(Eo, e);
|
1252
1252
|
return xo(t, r, e);
|
1253
1253
|
}
|
@@ -1257,11 +1257,11 @@ function Po(e = {}) {
|
|
1257
1257
|
function Io(e, t, r) {
|
1258
1258
|
return xo(e, t, r);
|
1259
1259
|
}
|
1260
|
-
function
|
1260
|
+
function Vs(e = {}) {
|
1261
1261
|
const [t, r] = Xn(Po, e);
|
1262
1262
|
return Io(t, r, e);
|
1263
1263
|
}
|
1264
|
-
function
|
1264
|
+
function $s(e = {}) {
|
1265
1265
|
var t = e, {
|
1266
1266
|
popover: r
|
1267
1267
|
} = t, n = to(t, [
|
@@ -1297,10 +1297,10 @@ function Vs(e = {}) {
|
|
1297
1297
|
render: () => f.setState("rendered", Symbol("rendered"))
|
1298
1298
|
});
|
1299
1299
|
}
|
1300
|
-
function
|
1300
|
+
function Bs(e, t, r) {
|
1301
1301
|
return Jt(t, [r.popover]), pe(e, r, "placement"), Io(e, t, r);
|
1302
1302
|
}
|
1303
|
-
function
|
1303
|
+
function Ks(e = {}) {
|
1304
1304
|
var t = e, {
|
1305
1305
|
combobox: r
|
1306
1306
|
} = t, n = to(t, [
|
@@ -1321,7 +1321,7 @@ function Bs(e = {}) {
|
|
1321
1321
|
])
|
1322
1322
|
);
|
1323
1323
|
tn(n, o);
|
1324
|
-
const i = o.getState(), s =
|
1324
|
+
const i = o.getState(), s = Fs(ve(te({}, n), {
|
1325
1325
|
store: o,
|
1326
1326
|
virtualFocus: z(
|
1327
1327
|
n.virtualFocus,
|
@@ -1344,7 +1344,7 @@ function Bs(e = {}) {
|
|
1344
1344
|
i.orientation,
|
1345
1345
|
"vertical"
|
1346
1346
|
)
|
1347
|
-
})), u =
|
1347
|
+
})), u = $s(ve(te({}, n), {
|
1348
1348
|
store: o,
|
1349
1349
|
placement: z(
|
1350
1350
|
n.placement,
|
@@ -1408,39 +1408,39 @@ function Bs(e = {}) {
|
|
1408
1408
|
setListElement: (c) => d.setState("listElement", c)
|
1409
1409
|
});
|
1410
1410
|
}
|
1411
|
-
function
|
1412
|
-
const t =
|
1411
|
+
function Hs(e) {
|
1412
|
+
const t = bs();
|
1413
1413
|
return e = $(O({}, e), {
|
1414
1414
|
combobox: e.combobox !== void 0 ? e.combobox : t
|
1415
|
-
}),
|
1415
|
+
}), Ns(e);
|
1416
1416
|
}
|
1417
|
-
function
|
1417
|
+
function Ws(e, t, r) {
|
1418
1418
|
return Jt(t, [r.combobox]), pe(e, r, "value", "setValue"), pe(e, r, "setValueOnMove"), Object.assign(
|
1419
|
-
|
1420
|
-
|
1419
|
+
Bs(
|
1420
|
+
Ms(e, t, r),
|
1421
1421
|
t,
|
1422
1422
|
r
|
1423
1423
|
),
|
1424
1424
|
{ combobox: r.combobox }
|
1425
1425
|
);
|
1426
1426
|
}
|
1427
|
-
function
|
1428
|
-
e =
|
1429
|
-
const [t, r] = Xn(
|
1430
|
-
return
|
1427
|
+
function qs(e = {}) {
|
1428
|
+
e = Hs(e);
|
1429
|
+
const [t, r] = Xn(Ks, e);
|
1430
|
+
return Ws(t, r, e);
|
1431
1431
|
}
|
1432
1432
|
var Lt = it(
|
1433
1433
|
[mo, Hn],
|
1434
1434
|
[en, po]
|
1435
|
-
), Co = Lt.useContext,
|
1436
|
-
function
|
1435
|
+
), Co = Lt.useContext, zs = Lt.useScopedContext, Jn = Lt.useProviderContext, Us = Lt.ContextProvider, Oo = Lt.ScopedContextProvider, js = ge(!1), xr = ge(null), _o = ge(!0), nn = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
|
1436
|
+
function Gs(e) {
|
1437
1437
|
return Number.parseInt(e.getAttribute("tabindex") || "0", 10) < 0;
|
1438
1438
|
}
|
1439
1439
|
function De(e) {
|
1440
1440
|
return !(!e.matches(nn) || !oo(e) || e.closest("[inert]"));
|
1441
1441
|
}
|
1442
1442
|
function Ct(e) {
|
1443
|
-
if (!De(e) ||
|
1443
|
+
if (!De(e) || Gs(e)) return !1;
|
1444
1444
|
if (!("form" in e) || !e.form || e.checked || e.type !== "radio") return !0;
|
1445
1445
|
const t = e.form.elements.namedItem(e.name);
|
1446
1446
|
if (!t || !("length" in t)) return !0;
|
@@ -1475,7 +1475,7 @@ function rn(e, t, r) {
|
|
1475
1475
|
}
|
1476
1476
|
}), !o.length && r ? n : o;
|
1477
1477
|
}
|
1478
|
-
function
|
1478
|
+
function Ys(e, t, r) {
|
1479
1479
|
const [n] = rn(
|
1480
1480
|
e,
|
1481
1481
|
t,
|
@@ -1483,29 +1483,29 @@ function Gs(e, t, r) {
|
|
1483
1483
|
);
|
1484
1484
|
return n || null;
|
1485
1485
|
}
|
1486
|
-
function
|
1486
|
+
function Xs(e, t, r, n) {
|
1487
1487
|
const o = We(e), i = Qn(e, t), s = i.indexOf(o), u = i.slice(s + 1);
|
1488
1488
|
return u.find(Ct) || (r ? i.find(Ct) : null) || (n ? u[0] : null) || null;
|
1489
1489
|
}
|
1490
1490
|
function mn(e, t) {
|
1491
|
-
return
|
1491
|
+
return Xs(
|
1492
1492
|
document.body,
|
1493
1493
|
!1,
|
1494
1494
|
e,
|
1495
1495
|
t
|
1496
1496
|
);
|
1497
1497
|
}
|
1498
|
-
function
|
1498
|
+
function Js(e, t, r, n) {
|
1499
1499
|
const o = We(e), i = Qn(e, t).reverse(), s = i.indexOf(o);
|
1500
1500
|
return i.slice(s + 1).find(Ct) || null || null || null;
|
1501
1501
|
}
|
1502
1502
|
function Pr(e, t) {
|
1503
|
-
return
|
1503
|
+
return Js(
|
1504
1504
|
document.body,
|
1505
1505
|
!1
|
1506
1506
|
);
|
1507
1507
|
}
|
1508
|
-
function
|
1508
|
+
function Qs(e) {
|
1509
1509
|
for (; e && !De(e); )
|
1510
1510
|
e = e.closest(nn);
|
1511
1511
|
return e || null;
|
@@ -1527,17 +1527,17 @@ function Do(e) {
|
|
1527
1527
|
function Ao(e) {
|
1528
1528
|
!Do(e) && De(e) && e.focus();
|
1529
1529
|
}
|
1530
|
-
function
|
1530
|
+
function Zs(e) {
|
1531
1531
|
var t;
|
1532
1532
|
const r = (t = e.getAttribute("tabindex")) != null ? t : "";
|
1533
1533
|
e.setAttribute("data-tabindex", r), e.setAttribute("tabindex", "-1");
|
1534
1534
|
}
|
1535
|
-
function
|
1535
|
+
function eu(e, t) {
|
1536
1536
|
const r = rn(e, t);
|
1537
1537
|
for (const n of r)
|
1538
|
-
|
1538
|
+
Zs(n);
|
1539
1539
|
}
|
1540
|
-
function
|
1540
|
+
function tu(e) {
|
1541
1541
|
const t = e.querySelectorAll("[data-tabindex]"), r = (n) => {
|
1542
1542
|
const o = n.getAttribute("data-tabindex");
|
1543
1543
|
n.removeAttribute("data-tabindex"), o ? n.setAttribute("tabindex", o) : n.removeAttribute("tabindex");
|
@@ -1546,10 +1546,10 @@ function eu(e) {
|
|
1546
1546
|
for (const n of t)
|
1547
1547
|
r(n);
|
1548
1548
|
}
|
1549
|
-
function
|
1549
|
+
function nu(e, t) {
|
1550
1550
|
"scrollIntoView" in e ? (e.focus({ preventScroll: !0 }), e.scrollIntoView(te({ block: "nearest", inline: "nearest" }, t))) : e.focus();
|
1551
1551
|
}
|
1552
|
-
var
|
1552
|
+
var ru = "div", Ir = kn(), ou = [
|
1553
1553
|
"text",
|
1554
1554
|
"search",
|
1555
1555
|
"url",
|
@@ -1564,29 +1564,29 @@ var nu = "div", Ir = kn(), ru = [
|
|
1564
1564
|
"datetime",
|
1565
1565
|
"datetime-local"
|
1566
1566
|
], To = Symbol("safariFocusAncestor");
|
1567
|
-
function
|
1567
|
+
function iu(e) {
|
1568
1568
|
return e ? !!e[To] : !1;
|
1569
1569
|
}
|
1570
1570
|
function Cr(e, t) {
|
1571
1571
|
e && (e[To] = t);
|
1572
1572
|
}
|
1573
|
-
function
|
1573
|
+
function su(e) {
|
1574
1574
|
const { tagName: t, readOnly: r, type: n } = e;
|
1575
|
-
return t === "TEXTAREA" && !r || t === "SELECT" && !r ? !0 : t === "INPUT" && !r ?
|
1575
|
+
return t === "TEXTAREA" && !r || t === "SELECT" && !r ? !0 : t === "INPUT" && !r ? ou.includes(n) : !!(e.isContentEditable || e.getAttribute("role") === "combobox" && e.dataset.name);
|
1576
1576
|
}
|
1577
|
-
function
|
1577
|
+
function uu(e) {
|
1578
1578
|
return "labels" in e ? e.labels : null;
|
1579
1579
|
}
|
1580
1580
|
function Or(e) {
|
1581
1581
|
return e.tagName.toLowerCase() === "input" && e.type ? e.type === "radio" || e.type === "checkbox" : !1;
|
1582
1582
|
}
|
1583
|
-
function
|
1583
|
+
function au(e) {
|
1584
1584
|
return e ? e === "button" || e === "summary" || e === "input" || e === "select" || e === "textarea" || e === "a" : !0;
|
1585
1585
|
}
|
1586
|
-
function
|
1586
|
+
function cu(e) {
|
1587
1587
|
return e ? e === "button" || e === "input" || e === "select" || e === "textarea" : !0;
|
1588
1588
|
}
|
1589
|
-
function
|
1589
|
+
function lu(e, t, r, n, o) {
|
1590
1590
|
return e ? t ? r && !n ? -1 : void 0 : r ? o : o || 0 : o;
|
1591
1591
|
}
|
1592
1592
|
function vn(e, t) {
|
@@ -1595,11 +1595,11 @@ function vn(e, t) {
|
|
1595
1595
|
});
|
1596
1596
|
}
|
1597
1597
|
var Zn = !0;
|
1598
|
-
function
|
1598
|
+
function fu(e) {
|
1599
1599
|
const t = e.target;
|
1600
1600
|
t && "hasAttribute" in t && (t.hasAttribute("data-focus-visible") || (Zn = !1));
|
1601
1601
|
}
|
1602
|
-
function
|
1602
|
+
function du(e) {
|
1603
1603
|
e.metaKey || e.ctrlKey || e.altKey || (Zn = !0);
|
1604
1604
|
}
|
1605
1605
|
var on = Z(
|
@@ -1617,12 +1617,12 @@ var on = Z(
|
|
1617
1617
|
]);
|
1618
1618
|
const a = Y(null);
|
1619
1619
|
W(() => {
|
1620
|
-
n && (Ce("mousedown",
|
1620
|
+
n && (Ce("mousedown", fu, !0), Ce("keydown", du, !0));
|
1621
1621
|
}, [n]), Ir && W(() => {
|
1622
1622
|
if (!n) return;
|
1623
1623
|
const y = a.current;
|
1624
1624
|
if (!y || !Or(y)) return;
|
1625
|
-
const R =
|
1625
|
+
const R = uu(y);
|
1626
1626
|
if (!R) return;
|
1627
1627
|
const B = () => queueMicrotask(() => y.focus());
|
1628
1628
|
for (const h of R)
|
@@ -1657,9 +1657,9 @@ var on = Z(
|
|
1657
1657
|
let B = !1;
|
1658
1658
|
const h = () => {
|
1659
1659
|
B = !0;
|
1660
|
-
},
|
1661
|
-
R.addEventListener("focusin", h,
|
1662
|
-
const K =
|
1660
|
+
}, k = { capture: !0, once: !0 };
|
1661
|
+
R.addEventListener("focusin", h, k);
|
1662
|
+
const K = Qs(R.parentElement);
|
1663
1663
|
Cr(K, !0), vt(R, "mouseup", () => {
|
1664
1664
|
R.removeEventListener("focusin", h, !0), Cr(K, !1), !B && Ao(R);
|
1665
1665
|
});
|
@@ -1678,14 +1678,14 @@ var on = Z(
|
|
1678
1678
|
return;
|
1679
1679
|
}
|
1680
1680
|
const R = y.currentTarget, B = () => P(y, R);
|
1681
|
-
Zn ||
|
1681
|
+
Zn || su(y.target) ? vt(y.target, "focusout", B) : l(!1);
|
1682
1682
|
}), _ = u.onBlur, A = U((y) => {
|
1683
1683
|
_ == null || _(y), n && pt(y) && l(!1);
|
1684
1684
|
}), w = et(_o), T = U((y) => {
|
1685
1685
|
n && i && y && w && queueMicrotask(() => {
|
1686
1686
|
Ut(y) || De(y) && y.focus();
|
1687
1687
|
});
|
1688
|
-
}), F = co(a),
|
1688
|
+
}), F = co(a), M = n && au(F), C = n && cu(F), L = u.style, D = He(() => d ? O({ pointerEvents: "none" }, L) : L, [d, L]);
|
1689
1689
|
return u = $(O({
|
1690
1690
|
"data-focus-visible": n && c || void 0,
|
1691
1691
|
"data-autofocus": i || void 0,
|
@@ -1693,10 +1693,10 @@ var on = Z(
|
|
1693
1693
|
}, u), {
|
1694
1694
|
ref: de(a, T, u.ref),
|
1695
1695
|
style: D,
|
1696
|
-
tabIndex:
|
1696
|
+
tabIndex: lu(
|
1697
1697
|
n,
|
1698
1698
|
d,
|
1699
|
-
|
1699
|
+
M,
|
1700
1700
|
C,
|
1701
1701
|
u.tabIndex
|
1702
1702
|
),
|
@@ -1715,22 +1715,22 @@ var on = Z(
|
|
1715
1715
|
);
|
1716
1716
|
G(function(t) {
|
1717
1717
|
const r = on(t);
|
1718
|
-
return Q(
|
1718
|
+
return Q(ru, r);
|
1719
1719
|
});
|
1720
|
-
var
|
1720
|
+
var pu = "button";
|
1721
1721
|
function _r(e) {
|
1722
1722
|
if (!e.isTrusted) return !1;
|
1723
1723
|
const t = e.currentTarget;
|
1724
1724
|
return e.key === "Enter" ? Xe(t) || t.tagName === "SUMMARY" || t.tagName === "A" : e.key === " " ? Xe(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
|
1725
1725
|
}
|
1726
|
-
var
|
1726
|
+
var mu = Symbol("command"), er = Z(
|
1727
1727
|
function(t) {
|
1728
1728
|
var r = t, { clickOnEnter: n = !0, clickOnSpace: o = !0 } = r, i = J(r, ["clickOnEnter", "clickOnSpace"]);
|
1729
1729
|
const s = Y(null), [u, a] = X(!1);
|
1730
1730
|
W(() => {
|
1731
1731
|
s.current && a(Xe(s.current));
|
1732
1732
|
}, []);
|
1733
|
-
const [f, d] = X(!1), c = Y(!1), l = Xt(i), [p, b] = fo(i,
|
1733
|
+
const [f, d] = X(!1), c = Y(!1), l = Xt(i), [p, b] = fo(i, mu, !0), v = i.onKeyDown, E = U((g) => {
|
1734
1734
|
v == null || v(g);
|
1735
1735
|
const m = g.currentTarget;
|
1736
1736
|
if (g.defaultPrevented || p || l || !me(g) || qe(m) || m.isContentEditable) return;
|
@@ -1744,8 +1744,8 @@ var pu = Symbol("command"), er = Z(
|
|
1744
1744
|
if (S) {
|
1745
1745
|
if (!w) {
|
1746
1746
|
g.preventDefault();
|
1747
|
-
const T = g, F = J(T, ["view"]),
|
1748
|
-
|
1747
|
+
const T = g, F = J(T, ["view"]), M = () => vr(m, F);
|
1748
|
+
ji() ? vt(m, "keyup", M) : queueMicrotask(M);
|
1749
1749
|
}
|
1750
1750
|
} else I && (c.current = !0, w || (g.preventDefault(), d(!0)));
|
1751
1751
|
}
|
@@ -1770,7 +1770,7 @@ var pu = Symbol("command"), er = Z(
|
|
1770
1770
|
);
|
1771
1771
|
G(function(t) {
|
1772
1772
|
const r = er(t);
|
1773
|
-
return Q(
|
1773
|
+
return Q(pu, r);
|
1774
1774
|
});
|
1775
1775
|
var Lo = "button", Ro = Z(
|
1776
1776
|
function(t) {
|
@@ -1790,7 +1790,7 @@ G(function(t) {
|
|
1790
1790
|
const r = Ro(t);
|
1791
1791
|
return Q(Lo, r);
|
1792
1792
|
});
|
1793
|
-
var
|
1793
|
+
var vu = "button", gu = Symbol("disclosure"), Fo = Z(
|
1794
1794
|
function(t) {
|
1795
1795
|
var r = t, { store: n, toggleOnClick: o = !0 } = r, i = J(r, ["store", "toggleOnClick"]);
|
1796
1796
|
const s = Wn();
|
@@ -1803,7 +1803,7 @@ var mu = "button", vu = Symbol("disclosure"), Fo = Z(
|
|
1803
1803
|
let P = d === u.current;
|
1804
1804
|
d != null && d.isConnected || (n == null || n.setDisclosureElement(u.current), P = !0), f(c && P);
|
1805
1805
|
}, [d, n, c]);
|
1806
|
-
const l = i.onClick, p = fe(o), [b, v] = fo(i,
|
1806
|
+
const l = i.onClick, p = fe(o), [b, v] = fo(i, gu, !0), E = U((P) => {
|
1807
1807
|
l == null || l(P), !P.defaultPrevented && (b || p(P) && (n == null || n.setDisclosureElement(P.currentTarget), n == null || n.toggle()));
|
1808
1808
|
}), x = n.useState("contentElement");
|
1809
1809
|
return i = $(O(O({
|
@@ -1817,9 +1817,9 @@ var mu = "button", vu = Symbol("disclosure"), Fo = Z(
|
|
1817
1817
|
);
|
1818
1818
|
G(function(t) {
|
1819
1819
|
const r = Fo(t);
|
1820
|
-
return Q(
|
1820
|
+
return Q(vu, r);
|
1821
1821
|
});
|
1822
|
-
var
|
1822
|
+
var hu = "button", No = Z(
|
1823
1823
|
function(t) {
|
1824
1824
|
var r = t, { store: n } = r, o = J(r, ["store"]);
|
1825
1825
|
const i = Qt();
|
@@ -1835,9 +1835,9 @@ var gu = "button", No = Z(
|
|
1835
1835
|
);
|
1836
1836
|
G(function(t) {
|
1837
1837
|
const r = No(t);
|
1838
|
-
return Q(
|
1838
|
+
return Q(hu, r);
|
1839
1839
|
});
|
1840
|
-
var
|
1840
|
+
var bu = "div", Mo = Z(
|
1841
1841
|
function(t) {
|
1842
1842
|
var r = t, { store: n } = r, o = J(r, ["store"]);
|
1843
1843
|
const i = Zt();
|
@@ -1848,9 +1848,9 @@ var hu = "div", Mo = Z(
|
|
1848
1848
|
);
|
1849
1849
|
G(function(t) {
|
1850
1850
|
const r = Mo(t);
|
1851
|
-
return Q(
|
1851
|
+
return Q(bu, r);
|
1852
1852
|
});
|
1853
|
-
var
|
1853
|
+
var yu = "button", ko = Z(function(t) {
|
1854
1854
|
var r = t, { store: n } = r, o = J(r, ["store"]);
|
1855
1855
|
const i = Zt();
|
1856
1856
|
n = n || i, he(
|
@@ -1862,7 +1862,7 @@ var bu = "button", ko = Z(function(t) {
|
|
1862
1862
|
});
|
1863
1863
|
return o = le(
|
1864
1864
|
o,
|
1865
|
-
(a) => /* @__PURE__ */
|
1865
|
+
(a) => /* @__PURE__ */ N(en, { value: n, children: a }),
|
1866
1866
|
[n]
|
1867
1867
|
), o = $(O({}, o), {
|
1868
1868
|
onClick: u
|
@@ -1870,22 +1870,22 @@ var bu = "button", ko = Z(function(t) {
|
|
1870
1870
|
});
|
1871
1871
|
G(function(t) {
|
1872
1872
|
const r = ko(t);
|
1873
|
-
return Q(
|
1873
|
+
return Q(yu, r);
|
1874
1874
|
});
|
1875
|
-
var
|
1875
|
+
var Su = "span", wu = {
|
1876
1876
|
top: "4,10 8,6 12,10",
|
1877
1877
|
right: "6,4 10,8 6,12",
|
1878
1878
|
bottom: "4,6 8,10 12,6",
|
1879
1879
|
left: "10,4 6,8 10,12"
|
1880
1880
|
}, Vo = Z(function(t) {
|
1881
1881
|
var r = t, { store: n, placement: o } = r, i = J(r, ["store", "placement"]);
|
1882
|
-
const s =
|
1882
|
+
const s = gs();
|
1883
1883
|
n = n || s, he(
|
1884
1884
|
n,
|
1885
1885
|
process.env.NODE_ENV !== "production" && "PopoverDisclosureArrow must be wrapped in a PopoverDisclosure component."
|
1886
1886
|
);
|
1887
|
-
const a = n.useState((c) => o || c.placement).split("-")[0], f =
|
1888
|
-
() => /* @__PURE__ */
|
1887
|
+
const a = n.useState((c) => o || c.placement).split("-")[0], f = wu[a], d = He(
|
1888
|
+
() => /* @__PURE__ */ N(
|
1889
1889
|
"svg",
|
1890
1890
|
{
|
1891
1891
|
display: "block",
|
@@ -1897,7 +1897,7 @@ var yu = "span", Su = {
|
|
1897
1897
|
viewBox: "0 0 16 16",
|
1898
1898
|
height: "1em",
|
1899
1899
|
width: "1em",
|
1900
|
-
children: /* @__PURE__ */
|
1900
|
+
children: /* @__PURE__ */ N("polyline", { points: f })
|
1901
1901
|
}
|
1902
1902
|
),
|
1903
1903
|
[f]
|
@@ -1916,34 +1916,34 @@ var yu = "span", Su = {
|
|
1916
1916
|
G(
|
1917
1917
|
function(t) {
|
1918
1918
|
const r = Vo(t);
|
1919
|
-
return Q(
|
1919
|
+
return Q(Su, r);
|
1920
1920
|
}
|
1921
1921
|
);
|
1922
|
-
var
|
1922
|
+
var Eu = "span", xu = Z(
|
1923
1923
|
function(t) {
|
1924
1924
|
var r = t, { store: n } = r, o = J(r, ["store"]);
|
1925
1925
|
const i = Co();
|
1926
1926
|
return n = n || i, o = Vo(O({ store: n }, o)), o;
|
1927
1927
|
}
|
1928
|
-
),
|
1929
|
-
const r =
|
1930
|
-
return Q(
|
1931
|
-
}),
|
1932
|
-
function
|
1928
|
+
), Pu = G(function(t) {
|
1929
|
+
const r = xu(t);
|
1930
|
+
return Q(Eu, r);
|
1931
|
+
}), Iu = { id: null };
|
1932
|
+
function Cu(e, t, r = !1) {
|
1933
1933
|
const n = e.findIndex((o) => o.id === t);
|
1934
1934
|
return [
|
1935
1935
|
...e.slice(n + 1),
|
1936
|
-
...r ? [
|
1936
|
+
...r ? [Iu] : [],
|
1937
1937
|
...e.slice(0, n)
|
1938
1938
|
];
|
1939
1939
|
}
|
1940
|
-
function
|
1940
|
+
function Ou(e, t) {
|
1941
1941
|
return e.find((r) => !r.disabled);
|
1942
1942
|
}
|
1943
1943
|
function Ge(e, t) {
|
1944
1944
|
return t && e.item(t) || null;
|
1945
1945
|
}
|
1946
|
-
function
|
1946
|
+
function _u(e) {
|
1947
1947
|
const t = [];
|
1948
1948
|
for (const r of e) {
|
1949
1949
|
const n = t.find((o) => {
|
@@ -1954,7 +1954,7 @@ function Ou(e) {
|
|
1954
1954
|
}
|
1955
1955
|
return t;
|
1956
1956
|
}
|
1957
|
-
function
|
1957
|
+
function Du(e, t = !1) {
|
1958
1958
|
if (qe(e))
|
1959
1959
|
e.setSelectionRange(
|
1960
1960
|
t ? e.value.length : 0,
|
@@ -1966,30 +1966,30 @@ function _u(e, t = !1) {
|
|
1966
1966
|
}
|
1967
1967
|
}
|
1968
1968
|
var In = Symbol("FOCUS_SILENTLY");
|
1969
|
-
function
|
1969
|
+
function Au(e) {
|
1970
1970
|
e[In] = !0, e.focus({ preventScroll: !0 });
|
1971
1971
|
}
|
1972
|
-
function
|
1972
|
+
function Tu(e) {
|
1973
1973
|
const t = e[In];
|
1974
1974
|
return delete e[In], t;
|
1975
1975
|
}
|
1976
1976
|
function xt(e, t, r) {
|
1977
1977
|
return !(!t || t === r || !e.item(t.id));
|
1978
1978
|
}
|
1979
|
-
var
|
1979
|
+
var Lu = "div", Ve = "";
|
1980
1980
|
function gn() {
|
1981
1981
|
Ve = "";
|
1982
1982
|
}
|
1983
|
-
function
|
1983
|
+
function Ru(e) {
|
1984
1984
|
const t = e.target;
|
1985
1985
|
return t && qe(t) ? !1 : e.key === " " && Ve.length ? !0 : e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey && /^[\p{Letter}\p{Number}]$/u.test(e.key);
|
1986
1986
|
}
|
1987
|
-
function
|
1987
|
+
function Fu(e, t) {
|
1988
1988
|
if (me(e)) return !0;
|
1989
1989
|
const r = e.target;
|
1990
1990
|
return r ? t.some((o) => o.element === r) : !1;
|
1991
1991
|
}
|
1992
|
-
function
|
1992
|
+
function Nu(e) {
|
1993
1993
|
return e.filter((t) => !t.disabled);
|
1994
1994
|
}
|
1995
1995
|
function Ht(e, t) {
|
@@ -1999,12 +1999,12 @@ function Ht(e, t) {
|
|
1999
1999
|
// component that can be used with those as well, we also consider the value
|
2000
2000
|
// property as a fallback for the typeahead text content.
|
2001
2001
|
"value" in e && e.value;
|
2002
|
-
return n ?
|
2002
|
+
return n ? Ri(n).trim().toLowerCase().startsWith(t.toLowerCase()) : !1;
|
2003
2003
|
}
|
2004
|
-
function
|
2004
|
+
function Mu(e, t, r) {
|
2005
2005
|
if (!r) return e;
|
2006
2006
|
const n = e.find((o) => o.id === r);
|
2007
|
-
return !n || !Ht(n, t) || Ve !== t && Ht(n, Ve) ? e : (Ve = t,
|
2007
|
+
return !n || !Ht(n, t) || Ve !== t && Ht(n, Ve) ? e : (Ve = t, Cu(
|
2008
2008
|
e.filter((o) => Ht(o, Ve)),
|
2009
2009
|
r
|
2010
2010
|
).filter((o) => o.id !== r));
|
@@ -2018,10 +2018,10 @@ var tr = Z(function(t) {
|
|
2018
2018
|
);
|
2019
2019
|
const u = i.onKeyDownCapture, a = Y(0), f = U((d) => {
|
2020
2020
|
if (u == null || u(d), d.defaultPrevented || !o || !n) return;
|
2021
|
-
if (!
|
2021
|
+
if (!Ru(d))
|
2022
2022
|
return gn();
|
2023
2023
|
const { renderedItems: c, items: l, activeId: p, id: b } = n.getState();
|
2024
|
-
let v =
|
2024
|
+
let v = Nu(
|
2025
2025
|
l.length > c.length ? l : c
|
2026
2026
|
);
|
2027
2027
|
const E = ne(d.currentTarget), x = `[data-offscreen-id="${b}"]`, P = E.querySelectorAll(x);
|
@@ -2029,12 +2029,12 @@ var tr = Z(function(t) {
|
|
2029
2029
|
const I = S.ariaDisabled === "true" || "disabled" in S && !!S.disabled;
|
2030
2030
|
v.push({ id: S.id, element: S, disabled: I });
|
2031
2031
|
}
|
2032
|
-
if (P.length && (v = so(v, (S) => S.element)), !
|
2032
|
+
if (P.length && (v = so(v, (S) => S.element)), !Fu(d, v)) return gn();
|
2033
2033
|
d.preventDefault(), window.clearTimeout(a.current), a.current = window.setTimeout(() => {
|
2034
2034
|
Ve = "";
|
2035
2035
|
}, 500);
|
2036
2036
|
const g = d.key.toLowerCase();
|
2037
|
-
Ve += g, v =
|
2037
|
+
Ve += g, v = Mu(v, g, p);
|
2038
2038
|
const m = v.find((S) => Ht(S, Ve));
|
2039
2039
|
m ? n.move(m.id) : gn();
|
2040
2040
|
});
|
@@ -2044,10 +2044,10 @@ var tr = Z(function(t) {
|
|
2044
2044
|
});
|
2045
2045
|
G(function(t) {
|
2046
2046
|
const r = tr(t);
|
2047
|
-
return Q(
|
2047
|
+
return Q(Lu, r);
|
2048
2048
|
});
|
2049
|
-
var
|
2050
|
-
function
|
2049
|
+
var ku = "button";
|
2050
|
+
function Vu(e) {
|
2051
2051
|
return Array.from(e.selectedOptions).map((t) => t.value);
|
2052
2052
|
}
|
2053
2053
|
function Vt(e, t) {
|
@@ -2064,7 +2064,7 @@ function Vt(e, t) {
|
|
2064
2064
|
return o == null ? void 0 : o.id;
|
2065
2065
|
};
|
2066
2066
|
}
|
2067
|
-
var
|
2067
|
+
var $u = Z(function(t) {
|
2068
2068
|
var r = t, {
|
2069
2069
|
store: n,
|
2070
2070
|
name: o,
|
@@ -2092,10 +2092,10 @@ var Vu = Z(function(t) {
|
|
2092
2092
|
const p = c.onKeyDown, b = fe(u), v = fe(a), x = n.useState("placement").split("-")[0], P = n.useState("value"), g = Array.isArray(P), m = U((D) => {
|
2093
2093
|
var y;
|
2094
2094
|
if (p == null || p(D), D.defaultPrevented || !n) return;
|
2095
|
-
const { orientation: R, items: B, activeId: h } = n.getState(),
|
2096
|
-
ArrowUp: (H ||
|
2095
|
+
const { orientation: R, items: B, activeId: h } = n.getState(), k = R !== "horizontal", K = R !== "vertical", H = !!((y = B.find((ue) => !ue.disabled && ue.value != null)) != null && y.rowId), oe = {
|
2096
|
+
ArrowUp: (H || k) && Vt(n, n.up),
|
2097
2097
|
ArrowRight: (H || K) && Vt(n, n.next),
|
2098
|
-
ArrowDown: (H ||
|
2098
|
+
ArrowDown: (H || k) && Vt(n, n.down),
|
2099
2099
|
ArrowLeft: (H || K) && Vt(n, n.previous)
|
2100
2100
|
}[D.key];
|
2101
2101
|
oe && v(D) && (D.preventDefault(), n.move(oe()));
|
@@ -2109,7 +2109,7 @@ var Vu = Z(function(t) {
|
|
2109
2109
|
});
|
2110
2110
|
c = le(
|
2111
2111
|
c,
|
2112
|
-
(D) => /* @__PURE__ */
|
2112
|
+
(D) => /* @__PURE__ */ N(Oo, { value: n, children: D }),
|
2113
2113
|
[n]
|
2114
2114
|
);
|
2115
2115
|
const [S, I] = X(!1), _ = Y(!1);
|
@@ -2123,7 +2123,7 @@ var Vu = Z(function(t) {
|
|
2123
2123
|
}), w = c["aria-label"], T = c["aria-labelledby"] || A, F = n.useState((D) => {
|
2124
2124
|
if (o)
|
2125
2125
|
return D.items;
|
2126
|
-
}),
|
2126
|
+
}), M = He(() => [...new Set(F == null ? void 0 : F.map((D) => D.value).filter((D) => D != null))], [F]);
|
2127
2127
|
c = le(
|
2128
2128
|
c,
|
2129
2129
|
(D) => o ? /* @__PURE__ */ Fe(mt, { children: [
|
@@ -2156,12 +2156,12 @@ var Vu = Z(function(t) {
|
|
2156
2156
|
},
|
2157
2157
|
onChange: (y) => {
|
2158
2158
|
_.current = !0, I(!0), n == null || n.setValue(
|
2159
|
-
g ?
|
2159
|
+
g ? Vu(y.target) : y.target.value
|
2160
2160
|
);
|
2161
2161
|
},
|
2162
2162
|
children: [
|
2163
|
-
bo(P).map((y) => y == null ||
|
2164
|
-
|
2163
|
+
bo(P).map((y) => y == null || M.includes(y) ? null : /* @__PURE__ */ N("option", { value: y, children: y }, y)),
|
2164
|
+
M.map((y) => /* @__PURE__ */ N("option", { value: y, children: y }, y))
|
2165
2165
|
]
|
2166
2166
|
}
|
2167
2167
|
),
|
@@ -2176,12 +2176,12 @@ var Vu = Z(function(t) {
|
|
2176
2176
|
s,
|
2177
2177
|
P,
|
2178
2178
|
g,
|
2179
|
-
|
2179
|
+
M
|
2180
2180
|
]
|
2181
2181
|
);
|
2182
2182
|
const C = /* @__PURE__ */ Fe(mt, { children: [
|
2183
2183
|
P,
|
2184
|
-
/* @__PURE__ */
|
2184
|
+
/* @__PURE__ */ N(Pu, {})
|
2185
2185
|
] }), L = n.useState("contentElement");
|
2186
2186
|
return c = $(O({
|
2187
2187
|
role: "combobox",
|
@@ -2195,25 +2195,25 @@ var Vu = Z(function(t) {
|
|
2195
2195
|
ref: de(n.setSelectElement, c.ref),
|
2196
2196
|
onKeyDown: m
|
2197
2197
|
}), c = ko(O({ store: n, toggleOnClick: d }, c)), c = tr(O({ store: n }, c)), c;
|
2198
|
-
}),
|
2199
|
-
const r =
|
2200
|
-
return Q(
|
2198
|
+
}), Bu = G(function(t) {
|
2199
|
+
const r = $u(t);
|
2200
|
+
return Q(ku, r);
|
2201
2201
|
});
|
2202
|
-
function
|
2203
|
-
const t =
|
2204
|
-
return /* @__PURE__ */
|
2202
|
+
function Ku(e = {}) {
|
2203
|
+
const t = qs(e);
|
2204
|
+
return /* @__PURE__ */ N(Us, { value: t, children: e.children });
|
2205
2205
|
}
|
2206
|
-
var Dr = ge(0),
|
2206
|
+
var Dr = ge(0), Hu = "div";
|
2207
2207
|
function $o(e) {
|
2208
2208
|
const t = e.relatedTarget;
|
2209
2209
|
return (t == null ? void 0 : t.nodeType) === Node.ELEMENT_NODE ? t : null;
|
2210
2210
|
}
|
2211
|
-
function
|
2211
|
+
function Wu(e) {
|
2212
2212
|
const t = $o(e);
|
2213
2213
|
return t ? se(e.currentTarget, t) : !1;
|
2214
2214
|
}
|
2215
2215
|
var Cn = Symbol("composite-hover");
|
2216
|
-
function
|
2216
|
+
function qu(e) {
|
2217
2217
|
let t = $o(e);
|
2218
2218
|
if (!t) return !1;
|
2219
2219
|
do {
|
@@ -2238,7 +2238,7 @@ var Bo = Z(
|
|
2238
2238
|
n,
|
2239
2239
|
process.env.NODE_ENV !== "production" && "CompositeHover must be wrapped in a Composite component."
|
2240
2240
|
);
|
2241
|
-
const a =
|
2241
|
+
const a = ns(), f = s.onMouseMove, d = fe(o), c = U((E) => {
|
2242
2242
|
if (f == null || f(E), !E.defaultPrevented && a() && d(E)) {
|
2243
2243
|
if (!Do(E.currentTarget)) {
|
2244
2244
|
const x = n == null ? void 0 : n.getState().baseElement;
|
@@ -2248,7 +2248,7 @@ var Bo = Z(
|
|
2248
2248
|
}
|
2249
2249
|
}), l = s.onMouseLeave, p = fe(i), b = U((E) => {
|
2250
2250
|
var x;
|
2251
|
-
l == null || l(E), !E.defaultPrevented && a() && (
|
2251
|
+
l == null || l(E), !E.defaultPrevented && a() && (Wu(E) || qu(E) || d(E) && p(E) && (n == null || n.setActiveId(null), (x = n == null ? void 0 : n.getState().baseElement) == null || x.focus()));
|
2252
2252
|
}), v = xe((E) => {
|
2253
2253
|
E && (E[Cn] = !0);
|
2254
2254
|
}, []);
|
@@ -2262,10 +2262,10 @@ var Bo = Z(
|
|
2262
2262
|
Bn(
|
2263
2263
|
G(function(t) {
|
2264
2264
|
const r = Bo(t);
|
2265
|
-
return Q(
|
2265
|
+
return Q(Hu, r);
|
2266
2266
|
})
|
2267
2267
|
);
|
2268
|
-
var
|
2268
|
+
var zu = "div", Ko = Z(
|
2269
2269
|
function(t) {
|
2270
2270
|
var r = t, {
|
2271
2271
|
store: n,
|
@@ -2279,7 +2279,7 @@ var qu = "div", Ko = Z(
|
|
2279
2279
|
// @ts-expect-error This prop may come from a collection renderer.
|
2280
2280
|
"element"
|
2281
2281
|
]);
|
2282
|
-
const a =
|
2282
|
+
const a = is();
|
2283
2283
|
n = n || a;
|
2284
2284
|
const f = ot(u.id), d = Y(s);
|
2285
2285
|
return W(() => {
|
@@ -2294,17 +2294,17 @@ var qu = "div", Ko = Z(
|
|
2294
2294
|
);
|
2295
2295
|
G(function(t) {
|
2296
2296
|
const r = Ko(t);
|
2297
|
-
return Q(
|
2297
|
+
return Q(zu, r);
|
2298
2298
|
});
|
2299
|
-
var
|
2300
|
-
function
|
2299
|
+
var Uu = "button";
|
2300
|
+
function ju(e) {
|
2301
2301
|
return En(e) ? !0 : e.tagName === "INPUT" && !Xe(e);
|
2302
2302
|
}
|
2303
|
-
function
|
2303
|
+
function Gu(e, t = !1) {
|
2304
2304
|
const r = e.clientHeight, { top: n } = e.getBoundingClientRect(), o = Math.max(r * 0.875, r - 40) * 1.5, i = t ? r - o + n : o + n;
|
2305
2305
|
return e.tagName === "HTML" ? i + e.scrollTop : i;
|
2306
2306
|
}
|
2307
|
-
function
|
2307
|
+
function Yu(e, t = !1) {
|
2308
2308
|
const { top: r } = e.getBoundingClientRect();
|
2309
2309
|
return t ? r + e.clientHeight : r;
|
2310
2310
|
}
|
@@ -2313,7 +2313,7 @@ function Ar(e, t, r, n = !1) {
|
|
2313
2313
|
if (!t || !r) return;
|
2314
2314
|
const { renderedItems: i } = t.getState(), s = io(e);
|
2315
2315
|
if (!s) return;
|
2316
|
-
const u =
|
2316
|
+
const u = Gu(s, n);
|
2317
2317
|
let a, f;
|
2318
2318
|
for (let d = 0; d < i.length; d += 1) {
|
2319
2319
|
const c = a;
|
@@ -2321,7 +2321,7 @@ function Ar(e, t, r, n = !1) {
|
|
2321
2321
|
if (a === c) continue;
|
2322
2322
|
const l = (o = Ge(t, a)) == null ? void 0 : o.element;
|
2323
2323
|
if (!l) continue;
|
2324
|
-
const b =
|
2324
|
+
const b = Yu(l, n) - u, v = Math.abs(b);
|
2325
2325
|
if (n && b <= 0 || !n && b >= 0) {
|
2326
2326
|
f !== void 0 && f < v && (a = c);
|
2327
2327
|
break;
|
@@ -2330,7 +2330,7 @@ function Ar(e, t, r, n = !1) {
|
|
2330
2330
|
}
|
2331
2331
|
return a;
|
2332
2332
|
}
|
2333
|
-
function
|
2333
|
+
function Xu(e, t) {
|
2334
2334
|
return me(e) ? !1 : xt(t, e.target);
|
2335
2335
|
}
|
2336
2336
|
var Ho = Z(
|
@@ -2356,7 +2356,7 @@ var Ho = Z(
|
|
2356
2356
|
]);
|
2357
2357
|
const l = Kn();
|
2358
2358
|
n = n || l;
|
2359
|
-
const p = ot(c.id), b = Y(null), v = et(
|
2359
|
+
const p = ot(c.id), b = Y(null), v = et(ls), x = Xt(c) && !c.accessibleWhenDisabled, {
|
2360
2360
|
rowId: P,
|
2361
2361
|
baseElement: g,
|
2362
2362
|
isActiveItem: m,
|
@@ -2383,46 +2383,46 @@ var Ho = Z(
|
|
2383
2383
|
ariaPosInSet(h) {
|
2384
2384
|
if (d != null) return d;
|
2385
2385
|
if (!h || !(v != null && v.ariaPosInSet) || v.baseElement !== h.baseElement) return;
|
2386
|
-
const
|
2386
|
+
const k = h.renderedItems.filter(
|
2387
2387
|
(K) => K.rowId === P
|
2388
2388
|
);
|
2389
|
-
return v.ariaPosInSet +
|
2389
|
+
return v.ariaPosInSet + k.findIndex((K) => K.id === p);
|
2390
2390
|
},
|
2391
2391
|
isTabbable(h) {
|
2392
2392
|
if (!(h != null && h.renderedItems.length)) return !0;
|
2393
2393
|
if (h.virtualFocus) return !1;
|
2394
2394
|
if (u) return !0;
|
2395
2395
|
if (h.activeId === null) return !1;
|
2396
|
-
const
|
2397
|
-
return
|
2396
|
+
const k = n == null ? void 0 : n.item(h.activeId);
|
2397
|
+
return k != null && k.disabled || !(k != null && k.element) ? !0 : h.activeId === p;
|
2398
2398
|
}
|
2399
2399
|
}), A = xe(
|
2400
2400
|
(h) => {
|
2401
|
-
var
|
2401
|
+
var k;
|
2402
2402
|
const K = $(O({}, h), {
|
2403
2403
|
id: p || h.id,
|
2404
2404
|
rowId: P,
|
2405
2405
|
disabled: !!x,
|
2406
|
-
children: (
|
2406
|
+
children: (k = h.element) == null ? void 0 : k.textContent
|
2407
2407
|
});
|
2408
2408
|
return a ? a(K) : K;
|
2409
2409
|
},
|
2410
2410
|
[p, P, x, a]
|
2411
2411
|
), w = c.onFocus, T = Y(!1), F = U((h) => {
|
2412
|
-
if (w == null || w(h), h.defaultPrevented || uo(h) || !p || !n ||
|
2413
|
-
const { virtualFocus:
|
2414
|
-
if (n.setActiveId(p), En(h.currentTarget) &&
|
2412
|
+
if (w == null || w(h), h.defaultPrevented || uo(h) || !p || !n || Xu(h, n)) return;
|
2413
|
+
const { virtualFocus: k, baseElement: K } = n.getState();
|
2414
|
+
if (n.setActiveId(p), En(h.currentTarget) && Du(h.currentTarget), !k || !me(h) || ju(h.currentTarget) || !(K != null && K.isConnected)) return;
|
2415
2415
|
kn() && h.currentTarget.hasAttribute("data-autofocus") && h.currentTarget.scrollIntoView({
|
2416
2416
|
block: "nearest",
|
2417
2417
|
inline: "nearest"
|
2418
|
-
}), T.current = !0, h.relatedTarget === K || xt(n, h.relatedTarget) ?
|
2419
|
-
}),
|
2420
|
-
if (
|
2421
|
-
const
|
2422
|
-
|
2418
|
+
}), T.current = !0, h.relatedTarget === K || xt(n, h.relatedTarget) ? Au(K) : K.focus();
|
2419
|
+
}), M = c.onBlurCapture, C = U((h) => {
|
2420
|
+
if (M == null || M(h), h.defaultPrevented) return;
|
2421
|
+
const k = n == null ? void 0 : n.getState();
|
2422
|
+
k != null && k.virtualFocus && T.current && (T.current = !1, h.preventDefault(), h.stopPropagation());
|
2423
2423
|
}), L = c.onKeyDown, D = fe(i), y = fe(s), R = U((h) => {
|
2424
2424
|
if (L == null || L(h), h.defaultPrevented || !me(h) || !n) return;
|
2425
|
-
const { currentTarget:
|
2425
|
+
const { currentTarget: k } = h, K = n.getState(), H = n.item(p), ie = !!(H != null && H.rowId), oe = K.orientation !== "horizontal", re = K.orientation !== "vertical", be = () => !!(ie || re || !K.baseElement || !qe(K.baseElement)), ye = {
|
2426
2426
|
ArrowUp: (ie || oe) && n.up,
|
2427
2427
|
ArrowRight: (ie || re) && n.next,
|
2428
2428
|
ArrowDown: (ie || oe) && n.down,
|
@@ -2435,14 +2435,14 @@ var Ho = Z(
|
|
2435
2435
|
if (be())
|
2436
2436
|
return !ie || h.ctrlKey ? n == null ? void 0 : n.last() : n == null ? void 0 : n.next(-1);
|
2437
2437
|
},
|
2438
|
-
PageUp: () => Ar(
|
2439
|
-
PageDown: () => Ar(
|
2438
|
+
PageUp: () => Ar(k, n, n == null ? void 0 : n.up, !0),
|
2439
|
+
PageDown: () => Ar(k, n, n == null ? void 0 : n.down)
|
2440
2440
|
}[h.key];
|
2441
2441
|
if (ye) {
|
2442
|
-
if (En(
|
2443
|
-
const ue =
|
2442
|
+
if (En(k)) {
|
2443
|
+
const ue = Wi(k), ut = re && h.key === "ArrowLeft", at = re && h.key === "ArrowRight", Me = oe && h.key === "ArrowUp", Ue = oe && h.key === "ArrowDown";
|
2444
2444
|
if (at || Ue) {
|
2445
|
-
const { length: ct } =
|
2445
|
+
const { length: ct } = Hi(k);
|
2446
2446
|
if (ue.end !== ct) return;
|
2447
2447
|
} else if ((ut || Me) && ue.start !== 0) return;
|
2448
2448
|
}
|
@@ -2458,7 +2458,7 @@ var Ho = Z(
|
|
2458
2458
|
);
|
2459
2459
|
return c = le(
|
2460
2460
|
c,
|
2461
|
-
(h) => /* @__PURE__ */
|
2461
|
+
(h) => /* @__PURE__ */ N(cs.Provider, { value: B, children: h }),
|
2462
2462
|
[B]
|
2463
2463
|
), c = $(O({
|
2464
2464
|
id: p,
|
@@ -2483,15 +2483,15 @@ var Ho = Z(
|
|
2483
2483
|
Bn(
|
2484
2484
|
G(function(t) {
|
2485
2485
|
const r = Ho(t);
|
2486
|
-
return Q(
|
2486
|
+
return Q(Uu, r);
|
2487
2487
|
})
|
2488
2488
|
);
|
2489
|
-
var
|
2490
|
-
function
|
2489
|
+
var Ju = "div";
|
2490
|
+
function Qu(e, t) {
|
2491
2491
|
if (t != null)
|
2492
2492
|
return e == null ? !1 : Array.isArray(e) ? e.includes(t) : e === t;
|
2493
2493
|
}
|
2494
|
-
var
|
2494
|
+
var Zu = Z(
|
2495
2495
|
function(t) {
|
2496
2496
|
var r = t, {
|
2497
2497
|
store: n,
|
@@ -2510,7 +2510,7 @@ var Qu = Z(
|
|
2510
2510
|
"preventScrollOnKeyDown",
|
2511
2511
|
"focusOnHover"
|
2512
2512
|
]), c;
|
2513
|
-
const l =
|
2513
|
+
const l = zs();
|
2514
2514
|
n = n || l, he(
|
2515
2515
|
n,
|
2516
2516
|
process.env.NODE_ENV !== "production" && "SelectItem must be wrapped in a SelectList or SelectPopover component."
|
@@ -2521,7 +2521,7 @@ var Qu = Z(
|
|
2521
2521
|
return Array.isArray(w.value);
|
2522
2522
|
},
|
2523
2523
|
selected(w) {
|
2524
|
-
return
|
2524
|
+
return Qu(w.value, o);
|
2525
2525
|
},
|
2526
2526
|
autoFocus(w) {
|
2527
2527
|
return o == null || w.value == null || w.activeId !== p && (n != null && n.item(w.activeId)) ? !1 : Array.isArray(w.value) ? w.value[w.value.length - 1] === o : w.value === o;
|
@@ -2538,15 +2538,15 @@ var Qu = Z(
|
|
2538
2538
|
);
|
2539
2539
|
s = s ?? (o != null && !E);
|
2540
2540
|
const m = d.onClick, S = fe(u), I = fe(s), _ = U((w) => {
|
2541
|
-
m == null || m(w), !w.defaultPrevented && (
|
2541
|
+
m == null || m(w), !w.defaultPrevented && (Xi(w) || Yi(w) || (S(w) && o != null && (n == null || n.setValue((T) => Array.isArray(T) ? T.includes(o) ? T.filter((F) => F !== o) : [...T, o] : o)), I(w) && (n == null || n.hide())));
|
2542
2542
|
});
|
2543
2543
|
d = le(
|
2544
2544
|
d,
|
2545
|
-
(w) => /* @__PURE__ */
|
2545
|
+
(w) => /* @__PURE__ */ N(js.Provider, { value: x ?? !1, children: w }),
|
2546
2546
|
[x]
|
2547
2547
|
), d = $(O({
|
2548
2548
|
id: p,
|
2549
|
-
role:
|
2549
|
+
role: qi(v),
|
2550
2550
|
"aria-selected": x,
|
2551
2551
|
children: o
|
2552
2552
|
}, d), {
|
@@ -2571,38 +2571,38 @@ var Qu = Z(
|
|
2571
2571
|
}
|
2572
2572
|
})), d;
|
2573
2573
|
}
|
2574
|
-
),
|
2574
|
+
), ea = Bn(
|
2575
2575
|
G(function(t) {
|
2576
|
-
const r =
|
2577
|
-
return Q(
|
2576
|
+
const r = Zu(t);
|
2577
|
+
return Q(Ju, r);
|
2578
2578
|
})
|
2579
|
-
),
|
2580
|
-
function
|
2579
|
+
), ta = "div";
|
2580
|
+
function na(e) {
|
2581
2581
|
return e.some((t) => !!t.rowId);
|
2582
2582
|
}
|
2583
|
-
function
|
2583
|
+
function ra(e) {
|
2584
2584
|
const t = e.target;
|
2585
2585
|
return t && !qe(t) ? !1 : e.key.length === 1 && !e.ctrlKey && !e.metaKey;
|
2586
2586
|
}
|
2587
|
-
function
|
2587
|
+
function oa(e) {
|
2588
2588
|
return e.key === "Shift" || e.key === "Control" || e.key === "Alt" || e.key === "Meta";
|
2589
2589
|
}
|
2590
2590
|
function Tr(e, t, r) {
|
2591
2591
|
return U((n) => {
|
2592
2592
|
var o;
|
2593
|
-
if (t == null || t(n), n.defaultPrevented || n.isPropagationStopped() || !me(n) ||
|
2593
|
+
if (t == null || t(n), n.defaultPrevented || n.isPropagationStopped() || !me(n) || oa(n) || ra(n)) return;
|
2594
2594
|
const i = e.getState(), s = (o = Ge(e, i.activeId)) == null ? void 0 : o.element;
|
2595
2595
|
if (!s) return;
|
2596
2596
|
const u = n, a = J(u, ["view"]), f = r == null ? void 0 : r.current;
|
2597
|
-
s !== f && s.focus(),
|
2597
|
+
s !== f && s.focus(), Ji(s, n.type, a) || n.preventDefault(), n.currentTarget.contains(s) && n.stopPropagation();
|
2598
2598
|
});
|
2599
2599
|
}
|
2600
|
-
function
|
2601
|
-
return
|
2602
|
-
yo(Pn(
|
2600
|
+
function ia(e) {
|
2601
|
+
return Ou(
|
2602
|
+
yo(Pn(_u(e)))
|
2603
2603
|
);
|
2604
2604
|
}
|
2605
|
-
function
|
2605
|
+
function sa(e) {
|
2606
2606
|
const [t, r] = X(!1), n = xe(() => r(!0), []), o = e.useState(
|
2607
2607
|
(i) => Ge(e, i.activeId)
|
2608
2608
|
);
|
@@ -2624,19 +2624,19 @@ var Wo = Z(
|
|
2624
2624
|
"focusOnMove",
|
2625
2625
|
"moveOnKeyPress"
|
2626
2626
|
]);
|
2627
|
-
const a =
|
2627
|
+
const a = as();
|
2628
2628
|
n = n || a, he(
|
2629
2629
|
n,
|
2630
2630
|
process.env.NODE_ENV !== "production" && "Composite must receive a `store` prop or be wrapped in a CompositeProvider component."
|
2631
2631
|
);
|
2632
|
-
const f = Y(null), d = Y(null), c =
|
2632
|
+
const f = Y(null), d = Y(null), c = sa(n), l = n.useState("moves"), [, p] = ao(
|
2633
2633
|
o ? n.setBaseElement : null
|
2634
2634
|
);
|
2635
2635
|
W(() => {
|
2636
2636
|
var C;
|
2637
2637
|
if (!n || !l || !o || !i) return;
|
2638
2638
|
const { activeId: L } = n.getState(), D = (C = Ge(n, L)) == null ? void 0 : C.element;
|
2639
|
-
D &&
|
2639
|
+
D && nu(D);
|
2640
2640
|
}, [n, l, o, i]), ee(() => {
|
2641
2641
|
if (!n || !l || !o) return;
|
2642
2642
|
const { baseElement: C, activeId: L } = n.getState();
|
@@ -2665,7 +2665,7 @@ var Wo = Z(
|
|
2665
2665
|
if (P == null || P(C), C.defaultPrevented || !n) return;
|
2666
2666
|
const { virtualFocus: L } = n.getState();
|
2667
2667
|
if (!L) return;
|
2668
|
-
const D = C.relatedTarget, y =
|
2668
|
+
const D = C.relatedTarget, y = Tu(C.currentTarget);
|
2669
2669
|
me(C) && y && (C.stopPropagation(), d.current = D);
|
2670
2670
|
}), m = u.onFocus, S = U((C) => {
|
2671
2671
|
if (m == null || m(C), C.defaultPrevented || !o || !n) return;
|
@@ -2676,26 +2676,26 @@ var Wo = Z(
|
|
2676
2676
|
if (I == null || I(C), C.defaultPrevented || !n) return;
|
2677
2677
|
const { virtualFocus: D, activeId: y } = n.getState();
|
2678
2678
|
if (!D) return;
|
2679
|
-
const R = (L = Ge(n, y)) == null ? void 0 : L.element, B = C.relatedTarget, h = xt(n, B),
|
2680
|
-
d.current = null, me(C) && h ? (B === R ?
|
2679
|
+
const R = (L = Ge(n, y)) == null ? void 0 : L.element, B = C.relatedTarget, h = xt(n, B), k = d.current;
|
2680
|
+
d.current = null, me(C) && h ? (B === R ? k && k !== B && dt(k, C) : R ? dt(R, C) : k && dt(k, C), C.stopPropagation()) : !xt(n, C.target) && R && dt(R, C);
|
2681
2681
|
}), A = u.onKeyDown, w = fe(s), T = U((C) => {
|
2682
2682
|
var L;
|
2683
2683
|
if (A == null || A(C), C.defaultPrevented || !n || !me(C)) return;
|
2684
2684
|
const { orientation: D, renderedItems: y, activeId: R } = n.getState(), B = Ge(n, R);
|
2685
2685
|
if ((L = B == null ? void 0 : B.element) != null && L.isConnected) return;
|
2686
|
-
const h = D !== "horizontal",
|
2686
|
+
const h = D !== "horizontal", k = D !== "vertical", K = na(y);
|
2687
2687
|
if ((C.key === "ArrowLeft" || C.key === "ArrowRight" || C.key === "Home" || C.key === "End") && qe(C.currentTarget)) return;
|
2688
2688
|
const re = {
|
2689
2689
|
ArrowUp: (K || h) && (() => {
|
2690
2690
|
if (K) {
|
2691
|
-
const be =
|
2691
|
+
const be = ia(y);
|
2692
2692
|
return be == null ? void 0 : be.id;
|
2693
2693
|
}
|
2694
2694
|
return n == null ? void 0 : n.last();
|
2695
2695
|
}),
|
2696
|
-
ArrowRight: (K ||
|
2696
|
+
ArrowRight: (K || k) && n.first,
|
2697
2697
|
ArrowDown: (K || h) && n.first,
|
2698
|
-
ArrowLeft: (K ||
|
2698
|
+
ArrowLeft: (K || k) && n.last,
|
2699
2699
|
Home: n.first,
|
2700
2700
|
End: n.last,
|
2701
2701
|
PageUp: n.first,
|
@@ -2711,7 +2711,7 @@ var Wo = Z(
|
|
2711
2711
|
});
|
2712
2712
|
u = le(
|
2713
2713
|
u,
|
2714
|
-
(C) => /* @__PURE__ */
|
2714
|
+
(C) => /* @__PURE__ */ N(Hn, { value: n, children: C }),
|
2715
2715
|
[n]
|
2716
2716
|
);
|
2717
2717
|
const F = n.useState((C) => {
|
@@ -2730,22 +2730,22 @@ var Wo = Z(
|
|
2730
2730
|
onBlurCapture: _,
|
2731
2731
|
onKeyDown: T
|
2732
2732
|
});
|
2733
|
-
const
|
2733
|
+
const M = n.useState(
|
2734
2734
|
(C) => o && (C.virtualFocus || C.activeId === null)
|
2735
2735
|
);
|
2736
|
-
return u = on(O({ focusable:
|
2736
|
+
return u = on(O({ focusable: M }, u)), u;
|
2737
2737
|
}
|
2738
2738
|
);
|
2739
2739
|
G(function(t) {
|
2740
2740
|
const r = Wo(t);
|
2741
|
-
return Q(
|
2741
|
+
return Q(ta, r);
|
2742
2742
|
});
|
2743
|
-
var
|
2743
|
+
var ua = "div";
|
2744
2744
|
function Lr(e, t) {
|
2745
2745
|
const r = setTimeout(t, e);
|
2746
2746
|
return () => clearTimeout(r);
|
2747
2747
|
}
|
2748
|
-
function
|
2748
|
+
function aa(e) {
|
2749
2749
|
let t = requestAnimationFrame(() => {
|
2750
2750
|
t = requestAnimationFrame(e);
|
2751
2751
|
});
|
@@ -2781,7 +2781,7 @@ var rr = Z(function(t) {
|
|
2781
2781
|
d(null);
|
2782
2782
|
return;
|
2783
2783
|
}
|
2784
|
-
return
|
2784
|
+
return aa(() => {
|
2785
2785
|
d(c ? "enter" : l ? "leave" : null);
|
2786
2786
|
});
|
2787
2787
|
}
|
@@ -2800,12 +2800,12 @@ var rr = Z(function(t) {
|
|
2800
2800
|
transitionDuration: w = "0",
|
2801
2801
|
animationDuration: T = "0",
|
2802
2802
|
transitionDelay: F = "0",
|
2803
|
-
animationDelay:
|
2803
|
+
animationDelay: M = "0"
|
2804
2804
|
} = v ? getComputedStyle(v) : {}, C = Rr(
|
2805
2805
|
_,
|
2806
2806
|
A,
|
2807
2807
|
F,
|
2808
|
-
|
2808
|
+
M
|
2809
2809
|
), L = Rr(
|
2810
2810
|
S,
|
2811
2811
|
I,
|
@@ -2820,7 +2820,7 @@ var rr = Z(function(t) {
|
|
2820
2820
|
return Lr(R, m);
|
2821
2821
|
}, [n, p, b, v, c, f]), i = le(
|
2822
2822
|
i,
|
2823
|
-
(g) => /* @__PURE__ */
|
2823
|
+
(g) => /* @__PURE__ */ N(zn, { value: n, children: g }),
|
2824
2824
|
[n]
|
2825
2825
|
);
|
2826
2826
|
const E = nr(l, i.hidden, o), x = i.style, P = He(() => E ? $(O({}, x), { display: "none" }) : x, [E, x]);
|
@@ -2834,9 +2834,9 @@ var rr = Z(function(t) {
|
|
2834
2834
|
ref: de(a ? n.setContentElement : null, u, i.ref),
|
2835
2835
|
style: P
|
2836
2836
|
}), rt(i);
|
2837
|
-
}),
|
2837
|
+
}), ca = G(function(t) {
|
2838
2838
|
const r = rr(t);
|
2839
|
-
return Q(
|
2839
|
+
return Q(ua, r);
|
2840
2840
|
});
|
2841
2841
|
G(function(t) {
|
2842
2842
|
var r = t, {
|
@@ -2848,9 +2848,9 @@ G(function(t) {
|
|
2848
2848
|
return _e(
|
2849
2849
|
s,
|
2850
2850
|
(a) => !n || (a == null ? void 0 : a.mounted)
|
2851
|
-
) === !1 ? null : /* @__PURE__ */
|
2851
|
+
) === !1 ? null : /* @__PURE__ */ N(ca, O({}, o));
|
2852
2852
|
});
|
2853
|
-
var
|
2853
|
+
var la = "div", Fr = ge(null), qo = Z(
|
2854
2854
|
function(t) {
|
2855
2855
|
var r = t, {
|
2856
2856
|
store: n,
|
@@ -2881,20 +2881,20 @@ var ca = "div", Fr = ge(null), qo = Z(
|
|
2881
2881
|
}), S = et(xr), I = X(), [_, A] = S || I, w = He(
|
2882
2882
|
() => [_, A],
|
2883
2883
|
[_]
|
2884
|
-
), [T, F] = X(null),
|
2884
|
+
), [T, F] = X(null), M = et(Fr);
|
2885
2885
|
W(() => {
|
2886
|
-
if (
|
2887
|
-
return
|
2888
|
-
}, [
|
2886
|
+
if (M)
|
2887
|
+
return M(n), () => M(null);
|
2888
|
+
}, [M, n]), f = le(
|
2889
2889
|
f,
|
2890
|
-
(H) => /* @__PURE__ */
|
2890
|
+
(H) => /* @__PURE__ */ N(Oo, { value: n, children: /* @__PURE__ */ N(Fr.Provider, { value: F, children: /* @__PURE__ */ N(xr.Provider, { value: w, children: H }) }) }),
|
2891
2891
|
[n, w]
|
2892
2892
|
);
|
2893
2893
|
const C = !!n.combobox;
|
2894
2894
|
u = u ?? (!C && T !== n);
|
2895
2895
|
const [L, D] = ao(
|
2896
2896
|
u ? n.setListElement : null
|
2897
|
-
), y =
|
2897
|
+
), y = es(L, "role", f.role), B = (u || (y === "listbox" || y === "menu" || y === "tree" || y === "grid")) && p || void 0, h = nr(E, f.hidden, a), k = h ? $(O({}, f.style), { display: "none" }) : f.style;
|
2898
2898
|
u && (f = O({
|
2899
2899
|
role: "listbox",
|
2900
2900
|
"aria-multiselectable": B
|
@@ -2911,13 +2911,13 @@ var ca = "div", Fr = ge(null), qo = Z(
|
|
2911
2911
|
hidden: h
|
2912
2912
|
}, f), {
|
2913
2913
|
ref: de(D, f.ref),
|
2914
|
-
style:
|
2914
|
+
style: k,
|
2915
2915
|
onKeyDown: m
|
2916
2916
|
}), f = Wo($(O({ store: n }, f), { composite: u })), f = tr(O({ store: n, typeahead: !C }, f)), f;
|
2917
2917
|
}
|
2918
|
-
),
|
2918
|
+
), fa = G(function(t) {
|
2919
2919
|
const r = qo(t);
|
2920
|
-
return Q(
|
2920
|
+
return Q(la, r);
|
2921
2921
|
});
|
2922
2922
|
function zo(e, ...t) {
|
2923
2923
|
if (!e) return !1;
|
@@ -2965,7 +2965,7 @@ function On(e, t) {
|
|
2965
2965
|
}) : () => {
|
2966
2966
|
};
|
2967
2967
|
}
|
2968
|
-
function
|
2968
|
+
function da(e, t, r) {
|
2969
2969
|
return e ? Rt(e, t, () => {
|
2970
2970
|
const o = e.style.getPropertyValue(t);
|
2971
2971
|
return e.style.setProperty(t, r), () => {
|
@@ -2974,11 +2974,11 @@ function fa(e, t, r) {
|
|
2974
2974
|
}) : () => {
|
2975
2975
|
};
|
2976
2976
|
}
|
2977
|
-
var
|
2977
|
+
var pa = ["SCRIPT", "STYLE"];
|
2978
2978
|
function _n(e) {
|
2979
2979
|
return `__ariakit-dialog-snapshot-${e}`;
|
2980
2980
|
}
|
2981
|
-
function
|
2981
|
+
function ma(e, t) {
|
2982
2982
|
const r = ne(t), n = _n(e);
|
2983
2983
|
if (!r.body[n]) return !0;
|
2984
2984
|
do {
|
@@ -2988,8 +2988,8 @@ function pa(e, t) {
|
|
2988
2988
|
t = t.parentElement;
|
2989
2989
|
} while (!0);
|
2990
2990
|
}
|
2991
|
-
function
|
2992
|
-
return
|
2991
|
+
function va(e, t, r) {
|
2992
|
+
return pa.includes(t.tagName) || !ma(e, t) ? !1 : !r.some(
|
2993
2993
|
(n) => n && se(t, n)
|
2994
2994
|
);
|
2995
2995
|
}
|
@@ -3000,12 +3000,12 @@ function ir(e, t, r, n) {
|
|
3000
3000
|
for (; o.parentElement && o !== s.body; ) {
|
3001
3001
|
if (n == null || n(o.parentElement, u), !i)
|
3002
3002
|
for (const a of o.parentElement.children)
|
3003
|
-
|
3003
|
+
va(e, a, t) && r(a, u);
|
3004
3004
|
o = o.parentElement;
|
3005
3005
|
}
|
3006
3006
|
}
|
3007
3007
|
}
|
3008
|
-
function
|
3008
|
+
function ga(e, t) {
|
3009
3009
|
const { body: r } = ne(t[0]), n = [];
|
3010
3010
|
return ir(e, t, (i) => {
|
3011
3011
|
n.push(tt(i, _n(e), !0));
|
@@ -3017,7 +3017,7 @@ function va(e, t) {
|
|
3017
3017
|
function ht(e = "", t = !1) {
|
3018
3018
|
return `__ariakit-dialog-${t ? "ancestor" : "outside"}${e ? `-${e}` : ""}`;
|
3019
3019
|
}
|
3020
|
-
function
|
3020
|
+
function ha(e, t = "") {
|
3021
3021
|
return Te(
|
3022
3022
|
tt(e, ht(), !0),
|
3023
3023
|
tt(e, ht(t), !0)
|
@@ -3045,7 +3045,7 @@ function Nr(e, t) {
|
|
3045
3045
|
e,
|
3046
3046
|
t,
|
3047
3047
|
(i) => {
|
3048
|
-
zo(i, ...n) || r.unshift(
|
3048
|
+
zo(i, ...n) || r.unshift(ha(i, e));
|
3049
3049
|
},
|
3050
3050
|
(i, s) => {
|
3051
3051
|
s.hasAttribute("data-dialog") && s.id !== e || r.unshift(Uo(i, e));
|
@@ -3055,7 +3055,7 @@ function Nr(e, t) {
|
|
3055
3055
|
i();
|
3056
3056
|
};
|
3057
3057
|
}
|
3058
|
-
var
|
3058
|
+
var ba = "div", ya = [
|
3059
3059
|
"a",
|
3060
3060
|
"button",
|
3061
3061
|
"details",
|
@@ -3092,22 +3092,22 @@ Z(
|
|
3092
3092
|
var Dn = G(
|
3093
3093
|
// @ts-expect-error
|
3094
3094
|
function(t) {
|
3095
|
-
return Q(
|
3095
|
+
return Q(ba, t);
|
3096
3096
|
}
|
3097
3097
|
);
|
3098
3098
|
Object.assign(
|
3099
3099
|
Dn,
|
3100
|
-
|
3100
|
+
ya.reduce((e, t) => (e[t] = G(function(n) {
|
3101
3101
|
return Q(t, n);
|
3102
3102
|
}), e), {})
|
3103
3103
|
);
|
3104
|
-
function
|
3104
|
+
function Sa({
|
3105
3105
|
store: e,
|
3106
3106
|
backdrop: t,
|
3107
3107
|
alwaysVisible: r,
|
3108
3108
|
hidden: n
|
3109
3109
|
}) {
|
3110
|
-
const o = Y(null), i =
|
3110
|
+
const o = Y(null), i = ks({ disclosure: e }), s = _e(e, "contentElement");
|
3111
3111
|
W(() => {
|
3112
3112
|
const f = o.current, d = s;
|
3113
3113
|
f && d && (f.style.zIndex = getComputedStyle(d).zIndex);
|
@@ -3135,16 +3135,16 @@ function ya({
|
|
3135
3135
|
});
|
3136
3136
|
if (!t) return null;
|
3137
3137
|
if (Yr(t))
|
3138
|
-
return /* @__PURE__ */
|
3138
|
+
return /* @__PURE__ */ N(Dn, $(O({}, u), { render: t }));
|
3139
3139
|
const a = typeof t != "boolean" ? t : "div";
|
3140
|
-
return /* @__PURE__ */
|
3140
|
+
return /* @__PURE__ */ N(Dn, $(O({}, u), { render: /* @__PURE__ */ N(a, {}) }));
|
3141
3141
|
}
|
3142
|
-
function
|
3142
|
+
function wa(e, ...t) {
|
3143
3143
|
if (!e) return !1;
|
3144
3144
|
const r = e.getAttribute("data-focus-trap");
|
3145
3145
|
return r == null ? !1 : t.length ? r === "" ? !1 : t.some((n) => r === n) : !0;
|
3146
3146
|
}
|
3147
|
-
function
|
3147
|
+
function Ea(e) {
|
3148
3148
|
return or(e, "aria-hidden", "true");
|
3149
3149
|
}
|
3150
3150
|
function jo() {
|
@@ -3163,7 +3163,7 @@ function Go(e, t) {
|
|
3163
3163
|
});
|
3164
3164
|
return Te(
|
3165
3165
|
...n,
|
3166
|
-
|
3166
|
+
Ea(e),
|
3167
3167
|
On(e, {
|
3168
3168
|
pointerEvents: "none",
|
3169
3169
|
userSelect: "none",
|
@@ -3171,13 +3171,13 @@ function Go(e, t) {
|
|
3171
3171
|
})
|
3172
3172
|
);
|
3173
3173
|
}
|
3174
|
-
function
|
3174
|
+
function xa(e, t) {
|
3175
3175
|
const r = [], n = t.map((i) => i == null ? void 0 : i.id);
|
3176
3176
|
return ir(
|
3177
3177
|
e,
|
3178
3178
|
t,
|
3179
3179
|
(i) => {
|
3180
|
-
zo(i, ...n) ||
|
3180
|
+
zo(i, ...n) || wa(i, ...n) || r.unshift(Go(i, t));
|
3181
3181
|
},
|
3182
3182
|
(i) => {
|
3183
3183
|
i.hasAttribute("role") && (t.some((s) => s && se(s, i)) || r.unshift(or(i, "role", "none")));
|
@@ -3187,13 +3187,13 @@ function Ea(e, t) {
|
|
3187
3187
|
i();
|
3188
3188
|
};
|
3189
3189
|
}
|
3190
|
-
function
|
3190
|
+
function Pa({
|
3191
3191
|
attribute: e,
|
3192
3192
|
contentId: t,
|
3193
3193
|
contentElement: r,
|
3194
3194
|
enabled: n
|
3195
3195
|
}) {
|
3196
|
-
const [o, i] =
|
3196
|
+
const [o, i] = ts(), s = xe(() => {
|
3197
3197
|
if (!n || !r) return !1;
|
3198
3198
|
const { body: u } = ne(r), a = u.getAttribute(e);
|
3199
3199
|
return !a || a === t;
|
@@ -3207,12 +3207,12 @@ function xa({
|
|
3207
3207
|
return a.observe(u, { attributeFilter: [e] }), () => a.disconnect();
|
3208
3208
|
}, [o, n, t, r, s, e]), s;
|
3209
3209
|
}
|
3210
|
-
function
|
3210
|
+
function Ia(e) {
|
3211
3211
|
const t = e.getBoundingClientRect().left;
|
3212
3212
|
return Math.round(t) + e.scrollLeft ? "paddingLeft" : "paddingRight";
|
3213
3213
|
}
|
3214
|
-
function
|
3215
|
-
const n =
|
3214
|
+
function Ca(e, t, r) {
|
3215
|
+
const n = Pa({
|
3216
3216
|
attribute: "data-dialog-prevent-body-scroll",
|
3217
3217
|
contentElement: e,
|
3218
3218
|
contentId: t,
|
@@ -3220,11 +3220,11 @@ function Ia(e, t, r) {
|
|
3220
3220
|
});
|
3221
3221
|
W(() => {
|
3222
3222
|
if (!n() || !e) return;
|
3223
|
-
const o = ne(e), i = ro(e), { documentElement: s, body: u } = o, a = s.style.getPropertyValue("--scrollbar-width"), f = a ? Number.parseInt(a) : i.innerWidth - s.clientWidth, d = () =>
|
3223
|
+
const o = ne(e), i = ro(e), { documentElement: s, body: u } = o, a = s.style.getPropertyValue("--scrollbar-width"), f = a ? Number.parseInt(a) : i.innerWidth - s.clientWidth, d = () => da(
|
3224
3224
|
s,
|
3225
3225
|
"--scrollbar-width",
|
3226
3226
|
`${f}px`
|
3227
|
-
), c =
|
3227
|
+
), c = Ia(s), l = () => On(u, {
|
3228
3228
|
overflow: "hidden",
|
3229
3229
|
[c]: `${f}px`
|
3230
3230
|
}), p = () => {
|
@@ -3240,7 +3240,7 @@ function Ia(e, t, r) {
|
|
3240
3240
|
return () => {
|
3241
3241
|
I(), process.env.NODE_ENV !== "test" && i.scrollTo({ left: x, top: P, behavior: "instant" });
|
3242
3242
|
};
|
3243
|
-
}, b = Mn() && !
|
3243
|
+
}, b = Mn() && !Gi();
|
3244
3244
|
return Te(
|
3245
3245
|
d(),
|
3246
3246
|
b ? p() : l()
|
@@ -3248,7 +3248,7 @@ function Ia(e, t, r) {
|
|
3248
3248
|
}, [n, e]);
|
3249
3249
|
}
|
3250
3250
|
var Mr = ge({});
|
3251
|
-
function
|
3251
|
+
function Oa(e) {
|
3252
3252
|
const t = et(Mr), [r, n] = X([]), o = xe(
|
3253
3253
|
(u) => {
|
3254
3254
|
var a;
|
@@ -3265,11 +3265,11 @@ function Ca(e) {
|
|
3265
3265
|
}), [e, t]);
|
3266
3266
|
const i = He(() => ({ store: e, add: o }), [e, o]);
|
3267
3267
|
return { wrapElement: xe(
|
3268
|
-
(u) => /* @__PURE__ */
|
3268
|
+
(u) => /* @__PURE__ */ N(Mr.Provider, { value: i, children: u }),
|
3269
3269
|
[i]
|
3270
3270
|
), nestedDialogs: r };
|
3271
3271
|
}
|
3272
|
-
function
|
3272
|
+
function _a(e) {
|
3273
3273
|
const t = Y();
|
3274
3274
|
return W(() => {
|
3275
3275
|
if (!e) {
|
@@ -3281,10 +3281,10 @@ function Oa(e) {
|
|
3281
3281
|
}, !0);
|
3282
3282
|
}, [e]), t;
|
3283
3283
|
}
|
3284
|
-
function
|
3284
|
+
function Da(e) {
|
3285
3285
|
return e.tagName === "HTML" ? !0 : se(ne(e).body, e);
|
3286
3286
|
}
|
3287
|
-
function
|
3287
|
+
function Aa(e, t) {
|
3288
3288
|
if (!e) return !1;
|
3289
3289
|
if (se(e, t)) return !0;
|
3290
3290
|
const r = t.getAttribute("aria-activedescendant");
|
@@ -3295,7 +3295,7 @@ function Da(e, t) {
|
|
3295
3295
|
}
|
3296
3296
|
return !1;
|
3297
3297
|
}
|
3298
|
-
function
|
3298
|
+
function Ta(e, t) {
|
3299
3299
|
if (!("clientY" in e)) return !1;
|
3300
3300
|
const r = t.getBoundingClientRect();
|
3301
3301
|
return r.width === 0 || r.height === 0 ? !1 : r.top <= e.clientY && e.clientY <= r.top + r.height && r.left <= e.clientX && e.clientX <= r.left + r.width;
|
@@ -3318,14 +3318,14 @@ function bn({
|
|
3318
3318
|
return a.addEventListener("focusin", f, !0), () => a.removeEventListener("focusin", f, !0);
|
3319
3319
|
}, [e, s, o]), W(() => s ? Ce(t, (f) => {
|
3320
3320
|
const { contentElement: d, disclosureElement: c } = e.getState(), l = f.target;
|
3321
|
-
!d || !l || !
|
3321
|
+
!d || !l || !Da(l) || se(d, l) || Aa(c, l) || l.hasAttribute("data-focus-trap") || Ta(f, d) || u.current && !sr(l, d.id) || iu(l) || i(f);
|
3322
3322
|
}, n) : void 0, [s, n]);
|
3323
3323
|
}
|
3324
3324
|
function yn(e, t) {
|
3325
3325
|
return typeof e == "function" ? e(t) : !!e;
|
3326
3326
|
}
|
3327
|
-
function
|
3328
|
-
const n = _e(e, "open"), o =
|
3327
|
+
function La(e, t, r) {
|
3328
|
+
const n = _e(e, "open"), o = _a(n), i = { store: e, domReady: r, capture: !0 };
|
3329
3329
|
bn($(O({}, i), {
|
3330
3330
|
type: "click",
|
3331
3331
|
listener: (s) => {
|
@@ -3345,7 +3345,7 @@ function Ta(e, t, r) {
|
|
3345
3345
|
}
|
3346
3346
|
}));
|
3347
3347
|
}
|
3348
|
-
function
|
3348
|
+
function Ra(e, t) {
|
3349
3349
|
const n = ne(e).createElement("button");
|
3350
3350
|
return n.type = "button", n.tabIndex = -1, n.textContent = "Dismiss popup", Object.assign(n.style, {
|
3351
3351
|
border: "0px",
|
@@ -3361,26 +3361,26 @@ function La(e, t) {
|
|
3361
3361
|
n.removeEventListener("click", t), n.remove();
|
3362
3362
|
};
|
3363
3363
|
}
|
3364
|
-
var
|
3364
|
+
var Fa = "div", Yo = Z(function(t) {
|
3365
3365
|
var r = t, { autoFocusOnShow: n = !0 } = r, o = J(r, ["autoFocusOnShow"]);
|
3366
3366
|
return o = le(
|
3367
3367
|
o,
|
3368
|
-
(i) => /* @__PURE__ */
|
3368
|
+
(i) => /* @__PURE__ */ N(_o.Provider, { value: n, children: i }),
|
3369
3369
|
[n]
|
3370
3370
|
), o;
|
3371
3371
|
});
|
3372
3372
|
G(function(t) {
|
3373
3373
|
const r = Yo(t);
|
3374
|
-
return Q(
|
3374
|
+
return Q(Fa, r);
|
3375
3375
|
});
|
3376
|
-
function
|
3376
|
+
function Na({ level: e, children: t }) {
|
3377
3377
|
const r = et(Dr), n = Math.max(
|
3378
3378
|
Math.min(e || r + 1, 6),
|
3379
3379
|
1
|
3380
3380
|
);
|
3381
|
-
return /* @__PURE__ */
|
3381
|
+
return /* @__PURE__ */ N(Dr.Provider, { value: n, children: t });
|
3382
3382
|
}
|
3383
|
-
var
|
3383
|
+
var Ma = "span", Xo = Z(
|
3384
3384
|
function(t) {
|
3385
3385
|
return t = $(O({}, t), {
|
3386
3386
|
style: O({
|
@@ -3399,9 +3399,9 @@ var Na = "span", Xo = Z(
|
|
3399
3399
|
);
|
3400
3400
|
G(function(t) {
|
3401
3401
|
const r = Xo(t);
|
3402
|
-
return Q(
|
3402
|
+
return Q(Ma, r);
|
3403
3403
|
});
|
3404
|
-
var
|
3404
|
+
var ka = "span", Va = Z(
|
3405
3405
|
function(t) {
|
3406
3406
|
return t = $(O({
|
3407
3407
|
"data-focus-trap": "",
|
@@ -3417,16 +3417,16 @@ var Ma = "span", ka = Z(
|
|
3417
3417
|
}), t = Xo(t), t;
|
3418
3418
|
}
|
3419
3419
|
), $t = G(function(t) {
|
3420
|
-
const r =
|
3421
|
-
return Q(
|
3422
|
-
}), kr = ge(null),
|
3423
|
-
function
|
3420
|
+
const r = Va(t);
|
3421
|
+
return Q(ka, r);
|
3422
|
+
}), kr = ge(null), $a = "div";
|
3423
|
+
function Ba(e) {
|
3424
3424
|
return ne(e).body;
|
3425
3425
|
}
|
3426
|
-
function
|
3426
|
+
function Ka(e, t) {
|
3427
3427
|
return t ? typeof t == "function" ? t(e) : t : ne(e).createElement("div");
|
3428
3428
|
}
|
3429
|
-
function
|
3429
|
+
function Ha(e = "id") {
|
3430
3430
|
return `${e ? `${e}-` : ""}${Math.random().toString(36).slice(2, 8)}`;
|
3431
3431
|
}
|
3432
3432
|
function je(e) {
|
@@ -3457,13 +3457,13 @@ var Jo = Z(function(t) {
|
|
3457
3457
|
p(null);
|
3458
3458
|
return;
|
3459
3459
|
}
|
3460
|
-
const S =
|
3460
|
+
const S = Ka(m, i);
|
3461
3461
|
if (!S) {
|
3462
3462
|
p(null);
|
3463
3463
|
return;
|
3464
3464
|
}
|
3465
3465
|
const I = S.isConnected;
|
3466
|
-
if (I || (c ||
|
3466
|
+
if (I || (c || Ba(m)).appendChild(S), S.id || (S.id = m.id ? `portal/${m.id}` : Ha()), p(S), wn(s, S), !I)
|
3467
3467
|
return () => {
|
3468
3468
|
S.remove(), wn(s, null);
|
3469
3469
|
};
|
@@ -3480,9 +3480,9 @@ var Jo = Z(function(t) {
|
|
3480
3480
|
if (!pt(I)) return;
|
3481
3481
|
const _ = I.type === "focusin";
|
3482
3482
|
if (cancelAnimationFrame(m), _)
|
3483
|
-
return
|
3483
|
+
return tu(l);
|
3484
3484
|
m = requestAnimationFrame(() => {
|
3485
|
-
|
3485
|
+
eu(l, !0);
|
3486
3486
|
});
|
3487
3487
|
};
|
3488
3488
|
return l.addEventListener("focusin", S, !0), l.addEventListener("focusout", S, !0), () => {
|
@@ -3494,9 +3494,9 @@ var Jo = Z(function(t) {
|
|
3494
3494
|
if (m = // While the portal node is not in the DOM, we need to pass the
|
3495
3495
|
// current context to the portal context, otherwise it's going to
|
3496
3496
|
// reset to the body element on nested portals.
|
3497
|
-
/* @__PURE__ */
|
3497
|
+
/* @__PURE__ */ N(kr.Provider, { value: l || c, children: m }), !u) return m;
|
3498
3498
|
if (!l)
|
3499
|
-
return /* @__PURE__ */
|
3499
|
+
return /* @__PURE__ */ N(
|
3500
3500
|
"span",
|
3501
3501
|
{
|
3502
3502
|
ref: d,
|
@@ -3506,7 +3506,7 @@ var Jo = Z(function(t) {
|
|
3506
3506
|
}
|
3507
3507
|
);
|
3508
3508
|
m = /* @__PURE__ */ Fe(mt, { children: [
|
3509
|
-
n && l && /* @__PURE__ */
|
3509
|
+
n && l && /* @__PURE__ */ N(
|
3510
3510
|
$t,
|
3511
3511
|
{
|
3512
3512
|
ref: x,
|
@@ -3518,7 +3518,7 @@ var Jo = Z(function(t) {
|
|
3518
3518
|
}
|
3519
3519
|
),
|
3520
3520
|
m,
|
3521
|
-
n && l && /* @__PURE__ */
|
3521
|
+
n && l && /* @__PURE__ */ N(
|
3522
3522
|
$t,
|
3523
3523
|
{
|
3524
3524
|
ref: P,
|
@@ -3531,7 +3531,7 @@ var Jo = Z(function(t) {
|
|
3531
3531
|
)
|
3532
3532
|
] }), l && (m = fr(m, l));
|
3533
3533
|
let S = /* @__PURE__ */ Fe(mt, { children: [
|
3534
|
-
n && l && /* @__PURE__ */
|
3534
|
+
n && l && /* @__PURE__ */ N(
|
3535
3535
|
$t,
|
3536
3536
|
{
|
3537
3537
|
ref: E,
|
@@ -3544,8 +3544,8 @@ var Jo = Z(function(t) {
|
|
3544
3544
|
),
|
3545
3545
|
n && // We're using position: fixed here so that the browser doesn't
|
3546
3546
|
// add margin to the element when setting gap on a parent element.
|
3547
|
-
/* @__PURE__ */
|
3548
|
-
n && l && /* @__PURE__ */
|
3547
|
+
/* @__PURE__ */ N("span", { "aria-owns": l == null ? void 0 : l.id, style: { position: "fixed" } }),
|
3548
|
+
n && l && /* @__PURE__ */ N(
|
3549
3549
|
$t,
|
3550
3550
|
{
|
3551
3551
|
ref: g,
|
@@ -3584,10 +3584,10 @@ var Jo = Z(function(t) {
|
|
3584
3584
|
});
|
3585
3585
|
G(function(t) {
|
3586
3586
|
const r = Jo(t);
|
3587
|
-
return Q(
|
3587
|
+
return Q($a, r);
|
3588
3588
|
});
|
3589
|
-
var
|
3590
|
-
function
|
3589
|
+
var Wa = "div", Vr = kn();
|
3590
|
+
function qa(e) {
|
3591
3591
|
const t = We();
|
3592
3592
|
return !t || e && se(e, t) ? !1 : !!De(t);
|
3593
3593
|
}
|
@@ -3634,7 +3634,7 @@ var Qo = Z(function(t) {
|
|
3634
3634
|
"unmountOnHide",
|
3635
3635
|
"unstable_treeSnapshotKey"
|
3636
3636
|
]);
|
3637
|
-
const S = Qt(), I = Y(null), _ =
|
3637
|
+
const S = Qt(), I = Y(null), _ = Vs({
|
3638
3638
|
store: n || S,
|
3639
3639
|
open: o,
|
3640
3640
|
setOpen(V) {
|
@@ -3647,9 +3647,9 @@ var Qo = Z(function(t) {
|
|
3647
3647
|
}), { portalRef: A, domReady: w } = lo(a, m.portalRef), T = m.preserveTabOrder, F = _e(
|
3648
3648
|
_,
|
3649
3649
|
(V) => T && !u && V.mounted
|
3650
|
-
),
|
3651
|
-
|
3652
|
-
const { wrapElement: R, nestedDialogs: B } =
|
3650
|
+
), M = ot(m.id), C = _e(_, "open"), L = _e(_, "mounted"), D = _e(_, "contentElement"), y = nr(L, m.hidden, m.alwaysVisible);
|
3651
|
+
Ca(D, M, p && !y), La(_, c, w);
|
3652
|
+
const { wrapElement: R, nestedDialogs: B } = Oa(_);
|
3653
3653
|
m = le(m, R, [R]), ee(() => {
|
3654
3654
|
if (!C) return;
|
3655
3655
|
const V = I.current, q = We(V, !0);
|
@@ -3686,7 +3686,7 @@ var Qo = Z(function(t) {
|
|
3686
3686
|
if (!u || !L || !w) return;
|
3687
3687
|
const V = I.current;
|
3688
3688
|
if (!(!V || V.querySelector("[data-dialog-dismiss]")))
|
3689
|
-
return
|
3689
|
+
return Ra(V, _.hide);
|
3690
3690
|
}, [_, u, L, w]), ee(() => {
|
3691
3691
|
if (!jo() || C || !L || !w) return;
|
3692
3692
|
const V = I.current;
|
@@ -3695,27 +3695,27 @@ var Qo = Z(function(t) {
|
|
3695
3695
|
}, [C, L, w]);
|
3696
3696
|
const h = C && w;
|
3697
3697
|
ee(() => {
|
3698
|
-
if (!
|
3698
|
+
if (!M || !h) return;
|
3699
3699
|
const V = I.current;
|
3700
|
-
return
|
3701
|
-
}, [
|
3702
|
-
const
|
3700
|
+
return ga(M, [V]);
|
3701
|
+
}, [M, h, g]);
|
3702
|
+
const k = U(l);
|
3703
3703
|
ee(() => {
|
3704
|
-
if (!
|
3705
|
-
const { disclosureElement: V } = _.getState(), q = I.current, ae =
|
3704
|
+
if (!M || !h) return;
|
3705
|
+
const { disclosureElement: V } = _.getState(), q = I.current, ae = k() || [], j = [
|
3706
3706
|
q,
|
3707
3707
|
...ae,
|
3708
3708
|
...B.map((Se) => Se.getState().contentElement)
|
3709
3709
|
];
|
3710
3710
|
return u ? Te(
|
3711
|
-
Nr(
|
3712
|
-
|
3713
|
-
) : Nr(
|
3711
|
+
Nr(M, j),
|
3712
|
+
xa(M, j)
|
3713
|
+
) : Nr(M, [V, ...j]);
|
3714
3714
|
}, [
|
3715
|
-
|
3715
|
+
M,
|
3716
3716
|
_,
|
3717
3717
|
h,
|
3718
|
-
|
3718
|
+
k,
|
3719
3719
|
B,
|
3720
3720
|
u,
|
3721
3721
|
g
|
@@ -3733,7 +3733,7 @@ var Qo = Z(function(t) {
|
|
3733
3733
|
// dialogs with preserveTabOrder set to true will not receive focus
|
3734
3734
|
// properly because the elements aren't tabbable until the dialog receives
|
3735
3735
|
// focus.
|
3736
|
-
|
3736
|
+
Ys(D, !0, a && F) || // Finally, we fallback to the dialog element itself.
|
3737
3737
|
D, q = De(V);
|
3738
3738
|
H(q ? V : null) && (oe(!0), queueMicrotask(() => {
|
3739
3739
|
V.focus(), Vr && V.scrollIntoView({ block: "nearest", inline: "nearest" });
|
@@ -3756,7 +3756,7 @@ var Qo = Z(function(t) {
|
|
3756
3756
|
const Ie = xe(
|
3757
3757
|
(V, q = !0) => {
|
3758
3758
|
const { disclosureElement: ae } = _.getState();
|
3759
|
-
if (
|
3759
|
+
if (qa(V)) return;
|
3760
3760
|
let j = $r(x) || ae;
|
3761
3761
|
if (j != null && j.id) {
|
3762
3762
|
const Re = ne(j), Et = `[aria-activedescendant="${j.id}"]`, Ft = Re.querySelector(Et);
|
@@ -3804,15 +3804,15 @@ var Qo = Z(function(t) {
|
|
3804
3804
|
!!(j.tagName === "BODY" || se(ae, j) || !Se || se(Se, j)) && ut(q) && _.hide();
|
3805
3805
|
}, !0), [_, w, L, ut]), m = le(
|
3806
3806
|
m,
|
3807
|
-
(V) => /* @__PURE__ */
|
3807
|
+
(V) => /* @__PURE__ */ N(Na, { level: u ? 1 : void 0, children: V }),
|
3808
3808
|
[u]
|
3809
3809
|
);
|
3810
3810
|
const at = m.hidden, Me = m.alwaysVisible;
|
3811
3811
|
m = le(
|
3812
3812
|
m,
|
3813
3813
|
(V) => f ? /* @__PURE__ */ Fe(mt, { children: [
|
3814
|
-
/* @__PURE__ */
|
3815
|
-
|
3814
|
+
/* @__PURE__ */ N(
|
3815
|
+
Sa,
|
3816
3816
|
{
|
3817
3817
|
store: _,
|
3818
3818
|
backdrop: f,
|
@@ -3827,10 +3827,10 @@ var Qo = Z(function(t) {
|
|
3827
3827
|
const [Ue, ct] = X(), [lt, ft] = X();
|
3828
3828
|
return m = le(
|
3829
3829
|
m,
|
3830
|
-
(V) => /* @__PURE__ */
|
3830
|
+
(V) => /* @__PURE__ */ N(zn, { value: _, children: /* @__PURE__ */ N(ms.Provider, { value: ct, children: /* @__PURE__ */ N(vs.Provider, { value: ft, children: V }) }) }),
|
3831
3831
|
[_]
|
3832
3832
|
), m = $(O({
|
3833
|
-
id:
|
3833
|
+
id: M,
|
3834
3834
|
"data-dialog": "",
|
3835
3835
|
role: "dialog",
|
3836
3836
|
tabIndex: s ? -1 : void 0,
|
@@ -3848,13 +3848,13 @@ function ur(e, t = Qt) {
|
|
3848
3848
|
return _e(
|
3849
3849
|
i,
|
3850
3850
|
(u) => !n.unmountOnHide || (u == null ? void 0 : u.mounted) || !!n.open
|
3851
|
-
) ? /* @__PURE__ */
|
3851
|
+
) ? /* @__PURE__ */ N(e, O({}, n)) : null;
|
3852
3852
|
});
|
3853
3853
|
}
|
3854
3854
|
ur(
|
3855
3855
|
G(function(t) {
|
3856
3856
|
const r = Qo(t);
|
3857
|
-
return Q(
|
3857
|
+
return Q(Wa, r);
|
3858
3858
|
}),
|
3859
3859
|
Qt
|
3860
3860
|
);
|
@@ -3899,7 +3899,7 @@ function Br(e, t, r) {
|
|
3899
3899
|
}
|
3900
3900
|
return c;
|
3901
3901
|
}
|
3902
|
-
const
|
3902
|
+
const za = async (e, t, r) => {
|
3903
3903
|
const { placement: n = "bottom", strategy: o = "absolute", middleware: i = [], platform: s } = r, u = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
3904
3904
|
let f = await s.getElementRects({ reference: e, floating: t, strategy: o }), { x: d, y: c } = Br(f, n, a), l = n, p = {}, b = 0;
|
3905
3905
|
for (let v = 0; v < u.length; v++) {
|
@@ -3926,45 +3926,45 @@ const An = Math.min, Ze = Math.max;
|
|
3926
3926
|
function Tn(e, t, r) {
|
3927
3927
|
return Ze(e, An(t, r));
|
3928
3928
|
}
|
3929
|
-
const
|
3929
|
+
const Ua = (e) => ({ name: "arrow", options: e, async fn(t) {
|
3930
3930
|
const { element: r, padding: n = 0 } = e, { x: o, y: i, placement: s, rects: u, platform: a, elements: f } = t;
|
3931
3931
|
if (r == null) return {};
|
3932
3932
|
const d = Zo(n), c = { x: o, y: i }, l = st(s), p = ar(l), b = await a.getDimensions(r), v = l === "y", E = v ? "top" : "left", x = v ? "bottom" : "right", P = v ? "clientHeight" : "clientWidth", g = u.reference[p] + u.reference[l] - c[l] - u.floating[p], m = c[l] - u.reference[l], S = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(r));
|
3933
3933
|
let I = S ? S[P] : 0;
|
3934
3934
|
I && await (a.isElement == null ? void 0 : a.isElement(S)) || (I = f.floating[P] || u.floating[p]);
|
3935
|
-
const _ = g / 2 - m / 2, A = d[E], w = I - b[p] - d[x], T = I / 2 - b[p] / 2 + _, F = Tn(A, T, w),
|
3936
|
-
return { [l]: c[l] - (
|
3937
|
-
} }),
|
3938
|
-
|
3939
|
-
const
|
3935
|
+
const _ = g / 2 - m / 2, A = d[E], w = I - b[p] - d[x], T = I / 2 - b[p] / 2 + _, F = Tn(A, T, w), M = wt(s) != null && T != F && u.reference[p] / 2 - (T < A ? d[E] : d[x]) - b[p] / 2 < 0;
|
3936
|
+
return { [l]: c[l] - (M ? T < A ? A - T : w - T : 0), data: { [l]: F, centerOffset: T - F } };
|
3937
|
+
} }), ja = ["top", "right", "bottom", "left"];
|
3938
|
+
ja.reduce((e, t) => e.concat(t, t + "-start", t + "-end"), []);
|
3939
|
+
const Ga = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
3940
3940
|
function Gt(e) {
|
3941
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
3941
|
+
return e.replace(/left|right|bottom|top/g, (t) => Ga[t]);
|
3942
3942
|
}
|
3943
|
-
function
|
3943
|
+
function Ya(e, t, r) {
|
3944
3944
|
r === void 0 && (r = !1);
|
3945
3945
|
const n = wt(e), o = st(e), i = ar(o);
|
3946
3946
|
let s = o === "x" ? n === (r ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
3947
3947
|
return t.reference[i] > t.floating[i] && (s = Gt(s)), { main: s, cross: Gt(s) };
|
3948
3948
|
}
|
3949
|
-
const
|
3949
|
+
const Xa = { start: "end", end: "start" };
|
3950
3950
|
function Sn(e) {
|
3951
|
-
return e.replace(/start|end/g, (t) =>
|
3951
|
+
return e.replace(/start|end/g, (t) => Xa[t]);
|
3952
3952
|
}
|
3953
|
-
const
|
3953
|
+
const Ja = function(e) {
|
3954
3954
|
return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) {
|
3955
3955
|
var r;
|
3956
3956
|
const { placement: n, middlewareData: o, rects: i, initialPlacement: s, platform: u, elements: a } = t, { mainAxis: f = !0, crossAxis: d = !0, fallbackPlacements: c, fallbackStrategy: l = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: b = !0, ...v } = e, E = Be(n), x = Be(s) === s, P = await (u.isRTL == null ? void 0 : u.isRTL(a.floating)), g = c || (x || !b ? [Gt(s)] : function(F) {
|
3957
|
-
const
|
3958
|
-
return [Sn(F),
|
3957
|
+
const M = Gt(F);
|
3958
|
+
return [Sn(F), M, Sn(M)];
|
3959
3959
|
}(s));
|
3960
|
-
c || p === "none" || g.push(...function(F,
|
3960
|
+
c || p === "none" || g.push(...function(F, M, C, L) {
|
3961
3961
|
const D = wt(F);
|
3962
3962
|
let y = function(R, B, h) {
|
3963
|
-
const
|
3963
|
+
const k = ["left", "right"], K = ["right", "left"], H = ["top", "bottom"], ie = ["bottom", "top"];
|
3964
3964
|
switch (R) {
|
3965
3965
|
case "top":
|
3966
3966
|
case "bottom":
|
3967
|
-
return h ? B ? K :
|
3967
|
+
return h ? B ? K : k : B ? k : K;
|
3968
3968
|
case "left":
|
3969
3969
|
case "right":
|
3970
3970
|
return B ? H : ie;
|
@@ -3972,18 +3972,18 @@ const Xa = function(e) {
|
|
3972
3972
|
return [];
|
3973
3973
|
}
|
3974
3974
|
}(Be(F), C === "start", L);
|
3975
|
-
return D && (y = y.map((R) => R + "-" + D),
|
3975
|
+
return D && (y = y.map((R) => R + "-" + D), M && (y = y.concat(y.map(Sn)))), y;
|
3976
3976
|
}(s, b, p, P));
|
3977
3977
|
const m = [s, ...g], S = await cr(t, v), I = [];
|
3978
3978
|
let _ = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
3979
3979
|
if (f && I.push(S[E]), d) {
|
3980
|
-
const { main: F, cross:
|
3981
|
-
I.push(S[F], S[
|
3980
|
+
const { main: F, cross: M } = Ya(n, i, P);
|
3981
|
+
I.push(S[F], S[M]);
|
3982
3982
|
}
|
3983
3983
|
if (_ = [..._, { placement: n, overflows: I }], !I.every((F) => F <= 0)) {
|
3984
3984
|
var A, w;
|
3985
|
-
const F = (((A = o.flip) == null ? void 0 : A.index) || 0) + 1,
|
3986
|
-
if (
|
3985
|
+
const F = (((A = o.flip) == null ? void 0 : A.index) || 0) + 1, M = m[F];
|
3986
|
+
if (M) return { data: { index: F, overflows: _ }, reset: { placement: M } };
|
3987
3987
|
let C = (w = _.filter((L) => L.overflows[0] <= 0).sort((L, D) => L.overflows[1] - D.overflows[1])[0]) == null ? void 0 : w.placement;
|
3988
3988
|
if (!C) switch (l) {
|
3989
3989
|
case "bestFit": {
|
@@ -3999,7 +3999,7 @@ const Xa = function(e) {
|
|
3999
3999
|
}
|
4000
4000
|
return {};
|
4001
4001
|
} };
|
4002
|
-
},
|
4002
|
+
}, Qa = function(e) {
|
4003
4003
|
return e === void 0 && (e = 0), { name: "offset", options: e, async fn(t) {
|
4004
4004
|
const { x: r, y: n } = t, o = await async function(i, s) {
|
4005
4005
|
const { placement: u, platform: a, elements: f } = i, d = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), c = Be(u), l = wt(u), p = st(u) === "x", b = ["left", "top"].includes(c) ? -1 : 1, v = d && p ? -1 : 1, E = typeof s == "function" ? s(i) : s;
|
@@ -4012,7 +4012,7 @@ const Xa = function(e) {
|
|
4012
4012
|
function ei(e) {
|
4013
4013
|
return e === "x" ? "y" : "x";
|
4014
4014
|
}
|
4015
|
-
const
|
4015
|
+
const Za = function(e) {
|
4016
4016
|
return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) {
|
4017
4017
|
const { x: r, y: n, placement: o } = t, { mainAxis: i = !0, crossAxis: s = !1, limiter: u = { fn: (E) => {
|
4018
4018
|
let { x, y: P } = E;
|
@@ -4030,7 +4030,7 @@ const Qa = function(e) {
|
|
4030
4030
|
const v = u.fn({ ...t, [c]: p, [l]: b });
|
4031
4031
|
return { ...v, data: { x: v.x - r, y: v.y - n } };
|
4032
4032
|
} };
|
4033
|
-
},
|
4033
|
+
}, ec = function(e) {
|
4034
4034
|
return e === void 0 && (e = {}), { options: e, fn(t) {
|
4035
4035
|
const { x: r, y: n, placement: o, rects: i, middlewareData: s } = t, { offset: u = 0, mainAxis: a = !0, crossAxis: f = !0 } = e, d = { x: r, y: n }, c = st(o), l = ei(c);
|
4036
4036
|
let p = d[c], b = d[l];
|
@@ -4046,7 +4046,7 @@ const Qa = function(e) {
|
|
4046
4046
|
}
|
4047
4047
|
return { [c]: p, [l]: b };
|
4048
4048
|
} };
|
4049
|
-
},
|
4049
|
+
}, tc = function(e) {
|
4050
4050
|
return e === void 0 && (e = {}), { name: "size", options: e, async fn(t) {
|
4051
4051
|
const { placement: r, rects: n, platform: o, elements: i } = t, { apply: s = () => {
|
4052
4052
|
}, ...u } = e, a = await cr(t, u), f = Be(r), d = wt(r), c = st(r) === "x", { width: l, height: p } = n.floating;
|
@@ -4102,7 +4102,7 @@ function Ot(e) {
|
|
4102
4102
|
const { overflow: t, overflowX: r, overflowY: n, display: o } = Ae(e);
|
4103
4103
|
return /auto|scroll|overlay|hidden|clip/.test(t + n + r) && !["inline", "contents"].includes(o);
|
4104
4104
|
}
|
4105
|
-
function
|
4105
|
+
function nc(e) {
|
4106
4106
|
return ["table", "td", "th"].includes(Je(e));
|
4107
4107
|
}
|
4108
4108
|
function Ln(e) {
|
@@ -4222,7 +4222,7 @@ function zr(e, t) {
|
|
4222
4222
|
const r = we(e);
|
4223
4223
|
if (!Le(e)) return r;
|
4224
4224
|
let n = qr(e, t);
|
4225
|
-
for (; n &&
|
4225
|
+
for (; n && nc(n) && Ae(n).position === "static"; ) n = qr(n, t);
|
4226
4226
|
return n && (Je(n) === "html" || Je(n) === "body" && Ae(n).position === "static" && !Ln(n)) ? r : n || function(o) {
|
4227
4227
|
let i = bt(o);
|
4228
4228
|
for (; Le(i) && !sn(i); ) {
|
@@ -4232,7 +4232,7 @@ function zr(e, t) {
|
|
4232
4232
|
return null;
|
4233
4233
|
}(e) || r;
|
4234
4234
|
}
|
4235
|
-
function
|
4235
|
+
function rc(e, t, r) {
|
4236
4236
|
const n = Le(t), o = Ye(t), i = nt(e, !0, r === "fixed", t);
|
4237
4237
|
let s = { scrollLeft: 0, scrollTop: 0 };
|
4238
4238
|
const u = { x: 0, y: 0 };
|
@@ -4242,7 +4242,7 @@ function nc(e, t, r) {
|
|
4242
4242
|
} else o && (u.x = si(o));
|
4243
4243
|
return { x: i.left + s.scrollLeft - u.x, y: i.top + s.scrollTop - u.y, width: i.width, height: i.height };
|
4244
4244
|
}
|
4245
|
-
const
|
4245
|
+
const oc = { getClippingRect: function(e) {
|
4246
4246
|
let { element: t, boundary: r, rootBoundary: n, strategy: o } = e;
|
4247
4247
|
const i = r === "clippingAncestors" ? function(f, d) {
|
4248
4248
|
const c = d.get(f);
|
@@ -4276,9 +4276,9 @@ const rc = { getClippingRect: function(e) {
|
|
4276
4276
|
}, getOffsetParent: zr, getDocumentElement: Ye, getScale: gt, async getElementRects(e) {
|
4277
4277
|
let { reference: t, floating: r, strategy: n } = e;
|
4278
4278
|
const o = this.getOffsetParent || zr, i = this.getDimensions;
|
4279
|
-
return { reference:
|
4279
|
+
return { reference: rc(t, await o(r), n), floating: { x: 0, y: 0, ...await i(r) } };
|
4280
4280
|
}, getClientRects: (e) => Array.from(e.getClientRects()), isRTL: (e) => Ae(e).direction === "rtl" };
|
4281
|
-
function
|
4281
|
+
function ic(e, t, r, n) {
|
4282
4282
|
n === void 0 && (n = {});
|
4283
4283
|
const { ancestorScroll: o = !0, ancestorResize: i = !0, elementResize: s = !0, animationFrame: u = !1 } = n, a = o || i ? [...Ee(e) ? It(e) : e.contextElement ? It(e.contextElement) : [], ...It(t)] : [];
|
4284
4284
|
a.forEach((l) => {
|
@@ -4300,11 +4300,11 @@ function oc(e, t, r, n) {
|
|
4300
4300
|
}), (l = d) == null || l.disconnect(), d = null, u && cancelAnimationFrame(f);
|
4301
4301
|
};
|
4302
4302
|
}
|
4303
|
-
const
|
4304
|
-
const n = /* @__PURE__ */ new Map(), o = { platform:
|
4305
|
-
return
|
4303
|
+
const sc = (e, t, r) => {
|
4304
|
+
const n = /* @__PURE__ */ new Map(), o = { platform: oc, ...r }, i = { ...o.platform, _c: n };
|
4305
|
+
return za(e, t, { ...o, platform: i });
|
4306
4306
|
};
|
4307
|
-
var
|
4307
|
+
var uc = "div";
|
4308
4308
|
function Ur(e = 0, t = 0, r = 0, n = 0) {
|
4309
4309
|
if (typeof DOMRect == "function")
|
4310
4310
|
return new DOMRect(e, t, r, n);
|
@@ -4320,29 +4320,29 @@ function Ur(e = 0, t = 0, r = 0, n = 0) {
|
|
4320
4320
|
};
|
4321
4321
|
return $(O({}, o), { toJSON: () => o });
|
4322
4322
|
}
|
4323
|
-
function
|
4323
|
+
function ac(e) {
|
4324
4324
|
if (!e) return Ur();
|
4325
4325
|
const { x: t, y: r, width: n, height: o } = e;
|
4326
4326
|
return Ur(t, r, n, o);
|
4327
4327
|
}
|
4328
|
-
function
|
4328
|
+
function cc(e, t) {
|
4329
4329
|
return {
|
4330
4330
|
contextElement: e || void 0,
|
4331
4331
|
getBoundingClientRect: () => {
|
4332
4332
|
const n = e, o = t == null ? void 0 : t(n);
|
4333
|
-
return o || !n ?
|
4333
|
+
return o || !n ? ac(o) : n.getBoundingClientRect();
|
4334
4334
|
}
|
4335
4335
|
};
|
4336
4336
|
}
|
4337
|
-
function
|
4337
|
+
function lc(e) {
|
4338
4338
|
return /^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e);
|
4339
4339
|
}
|
4340
4340
|
function jr(e) {
|
4341
4341
|
const t = window.devicePixelRatio || 1;
|
4342
4342
|
return Math.round(e * t) / t;
|
4343
4343
|
}
|
4344
|
-
function
|
4345
|
-
return
|
4344
|
+
function fc(e, t) {
|
4345
|
+
return Qa(({ placement: r }) => {
|
4346
4346
|
var n;
|
4347
4347
|
const o = ((e == null ? void 0 : e.clientHeight) || 0) / 2, i = typeof t.gutter == "number" ? t.gutter + o : (n = t.gutter) != null ? n : o;
|
4348
4348
|
return {
|
@@ -4352,28 +4352,28 @@ function lc(e, t) {
|
|
4352
4352
|
};
|
4353
4353
|
});
|
4354
4354
|
}
|
4355
|
-
function
|
4355
|
+
function dc(e) {
|
4356
4356
|
if (e.flip === !1) return;
|
4357
4357
|
const t = typeof e.flip == "string" ? e.flip.split(" ") : void 0;
|
4358
4358
|
return he(
|
4359
|
-
!t || t.every(
|
4359
|
+
!t || t.every(lc),
|
4360
4360
|
process.env.NODE_ENV !== "production" && "`flip` expects a spaced-delimited list of placements"
|
4361
|
-
),
|
4361
|
+
), Ja({
|
4362
4362
|
padding: e.overflowPadding,
|
4363
4363
|
fallbackPlacements: t
|
4364
4364
|
});
|
4365
4365
|
}
|
4366
|
-
function
|
4366
|
+
function pc(e) {
|
4367
4367
|
if (!(!e.slide && !e.overlap))
|
4368
|
-
return
|
4368
|
+
return Za({
|
4369
4369
|
mainAxis: e.slide,
|
4370
4370
|
crossAxis: e.overlap,
|
4371
4371
|
padding: e.overflowPadding,
|
4372
|
-
limiter:
|
4372
|
+
limiter: ec()
|
4373
4373
|
});
|
4374
4374
|
}
|
4375
|
-
function
|
4376
|
-
return
|
4375
|
+
function mc(e) {
|
4376
|
+
return tc({
|
4377
4377
|
padding: e.overflowPadding,
|
4378
4378
|
apply({ elements: t, availableWidth: r, availableHeight: n, rects: o }) {
|
4379
4379
|
const i = t.floating, s = Math.round(o.reference.width);
|
@@ -4390,9 +4390,9 @@ function pc(e) {
|
|
4390
4390
|
}
|
4391
4391
|
});
|
4392
4392
|
}
|
4393
|
-
function
|
4393
|
+
function vc(e, t) {
|
4394
4394
|
if (e)
|
4395
|
-
return
|
4395
|
+
return Ua({
|
4396
4396
|
element: e,
|
4397
4397
|
padding: t.arrowPadding
|
4398
4398
|
});
|
@@ -4443,28 +4443,28 @@ var ci = Z(
|
|
4443
4443
|
n,
|
4444
4444
|
process.env.NODE_ENV !== "production" && "Popover must receive a `store` prop or be wrapped in a PopoverProvider component."
|
4445
4445
|
);
|
4446
|
-
const _ = n.useState("arrowElement"), A = n.useState("anchorElement"), w = n.useState("disclosureElement"), T = n.useState("popoverElement"), F = n.useState("contentElement"),
|
4446
|
+
const _ = n.useState("arrowElement"), A = n.useState("anchorElement"), w = n.useState("disclosureElement"), T = n.useState("popoverElement"), F = n.useState("contentElement"), M = n.useState("placement"), C = n.useState("mounted"), L = n.useState("rendered"), D = Y(null), [y, R] = X(!1), { portalRef: B, domReady: h } = lo(i, S.portalRef), k = U(g), K = U(m), H = !!m;
|
4447
4447
|
ee(() => {
|
4448
4448
|
if (!(T != null && T.isConnected)) return;
|
4449
4449
|
T.style.setProperty(
|
4450
4450
|
"--popover-overflow-padding",
|
4451
4451
|
`${P}px`
|
4452
4452
|
);
|
4453
|
-
const oe =
|
4453
|
+
const oe = cc(A, k), re = async () => {
|
4454
4454
|
if (!C) return;
|
4455
4455
|
_ || (D.current = D.current || document.createElement("div"));
|
4456
4456
|
const ye = _ || D.current, Ie = [
|
4457
|
-
|
4458
|
-
|
4459
|
-
|
4460
|
-
|
4461
|
-
|
4457
|
+
fc(ye, { gutter: E, shift: c }),
|
4458
|
+
dc({ flip: d, overflowPadding: P }),
|
4459
|
+
pc({ slide: l, shift: c, overlap: p, overflowPadding: P }),
|
4460
|
+
vc(ye, { arrowPadding: x }),
|
4461
|
+
mc({
|
4462
4462
|
sameWidth: b,
|
4463
4463
|
fitViewport: v,
|
4464
4464
|
overflowPadding: P
|
4465
4465
|
})
|
4466
|
-
], ue = await
|
4467
|
-
placement:
|
4466
|
+
], ue = await sc(oe, T, {
|
4467
|
+
placement: M,
|
4468
4468
|
strategy: f ? "fixed" : "absolute",
|
4469
4469
|
middleware: Ie
|
4470
4470
|
});
|
@@ -4490,7 +4490,7 @@ var ci = Z(
|
|
4490
4490
|
[ct]: "100%"
|
4491
4491
|
});
|
4492
4492
|
}
|
4493
|
-
}, ze =
|
4493
|
+
}, ze = ic(oe, T, async () => {
|
4494
4494
|
H ? (await K({ updatePosition: re }), R(!0)) : await re();
|
4495
4495
|
}, {
|
4496
4496
|
// JSDOM doesn't support ResizeObserver
|
@@ -4506,7 +4506,7 @@ var ci = Z(
|
|
4506
4506
|
_,
|
4507
4507
|
A,
|
4508
4508
|
T,
|
4509
|
-
|
4509
|
+
M,
|
4510
4510
|
C,
|
4511
4511
|
h,
|
4512
4512
|
f,
|
@@ -4519,7 +4519,7 @@ var ci = Z(
|
|
4519
4519
|
E,
|
4520
4520
|
x,
|
4521
4521
|
P,
|
4522
|
-
|
4522
|
+
k,
|
4523
4523
|
H,
|
4524
4524
|
K
|
4525
4525
|
]), ee(() => {
|
@@ -4536,7 +4536,7 @@ var ci = Z(
|
|
4536
4536
|
const ie = f ? "fixed" : "absolute";
|
4537
4537
|
return S = le(
|
4538
4538
|
S,
|
4539
|
-
(oe) => /* @__PURE__ */
|
4539
|
+
(oe) => /* @__PURE__ */ N(
|
4540
4540
|
"div",
|
4541
4541
|
$(O({}, a), {
|
4542
4542
|
style: O({
|
@@ -4553,7 +4553,7 @@ var ci = Z(
|
|
4553
4553
|
[n, ie, a]
|
4554
4554
|
), S = le(
|
4555
4555
|
S,
|
4556
|
-
(oe) => /* @__PURE__ */
|
4556
|
+
(oe) => /* @__PURE__ */ N(en, { value: n, children: oe }),
|
4557
4557
|
[n]
|
4558
4558
|
), S = $(O({
|
4559
4559
|
// data-placing is not part of the public API. We're setting this here so
|
@@ -4580,39 +4580,39 @@ var ci = Z(
|
|
4580
4580
|
ur(
|
4581
4581
|
G(function(t) {
|
4582
4582
|
const r = ci(t);
|
4583
|
-
return Q(
|
4583
|
+
return Q(uc, r);
|
4584
4584
|
}),
|
4585
4585
|
Zt
|
4586
4586
|
);
|
4587
|
-
var
|
4587
|
+
var gc = "div", hc = Z(
|
4588
4588
|
function(t) {
|
4589
4589
|
var r = t, { store: n, alwaysVisible: o } = r, i = J(r, ["store", "alwaysVisible"]);
|
4590
4590
|
const s = Jn();
|
4591
4591
|
return n = n || s, i = qo(O({ store: n, alwaysVisible: o }, i)), i = ci(O({ store: n, alwaysVisible: o }, i)), i;
|
4592
4592
|
}
|
4593
|
-
),
|
4593
|
+
), bc = ur(
|
4594
4594
|
G(function(t) {
|
4595
|
-
const r =
|
4596
|
-
return Q(
|
4595
|
+
const r = hc(t);
|
4596
|
+
return Q(gc, r);
|
4597
4597
|
}),
|
4598
4598
|
Jn
|
4599
4599
|
);
|
4600
|
-
const
|
4601
|
-
agentSelector:
|
4602
|
-
agentSelectorButton:
|
4603
|
-
agentStatus:
|
4604
|
-
agentLoader:
|
4605
|
-
agentError:
|
4606
|
-
triggerChip:
|
4607
|
-
agentLabel:
|
4608
|
-
dropdownIndicator:
|
4609
|
-
sidebar:
|
4610
|
-
agentListRetryButton:
|
4611
|
-
agentList:
|
4612
|
-
agentListItemIcon:
|
4613
|
-
agentListContainer:
|
4600
|
+
const yc = "_agentSelector_f2uiq_1", Sc = "_agentSelectorButton_f2uiq_4", wc = "_agentStatus_f2uiq_8", Ec = "_agentLoader_f2uiq_21", xc = "_agentError_f2uiq_24", Pc = "_triggerChip_f2uiq_27", Ic = "_agentLabel_f2uiq_33", Cc = "_dropdownIndicator_f2uiq_39", Oc = "_sidebar_f2uiq_54", _c = "_agentListRetryButton_f2uiq_67", Dc = "_agentList_f2uiq_67", Ac = "_agentListItemIcon_f2uiq_99", Tc = "_agentListContainer_f2uiq_104", Pe = {
|
4601
|
+
agentSelector: yc,
|
4602
|
+
agentSelectorButton: Sc,
|
4603
|
+
agentStatus: wc,
|
4604
|
+
agentLoader: Ec,
|
4605
|
+
agentError: xc,
|
4606
|
+
triggerChip: Pc,
|
4607
|
+
agentLabel: Ic,
|
4608
|
+
dropdownIndicator: Cc,
|
4609
|
+
sidebar: Oc,
|
4610
|
+
agentListRetryButton: _c,
|
4611
|
+
agentList: Dc,
|
4612
|
+
agentListItemIcon: Ac,
|
4613
|
+
agentListContainer: Tc
|
4614
4614
|
};
|
4615
|
-
function
|
4615
|
+
function Uc({
|
4616
4616
|
agents: e,
|
4617
4617
|
contentClassName: t,
|
4618
4618
|
onErrorAction: r,
|
@@ -4629,7 +4629,7 @@ function zc({
|
|
4629
4629
|
var B;
|
4630
4630
|
const {
|
4631
4631
|
formatMessage: c
|
4632
|
-
} =
|
4632
|
+
} = yi(), [l, p] = X(!1), b = o === fn.ERROR, [v, E] = X(b), [x, P] = xi(wi), g = Ei(), m = o === fn.SUCCESS, S = o === fn.IN_PROGRESS, I = c(Qe.selectAgent), _ = c(Qe.defaultAgent);
|
4633
4633
|
let A = "";
|
4634
4634
|
m ? A = (u == null ? void 0 : u.name) ?? I : b && (A = _);
|
4635
4635
|
const w = Y(null), {
|
@@ -4647,14 +4647,14 @@ function zc({
|
|
4647
4647
|
});
|
4648
4648
|
}, [l, n]), W(() => {
|
4649
4649
|
if (f && x) {
|
4650
|
-
const h = e.find((
|
4650
|
+
const h = e.find((k) => k.id === x);
|
4651
4651
|
h ? g({
|
4652
4652
|
type: dr.SET_SELECTED_AGENT,
|
4653
4653
|
id: h.id
|
4654
4654
|
}) : P(null);
|
4655
4655
|
}
|
4656
4656
|
}, [e]);
|
4657
|
-
const
|
4657
|
+
const M = xe((h) => {
|
4658
4658
|
p(!1), g({
|
4659
4659
|
type: dr.SET_SELECTED_AGENT,
|
4660
4660
|
id: h.id
|
@@ -4674,77 +4674,79 @@ function zc({
|
|
4674
4674
|
}, y = d === "sidebar" && Pe.sidebar, R = (h) => {
|
4675
4675
|
(h.key === "ArrowUp" || h.key === "ArrowDown" || h.key === "ArrowLeft" || h.key === "ArrowRight") && h.stopPropagation();
|
4676
4676
|
};
|
4677
|
-
return /* @__PURE__ */
|
4677
|
+
return /* @__PURE__ */ N(Nt.Group, {
|
4678
4678
|
className: Mt(Pe.agentSelector, a, y),
|
4679
4679
|
name: I,
|
4680
4680
|
onKeyDown: R,
|
4681
4681
|
type: "multiple",
|
4682
|
-
children: /* @__PURE__ */ Fe(
|
4682
|
+
children: /* @__PURE__ */ Fe(Ku, {
|
4683
4683
|
defaultValue: (B = e[0]) == null ? void 0 : B.id,
|
4684
4684
|
open: l,
|
4685
4685
|
setOpen: D,
|
4686
|
-
children: [/* @__PURE__ */
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4692
|
-
|
4693
|
-
|
4694
|
-
|
4695
|
-
|
4696
|
-
|
4697
|
-
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4703
|
-
|
4704
|
-
|
4705
|
-
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4714
|
-
|
4715
|
-
|
4716
|
-
|
4717
|
-
|
4718
|
-
|
4719
|
-
|
4720
|
-
|
4721
|
-
|
4722
|
-
|
4723
|
-
|
4686
|
+
children: [/* @__PURE__ */ N(pi, {
|
4687
|
+
children: /* @__PURE__ */ N(mi, {
|
4688
|
+
content: c(Qe.errorTooltip),
|
4689
|
+
onOpenChange: L,
|
4690
|
+
open: v,
|
4691
|
+
side: "bottom",
|
4692
|
+
variant: "error",
|
4693
|
+
children: /* @__PURE__ */ N(Bu, {
|
4694
|
+
className: Pe.selectAgentButton,
|
4695
|
+
disabled: i || S,
|
4696
|
+
render: /* @__PURE__ */ Fe(Nt.TriggerChip, {
|
4697
|
+
"aria-label": A,
|
4698
|
+
className: Pe.triggerChip,
|
4699
|
+
"data-target-id": "FilterChip.TriggerChip-agentSelectorTrigger",
|
4700
|
+
value: "trigger-chip",
|
4701
|
+
children: [/* @__PURE__ */ N(vi, {
|
4702
|
+
className: Pe.agentStatus,
|
4703
|
+
colorIndex: 0,
|
4704
|
+
text: c(Qe.agent)
|
4705
|
+
}), S && /* @__PURE__ */ N(gi, {
|
4706
|
+
"aria-label": c(Qe.loadingMessage),
|
4707
|
+
className: Pe.agentLoader,
|
4708
|
+
variant: "default"
|
4709
|
+
}), b && /* @__PURE__ */ N(bi, {
|
4710
|
+
className: Pe.agentError,
|
4711
|
+
height: "1rem",
|
4712
|
+
role: "presentation",
|
4713
|
+
width: "1rem"
|
4714
|
+
}), /* @__PURE__ */ N(T, {
|
4715
|
+
...F,
|
4716
|
+
children: /* @__PURE__ */ N(Nt.Label, {
|
4717
|
+
ref: w,
|
4718
|
+
className: Pe.agentLabel,
|
4719
|
+
children: A
|
4720
|
+
})
|
4721
|
+
}), !S && /* @__PURE__ */ N("div", {
|
4722
|
+
className: Pe.dropdownIndicator,
|
4723
|
+
children: /* @__PURE__ */ N(Nt.DropdownIndicator, {})
|
4724
|
+
})]
|
4725
|
+
})
|
4724
4726
|
})
|
4725
4727
|
})
|
4726
|
-
}), /* @__PURE__ */ Fe(
|
4728
|
+
}), /* @__PURE__ */ Fe(bc, {
|
4727
4729
|
"aria-label": c(Qe.agentList),
|
4728
4730
|
className: Mt(Pe.agentListContainer, y),
|
4729
4731
|
unmountOnHide: !0,
|
4730
|
-
children: [m && /* @__PURE__ */
|
4732
|
+
children: [m && /* @__PURE__ */ N(fa, {
|
4731
4733
|
className: Mt(Pe.agentList, t),
|
4732
|
-
children: e.map((h,
|
4734
|
+
children: e.map((h, k) => /* @__PURE__ */ N(ea, {
|
4733
4735
|
clickOnEnter: !0,
|
4734
4736
|
clickOnSpace: !0,
|
4735
4737
|
focusable: !0,
|
4736
4738
|
focusOnHover: !0,
|
4737
4739
|
hideOnClick: !0,
|
4738
4740
|
onClick: () => {
|
4739
|
-
|
4741
|
+
M(h);
|
4740
4742
|
},
|
4741
4743
|
setValueOnClick: !0,
|
4742
4744
|
value: h.id,
|
4743
|
-
children: /* @__PURE__ */
|
4745
|
+
children: /* @__PURE__ */ N(Si, {
|
4744
4746
|
agent: h
|
4745
4747
|
})
|
4746
4748
|
}, h.id))
|
4747
|
-
}), b && /* @__PURE__ */
|
4749
|
+
}), b && /* @__PURE__ */ N(hi, {
|
4748
4750
|
className: Mt(Pe.agentListRetryButton, y),
|
4749
4751
|
onClick: C,
|
4750
4752
|
variant: "tertiary",
|
@@ -4756,6 +4758,6 @@ function zc({
|
|
4756
4758
|
});
|
4757
4759
|
}
|
4758
4760
|
export {
|
4759
|
-
|
4760
|
-
|
4761
|
+
Uc as BoxAiAgentSelector,
|
4762
|
+
Uc as default
|
4761
4763
|
};
|