@sps-woodland/tabs 8.42.1 → 8.42.3
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/lib/index.js +2015 -1305
- package/lib/index.umd.cjs +9 -3
- package/lib/style.css +1 -1
- package/lib/tabs/Tabs.d.ts +1 -1
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { compareNodeOrder as
|
|
4
|
-
import { flushSync as
|
|
5
|
-
import { Metadata as
|
|
6
|
-
import { code as
|
|
7
|
-
class
|
|
1
|
+
import * as oe from "react";
|
|
2
|
+
import Y, { useState as te, useRef as k, useEffect as V, useReducer as Kn, useCallback as H, useMemo as ae, useContext as ye, createContext as kn } from "react";
|
|
3
|
+
import { compareNodeOrder as Ue, getFirstItem as xn, getChildNodes as _n, useCollection as Ln } from "@react-stately/collections";
|
|
4
|
+
import { flushSync as Ut } from "react-dom";
|
|
5
|
+
import { Metadata as Ke, modChildren as Nn, cl as Wt, Content as Mn, useChildTestIdAttrBuilder as Cn } from "@sps-woodland/core";
|
|
6
|
+
import { code as vt } from "@spscommerce/utils";
|
|
7
|
+
class bt {
|
|
8
8
|
*[Symbol.iterator]() {
|
|
9
9
|
yield* this.iterable;
|
|
10
10
|
}
|
|
11
11
|
get size() {
|
|
12
|
-
return this.
|
|
12
|
+
return this._size;
|
|
13
13
|
}
|
|
14
14
|
getKeys() {
|
|
15
15
|
return this.keyMap.keys();
|
|
16
16
|
}
|
|
17
17
|
getKeyBefore(e) {
|
|
18
|
-
let
|
|
19
|
-
var
|
|
20
|
-
return
|
|
18
|
+
let n = this.keyMap.get(e);
|
|
19
|
+
var r;
|
|
20
|
+
return n && (r = n.prevKey) !== null && r !== void 0 ? r : null;
|
|
21
21
|
}
|
|
22
22
|
getKeyAfter(e) {
|
|
23
|
-
let
|
|
24
|
-
var
|
|
25
|
-
return
|
|
23
|
+
let n = this.keyMap.get(e);
|
|
24
|
+
var r;
|
|
25
|
+
return n && (r = n.nextKey) !== null && r !== void 0 ? r : null;
|
|
26
26
|
}
|
|
27
27
|
getFirstKey() {
|
|
28
28
|
return this.firstKey;
|
|
@@ -31,115 +31,116 @@ class Ze {
|
|
|
31
31
|
return this.lastKey;
|
|
32
32
|
}
|
|
33
33
|
getItem(e) {
|
|
34
|
-
var
|
|
35
|
-
return (
|
|
34
|
+
var n;
|
|
35
|
+
return (n = this.keyMap.get(e)) !== null && n !== void 0 ? n : null;
|
|
36
36
|
}
|
|
37
37
|
at(e) {
|
|
38
|
-
const
|
|
38
|
+
const n = [
|
|
39
39
|
...this.getKeys()
|
|
40
40
|
];
|
|
41
|
-
return this.getItem(
|
|
41
|
+
return this.getItem(n[e]);
|
|
42
42
|
}
|
|
43
43
|
getChildren(e) {
|
|
44
|
-
let
|
|
45
|
-
return
|
|
44
|
+
let n = this.keyMap.get(e);
|
|
45
|
+
return n?.childNodes || [];
|
|
46
46
|
}
|
|
47
47
|
constructor(e) {
|
|
48
48
|
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
|
|
49
|
-
let
|
|
50
|
-
if (this.keyMap.set(
|
|
49
|
+
let n = (c) => {
|
|
50
|
+
if (this.keyMap.set(c.key, c), c.childNodes && c.type === "section") for (let u of c.childNodes) n(u);
|
|
51
51
|
};
|
|
52
|
-
for (let
|
|
53
|
-
let
|
|
54
|
-
for (let [
|
|
55
|
-
|
|
52
|
+
for (let c of e) n(c);
|
|
53
|
+
let r = null, i = 0, l = 0;
|
|
54
|
+
for (let [c, u] of this.keyMap)
|
|
55
|
+
r ? (r.nextKey = c, u.prevKey = r.key) : (this.firstKey = c, u.prevKey = void 0), u.type === "item" && (u.index = i++), (u.type === "section" || u.type === "item") && l++, r = u, r.nextKey = void 0;
|
|
56
|
+
this._size = l;
|
|
56
57
|
var s;
|
|
57
|
-
this.lastKey = (s =
|
|
58
|
+
this.lastKey = (s = r?.key) !== null && s !== void 0 ? s : null;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
class
|
|
61
|
-
constructor(e,
|
|
62
|
-
super(e), e instanceof
|
|
61
|
+
class re extends Set {
|
|
62
|
+
constructor(e, n, r) {
|
|
63
|
+
super(e), e instanceof re ? (this.anchorKey = n ?? e.anchorKey, this.currentKey = r ?? e.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
var We;
|
|
67
|
+
const Dn = typeof document < "u" ? (We = Y.useInsertionEffect) !== null && We !== void 0 ? We : Y.useLayoutEffect : () => {
|
|
68
|
+
};
|
|
69
|
+
function Ht(t, e, n) {
|
|
70
|
+
let [r, i] = te(t || e), l = k(r), s = k(t !== void 0), c = t !== void 0;
|
|
71
|
+
V(() => {
|
|
72
|
+
let b = s.current;
|
|
73
|
+
b !== c && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${b ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}.`), s.current = c;
|
|
70
74
|
}, [
|
|
71
|
-
|
|
75
|
+
c
|
|
72
76
|
]);
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})) : (o || i(h), w(h, ...v));
|
|
77
|
+
let u = c ? t : r;
|
|
78
|
+
Dn(() => {
|
|
79
|
+
l.current = u;
|
|
80
|
+
});
|
|
81
|
+
let [, p] = Kn(() => ({}), {}), d = H((b, ...$) => {
|
|
82
|
+
let m = typeof b == "function" ? b(l.current) : b;
|
|
83
|
+
Object.is(l.current, m) || (l.current = m, i(m), p(), n?.(m, ...$));
|
|
81
84
|
}, [
|
|
82
|
-
|
|
83
|
-
a,
|
|
84
|
-
r
|
|
85
|
+
n
|
|
85
86
|
]);
|
|
86
87
|
return [
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
u,
|
|
89
|
+
d
|
|
89
90
|
];
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function In(t, e) {
|
|
92
93
|
if (t.size !== e.size) return !1;
|
|
93
|
-
for (let
|
|
94
|
-
if (!e.has(
|
|
94
|
+
for (let n of t)
|
|
95
|
+
if (!e.has(n)) return !1;
|
|
95
96
|
return !0;
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
let { selectionMode: e = "none", disallowEmptySelection:
|
|
98
|
+
function Fn(t) {
|
|
99
|
+
let { selectionMode: e = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: l = "all" } = t, s = k(!1), [, c] = te(!1), u = k(null), p = k(null), [, d] = te(null), b = ae(() => ht(t.selectedKeys), [
|
|
99
100
|
t.selectedKeys
|
|
100
|
-
]), $ =
|
|
101
|
+
]), $ = ae(() => ht(t.defaultSelectedKeys, new re()), [
|
|
101
102
|
t.defaultSelectedKeys
|
|
102
|
-
]), [m,
|
|
103
|
+
]), [m, x] = Ht(b, $, t.onSelectionChange), _ = ae(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
103
104
|
t.disabledKeys
|
|
104
|
-
]), [
|
|
105
|
-
i === "replace" &&
|
|
106
|
-
let
|
|
107
|
-
return
|
|
108
|
-
i !==
|
|
105
|
+
]), [D, K] = te(i);
|
|
106
|
+
i === "replace" && D === "toggle" && typeof m == "object" && m.size === 0 && K("replace");
|
|
107
|
+
let T = k(i);
|
|
108
|
+
return V(() => {
|
|
109
|
+
i !== T.current && (K(i), T.current = i);
|
|
109
110
|
}, [
|
|
110
111
|
i
|
|
111
112
|
]), {
|
|
112
113
|
selectionMode: e,
|
|
113
|
-
disallowEmptySelection:
|
|
114
|
-
selectionBehavior:
|
|
115
|
-
setSelectionBehavior:
|
|
114
|
+
disallowEmptySelection: n,
|
|
115
|
+
selectionBehavior: D,
|
|
116
|
+
setSelectionBehavior: K,
|
|
116
117
|
get isFocused() {
|
|
117
|
-
return
|
|
118
|
+
return s.current;
|
|
118
119
|
},
|
|
119
|
-
setFocused(
|
|
120
|
-
|
|
120
|
+
setFocused(M) {
|
|
121
|
+
s.current = M, c(M);
|
|
121
122
|
},
|
|
122
123
|
get focusedKey() {
|
|
123
|
-
return
|
|
124
|
+
return u.current;
|
|
124
125
|
},
|
|
125
126
|
get childFocusStrategy() {
|
|
126
|
-
return
|
|
127
|
+
return p.current;
|
|
127
128
|
},
|
|
128
|
-
setFocusedKey(
|
|
129
|
-
|
|
129
|
+
setFocusedKey(M, I = "first") {
|
|
130
|
+
u.current = M, p.current = I, d(M);
|
|
130
131
|
},
|
|
131
132
|
selectedKeys: m,
|
|
132
|
-
setSelectedKeys(
|
|
133
|
-
(
|
|
133
|
+
setSelectedKeys(M) {
|
|
134
|
+
(r || !In(M, m)) && x(M);
|
|
134
135
|
},
|
|
135
|
-
disabledKeys:
|
|
136
|
-
disabledBehavior:
|
|
136
|
+
disabledKeys: _,
|
|
137
|
+
disabledBehavior: l
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
return t ? t === "all" ? "all" : new
|
|
140
|
+
function ht(t, e) {
|
|
141
|
+
return t ? t === "all" ? "all" : new re(t) : e;
|
|
141
142
|
}
|
|
142
|
-
class
|
|
143
|
+
class it {
|
|
143
144
|
/**
|
|
144
145
|
* The type of selection that is allowed in the collection.
|
|
145
146
|
*/
|
|
@@ -189,8 +190,8 @@ class ir {
|
|
|
189
190
|
/**
|
|
190
191
|
* Sets the focused key.
|
|
191
192
|
*/
|
|
192
|
-
setFocusedKey(e,
|
|
193
|
-
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e,
|
|
193
|
+
setFocusedKey(e, n) {
|
|
194
|
+
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, n);
|
|
194
195
|
}
|
|
195
196
|
/**
|
|
196
197
|
* The currently selected keys in the collection.
|
|
@@ -209,7 +210,9 @@ class ir {
|
|
|
209
210
|
* Returns whether a key is selected.
|
|
210
211
|
*/
|
|
211
212
|
isSelected(e) {
|
|
212
|
-
|
|
213
|
+
if (this.state.selectionMode === "none") return !1;
|
|
214
|
+
let n = this.getKey(e);
|
|
215
|
+
return n == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(n) : this.state.selectedKeys.has(n);
|
|
213
216
|
}
|
|
214
217
|
/**
|
|
215
218
|
* Whether the selection is empty.
|
|
@@ -224,24 +227,26 @@ class ir {
|
|
|
224
227
|
if (this.isEmpty) return !1;
|
|
225
228
|
if (this.state.selectedKeys === "all") return !0;
|
|
226
229
|
if (this._isSelectAll != null) return this._isSelectAll;
|
|
227
|
-
let e = this.getSelectAllKeys(),
|
|
228
|
-
return this._isSelectAll = e.every((
|
|
230
|
+
let e = this.getSelectAllKeys(), n = this.state.selectedKeys;
|
|
231
|
+
return this._isSelectAll = e.every((r) => n.has(r)), this._isSelectAll;
|
|
229
232
|
}
|
|
230
233
|
get firstSelectedKey() {
|
|
231
234
|
let e = null;
|
|
232
235
|
for (let r of this.state.selectedKeys) {
|
|
233
|
-
let
|
|
234
|
-
(!e ||
|
|
236
|
+
let i = this.collection.getItem(r);
|
|
237
|
+
(!e || i && Ue(this.collection, i, e) < 0) && (e = i);
|
|
235
238
|
}
|
|
236
|
-
|
|
239
|
+
var n;
|
|
240
|
+
return (n = e?.key) !== null && n !== void 0 ? n : null;
|
|
237
241
|
}
|
|
238
242
|
get lastSelectedKey() {
|
|
239
243
|
let e = null;
|
|
240
244
|
for (let r of this.state.selectedKeys) {
|
|
241
|
-
let
|
|
242
|
-
(!e ||
|
|
245
|
+
let i = this.collection.getItem(r);
|
|
246
|
+
(!e || i && Ue(this.collection, i, e) > 0) && (e = i);
|
|
243
247
|
}
|
|
244
|
-
|
|
248
|
+
var n;
|
|
249
|
+
return (n = e?.key) !== null && n !== void 0 ? n : null;
|
|
245
250
|
}
|
|
246
251
|
get disabledKeys() {
|
|
247
252
|
return this.state.disabledKeys;
|
|
@@ -258,42 +263,43 @@ class ir {
|
|
|
258
263
|
this.replaceSelection(e);
|
|
259
264
|
return;
|
|
260
265
|
}
|
|
261
|
-
|
|
266
|
+
let n = this.getKey(e);
|
|
267
|
+
if (n == null) return;
|
|
262
268
|
let r;
|
|
263
|
-
if (this.state.selectedKeys === "all") r = new
|
|
264
|
-
|
|
265
|
-
],
|
|
269
|
+
if (this.state.selectedKeys === "all") r = new re([
|
|
270
|
+
n
|
|
271
|
+
], n, n);
|
|
266
272
|
else {
|
|
267
273
|
let s = this.state.selectedKeys;
|
|
268
|
-
var n;
|
|
269
|
-
let o = (n = s.anchorKey) !== null && n !== void 0 ? n : e;
|
|
270
|
-
r = new N(s, o, e);
|
|
271
274
|
var i;
|
|
272
|
-
|
|
273
|
-
|
|
275
|
+
let c = (i = s.anchorKey) !== null && i !== void 0 ? i : n;
|
|
276
|
+
r = new re(s, c, n);
|
|
277
|
+
var l;
|
|
278
|
+
for (let u of this.getKeyRange(c, (l = s.currentKey) !== null && l !== void 0 ? l : n)) r.delete(u);
|
|
279
|
+
for (let u of this.getKeyRange(n, c)) this.canSelectItem(u) && r.add(u);
|
|
274
280
|
}
|
|
275
281
|
this.state.setSelectedKeys(r);
|
|
276
282
|
}
|
|
277
|
-
getKeyRange(e,
|
|
278
|
-
let
|
|
279
|
-
return
|
|
283
|
+
getKeyRange(e, n) {
|
|
284
|
+
let r = this.collection.getItem(e), i = this.collection.getItem(n);
|
|
285
|
+
return r && i ? Ue(this.collection, r, i) <= 0 ? this.getKeyRangeInternal(e, n) : this.getKeyRangeInternal(n, e) : [];
|
|
280
286
|
}
|
|
281
|
-
getKeyRangeInternal(e,
|
|
282
|
-
var
|
|
283
|
-
if (!((
|
|
284
|
-
let i = [],
|
|
285
|
-
for (;
|
|
286
|
-
let
|
|
287
|
-
if (
|
|
288
|
-
|
|
287
|
+
getKeyRangeInternal(e, n) {
|
|
288
|
+
var r;
|
|
289
|
+
if (!((r = this.layoutDelegate) === null || r === void 0) && r.getKeyRange) return this.layoutDelegate.getKeyRange(e, n);
|
|
290
|
+
let i = [], l = e;
|
|
291
|
+
for (; l != null; ) {
|
|
292
|
+
let s = this.collection.getItem(l);
|
|
293
|
+
if (s && (s.type === "item" || s.type === "cell" && this.allowsCellSelection) && i.push(l), l === n) return i;
|
|
294
|
+
l = this.collection.getKeyAfter(l);
|
|
289
295
|
}
|
|
290
296
|
return [];
|
|
291
297
|
}
|
|
292
298
|
getKey(e) {
|
|
293
|
-
let
|
|
294
|
-
if (!
|
|
295
|
-
for (;
|
|
296
|
-
return !
|
|
299
|
+
let n = this.collection.getItem(e);
|
|
300
|
+
if (!n || n.type === "cell" && this.allowsCellSelection) return e;
|
|
301
|
+
for (; n && n.type !== "item" && n.parentKey != null; ) n = this.collection.getItem(n.parentKey);
|
|
302
|
+
return !n || n.type !== "item" ? null : n.key;
|
|
297
303
|
}
|
|
298
304
|
/**
|
|
299
305
|
* Toggles whether the given key is selected.
|
|
@@ -304,18 +310,21 @@ class ir {
|
|
|
304
310
|
this.replaceSelection(e);
|
|
305
311
|
return;
|
|
306
312
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
313
|
+
let n = this.getKey(e);
|
|
314
|
+
if (n == null) return;
|
|
315
|
+
let r = new re(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
|
316
|
+
r.has(n) ? r.delete(n) : this.canSelectItem(n) && (r.add(n), r.anchorKey = n, r.currentKey = n), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
|
|
310
317
|
}
|
|
311
318
|
/**
|
|
312
319
|
* Replaces the selection with only the given key.
|
|
313
320
|
*/
|
|
314
321
|
replaceSelection(e) {
|
|
315
|
-
if (this.selectionMode === "none"
|
|
316
|
-
let
|
|
317
|
-
|
|
318
|
-
|
|
322
|
+
if (this.selectionMode === "none") return;
|
|
323
|
+
let n = this.getKey(e);
|
|
324
|
+
if (n == null) return;
|
|
325
|
+
let r = this.canSelectItem(n) ? new re([
|
|
326
|
+
n
|
|
327
|
+
], n, n) : new re();
|
|
319
328
|
this.state.setSelectedKeys(r);
|
|
320
329
|
}
|
|
321
330
|
/**
|
|
@@ -323,23 +332,28 @@ class ir {
|
|
|
323
332
|
*/
|
|
324
333
|
setSelectedKeys(e) {
|
|
325
334
|
if (this.selectionMode === "none") return;
|
|
326
|
-
let
|
|
327
|
-
for (let
|
|
328
|
-
|
|
335
|
+
let n = new re();
|
|
336
|
+
for (let r of e) {
|
|
337
|
+
let i = this.getKey(r);
|
|
338
|
+
if (i != null && (n.add(i), this.selectionMode === "single"))
|
|
329
339
|
break;
|
|
330
|
-
|
|
340
|
+
}
|
|
341
|
+
this.state.setSelectedKeys(n);
|
|
331
342
|
}
|
|
332
343
|
getSelectAllKeys() {
|
|
333
|
-
let e = [],
|
|
334
|
-
for (;
|
|
335
|
-
if (this.canSelectItem(
|
|
336
|
-
|
|
337
|
-
|
|
344
|
+
let e = [], n = (r) => {
|
|
345
|
+
for (; r != null; ) {
|
|
346
|
+
if (this.canSelectItem(r)) {
|
|
347
|
+
var i;
|
|
348
|
+
let s = this.collection.getItem(r);
|
|
349
|
+
s?.type === "item" && e.push(r);
|
|
350
|
+
var l;
|
|
351
|
+
s?.hasChildNodes && (this.allowsCellSelection || s.type !== "item") && n((l = (i = xn(_n(s, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && l !== void 0 ? l : null);
|
|
338
352
|
}
|
|
339
|
-
|
|
353
|
+
r = this.collection.getKeyAfter(r);
|
|
340
354
|
}
|
|
341
355
|
};
|
|
342
|
-
return
|
|
356
|
+
return n(this.collection.getFirstKey()), e;
|
|
343
357
|
}
|
|
344
358
|
/**
|
|
345
359
|
* Selects all items in the collection.
|
|
@@ -351,7 +365,7 @@ class ir {
|
|
|
351
365
|
* Removes all keys from the selection.
|
|
352
366
|
*/
|
|
353
367
|
clearSelection() {
|
|
354
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
|
368
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new re());
|
|
355
369
|
}
|
|
356
370
|
/**
|
|
357
371
|
* Toggles between select all and an empty selection.
|
|
@@ -359,298 +373,489 @@ class ir {
|
|
|
359
373
|
toggleSelectAll() {
|
|
360
374
|
this.isSelectAll ? this.clearSelection() : this.selectAll();
|
|
361
375
|
}
|
|
362
|
-
select(e,
|
|
363
|
-
this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" ||
|
|
376
|
+
select(e, n) {
|
|
377
|
+
this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || n && (n.pointerType === "touch" || n.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
|
|
364
378
|
}
|
|
365
379
|
/**
|
|
366
380
|
* Returns whether the current selection is equal to the given selection.
|
|
367
381
|
*/
|
|
368
382
|
isSelectionEqual(e) {
|
|
369
383
|
if (e === this.state.selectedKeys) return !0;
|
|
370
|
-
let
|
|
371
|
-
if (e.size !==
|
|
372
|
-
for (let
|
|
373
|
-
if (!
|
|
374
|
-
for (let
|
|
375
|
-
if (!e.has(
|
|
384
|
+
let n = this.selectedKeys;
|
|
385
|
+
if (e.size !== n.size) return !1;
|
|
386
|
+
for (let r of e)
|
|
387
|
+
if (!n.has(r)) return !1;
|
|
388
|
+
for (let r of n)
|
|
389
|
+
if (!e.has(r)) return !1;
|
|
376
390
|
return !0;
|
|
377
391
|
}
|
|
378
392
|
canSelectItem(e) {
|
|
379
|
-
var
|
|
393
|
+
var n;
|
|
380
394
|
if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
|
|
381
|
-
let
|
|
382
|
-
return !(!
|
|
395
|
+
let r = this.collection.getItem(e);
|
|
396
|
+
return !(!r || !(r == null || (n = r.props) === null || n === void 0) && n.isDisabled || r.type === "cell" && !this.allowsCellSelection);
|
|
383
397
|
}
|
|
384
398
|
isDisabled(e) {
|
|
385
|
-
var
|
|
386
|
-
return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((
|
|
399
|
+
var n, r;
|
|
400
|
+
return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.isDisabled));
|
|
387
401
|
}
|
|
388
402
|
isLink(e) {
|
|
389
|
-
var
|
|
390
|
-
return !!(!((
|
|
403
|
+
var n, r;
|
|
404
|
+
return !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.href);
|
|
391
405
|
}
|
|
392
406
|
getItemProps(e) {
|
|
393
|
-
var
|
|
394
|
-
return (
|
|
407
|
+
var n;
|
|
408
|
+
return (n = this.collection.getItem(e)) === null || n === void 0 ? void 0 : n.props;
|
|
409
|
+
}
|
|
410
|
+
withCollection(e) {
|
|
411
|
+
return new it(e, this.state, {
|
|
412
|
+
allowsCellSelection: this.allowsCellSelection,
|
|
413
|
+
layoutDelegate: this.layoutDelegate || void 0
|
|
414
|
+
});
|
|
395
415
|
}
|
|
396
|
-
constructor(e,
|
|
397
|
-
this.collection = e, this.state =
|
|
416
|
+
constructor(e, n, r) {
|
|
417
|
+
this.collection = e, this.state = n;
|
|
398
418
|
var i;
|
|
399
|
-
this.allowsCellSelection = (i =
|
|
419
|
+
this.allowsCellSelection = (i = r?.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = r?.layoutDelegate || null;
|
|
400
420
|
}
|
|
401
421
|
}
|
|
402
|
-
function
|
|
403
|
-
let { filter: e, layoutDelegate:
|
|
422
|
+
function An(t) {
|
|
423
|
+
let { filter: e, layoutDelegate: n } = t, r = Fn(t), i = ae(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
|
404
424
|
t.disabledKeys
|
|
405
|
-
]),
|
|
425
|
+
]), l = H((p) => e ? new bt(e(p)) : new bt(p), [
|
|
406
426
|
e
|
|
407
|
-
]),
|
|
427
|
+
]), s = ae(() => ({
|
|
408
428
|
suppressTextValueWarning: t.suppressTextValueWarning
|
|
409
429
|
}), [
|
|
410
430
|
t.suppressTextValueWarning
|
|
411
|
-
]),
|
|
412
|
-
layoutDelegate:
|
|
431
|
+
]), c = Ln(t, l, s), u = ae(() => new it(c, r, {
|
|
432
|
+
layoutDelegate: n
|
|
413
433
|
}), [
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
434
|
+
c,
|
|
435
|
+
r,
|
|
436
|
+
n
|
|
417
437
|
]);
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
return On(c, u), {
|
|
439
|
+
collection: c,
|
|
440
|
+
disabledKeys: i,
|
|
441
|
+
selectionManager: u
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function On(t, e) {
|
|
445
|
+
const n = k(null);
|
|
446
|
+
V(() => {
|
|
447
|
+
if (e.focusedKey != null && !t.getItem(e.focusedKey) && n.current) {
|
|
448
|
+
const d = n.current.getItem(e.focusedKey), b = [
|
|
449
|
+
...n.current.getKeys()
|
|
450
|
+
].map((K) => {
|
|
451
|
+
const T = n.current.getItem(K);
|
|
452
|
+
return T?.type === "item" ? T : null;
|
|
453
|
+
}).filter((K) => K !== null), $ = [
|
|
454
|
+
...t.getKeys()
|
|
455
|
+
].map((K) => {
|
|
456
|
+
const T = t.getItem(K);
|
|
457
|
+
return T?.type === "item" ? T : null;
|
|
458
|
+
}).filter((K) => K !== null);
|
|
459
|
+
var r, i;
|
|
460
|
+
const m = ((r = b?.length) !== null && r !== void 0 ? r : 0) - ((i = $?.length) !== null && i !== void 0 ? i : 0);
|
|
461
|
+
var l, s, c;
|
|
462
|
+
let x = Math.min(m > 1 ? Math.max(((l = d?.index) !== null && l !== void 0 ? l : 0) - m + 1, 0) : (s = d?.index) !== null && s !== void 0 ? s : 0, ((c = $?.length) !== null && c !== void 0 ? c : 0) - 1), _ = null, D = !1;
|
|
463
|
+
for (; x >= 0; ) {
|
|
464
|
+
if (!e.isDisabled($[x].key)) {
|
|
465
|
+
_ = $[x];
|
|
439
466
|
break;
|
|
440
467
|
}
|
|
441
|
-
if (
|
|
468
|
+
if (x < $.length - 1 && !D) x++;
|
|
442
469
|
else {
|
|
443
|
-
|
|
444
|
-
var
|
|
445
|
-
|
|
470
|
+
D = !0;
|
|
471
|
+
var u, p;
|
|
472
|
+
x > ((u = d?.index) !== null && u !== void 0 ? u : 0) && (x = (p = d?.index) !== null && p !== void 0 ? p : 0), x--;
|
|
446
473
|
}
|
|
447
474
|
}
|
|
448
|
-
|
|
475
|
+
e.setFocusedKey(_ ? _.key : null);
|
|
449
476
|
}
|
|
450
|
-
|
|
477
|
+
n.current = t;
|
|
451
478
|
}, [
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
n.focusedKey
|
|
456
|
-
]), {
|
|
457
|
-
collection: a,
|
|
458
|
-
disabledKeys: i,
|
|
459
|
-
selectionManager: p
|
|
460
|
-
};
|
|
479
|
+
t,
|
|
480
|
+
e
|
|
481
|
+
]);
|
|
461
482
|
}
|
|
462
|
-
function
|
|
483
|
+
function Rn(t) {
|
|
463
484
|
var e;
|
|
464
|
-
let [
|
|
465
|
-
|
|
485
|
+
let [n, r] = Ht(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = ae(() => n != null ? [
|
|
486
|
+
n
|
|
466
487
|
] : [], [
|
|
467
|
-
|
|
468
|
-
]), { collection:
|
|
488
|
+
n
|
|
489
|
+
]), { collection: l, disabledKeys: s, selectionManager: c } = An({
|
|
469
490
|
...t,
|
|
470
491
|
selectionMode: "single",
|
|
471
492
|
disallowEmptySelection: !0,
|
|
472
493
|
allowDuplicateSelectionEvents: !0,
|
|
473
494
|
selectedKeys: i,
|
|
474
|
-
onSelectionChange: (
|
|
475
|
-
if (
|
|
476
|
-
var
|
|
477
|
-
let
|
|
478
|
-
|
|
495
|
+
onSelectionChange: (p) => {
|
|
496
|
+
if (p === "all") return;
|
|
497
|
+
var d;
|
|
498
|
+
let b = (d = p.values().next().value) !== null && d !== void 0 ? d : null;
|
|
499
|
+
b === n && t.onSelectionChange && t.onSelectionChange(b), r(b);
|
|
479
500
|
}
|
|
480
|
-
}),
|
|
501
|
+
}), u = n != null ? l.getItem(n) : null;
|
|
481
502
|
return {
|
|
482
|
-
collection:
|
|
483
|
-
disabledKeys:
|
|
484
|
-
selectionManager:
|
|
485
|
-
selectedKey:
|
|
486
|
-
setSelectedKey:
|
|
487
|
-
selectedItem:
|
|
503
|
+
collection: l,
|
|
504
|
+
disabledKeys: s,
|
|
505
|
+
selectionManager: c,
|
|
506
|
+
selectedKey: n,
|
|
507
|
+
setSelectedKey: r,
|
|
508
|
+
selectedItem: u
|
|
488
509
|
};
|
|
489
510
|
}
|
|
490
|
-
function
|
|
491
|
-
var e;
|
|
492
|
-
let r =
|
|
511
|
+
function zn(t) {
|
|
512
|
+
var e, n;
|
|
513
|
+
let r = Rn({
|
|
493
514
|
...t,
|
|
515
|
+
onSelectionChange: t.onSelectionChange ? (u) => {
|
|
516
|
+
var p;
|
|
517
|
+
u != null && ((p = t.onSelectionChange) === null || p === void 0 || p.call(t, u));
|
|
518
|
+
} : void 0,
|
|
494
519
|
suppressTextValueWarning: !0,
|
|
495
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
|
496
|
-
}), { selectionManager:
|
|
497
|
-
return
|
|
498
|
-
let
|
|
499
|
-
(
|
|
500
|
-
|
|
501
|
-
])), (
|
|
520
|
+
defaultSelectedKey: (n = (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : yt(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())) !== null && n !== void 0 ? n : void 0
|
|
521
|
+
}), { selectionManager: i, collection: l, selectedKey: s } = r, c = k(s);
|
|
522
|
+
return V(() => {
|
|
523
|
+
let u = s;
|
|
524
|
+
t.selectedKey == null && (i.isEmpty || u == null || !l.getItem(u)) && (u = yt(l, r.disabledKeys), u != null && i.setSelectedKeys([
|
|
525
|
+
u
|
|
526
|
+
])), (u != null && i.focusedKey == null || !i.isFocused && u !== c.current) && i.setFocusedKey(u), c.current = u;
|
|
502
527
|
}), {
|
|
503
528
|
...r,
|
|
504
529
|
isDisabled: t.isDisabled || !1
|
|
505
530
|
};
|
|
506
531
|
}
|
|
507
|
-
function
|
|
508
|
-
let
|
|
532
|
+
function yt(t, e) {
|
|
533
|
+
let n = null;
|
|
509
534
|
if (t) {
|
|
510
|
-
var
|
|
511
|
-
for (
|
|
512
|
-
(e.has(
|
|
535
|
+
var r, i, l, s;
|
|
536
|
+
for (n = t.getFirstKey(); n != null && (e.has(n) || !((i = t.getItem(n)) === null || i === void 0 || (r = i.props) === null || r === void 0) && r.isDisabled) && n !== t.getLastKey(); ) n = t.getKeyAfter(n);
|
|
537
|
+
n != null && (e.has(n) || !((s = t.getItem(n)) === null || s === void 0 || (l = s.props) === null || l === void 0) && l.isDisabled) && n === t.getLastKey() && (n = t.getFirstKey());
|
|
513
538
|
}
|
|
514
|
-
return
|
|
539
|
+
return n;
|
|
515
540
|
}
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
|
|
541
|
+
const Vt = /* @__PURE__ */ new WeakMap();
|
|
542
|
+
function Ce(t, e, n) {
|
|
543
|
+
if (!t)
|
|
544
|
+
return "";
|
|
545
|
+
typeof e == "string" && (e = e.replace(/\s+/g, ""));
|
|
546
|
+
let r = Vt.get(t);
|
|
547
|
+
return process.env.NODE_ENV !== "production" && !r && console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."), `${r}-${n}-${e}`;
|
|
519
548
|
}
|
|
520
|
-
const
|
|
521
|
-
}
|
|
522
|
-
function le(t) {
|
|
523
|
-
const e = L(null);
|
|
524
|
-
return pe(() => {
|
|
525
|
-
e.current = t;
|
|
526
|
-
}, [
|
|
527
|
-
t
|
|
528
|
-
]), Z((...r) => {
|
|
529
|
-
const n = e.current;
|
|
530
|
-
return n?.(...r);
|
|
531
|
-
}, []);
|
|
532
|
-
}
|
|
533
|
-
const Ke = {
|
|
549
|
+
const le = typeof document < "u" ? Y.useLayoutEffect : () => {
|
|
550
|
+
}, De = {
|
|
534
551
|
prefix: String(Math.round(Math.random() * 1e10)),
|
|
535
552
|
current: 0
|
|
536
|
-
},
|
|
537
|
-
let
|
|
538
|
-
function
|
|
539
|
-
let e =
|
|
540
|
-
if (
|
|
541
|
-
var
|
|
542
|
-
let
|
|
543
|
-
if (
|
|
544
|
-
let
|
|
545
|
-
|
|
553
|
+
}, jt = /* @__PURE__ */ Y.createContext(De), Bn = /* @__PURE__ */ Y.createContext(!1);
|
|
554
|
+
let Un = !!(typeof window < "u" && window.document && window.document.createElement), He = /* @__PURE__ */ new WeakMap();
|
|
555
|
+
function Wn(t = !1) {
|
|
556
|
+
let e = ye(jt), n = k(null);
|
|
557
|
+
if (n.current === null && !t) {
|
|
558
|
+
var r, i;
|
|
559
|
+
let l = (i = Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || i === void 0 || (r = i.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
|
|
560
|
+
if (l) {
|
|
561
|
+
let s = He.get(l);
|
|
562
|
+
s == null ? He.set(l, {
|
|
546
563
|
id: e.current,
|
|
547
|
-
state:
|
|
548
|
-
}) :
|
|
564
|
+
state: l.memoizedState
|
|
565
|
+
}) : l.memoizedState !== s.state && (e.current = s.id, He.delete(l));
|
|
549
566
|
}
|
|
550
|
-
|
|
567
|
+
n.current = ++e.current;
|
|
551
568
|
}
|
|
552
|
-
return
|
|
569
|
+
return n.current;
|
|
553
570
|
}
|
|
554
|
-
function
|
|
555
|
-
let e =
|
|
556
|
-
e ===
|
|
557
|
-
let
|
|
558
|
-
return t || `${
|
|
571
|
+
function Hn(t) {
|
|
572
|
+
let e = ye(jt);
|
|
573
|
+
e === De && !Un && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
574
|
+
let n = Wn(!!t), r = e === De && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
|
575
|
+
return t || `${r}-${n}`;
|
|
559
576
|
}
|
|
560
|
-
function
|
|
561
|
-
let e =
|
|
562
|
-
return t || `${
|
|
577
|
+
function Vn(t) {
|
|
578
|
+
let e = Y.useId(), [n] = te(Gt()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${De.prefix}`;
|
|
579
|
+
return t || `${r}-${e}`;
|
|
563
580
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
581
|
+
const jn = typeof Y.useId == "function" ? Vn : Hn;
|
|
582
|
+
function Gn() {
|
|
566
583
|
return !1;
|
|
567
584
|
}
|
|
568
|
-
function
|
|
585
|
+
function Yn() {
|
|
569
586
|
return !0;
|
|
570
587
|
}
|
|
571
|
-
function
|
|
588
|
+
function Xn(t) {
|
|
572
589
|
return () => {
|
|
573
590
|
};
|
|
574
591
|
}
|
|
575
|
-
function
|
|
576
|
-
return typeof
|
|
577
|
-
}
|
|
578
|
-
let
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
s
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
592
|
+
function Gt() {
|
|
593
|
+
return typeof Y.useSyncExternalStore == "function" ? Y.useSyncExternalStore(Xn, Gn, Yn) : ye(Bn);
|
|
594
|
+
}
|
|
595
|
+
let qn = !!(typeof window < "u" && window.document && window.document.createElement), me = /* @__PURE__ */ new Map(), Te;
|
|
596
|
+
typeof FinalizationRegistry < "u" && (Te = new FinalizationRegistry((t) => {
|
|
597
|
+
me.delete(t);
|
|
598
|
+
}));
|
|
599
|
+
function Oe(t) {
|
|
600
|
+
let [e, n] = te(t), r = k(null), i = jn(e), l = k(null);
|
|
601
|
+
if (Te && Te.register(l, i), qn) {
|
|
602
|
+
const s = me.get(i);
|
|
603
|
+
s && !s.includes(r) ? s.push(r) : me.set(i, [
|
|
604
|
+
r
|
|
605
|
+
]);
|
|
606
|
+
}
|
|
607
|
+
return le(() => {
|
|
608
|
+
let s = i;
|
|
590
609
|
return () => {
|
|
591
|
-
|
|
610
|
+
Te && Te.unregister(l), me.delete(s);
|
|
592
611
|
};
|
|
593
612
|
}, [
|
|
594
613
|
i
|
|
595
|
-
]),
|
|
596
|
-
let
|
|
597
|
-
|
|
614
|
+
]), V(() => {
|
|
615
|
+
let s = r.current;
|
|
616
|
+
return s && n(s), () => {
|
|
617
|
+
s && (r.current = null);
|
|
618
|
+
};
|
|
598
619
|
}), i;
|
|
599
620
|
}
|
|
600
|
-
function
|
|
621
|
+
function Jn(t, e) {
|
|
601
622
|
if (t === e) return t;
|
|
602
|
-
let
|
|
603
|
-
if (
|
|
604
|
-
return
|
|
605
|
-
let
|
|
606
|
-
return
|
|
623
|
+
let n = me.get(t);
|
|
624
|
+
if (n)
|
|
625
|
+
return n.forEach((i) => i.current = e), e;
|
|
626
|
+
let r = me.get(e);
|
|
627
|
+
return r ? (r.forEach((i) => i.current = t), t) : e;
|
|
607
628
|
}
|
|
608
|
-
function
|
|
629
|
+
function ot(...t) {
|
|
609
630
|
return (...e) => {
|
|
610
|
-
for (let
|
|
631
|
+
for (let n of t) typeof n == "function" && n(...e);
|
|
611
632
|
};
|
|
612
633
|
}
|
|
613
|
-
const
|
|
634
|
+
const R = (t) => {
|
|
614
635
|
var e;
|
|
615
636
|
return (e = t?.ownerDocument) !== null && e !== void 0 ? e : document;
|
|
616
|
-
},
|
|
617
|
-
function
|
|
618
|
-
|
|
619
|
-
|
|
637
|
+
}, ie = (t) => t && "window" in t && t.window === t ? t : R(t).defaultView || window;
|
|
638
|
+
function Zn(t) {
|
|
639
|
+
return t !== null && typeof t == "object" && "nodeType" in t && typeof t.nodeType == "number";
|
|
640
|
+
}
|
|
641
|
+
function Qn(t) {
|
|
642
|
+
return Zn(t) && t.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in t;
|
|
643
|
+
}
|
|
644
|
+
let er = !1;
|
|
645
|
+
function Re() {
|
|
646
|
+
return er;
|
|
647
|
+
}
|
|
648
|
+
function P(t, e) {
|
|
649
|
+
if (!Re()) return e && t ? t.contains(e) : !1;
|
|
650
|
+
if (!t || !e) return !1;
|
|
651
|
+
let n = e;
|
|
652
|
+
for (; n !== null; ) {
|
|
653
|
+
if (n === t) return !0;
|
|
654
|
+
n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : Qn(n) ? n = n.host : n = n.parentNode;
|
|
655
|
+
}
|
|
656
|
+
return !1;
|
|
657
|
+
}
|
|
658
|
+
const se = (t = document) => {
|
|
659
|
+
var e;
|
|
660
|
+
if (!Re()) return t.activeElement;
|
|
661
|
+
let n = t.activeElement;
|
|
662
|
+
for (; n && "shadowRoot" in n && (!((e = n.shadowRoot) === null || e === void 0) && e.activeElement); ) n = n.shadowRoot.activeElement;
|
|
663
|
+
return n;
|
|
664
|
+
};
|
|
665
|
+
function E(t) {
|
|
666
|
+
if (Re() && t.target instanceof Element && t.target.shadowRoot) {
|
|
667
|
+
var e, n;
|
|
668
|
+
if ("composedPath" in t) return (e = t.composedPath()[0]) !== null && e !== void 0 ? e : null;
|
|
669
|
+
if ("composedPath" in t.nativeEvent) return (n = t.nativeEvent.composedPath()[0]) !== null && n !== void 0 ? n : null;
|
|
670
|
+
}
|
|
671
|
+
return t.target;
|
|
672
|
+
}
|
|
673
|
+
function gt(t) {
|
|
674
|
+
if (!t) return !1;
|
|
675
|
+
let e = t.getRootNode(), n = ie(t);
|
|
676
|
+
if (!(e instanceof n.Document || e instanceof n.ShadowRoot)) return !1;
|
|
677
|
+
let r = e.activeElement;
|
|
678
|
+
return r != null && t.contains(r);
|
|
679
|
+
}
|
|
680
|
+
class tr {
|
|
681
|
+
get currentNode() {
|
|
682
|
+
return this._currentNode;
|
|
683
|
+
}
|
|
684
|
+
set currentNode(e) {
|
|
685
|
+
if (!P(this.root, e)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
686
|
+
const n = [];
|
|
687
|
+
let r = e, i = e;
|
|
688
|
+
for (this._currentNode = e; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
689
|
+
const s = r, c = this._doc.createTreeWalker(s, this.whatToShow, {
|
|
690
|
+
acceptNode: this._acceptNode
|
|
691
|
+
});
|
|
692
|
+
n.push(c), c.currentNode = i, this._currentSetFor.add(c), r = i = s.host;
|
|
693
|
+
} else r = r.parentNode;
|
|
694
|
+
const l = this._doc.createTreeWalker(this.root, this.whatToShow, {
|
|
695
|
+
acceptNode: this._acceptNode
|
|
696
|
+
});
|
|
697
|
+
n.push(l), l.currentNode = i, this._currentSetFor.add(l), this._walkerStack = n;
|
|
698
|
+
}
|
|
699
|
+
get doc() {
|
|
700
|
+
return this._doc;
|
|
701
|
+
}
|
|
702
|
+
firstChild() {
|
|
703
|
+
let e = this.currentNode, n = this.nextNode();
|
|
704
|
+
return P(e, n) ? (n && (this.currentNode = n), n) : (this.currentNode = e, null);
|
|
705
|
+
}
|
|
706
|
+
lastChild() {
|
|
707
|
+
let n = this._walkerStack[0].lastChild();
|
|
708
|
+
return n && (this.currentNode = n), n;
|
|
709
|
+
}
|
|
710
|
+
nextNode() {
|
|
711
|
+
const e = this._walkerStack[0].nextNode();
|
|
712
|
+
if (e) {
|
|
713
|
+
if (e.shadowRoot) {
|
|
714
|
+
var n;
|
|
715
|
+
let i;
|
|
716
|
+
if (typeof this.filter == "function" ? i = this.filter(e) : !((n = this.filter) === null || n === void 0) && n.acceptNode && (i = this.filter.acceptNode(e)), i === NodeFilter.FILTER_ACCEPT)
|
|
717
|
+
return this.currentNode = e, e;
|
|
718
|
+
let l = this.nextNode();
|
|
719
|
+
return l && (this.currentNode = l), l;
|
|
720
|
+
}
|
|
721
|
+
return e && (this.currentNode = e), e;
|
|
722
|
+
} else if (this._walkerStack.length > 1) {
|
|
723
|
+
this._walkerStack.shift();
|
|
724
|
+
let r = this.nextNode();
|
|
725
|
+
return r && (this.currentNode = r), r;
|
|
726
|
+
} else return null;
|
|
727
|
+
}
|
|
728
|
+
previousNode() {
|
|
729
|
+
const e = this._walkerStack[0];
|
|
730
|
+
if (e.currentNode === e.root) {
|
|
731
|
+
if (this._currentSetFor.has(e))
|
|
732
|
+
if (this._currentSetFor.delete(e), this._walkerStack.length > 1) {
|
|
733
|
+
this._walkerStack.shift();
|
|
734
|
+
let i = this.previousNode();
|
|
735
|
+
return i && (this.currentNode = i), i;
|
|
736
|
+
} else return null;
|
|
737
|
+
return null;
|
|
738
|
+
}
|
|
739
|
+
const n = e.previousNode();
|
|
740
|
+
if (n) {
|
|
741
|
+
if (n.shadowRoot) {
|
|
742
|
+
var r;
|
|
743
|
+
let l;
|
|
744
|
+
if (typeof this.filter == "function" ? l = this.filter(n) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (l = this.filter.acceptNode(n)), l === NodeFilter.FILTER_ACCEPT)
|
|
745
|
+
return n && (this.currentNode = n), n;
|
|
746
|
+
let s = this.lastChild();
|
|
747
|
+
return s && (this.currentNode = s), s;
|
|
748
|
+
}
|
|
749
|
+
return n && (this.currentNode = n), n;
|
|
750
|
+
} else if (this._walkerStack.length > 1) {
|
|
751
|
+
this._walkerStack.shift();
|
|
752
|
+
let i = this.previousNode();
|
|
753
|
+
return i && (this.currentNode = i), i;
|
|
754
|
+
} else return null;
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* @deprecated
|
|
758
|
+
*/
|
|
759
|
+
nextSibling() {
|
|
760
|
+
return null;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* @deprecated
|
|
764
|
+
*/
|
|
765
|
+
previousSibling() {
|
|
766
|
+
return null;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* @deprecated
|
|
770
|
+
*/
|
|
771
|
+
parentNode() {
|
|
772
|
+
return null;
|
|
773
|
+
}
|
|
774
|
+
constructor(e, n, r, i) {
|
|
775
|
+
this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (s) => {
|
|
776
|
+
if (s.nodeType === Node.ELEMENT_NODE) {
|
|
777
|
+
const u = s.shadowRoot;
|
|
778
|
+
if (u) {
|
|
779
|
+
const p = this._doc.createTreeWalker(u, this.whatToShow, {
|
|
780
|
+
acceptNode: this._acceptNode
|
|
781
|
+
});
|
|
782
|
+
return this._walkerStack.unshift(p), NodeFilter.FILTER_ACCEPT;
|
|
783
|
+
} else {
|
|
784
|
+
var c;
|
|
785
|
+
if (typeof this.filter == "function") return this.filter(s);
|
|
786
|
+
if (!((c = this.filter) === null || c === void 0) && c.acceptNode) return this.filter.acceptNode(s);
|
|
787
|
+
if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
return NodeFilter.FILTER_SKIP;
|
|
791
|
+
}, this._doc = e, this.root = n, this.filter = i ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = n, this._walkerStack.unshift(e.createTreeWalker(n, r, this._acceptNode));
|
|
792
|
+
const l = n.shadowRoot;
|
|
793
|
+
if (l) {
|
|
794
|
+
const s = this._doc.createTreeWalker(l, this.whatToShow, {
|
|
795
|
+
acceptNode: this._acceptNode
|
|
796
|
+
});
|
|
797
|
+
this._walkerStack.unshift(s);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
function nr(t, e, n, r) {
|
|
802
|
+
return Re() ? new tr(t, e, n, r) : t.createTreeWalker(e, n, r);
|
|
803
|
+
}
|
|
804
|
+
function rr(...t) {
|
|
805
|
+
return t.length === 1 && t[0] ? t[0] : (e) => {
|
|
806
|
+
let n = !1;
|
|
807
|
+
const r = t.map((i) => {
|
|
808
|
+
const l = $t(i, e);
|
|
809
|
+
return n || (n = typeof l == "function"), l;
|
|
810
|
+
});
|
|
811
|
+
if (n) return () => {
|
|
812
|
+
r.forEach((i, l) => {
|
|
813
|
+
typeof i == "function" ? i() : $t(t[l], null);
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function $t(t, e) {
|
|
819
|
+
if (typeof t == "function") return t(e);
|
|
820
|
+
t != null && (t.current = e);
|
|
821
|
+
}
|
|
822
|
+
function Yt(t) {
|
|
823
|
+
var e, n, r = "";
|
|
824
|
+
if (typeof t == "string" || typeof t == "number") r += t;
|
|
620
825
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
621
826
|
var i = t.length;
|
|
622
|
-
for (e = 0; e < i; e++) t[e] && (
|
|
623
|
-
} else for (
|
|
624
|
-
return
|
|
827
|
+
for (e = 0; e < i; e++) t[e] && (n = Yt(t[e])) && (r && (r += " "), r += n);
|
|
828
|
+
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
829
|
+
return r;
|
|
625
830
|
}
|
|
626
|
-
function
|
|
627
|
-
for (var t, e,
|
|
628
|
-
return
|
|
831
|
+
function ir() {
|
|
832
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Yt(t)) && (r && (r += " "), r += e);
|
|
833
|
+
return r;
|
|
629
834
|
}
|
|
630
|
-
function
|
|
835
|
+
function ne(...t) {
|
|
631
836
|
let e = {
|
|
632
837
|
...t[0]
|
|
633
838
|
};
|
|
634
|
-
for (let
|
|
635
|
-
let
|
|
636
|
-
for (let i in
|
|
637
|
-
let
|
|
638
|
-
typeof
|
|
839
|
+
for (let n = 1; n < t.length; n++) {
|
|
840
|
+
let r = t[n];
|
|
841
|
+
for (let i in r) {
|
|
842
|
+
let l = e[i], s = r[i];
|
|
843
|
+
typeof l == "function" && typeof s == "function" && // This is a lot faster than a regex.
|
|
639
844
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
|
640
845
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
|
641
|
-
90 ? e[i] =
|
|
846
|
+
90 ? e[i] = ot(l, s) : (i === "className" || i === "UNSAFE_className") && typeof l == "string" && typeof s == "string" ? e[i] = ir(l, s) : i === "id" && l && s ? e.id = Jn(l, s) : i === "ref" && l && s ? e.ref = rr(l, s) : e[i] = s !== void 0 ? s : l;
|
|
642
847
|
}
|
|
643
848
|
}
|
|
644
849
|
return e;
|
|
645
850
|
}
|
|
646
|
-
const
|
|
851
|
+
const or = /* @__PURE__ */ new Set([
|
|
647
852
|
"id"
|
|
648
|
-
]),
|
|
853
|
+
]), lr = /* @__PURE__ */ new Set([
|
|
649
854
|
"aria-label",
|
|
650
855
|
"aria-labelledby",
|
|
651
856
|
"aria-describedby",
|
|
652
857
|
"aria-details"
|
|
653
|
-
]),
|
|
858
|
+
]), sr = /* @__PURE__ */ new Set([
|
|
654
859
|
"href",
|
|
655
860
|
"hrefLang",
|
|
656
861
|
"target",
|
|
@@ -658,130 +863,175 @@ const mr = /* @__PURE__ */ new Set([
|
|
|
658
863
|
"download",
|
|
659
864
|
"ping",
|
|
660
865
|
"referrerPolicy"
|
|
661
|
-
]),
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
866
|
+
]), ar = /* @__PURE__ */ new Set([
|
|
867
|
+
"dir",
|
|
868
|
+
"lang",
|
|
869
|
+
"hidden",
|
|
870
|
+
"inert",
|
|
871
|
+
"translate"
|
|
872
|
+
]), mt = /* @__PURE__ */ new Set([
|
|
873
|
+
"onClick",
|
|
874
|
+
"onAuxClick",
|
|
875
|
+
"onContextMenu",
|
|
876
|
+
"onDoubleClick",
|
|
877
|
+
"onMouseDown",
|
|
878
|
+
"onMouseEnter",
|
|
879
|
+
"onMouseLeave",
|
|
880
|
+
"onMouseMove",
|
|
881
|
+
"onMouseOut",
|
|
882
|
+
"onMouseOver",
|
|
883
|
+
"onMouseUp",
|
|
884
|
+
"onTouchCancel",
|
|
885
|
+
"onTouchEnd",
|
|
886
|
+
"onTouchMove",
|
|
887
|
+
"onTouchStart",
|
|
888
|
+
"onPointerDown",
|
|
889
|
+
"onPointerMove",
|
|
890
|
+
"onPointerUp",
|
|
891
|
+
"onPointerCancel",
|
|
892
|
+
"onPointerEnter",
|
|
893
|
+
"onPointerLeave",
|
|
894
|
+
"onPointerOver",
|
|
895
|
+
"onPointerOut",
|
|
896
|
+
"onGotPointerCapture",
|
|
897
|
+
"onLostPointerCapture",
|
|
898
|
+
"onScroll",
|
|
899
|
+
"onWheel",
|
|
900
|
+
"onAnimationStart",
|
|
901
|
+
"onAnimationEnd",
|
|
902
|
+
"onAnimationIteration",
|
|
903
|
+
"onTransitionCancel",
|
|
904
|
+
"onTransitionEnd",
|
|
905
|
+
"onTransitionRun",
|
|
906
|
+
"onTransitionStart"
|
|
907
|
+
]), cr = /^(data-.*)$/;
|
|
908
|
+
function ur(t, e = {}) {
|
|
909
|
+
let { labelable: n, isLink: r, global: i, events: l = i, propNames: s } = e, c = {};
|
|
910
|
+
for (const u in t) Object.prototype.hasOwnProperty.call(t, u) && (or.has(u) || n && lr.has(u) || r && sr.has(u) || i && ar.has(u) || l && (mt.has(u) || u.endsWith("Capture") && mt.has(u.slice(0, -7))) || s?.has(u) || cr.test(u)) && (c[u] = t[u]);
|
|
911
|
+
return c;
|
|
912
|
+
}
|
|
913
|
+
function ce(t) {
|
|
914
|
+
if (dr()) t.focus({
|
|
669
915
|
preventScroll: !0
|
|
670
916
|
});
|
|
671
917
|
else {
|
|
672
|
-
let e =
|
|
673
|
-
t.focus(),
|
|
918
|
+
let e = fr(t);
|
|
919
|
+
t.focus(), pr(e);
|
|
674
920
|
}
|
|
675
921
|
}
|
|
676
|
-
let
|
|
677
|
-
function
|
|
678
|
-
if (
|
|
679
|
-
|
|
922
|
+
let xe = null;
|
|
923
|
+
function dr() {
|
|
924
|
+
if (xe == null) {
|
|
925
|
+
xe = !1;
|
|
680
926
|
try {
|
|
681
927
|
document.createElement("div").focus({
|
|
682
928
|
get preventScroll() {
|
|
683
|
-
return
|
|
929
|
+
return xe = !0, !0;
|
|
684
930
|
}
|
|
685
931
|
});
|
|
686
932
|
} catch {
|
|
687
933
|
}
|
|
688
934
|
}
|
|
689
|
-
return
|
|
935
|
+
return xe;
|
|
690
936
|
}
|
|
691
|
-
function
|
|
692
|
-
let e = t.parentNode,
|
|
693
|
-
for (; e instanceof HTMLElement && e !==
|
|
694
|
-
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) &&
|
|
937
|
+
function fr(t) {
|
|
938
|
+
let e = t.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
939
|
+
for (; e instanceof HTMLElement && e !== r; )
|
|
940
|
+
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && n.push({
|
|
695
941
|
element: e,
|
|
696
942
|
scrollTop: e.scrollTop,
|
|
697
943
|
scrollLeft: e.scrollLeft
|
|
698
944
|
}), e = e.parentNode;
|
|
699
|
-
return
|
|
700
|
-
element:
|
|
701
|
-
scrollTop:
|
|
702
|
-
scrollLeft:
|
|
703
|
-
}),
|
|
945
|
+
return r instanceof HTMLElement && n.push({
|
|
946
|
+
element: r,
|
|
947
|
+
scrollTop: r.scrollTop,
|
|
948
|
+
scrollLeft: r.scrollLeft
|
|
949
|
+
}), n;
|
|
704
950
|
}
|
|
705
|
-
function
|
|
706
|
-
for (let { element: e, scrollTop:
|
|
707
|
-
e.scrollTop =
|
|
951
|
+
function pr(t) {
|
|
952
|
+
for (let { element: e, scrollTop: n, scrollLeft: r } of t)
|
|
953
|
+
e.scrollTop = n, e.scrollLeft = r;
|
|
708
954
|
}
|
|
709
|
-
function
|
|
955
|
+
function ze(t) {
|
|
710
956
|
var e;
|
|
711
|
-
|
|
957
|
+
if (typeof window > "u" || window.navigator == null) return !1;
|
|
958
|
+
let n = (e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands;
|
|
959
|
+
return Array.isArray(n) && n.some((r) => t.test(r.brand)) || t.test(window.navigator.userAgent);
|
|
712
960
|
}
|
|
713
|
-
function
|
|
961
|
+
function lt(t) {
|
|
714
962
|
var e;
|
|
715
963
|
return typeof window < "u" && window.navigator != null ? t.test(((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.platform) || window.navigator.platform) : !1;
|
|
716
964
|
}
|
|
717
|
-
function
|
|
965
|
+
function de(t) {
|
|
966
|
+
if (process.env.NODE_ENV === "test") return t;
|
|
718
967
|
let e = null;
|
|
719
968
|
return () => (e == null && (e = t()), e);
|
|
720
969
|
}
|
|
721
|
-
const
|
|
722
|
-
return
|
|
723
|
-
}),
|
|
724
|
-
return
|
|
725
|
-
}),
|
|
726
|
-
return
|
|
727
|
-
|
|
728
|
-
}),
|
|
729
|
-
return
|
|
730
|
-
}),
|
|
731
|
-
return
|
|
732
|
-
}),
|
|
733
|
-
return
|
|
734
|
-
}),
|
|
735
|
-
return
|
|
736
|
-
}),
|
|
737
|
-
return
|
|
738
|
-
}),
|
|
739
|
-
return
|
|
740
|
-
}),
|
|
970
|
+
const be = de(function() {
|
|
971
|
+
return lt(/^Mac/i);
|
|
972
|
+
}), vr = de(function() {
|
|
973
|
+
return lt(/^iPhone/i);
|
|
974
|
+
}), Xt = de(function() {
|
|
975
|
+
return lt(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
976
|
+
be() && navigator.maxTouchPoints > 1;
|
|
977
|
+
}), Be = de(function() {
|
|
978
|
+
return vr() || Xt();
|
|
979
|
+
}), br = de(function() {
|
|
980
|
+
return be() || Be();
|
|
981
|
+
}), hr = de(function() {
|
|
982
|
+
return ze(/AppleWebKit/i) && !qt();
|
|
983
|
+
}), qt = de(function() {
|
|
984
|
+
return ze(/Chrome/i);
|
|
985
|
+
}), Jt = de(function() {
|
|
986
|
+
return ze(/Android/i);
|
|
987
|
+
}), yr = de(function() {
|
|
988
|
+
return ze(/Firefox/i);
|
|
989
|
+
}), gr = /* @__PURE__ */ kn({
|
|
741
990
|
isNative: !0,
|
|
742
|
-
open:
|
|
991
|
+
open: mr,
|
|
743
992
|
useHref: (t) => t
|
|
744
993
|
});
|
|
745
|
-
function
|
|
746
|
-
return
|
|
747
|
-
}
|
|
748
|
-
function
|
|
749
|
-
var
|
|
750
|
-
let { metaKey:
|
|
751
|
-
|
|
752
|
-
let
|
|
994
|
+
function st() {
|
|
995
|
+
return ye(gr);
|
|
996
|
+
}
|
|
997
|
+
function ue(t, e, n = !0) {
|
|
998
|
+
var r, i;
|
|
999
|
+
let { metaKey: l, ctrlKey: s, altKey: c, shiftKey: u } = e;
|
|
1000
|
+
yr() && (!((i = window.event) === null || i === void 0 || (r = i.type) === null || r === void 0) && r.startsWith("key")) && t.target === "_blank" && (be() ? l = !0 : s = !0);
|
|
1001
|
+
let p = hr() && be() && !Xt() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
753
1002
|
keyIdentifier: "Enter",
|
|
754
|
-
metaKey:
|
|
755
|
-
ctrlKey:
|
|
756
|
-
altKey:
|
|
757
|
-
shiftKey:
|
|
1003
|
+
metaKey: l,
|
|
1004
|
+
ctrlKey: s,
|
|
1005
|
+
altKey: c,
|
|
1006
|
+
shiftKey: u
|
|
758
1007
|
}) : new MouseEvent("click", {
|
|
759
|
-
metaKey:
|
|
760
|
-
ctrlKey:
|
|
761
|
-
altKey:
|
|
762
|
-
shiftKey:
|
|
1008
|
+
metaKey: l,
|
|
1009
|
+
ctrlKey: s,
|
|
1010
|
+
altKey: c,
|
|
1011
|
+
shiftKey: u,
|
|
1012
|
+
detail: 1,
|
|
763
1013
|
bubbles: !0,
|
|
764
1014
|
cancelable: !0
|
|
765
1015
|
});
|
|
766
|
-
|
|
1016
|
+
ue.isOpening = n, ce(t), t.dispatchEvent(p), ue.isOpening = !1;
|
|
767
1017
|
}
|
|
768
|
-
|
|
769
|
-
function
|
|
1018
|
+
ue.isOpening = !1;
|
|
1019
|
+
function $r(t, e) {
|
|
770
1020
|
if (t instanceof HTMLAnchorElement) e(t);
|
|
771
1021
|
else if (t.hasAttribute("data-href")) {
|
|
772
|
-
let
|
|
773
|
-
|
|
1022
|
+
let n = document.createElement("a");
|
|
1023
|
+
n.href = t.getAttribute("data-href"), t.hasAttribute("data-target") && (n.target = t.getAttribute("data-target")), t.hasAttribute("data-rel") && (n.rel = t.getAttribute("data-rel")), t.hasAttribute("data-download") && (n.download = t.getAttribute("data-download")), t.hasAttribute("data-ping") && (n.ping = t.getAttribute("data-ping")), t.hasAttribute("data-referrer-policy") && (n.referrerPolicy = t.getAttribute("data-referrer-policy")), t.appendChild(n), e(n), t.removeChild(n);
|
|
774
1024
|
}
|
|
775
1025
|
}
|
|
776
|
-
function
|
|
777
|
-
|
|
1026
|
+
function mr(t, e) {
|
|
1027
|
+
$r(t, (n) => ue(n, e));
|
|
778
1028
|
}
|
|
779
|
-
function
|
|
780
|
-
let e =
|
|
781
|
-
var
|
|
782
|
-
const
|
|
1029
|
+
function wr(t) {
|
|
1030
|
+
let e = st();
|
|
1031
|
+
var n;
|
|
1032
|
+
const r = e.useHref((n = t?.href) !== null && n !== void 0 ? n : "");
|
|
783
1033
|
return {
|
|
784
|
-
href: t?.href ?
|
|
1034
|
+
href: t?.href ? r : void 0,
|
|
785
1035
|
target: t?.target,
|
|
786
1036
|
rel: t?.rel,
|
|
787
1037
|
download: t?.download,
|
|
@@ -789,115 +1039,147 @@ function Fr(t) {
|
|
|
789
1039
|
referrerPolicy: t?.referrerPolicy
|
|
790
1040
|
};
|
|
791
1041
|
}
|
|
792
|
-
let
|
|
793
|
-
function
|
|
1042
|
+
let pe = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Set();
|
|
1043
|
+
function wt() {
|
|
794
1044
|
if (typeof window > "u") return;
|
|
795
|
-
function t(
|
|
796
|
-
return "propertyName" in
|
|
797
|
-
}
|
|
798
|
-
let e = (
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
1045
|
+
function t(r) {
|
|
1046
|
+
return "propertyName" in r;
|
|
1047
|
+
}
|
|
1048
|
+
let e = (r) => {
|
|
1049
|
+
let i = E(r);
|
|
1050
|
+
if (!t(r) || !i) return;
|
|
1051
|
+
let l = pe.get(i);
|
|
1052
|
+
l || (l = /* @__PURE__ */ new Set(), pe.set(i, l), i.addEventListener("transitioncancel", n, {
|
|
802
1053
|
once: !0
|
|
803
|
-
})),
|
|
804
|
-
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
1054
|
+
})), l.add(r.propertyName);
|
|
1055
|
+
}, n = (r) => {
|
|
1056
|
+
let i = E(r);
|
|
1057
|
+
if (!t(r) || !i) return;
|
|
1058
|
+
let l = pe.get(i);
|
|
1059
|
+
if (l && (l.delete(r.propertyName), l.size === 0 && (i.removeEventListener("transitioncancel", n), pe.delete(i)), pe.size === 0)) {
|
|
1060
|
+
for (let s of qe) s();
|
|
1061
|
+
qe.clear();
|
|
810
1062
|
}
|
|
811
1063
|
};
|
|
812
|
-
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend",
|
|
1064
|
+
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", n);
|
|
1065
|
+
}
|
|
1066
|
+
typeof document < "u" && (document.readyState !== "loading" ? wt() : document.addEventListener("DOMContentLoaded", wt));
|
|
1067
|
+
function Tr() {
|
|
1068
|
+
for (const [t] of pe)
|
|
1069
|
+
"isConnected" in t && !t.isConnected && pe.delete(t);
|
|
813
1070
|
}
|
|
814
|
-
|
|
815
|
-
function kt(t) {
|
|
1071
|
+
function Zt(t) {
|
|
816
1072
|
requestAnimationFrame(() => {
|
|
817
|
-
|
|
1073
|
+
Tr(), pe.size === 0 ? t() : qe.add(t);
|
|
818
1074
|
});
|
|
819
1075
|
}
|
|
820
|
-
function
|
|
821
|
-
let t =
|
|
822
|
-
let
|
|
823
|
-
t.current.delete(
|
|
824
|
-
} :
|
|
825
|
-
t.current.set(
|
|
826
|
-
type:
|
|
1076
|
+
function Qt() {
|
|
1077
|
+
let t = k(/* @__PURE__ */ new Map()), e = H((i, l, s, c) => {
|
|
1078
|
+
let u = c?.once ? (...p) => {
|
|
1079
|
+
t.current.delete(s), s(...p);
|
|
1080
|
+
} : s;
|
|
1081
|
+
t.current.set(s, {
|
|
1082
|
+
type: l,
|
|
827
1083
|
eventTarget: i,
|
|
828
|
-
fn:
|
|
829
|
-
options:
|
|
830
|
-
}), i.addEventListener(
|
|
831
|
-
}, []),
|
|
832
|
-
var
|
|
833
|
-
let
|
|
834
|
-
i.removeEventListener(
|
|
835
|
-
}, []),
|
|
836
|
-
t.current.forEach((i,
|
|
837
|
-
|
|
1084
|
+
fn: u,
|
|
1085
|
+
options: c
|
|
1086
|
+
}), i.addEventListener(l, u, c);
|
|
1087
|
+
}, []), n = H((i, l, s, c) => {
|
|
1088
|
+
var u;
|
|
1089
|
+
let p = ((u = t.current.get(s)) === null || u === void 0 ? void 0 : u.fn) || s;
|
|
1090
|
+
i.removeEventListener(l, p, c), t.current.delete(s);
|
|
1091
|
+
}, []), r = H(() => {
|
|
1092
|
+
t.current.forEach((i, l) => {
|
|
1093
|
+
n(i.eventTarget, i.type, l, i.options);
|
|
838
1094
|
});
|
|
839
1095
|
}, [
|
|
840
|
-
r
|
|
841
|
-
]);
|
|
842
|
-
return O(() => n, [
|
|
843
1096
|
n
|
|
1097
|
+
]);
|
|
1098
|
+
return V(() => r, [
|
|
1099
|
+
r
|
|
844
1100
|
]), {
|
|
845
1101
|
addGlobalListener: e,
|
|
846
|
-
removeGlobalListener:
|
|
847
|
-
removeAllGlobalListeners:
|
|
1102
|
+
removeGlobalListener: n,
|
|
1103
|
+
removeAllGlobalListeners: r
|
|
848
1104
|
};
|
|
849
1105
|
}
|
|
850
|
-
function
|
|
851
|
-
let { id:
|
|
852
|
-
return
|
|
1106
|
+
function en(t, e) {
|
|
1107
|
+
let { id: n, "aria-label": r, "aria-labelledby": i } = t;
|
|
1108
|
+
return n = Oe(n), i && r ? i = [
|
|
853
1109
|
.../* @__PURE__ */ new Set([
|
|
854
|
-
|
|
1110
|
+
n,
|
|
855
1111
|
...i.trim().split(/\s+/)
|
|
856
1112
|
])
|
|
857
|
-
].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !
|
|
858
|
-
id:
|
|
859
|
-
"aria-label":
|
|
1113
|
+
].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !r && !i && e && (r = e), {
|
|
1114
|
+
id: n,
|
|
1115
|
+
"aria-label": r,
|
|
860
1116
|
"aria-labelledby": i
|
|
861
1117
|
};
|
|
862
1118
|
}
|
|
863
|
-
|
|
864
|
-
|
|
1119
|
+
var Ve;
|
|
1120
|
+
const Sr = (Ve = Y.useInsertionEffect) !== null && Ve !== void 0 ? Ve : le;
|
|
1121
|
+
function Se(t) {
|
|
1122
|
+
const e = k(null);
|
|
1123
|
+
return Sr(() => {
|
|
1124
|
+
e.current = t;
|
|
1125
|
+
}, [
|
|
1126
|
+
t
|
|
1127
|
+
]), H((...n) => {
|
|
1128
|
+
const r = e.current;
|
|
1129
|
+
return r?.(...n);
|
|
1130
|
+
}, []);
|
|
1131
|
+
}
|
|
1132
|
+
function Tt(t, e) {
|
|
1133
|
+
const n = k(!0), r = k(null);
|
|
1134
|
+
le(() => (n.current = !0, () => {
|
|
1135
|
+
n.current = !1;
|
|
1136
|
+
}), []), le(() => {
|
|
1137
|
+
n.current ? n.current = !1 : (!r.current || e.some((i, l) => !Object.is(i, r[l]))) && t(), r.current = e;
|
|
1138
|
+
}, e);
|
|
1139
|
+
}
|
|
1140
|
+
function tn(t, e) {
|
|
1141
|
+
le(() => {
|
|
865
1142
|
if (t && t.ref && e)
|
|
866
1143
|
return t.ref.current = e.current, () => {
|
|
867
1144
|
t.ref && (t.ref.current = null);
|
|
868
1145
|
};
|
|
869
1146
|
});
|
|
870
1147
|
}
|
|
871
|
-
function
|
|
872
|
-
|
|
873
|
-
|
|
1148
|
+
function Er(t, e) {
|
|
1149
|
+
if (!t) return !1;
|
|
1150
|
+
let n = window.getComputedStyle(t), r = document.scrollingElement || document.documentElement, i = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
|
|
1151
|
+
return t === r && n.overflow !== "hidden" && (i = !0), i && e && (i = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), i;
|
|
874
1152
|
}
|
|
875
|
-
function
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
1153
|
+
function St(t, e) {
|
|
1154
|
+
let n = [], r = document.scrollingElement || document.documentElement;
|
|
1155
|
+
do
|
|
1156
|
+
Er(t, e) && n.push(t), t = t.parentElement;
|
|
1157
|
+
while (t && t !== r);
|
|
1158
|
+
return n;
|
|
1159
|
+
}
|
|
1160
|
+
function ge(t) {
|
|
1161
|
+
return be() ? t.metaKey : t.ctrlKey;
|
|
880
1162
|
}
|
|
881
|
-
let
|
|
882
|
-
const
|
|
883
|
-
function
|
|
884
|
-
let [e,
|
|
885
|
-
return
|
|
1163
|
+
let Pr = 0;
|
|
1164
|
+
const je = /* @__PURE__ */ new Map();
|
|
1165
|
+
function Kr(t) {
|
|
1166
|
+
let [e, n] = te();
|
|
1167
|
+
return le(() => {
|
|
886
1168
|
if (!t) return;
|
|
887
|
-
let
|
|
888
|
-
if (
|
|
889
|
-
r
|
|
1169
|
+
let r = je.get(t);
|
|
1170
|
+
if (r)
|
|
1171
|
+
n(r.element.id);
|
|
890
1172
|
else {
|
|
891
|
-
let i = `react-aria-description-${
|
|
892
|
-
|
|
893
|
-
let
|
|
894
|
-
|
|
1173
|
+
let i = `react-aria-description-${Pr++}`;
|
|
1174
|
+
n(i);
|
|
1175
|
+
let l = document.createElement("div");
|
|
1176
|
+
l.id = i, l.style.display = "none", l.textContent = t, document.body.appendChild(l), r = {
|
|
895
1177
|
refCount: 0,
|
|
896
|
-
element:
|
|
897
|
-
},
|
|
1178
|
+
element: l
|
|
1179
|
+
}, je.set(t, r);
|
|
898
1180
|
}
|
|
899
|
-
return
|
|
900
|
-
|
|
1181
|
+
return r.refCount++, () => {
|
|
1182
|
+
r && --r.refCount === 0 && (r.element.remove(), je.delete(t));
|
|
901
1183
|
};
|
|
902
1184
|
}, [
|
|
903
1185
|
t
|
|
@@ -905,481 +1187,693 @@ function Br(t) {
|
|
|
905
1187
|
"aria-describedby": t ? e : void 0
|
|
906
1188
|
};
|
|
907
1189
|
}
|
|
908
|
-
function
|
|
909
|
-
let i =
|
|
910
|
-
|
|
911
|
-
if (
|
|
912
|
-
let
|
|
913
|
-
return
|
|
914
|
-
|
|
1190
|
+
function _e(t, e, n, r) {
|
|
1191
|
+
let i = Se(n), l = n == null;
|
|
1192
|
+
V(() => {
|
|
1193
|
+
if (l || !t.current) return;
|
|
1194
|
+
let s = t.current;
|
|
1195
|
+
return s.addEventListener(e, i, r), () => {
|
|
1196
|
+
s.removeEventListener(e, i, r);
|
|
915
1197
|
};
|
|
916
1198
|
}, [
|
|
917
1199
|
t,
|
|
918
1200
|
e,
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
i
|
|
1201
|
+
r,
|
|
1202
|
+
l
|
|
922
1203
|
]);
|
|
923
1204
|
}
|
|
924
|
-
function
|
|
925
|
-
let r =
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1205
|
+
function Je(t, e, n = {}) {
|
|
1206
|
+
let { block: r = "nearest", inline: i = "nearest" } = n;
|
|
1207
|
+
if (t === e) return;
|
|
1208
|
+
let l = t.scrollTop, s = t.scrollLeft, c = e.getBoundingClientRect(), u = t.getBoundingClientRect(), p = window.getComputedStyle(e), d = window.getComputedStyle(t), b = document.scrollingElement || document.documentElement, $ = t === b ? 0 : u.top, m = t === b ? t.clientHeight : u.bottom, x = t === b ? 0 : u.left, _ = t === b ? t.clientWidth : u.right, D = parseInt(p.scrollMarginTop, 10) || 0, K = parseInt(p.scrollMarginBottom, 10) || 0, T = parseInt(p.scrollMarginLeft, 10) || 0, M = parseInt(p.scrollMarginRight, 10) || 0, I = parseInt(d.scrollPaddingTop, 10) || 0, F = parseInt(d.scrollPaddingBottom, 10) || 0, J = parseInt(d.scrollPaddingLeft, 10) || 0, B = parseInt(d.scrollPaddingRight, 10) || 0, X = parseInt(d.borderTopWidth, 10) || 0, O = parseInt(d.borderBottomWidth, 10) || 0, j = parseInt(d.borderLeftWidth, 10) || 0, G = parseInt(d.borderRightWidth, 10) || 0, W = c.top - D, A = c.bottom + K, v = c.left - T, w = c.right + M, N = t === b ? 0 : j + G, L = t === b ? 0 : X + O, C = t.offsetWidth - t.clientWidth - N, z = t.offsetHeight - t.clientHeight - L, o = $ + X + I, f = m - O - F - z, a = x + j + J, h = _ - G - B;
|
|
1209
|
+
d.direction === "rtl" && !Be() ? a += C : h -= C;
|
|
1210
|
+
let g = W < o || A > f, S = v < a || w > h;
|
|
1211
|
+
if (g && r === "start") l += W - o;
|
|
1212
|
+
else if (g && r === "center") l += (W + A) / 2 - (o + f) / 2;
|
|
1213
|
+
else if (g && r === "end") l += A - f;
|
|
1214
|
+
else if (g && r === "nearest") {
|
|
1215
|
+
let U = W - o, q = A - f;
|
|
1216
|
+
l += Math.abs(U) <= Math.abs(q) ? U : q;
|
|
1217
|
+
}
|
|
1218
|
+
if (S && i === "start") s += v - a;
|
|
1219
|
+
else if (S && i === "center") s += (v + w) / 2 - (a + h) / 2;
|
|
1220
|
+
else if (S && i === "end") s += w - h;
|
|
1221
|
+
else if (S && i === "nearest") {
|
|
1222
|
+
let U = v - a, q = w - h;
|
|
1223
|
+
s += Math.abs(U) <= Math.abs(q) ? U : q;
|
|
1224
|
+
}
|
|
1225
|
+
if (process.env.NODE_ENV === "test") {
|
|
1226
|
+
t.scrollLeft = s, t.scrollTop = l;
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
t.scrollTo({
|
|
1230
|
+
left: s,
|
|
1231
|
+
top: l
|
|
1232
|
+
});
|
|
939
1233
|
}
|
|
940
|
-
function
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
for (let h of p) Lt(h, t);
|
|
946
|
-
} else {
|
|
1234
|
+
function Et(t, e = {}) {
|
|
1235
|
+
let { containingElement: n } = e;
|
|
1236
|
+
if (t && t.isConnected) {
|
|
1237
|
+
let s = document.scrollingElement || document.documentElement;
|
|
1238
|
+
if (!(window.getComputedStyle(s).overflow === "hidden") && !qt()) {
|
|
947
1239
|
var r;
|
|
948
|
-
let { left:
|
|
1240
|
+
let { left: u, top: p } = t.getBoundingClientRect();
|
|
949
1241
|
t == null || (r = t.scrollIntoView) === null || r === void 0 || r.call(t, {
|
|
950
1242
|
block: "nearest"
|
|
951
1243
|
});
|
|
952
|
-
let { left:
|
|
953
|
-
if (Math.abs(
|
|
954
|
-
var
|
|
955
|
-
|
|
1244
|
+
let { left: d, top: b } = t.getBoundingClientRect();
|
|
1245
|
+
if (Math.abs(u - d) > 1 || Math.abs(p - b) > 1) {
|
|
1246
|
+
var i, l;
|
|
1247
|
+
n == null || (i = n.scrollIntoView) === null || i === void 0 || i.call(n, {
|
|
956
1248
|
block: "center",
|
|
957
1249
|
inline: "center"
|
|
958
|
-
}), (
|
|
1250
|
+
}), (l = t.scrollIntoView) === null || l === void 0 || l.call(t, {
|
|
959
1251
|
block: "nearest"
|
|
960
1252
|
});
|
|
961
1253
|
}
|
|
1254
|
+
} else {
|
|
1255
|
+
let { left: u, top: p } = t.getBoundingClientRect(), d = St(t, !0);
|
|
1256
|
+
for (let m of d) Je(m, t);
|
|
1257
|
+
let { left: b, top: $ } = t.getBoundingClientRect();
|
|
1258
|
+
if (Math.abs(u - b) > 1 || Math.abs(p - $) > 1) {
|
|
1259
|
+
d = n ? St(n, !0) : [];
|
|
1260
|
+
for (let m of d) Je(m, n, {
|
|
1261
|
+
block: "center",
|
|
1262
|
+
inline: "center"
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
962
1265
|
}
|
|
963
1266
|
}
|
|
964
1267
|
}
|
|
965
|
-
function
|
|
966
|
-
return t.
|
|
1268
|
+
function Ze(t) {
|
|
1269
|
+
return t.pointerType === "" && t.isTrusted ? !0 : Jt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
|
967
1270
|
}
|
|
968
|
-
function
|
|
969
|
-
return !
|
|
1271
|
+
function kr(t) {
|
|
1272
|
+
return !Jt() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
|
970
1273
|
}
|
|
971
|
-
|
|
972
|
-
|
|
1274
|
+
const xr = "react-aria-clear-focus", _r = "react-aria-focus", Lr = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
1275
|
+
function Nr(t) {
|
|
1276
|
+
const e = ie(t);
|
|
1277
|
+
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
|
|
1278
|
+
let { display: n, visibility: r } = t.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
|
|
1279
|
+
if (i) {
|
|
1280
|
+
const { getComputedStyle: l } = t.ownerDocument.defaultView;
|
|
1281
|
+
let { display: s, visibility: c } = l(t);
|
|
1282
|
+
i = s !== "none" && c !== "hidden" && c !== "collapse";
|
|
1283
|
+
}
|
|
1284
|
+
return i;
|
|
973
1285
|
}
|
|
974
|
-
function
|
|
975
|
-
return
|
|
1286
|
+
function Mr(t, e) {
|
|
1287
|
+
return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
1288
|
+
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
|
976
1289
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
timeout: null
|
|
982
|
-
}).current, s = (o) => {
|
|
983
|
-
let a = jr(o.key);
|
|
984
|
-
if (!a || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target)) return;
|
|
985
|
-
a === " " && i.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), i.search += a;
|
|
986
|
-
let p = e.getKeyForSearch(i.search, r.focusedKey);
|
|
987
|
-
p == null && (p = e.getKeyForSearch(i.search)), p != null && (r.setFocusedKey(p), n && n(p)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
|
988
|
-
i.search = "";
|
|
989
|
-
}, Hr);
|
|
990
|
-
};
|
|
991
|
-
return {
|
|
992
|
-
typeSelectProps: {
|
|
993
|
-
// Using a capturing listener to catch the keydown event before
|
|
994
|
-
// other hooks in order to handle the Spacebar event.
|
|
995
|
-
onKeyDownCapture: e.getKeyForSearch ? s : null
|
|
996
|
-
}
|
|
997
|
-
};
|
|
1290
|
+
function at(t, e) {
|
|
1291
|
+
return Lr ? t.checkVisibility({
|
|
1292
|
+
visibilityProperty: !0
|
|
1293
|
+
}) && !t.closest("[data-react-aria-prevent-focus]") : t.nodeName !== "#comment" && Nr(t) && Mr(t, e) && (!t.parentElement || at(t.parentElement, t));
|
|
998
1294
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1295
|
+
const ct = [
|
|
1296
|
+
"input:not([disabled]):not([type=hidden])",
|
|
1297
|
+
"select:not([disabled])",
|
|
1298
|
+
"textarea:not([disabled])",
|
|
1299
|
+
"button:not([disabled])",
|
|
1300
|
+
"a[href]",
|
|
1301
|
+
"area[href]",
|
|
1302
|
+
"summary",
|
|
1303
|
+
"iframe",
|
|
1304
|
+
"object",
|
|
1305
|
+
"embed",
|
|
1306
|
+
"audio[controls]",
|
|
1307
|
+
"video[controls]",
|
|
1308
|
+
'[contenteditable]:not([contenteditable^="false"])',
|
|
1309
|
+
"permission"
|
|
1310
|
+
], Cr = ct.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
1311
|
+
ct.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
1312
|
+
const Dr = ct.join(':not([hidden]):not([tabindex="-1"]),');
|
|
1313
|
+
function nn(t) {
|
|
1314
|
+
return t.matches(Cr) && at(t) && !on(t);
|
|
1001
1315
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1316
|
+
function rn(t) {
|
|
1317
|
+
return t.matches(Dr) && at(t) && !on(t);
|
|
1318
|
+
}
|
|
1319
|
+
function on(t) {
|
|
1320
|
+
let e = t;
|
|
1321
|
+
for (; e != null; ) {
|
|
1322
|
+
if (e instanceof e.ownerDocument.defaultView.HTMLElement && e.inert) return !0;
|
|
1323
|
+
e = e.parentElement;
|
|
1324
|
+
}
|
|
1325
|
+
return !1;
|
|
1326
|
+
}
|
|
1327
|
+
function ln(t) {
|
|
1328
|
+
let e = t;
|
|
1329
|
+
return e.nativeEvent = t, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
|
|
1330
|
+
}, e;
|
|
1331
|
+
}
|
|
1332
|
+
function Ir(t, e) {
|
|
1333
|
+
Object.defineProperty(t, "target", {
|
|
1334
|
+
value: e
|
|
1335
|
+
}), Object.defineProperty(t, "currentTarget", {
|
|
1336
|
+
value: e
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
function Fr(t) {
|
|
1340
|
+
let e = k({
|
|
1341
|
+
isFocused: !1,
|
|
1342
|
+
observer: null
|
|
1343
|
+
});
|
|
1344
|
+
return le(() => {
|
|
1345
|
+
const n = e.current;
|
|
1346
|
+
return () => {
|
|
1347
|
+
n.observer && (n.observer.disconnect(), n.observer = null);
|
|
1348
|
+
};
|
|
1349
|
+
}, []), H((n) => {
|
|
1350
|
+
let r = E(n);
|
|
1351
|
+
if (r instanceof HTMLButtonElement || r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) {
|
|
1352
|
+
e.current.isFocused = !0;
|
|
1353
|
+
let i = r, l = (s) => {
|
|
1354
|
+
if (e.current.isFocused = !1, i.disabled) {
|
|
1355
|
+
let c = ln(s);
|
|
1356
|
+
t?.(c);
|
|
1357
|
+
}
|
|
1358
|
+
e.current.observer && (e.current.observer.disconnect(), e.current.observer = null);
|
|
1359
|
+
};
|
|
1360
|
+
i.addEventListener("focusout", l, {
|
|
1361
|
+
once: !0
|
|
1362
|
+
}), e.current.observer = new MutationObserver(() => {
|
|
1363
|
+
if (e.current.isFocused && i.disabled) {
|
|
1364
|
+
var s;
|
|
1365
|
+
(s = e.current.observer) === null || s === void 0 || s.disconnect();
|
|
1366
|
+
let c = i === se() ? null : se();
|
|
1367
|
+
i.dispatchEvent(new FocusEvent("blur", {
|
|
1368
|
+
relatedTarget: c
|
|
1369
|
+
})), i.dispatchEvent(new FocusEvent("focusout", {
|
|
1370
|
+
bubbles: !0,
|
|
1371
|
+
relatedTarget: c
|
|
1372
|
+
}));
|
|
1373
|
+
}
|
|
1374
|
+
}), e.current.observer.observe(i, {
|
|
1375
|
+
attributes: !0,
|
|
1376
|
+
attributeFilter: [
|
|
1377
|
+
"disabled"
|
|
1378
|
+
]
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
}, [
|
|
1382
|
+
t
|
|
1383
|
+
]);
|
|
1384
|
+
}
|
|
1385
|
+
let Ie = !1;
|
|
1386
|
+
function Pt(t) {
|
|
1387
|
+
for (; t && !nn(t); ) t = t.parentElement;
|
|
1388
|
+
let e = ie(t), n = e.document.activeElement;
|
|
1389
|
+
if (!n || n === t) return;
|
|
1390
|
+
Ie = !0;
|
|
1391
|
+
let r = !1, i = (d) => {
|
|
1392
|
+
(E(d) === n || r) && d.stopImmediatePropagation();
|
|
1393
|
+
}, l = (d) => {
|
|
1394
|
+
(E(d) === n || r) && (d.stopImmediatePropagation(), !t && !r && (r = !0, ce(n), u()));
|
|
1395
|
+
}, s = (d) => {
|
|
1396
|
+
(E(d) === t || r) && d.stopImmediatePropagation();
|
|
1397
|
+
}, c = (d) => {
|
|
1398
|
+
(E(d) === t || r) && (d.stopImmediatePropagation(), r || (r = !0, ce(n), u()));
|
|
1399
|
+
};
|
|
1400
|
+
e.addEventListener("blur", i, !0), e.addEventListener("focusout", l, !0), e.addEventListener("focusin", c, !0), e.addEventListener("focus", s, !0);
|
|
1401
|
+
let u = () => {
|
|
1402
|
+
cancelAnimationFrame(p), e.removeEventListener("blur", i, !0), e.removeEventListener("focusout", l, !0), e.removeEventListener("focusin", c, !0), e.removeEventListener("focus", s, !0), Ie = !1, r = !1;
|
|
1403
|
+
}, p = requestAnimationFrame(u);
|
|
1404
|
+
return u;
|
|
1405
|
+
}
|
|
1406
|
+
let $e = "default", Qe = "", Me = /* @__PURE__ */ new WeakMap();
|
|
1407
|
+
function Kt(t) {
|
|
1408
|
+
if (Be()) {
|
|
1409
|
+
if ($e === "default") {
|
|
1410
|
+
const e = R(t);
|
|
1411
|
+
Qe = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
|
1008
1412
|
}
|
|
1009
|
-
|
|
1010
|
-
} else (t instanceof HTMLElement || t instanceof SVGElement)
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1413
|
+
$e = "disabled";
|
|
1414
|
+
} else if (t instanceof HTMLElement || t instanceof SVGElement) {
|
|
1415
|
+
let e = "userSelect" in t.style ? "userSelect" : "webkitUserSelect";
|
|
1416
|
+
Me.set(t, t.style[e]), t.style[e] = "none";
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
function Ge(t) {
|
|
1420
|
+
if (Be()) {
|
|
1421
|
+
if ($e !== "disabled") return;
|
|
1422
|
+
$e = "restoring", setTimeout(() => {
|
|
1423
|
+
Zt(() => {
|
|
1424
|
+
if ($e === "restoring") {
|
|
1425
|
+
const e = R(t);
|
|
1426
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = Qe || ""), Qe = "", $e = "default";
|
|
1020
1427
|
}
|
|
1021
1428
|
});
|
|
1022
1429
|
}, 300);
|
|
1023
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
|
1024
|
-
let e =
|
|
1025
|
-
t.style
|
|
1430
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && Me.has(t)) {
|
|
1431
|
+
let e = Me.get(t), n = "userSelect" in t.style ? "userSelect" : "webkitUserSelect";
|
|
1432
|
+
t.style[n] === "none" && (t.style[n] = e), t.getAttribute("style") === "" && t.removeAttribute("style"), Me.delete(t);
|
|
1026
1433
|
}
|
|
1027
1434
|
}
|
|
1028
|
-
const
|
|
1435
|
+
const sn = Y.createContext({
|
|
1029
1436
|
register: () => {
|
|
1030
1437
|
}
|
|
1031
1438
|
});
|
|
1032
|
-
|
|
1033
|
-
function
|
|
1439
|
+
sn.displayName = "PressResponderContext";
|
|
1440
|
+
function Ar(t, e) {
|
|
1034
1441
|
return e.get ? e.get.call(t) : e.value;
|
|
1035
1442
|
}
|
|
1036
|
-
function
|
|
1037
|
-
if (!e.has(t)) throw new TypeError("attempted to " +
|
|
1443
|
+
function an(t, e, n) {
|
|
1444
|
+
if (!e.has(t)) throw new TypeError("attempted to " + n + " private field on non-instance");
|
|
1038
1445
|
return e.get(t);
|
|
1039
1446
|
}
|
|
1040
|
-
function
|
|
1041
|
-
var
|
|
1042
|
-
return
|
|
1447
|
+
function Or(t, e) {
|
|
1448
|
+
var n = an(t, e, "get");
|
|
1449
|
+
return Ar(t, n);
|
|
1043
1450
|
}
|
|
1044
|
-
function
|
|
1451
|
+
function Rr(t, e) {
|
|
1045
1452
|
if (e.has(t))
|
|
1046
1453
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
1047
1454
|
}
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1455
|
+
function zr(t, e, n) {
|
|
1456
|
+
Rr(t, e), e.set(t, n);
|
|
1050
1457
|
}
|
|
1051
|
-
function
|
|
1052
|
-
if (e.set) e.set.call(t,
|
|
1458
|
+
function Br(t, e, n) {
|
|
1459
|
+
if (e.set) e.set.call(t, n);
|
|
1053
1460
|
else {
|
|
1054
1461
|
if (!e.writable)
|
|
1055
1462
|
throw new TypeError("attempted to set read only private field");
|
|
1056
|
-
e.value =
|
|
1463
|
+
e.value = n;
|
|
1057
1464
|
}
|
|
1058
1465
|
}
|
|
1059
|
-
function
|
|
1060
|
-
var
|
|
1061
|
-
return
|
|
1466
|
+
function kt(t, e, n) {
|
|
1467
|
+
var r = an(t, e, "set");
|
|
1468
|
+
return Br(t, r, n), n;
|
|
1062
1469
|
}
|
|
1063
|
-
function
|
|
1064
|
-
let e =
|
|
1470
|
+
function Ur(t) {
|
|
1471
|
+
let e = ye(sn);
|
|
1065
1472
|
if (e) {
|
|
1066
|
-
let { register: r, ...
|
|
1067
|
-
t =
|
|
1473
|
+
let { register: n, ref: r, ...i } = e;
|
|
1474
|
+
t = ne(i, t), n();
|
|
1068
1475
|
}
|
|
1069
|
-
return
|
|
1476
|
+
return tn(e, t.ref), t;
|
|
1070
1477
|
}
|
|
1071
|
-
var
|
|
1072
|
-
class
|
|
1478
|
+
var Le = /* @__PURE__ */ new WeakMap();
|
|
1479
|
+
class Ne {
|
|
1073
1480
|
continuePropagation() {
|
|
1074
|
-
|
|
1481
|
+
kt(this, Le, !1);
|
|
1075
1482
|
}
|
|
1076
1483
|
get shouldStopPropagation() {
|
|
1077
|
-
return
|
|
1484
|
+
return Or(this, Le);
|
|
1078
1485
|
}
|
|
1079
|
-
constructor(e,
|
|
1080
|
-
|
|
1486
|
+
constructor(e, n, r, i) {
|
|
1487
|
+
zr(this, Le, {
|
|
1081
1488
|
writable: !0,
|
|
1082
1489
|
value: void 0
|
|
1083
|
-
}),
|
|
1084
|
-
var
|
|
1085
|
-
let
|
|
1086
|
-
const
|
|
1087
|
-
let
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
const
|
|
1092
|
-
function
|
|
1093
|
-
let {
|
|
1094
|
-
onPress: e,
|
|
1095
|
-
onPressChange: r,
|
|
1096
|
-
onPressStart: n,
|
|
1097
|
-
onPressEnd: i,
|
|
1098
|
-
onPressUp: s,
|
|
1099
|
-
isDisabled: o,
|
|
1100
|
-
isPressed: a,
|
|
1101
|
-
preventFocusOnPress: p,
|
|
1102
|
-
shouldCancelOnPointerExit: h,
|
|
1103
|
-
allowTextSelectionOnPress: v,
|
|
1104
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1105
|
-
ref: w,
|
|
1106
|
-
...$
|
|
1107
|
-
} = Jr(t), [m, M] = B(!1), k = L({
|
|
1490
|
+
}), kt(this, Le, !0);
|
|
1491
|
+
var l;
|
|
1492
|
+
let s = (l = i?.target) !== null && l !== void 0 ? l : r.currentTarget;
|
|
1493
|
+
const c = s?.getBoundingClientRect();
|
|
1494
|
+
let u, p = 0, d, b = null;
|
|
1495
|
+
r.clientX != null && r.clientY != null && (d = r.clientX, b = r.clientY), c && (d != null && b != null ? (u = d - c.left, p = b - c.top) : (u = c.width / 2, p = c.height / 2)), this.type = e, this.pointerType = n, this.target = r.currentTarget, this.shiftKey = r.shiftKey, this.metaKey = r.metaKey, this.ctrlKey = r.ctrlKey, this.altKey = r.altKey, this.x = u, this.y = p, this.key = r.key;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
const xt = Symbol("linkClicked"), _t = "react-aria-pressable-style", Lt = "data-react-aria-pressable";
|
|
1499
|
+
function cn(t) {
|
|
1500
|
+
let { onPress: e, onPressChange: n, onPressStart: r, onPressEnd: i, onPressUp: l, onClick: s, isDisabled: c, isPressed: u, preventFocusOnPress: p, shouldCancelOnPointerExit: d, allowTextSelectionOnPress: b, ref: $, ...m } = Ur(t), [x, _] = te(!1), D = k({
|
|
1108
1501
|
isPressed: !1,
|
|
1109
1502
|
ignoreEmulatedMouseEvents: !1,
|
|
1110
|
-
ignoreClickAfterPress: !1,
|
|
1111
1503
|
didFirePressStart: !1,
|
|
1112
1504
|
isTriggeringEvent: !1,
|
|
1113
1505
|
activePointerId: null,
|
|
1114
1506
|
target: null,
|
|
1115
1507
|
isOverTarget: !1,
|
|
1116
|
-
pointerType: null
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1508
|
+
pointerType: null,
|
|
1509
|
+
disposables: []
|
|
1510
|
+
}), { addGlobalListener: K, removeAllGlobalListeners: T, removeGlobalListener: M } = Qt(), I = H((o, f) => {
|
|
1511
|
+
let a = D.current;
|
|
1512
|
+
if (c || a.didFirePressStart) return !1;
|
|
1513
|
+
let h = !0;
|
|
1514
|
+
if (a.isTriggeringEvent = !0, r) {
|
|
1515
|
+
let g = new Ne("pressstart", f, o);
|
|
1516
|
+
r(g), h = g.shouldStopPropagation;
|
|
1124
1517
|
}
|
|
1125
|
-
return
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1518
|
+
return n && n(!0), a.isTriggeringEvent = !1, a.didFirePressStart = !0, _(!0), h;
|
|
1519
|
+
}, [
|
|
1520
|
+
c,
|
|
1521
|
+
r,
|
|
1522
|
+
n
|
|
1523
|
+
]), F = H((o, f, a = !0) => {
|
|
1524
|
+
let h = D.current;
|
|
1525
|
+
if (!h.didFirePressStart) return !1;
|
|
1526
|
+
h.didFirePressStart = !1, h.isTriggeringEvent = !0;
|
|
1527
|
+
let g = !0;
|
|
1131
1528
|
if (i) {
|
|
1132
|
-
let
|
|
1133
|
-
i(
|
|
1529
|
+
let S = new Ne("pressend", f, o);
|
|
1530
|
+
i(S), g = S.shouldStopPropagation;
|
|
1134
1531
|
}
|
|
1135
|
-
if (
|
|
1136
|
-
let
|
|
1137
|
-
e(
|
|
1532
|
+
if (n && n(!1), _(!1), e && a && !c) {
|
|
1533
|
+
let S = new Ne("press", f, o);
|
|
1534
|
+
e(S), g && (g = S.shouldStopPropagation);
|
|
1138
1535
|
}
|
|
1139
|
-
return
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1536
|
+
return h.isTriggeringEvent = !1, g;
|
|
1537
|
+
}, [
|
|
1538
|
+
c,
|
|
1539
|
+
i,
|
|
1540
|
+
n,
|
|
1541
|
+
e
|
|
1542
|
+
]), J = Se(F), B = H((o, f) => {
|
|
1543
|
+
let a = D.current;
|
|
1544
|
+
if (c) return !1;
|
|
1545
|
+
if (l) {
|
|
1546
|
+
a.isTriggeringEvent = !0;
|
|
1547
|
+
let h = new Ne("pressup", f, o);
|
|
1548
|
+
return l(h), a.isTriggeringEvent = !1, h.shouldStopPropagation;
|
|
1147
1549
|
}
|
|
1148
1550
|
return !0;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
y.onPointerDown = (u) => {
|
|
1198
|
-
if (u.button !== 0 || !u.currentTarget.contains(u.target)) return;
|
|
1199
|
-
if (Ur(u.nativeEvent)) {
|
|
1200
|
-
l.pointerType = "virtual";
|
|
1201
|
-
return;
|
|
1551
|
+
}, [
|
|
1552
|
+
c,
|
|
1553
|
+
l
|
|
1554
|
+
]), X = Se(B), O = H((o) => {
|
|
1555
|
+
let f = D.current;
|
|
1556
|
+
if (f.isPressed && f.target) {
|
|
1557
|
+
f.didFirePressStart && f.pointerType != null && F(ve(f.target, o), f.pointerType, !1), f.isPressed = !1, C(null), f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, T(), b || Ge(f.target);
|
|
1558
|
+
for (let a of f.disposables) a();
|
|
1559
|
+
f.disposables = [];
|
|
1560
|
+
}
|
|
1561
|
+
}, [
|
|
1562
|
+
b,
|
|
1563
|
+
T,
|
|
1564
|
+
F
|
|
1565
|
+
]), j = Se(O), G = H((o) => {
|
|
1566
|
+
d && O(o);
|
|
1567
|
+
}, [
|
|
1568
|
+
d,
|
|
1569
|
+
O
|
|
1570
|
+
]), W = H((o) => {
|
|
1571
|
+
c || s?.(o);
|
|
1572
|
+
}, [
|
|
1573
|
+
c,
|
|
1574
|
+
s
|
|
1575
|
+
]), A = H((o, f) => {
|
|
1576
|
+
if (!c && s) {
|
|
1577
|
+
let a = new MouseEvent("click", o);
|
|
1578
|
+
Ir(a, f), s(ln(a));
|
|
1579
|
+
}
|
|
1580
|
+
}, [
|
|
1581
|
+
c,
|
|
1582
|
+
s
|
|
1583
|
+
]), v = Se(A), [w, N] = te(!1);
|
|
1584
|
+
le(() => {
|
|
1585
|
+
let o = D.current;
|
|
1586
|
+
if (w) {
|
|
1587
|
+
let f = (S) => {
|
|
1588
|
+
var U;
|
|
1589
|
+
if (o.isPressed && o.target && Ye(S, o.target)) {
|
|
1590
|
+
var q;
|
|
1591
|
+
Ct(E(S), S.key) && S.preventDefault();
|
|
1592
|
+
let Z = E(S), Q = P(o.target, Z);
|
|
1593
|
+
J(ve(o.target, S), "keyboard", Q), Q && v(S, o.target), T(), S.key !== "Enter" && ut(o.target) && P(o.target, Z) && !S[xt] && (S[xt] = !0, ue(o.target, S, !1)), o.isPressed = !1, N(!1), (q = o.metaKeyEvents) === null || q === void 0 || q.delete(S.key);
|
|
1594
|
+
} else if (S.key === "Meta" && (!((U = o.metaKeyEvents) === null || U === void 0) && U.size)) {
|
|
1595
|
+
var y;
|
|
1596
|
+
let Z = o.metaKeyEvents;
|
|
1597
|
+
o.metaKeyEvents = void 0;
|
|
1598
|
+
for (let Q of Z.values()) (y = o.target) === null || y === void 0 || y.dispatchEvent(new KeyboardEvent("keyup", Q));
|
|
1202
1599
|
}
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
}, y.onPointerUp = (u) => {
|
|
1209
|
-
!u.currentTarget.contains(u.target) || l.pointerType === "virtual" || u.button === 0 && ie(u, u.currentTarget) && D(u, l.pointerType || u.pointerType);
|
|
1600
|
+
}, a = o.target, g = ot((S) => {
|
|
1601
|
+
a && Ye(S, a) && !S.repeat && P(a, E(S)) && o.target && X(ve(o.target, S), "keyboard");
|
|
1602
|
+
}, f);
|
|
1603
|
+
return K(R(o.target), "keyup", g, !0), () => {
|
|
1604
|
+
M(R(o.target), "keyup", g, !0);
|
|
1210
1605
|
};
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1606
|
+
}
|
|
1607
|
+
}, [
|
|
1608
|
+
w,
|
|
1609
|
+
K,
|
|
1610
|
+
T,
|
|
1611
|
+
M
|
|
1612
|
+
]);
|
|
1613
|
+
let [L, C] = te(null);
|
|
1614
|
+
le(() => {
|
|
1615
|
+
let o = D.current;
|
|
1616
|
+
if (L === "pointer") {
|
|
1617
|
+
let f = (h) => {
|
|
1618
|
+
if (h.pointerId === o.activePointerId && o.isPressed && h.button === 0 && o.target) {
|
|
1619
|
+
if (P(o.target, E(h)) && o.pointerType != null) {
|
|
1620
|
+
let g = !1, S = setTimeout(() => {
|
|
1621
|
+
o.isPressed && o.target instanceof HTMLElement && (g ? j(h) : (ce(o.target), o.target.click()));
|
|
1622
|
+
}, 80);
|
|
1623
|
+
h.currentTarget && K(h.currentTarget, "click", () => g = !0, !0), o.disposables.push(() => clearTimeout(S));
|
|
1624
|
+
} else j(h);
|
|
1625
|
+
o.isOverTarget = !1;
|
|
1231
1626
|
}
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
if (!c.currentTarget.contains(c.target)) return;
|
|
1235
|
-
let S = !0;
|
|
1236
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, S = x(c, l.pointerType)), S && c.stopPropagation();
|
|
1237
|
-
}, y.onMouseLeave = (c) => {
|
|
1238
|
-
if (!c.currentTarget.contains(c.target)) return;
|
|
1239
|
-
let S = !0;
|
|
1240
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, S = K(c, l.pointerType, !1), C(c)), S && c.stopPropagation();
|
|
1241
|
-
}, y.onMouseUp = (c) => {
|
|
1242
|
-
c.currentTarget.contains(c.target) && !l.ignoreEmulatedMouseEvents && c.button === 0 && D(c, l.pointerType || "mouse");
|
|
1627
|
+
}, a = (h) => {
|
|
1628
|
+
j(h);
|
|
1243
1629
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1630
|
+
return K(R(o.target), "pointerup", f, !1), K(R(o.target), "pointercancel", a, !1), () => {
|
|
1631
|
+
M(R(o.target), "pointerup", f, !1), M(R(o.target), "pointercancel", a, !1);
|
|
1632
|
+
};
|
|
1633
|
+
} else if (L === "mouse" && process.env.NODE_ENV === "test") {
|
|
1634
|
+
let f = (a) => {
|
|
1635
|
+
if (a.button === 0) {
|
|
1636
|
+
if (o.ignoreEmulatedMouseEvents) {
|
|
1637
|
+
o.ignoreEmulatedMouseEvents = !1;
|
|
1248
1638
|
return;
|
|
1249
1639
|
}
|
|
1250
|
-
|
|
1640
|
+
o.target && P(o.target, a.target) && o.pointerType != null || j(a), o.isOverTarget = !1;
|
|
1251
1641
|
}
|
|
1252
1642
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
let S = Zr(c.nativeEvent);
|
|
1256
|
-
if (!S) return;
|
|
1257
|
-
l.activePointerId = S.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = c.currentTarget, l.pointerType = "touch", !o && !p && j(c.currentTarget), v || lt(l.target), x(X(l.target, c), l.pointerType) && c.stopPropagation(), P(Q(c.currentTarget), "scroll", T, !0);
|
|
1258
|
-
}, y.onTouchMove = (c) => {
|
|
1259
|
-
if (!c.currentTarget.contains(c.target)) return;
|
|
1260
|
-
if (!l.isPressed) {
|
|
1261
|
-
c.stopPropagation();
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
|
-
let S = at(c.nativeEvent, l.activePointerId), u = !0;
|
|
1265
|
-
S && ie(S, c.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, u = x(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, u = K(X(l.target, c), l.pointerType, !1), C(X(l.target, c))), u && c.stopPropagation();
|
|
1266
|
-
}, y.onTouchEnd = (c) => {
|
|
1267
|
-
if (!c.currentTarget.contains(c.target)) return;
|
|
1268
|
-
if (!l.isPressed) {
|
|
1269
|
-
c.stopPropagation();
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
let S = at(c.nativeEvent, l.activePointerId), u = !0;
|
|
1273
|
-
S && ie(S, c.currentTarget) && l.pointerType != null ? (D(X(l.target, c), l.pointerType), u = K(X(l.target, c), l.pointerType)) : l.isOverTarget && l.pointerType != null && (u = K(X(l.target, c), l.pointerType, !1)), u && c.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !v && he(l.target), E();
|
|
1274
|
-
}, y.onTouchCancel = (c) => {
|
|
1275
|
-
c.currentTarget.contains(c.target) && (c.stopPropagation(), l.isPressed && _(X(l.target, c)));
|
|
1643
|
+
return K(R(o.target), "mouseup", f, !1), () => {
|
|
1644
|
+
M(R(o.target), "mouseup", f, !1);
|
|
1276
1645
|
};
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1646
|
+
} else if (L === "touch" && process.env.NODE_ENV === "test") {
|
|
1647
|
+
let f = (a) => {
|
|
1648
|
+
o.isPressed && P(E(a), o.target) && j({
|
|
1649
|
+
currentTarget: o.target,
|
|
1280
1650
|
shiftKey: !1,
|
|
1281
1651
|
ctrlKey: !1,
|
|
1282
1652
|
metaKey: !1,
|
|
1283
1653
|
altKey: !1
|
|
1284
1654
|
});
|
|
1285
1655
|
};
|
|
1286
|
-
|
|
1287
|
-
|
|
1656
|
+
return K(ie(o.target), "scroll", f, !0), () => {
|
|
1657
|
+
M(ie(o.target), "scroll", f, !0);
|
|
1288
1658
|
};
|
|
1289
1659
|
}
|
|
1290
|
-
return y;
|
|
1291
1660
|
}, [
|
|
1292
|
-
|
|
1293
|
-
o,
|
|
1294
|
-
p,
|
|
1295
|
-
E,
|
|
1296
|
-
v,
|
|
1297
|
-
_,
|
|
1298
|
-
C,
|
|
1661
|
+
L,
|
|
1299
1662
|
K,
|
|
1300
|
-
|
|
1301
|
-
D
|
|
1663
|
+
M
|
|
1302
1664
|
]);
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1665
|
+
let z = ae(() => {
|
|
1666
|
+
let o = D.current, f = {
|
|
1667
|
+
onKeyDown(a) {
|
|
1668
|
+
if (Ye(a.nativeEvent, a.currentTarget) && P(a.currentTarget, E(a))) {
|
|
1669
|
+
var h;
|
|
1670
|
+
Ct(E(a), a.key) && a.preventDefault();
|
|
1671
|
+
let g = !0;
|
|
1672
|
+
!o.isPressed && !a.repeat && (o.target = a.currentTarget, o.isPressed = !0, N(!0), o.pointerType = "keyboard", g = I(a, "keyboard")), g && a.stopPropagation(), a.metaKey && be() && ((h = o.metaKeyEvents) === null || h === void 0 || h.set(a.key, a.nativeEvent));
|
|
1673
|
+
} else a.key === "Meta" && (o.metaKeyEvents = /* @__PURE__ */ new Map());
|
|
1674
|
+
},
|
|
1675
|
+
onClick(a) {
|
|
1676
|
+
if (!(a && !P(a.currentTarget, E(a))) && a && a.button === 0 && !o.isTriggeringEvent && !ue.isOpening) {
|
|
1677
|
+
let h = !0;
|
|
1678
|
+
if (c && a.preventDefault(), !o.ignoreEmulatedMouseEvents && !o.isPressed && (o.pointerType === "virtual" || Ze(a.nativeEvent))) {
|
|
1679
|
+
let g = I(a, "virtual"), S = B(a, "virtual"), U = F(a, "virtual");
|
|
1680
|
+
W(a), h = g && S && U;
|
|
1681
|
+
} else if (o.isPressed && o.pointerType !== "keyboard") {
|
|
1682
|
+
let g = o.pointerType || a.nativeEvent.pointerType || "virtual", S = B(ve(a.currentTarget, a), g), U = F(ve(a.currentTarget, a), g, !0);
|
|
1683
|
+
h = S && U, o.isOverTarget = !1, W(a), O(a);
|
|
1684
|
+
}
|
|
1685
|
+
o.ignoreEmulatedMouseEvents = !1, h && a.stopPropagation();
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
return typeof PointerEvent < "u" ? (f.onPointerDown = (a) => {
|
|
1690
|
+
if (a.button !== 0 || !P(a.currentTarget, E(a))) return;
|
|
1691
|
+
if (kr(a.nativeEvent)) {
|
|
1692
|
+
o.pointerType = "virtual";
|
|
1693
|
+
return;
|
|
1694
|
+
}
|
|
1695
|
+
o.pointerType = a.pointerType;
|
|
1696
|
+
let h = !0;
|
|
1697
|
+
if (!o.isPressed) {
|
|
1698
|
+
o.isPressed = !0, C("pointer"), o.isOverTarget = !0, o.activePointerId = a.pointerId, o.target = a.currentTarget, b || Kt(o.target), h = I(a, o.pointerType);
|
|
1699
|
+
let g = E(a);
|
|
1700
|
+
"releasePointerCapture" in g && ("hasPointerCapture" in g ? g.hasPointerCapture(a.pointerId) && g.releasePointerCapture(a.pointerId) : g.releasePointerCapture(a.pointerId));
|
|
1701
|
+
}
|
|
1702
|
+
h && a.stopPropagation();
|
|
1703
|
+
}, f.onMouseDown = (a) => {
|
|
1704
|
+
if (P(a.currentTarget, E(a)) && a.button === 0) {
|
|
1705
|
+
if (p) {
|
|
1706
|
+
let h = Pt(a.target);
|
|
1707
|
+
h && o.disposables.push(h);
|
|
1708
|
+
}
|
|
1709
|
+
a.stopPropagation();
|
|
1710
|
+
}
|
|
1711
|
+
}, f.onPointerUp = (a) => {
|
|
1712
|
+
!P(a.currentTarget, E(a)) || o.pointerType === "virtual" || a.button === 0 && !o.isPressed && B(a, o.pointerType || a.pointerType);
|
|
1713
|
+
}, f.onPointerEnter = (a) => {
|
|
1714
|
+
a.pointerId === o.activePointerId && o.target && !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, I(ve(o.target, a), o.pointerType));
|
|
1715
|
+
}, f.onPointerLeave = (a) => {
|
|
1716
|
+
a.pointerId === o.activePointerId && o.target && o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, F(ve(o.target, a), o.pointerType, !1), G(a));
|
|
1717
|
+
}, f.onDragStart = (a) => {
|
|
1718
|
+
P(a.currentTarget, E(a)) && O(a);
|
|
1719
|
+
}) : process.env.NODE_ENV === "test" && (f.onMouseDown = (a) => {
|
|
1720
|
+
if (a.button !== 0 || !P(a.currentTarget, E(a))) return;
|
|
1721
|
+
if (o.ignoreEmulatedMouseEvents) {
|
|
1722
|
+
a.stopPropagation();
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
if (o.isPressed = !0, C("mouse"), o.isOverTarget = !0, o.target = a.currentTarget, o.pointerType = Ze(a.nativeEvent) ? "virtual" : "mouse", Ut(() => I(a, o.pointerType)) && a.stopPropagation(), p) {
|
|
1726
|
+
let g = Pt(a.target);
|
|
1727
|
+
g && o.disposables.push(g);
|
|
1728
|
+
}
|
|
1729
|
+
}, f.onMouseEnter = (a) => {
|
|
1730
|
+
if (!P(a.currentTarget, E(a))) return;
|
|
1731
|
+
let h = !0;
|
|
1732
|
+
o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !0, h = I(a, o.pointerType)), h && a.stopPropagation();
|
|
1733
|
+
}, f.onMouseLeave = (a) => {
|
|
1734
|
+
if (!P(a.currentTarget, E(a))) return;
|
|
1735
|
+
let h = !0;
|
|
1736
|
+
o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !1, h = F(a, o.pointerType, !1), G(a)), h && a.stopPropagation();
|
|
1737
|
+
}, f.onMouseUp = (a) => {
|
|
1738
|
+
P(a.currentTarget, E(a)) && !o.ignoreEmulatedMouseEvents && a.button === 0 && !o.isPressed && B(a, o.pointerType || "mouse");
|
|
1739
|
+
}, f.onTouchStart = (a) => {
|
|
1740
|
+
if (!P(a.currentTarget, E(a))) return;
|
|
1741
|
+
let h = Wr(a.nativeEvent);
|
|
1742
|
+
if (!h) return;
|
|
1743
|
+
o.activePointerId = h.identifier, o.ignoreEmulatedMouseEvents = !0, o.isOverTarget = !0, o.isPressed = !0, C("touch"), o.target = a.currentTarget, o.pointerType = "touch", b || Kt(o.target), I(fe(o.target, a), o.pointerType) && a.stopPropagation();
|
|
1744
|
+
}, f.onTouchMove = (a) => {
|
|
1745
|
+
if (!P(a.currentTarget, E(a))) return;
|
|
1746
|
+
if (!o.isPressed) {
|
|
1747
|
+
a.stopPropagation();
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
let h = Nt(a.nativeEvent, o.activePointerId), g = !0;
|
|
1751
|
+
h && Mt(h, a.currentTarget) ? !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, g = I(fe(o.target, a), o.pointerType)) : o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, g = F(fe(o.target, a), o.pointerType, !1), G(fe(o.target, a))), g && a.stopPropagation();
|
|
1752
|
+
}, f.onTouchEnd = (a) => {
|
|
1753
|
+
if (!P(a.currentTarget, E(a))) return;
|
|
1754
|
+
if (!o.isPressed) {
|
|
1755
|
+
a.stopPropagation();
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
let h = Nt(a.nativeEvent, o.activePointerId), g = !0;
|
|
1759
|
+
h && Mt(h, a.currentTarget) && o.pointerType != null ? (B(fe(o.target, a), o.pointerType), g = F(fe(o.target, a), o.pointerType), A(a.nativeEvent, o.target)) : o.isOverTarget && o.pointerType != null && (g = F(fe(o.target, a), o.pointerType, !1)), g && a.stopPropagation(), o.isPressed = !1, C(null), o.activePointerId = null, o.isOverTarget = !1, o.ignoreEmulatedMouseEvents = !0, o.target && !b && Ge(o.target), T();
|
|
1760
|
+
}, f.onTouchCancel = (a) => {
|
|
1761
|
+
P(a.currentTarget, E(a)) && (a.stopPropagation(), o.isPressed && O(fe(o.target, a)));
|
|
1762
|
+
}, f.onDragStart = (a) => {
|
|
1763
|
+
P(a.currentTarget, E(a)) && O(a);
|
|
1764
|
+
}), f;
|
|
1306
1765
|
}, [
|
|
1307
|
-
|
|
1766
|
+
c,
|
|
1767
|
+
p,
|
|
1768
|
+
T,
|
|
1769
|
+
b,
|
|
1770
|
+
O,
|
|
1771
|
+
G,
|
|
1772
|
+
F,
|
|
1773
|
+
I,
|
|
1774
|
+
B,
|
|
1775
|
+
W,
|
|
1776
|
+
A
|
|
1777
|
+
]);
|
|
1778
|
+
return V(() => {
|
|
1779
|
+
if (!$ || process.env.NODE_ENV === "test") return;
|
|
1780
|
+
const o = R($.current);
|
|
1781
|
+
if (!o || !o.head || o.getElementById(_t)) return;
|
|
1782
|
+
const f = o.createElement("style");
|
|
1783
|
+
f.id = _t, f.textContent = `
|
|
1784
|
+
@layer {
|
|
1785
|
+
[${Lt}] {
|
|
1786
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
`.trim(), o.head.prepend(f);
|
|
1790
|
+
}, [
|
|
1791
|
+
$
|
|
1792
|
+
]), V(() => {
|
|
1793
|
+
let o = D.current;
|
|
1794
|
+
return () => {
|
|
1795
|
+
var f;
|
|
1796
|
+
b || Ge((f = o.target) !== null && f !== void 0 ? f : void 0);
|
|
1797
|
+
for (let a of o.disposables) a();
|
|
1798
|
+
o.disposables = [];
|
|
1799
|
+
};
|
|
1800
|
+
}, [
|
|
1801
|
+
b
|
|
1308
1802
|
]), {
|
|
1309
|
-
isPressed:
|
|
1310
|
-
pressProps:
|
|
1803
|
+
isPressed: u || x,
|
|
1804
|
+
pressProps: ne(m, z, {
|
|
1805
|
+
[Lt]: !0
|
|
1806
|
+
})
|
|
1311
1807
|
};
|
|
1312
1808
|
}
|
|
1313
|
-
function
|
|
1809
|
+
function ut(t) {
|
|
1314
1810
|
return t.tagName === "A" && t.hasAttribute("href");
|
|
1315
1811
|
}
|
|
1316
|
-
function
|
|
1317
|
-
const { key:
|
|
1318
|
-
return (
|
|
1319
|
-
!((
|
|
1812
|
+
function Ye(t, e) {
|
|
1813
|
+
const { key: n, code: r } = t, i = e, l = i.getAttribute("role");
|
|
1814
|
+
return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof ie(i).HTMLInputElement && !un(i, n) || i instanceof ie(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
|
1815
|
+
!((l === "link" || !l && ut(i)) && n !== "Enter");
|
|
1320
1816
|
}
|
|
1321
|
-
function
|
|
1817
|
+
function Wr(t) {
|
|
1322
1818
|
const { targetTouches: e } = t;
|
|
1323
1819
|
return e.length > 0 ? e[0] : null;
|
|
1324
1820
|
}
|
|
1325
|
-
function
|
|
1326
|
-
const
|
|
1327
|
-
for (let
|
|
1328
|
-
const i = r
|
|
1821
|
+
function Nt(t, e) {
|
|
1822
|
+
const n = t.changedTouches;
|
|
1823
|
+
for (let r = 0; r < n.length; r++) {
|
|
1824
|
+
const i = n[r];
|
|
1329
1825
|
if (i.identifier === e) return i;
|
|
1330
1826
|
}
|
|
1331
1827
|
return null;
|
|
1332
1828
|
}
|
|
1333
|
-
function
|
|
1334
|
-
let
|
|
1335
|
-
return e.targetTouches && e.targetTouches.length === 1 && (
|
|
1829
|
+
function fe(t, e) {
|
|
1830
|
+
let n = 0, r = 0;
|
|
1831
|
+
return e.targetTouches && e.targetTouches.length === 1 && (n = e.targetTouches[0].clientX, r = e.targetTouches[0].clientY), {
|
|
1336
1832
|
currentTarget: t,
|
|
1337
1833
|
shiftKey: e.shiftKey,
|
|
1338
1834
|
ctrlKey: e.ctrlKey,
|
|
1339
1835
|
metaKey: e.metaKey,
|
|
1340
1836
|
altKey: e.altKey,
|
|
1341
|
-
clientX:
|
|
1342
|
-
clientY:
|
|
1837
|
+
clientX: n,
|
|
1838
|
+
clientY: r
|
|
1343
1839
|
};
|
|
1344
1840
|
}
|
|
1345
|
-
function
|
|
1346
|
-
let
|
|
1841
|
+
function ve(t, e) {
|
|
1842
|
+
let n = e.clientX, r = e.clientY;
|
|
1347
1843
|
return {
|
|
1348
1844
|
currentTarget: t,
|
|
1349
1845
|
shiftKey: e.shiftKey,
|
|
1350
1846
|
ctrlKey: e.ctrlKey,
|
|
1351
1847
|
metaKey: e.metaKey,
|
|
1352
1848
|
altKey: e.altKey,
|
|
1353
|
-
clientX:
|
|
1354
|
-
clientY:
|
|
1849
|
+
clientX: n,
|
|
1850
|
+
clientY: r,
|
|
1851
|
+
key: e.key
|
|
1355
1852
|
};
|
|
1356
1853
|
}
|
|
1357
|
-
function
|
|
1358
|
-
let e = 0,
|
|
1359
|
-
return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ?
|
|
1360
|
-
top: t.clientY -
|
|
1854
|
+
function Hr(t) {
|
|
1855
|
+
let e = 0, n = 0;
|
|
1856
|
+
return t.width !== void 0 ? e = t.width / 2 : t.radiusX !== void 0 && (e = t.radiusX), t.height !== void 0 ? n = t.height / 2 : t.radiusY !== void 0 && (n = t.radiusY), {
|
|
1857
|
+
top: t.clientY - n,
|
|
1361
1858
|
right: t.clientX + e,
|
|
1362
|
-
bottom: t.clientY +
|
|
1859
|
+
bottom: t.clientY + n,
|
|
1363
1860
|
left: t.clientX - e
|
|
1364
1861
|
};
|
|
1365
1862
|
}
|
|
1366
|
-
function
|
|
1863
|
+
function Vr(t, e) {
|
|
1367
1864
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
|
1368
1865
|
}
|
|
1369
|
-
function
|
|
1370
|
-
let
|
|
1371
|
-
return
|
|
1866
|
+
function Mt(t, e) {
|
|
1867
|
+
let n = e.getBoundingClientRect(), r = Hr(t);
|
|
1868
|
+
return Vr(n, r);
|
|
1372
1869
|
}
|
|
1373
|
-
function
|
|
1374
|
-
return
|
|
1375
|
-
}
|
|
1376
|
-
function It(t) {
|
|
1377
|
-
return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !je(t);
|
|
1870
|
+
function jr(t) {
|
|
1871
|
+
return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !ut(t);
|
|
1378
1872
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return t instanceof HTMLInputElement ? !
|
|
1873
|
+
function Ct(t, e) {
|
|
1874
|
+
return t instanceof HTMLInputElement ? !un(t, e) : jr(t);
|
|
1381
1875
|
}
|
|
1382
|
-
const
|
|
1876
|
+
const Gr = /* @__PURE__ */ new Set([
|
|
1383
1877
|
"checkbox",
|
|
1384
1878
|
"radio",
|
|
1385
1879
|
"range",
|
|
@@ -1390,86 +1884,178 @@ const tn = /* @__PURE__ */ new Set([
|
|
|
1390
1884
|
"submit",
|
|
1391
1885
|
"reset"
|
|
1392
1886
|
]);
|
|
1393
|
-
function
|
|
1394
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
|
1887
|
+
function un(t, e) {
|
|
1888
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : Gr.has(t.type);
|
|
1395
1889
|
}
|
|
1396
|
-
let
|
|
1397
|
-
|
|
1398
|
-
|
|
1890
|
+
let ke = null;
|
|
1891
|
+
const Yr = /* @__PURE__ */ new Set();
|
|
1892
|
+
let Pe = /* @__PURE__ */ new Map(), he = !1, et = !1;
|
|
1893
|
+
function dt(t, e) {
|
|
1894
|
+
for (let n of Yr) n(t, e);
|
|
1399
1895
|
}
|
|
1400
|
-
function
|
|
1401
|
-
return !(t.metaKey || !
|
|
1896
|
+
function Xr(t) {
|
|
1897
|
+
return !(t.metaKey || !be() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
|
1402
1898
|
}
|
|
1403
|
-
function
|
|
1404
|
-
|
|
1899
|
+
function Fe(t) {
|
|
1900
|
+
he = !0, !ue.isOpening && Xr(t) && (ke = "keyboard", dt("keyboard", t));
|
|
1405
1901
|
}
|
|
1406
|
-
function
|
|
1407
|
-
|
|
1902
|
+
function ee(t) {
|
|
1903
|
+
ke = "pointer", "pointerType" in t && t.pointerType, (t.type === "mousedown" || t.type === "pointerdown") && (he = !0, dt("pointer", t));
|
|
1408
1904
|
}
|
|
1409
|
-
function
|
|
1410
|
-
|
|
1905
|
+
function dn(t) {
|
|
1906
|
+
!ue.isOpening && Ze(t) && (he = !0, ke = "virtual");
|
|
1411
1907
|
}
|
|
1412
|
-
function
|
|
1413
|
-
t
|
|
1908
|
+
function fn(t) {
|
|
1909
|
+
E(t) === window || E(t) === document || Ie || !t.isTrusted || (!he && !et && (ke = "virtual", dt("virtual", t)), he = !1, et = !1);
|
|
1414
1910
|
}
|
|
1415
|
-
function
|
|
1416
|
-
|
|
1911
|
+
function pn() {
|
|
1912
|
+
Ie || (he = !1, et = !0);
|
|
1417
1913
|
}
|
|
1418
|
-
function
|
|
1419
|
-
if (typeof window > "u" ||
|
|
1420
|
-
const e =
|
|
1421
|
-
let
|
|
1914
|
+
function Dt(t) {
|
|
1915
|
+
if (typeof window > "u" || typeof document > "u" || Pe.get(ie(t))) return;
|
|
1916
|
+
const e = ie(t), n = R(t);
|
|
1917
|
+
let r = e.HTMLElement.prototype.focus;
|
|
1422
1918
|
e.HTMLElement.prototype.focus = function() {
|
|
1423
|
-
|
|
1424
|
-
},
|
|
1425
|
-
|
|
1919
|
+
he = !0, r.apply(this, arguments);
|
|
1920
|
+
}, n.addEventListener("keydown", Fe, !0), n.addEventListener("keyup", Fe, !0), n.addEventListener("click", dn, !0), e.addEventListener("focus", fn, !0), e.addEventListener("blur", pn, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", ee, !0), n.addEventListener("pointermove", ee, !0), n.addEventListener("pointerup", ee, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", ee, !0), n.addEventListener("mousemove", ee, !0), n.addEventListener("mouseup", ee, !0)), e.addEventListener("beforeunload", () => {
|
|
1921
|
+
vn(t);
|
|
1426
1922
|
}, {
|
|
1427
1923
|
once: !0
|
|
1428
|
-
}),
|
|
1429
|
-
focus:
|
|
1924
|
+
}), Pe.set(e, {
|
|
1925
|
+
focus: r
|
|
1430
1926
|
});
|
|
1431
1927
|
}
|
|
1432
|
-
const
|
|
1433
|
-
const
|
|
1434
|
-
e &&
|
|
1928
|
+
const vn = (t, e) => {
|
|
1929
|
+
const n = ie(t), r = R(t);
|
|
1930
|
+
e && r.removeEventListener("DOMContentLoaded", e), Pe.has(n) && (n.HTMLElement.prototype.focus = Pe.get(n).focus, r.removeEventListener("keydown", Fe, !0), r.removeEventListener("keyup", Fe, !0), r.removeEventListener("click", dn, !0), n.removeEventListener("focus", fn, !0), n.removeEventListener("blur", pn, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", ee, !0), r.removeEventListener("pointermove", ee, !0), r.removeEventListener("pointerup", ee, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", ee, !0), r.removeEventListener("mousemove", ee, !0), r.removeEventListener("mouseup", ee, !0)), Pe.delete(n));
|
|
1435
1931
|
};
|
|
1436
|
-
function
|
|
1437
|
-
const e =
|
|
1438
|
-
let
|
|
1439
|
-
return e.readyState !== "loading" ?
|
|
1440
|
-
|
|
1441
|
-
}, e.addEventListener("DOMContentLoaded",
|
|
1442
|
-
}
|
|
1443
|
-
typeof document < "u" &&
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1932
|
+
function qr(t) {
|
|
1933
|
+
const e = R(t);
|
|
1934
|
+
let n;
|
|
1935
|
+
return e.readyState !== "loading" ? Dt(t) : (n = () => {
|
|
1936
|
+
Dt(t);
|
|
1937
|
+
}, e.addEventListener("DOMContentLoaded", n)), () => vn(t, n);
|
|
1938
|
+
}
|
|
1939
|
+
typeof document < "u" && qr();
|
|
1940
|
+
function tt() {
|
|
1941
|
+
return ke;
|
|
1942
|
+
}
|
|
1943
|
+
function Ae(t) {
|
|
1944
|
+
if (!t.isConnected) return;
|
|
1945
|
+
const e = R(t);
|
|
1946
|
+
if (tt() === "virtual") {
|
|
1947
|
+
let n = se(e);
|
|
1948
|
+
Zt(() => {
|
|
1949
|
+
const r = se(e);
|
|
1950
|
+
(r === n || r === e.body) && t.isConnected && ce(t);
|
|
1951
|
+
});
|
|
1952
|
+
} else ce(t);
|
|
1953
|
+
}
|
|
1954
|
+
function Jr(t) {
|
|
1955
|
+
let { isDisabled: e, onFocus: n, onBlur: r, onFocusChange: i } = t;
|
|
1956
|
+
const l = H((u) => {
|
|
1957
|
+
if (E(u) === u.currentTarget)
|
|
1958
|
+
return r && r(u), i && i(!1), !0;
|
|
1959
|
+
}, [
|
|
1960
|
+
r,
|
|
1961
|
+
i
|
|
1962
|
+
]), s = Fr(l), c = H((u) => {
|
|
1963
|
+
let p = E(u);
|
|
1964
|
+
const d = R(p), b = d ? se(d) : se();
|
|
1965
|
+
p === u.currentTarget && p === b && (n && n(u), i && i(!0), s(u));
|
|
1966
|
+
}, [
|
|
1967
|
+
i,
|
|
1968
|
+
n,
|
|
1969
|
+
s
|
|
1970
|
+
]);
|
|
1971
|
+
return {
|
|
1972
|
+
focusProps: {
|
|
1973
|
+
onFocus: !e && (n || i || r) ? c : void 0,
|
|
1974
|
+
onBlur: !e && (r || i) ? l : void 0
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function It(t) {
|
|
1979
|
+
if (!t) return;
|
|
1980
|
+
let e = !0;
|
|
1981
|
+
return (n) => {
|
|
1982
|
+
let r = {
|
|
1983
|
+
...n,
|
|
1984
|
+
preventDefault() {
|
|
1985
|
+
n.preventDefault();
|
|
1986
|
+
},
|
|
1987
|
+
isDefaultPrevented() {
|
|
1988
|
+
return n.isDefaultPrevented();
|
|
1989
|
+
},
|
|
1990
|
+
stopPropagation() {
|
|
1991
|
+
e && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : e = !0;
|
|
1992
|
+
},
|
|
1993
|
+
continuePropagation() {
|
|
1994
|
+
e = !1;
|
|
1995
|
+
},
|
|
1996
|
+
isPropagationStopped() {
|
|
1997
|
+
return e;
|
|
1998
|
+
}
|
|
1999
|
+
};
|
|
2000
|
+
t(r), e && n.stopPropagation();
|
|
2001
|
+
};
|
|
2002
|
+
}
|
|
2003
|
+
function Zr(t) {
|
|
2004
|
+
return {
|
|
2005
|
+
keyboardProps: t.isDisabled ? {} : {
|
|
2006
|
+
onKeyDown: It(t.onKeyDown),
|
|
2007
|
+
onKeyUp: It(t.onKeyUp)
|
|
2008
|
+
}
|
|
2009
|
+
};
|
|
2010
|
+
}
|
|
2011
|
+
let Qr = /* @__PURE__ */ Y.createContext(null);
|
|
2012
|
+
function ei(t) {
|
|
2013
|
+
let e = ye(Qr) || {};
|
|
2014
|
+
tn(e, t);
|
|
2015
|
+
let { ref: n, ...r } = e;
|
|
2016
|
+
return r;
|
|
2017
|
+
}
|
|
2018
|
+
function ti(t, e) {
|
|
2019
|
+
let { focusProps: n } = Jr(t), { keyboardProps: r } = Zr(t), i = ne(n, r), l = ei(e), s = t.isDisabled ? {} : l, c = k(t.autoFocus);
|
|
2020
|
+
V(() => {
|
|
2021
|
+
c.current && e.current && Ae(e.current), c.current = !1;
|
|
2022
|
+
}, [
|
|
2023
|
+
e
|
|
2024
|
+
]);
|
|
2025
|
+
let u = t.excludeFromTabOrder ? -1 : 0;
|
|
2026
|
+
return t.isDisabled && (u = void 0), {
|
|
2027
|
+
focusableProps: ne({
|
|
2028
|
+
...i,
|
|
2029
|
+
tabIndex: u
|
|
2030
|
+
}, s)
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
const ni = 500;
|
|
2034
|
+
function ri(t) {
|
|
2035
|
+
let { isDisabled: e, onLongPressStart: n, onLongPressEnd: r, onLongPress: i, threshold: l = ni, accessibilityDescription: s } = t;
|
|
2036
|
+
const c = k(void 0);
|
|
2037
|
+
let { addGlobalListener: u, removeGlobalListener: p } = Qt(), { pressProps: d } = cn({
|
|
1452
2038
|
isDisabled: e,
|
|
1453
2039
|
onPressStart($) {
|
|
1454
|
-
if ($.continuePropagation(), ($.pointerType === "mouse" || $.pointerType === "touch") && (
|
|
2040
|
+
if ($.continuePropagation(), ($.pointerType === "mouse" || $.pointerType === "touch") && (n && n({
|
|
1455
2041
|
...$,
|
|
1456
2042
|
type: "longpressstart"
|
|
1457
|
-
}),
|
|
2043
|
+
}), c.current = setTimeout(() => {
|
|
1458
2044
|
$.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
1459
2045
|
bubbles: !0
|
|
1460
|
-
})), i && i({
|
|
2046
|
+
})), R($.target).activeElement !== $.target && ce($.target), i && i({
|
|
1461
2047
|
...$,
|
|
1462
2048
|
type: "longpress"
|
|
1463
|
-
}),
|
|
1464
|
-
},
|
|
1465
|
-
let m = (
|
|
1466
|
-
|
|
2049
|
+
}), c.current = void 0;
|
|
2050
|
+
}, l), $.pointerType === "touch")) {
|
|
2051
|
+
let m = (x) => {
|
|
2052
|
+
x.preventDefault();
|
|
1467
2053
|
};
|
|
1468
|
-
|
|
2054
|
+
u($.target, "contextmenu", m, {
|
|
1469
2055
|
once: !0
|
|
1470
|
-
}),
|
|
2056
|
+
}), u(window, "pointerup", () => {
|
|
1471
2057
|
setTimeout(() => {
|
|
1472
|
-
|
|
2058
|
+
p($.target, "contextmenu", m);
|
|
1473
2059
|
}, 30);
|
|
1474
2060
|
}, {
|
|
1475
2061
|
once: !0
|
|
@@ -1477,117 +2063,86 @@ function sn(t) {
|
|
|
1477
2063
|
}
|
|
1478
2064
|
},
|
|
1479
2065
|
onPressEnd($) {
|
|
1480
|
-
|
|
2066
|
+
c.current && clearTimeout(c.current), r && ($.pointerType === "mouse" || $.pointerType === "touch") && r({
|
|
1481
2067
|
...$,
|
|
1482
2068
|
type: "longpressend"
|
|
1483
2069
|
});
|
|
1484
2070
|
}
|
|
1485
|
-
}),
|
|
2071
|
+
}), b = Kr(i && !e ? s : void 0);
|
|
1486
2072
|
return {
|
|
1487
|
-
longPressProps:
|
|
2073
|
+
longPressProps: ne(d, b)
|
|
1488
2074
|
};
|
|
1489
2075
|
}
|
|
1490
|
-
function
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
2076
|
+
function ii(t) {
|
|
2077
|
+
if (!t.form)
|
|
2078
|
+
return Array.from(R(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter((r) => !r.form);
|
|
2079
|
+
const e = t.form.elements.namedItem(t.name);
|
|
2080
|
+
let n = ie(t);
|
|
2081
|
+
return e instanceof n.RadioNodeList ? Array.from(e).filter((r) => r instanceof n.HTMLInputElement) : e instanceof n.HTMLInputElement ? [
|
|
2082
|
+
e
|
|
2083
|
+
] : [];
|
|
1498
2084
|
}
|
|
1499
|
-
function
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
if (i) {
|
|
1504
|
-
const { getComputedStyle: s } = t.ownerDocument.defaultView;
|
|
1505
|
-
let { display: o, visibility: a } = s(t);
|
|
1506
|
-
i = o !== "none" && a !== "hidden" && a !== "collapse";
|
|
1507
|
-
}
|
|
1508
|
-
return i;
|
|
2085
|
+
function oi(t) {
|
|
2086
|
+
if (t.checked) return !0;
|
|
2087
|
+
const e = ii(t);
|
|
2088
|
+
return e.length > 0 && !e.some((n) => n.checked);
|
|
1509
2089
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return !t
|
|
1512
|
-
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
|
1513
|
-
}
|
|
1514
|
-
function Rt(t, e) {
|
|
1515
|
-
return t.nodeName !== "#comment" && an(t) && cn(t, e) && (!t.parentElement || Rt(t.parentElement, t));
|
|
2090
|
+
function bn(t, e) {
|
|
2091
|
+
return !t || !e ? !1 : e.some((n) => P(n, t));
|
|
1516
2092
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
"button:not([disabled])",
|
|
1522
|
-
"a[href]",
|
|
1523
|
-
"area[href]",
|
|
1524
|
-
"summary",
|
|
1525
|
-
"iframe",
|
|
1526
|
-
"object",
|
|
1527
|
-
"embed",
|
|
1528
|
-
"audio[controls]",
|
|
1529
|
-
"video[controls]",
|
|
1530
|
-
"[contenteditable]"
|
|
1531
|
-
], un = Ge.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
1532
|
-
Ge.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
1533
|
-
const dn = Ge.join(':not([hidden]):not([tabindex="-1"]),');
|
|
1534
|
-
function Bt(t, e) {
|
|
1535
|
-
return !t || !e ? !1 : e.some((r) => r.contains(t));
|
|
1536
|
-
}
|
|
1537
|
-
function Ut(t, e, r) {
|
|
1538
|
-
let n = e?.tabbable ? dn : un, i = A(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
|
1539
|
-
acceptNode(s) {
|
|
1540
|
-
var o;
|
|
1541
|
-
return !(e == null || (o = e.from) === null || o === void 0) && o.contains(s) ? NodeFilter.FILTER_REJECT : s.matches(n) && Rt(s) && (!r || Bt(s, r)) && (!e?.accept || e.accept(s)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
2093
|
+
function hn(t, e, n) {
|
|
2094
|
+
let r = e?.tabbable ? rn : nn, i = t?.nodeType === Node.ELEMENT_NODE ? t : null, l = R(i), s = nr(l, t || l, NodeFilter.SHOW_ELEMENT, {
|
|
2095
|
+
acceptNode(c) {
|
|
2096
|
+
return P(e?.from, c) || e?.tabbable && c.tagName === "INPUT" && c.getAttribute("type") === "radio" && (!oi(c) || s.currentNode.tagName === "INPUT" && s.currentNode.type === "radio" && s.currentNode.name === c.name) ? NodeFilter.FILTER_REJECT : r(c) && (!n || bn(c, n)) && (!e?.accept || e.accept(c)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
1542
2097
|
}
|
|
1543
2098
|
});
|
|
1544
|
-
return e?.from && (
|
|
2099
|
+
return e?.from && (s.currentNode = e.from), s;
|
|
1545
2100
|
}
|
|
1546
|
-
class
|
|
2101
|
+
class ft {
|
|
1547
2102
|
get size() {
|
|
1548
2103
|
return this.fastMap.size;
|
|
1549
2104
|
}
|
|
1550
2105
|
getTreeNode(e) {
|
|
1551
2106
|
return this.fastMap.get(e);
|
|
1552
2107
|
}
|
|
1553
|
-
addTreeNode(e,
|
|
1554
|
-
let i = this.fastMap.get(
|
|
2108
|
+
addTreeNode(e, n, r) {
|
|
2109
|
+
let i = this.fastMap.get(n ?? null);
|
|
1555
2110
|
if (!i) return;
|
|
1556
|
-
let
|
|
2111
|
+
let l = new Ft({
|
|
1557
2112
|
scopeRef: e
|
|
1558
2113
|
});
|
|
1559
|
-
i.addChild(
|
|
2114
|
+
i.addChild(l), l.parent = i, this.fastMap.set(e, l), r && (l.nodeToRestore = r);
|
|
1560
2115
|
}
|
|
1561
2116
|
addNode(e) {
|
|
1562
2117
|
this.fastMap.set(e.scopeRef, e);
|
|
1563
2118
|
}
|
|
1564
2119
|
removeTreeNode(e) {
|
|
1565
2120
|
if (e === null) return;
|
|
1566
|
-
let
|
|
1567
|
-
if (!
|
|
1568
|
-
let
|
|
1569
|
-
for (let
|
|
1570
|
-
let i =
|
|
1571
|
-
|
|
2121
|
+
let n = this.fastMap.get(e);
|
|
2122
|
+
if (!n) return;
|
|
2123
|
+
let r = n.parent;
|
|
2124
|
+
for (let l of this.traverse()) l !== n && n.nodeToRestore && l.nodeToRestore && n.scopeRef && n.scopeRef.current && bn(l.nodeToRestore, n.scopeRef.current) && (l.nodeToRestore = n.nodeToRestore);
|
|
2125
|
+
let i = n.children;
|
|
2126
|
+
r && (r.removeChild(n), i.size > 0 && i.forEach((l) => r && r.addChild(l))), this.fastMap.delete(n.scopeRef);
|
|
1572
2127
|
}
|
|
1573
2128
|
// Pre Order Depth First
|
|
1574
2129
|
*traverse(e = this.root) {
|
|
1575
|
-
if (e.scopeRef != null && (yield e), e.children.size > 0) for (let
|
|
2130
|
+
if (e.scopeRef != null && (yield e), e.children.size > 0) for (let n of e.children) yield* this.traverse(n);
|
|
1576
2131
|
}
|
|
1577
2132
|
clone() {
|
|
1578
2133
|
var e;
|
|
1579
|
-
let
|
|
1580
|
-
var
|
|
1581
|
-
for (let i of this.traverse())
|
|
1582
|
-
return
|
|
2134
|
+
let n = new ft();
|
|
2135
|
+
var r;
|
|
2136
|
+
for (let i of this.traverse()) n.addTreeNode(i.scopeRef, (r = (e = i.parent) === null || e === void 0 ? void 0 : e.scopeRef) !== null && r !== void 0 ? r : null, i.nodeToRestore);
|
|
2137
|
+
return n;
|
|
1583
2138
|
}
|
|
1584
2139
|
constructor() {
|
|
1585
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new
|
|
2140
|
+
this.fastMap = /* @__PURE__ */ new Map(), this.root = new Ft({
|
|
1586
2141
|
scopeRef: null
|
|
1587
2142
|
}), this.fastMap.set(null, this.root);
|
|
1588
2143
|
}
|
|
1589
2144
|
}
|
|
1590
|
-
class
|
|
2145
|
+
class Ft {
|
|
1591
2146
|
addChild(e) {
|
|
1592
2147
|
this.children.add(e), e.parent = this;
|
|
1593
2148
|
}
|
|
@@ -1598,22 +2153,22 @@ class dt {
|
|
|
1598
2153
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
|
1599
2154
|
}
|
|
1600
2155
|
}
|
|
1601
|
-
new
|
|
1602
|
-
function
|
|
1603
|
-
let
|
|
1604
|
-
return
|
|
1605
|
-
if (t?.current && !
|
|
1606
|
-
let
|
|
2156
|
+
new ft();
|
|
2157
|
+
function li(t, e) {
|
|
2158
|
+
let n = e?.isDisabled, [r, i] = te(!1);
|
|
2159
|
+
return le(() => {
|
|
2160
|
+
if (t?.current && !n) {
|
|
2161
|
+
let l = () => {
|
|
1607
2162
|
if (t.current) {
|
|
1608
|
-
let
|
|
2163
|
+
let c = hn(t.current, {
|
|
1609
2164
|
tabbable: !0
|
|
1610
2165
|
});
|
|
1611
|
-
i(!!
|
|
2166
|
+
i(!!c.nextNode());
|
|
1612
2167
|
}
|
|
1613
2168
|
};
|
|
1614
|
-
|
|
1615
|
-
let
|
|
1616
|
-
return
|
|
2169
|
+
l();
|
|
2170
|
+
let s = new MutationObserver(l);
|
|
2171
|
+
return s.observe(t.current, {
|
|
1617
2172
|
subtree: !0,
|
|
1618
2173
|
childList: !0,
|
|
1619
2174
|
attributes: !0,
|
|
@@ -1622,12 +2177,80 @@ function fn(t, e) {
|
|
|
1622
2177
|
"disabled"
|
|
1623
2178
|
]
|
|
1624
2179
|
}), () => {
|
|
1625
|
-
|
|
2180
|
+
s.disconnect();
|
|
1626
2181
|
};
|
|
1627
2182
|
}
|
|
1628
|
-
}),
|
|
2183
|
+
}), n ? !1 : r;
|
|
2184
|
+
}
|
|
2185
|
+
function yn(t) {
|
|
2186
|
+
let e = ai(R(t));
|
|
2187
|
+
e !== t && (e && si(e, t), t && gn(t, e));
|
|
2188
|
+
}
|
|
2189
|
+
function si(t, e) {
|
|
2190
|
+
t.dispatchEvent(new FocusEvent("blur", {
|
|
2191
|
+
relatedTarget: e
|
|
2192
|
+
})), t.dispatchEvent(new FocusEvent("focusout", {
|
|
2193
|
+
bubbles: !0,
|
|
2194
|
+
relatedTarget: e
|
|
2195
|
+
}));
|
|
2196
|
+
}
|
|
2197
|
+
function gn(t, e) {
|
|
2198
|
+
t.dispatchEvent(new FocusEvent("focus", {
|
|
2199
|
+
relatedTarget: e
|
|
2200
|
+
})), t.dispatchEvent(new FocusEvent("focusin", {
|
|
2201
|
+
bubbles: !0,
|
|
2202
|
+
relatedTarget: e
|
|
2203
|
+
}));
|
|
2204
|
+
}
|
|
2205
|
+
function ai(t) {
|
|
2206
|
+
let e = se(t), n = e?.getAttribute("aria-activedescendant");
|
|
2207
|
+
return n && t.getElementById(n) || e;
|
|
2208
|
+
}
|
|
2209
|
+
function nt(t) {
|
|
2210
|
+
return br() ? t.altKey : t.ctrlKey;
|
|
2211
|
+
}
|
|
2212
|
+
function Xe(t, e) {
|
|
2213
|
+
var n, r;
|
|
2214
|
+
let i = `[data-key="${CSS.escape(String(e))}"]`, l = (n = t.current) === null || n === void 0 ? void 0 : n.dataset.collection;
|
|
2215
|
+
return l && (i = `[data-collection="${CSS.escape(l)}"]${i}`), (r = t.current) === null || r === void 0 ? void 0 : r.querySelector(i);
|
|
2216
|
+
}
|
|
2217
|
+
const $n = /* @__PURE__ */ new WeakMap();
|
|
2218
|
+
function ci(t) {
|
|
2219
|
+
let e = Oe();
|
|
2220
|
+
return $n.set(t, e), e;
|
|
2221
|
+
}
|
|
2222
|
+
function ui(t) {
|
|
2223
|
+
return $n.get(t);
|
|
1629
2224
|
}
|
|
1630
|
-
const
|
|
2225
|
+
const di = 1e3;
|
|
2226
|
+
function fi(t) {
|
|
2227
|
+
let { keyboardDelegate: e, selectionManager: n, onTypeSelect: r } = t, i = k({
|
|
2228
|
+
search: "",
|
|
2229
|
+
timeout: void 0
|
|
2230
|
+
}).current, l = (s) => {
|
|
2231
|
+
let c = pi(s.key);
|
|
2232
|
+
if (!(!c || s.ctrlKey || s.metaKey || !P(s.currentTarget, E(s)) || i.search.length === 0 && c === " ")) {
|
|
2233
|
+
if (c === " " && i.search.trim().length > 0 && (s.preventDefault(), "continuePropagation" in s || s.stopPropagation()), i.search += c, e.getKeyForSearch != null) {
|
|
2234
|
+
let u = e.getKeyForSearch(i.search, n.focusedKey);
|
|
2235
|
+
u == null && (u = e.getKeyForSearch(i.search)), u != null && (n.setFocusedKey(u), r && r(u));
|
|
2236
|
+
}
|
|
2237
|
+
clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
|
2238
|
+
i.search = "";
|
|
2239
|
+
}, di);
|
|
2240
|
+
}
|
|
2241
|
+
};
|
|
2242
|
+
return {
|
|
2243
|
+
typeSelectProps: {
|
|
2244
|
+
// Using a capturing listener to catch the keydown event before
|
|
2245
|
+
// other hooks in order to handle the Spacebar event.
|
|
2246
|
+
onKeyDownCapture: e.getKeyForSearch ? l : void 0
|
|
2247
|
+
}
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2250
|
+
function pi(t) {
|
|
2251
|
+
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
|
2252
|
+
}
|
|
2253
|
+
const vi = /* @__PURE__ */ new Set([
|
|
1631
2254
|
"Arab",
|
|
1632
2255
|
"Syrc",
|
|
1633
2256
|
"Samr",
|
|
@@ -1638,7 +2261,7 @@ const pn = /* @__PURE__ */ new Set([
|
|
|
1638
2261
|
"Adlm",
|
|
1639
2262
|
"Rohg",
|
|
1640
2263
|
"Hebr"
|
|
1641
|
-
]),
|
|
2264
|
+
]), bi = /* @__PURE__ */ new Set([
|
|
1642
2265
|
"ae",
|
|
1643
2266
|
"ar",
|
|
1644
2267
|
"arc",
|
|
@@ -1659,18 +2282,18 @@ const pn = /* @__PURE__ */ new Set([
|
|
|
1659
2282
|
"ur",
|
|
1660
2283
|
"yi"
|
|
1661
2284
|
]);
|
|
1662
|
-
function
|
|
2285
|
+
function hi(t) {
|
|
1663
2286
|
if (Intl.Locale) {
|
|
1664
|
-
let
|
|
1665
|
-
if (
|
|
1666
|
-
if (
|
|
2287
|
+
let n = new Intl.Locale(t).maximize(), r = typeof n.getTextInfo == "function" ? n.getTextInfo() : n.textInfo;
|
|
2288
|
+
if (r) return r.direction === "rtl";
|
|
2289
|
+
if (n.script) return vi.has(n.script);
|
|
1667
2290
|
}
|
|
1668
2291
|
let e = t.split("-")[0];
|
|
1669
|
-
return
|
|
2292
|
+
return bi.has(e);
|
|
1670
2293
|
}
|
|
1671
|
-
const
|
|
1672
|
-
function
|
|
1673
|
-
let t = typeof window < "u" && window[
|
|
2294
|
+
const mn = Symbol.for("react-aria.i18n.locale");
|
|
2295
|
+
function wn() {
|
|
2296
|
+
let t = typeof window < "u" && window[mn] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
1674
2297
|
try {
|
|
1675
2298
|
Intl.DateTimeFormat.supportedLocalesOf([
|
|
1676
2299
|
t
|
|
@@ -1680,336 +2303,415 @@ function Ht() {
|
|
|
1680
2303
|
}
|
|
1681
2304
|
return {
|
|
1682
2305
|
locale: t,
|
|
1683
|
-
direction:
|
|
2306
|
+
direction: hi(t) ? "rtl" : "ltr"
|
|
1684
2307
|
};
|
|
1685
2308
|
}
|
|
1686
|
-
let
|
|
1687
|
-
function
|
|
1688
|
-
|
|
1689
|
-
for (let t of
|
|
2309
|
+
let rt = wn(), Ee = /* @__PURE__ */ new Set();
|
|
2310
|
+
function At() {
|
|
2311
|
+
rt = wn();
|
|
2312
|
+
for (let t of Ee) t(rt);
|
|
1690
2313
|
}
|
|
1691
|
-
function
|
|
1692
|
-
let t =
|
|
1693
|
-
return
|
|
1694
|
-
|
|
2314
|
+
function yi() {
|
|
2315
|
+
let t = Gt(), [e, n] = te(rt);
|
|
2316
|
+
return V(() => (Ee.size === 0 && window.addEventListener("languagechange", At), Ee.add(n), () => {
|
|
2317
|
+
Ee.delete(n), Ee.size === 0 && window.removeEventListener("languagechange", At);
|
|
1695
2318
|
}), []), t ? {
|
|
1696
|
-
locale: "en-US",
|
|
2319
|
+
locale: typeof window < "u" && window[mn] || "en-US",
|
|
1697
2320
|
direction: "ltr"
|
|
1698
2321
|
} : e;
|
|
1699
2322
|
}
|
|
1700
|
-
const
|
|
1701
|
-
function
|
|
1702
|
-
let t =
|
|
1703
|
-
return
|
|
1704
|
-
}
|
|
1705
|
-
function $
|
|
1706
|
-
let { selectionManager: e, keyboardDelegate:
|
|
1707
|
-
if (
|
|
1708
|
-
const
|
|
1709
|
-
if (
|
|
1710
|
-
if (e.isLink(
|
|
1711
|
-
|
|
1712
|
-
e.setFocusedKey(
|
|
2323
|
+
const gi = /* @__PURE__ */ Y.createContext(null);
|
|
2324
|
+
function Tn() {
|
|
2325
|
+
let t = yi();
|
|
2326
|
+
return ye(gi) || t;
|
|
2327
|
+
}
|
|
2328
|
+
function $i(t) {
|
|
2329
|
+
let { selectionManager: e, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: l = !1, disallowEmptySelection: s = !1, disallowSelectAll: c = !1, escapeKeyBehavior: u = "clearSelection", selectOnFocus: p = e.selectionBehavior === "replace", disallowTypeAhead: d = !1, shouldUseVirtualFocus: b, allowsTabNavigation: $ = !1, scrollRef: m = r, linkBehavior: x = "action" } = t, { direction: _ } = Tn(), D = st(), K = (v) => {
|
|
2330
|
+
if (v.altKey && v.key === "Tab" && v.preventDefault(), !r.current || !P(r.current, E(v))) return;
|
|
2331
|
+
const w = (y, Z) => {
|
|
2332
|
+
if (y != null) {
|
|
2333
|
+
if (e.isLink(y) && x === "selection" && p && !nt(v)) {
|
|
2334
|
+
Ut(() => {
|
|
2335
|
+
e.setFocusedKey(y, Z);
|
|
1713
2336
|
});
|
|
1714
|
-
let
|
|
1715
|
-
|
|
2337
|
+
let Q = Xe(r, y), we = e.getItemProps(y);
|
|
2338
|
+
Q && D.open(Q, v, we.href, we.routerOptions);
|
|
1716
2339
|
return;
|
|
1717
2340
|
}
|
|
1718
|
-
if (e.setFocusedKey(
|
|
1719
|
-
|
|
2341
|
+
if (e.setFocusedKey(y, Z), e.isLink(y) && x === "override") return;
|
|
2342
|
+
v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && !nt(v) && e.replaceSelection(y);
|
|
1720
2343
|
}
|
|
1721
2344
|
};
|
|
1722
|
-
switch (
|
|
2345
|
+
switch (v.key) {
|
|
1723
2346
|
case "ArrowDown":
|
|
1724
|
-
if (
|
|
1725
|
-
var
|
|
1726
|
-
let
|
|
1727
|
-
|
|
2347
|
+
if (n.getKeyBelow) {
|
|
2348
|
+
var N, L, C;
|
|
2349
|
+
let y = e.focusedKey != null ? (N = n.getKeyBelow) === null || N === void 0 ? void 0 : N.call(n, e.focusedKey) : (L = n.getFirstKey) === null || L === void 0 ? void 0 : L.call(n);
|
|
2350
|
+
y == null && l && (y = (C = n.getFirstKey) === null || C === void 0 ? void 0 : C.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y));
|
|
1728
2351
|
}
|
|
1729
2352
|
break;
|
|
1730
2353
|
case "ArrowUp":
|
|
1731
|
-
if (
|
|
1732
|
-
var
|
|
1733
|
-
let
|
|
1734
|
-
|
|
2354
|
+
if (n.getKeyAbove) {
|
|
2355
|
+
var z, o, f;
|
|
2356
|
+
let y = e.focusedKey != null ? (z = n.getKeyAbove) === null || z === void 0 ? void 0 : z.call(n, e.focusedKey) : (o = n.getLastKey) === null || o === void 0 ? void 0 : o.call(n);
|
|
2357
|
+
y == null && l && (y = (f = n.getLastKey) === null || f === void 0 ? void 0 : f.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y));
|
|
1735
2358
|
}
|
|
1736
2359
|
break;
|
|
1737
2360
|
case "ArrowLeft":
|
|
1738
|
-
if (
|
|
1739
|
-
var
|
|
1740
|
-
let
|
|
1741
|
-
|
|
2361
|
+
if (n.getKeyLeftOf) {
|
|
2362
|
+
var a, h, g;
|
|
2363
|
+
let y = e.focusedKey != null ? (a = n.getKeyLeftOf) === null || a === void 0 ? void 0 : a.call(n, e.focusedKey) : null;
|
|
2364
|
+
y == null && l && (y = _ === "rtl" ? (h = n.getFirstKey) === null || h === void 0 ? void 0 : h.call(n, e.focusedKey) : (g = n.getLastKey) === null || g === void 0 ? void 0 : g.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y, _ === "rtl" ? "first" : "last"));
|
|
1742
2365
|
}
|
|
1743
2366
|
break;
|
|
1744
2367
|
case "ArrowRight":
|
|
1745
|
-
if (
|
|
1746
|
-
var
|
|
1747
|
-
let
|
|
1748
|
-
|
|
2368
|
+
if (n.getKeyRightOf) {
|
|
2369
|
+
var S, U, q;
|
|
2370
|
+
let y = e.focusedKey != null ? (S = n.getKeyRightOf) === null || S === void 0 ? void 0 : S.call(n, e.focusedKey) : null;
|
|
2371
|
+
y == null && l && (y = _ === "rtl" ? (U = n.getLastKey) === null || U === void 0 ? void 0 : U.call(n, e.focusedKey) : (q = n.getFirstKey) === null || q === void 0 ? void 0 : q.call(n, e.focusedKey)), y != null && (v.preventDefault(), w(y, _ === "rtl" ? "last" : "first"));
|
|
1749
2372
|
}
|
|
1750
2373
|
break;
|
|
1751
2374
|
case "Home":
|
|
1752
|
-
if (
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
2375
|
+
if (n.getFirstKey) {
|
|
2376
|
+
if (e.focusedKey === null && v.shiftKey) return;
|
|
2377
|
+
v.preventDefault();
|
|
2378
|
+
let y = n.getFirstKey(e.focusedKey, ge(v));
|
|
2379
|
+
e.setFocusedKey(y), y != null && (ge(v) && v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && e.replaceSelection(y));
|
|
1756
2380
|
}
|
|
1757
2381
|
break;
|
|
1758
2382
|
case "End":
|
|
1759
|
-
if (
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
2383
|
+
if (n.getLastKey) {
|
|
2384
|
+
if (e.focusedKey === null && v.shiftKey) return;
|
|
2385
|
+
v.preventDefault();
|
|
2386
|
+
let y = n.getLastKey(e.focusedKey, ge(v));
|
|
2387
|
+
e.setFocusedKey(y), y != null && (ge(v) && v.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(y) : p && e.replaceSelection(y));
|
|
1763
2388
|
}
|
|
1764
2389
|
break;
|
|
1765
2390
|
case "PageDown":
|
|
1766
|
-
if (
|
|
1767
|
-
let
|
|
1768
|
-
|
|
2391
|
+
if (n.getKeyPageBelow && e.focusedKey != null) {
|
|
2392
|
+
let y = n.getKeyPageBelow(e.focusedKey);
|
|
2393
|
+
y != null && (v.preventDefault(), w(y));
|
|
1769
2394
|
}
|
|
1770
2395
|
break;
|
|
1771
2396
|
case "PageUp":
|
|
1772
|
-
if (
|
|
1773
|
-
let
|
|
1774
|
-
|
|
2397
|
+
if (n.getKeyPageAbove && e.focusedKey != null) {
|
|
2398
|
+
let y = n.getKeyPageAbove(e.focusedKey);
|
|
2399
|
+
y != null && (v.preventDefault(), w(y));
|
|
1775
2400
|
}
|
|
1776
2401
|
break;
|
|
1777
2402
|
case "a":
|
|
1778
|
-
|
|
2403
|
+
ge(v) && e.selectionMode === "multiple" && c !== !0 && (v.preventDefault(), e.selectAll());
|
|
1779
2404
|
break;
|
|
1780
2405
|
case "Escape":
|
|
1781
|
-
!
|
|
2406
|
+
u === "clearSelection" && !s && e.selectedKeys.size !== 0 && (v.stopPropagation(), v.preventDefault(), e.clearSelection());
|
|
1782
2407
|
break;
|
|
1783
2408
|
case "Tab":
|
|
1784
|
-
if (
|
|
1785
|
-
if (
|
|
2409
|
+
if (!$) {
|
|
2410
|
+
if (v.shiftKey) r.current.focus();
|
|
1786
2411
|
else {
|
|
1787
|
-
let
|
|
2412
|
+
let y = hn(r.current, {
|
|
1788
2413
|
tabbable: !0
|
|
1789
|
-
}),
|
|
2414
|
+
}), Z, Q;
|
|
1790
2415
|
do
|
|
1791
|
-
|
|
1792
|
-
while (
|
|
1793
|
-
|
|
2416
|
+
Q = y.lastChild(), Q && (Z = Q);
|
|
2417
|
+
while (Q);
|
|
2418
|
+
let we = se();
|
|
2419
|
+
Z && (!gt(Z) || we && !rn(we)) && ce(Z);
|
|
1794
2420
|
}
|
|
1795
2421
|
break;
|
|
1796
2422
|
}
|
|
1797
2423
|
}
|
|
1798
|
-
},
|
|
2424
|
+
}, T = k({
|
|
1799
2425
|
top: 0,
|
|
1800
2426
|
left: 0
|
|
1801
2427
|
});
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
2428
|
+
_e(m, "scroll", () => {
|
|
2429
|
+
var v, w, N, L;
|
|
2430
|
+
T.current = {
|
|
2431
|
+
top: (N = (v = m.current) === null || v === void 0 ? void 0 : v.scrollTop) !== null && N !== void 0 ? N : 0,
|
|
2432
|
+
left: (L = (w = m.current) === null || w === void 0 ? void 0 : w.scrollLeft) !== null && L !== void 0 ? L : 0
|
|
1806
2433
|
};
|
|
1807
2434
|
});
|
|
1808
|
-
let
|
|
2435
|
+
let M = (v) => {
|
|
1809
2436
|
if (e.isFocused) {
|
|
1810
|
-
|
|
2437
|
+
P(v.currentTarget, E(v)) || e.setFocused(!1);
|
|
1811
2438
|
return;
|
|
1812
2439
|
}
|
|
1813
|
-
if (
|
|
2440
|
+
if (P(v.currentTarget, E(v))) {
|
|
1814
2441
|
if (e.setFocused(!0), e.focusedKey == null) {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
2442
|
+
var w, N;
|
|
2443
|
+
let z = (f) => {
|
|
2444
|
+
f != null && (e.setFocusedKey(f), p && !e.isSelected(f) && e.replaceSelection(f));
|
|
2445
|
+
}, o = v.relatedTarget;
|
|
2446
|
+
var L, C;
|
|
2447
|
+
o && v.currentTarget.compareDocumentPosition(o) & Node.DOCUMENT_POSITION_FOLLOWING ? z((L = e.lastSelectedKey) !== null && L !== void 0 ? L : (w = n.getLastKey) === null || w === void 0 ? void 0 : w.call(n)) : z((C = e.firstSelectedKey) !== null && C !== void 0 ? C : (N = n.getFirstKey) === null || N === void 0 ? void 0 : N.call(n));
|
|
2448
|
+
} else m.current && (m.current.scrollTop = T.current.top, m.current.scrollLeft = T.current.left);
|
|
2449
|
+
if (e.focusedKey != null && m.current) {
|
|
2450
|
+
let z = Xe(r, e.focusedKey);
|
|
2451
|
+
z instanceof HTMLElement && (!gt(z) && !b && ce(z), tt() === "keyboard" && Et(z, {
|
|
2452
|
+
containingElement: r.current
|
|
1825
2453
|
}));
|
|
1826
2454
|
}
|
|
1827
2455
|
}
|
|
1828
|
-
},
|
|
1829
|
-
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
2456
|
+
}, I = (v) => {
|
|
2457
|
+
P(v.currentTarget, v.relatedTarget) || e.setFocused(!1);
|
|
2458
|
+
}, F = k(!1);
|
|
2459
|
+
_e(r, _r, b ? (v) => {
|
|
2460
|
+
let { detail: w } = v;
|
|
2461
|
+
v.stopPropagation(), e.setFocused(!0), w?.focusStrategy === "first" && (F.current = !0);
|
|
2462
|
+
} : void 0), Tt(() => {
|
|
2463
|
+
if (F.current) {
|
|
2464
|
+
var v, w;
|
|
2465
|
+
let N = (w = (v = n.getFirstKey) === null || v === void 0 ? void 0 : v.call(n)) !== null && w !== void 0 ? w : null;
|
|
2466
|
+
if (N == null) {
|
|
2467
|
+
let L = se();
|
|
2468
|
+
yn(r.current), gn(L, null), e.collection.size > 0 && (F.current = !1);
|
|
2469
|
+
} else
|
|
2470
|
+
e.setFocusedKey(N), F.current = !1;
|
|
2471
|
+
}
|
|
2472
|
+
}, [
|
|
2473
|
+
e.collection
|
|
2474
|
+
]), Tt(() => {
|
|
2475
|
+
e.collection.size > 0 && (F.current = !1);
|
|
2476
|
+
}, [
|
|
2477
|
+
e.focusedKey
|
|
2478
|
+
]), _e(r, xr, b ? (v) => {
|
|
2479
|
+
var w;
|
|
2480
|
+
v.stopPropagation(), e.setFocused(!1), !((w = v.detail) === null || w === void 0) && w.clearFocusKey && e.setFocusedKey(null);
|
|
2481
|
+
} : void 0);
|
|
2482
|
+
const J = k(i), B = k(!1);
|
|
2483
|
+
V(() => {
|
|
2484
|
+
if (J.current) {
|
|
2485
|
+
var v, w;
|
|
2486
|
+
let C = null;
|
|
2487
|
+
var N;
|
|
2488
|
+
i === "first" && (C = (N = (v = n.getFirstKey) === null || v === void 0 ? void 0 : v.call(n)) !== null && N !== void 0 ? N : null);
|
|
2489
|
+
var L;
|
|
2490
|
+
i === "last" && (C = (L = (w = n.getLastKey) === null || w === void 0 ? void 0 : w.call(n)) !== null && L !== void 0 ? L : null);
|
|
2491
|
+
let z = e.selectedKeys;
|
|
2492
|
+
if (z.size) {
|
|
2493
|
+
for (let o of z) if (e.canSelectItem(o)) {
|
|
2494
|
+
C = o;
|
|
1840
2495
|
break;
|
|
1841
2496
|
}
|
|
1842
2497
|
}
|
|
1843
|
-
e.setFocused(!0), e.setFocusedKey(
|
|
2498
|
+
e.setFocused(!0), e.setFocusedKey(C), C == null && !b && r.current && Ae(r.current), e.collection.size > 0 && (J.current = !1, B.current = !0);
|
|
1844
2499
|
}
|
|
1845
|
-
}
|
|
1846
|
-
let
|
|
1847
|
-
|
|
1848
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !==
|
|
1849
|
-
let
|
|
1850
|
-
if (!
|
|
2500
|
+
});
|
|
2501
|
+
let X = k(e.focusedKey), O = k(null);
|
|
2502
|
+
V(() => {
|
|
2503
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== X.current || B.current) && m.current && r.current) {
|
|
2504
|
+
let v = tt(), w = Xe(r, e.focusedKey);
|
|
2505
|
+
if (!(w instanceof HTMLElement))
|
|
1851
2506
|
return;
|
|
1852
|
-
(
|
|
1853
|
-
|
|
2507
|
+
(v === "keyboard" || B.current) && (O.current && cancelAnimationFrame(O.current), O.current = requestAnimationFrame(() => {
|
|
2508
|
+
m.current && (Je(m.current, w), v !== "virtual" && Et(w, {
|
|
2509
|
+
containingElement: r.current
|
|
2510
|
+
}));
|
|
1854
2511
|
}));
|
|
1855
2512
|
}
|
|
1856
|
-
!
|
|
1857
|
-
}),
|
|
1858
|
-
|
|
2513
|
+
!b && e.isFocused && e.focusedKey == null && X.current != null && r.current && Ae(r.current), X.current = e.focusedKey, B.current = !1;
|
|
2514
|
+
}), V(() => () => {
|
|
2515
|
+
O.current && cancelAnimationFrame(O.current);
|
|
2516
|
+
}, []), _e(r, "react-aria-focus-scope-restore", (v) => {
|
|
2517
|
+
v.preventDefault(), e.setFocused(!0);
|
|
1859
2518
|
});
|
|
1860
|
-
let
|
|
1861
|
-
onKeyDown:
|
|
1862
|
-
onFocus:
|
|
1863
|
-
onBlur:
|
|
1864
|
-
onMouseDown(
|
|
1865
|
-
m.current ===
|
|
2519
|
+
let j = {
|
|
2520
|
+
onKeyDown: K,
|
|
2521
|
+
onFocus: M,
|
|
2522
|
+
onBlur: I,
|
|
2523
|
+
onMouseDown(v) {
|
|
2524
|
+
m.current === E(v) && v.preventDefault();
|
|
1866
2525
|
}
|
|
1867
|
-
}, { typeSelectProps:
|
|
1868
|
-
keyboardDelegate:
|
|
2526
|
+
}, { typeSelectProps: G } = fi({
|
|
2527
|
+
keyboardDelegate: n,
|
|
1869
2528
|
selectionManager: e
|
|
1870
2529
|
});
|
|
1871
|
-
|
|
1872
|
-
let
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
2530
|
+
d || (j = ne(G, j));
|
|
2531
|
+
let W;
|
|
2532
|
+
b || (W = e.focusedKey == null ? 0 : -1);
|
|
2533
|
+
let A = ci(e.collection);
|
|
2534
|
+
return {
|
|
2535
|
+
collectionProps: ne(j, {
|
|
2536
|
+
tabIndex: W,
|
|
2537
|
+
"data-collection": A
|
|
2538
|
+
})
|
|
1878
2539
|
};
|
|
1879
2540
|
}
|
|
1880
|
-
function
|
|
1881
|
-
let {
|
|
1882
|
-
|
|
2541
|
+
function mi(t) {
|
|
2542
|
+
let { id: e, selectionManager: n, key: r, ref: i, shouldSelectOnPressUp: l, shouldUseVirtualFocus: s, focus: c, isDisabled: u, onAction: p, allowsDifferentPressOrigin: d, linkBehavior: b = "action" } = t, $ = st();
|
|
2543
|
+
e = Oe(e);
|
|
2544
|
+
let m = (o) => {
|
|
2545
|
+
if (o.pointerType === "keyboard" && nt(o)) n.toggleSelection(r);
|
|
1883
2546
|
else {
|
|
1884
|
-
if (
|
|
1885
|
-
if (
|
|
1886
|
-
if (
|
|
1887
|
-
let
|
|
1888
|
-
|
|
2547
|
+
if (n.selectionMode === "none") return;
|
|
2548
|
+
if (n.isLink(r)) {
|
|
2549
|
+
if (b === "selection" && i.current) {
|
|
2550
|
+
let f = n.getItemProps(r);
|
|
2551
|
+
$.open(i.current, o, f.href, f.routerOptions), n.setSelectedKeys(n.selectedKeys);
|
|
1889
2552
|
return;
|
|
1890
|
-
} else if (
|
|
2553
|
+
} else if (b === "override" || b === "none") return;
|
|
1891
2554
|
}
|
|
1892
|
-
|
|
2555
|
+
n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : o && o.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || o && (ge(o) || o.pointerType === "touch" || o.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
|
|
1893
2556
|
}
|
|
1894
2557
|
};
|
|
1895
|
-
|
|
1896
|
-
r ===
|
|
2558
|
+
V(() => {
|
|
2559
|
+
r === n.focusedKey && n.isFocused && (s ? yn(i.current) : c ? c() : se() !== i.current && i.current && Ae(i.current));
|
|
1897
2560
|
}, [
|
|
1898
|
-
|
|
2561
|
+
i,
|
|
1899
2562
|
r,
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2563
|
+
n.focusedKey,
|
|
2564
|
+
n.childFocusStrategy,
|
|
2565
|
+
n.isFocused,
|
|
1903
2566
|
s
|
|
1904
|
-
]),
|
|
1905
|
-
let
|
|
1906
|
-
!s && !
|
|
1907
|
-
tabIndex: r ===
|
|
1908
|
-
onFocus(
|
|
1909
|
-
|
|
2567
|
+
]), u = u || n.isDisabled(r);
|
|
2568
|
+
let x = {};
|
|
2569
|
+
!s && !u ? x = {
|
|
2570
|
+
tabIndex: r === n.focusedKey ? 0 : -1,
|
|
2571
|
+
onFocus(o) {
|
|
2572
|
+
E(o) === i.current && n.setFocusedKey(r);
|
|
1910
2573
|
}
|
|
1911
|
-
} :
|
|
1912
|
-
|
|
1913
|
-
})
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2574
|
+
} : u && (x.onMouseDown = (o) => {
|
|
2575
|
+
o.preventDefault();
|
|
2576
|
+
}), V(() => {
|
|
2577
|
+
u && n.focusedKey === r && n.setFocusedKey(null);
|
|
2578
|
+
}, [
|
|
2579
|
+
n,
|
|
2580
|
+
u,
|
|
2581
|
+
r
|
|
2582
|
+
]);
|
|
2583
|
+
let _ = n.isLink(r) && b === "override", D = p && t.UNSTABLE_itemBehavior === "action", K = n.isLink(r) && b !== "selection" && b !== "none", T = !u && n.canSelectItem(r) && !_ && !D, M = (p || K) && !u, I = M && (n.selectionBehavior === "replace" ? !T : !T || n.isEmpty), F = M && T && n.selectionBehavior === "replace", J = I || F, B = k(null), X = J && T, O = k(!1), j = k(!1), G = n.getItemProps(r), W = (o) => {
|
|
2584
|
+
if (p) {
|
|
2585
|
+
var f;
|
|
2586
|
+
p(), (f = i.current) === null || f === void 0 || f.dispatchEvent(new CustomEvent("react-aria-item-action", {
|
|
2587
|
+
bubbles: !0
|
|
2588
|
+
}));
|
|
1918
2589
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
}) :
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2590
|
+
K && i.current && $.open(i.current, o, G.href, G.routerOptions);
|
|
2591
|
+
}, A = {
|
|
2592
|
+
ref: i
|
|
2593
|
+
};
|
|
2594
|
+
if (l ? (A.onPressStart = (o) => {
|
|
2595
|
+
B.current = o.pointerType, O.current = X, o.pointerType === "keyboard" && (!J || Rt(o.key)) && m(o);
|
|
2596
|
+
}, d ? (A.onPressUp = I ? void 0 : (o) => {
|
|
2597
|
+
o.pointerType === "mouse" && T && m(o);
|
|
2598
|
+
}, A.onPress = I ? W : (o) => {
|
|
2599
|
+
o.pointerType !== "keyboard" && o.pointerType !== "mouse" && T && m(o);
|
|
2600
|
+
}) : A.onPress = (o) => {
|
|
2601
|
+
if (I || F && o.pointerType !== "mouse") {
|
|
2602
|
+
if (o.pointerType === "keyboard" && !Ot(o.key)) return;
|
|
2603
|
+
W(o);
|
|
2604
|
+
} else o.pointerType !== "keyboard" && T && m(o);
|
|
2605
|
+
}) : (A.onPressStart = (o) => {
|
|
2606
|
+
B.current = o.pointerType, O.current = X, j.current = I, T && (o.pointerType === "mouse" && !I || o.pointerType === "keyboard" && (!M || Rt(o.key))) && m(o);
|
|
2607
|
+
}, A.onPress = (o) => {
|
|
2608
|
+
(o.pointerType === "touch" || o.pointerType === "pen" || o.pointerType === "virtual" || o.pointerType === "keyboard" && J && Ot(o.key) || o.pointerType === "mouse" && j.current) && (J ? W(o) : T && m(o));
|
|
2609
|
+
}), x["data-collection"] = ui(n.collection), x["data-key"] = r, A.preventFocusOnPress = s, s && (A = ne(A, {
|
|
2610
|
+
onPressStart(o) {
|
|
2611
|
+
o.pointerType !== "touch" && (n.setFocused(!0), n.setFocusedKey(r));
|
|
2612
|
+
},
|
|
2613
|
+
onPress(o) {
|
|
2614
|
+
o.pointerType === "touch" && (n.setFocused(!0), n.setFocusedKey(r));
|
|
2615
|
+
}
|
|
2616
|
+
})), G)
|
|
2617
|
+
for (let o of [
|
|
2618
|
+
"onPressStart",
|
|
2619
|
+
"onPressEnd",
|
|
2620
|
+
"onPressChange",
|
|
2621
|
+
"onPress",
|
|
2622
|
+
"onPressUp",
|
|
2623
|
+
"onClick"
|
|
2624
|
+
]) G[o] && (A[o] = ot(A[o], G[o]));
|
|
2625
|
+
let { pressProps: v, isPressed: w } = cn(A), N = F ? (o) => {
|
|
2626
|
+
B.current === "mouse" && (o.stopPropagation(), o.preventDefault(), W(o));
|
|
2627
|
+
} : void 0, { longPressProps: L } = ri({
|
|
2628
|
+
isDisabled: !X,
|
|
2629
|
+
onLongPress(o) {
|
|
2630
|
+
o.pointerType === "touch" && (m(o), n.setSelectionBehavior("toggle"));
|
|
1940
2631
|
}
|
|
1941
|
-
}),
|
|
1942
|
-
|
|
1943
|
-
},
|
|
1944
|
-
|
|
2632
|
+
}), C = (o) => {
|
|
2633
|
+
B.current === "touch" && O.current && o.preventDefault();
|
|
2634
|
+
}, z = b !== "none" && n.isLink(r) ? (o) => {
|
|
2635
|
+
ue.isOpening || o.preventDefault();
|
|
1945
2636
|
} : void 0;
|
|
1946
2637
|
return {
|
|
1947
|
-
itemProps:
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2638
|
+
itemProps: ne(
|
|
2639
|
+
x,
|
|
2640
|
+
T || I || s && !u ? v : {},
|
|
2641
|
+
X ? L : {},
|
|
2642
|
+
{
|
|
2643
|
+
onDoubleClick: N,
|
|
2644
|
+
onDragStartCapture: C,
|
|
2645
|
+
onClick: z,
|
|
2646
|
+
id: e
|
|
2647
|
+
},
|
|
2648
|
+
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
2649
|
+
s ? {
|
|
2650
|
+
onMouseDown: (o) => o.preventDefault()
|
|
2651
|
+
} : void 0
|
|
2652
|
+
),
|
|
2653
|
+
isPressed: w,
|
|
2654
|
+
isSelected: n.isSelected(r),
|
|
2655
|
+
isFocused: n.isFocused && n.focusedKey === r,
|
|
2656
|
+
isDisabled: u,
|
|
2657
|
+
allowsSelection: T,
|
|
2658
|
+
hasAction: J
|
|
1958
2659
|
};
|
|
1959
2660
|
}
|
|
1960
|
-
function
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
isDisabled: h,
|
|
1974
|
-
shouldSelectOnPressUp: s,
|
|
2661
|
+
function Ot(t) {
|
|
2662
|
+
return t === "Enter";
|
|
2663
|
+
}
|
|
2664
|
+
function Rt(t) {
|
|
2665
|
+
return t === " ";
|
|
2666
|
+
}
|
|
2667
|
+
function wi(t, e, n) {
|
|
2668
|
+
let { key: r, isDisabled: i, shouldSelectOnPressUp: l } = t, { selectionManager: s, selectedKey: c } = e, u = r === c, p = i || e.isDisabled || e.selectionManager.isDisabled(r), { itemProps: d, isPressed: b } = mi({
|
|
2669
|
+
selectionManager: s,
|
|
2670
|
+
key: r,
|
|
2671
|
+
ref: n,
|
|
2672
|
+
isDisabled: p,
|
|
2673
|
+
shouldSelectOnPressUp: l,
|
|
1975
2674
|
linkBehavior: "selection"
|
|
1976
|
-
}), $ =
|
|
2675
|
+
}), $ = Ce(e, r, "tab"), m = Ce(e, r, "tabpanel"), { tabIndex: x } = d, _ = e.collection.getItem(r), D = ur(_?.props, {
|
|
1977
2676
|
labelable: !0
|
|
1978
2677
|
});
|
|
1979
|
-
delete
|
|
1980
|
-
let
|
|
2678
|
+
delete D.id;
|
|
2679
|
+
let K = wr(_?.props), { focusableProps: T } = ti({
|
|
2680
|
+
..._?.props,
|
|
2681
|
+
isDisabled: p
|
|
2682
|
+
}, n);
|
|
1981
2683
|
return {
|
|
1982
|
-
tabProps:
|
|
2684
|
+
tabProps: ne(D, T, K, d, {
|
|
1983
2685
|
id: $,
|
|
1984
|
-
"aria-selected":
|
|
1985
|
-
"aria-disabled":
|
|
1986
|
-
"aria-controls":
|
|
1987
|
-
tabIndex:
|
|
2686
|
+
"aria-selected": u,
|
|
2687
|
+
"aria-disabled": p || void 0,
|
|
2688
|
+
"aria-controls": u ? m : void 0,
|
|
2689
|
+
tabIndex: p ? void 0 : x,
|
|
1988
2690
|
role: "tab"
|
|
1989
2691
|
}),
|
|
1990
|
-
isSelected:
|
|
1991
|
-
isDisabled:
|
|
1992
|
-
isPressed:
|
|
2692
|
+
isSelected: u,
|
|
2693
|
+
isDisabled: p,
|
|
2694
|
+
isPressed: b
|
|
1993
2695
|
};
|
|
1994
2696
|
}
|
|
1995
|
-
function
|
|
1996
|
-
let
|
|
2697
|
+
function Ti(t, e, n) {
|
|
2698
|
+
let r = li(n) ? void 0 : 0;
|
|
1997
2699
|
var i;
|
|
1998
|
-
const
|
|
2700
|
+
const l = Ce(e, (i = t.id) !== null && i !== void 0 ? i : e?.selectedKey, "tabpanel"), s = en({
|
|
1999
2701
|
...t,
|
|
2000
|
-
id:
|
|
2001
|
-
"aria-labelledby":
|
|
2702
|
+
id: l,
|
|
2703
|
+
"aria-labelledby": Ce(e, e?.selectedKey, "tab")
|
|
2002
2704
|
});
|
|
2003
2705
|
return {
|
|
2004
|
-
tabPanelProps:
|
|
2005
|
-
tabIndex:
|
|
2706
|
+
tabPanelProps: ne(s, {
|
|
2707
|
+
tabIndex: r,
|
|
2006
2708
|
role: "tabpanel",
|
|
2007
2709
|
"aria-describedby": t["aria-describedby"],
|
|
2008
2710
|
"aria-details": t["aria-details"]
|
|
2009
2711
|
})
|
|
2010
2712
|
};
|
|
2011
2713
|
}
|
|
2012
|
-
class
|
|
2714
|
+
class Si {
|
|
2013
2715
|
getKeyLeftOf(e) {
|
|
2014
2716
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
|
2015
2717
|
}
|
|
@@ -2017,8 +2719,8 @@ class Tn {
|
|
|
2017
2719
|
return this.flipDirection ? this.getPreviousKey(e) : this.getNextKey(e);
|
|
2018
2720
|
}
|
|
2019
2721
|
isDisabled(e) {
|
|
2020
|
-
var
|
|
2021
|
-
return this.disabledKeys.has(e) || !!(!((
|
|
2722
|
+
var n, r;
|
|
2723
|
+
return this.disabledKeys.has(e) || !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.isDisabled);
|
|
2022
2724
|
}
|
|
2023
2725
|
getFirstKey() {
|
|
2024
2726
|
let e = this.collection.getFirstKey();
|
|
@@ -2035,191 +2737,199 @@ class Tn {
|
|
|
2035
2737
|
return this.tabDirection ? null : this.getNextKey(e);
|
|
2036
2738
|
}
|
|
2037
2739
|
getNextKey(e) {
|
|
2740
|
+
let n = e;
|
|
2038
2741
|
do
|
|
2039
|
-
|
|
2040
|
-
while (this.isDisabled(
|
|
2041
|
-
return
|
|
2742
|
+
n = this.collection.getKeyAfter(n), n == null && (n = this.collection.getFirstKey());
|
|
2743
|
+
while (n != null && this.isDisabled(n));
|
|
2744
|
+
return n;
|
|
2042
2745
|
}
|
|
2043
2746
|
getPreviousKey(e) {
|
|
2747
|
+
let n = e;
|
|
2044
2748
|
do
|
|
2045
|
-
|
|
2046
|
-
while (this.isDisabled(
|
|
2047
|
-
return
|
|
2749
|
+
n = this.collection.getKeyBefore(n), n == null && (n = this.collection.getLastKey());
|
|
2750
|
+
while (n != null && this.isDisabled(n));
|
|
2751
|
+
return n;
|
|
2048
2752
|
}
|
|
2049
|
-
constructor(e,
|
|
2050
|
-
this.collection = e, this.flipDirection =
|
|
2753
|
+
constructor(e, n, r, i = /* @__PURE__ */ new Set()) {
|
|
2754
|
+
this.collection = e, this.flipDirection = n === "rtl" && r === "horizontal", this.disabledKeys = i, this.tabDirection = r === "horizontal";
|
|
2051
2755
|
}
|
|
2052
2756
|
}
|
|
2053
|
-
function
|
|
2054
|
-
let { orientation:
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
]), { collectionProps:
|
|
2060
|
-
ref:
|
|
2061
|
-
selectionManager:
|
|
2062
|
-
keyboardDelegate:
|
|
2757
|
+
function Ei(t, e, n) {
|
|
2758
|
+
let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: l, selectionManager: s, disabledKeys: c } = e, { direction: u } = Tn(), p = ae(() => new Si(l, u, r, c), [
|
|
2759
|
+
l,
|
|
2760
|
+
c,
|
|
2761
|
+
r,
|
|
2762
|
+
u
|
|
2763
|
+
]), { collectionProps: d } = $i({
|
|
2764
|
+
ref: n,
|
|
2765
|
+
selectionManager: s,
|
|
2766
|
+
keyboardDelegate: p,
|
|
2063
2767
|
selectOnFocus: i === "automatic",
|
|
2064
2768
|
disallowEmptySelection: !0,
|
|
2065
|
-
scrollRef:
|
|
2769
|
+
scrollRef: n,
|
|
2066
2770
|
linkBehavior: "selection"
|
|
2067
|
-
}),
|
|
2068
|
-
|
|
2069
|
-
let $ =
|
|
2771
|
+
}), b = Oe();
|
|
2772
|
+
Vt.set(e, b);
|
|
2773
|
+
let $ = en({
|
|
2070
2774
|
...t,
|
|
2071
|
-
id:
|
|
2775
|
+
id: b
|
|
2072
2776
|
});
|
|
2073
2777
|
return {
|
|
2074
2778
|
tabListProps: {
|
|
2075
|
-
...
|
|
2779
|
+
...ne(d, $),
|
|
2076
2780
|
role: "tablist",
|
|
2077
|
-
"aria-orientation":
|
|
2781
|
+
"aria-orientation": r,
|
|
2078
2782
|
tabIndex: void 0
|
|
2079
2783
|
}
|
|
2080
2784
|
};
|
|
2081
2785
|
}
|
|
2082
|
-
function
|
|
2786
|
+
function Pi(t, e, n) {
|
|
2083
2787
|
return e in t ? Object.defineProperty(t, e, {
|
|
2084
|
-
value:
|
|
2788
|
+
value: n,
|
|
2085
2789
|
enumerable: !0,
|
|
2086
2790
|
configurable: !0,
|
|
2087
2791
|
writable: !0
|
|
2088
|
-
}) : t[e] =
|
|
2792
|
+
}) : t[e] = n, t;
|
|
2089
2793
|
}
|
|
2090
|
-
function
|
|
2091
|
-
var
|
|
2794
|
+
function zt(t, e) {
|
|
2795
|
+
var n = Object.keys(t);
|
|
2092
2796
|
if (Object.getOwnPropertySymbols) {
|
|
2093
|
-
var
|
|
2094
|
-
e && (
|
|
2797
|
+
var r = Object.getOwnPropertySymbols(t);
|
|
2798
|
+
e && (r = r.filter(function(i) {
|
|
2095
2799
|
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
2096
|
-
})),
|
|
2800
|
+
})), n.push.apply(n, r);
|
|
2097
2801
|
}
|
|
2098
|
-
return
|
|
2802
|
+
return n;
|
|
2099
2803
|
}
|
|
2100
|
-
function
|
|
2804
|
+
function Bt(t) {
|
|
2101
2805
|
for (var e = 1; e < arguments.length; e++) {
|
|
2102
|
-
var
|
|
2103
|
-
e % 2 ?
|
|
2104
|
-
|
|
2105
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(
|
|
2106
|
-
Object.defineProperty(t,
|
|
2806
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
|
2807
|
+
e % 2 ? zt(Object(n), !0).forEach(function(r) {
|
|
2808
|
+
Pi(t, r, n[r]);
|
|
2809
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : zt(Object(n)).forEach(function(r) {
|
|
2810
|
+
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
2107
2811
|
});
|
|
2108
2812
|
}
|
|
2109
2813
|
return t;
|
|
2110
2814
|
}
|
|
2111
|
-
var
|
|
2112
|
-
for (var
|
|
2815
|
+
var Ki = (t, e, n) => {
|
|
2816
|
+
for (var r of Object.keys(t)) {
|
|
2113
2817
|
var i;
|
|
2114
|
-
if (t[
|
|
2818
|
+
if (t[r] !== ((i = e[r]) !== null && i !== void 0 ? i : n[r]))
|
|
2115
2819
|
return !1;
|
|
2116
2820
|
}
|
|
2117
2821
|
return !0;
|
|
2118
|
-
},
|
|
2119
|
-
var
|
|
2120
|
-
for (var i in
|
|
2121
|
-
var
|
|
2122
|
-
if (
|
|
2123
|
-
var
|
|
2124
|
-
typeof
|
|
2125
|
-
var
|
|
2822
|
+
}, pt = (t) => (e) => {
|
|
2823
|
+
var n = t.defaultClassName, r = Bt(Bt({}, t.defaultVariants), e);
|
|
2824
|
+
for (var i in r) {
|
|
2825
|
+
var l, s = (l = r[i]) !== null && l !== void 0 ? l : t.defaultVariants[i];
|
|
2826
|
+
if (s != null) {
|
|
2827
|
+
var c = s;
|
|
2828
|
+
typeof c == "boolean" && (c = c === !0 ? "true" : "false");
|
|
2829
|
+
var u = (
|
|
2126
2830
|
// @ts-expect-error
|
|
2127
|
-
t.variantClassNames[i][
|
|
2831
|
+
t.variantClassNames[i][c]
|
|
2128
2832
|
);
|
|
2129
|
-
|
|
2833
|
+
u && (n += " " + u);
|
|
2130
2834
|
}
|
|
2131
2835
|
}
|
|
2132
|
-
for (var [
|
|
2133
|
-
|
|
2134
|
-
return
|
|
2135
|
-
},
|
|
2136
|
-
function
|
|
2836
|
+
for (var [p, d] of t.compoundVariants)
|
|
2837
|
+
Ki(p, r, t.defaultVariants) && (n += " " + d);
|
|
2838
|
+
return n;
|
|
2839
|
+
}, ki = pt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzd"]] }), xi = pt({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_42_3__hash_kz6kzzk"]] });
|
|
2840
|
+
function Sn({
|
|
2137
2841
|
context: t,
|
|
2138
2842
|
item: e,
|
|
2139
|
-
state:
|
|
2140
|
-
...
|
|
2843
|
+
state: n,
|
|
2844
|
+
...r
|
|
2141
2845
|
}) {
|
|
2142
|
-
const { key: i } = e,
|
|
2143
|
-
className:
|
|
2846
|
+
const { key: i } = e, l = oe.useRef(null), { tabProps: s } = wi({ key: i }, n, l), c = n.selectedKey === i, u = n.disabledKeys.has(i), p = Nn(e.rendered, (d) => d.type.displayName === "SpsTag" || Ke.isWoodlandComponent(d.type) && Ke.get(d.type).name === "Tag" ? [{
|
|
2847
|
+
className: Wt(d.props.className, xi({ active: c, disabled: u, context: t }))
|
|
2144
2848
|
}] : [{}]);
|
|
2145
|
-
return /* @__PURE__ */
|
|
2849
|
+
return /* @__PURE__ */ oe.createElement(
|
|
2146
2850
|
"div",
|
|
2147
2851
|
{
|
|
2148
|
-
...
|
|
2149
|
-
ref:
|
|
2150
|
-
className:
|
|
2151
|
-
...
|
|
2852
|
+
...s,
|
|
2853
|
+
ref: l,
|
|
2854
|
+
className: ki({ active: c, disabled: u, context: t }),
|
|
2855
|
+
...r
|
|
2152
2856
|
},
|
|
2153
|
-
|
|
2857
|
+
p
|
|
2154
2858
|
);
|
|
2155
2859
|
}
|
|
2156
|
-
|
|
2157
|
-
function
|
|
2860
|
+
Ke.set(Sn, { name: "Tab" });
|
|
2861
|
+
function En({
|
|
2158
2862
|
context: t,
|
|
2159
2863
|
"data-testid": e,
|
|
2160
|
-
state:
|
|
2161
|
-
...
|
|
2864
|
+
state: n,
|
|
2865
|
+
...r
|
|
2162
2866
|
}) {
|
|
2163
|
-
const i =
|
|
2164
|
-
return /* @__PURE__ */
|
|
2165
|
-
|
|
2867
|
+
const i = oe.useRef(null), { tabPanelProps: l } = Ti(r, n, i), s = t === "container" ? Mn : "div";
|
|
2868
|
+
return /* @__PURE__ */ oe.createElement(
|
|
2869
|
+
s,
|
|
2166
2870
|
{
|
|
2167
|
-
...
|
|
2871
|
+
...l,
|
|
2168
2872
|
ref: i,
|
|
2169
2873
|
"data-testid": e
|
|
2170
2874
|
},
|
|
2171
|
-
|
|
2875
|
+
n.selectedItem ? n.selectedItem.props.children : null
|
|
2172
2876
|
);
|
|
2173
2877
|
}
|
|
2174
|
-
|
|
2175
|
-
var
|
|
2176
|
-
function
|
|
2878
|
+
Ke.set(En, { name: "TabPanel" });
|
|
2879
|
+
var _i = pt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_42_3__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2880
|
+
function Pn({
|
|
2177
2881
|
className: t,
|
|
2178
2882
|
context: e = "navigation",
|
|
2179
|
-
"data-testid":
|
|
2180
|
-
|
|
2883
|
+
"data-testid": n,
|
|
2884
|
+
selectedKey: r,
|
|
2885
|
+
defaultSelectedKey: i,
|
|
2886
|
+
...l
|
|
2181
2887
|
}) {
|
|
2182
|
-
const
|
|
2183
|
-
|
|
2888
|
+
const s = {
|
|
2889
|
+
...l,
|
|
2890
|
+
selectedKey: r ?? void 0,
|
|
2891
|
+
defaultSelectedKey: i ?? void 0
|
|
2892
|
+
}, c = zn(s), u = oe.useRef(null), { tabListProps: p } = Ei(s, c, u), d = Cn({ "data-testid": n });
|
|
2893
|
+
return /* @__PURE__ */ oe.createElement(oe.Fragment, null, /* @__PURE__ */ oe.createElement(
|
|
2184
2894
|
"div",
|
|
2185
2895
|
{
|
|
2186
|
-
...
|
|
2187
|
-
ref:
|
|
2188
|
-
className:
|
|
2189
|
-
"data-testid":
|
|
2896
|
+
...p,
|
|
2897
|
+
ref: u,
|
|
2898
|
+
className: Wt(_i({ context: e }), t),
|
|
2899
|
+
"data-testid": n
|
|
2190
2900
|
},
|
|
2191
|
-
[...
|
|
2192
|
-
|
|
2901
|
+
[...c.collection].map((b) => /* @__PURE__ */ oe.createElement(
|
|
2902
|
+
Sn,
|
|
2193
2903
|
{
|
|
2194
|
-
key:
|
|
2195
|
-
item:
|
|
2196
|
-
state:
|
|
2904
|
+
key: b.key,
|
|
2905
|
+
item: b,
|
|
2906
|
+
state: c,
|
|
2197
2907
|
context: e,
|
|
2198
|
-
...
|
|
2908
|
+
...d(`tab-${String(b.key)}`)
|
|
2199
2909
|
}
|
|
2200
2910
|
))
|
|
2201
|
-
), /* @__PURE__ */
|
|
2202
|
-
|
|
2911
|
+
), /* @__PURE__ */ oe.createElement(
|
|
2912
|
+
En,
|
|
2203
2913
|
{
|
|
2204
|
-
key:
|
|
2205
|
-
state:
|
|
2914
|
+
key: c.selectedItem ? c.selectedItem.key : null,
|
|
2915
|
+
state: c,
|
|
2206
2916
|
context: e,
|
|
2207
|
-
...
|
|
2917
|
+
...d("tab-panel")
|
|
2208
2918
|
}
|
|
2209
2919
|
));
|
|
2210
2920
|
}
|
|
2211
|
-
|
|
2212
|
-
const
|
|
2213
|
-
components: [
|
|
2921
|
+
Ke.set(Pn, { name: "Tabs" });
|
|
2922
|
+
const Li = {
|
|
2923
|
+
components: [Pn],
|
|
2214
2924
|
examples: {
|
|
2215
2925
|
basic: {
|
|
2216
2926
|
label: "Basic Navigation Tabs",
|
|
2217
|
-
description:
|
|
2927
|
+
description: vt`
|
|
2218
2928
|
<p>Navigation tabs</p>
|
|
2219
2929
|
`,
|
|
2220
2930
|
examples: {
|
|
2221
2931
|
basic: {
|
|
2222
|
-
react:
|
|
2932
|
+
react: vt`
|
|
2223
2933
|
import { Item } from "@react-stately/collections";
|
|
2224
2934
|
import { Box, Icon } from "@sps-woodland/core";
|
|
2225
2935
|
import { Tabs } from "@sps-woodland/tabs";
|
|
@@ -2285,10 +2995,10 @@ const Ln = {
|
|
|
2285
2995
|
}
|
|
2286
2996
|
}
|
|
2287
2997
|
}
|
|
2288
|
-
},
|
|
2289
|
-
"Tabbed Navigation":
|
|
2998
|
+
}, Fi = {
|
|
2999
|
+
"Tabbed Navigation": Li
|
|
2290
3000
|
};
|
|
2291
3001
|
export {
|
|
2292
|
-
|
|
2293
|
-
|
|
3002
|
+
Fi as MANIFEST,
|
|
3003
|
+
Pn as Tabs
|
|
2294
3004
|
};
|