@sps-woodland/tabs 8.23.17 → 8.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1281 -1190
- package/lib/index.umd.cjs +3 -3
- package/lib/style.css +1 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
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 U from "react";
|
2
|
+
import V, { useState as H, useRef as M, useEffect as R, useCallback as ne, useMemo as X, useContext as ce, createContext as tn } from "react";
|
3
|
+
import { compareNodeOrder as Ce, getFirstItem as nn, getChildNodes as rn, useCollection as ln } from "@react-stately/collections";
|
4
|
+
import { flushSync as sn } from "react-dom";
|
5
|
+
import { Metadata as be, modChildren as an, cl as wt, Content as on, useChildTestIdAttrBuilder as un } from "@sps-woodland/core";
|
6
|
+
import { code as it } from "@spscommerce/utils";
|
7
|
+
class lt {
|
8
8
|
*[Symbol.iterator]() {
|
9
9
|
yield* this.iterable;
|
10
10
|
}
|
@@ -15,14 +15,14 @@ class Ze {
|
|
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,115 @@ 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 == null ? void 0 : 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 = (s) => {
|
50
|
+
if (this.keyMap.set(s.key, s), s.childNodes && s.type === "section") for (let d of s.childNodes) n(d);
|
51
51
|
};
|
52
|
-
for (let
|
53
|
-
let
|
54
|
-
for (let [
|
55
|
-
|
56
|
-
var
|
57
|
-
this.lastKey = (
|
52
|
+
for (let s of e) n(s);
|
53
|
+
let r = null, i = 0;
|
54
|
+
for (let [s, d] of this.keyMap)
|
55
|
+
r ? (r.nextKey = s, d.prevKey = r.key) : (this.firstKey = s, d.prevKey = void 0), d.type === "item" && (d.index = i++), r = d, r.nextKey = void 0;
|
56
|
+
var o;
|
57
|
+
this.lastKey = (o = r == null ? void 0 : r.key) !== null && o !== void 0 ? o : null;
|
58
58
|
}
|
59
59
|
}
|
60
|
-
class
|
61
|
-
constructor(e,
|
62
|
-
super(e), e instanceof
|
60
|
+
class B extends Set {
|
61
|
+
constructor(e, n, r) {
|
62
|
+
super(e), e instanceof B ? (this.anchorKey = n ?? e.anchorKey, this.currentKey = r ?? e.currentKey) : (this.anchorKey = n ?? null, this.currentKey = r ?? null);
|
63
63
|
}
|
64
64
|
}
|
65
|
-
function
|
66
|
-
let [
|
67
|
-
|
68
|
-
let
|
69
|
-
|
65
|
+
function Pt(t, e, n) {
|
66
|
+
let [r, i] = H(t || e), o = M(t !== void 0), s = t !== void 0;
|
67
|
+
R(() => {
|
68
|
+
let b = o.current;
|
69
|
+
b !== s && console.warn(`WARN: A component changed from ${b ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}.`), o.current = s;
|
70
70
|
}, [
|
71
|
-
|
71
|
+
s
|
72
72
|
]);
|
73
|
-
let
|
74
|
-
let
|
75
|
-
|
73
|
+
let d = s ? t : r, c = ne((b, ...y) => {
|
74
|
+
let T = (S, ...m) => {
|
75
|
+
n && (Object.is(d, S) || n(S, ...m)), s || (d = S);
|
76
76
|
};
|
77
|
-
typeof
|
78
|
-
let
|
79
|
-
return w
|
80
|
-
})) : (
|
77
|
+
typeof b == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), i((m, ...L) => {
|
78
|
+
let w = b(s ? d : m, ...L);
|
79
|
+
return T(w, ...y), s ? m : w;
|
80
|
+
})) : (s || i(b), T(b, ...y));
|
81
81
|
}, [
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
s,
|
83
|
+
d,
|
84
|
+
n
|
85
85
|
]);
|
86
86
|
return [
|
87
|
-
|
88
|
-
|
87
|
+
d,
|
88
|
+
c
|
89
89
|
];
|
90
90
|
}
|
91
|
-
function
|
91
|
+
function dn(t, e) {
|
92
92
|
if (t.size !== e.size) return !1;
|
93
|
-
for (let
|
94
|
-
if (!e.has(
|
93
|
+
for (let n of t)
|
94
|
+
if (!e.has(n)) return !1;
|
95
95
|
return !0;
|
96
96
|
}
|
97
|
-
function
|
98
|
-
let { selectionMode: e = "none", disallowEmptySelection:
|
97
|
+
function cn(t) {
|
98
|
+
let { selectionMode: e = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: o = "all" } = t, s = M(!1), [, d] = H(!1), c = M(null), b = M(null), [, y] = H(null), T = X(() => st(t.selectedKeys), [
|
99
99
|
t.selectedKeys
|
100
|
-
]),
|
100
|
+
]), S = X(() => st(t.defaultSelectedKeys, new B()), [
|
101
101
|
t.defaultSelectedKeys
|
102
|
-
]), [m,
|
102
|
+
]), [m, L] = Pt(T, S, t.onSelectionChange), w = X(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
103
103
|
t.disabledKeys
|
104
|
-
]), [
|
105
|
-
i === "replace" &&
|
106
|
-
let x =
|
107
|
-
return
|
108
|
-
i !== x.current && (
|
104
|
+
]), [_, K] = H(i);
|
105
|
+
i === "replace" && _ === "toggle" && typeof m == "object" && m.size === 0 && K("replace");
|
106
|
+
let x = M(i);
|
107
|
+
return R(() => {
|
108
|
+
i !== x.current && (K(i), x.current = i);
|
109
109
|
}, [
|
110
110
|
i
|
111
111
|
]), {
|
112
112
|
selectionMode: e,
|
113
|
-
disallowEmptySelection:
|
114
|
-
selectionBehavior:
|
115
|
-
setSelectionBehavior:
|
113
|
+
disallowEmptySelection: n,
|
114
|
+
selectionBehavior: _,
|
115
|
+
setSelectionBehavior: K,
|
116
116
|
get isFocused() {
|
117
|
-
return
|
117
|
+
return s.current;
|
118
118
|
},
|
119
|
-
setFocused(
|
120
|
-
|
119
|
+
setFocused(v) {
|
120
|
+
s.current = v, d(v);
|
121
121
|
},
|
122
122
|
get focusedKey() {
|
123
|
-
return
|
123
|
+
return c.current;
|
124
124
|
},
|
125
125
|
get childFocusStrategy() {
|
126
|
-
return
|
126
|
+
return b.current;
|
127
127
|
},
|
128
|
-
setFocusedKey(
|
129
|
-
|
128
|
+
setFocusedKey(v, D = "first") {
|
129
|
+
c.current = v, b.current = D, y(v);
|
130
130
|
},
|
131
131
|
selectedKeys: m,
|
132
|
-
setSelectedKeys(
|
133
|
-
(
|
132
|
+
setSelectedKeys(v) {
|
133
|
+
(r || !dn(v, m)) && L(v);
|
134
134
|
},
|
135
|
-
disabledKeys:
|
136
|
-
disabledBehavior:
|
135
|
+
disabledKeys: w,
|
136
|
+
disabledBehavior: o
|
137
137
|
};
|
138
138
|
}
|
139
|
-
function
|
140
|
-
return t ? t === "all" ? "all" : new
|
139
|
+
function st(t, e) {
|
140
|
+
return t ? t === "all" ? "all" : new B(t) : e;
|
141
141
|
}
|
142
|
-
class
|
142
|
+
class fn {
|
143
143
|
/**
|
144
144
|
* The type of selection that is allowed in the collection.
|
145
145
|
*/
|
@@ -189,8 +189,8 @@ class ir {
|
|
189
189
|
/**
|
190
190
|
* Sets the focused key.
|
191
191
|
*/
|
192
|
-
setFocusedKey(e,
|
193
|
-
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e,
|
192
|
+
setFocusedKey(e, n) {
|
193
|
+
(e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, n);
|
194
194
|
}
|
195
195
|
/**
|
196
196
|
* The currently selected keys in the collection.
|
@@ -209,7 +209,9 @@ class ir {
|
|
209
209
|
* Returns whether a key is selected.
|
210
210
|
*/
|
211
211
|
isSelected(e) {
|
212
|
-
|
212
|
+
if (this.state.selectionMode === "none") return !1;
|
213
|
+
let n = this.getKey(e);
|
214
|
+
return n == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(n) : this.state.selectedKeys.has(n);
|
213
215
|
}
|
214
216
|
/**
|
215
217
|
* Whether the selection is empty.
|
@@ -224,24 +226,26 @@ class ir {
|
|
224
226
|
if (this.isEmpty) return !1;
|
225
227
|
if (this.state.selectedKeys === "all") return !0;
|
226
228
|
if (this._isSelectAll != null) return this._isSelectAll;
|
227
|
-
let e = this.getSelectAllKeys(),
|
228
|
-
return this._isSelectAll = e.every((
|
229
|
+
let e = this.getSelectAllKeys(), n = this.state.selectedKeys;
|
230
|
+
return this._isSelectAll = e.every((r) => n.has(r)), this._isSelectAll;
|
229
231
|
}
|
230
232
|
get firstSelectedKey() {
|
231
233
|
let e = null;
|
232
234
|
for (let r of this.state.selectedKeys) {
|
233
|
-
let
|
234
|
-
(!e ||
|
235
|
+
let i = this.collection.getItem(r);
|
236
|
+
(!e || i && Ce(this.collection, i, e) < 0) && (e = i);
|
235
237
|
}
|
236
|
-
|
238
|
+
var n;
|
239
|
+
return (n = e == null ? void 0 : e.key) !== null && n !== void 0 ? n : null;
|
237
240
|
}
|
238
241
|
get lastSelectedKey() {
|
239
242
|
let e = null;
|
240
243
|
for (let r of this.state.selectedKeys) {
|
241
|
-
let
|
242
|
-
(!e ||
|
244
|
+
let i = this.collection.getItem(r);
|
245
|
+
(!e || i && Ce(this.collection, i, e) > 0) && (e = i);
|
243
246
|
}
|
244
|
-
|
247
|
+
var n;
|
248
|
+
return (n = e == null ? void 0 : e.key) !== null && n !== void 0 ? n : null;
|
245
249
|
}
|
246
250
|
get disabledKeys() {
|
247
251
|
return this.state.disabledKeys;
|
@@ -258,42 +262,43 @@ class ir {
|
|
258
262
|
this.replaceSelection(e);
|
259
263
|
return;
|
260
264
|
}
|
261
|
-
|
265
|
+
let n = this.getKey(e);
|
266
|
+
if (n == null) return;
|
262
267
|
let r;
|
263
|
-
if (this.state.selectedKeys === "all") r = new
|
264
|
-
|
265
|
-
],
|
268
|
+
if (this.state.selectedKeys === "all") r = new B([
|
269
|
+
n
|
270
|
+
], n, n);
|
266
271
|
else {
|
267
272
|
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
273
|
var i;
|
272
|
-
|
273
|
-
|
274
|
+
let d = (i = s.anchorKey) !== null && i !== void 0 ? i : n;
|
275
|
+
r = new B(s, d, n);
|
276
|
+
var o;
|
277
|
+
for (let c of this.getKeyRange(d, (o = s.currentKey) !== null && o !== void 0 ? o : n)) r.delete(c);
|
278
|
+
for (let c of this.getKeyRange(n, d)) this.canSelectItem(c) && r.add(c);
|
274
279
|
}
|
275
280
|
this.state.setSelectedKeys(r);
|
276
281
|
}
|
277
|
-
getKeyRange(e,
|
278
|
-
let
|
279
|
-
return
|
282
|
+
getKeyRange(e, n) {
|
283
|
+
let r = this.collection.getItem(e), i = this.collection.getItem(n);
|
284
|
+
return r && i ? Ce(this.collection, r, i) <= 0 ? this.getKeyRangeInternal(e, n) : this.getKeyRangeInternal(n, e) : [];
|
280
285
|
}
|
281
|
-
getKeyRangeInternal(e,
|
282
|
-
var
|
283
|
-
if (!((
|
284
|
-
let i = [],
|
285
|
-
for (;
|
286
|
-
let
|
287
|
-
if (
|
288
|
-
|
286
|
+
getKeyRangeInternal(e, n) {
|
287
|
+
var r;
|
288
|
+
if (!((r = this.layoutDelegate) === null || r === void 0) && r.getKeyRange) return this.layoutDelegate.getKeyRange(e, n);
|
289
|
+
let i = [], o = e;
|
290
|
+
for (; o != null; ) {
|
291
|
+
let s = this.collection.getItem(o);
|
292
|
+
if (s && (s.type === "item" || s.type === "cell" && this.allowsCellSelection) && i.push(o), o === n) return i;
|
293
|
+
o = this.collection.getKeyAfter(o);
|
289
294
|
}
|
290
295
|
return [];
|
291
296
|
}
|
292
297
|
getKey(e) {
|
293
|
-
let
|
294
|
-
if (!
|
295
|
-
for (;
|
296
|
-
return !
|
298
|
+
let n = this.collection.getItem(e);
|
299
|
+
if (!n || n.type === "cell" && this.allowsCellSelection) return e;
|
300
|
+
for (; n && n.type !== "item" && n.parentKey != null; ) n = this.collection.getItem(n.parentKey);
|
301
|
+
return !n || n.type !== "item" ? null : n.key;
|
297
302
|
}
|
298
303
|
/**
|
299
304
|
* Toggles whether the given key is selected.
|
@@ -304,18 +309,21 @@ class ir {
|
|
304
309
|
this.replaceSelection(e);
|
305
310
|
return;
|
306
311
|
}
|
307
|
-
|
308
|
-
|
309
|
-
|
312
|
+
let n = this.getKey(e);
|
313
|
+
if (n == null) return;
|
314
|
+
let r = new B(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
|
315
|
+
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
316
|
}
|
311
317
|
/**
|
312
318
|
* Replaces the selection with only the given key.
|
313
319
|
*/
|
314
320
|
replaceSelection(e) {
|
315
|
-
if (this.selectionMode === "none"
|
316
|
-
let
|
317
|
-
|
318
|
-
|
321
|
+
if (this.selectionMode === "none") return;
|
322
|
+
let n = this.getKey(e);
|
323
|
+
if (n == null) return;
|
324
|
+
let r = this.canSelectItem(n) ? new B([
|
325
|
+
n
|
326
|
+
], n, n) : new B();
|
319
327
|
this.state.setSelectedKeys(r);
|
320
328
|
}
|
321
329
|
/**
|
@@ -323,23 +331,28 @@ class ir {
|
|
323
331
|
*/
|
324
332
|
setSelectedKeys(e) {
|
325
333
|
if (this.selectionMode === "none") return;
|
326
|
-
let
|
327
|
-
for (let
|
328
|
-
|
334
|
+
let n = new B();
|
335
|
+
for (let r of e) {
|
336
|
+
let i = this.getKey(r);
|
337
|
+
if (i != null && (n.add(i), this.selectionMode === "single"))
|
329
338
|
break;
|
330
|
-
|
339
|
+
}
|
340
|
+
this.state.setSelectedKeys(n);
|
331
341
|
}
|
332
342
|
getSelectAllKeys() {
|
333
|
-
let e = [],
|
334
|
-
for (;
|
335
|
-
if (this.canSelectItem(
|
336
|
-
|
337
|
-
|
343
|
+
let e = [], n = (r) => {
|
344
|
+
for (; r != null; ) {
|
345
|
+
if (this.canSelectItem(r)) {
|
346
|
+
var i;
|
347
|
+
let s = this.collection.getItem(r);
|
348
|
+
(s == null ? void 0 : s.type) === "item" && e.push(r);
|
349
|
+
var o;
|
350
|
+
s != null && s.hasChildNodes && (this.allowsCellSelection || s.type !== "item") && n((o = (i = nn(rn(s, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && o !== void 0 ? o : null);
|
338
351
|
}
|
339
|
-
|
352
|
+
r = this.collection.getKeyAfter(r);
|
340
353
|
}
|
341
354
|
};
|
342
|
-
return
|
355
|
+
return n(this.collection.getFirstKey()), e;
|
343
356
|
}
|
344
357
|
/**
|
345
358
|
* Selects all items in the collection.
|
@@ -351,7 +364,7 @@ class ir {
|
|
351
364
|
* Removes all keys from the selection.
|
352
365
|
*/
|
353
366
|
clearSelection() {
|
354
|
-
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new
|
367
|
+
!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new B());
|
355
368
|
}
|
356
369
|
/**
|
357
370
|
* Toggles between select all and an empty selection.
|
@@ -359,298 +372,298 @@ class ir {
|
|
359
372
|
toggleSelectAll() {
|
360
373
|
this.isSelectAll ? this.clearSelection() : this.selectAll();
|
361
374
|
}
|
362
|
-
select(e,
|
363
|
-
this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" ||
|
375
|
+
select(e, n) {
|
376
|
+
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
377
|
}
|
365
378
|
/**
|
366
379
|
* Returns whether the current selection is equal to the given selection.
|
367
380
|
*/
|
368
381
|
isSelectionEqual(e) {
|
369
382
|
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(
|
383
|
+
let n = this.selectedKeys;
|
384
|
+
if (e.size !== n.size) return !1;
|
385
|
+
for (let r of e)
|
386
|
+
if (!n.has(r)) return !1;
|
387
|
+
for (let r of n)
|
388
|
+
if (!e.has(r)) return !1;
|
376
389
|
return !0;
|
377
390
|
}
|
378
391
|
canSelectItem(e) {
|
379
|
-
var
|
392
|
+
var n;
|
380
393
|
if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
|
381
|
-
let
|
382
|
-
return !(!
|
394
|
+
let r = this.collection.getItem(e);
|
395
|
+
return !(!r || !(r == null || (n = r.props) === null || n === void 0) && n.isDisabled || r.type === "cell" && !this.allowsCellSelection);
|
383
396
|
}
|
384
397
|
isDisabled(e) {
|
385
|
-
var
|
386
|
-
return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((
|
398
|
+
var n, r;
|
399
|
+
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
400
|
}
|
388
401
|
isLink(e) {
|
389
|
-
var
|
390
|
-
return !!(!((
|
402
|
+
var n, r;
|
403
|
+
return !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.href);
|
391
404
|
}
|
392
405
|
getItemProps(e) {
|
393
|
-
var
|
394
|
-
return (
|
406
|
+
var n;
|
407
|
+
return (n = this.collection.getItem(e)) === null || n === void 0 ? void 0 : n.props;
|
395
408
|
}
|
396
|
-
constructor(e,
|
397
|
-
this.collection = e, this.state =
|
409
|
+
constructor(e, n, r) {
|
410
|
+
this.collection = e, this.state = n;
|
398
411
|
var i;
|
399
|
-
this.allowsCellSelection = (i =
|
412
|
+
this.allowsCellSelection = (i = r == null ? void 0 : r.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = (r == null ? void 0 : r.layoutDelegate) || null;
|
400
413
|
}
|
401
414
|
}
|
402
|
-
function
|
403
|
-
let { filter: e, layoutDelegate:
|
415
|
+
function pn(t) {
|
416
|
+
let { filter: e, layoutDelegate: n } = t, r = cn(t), i = X(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
|
404
417
|
t.disabledKeys
|
405
|
-
]),
|
418
|
+
]), o = ne((y) => e ? new lt(e(y)) : new lt(y), [
|
406
419
|
e
|
407
|
-
]),
|
420
|
+
]), s = X(() => ({
|
408
421
|
suppressTextValueWarning: t.suppressTextValueWarning
|
409
422
|
}), [
|
410
423
|
t.suppressTextValueWarning
|
411
|
-
]),
|
412
|
-
layoutDelegate:
|
424
|
+
]), d = ln(t, o, s), c = X(() => new fn(d, r, {
|
425
|
+
layoutDelegate: n
|
413
426
|
}), [
|
414
|
-
|
415
|
-
|
416
|
-
|
427
|
+
d,
|
428
|
+
r,
|
429
|
+
n
|
417
430
|
]);
|
418
|
-
const
|
419
|
-
return
|
420
|
-
if (
|
421
|
-
const
|
422
|
-
...
|
431
|
+
const b = M(null);
|
432
|
+
return R(() => {
|
433
|
+
if (r.focusedKey != null && !d.getItem(r.focusedKey) && b.current) {
|
434
|
+
const K = b.current.getItem(r.focusedKey), x = [
|
435
|
+
...b.current.getKeys()
|
423
436
|
].map((l) => {
|
424
|
-
const
|
425
|
-
return (
|
426
|
-
}).filter((l) => l !== null),
|
427
|
-
...
|
437
|
+
const h = b.current.getItem(l);
|
438
|
+
return (h == null ? void 0 : h.type) === "item" ? h : null;
|
439
|
+
}).filter((l) => l !== null), v = [
|
440
|
+
...d.getKeys()
|
428
441
|
].map((l) => {
|
429
|
-
const
|
430
|
-
return (
|
442
|
+
const h = d.getItem(l);
|
443
|
+
return (h == null ? void 0 : h.type) === "item" ? h : null;
|
431
444
|
}).filter((l) => l !== null);
|
432
|
-
var
|
433
|
-
const D = ((
|
434
|
-
var
|
435
|
-
let
|
436
|
-
for (;
|
437
|
-
if (!
|
438
|
-
|
445
|
+
var y, T;
|
446
|
+
const D = ((y = x == null ? void 0 : x.length) !== null && y !== void 0 ? y : 0) - ((T = v == null ? void 0 : v.length) !== null && T !== void 0 ? T : 0);
|
447
|
+
var S, m, L;
|
448
|
+
let P = Math.min(D > 1 ? Math.max(((S = K == null ? void 0 : K.index) !== null && S !== void 0 ? S : 0) - D + 1, 0) : (m = K == null ? void 0 : K.index) !== null && m !== void 0 ? m : 0, ((L = v == null ? void 0 : v.length) !== null && L !== void 0 ? L : 0) - 1), A = null, z = !1;
|
449
|
+
for (; P >= 0; ) {
|
450
|
+
if (!c.isDisabled(v[P].key)) {
|
451
|
+
A = v[P];
|
439
452
|
break;
|
440
453
|
}
|
441
|
-
if (
|
454
|
+
if (P < v.length - 1 && !z) P++;
|
442
455
|
else {
|
443
|
-
|
444
|
-
var
|
445
|
-
|
456
|
+
z = !0;
|
457
|
+
var w, _;
|
458
|
+
P > ((w = K == null ? void 0 : K.index) !== null && w !== void 0 ? w : 0) && (P = (_ = K == null ? void 0 : K.index) !== null && _ !== void 0 ? _ : 0), P--;
|
446
459
|
}
|
447
460
|
}
|
448
|
-
|
461
|
+
r.setFocusedKey(A ? A.key : null);
|
449
462
|
}
|
450
|
-
|
463
|
+
b.current = d;
|
451
464
|
}, [
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
465
|
+
d,
|
466
|
+
c,
|
467
|
+
r,
|
468
|
+
r.focusedKey
|
456
469
|
]), {
|
457
|
-
collection:
|
470
|
+
collection: d,
|
458
471
|
disabledKeys: i,
|
459
|
-
selectionManager:
|
472
|
+
selectionManager: c
|
460
473
|
};
|
461
474
|
}
|
462
|
-
function
|
475
|
+
function bn(t) {
|
463
476
|
var e;
|
464
|
-
let [
|
465
|
-
|
477
|
+
let [n, r] = Pt(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = X(() => n != null ? [
|
478
|
+
n
|
466
479
|
] : [], [
|
467
|
-
|
468
|
-
]), { collection:
|
480
|
+
n
|
481
|
+
]), { collection: o, disabledKeys: s, selectionManager: d } = pn({
|
469
482
|
...t,
|
470
483
|
selectionMode: "single",
|
471
484
|
disallowEmptySelection: !0,
|
472
485
|
allowDuplicateSelectionEvents: !0,
|
473
486
|
selectedKeys: i,
|
474
|
-
onSelectionChange: (
|
475
|
-
if (
|
476
|
-
var
|
477
|
-
let
|
478
|
-
|
487
|
+
onSelectionChange: (b) => {
|
488
|
+
if (b === "all") return;
|
489
|
+
var y;
|
490
|
+
let T = (y = b.values().next().value) !== null && y !== void 0 ? y : null;
|
491
|
+
T === n && t.onSelectionChange && t.onSelectionChange(T), r(T);
|
479
492
|
}
|
480
|
-
}),
|
493
|
+
}), c = n != null ? o.getItem(n) : null;
|
481
494
|
return {
|
482
|
-
collection:
|
483
|
-
disabledKeys:
|
484
|
-
selectionManager:
|
485
|
-
selectedKey:
|
486
|
-
setSelectedKey:
|
487
|
-
selectedItem:
|
495
|
+
collection: o,
|
496
|
+
disabledKeys: s,
|
497
|
+
selectionManager: d,
|
498
|
+
selectedKey: n,
|
499
|
+
setSelectedKey: r,
|
500
|
+
selectedItem: c
|
488
501
|
};
|
489
502
|
}
|
490
|
-
function
|
491
|
-
var e;
|
492
|
-
let r =
|
503
|
+
function yn(t) {
|
504
|
+
var e, n;
|
505
|
+
let r = bn({
|
493
506
|
...t,
|
494
507
|
suppressTextValueWarning: !0,
|
495
|
-
defaultSelectedKey: (e = t.defaultSelectedKey) !== null && e !== void 0 ? e :
|
496
|
-
}), { selectionManager:
|
497
|
-
return
|
498
|
-
let
|
499
|
-
(
|
500
|
-
|
501
|
-
])), (
|
508
|
+
defaultSelectedKey: (n = (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : at(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())) !== null && n !== void 0 ? n : void 0
|
509
|
+
}), { selectionManager: i, collection: o, selectedKey: s } = r, d = M(s);
|
510
|
+
return R(() => {
|
511
|
+
let c = s;
|
512
|
+
(i.isEmpty || c == null || !o.getItem(c)) && (c = at(o, r.disabledKeys), c != null && i.setSelectedKeys([
|
513
|
+
c
|
514
|
+
])), (c != null && i.focusedKey == null || !i.isFocused && c !== d.current) && i.setFocusedKey(c), d.current = c;
|
502
515
|
}), {
|
503
516
|
...r,
|
504
517
|
isDisabled: t.isDisabled || !1
|
505
518
|
};
|
506
519
|
}
|
507
|
-
function
|
508
|
-
let
|
520
|
+
function at(t, e) {
|
521
|
+
let n = null;
|
509
522
|
if (t) {
|
510
|
-
var
|
511
|
-
for (
|
512
|
-
(e.has(
|
523
|
+
var r, i, o, s;
|
524
|
+
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);
|
525
|
+
n != null && (e.has(n) || !((s = t.getItem(n)) === null || s === void 0 || (o = s.props) === null || o === void 0) && o.isDisabled) && n === t.getLastKey() && (n = t.getFirstKey());
|
513
526
|
}
|
514
|
-
return
|
527
|
+
return n;
|
515
528
|
}
|
516
|
-
const
|
517
|
-
function
|
518
|
-
return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${
|
529
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
530
|
+
function Se(t, e, n) {
|
531
|
+
return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${Et.get(t)}-${n}-${e}`) : "";
|
519
532
|
}
|
520
|
-
const
|
533
|
+
const re = typeof document < "u" ? V.useLayoutEffect : () => {
|
521
534
|
};
|
522
|
-
function
|
523
|
-
const e =
|
524
|
-
return
|
535
|
+
function Q(t) {
|
536
|
+
const e = M(null);
|
537
|
+
return re(() => {
|
525
538
|
e.current = t;
|
526
539
|
}, [
|
527
540
|
t
|
528
|
-
]),
|
529
|
-
const
|
530
|
-
return
|
541
|
+
]), ne((...n) => {
|
542
|
+
const r = e.current;
|
543
|
+
return r == null ? void 0 : r(...n);
|
531
544
|
}, []);
|
532
545
|
}
|
533
|
-
const
|
546
|
+
const Te = {
|
534
547
|
prefix: String(Math.round(Math.random() * 1e10)),
|
535
548
|
current: 0
|
536
|
-
},
|
537
|
-
let
|
538
|
-
function
|
539
|
-
let e = ce(
|
540
|
-
if (
|
541
|
-
var
|
542
|
-
let
|
543
|
-
if (
|
544
|
-
let
|
545
|
-
|
549
|
+
}, kt = /* @__PURE__ */ V.createContext(Te), hn = /* @__PURE__ */ V.createContext(!1);
|
550
|
+
let gn = !!(typeof window < "u" && window.document && window.document.createElement), Ie = /* @__PURE__ */ new WeakMap();
|
551
|
+
function vn(t = !1) {
|
552
|
+
let e = ce(kt), n = M(null);
|
553
|
+
if (n.current === null && !t) {
|
554
|
+
var r, i;
|
555
|
+
let o = (i = V.__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;
|
556
|
+
if (o) {
|
557
|
+
let s = Ie.get(o);
|
558
|
+
s == null ? Ie.set(o, {
|
546
559
|
id: e.current,
|
547
|
-
state:
|
548
|
-
}) :
|
560
|
+
state: o.memoizedState
|
561
|
+
}) : o.memoizedState !== s.state && (e.current = s.id, Ie.delete(o));
|
549
562
|
}
|
550
|
-
|
563
|
+
n.current = ++e.current;
|
551
564
|
}
|
552
|
-
return
|
565
|
+
return n.current;
|
553
566
|
}
|
554
|
-
function
|
555
|
-
let e = ce(
|
556
|
-
e ===
|
557
|
-
let
|
558
|
-
return t || `${
|
567
|
+
function $n(t) {
|
568
|
+
let e = ce(kt);
|
569
|
+
e === Te && !gn && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
570
|
+
let n = vn(!!t), r = e === Te && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${e.prefix}`;
|
571
|
+
return t || `${r}-${n}`;
|
559
572
|
}
|
560
|
-
function
|
561
|
-
let e =
|
562
|
-
return t || `${
|
573
|
+
function mn(t) {
|
574
|
+
let e = V.useId(), [n] = H(xt()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Te.prefix}`;
|
575
|
+
return t || `${r}-${e}`;
|
563
576
|
}
|
564
|
-
const
|
565
|
-
function
|
577
|
+
const Kn = typeof V.useId == "function" ? mn : $n;
|
578
|
+
function Sn() {
|
566
579
|
return !1;
|
567
580
|
}
|
568
|
-
function
|
581
|
+
function Tn() {
|
569
582
|
return !0;
|
570
583
|
}
|
571
|
-
function
|
584
|
+
function wn(t) {
|
572
585
|
return () => {
|
573
586
|
};
|
574
587
|
}
|
575
|
-
function
|
576
|
-
return typeof
|
588
|
+
function xt() {
|
589
|
+
return typeof V.useSyncExternalStore == "function" ? V.useSyncExternalStore(wn, Sn, Tn) : ce(hn);
|
577
590
|
}
|
578
|
-
let
|
579
|
-
function
|
580
|
-
let [e,
|
581
|
-
|
591
|
+
let Pn = !!(typeof window < "u" && window.document && window.document.createElement), Z = /* @__PURE__ */ new Map();
|
592
|
+
function Ge(t) {
|
593
|
+
let [e, n] = H(t), r = M(null), i = Kn(e), o = ne((s) => {
|
594
|
+
r.current = s;
|
582
595
|
}, []);
|
583
|
-
return
|
584
|
-
...
|
585
|
-
|
586
|
-
]) :
|
587
|
-
|
588
|
-
])),
|
589
|
-
let
|
596
|
+
return Pn && (Z.has(i) && !Z.get(i).includes(o) ? Z.set(i, [
|
597
|
+
...Z.get(i),
|
598
|
+
o
|
599
|
+
]) : Z.set(i, [
|
600
|
+
o
|
601
|
+
])), re(() => {
|
602
|
+
let s = i;
|
590
603
|
return () => {
|
591
|
-
|
604
|
+
Z.delete(s);
|
592
605
|
};
|
593
606
|
}, [
|
594
607
|
i
|
595
|
-
]),
|
596
|
-
let
|
597
|
-
|
608
|
+
]), R(() => {
|
609
|
+
let s = r.current;
|
610
|
+
s && (r.current = null, n(s));
|
598
611
|
}), i;
|
599
612
|
}
|
600
|
-
function
|
613
|
+
function En(t, e) {
|
601
614
|
if (t === e) return t;
|
602
|
-
let
|
603
|
-
if (
|
604
|
-
return
|
605
|
-
let
|
606
|
-
return
|
615
|
+
let n = Z.get(t);
|
616
|
+
if (n)
|
617
|
+
return n.forEach((i) => i(e)), e;
|
618
|
+
let r = Z.get(e);
|
619
|
+
return r ? (r.forEach((i) => i(t)), t) : e;
|
607
620
|
}
|
608
|
-
function
|
621
|
+
function _t(...t) {
|
609
622
|
return (...e) => {
|
610
|
-
for (let
|
623
|
+
for (let n of t) typeof n == "function" && n(...e);
|
611
624
|
};
|
612
625
|
}
|
613
|
-
const
|
626
|
+
const N = (t) => {
|
614
627
|
var e;
|
615
628
|
return (e = t == null ? void 0 : t.ownerDocument) !== null && e !== void 0 ? e : document;
|
616
|
-
},
|
617
|
-
function
|
618
|
-
var e,
|
619
|
-
if (typeof t == "string" || typeof t == "number")
|
629
|
+
}, ie = (t) => t && "window" in t && t.window === t ? t : N(t).defaultView || window;
|
630
|
+
function Lt(t) {
|
631
|
+
var e, n, r = "";
|
632
|
+
if (typeof t == "string" || typeof t == "number") r += t;
|
620
633
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
621
634
|
var i = t.length;
|
622
|
-
for (e = 0; e < i; e++) t[e] && (
|
623
|
-
} else for (
|
624
|
-
return
|
635
|
+
for (e = 0; e < i; e++) t[e] && (n = Lt(t[e])) && (r && (r += " "), r += n);
|
636
|
+
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
637
|
+
return r;
|
625
638
|
}
|
626
|
-
function
|
627
|
-
for (var t, e,
|
628
|
-
return
|
639
|
+
function kn() {
|
640
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Lt(t)) && (r && (r += " "), r += e);
|
641
|
+
return r;
|
629
642
|
}
|
630
|
-
function
|
643
|
+
function ee(...t) {
|
631
644
|
let e = {
|
632
645
|
...t[0]
|
633
646
|
};
|
634
|
-
for (let
|
635
|
-
let
|
636
|
-
for (let i in
|
637
|
-
let
|
638
|
-
typeof
|
647
|
+
for (let n = 1; n < t.length; n++) {
|
648
|
+
let r = t[n];
|
649
|
+
for (let i in r) {
|
650
|
+
let o = e[i], s = r[i];
|
651
|
+
typeof o == "function" && typeof s == "function" && // This is a lot faster than a regex.
|
639
652
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
640
653
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
641
|
-
90 ? e[i] =
|
654
|
+
90 ? e[i] = _t(o, s) : (i === "className" || i === "UNSAFE_className") && typeof o == "string" && typeof s == "string" ? e[i] = kn(o, s) : i === "id" && o && s ? e.id = En(o, s) : e[i] = s !== void 0 ? s : o;
|
642
655
|
}
|
643
656
|
}
|
644
657
|
return e;
|
645
658
|
}
|
646
|
-
const
|
659
|
+
const xn = /* @__PURE__ */ new Set([
|
647
660
|
"id"
|
648
|
-
]),
|
661
|
+
]), _n = /* @__PURE__ */ new Set([
|
649
662
|
"aria-label",
|
650
663
|
"aria-labelledby",
|
651
664
|
"aria-describedby",
|
652
665
|
"aria-details"
|
653
|
-
]),
|
666
|
+
]), Ln = /* @__PURE__ */ new Set([
|
654
667
|
"href",
|
655
668
|
"hrefLang",
|
656
669
|
"target",
|
@@ -658,130 +671,130 @@ const mr = /* @__PURE__ */ new Set([
|
|
658
671
|
"download",
|
659
672
|
"ping",
|
660
673
|
"referrerPolicy"
|
661
|
-
]),
|
662
|
-
function
|
663
|
-
let { labelable:
|
664
|
-
for (const
|
665
|
-
return
|
666
|
-
}
|
667
|
-
function
|
668
|
-
if (
|
674
|
+
]), Mn = /^(data-.*)$/;
|
675
|
+
function Dn(t, e = {}) {
|
676
|
+
let { labelable: n, isLink: r, propNames: i } = e, o = {};
|
677
|
+
for (const s in t) Object.prototype.hasOwnProperty.call(t, s) && (xn.has(s) || n && _n.has(s) || r && Ln.has(s) || i != null && i.has(s) || Mn.test(s)) && (o[s] = t[s]);
|
678
|
+
return o;
|
679
|
+
}
|
680
|
+
function G(t) {
|
681
|
+
if (Cn()) t.focus({
|
669
682
|
preventScroll: !0
|
670
683
|
});
|
671
684
|
else {
|
672
|
-
let e =
|
673
|
-
t.focus(),
|
685
|
+
let e = In(t);
|
686
|
+
t.focus(), An(e);
|
674
687
|
}
|
675
688
|
}
|
676
|
-
let
|
677
|
-
function
|
678
|
-
if (
|
679
|
-
|
689
|
+
let he = null;
|
690
|
+
function Cn() {
|
691
|
+
if (he == null) {
|
692
|
+
he = !1;
|
680
693
|
try {
|
681
694
|
document.createElement("div").focus({
|
682
695
|
get preventScroll() {
|
683
|
-
return
|
696
|
+
return he = !0, !0;
|
684
697
|
}
|
685
698
|
});
|
686
699
|
} catch {
|
687
700
|
}
|
688
701
|
}
|
689
|
-
return
|
702
|
+
return he;
|
690
703
|
}
|
691
|
-
function
|
692
|
-
let e = t.parentNode,
|
693
|
-
for (; e instanceof HTMLElement && e !==
|
694
|
-
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) &&
|
704
|
+
function In(t) {
|
705
|
+
let e = t.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
706
|
+
for (; e instanceof HTMLElement && e !== r; )
|
707
|
+
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && n.push({
|
695
708
|
element: e,
|
696
709
|
scrollTop: e.scrollTop,
|
697
710
|
scrollLeft: e.scrollLeft
|
698
711
|
}), e = e.parentNode;
|
699
|
-
return
|
700
|
-
element:
|
701
|
-
scrollTop:
|
702
|
-
scrollLeft:
|
703
|
-
}),
|
712
|
+
return r instanceof HTMLElement && n.push({
|
713
|
+
element: r,
|
714
|
+
scrollTop: r.scrollTop,
|
715
|
+
scrollLeft: r.scrollLeft
|
716
|
+
}), n;
|
704
717
|
}
|
705
|
-
function
|
706
|
-
for (let { element: e, scrollTop:
|
707
|
-
e.scrollTop =
|
718
|
+
function An(t) {
|
719
|
+
for (let { element: e, scrollTop: n, scrollLeft: r } of t)
|
720
|
+
e.scrollTop = n, e.scrollLeft = r;
|
708
721
|
}
|
709
|
-
function
|
722
|
+
function Pe(t) {
|
710
723
|
var e;
|
711
|
-
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((
|
724
|
+
return typeof window > "u" || window.navigator == null ? !1 : ((e = window.navigator.userAgentData) === null || e === void 0 ? void 0 : e.brands.some((n) => t.test(n.brand))) || t.test(window.navigator.userAgent);
|
712
725
|
}
|
713
|
-
function
|
726
|
+
function Xe(t) {
|
714
727
|
var e;
|
715
728
|
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
729
|
}
|
717
|
-
function
|
730
|
+
function Y(t) {
|
718
731
|
let e = null;
|
719
732
|
return () => (e == null && (e = t()), e);
|
720
733
|
}
|
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
|
-
}),
|
734
|
+
const le = Y(function() {
|
735
|
+
return Xe(/^Mac/i);
|
736
|
+
}), Fn = Y(function() {
|
737
|
+
return Xe(/^iPhone/i);
|
738
|
+
}), Mt = Y(function() {
|
739
|
+
return Xe(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
740
|
+
le() && navigator.maxTouchPoints > 1;
|
741
|
+
}), Ye = Y(function() {
|
742
|
+
return Fn() || Mt();
|
743
|
+
}), zn = Y(function() {
|
744
|
+
return le() || Ye();
|
745
|
+
}), On = Y(function() {
|
746
|
+
return Pe(/AppleWebKit/i) && !Nn();
|
747
|
+
}), Nn = Y(function() {
|
748
|
+
return Pe(/Chrome/i);
|
749
|
+
}), Dt = Y(function() {
|
750
|
+
return Pe(/Android/i);
|
751
|
+
}), Rn = Y(function() {
|
752
|
+
return Pe(/Firefox/i);
|
753
|
+
}), Bn = /* @__PURE__ */ tn({
|
741
754
|
isNative: !0,
|
742
|
-
open:
|
755
|
+
open: Hn,
|
743
756
|
useHref: (t) => t
|
744
757
|
});
|
745
|
-
function
|
746
|
-
return ce(
|
747
|
-
}
|
748
|
-
function
|
749
|
-
var
|
750
|
-
let { metaKey:
|
751
|
-
|
752
|
-
let
|
758
|
+
function qe() {
|
759
|
+
return ce(Bn);
|
760
|
+
}
|
761
|
+
function se(t, e, n = !0) {
|
762
|
+
var r, i;
|
763
|
+
let { metaKey: o, ctrlKey: s, altKey: d, shiftKey: c } = e;
|
764
|
+
Rn() && (!((i = window.event) === null || i === void 0 || (r = i.type) === null || r === void 0) && r.startsWith("key")) && t.target === "_blank" && (le() ? o = !0 : s = !0);
|
765
|
+
let b = On() && le() && !Mt() ? new KeyboardEvent("keydown", {
|
753
766
|
keyIdentifier: "Enter",
|
754
|
-
metaKey:
|
755
|
-
ctrlKey:
|
756
|
-
altKey:
|
757
|
-
shiftKey:
|
767
|
+
metaKey: o,
|
768
|
+
ctrlKey: s,
|
769
|
+
altKey: d,
|
770
|
+
shiftKey: c
|
758
771
|
}) : new MouseEvent("click", {
|
759
|
-
metaKey:
|
760
|
-
ctrlKey:
|
761
|
-
altKey:
|
762
|
-
shiftKey:
|
772
|
+
metaKey: o,
|
773
|
+
ctrlKey: s,
|
774
|
+
altKey: d,
|
775
|
+
shiftKey: c,
|
763
776
|
bubbles: !0,
|
764
777
|
cancelable: !0
|
765
778
|
});
|
766
|
-
|
779
|
+
se.isOpening = n, G(t), t.dispatchEvent(b), se.isOpening = !1;
|
767
780
|
}
|
768
|
-
|
769
|
-
function
|
781
|
+
se.isOpening = !1;
|
782
|
+
function Un(t, e) {
|
770
783
|
if (t instanceof HTMLAnchorElement) e(t);
|
771
784
|
else if (t.hasAttribute("data-href")) {
|
772
|
-
let
|
773
|
-
|
785
|
+
let n = document.createElement("a");
|
786
|
+
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
787
|
}
|
775
788
|
}
|
776
|
-
function
|
777
|
-
|
789
|
+
function Hn(t, e) {
|
790
|
+
Un(t, (n) => se(n, e));
|
778
791
|
}
|
779
|
-
function
|
780
|
-
let e =
|
781
|
-
var
|
782
|
-
const
|
792
|
+
function Vn(t) {
|
793
|
+
let e = qe();
|
794
|
+
var n;
|
795
|
+
const r = e.useHref((n = t == null ? void 0 : t.href) !== null && n !== void 0 ? n : "");
|
783
796
|
return {
|
784
|
-
href: t != null && t.href ?
|
797
|
+
href: t != null && t.href ? r : void 0,
|
785
798
|
target: t == null ? void 0 : t.target,
|
786
799
|
rel: t == null ? void 0 : t.rel,
|
787
800
|
download: t == null ? void 0 : t.download,
|
@@ -789,115 +802,124 @@ function Fr(t) {
|
|
789
802
|
referrerPolicy: t == null ? void 0 : t.referrerPolicy
|
790
803
|
};
|
791
804
|
}
|
792
|
-
let oe = /* @__PURE__ */ new Map(),
|
793
|
-
function
|
805
|
+
let oe = /* @__PURE__ */ new Map(), Ne = /* @__PURE__ */ new Set();
|
806
|
+
function ot() {
|
794
807
|
if (typeof window > "u") return;
|
795
|
-
function t(
|
796
|
-
return "propertyName" in
|
808
|
+
function t(r) {
|
809
|
+
return "propertyName" in r;
|
797
810
|
}
|
798
|
-
let e = (
|
799
|
-
if (!t(
|
800
|
-
let i = oe.get(
|
801
|
-
i || (i = /* @__PURE__ */ new Set(), oe.set(
|
811
|
+
let e = (r) => {
|
812
|
+
if (!t(r) || !r.target) return;
|
813
|
+
let i = oe.get(r.target);
|
814
|
+
i || (i = /* @__PURE__ */ new Set(), oe.set(r.target, i), r.target.addEventListener("transitioncancel", n, {
|
802
815
|
once: !0
|
803
|
-
})), i.add(
|
804
|
-
},
|
805
|
-
if (!t(
|
806
|
-
let i = oe.get(
|
807
|
-
if (i && (i.delete(
|
808
|
-
for (let
|
809
|
-
|
816
|
+
})), i.add(r.propertyName);
|
817
|
+
}, n = (r) => {
|
818
|
+
if (!t(r) || !r.target) return;
|
819
|
+
let i = oe.get(r.target);
|
820
|
+
if (i && (i.delete(r.propertyName), i.size === 0 && (r.target.removeEventListener("transitioncancel", n), oe.delete(r.target)), oe.size === 0)) {
|
821
|
+
for (let o of Ne) o();
|
822
|
+
Ne.clear();
|
810
823
|
}
|
811
824
|
};
|
812
|
-
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend",
|
825
|
+
document.body.addEventListener("transitionrun", e), document.body.addEventListener("transitionend", n);
|
813
826
|
}
|
814
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
815
|
-
function
|
827
|
+
typeof document < "u" && (document.readyState !== "loading" ? ot() : document.addEventListener("DOMContentLoaded", ot));
|
828
|
+
function Ct(t) {
|
816
829
|
requestAnimationFrame(() => {
|
817
|
-
oe.size === 0 ? t() :
|
830
|
+
oe.size === 0 ? t() : Ne.add(t);
|
818
831
|
});
|
819
832
|
}
|
820
|
-
function
|
821
|
-
let t =
|
822
|
-
let
|
823
|
-
t.current.delete(
|
824
|
-
} :
|
825
|
-
t.current.set(
|
826
|
-
type:
|
833
|
+
function It() {
|
834
|
+
let t = M(/* @__PURE__ */ new Map()), e = ne((i, o, s, d) => {
|
835
|
+
let c = d != null && d.once ? (...b) => {
|
836
|
+
t.current.delete(s), s(...b);
|
837
|
+
} : s;
|
838
|
+
t.current.set(s, {
|
839
|
+
type: o,
|
827
840
|
eventTarget: i,
|
828
|
-
fn:
|
829
|
-
options:
|
830
|
-
}), i.addEventListener(
|
831
|
-
}, []),
|
832
|
-
var
|
833
|
-
let
|
834
|
-
i.removeEventListener(
|
835
|
-
}, []),
|
836
|
-
t.current.forEach((i,
|
837
|
-
|
841
|
+
fn: c,
|
842
|
+
options: d
|
843
|
+
}), i.addEventListener(o, c, d);
|
844
|
+
}, []), n = ne((i, o, s, d) => {
|
845
|
+
var c;
|
846
|
+
let b = ((c = t.current.get(s)) === null || c === void 0 ? void 0 : c.fn) || s;
|
847
|
+
i.removeEventListener(o, b, d), t.current.delete(s);
|
848
|
+
}, []), r = ne(() => {
|
849
|
+
t.current.forEach((i, o) => {
|
850
|
+
n(i.eventTarget, i.type, o, i.options);
|
838
851
|
});
|
839
852
|
}, [
|
840
|
-
r
|
841
|
-
]);
|
842
|
-
return O(() => n, [
|
843
853
|
n
|
854
|
+
]);
|
855
|
+
return R(() => r, [
|
856
|
+
r
|
844
857
|
]), {
|
845
858
|
addGlobalListener: e,
|
846
|
-
removeGlobalListener:
|
847
|
-
removeAllGlobalListeners:
|
859
|
+
removeGlobalListener: n,
|
860
|
+
removeAllGlobalListeners: r
|
848
861
|
};
|
849
862
|
}
|
850
|
-
function
|
851
|
-
let { id:
|
852
|
-
return
|
863
|
+
function At(t, e) {
|
864
|
+
let { id: n, "aria-label": r, "aria-labelledby": i } = t;
|
865
|
+
return n = Ge(n), i && r ? i = [
|
853
866
|
.../* @__PURE__ */ new Set([
|
854
|
-
|
867
|
+
n,
|
855
868
|
...i.trim().split(/\s+/)
|
856
869
|
])
|
857
|
-
].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !
|
858
|
-
id:
|
859
|
-
"aria-label":
|
870
|
+
].join(" ") : i && (i = i.trim().split(/\s+/).join(" ")), !r && !i && e && (r = e), {
|
871
|
+
id: n,
|
872
|
+
"aria-label": r,
|
860
873
|
"aria-labelledby": i
|
861
874
|
};
|
862
875
|
}
|
863
|
-
function
|
864
|
-
|
876
|
+
function ut(t, e) {
|
877
|
+
const n = M(!0), r = M(null);
|
878
|
+
re(() => (n.current = !0, () => {
|
879
|
+
n.current = !1;
|
880
|
+
}), []), re(() => {
|
881
|
+
n.current ? n.current = !1 : (!r.current || e.some((i, o) => !Object.is(i, r[o]))) && t(), r.current = e;
|
882
|
+
}, e);
|
883
|
+
}
|
884
|
+
function Wn(t, e) {
|
885
|
+
re(() => {
|
865
886
|
if (t && t.ref && e)
|
866
887
|
return t.ref.current = e.current, () => {
|
867
888
|
t.ref && (t.ref.current = null);
|
868
889
|
};
|
869
890
|
});
|
870
891
|
}
|
871
|
-
function
|
872
|
-
|
873
|
-
|
892
|
+
function jn(t, e) {
|
893
|
+
if (!t) return !1;
|
894
|
+
let n = window.getComputedStyle(t), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
|
895
|
+
return r && e && (r = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), r;
|
874
896
|
}
|
875
|
-
function
|
876
|
-
const
|
897
|
+
function Gn(t, e) {
|
898
|
+
const n = [];
|
877
899
|
for (; t && t !== document.documentElement; )
|
878
|
-
|
879
|
-
return
|
900
|
+
jn(t, e) && n.push(t), t = t.parentElement;
|
901
|
+
return n;
|
880
902
|
}
|
881
|
-
let
|
882
|
-
const
|
883
|
-
function
|
884
|
-
let [e,
|
885
|
-
return
|
903
|
+
let Xn = 0;
|
904
|
+
const Ae = /* @__PURE__ */ new Map();
|
905
|
+
function Yn(t) {
|
906
|
+
let [e, n] = H();
|
907
|
+
return re(() => {
|
886
908
|
if (!t) return;
|
887
|
-
let
|
888
|
-
if (
|
889
|
-
r
|
909
|
+
let r = Ae.get(t);
|
910
|
+
if (r)
|
911
|
+
n(r.element.id);
|
890
912
|
else {
|
891
|
-
let i = `react-aria-description-${
|
892
|
-
|
893
|
-
let
|
894
|
-
|
913
|
+
let i = `react-aria-description-${Xn++}`;
|
914
|
+
n(i);
|
915
|
+
let o = document.createElement("div");
|
916
|
+
o.id = i, o.style.display = "none", o.textContent = t, document.body.appendChild(o), r = {
|
895
917
|
refCount: 0,
|
896
|
-
element:
|
897
|
-
},
|
918
|
+
element: o
|
919
|
+
}, Ae.set(t, r);
|
898
920
|
}
|
899
|
-
return
|
900
|
-
|
921
|
+
return r.refCount++, () => {
|
922
|
+
r && --r.refCount === 0 && (r.element.remove(), Ae.delete(t));
|
901
923
|
};
|
902
924
|
}, [
|
903
925
|
t
|
@@ -905,206 +927,210 @@ function Br(t) {
|
|
905
927
|
"aria-describedby": t ? e : void 0
|
906
928
|
};
|
907
929
|
}
|
908
|
-
function
|
909
|
-
let i =
|
910
|
-
|
911
|
-
if (
|
912
|
-
let
|
913
|
-
return
|
914
|
-
|
930
|
+
function ge(t, e, n, r) {
|
931
|
+
let i = Q(n), o = n == null;
|
932
|
+
R(() => {
|
933
|
+
if (o || !t.current) return;
|
934
|
+
let s = t.current;
|
935
|
+
return s.addEventListener(e, i, r), () => {
|
936
|
+
s.removeEventListener(e, i, r);
|
915
937
|
};
|
916
938
|
}, [
|
917
939
|
t,
|
918
940
|
e,
|
919
|
-
|
920
|
-
|
941
|
+
r,
|
942
|
+
o,
|
921
943
|
i
|
922
944
|
]);
|
923
945
|
}
|
924
|
-
function
|
925
|
-
let
|
926
|
-
|
946
|
+
function Ft(t, e) {
|
947
|
+
let n = dt(t, e, "left"), r = dt(t, e, "top"), i = e.offsetWidth, o = e.offsetHeight, s = t.scrollLeft, d = t.scrollTop, { borderTopWidth: c, borderLeftWidth: b, scrollPaddingTop: y, scrollPaddingRight: T, scrollPaddingBottom: S, scrollPaddingLeft: m } = getComputedStyle(t), L = s + parseInt(b, 10), w = d + parseInt(c, 10), _ = L + t.clientWidth, K = w + t.clientHeight, x = parseInt(y, 10) || 0, v = parseInt(S, 10) || 0, D = parseInt(T, 10) || 0, P = parseInt(m, 10) || 0;
|
948
|
+
n <= s + P ? s = n - parseInt(b, 10) - P : n + i > _ - D && (s += n + i - _ + D), r <= w + x ? d = r - parseInt(c, 10) - x : r + o > K - v && (d += r + o - K + v), t.scrollLeft = s, t.scrollTop = d;
|
927
949
|
}
|
928
|
-
function
|
929
|
-
const
|
950
|
+
function dt(t, e, n) {
|
951
|
+
const r = n === "left" ? "offsetLeft" : "offsetTop";
|
930
952
|
let i = 0;
|
931
|
-
for (; e.offsetParent && (i += e[
|
953
|
+
for (; e.offsetParent && (i += e[r], e.offsetParent !== t); ) {
|
932
954
|
if (e.offsetParent.contains(t)) {
|
933
|
-
i -= t[
|
955
|
+
i -= t[r];
|
934
956
|
break;
|
935
957
|
}
|
936
958
|
e = e.offsetParent;
|
937
959
|
}
|
938
960
|
return i;
|
939
961
|
}
|
940
|
-
function
|
941
|
-
if (document.contains(t)) {
|
942
|
-
let
|
943
|
-
if (window.getComputedStyle(
|
944
|
-
let
|
945
|
-
for (let
|
962
|
+
function ct(t, e) {
|
963
|
+
if (t && document.contains(t)) {
|
964
|
+
let s = document.scrollingElement || document.documentElement;
|
965
|
+
if (window.getComputedStyle(s).overflow === "hidden") {
|
966
|
+
let c = Gn(t);
|
967
|
+
for (let b of c) Ft(b, t);
|
946
968
|
} else {
|
947
|
-
var
|
948
|
-
let { left:
|
949
|
-
t == null || (
|
969
|
+
var n;
|
970
|
+
let { left: c, top: b } = t.getBoundingClientRect();
|
971
|
+
t == null || (n = t.scrollIntoView) === null || n === void 0 || n.call(t, {
|
950
972
|
block: "nearest"
|
951
973
|
});
|
952
|
-
let { left:
|
953
|
-
if (Math.abs(
|
954
|
-
var
|
955
|
-
e == null || (i = e.containingElement) === null || i === void 0 || (
|
974
|
+
let { left: y, top: T } = t.getBoundingClientRect();
|
975
|
+
if (Math.abs(c - y) > 1 || Math.abs(b - T) > 1) {
|
976
|
+
var r, i, o;
|
977
|
+
e == null || (i = e.containingElement) === null || i === void 0 || (r = i.scrollIntoView) === null || r === void 0 || r.call(i, {
|
956
978
|
block: "center",
|
957
979
|
inline: "center"
|
958
|
-
}), (
|
980
|
+
}), (o = t.scrollIntoView) === null || o === void 0 || o.call(t, {
|
959
981
|
block: "nearest"
|
960
982
|
});
|
961
983
|
}
|
962
984
|
}
|
963
985
|
}
|
964
986
|
}
|
965
|
-
function
|
966
|
-
return t.mozInputSource === 0 && t.isTrusted ? !0 :
|
987
|
+
function Re(t) {
|
988
|
+
return t.mozInputSource === 0 && t.isTrusted ? !0 : Dt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
|
967
989
|
}
|
968
|
-
function
|
969
|
-
return !
|
990
|
+
function qn(t) {
|
991
|
+
return !Dt() && t.width === 0 && t.height === 0 || t.width === 1 && t.height === 1 && t.pressure === 0 && t.detail === 0 && t.pointerType === "mouse";
|
970
992
|
}
|
971
|
-
|
972
|
-
|
993
|
+
const Jn = "react-aria-clear-focus", Zn = "react-aria-focus", zt = "react-aria-update-activedescendant";
|
994
|
+
function ue(t) {
|
995
|
+
return le() ? t.metaKey : t.ctrlKey;
|
973
996
|
}
|
974
|
-
function
|
975
|
-
return
|
997
|
+
function Be(t) {
|
998
|
+
return zn() ? t.altKey : t.ctrlKey;
|
976
999
|
}
|
977
|
-
const
|
978
|
-
function
|
979
|
-
let { keyboardDelegate: e, selectionManager:
|
1000
|
+
const Qn = 1e3;
|
1001
|
+
function er(t) {
|
1002
|
+
let { keyboardDelegate: e, selectionManager: n, onTypeSelect: r } = t, i = M({
|
980
1003
|
search: "",
|
981
|
-
timeout:
|
982
|
-
}).current,
|
983
|
-
let
|
984
|
-
if (!
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
1004
|
+
timeout: void 0
|
1005
|
+
}).current, o = (s) => {
|
1006
|
+
let d = tr(s.key);
|
1007
|
+
if (!(!d || s.ctrlKey || s.metaKey || !s.currentTarget.contains(s.target))) {
|
1008
|
+
if (d === " " && i.search.trim().length > 0 && (s.preventDefault(), "continuePropagation" in s || s.stopPropagation()), i.search += d, e.getKeyForSearch != null) {
|
1009
|
+
let c = e.getKeyForSearch(i.search, n.focusedKey);
|
1010
|
+
c == null && (c = e.getKeyForSearch(i.search)), c != null && (n.setFocusedKey(c), r && r(c));
|
1011
|
+
}
|
1012
|
+
clearTimeout(i.timeout), i.timeout = setTimeout(() => {
|
1013
|
+
i.search = "";
|
1014
|
+
}, Qn);
|
1015
|
+
}
|
990
1016
|
};
|
991
1017
|
return {
|
992
1018
|
typeSelectProps: {
|
993
1019
|
// Using a capturing listener to catch the keydown event before
|
994
1020
|
// other hooks in order to handle the Spacebar event.
|
995
|
-
onKeyDownCapture: e.getKeyForSearch ?
|
1021
|
+
onKeyDownCapture: e.getKeyForSearch ? o : void 0
|
996
1022
|
}
|
997
1023
|
};
|
998
1024
|
}
|
999
|
-
function
|
1025
|
+
function tr(t) {
|
1000
1026
|
return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
|
1001
1027
|
}
|
1002
|
-
let
|
1003
|
-
function
|
1004
|
-
if (
|
1005
|
-
if (
|
1006
|
-
const e =
|
1007
|
-
|
1028
|
+
let de = "default", Ue = "", Ke = /* @__PURE__ */ new WeakMap();
|
1029
|
+
function ft(t) {
|
1030
|
+
if (Ye()) {
|
1031
|
+
if (de === "default") {
|
1032
|
+
const e = N(t);
|
1033
|
+
Ue = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
|
1008
1034
|
}
|
1009
|
-
|
1010
|
-
} else (t instanceof HTMLElement || t instanceof SVGElement) && (
|
1011
|
-
}
|
1012
|
-
function
|
1013
|
-
if (
|
1014
|
-
if (
|
1015
|
-
|
1016
|
-
|
1017
|
-
if (
|
1018
|
-
const e =
|
1019
|
-
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect =
|
1035
|
+
de = "disabled";
|
1036
|
+
} else (t instanceof HTMLElement || t instanceof SVGElement) && (Ke.set(t, t.style.userSelect), t.style.userSelect = "none");
|
1037
|
+
}
|
1038
|
+
function ve(t) {
|
1039
|
+
if (Ye()) {
|
1040
|
+
if (de !== "disabled") return;
|
1041
|
+
de = "restoring", setTimeout(() => {
|
1042
|
+
Ct(() => {
|
1043
|
+
if (de === "restoring") {
|
1044
|
+
const e = N(t);
|
1045
|
+
e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = Ue || ""), Ue = "", de = "default";
|
1020
1046
|
}
|
1021
1047
|
});
|
1022
1048
|
}, 300);
|
1023
|
-
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t &&
|
1024
|
-
let e =
|
1025
|
-
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"),
|
1049
|
+
} else if ((t instanceof HTMLElement || t instanceof SVGElement) && t && Ke.has(t)) {
|
1050
|
+
let e = Ke.get(t);
|
1051
|
+
t.style.userSelect === "none" && (t.style.userSelect = e), t.getAttribute("style") === "" && t.removeAttribute("style"), Ke.delete(t);
|
1026
1052
|
}
|
1027
1053
|
}
|
1028
|
-
const
|
1054
|
+
const Ot = V.createContext({
|
1029
1055
|
register: () => {
|
1030
1056
|
}
|
1031
1057
|
});
|
1032
|
-
|
1033
|
-
function
|
1058
|
+
Ot.displayName = "PressResponderContext";
|
1059
|
+
function nr(t, e) {
|
1034
1060
|
return e.get ? e.get.call(t) : e.value;
|
1035
1061
|
}
|
1036
|
-
function
|
1037
|
-
if (!e.has(t)) throw new TypeError("attempted to " +
|
1062
|
+
function Nt(t, e, n) {
|
1063
|
+
if (!e.has(t)) throw new TypeError("attempted to " + n + " private field on non-instance");
|
1038
1064
|
return e.get(t);
|
1039
1065
|
}
|
1040
|
-
function
|
1041
|
-
var
|
1042
|
-
return
|
1066
|
+
function rr(t, e) {
|
1067
|
+
var n = Nt(t, e, "get");
|
1068
|
+
return nr(t, n);
|
1043
1069
|
}
|
1044
|
-
function
|
1070
|
+
function ir(t, e) {
|
1045
1071
|
if (e.has(t))
|
1046
1072
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
1047
1073
|
}
|
1048
|
-
function
|
1049
|
-
|
1074
|
+
function lr(t, e, n) {
|
1075
|
+
ir(t, e), e.set(t, n);
|
1050
1076
|
}
|
1051
|
-
function
|
1052
|
-
if (e.set) e.set.call(t,
|
1077
|
+
function sr(t, e, n) {
|
1078
|
+
if (e.set) e.set.call(t, n);
|
1053
1079
|
else {
|
1054
1080
|
if (!e.writable)
|
1055
1081
|
throw new TypeError("attempted to set read only private field");
|
1056
|
-
e.value =
|
1082
|
+
e.value = n;
|
1057
1083
|
}
|
1058
1084
|
}
|
1059
|
-
function
|
1060
|
-
var
|
1061
|
-
return
|
1085
|
+
function pt(t, e, n) {
|
1086
|
+
var r = Nt(t, e, "set");
|
1087
|
+
return sr(t, r, n), n;
|
1062
1088
|
}
|
1063
|
-
function
|
1064
|
-
let e = ce(
|
1089
|
+
function ar(t) {
|
1090
|
+
let e = ce(Ot);
|
1065
1091
|
if (e) {
|
1066
|
-
let { register:
|
1067
|
-
t =
|
1092
|
+
let { register: n, ...r } = e;
|
1093
|
+
t = ee(r, t), n();
|
1068
1094
|
}
|
1069
|
-
return
|
1095
|
+
return Wn(e, t.ref), t;
|
1070
1096
|
}
|
1071
|
-
var
|
1072
|
-
class
|
1097
|
+
var $e = /* @__PURE__ */ new WeakMap();
|
1098
|
+
class me {
|
1073
1099
|
continuePropagation() {
|
1074
|
-
|
1100
|
+
pt(this, $e, !1);
|
1075
1101
|
}
|
1076
1102
|
get shouldStopPropagation() {
|
1077
|
-
return
|
1103
|
+
return rr(this, $e);
|
1078
1104
|
}
|
1079
|
-
constructor(e,
|
1080
|
-
|
1105
|
+
constructor(e, n, r, i) {
|
1106
|
+
lr(this, $e, {
|
1081
1107
|
writable: !0,
|
1082
1108
|
value: void 0
|
1083
|
-
}),
|
1084
|
-
var
|
1085
|
-
let
|
1086
|
-
const
|
1087
|
-
let
|
1088
|
-
|
1109
|
+
}), pt(this, $e, !0);
|
1110
|
+
var o;
|
1111
|
+
let s = (o = i == null ? void 0 : i.target) !== null && o !== void 0 ? o : r.currentTarget;
|
1112
|
+
const d = s == null ? void 0 : s.getBoundingClientRect();
|
1113
|
+
let c, b = 0, y, T = null;
|
1114
|
+
r.clientX != null && r.clientY != null && (y = r.clientX, T = r.clientY), d && (y != null && T != null ? (c = y - d.left, b = T - d.top) : (c = d.width / 2, b = d.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 = c, this.y = b;
|
1089
1115
|
}
|
1090
1116
|
}
|
1091
|
-
const
|
1092
|
-
function
|
1117
|
+
const bt = Symbol("linkClicked");
|
1118
|
+
function Rt(t) {
|
1093
1119
|
let {
|
1094
1120
|
onPress: e,
|
1095
|
-
onPressChange:
|
1096
|
-
onPressStart:
|
1121
|
+
onPressChange: n,
|
1122
|
+
onPressStart: r,
|
1097
1123
|
onPressEnd: i,
|
1098
|
-
onPressUp:
|
1099
|
-
isDisabled:
|
1100
|
-
isPressed:
|
1101
|
-
preventFocusOnPress:
|
1102
|
-
shouldCancelOnPointerExit:
|
1103
|
-
allowTextSelectionOnPress:
|
1124
|
+
onPressUp: o,
|
1125
|
+
isDisabled: s,
|
1126
|
+
isPressed: d,
|
1127
|
+
preventFocusOnPress: c,
|
1128
|
+
shouldCancelOnPointerExit: b,
|
1129
|
+
allowTextSelectionOnPress: y,
|
1104
1130
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
1105
|
-
ref:
|
1106
|
-
|
1107
|
-
} =
|
1131
|
+
ref: T,
|
1132
|
+
...S
|
1133
|
+
} = ar(t), [m, L] = H(!1), w = M({
|
1108
1134
|
isPressed: !1,
|
1109
1135
|
ignoreEmulatedMouseEvents: !1,
|
1110
1136
|
ignoreClickAfterPress: !1,
|
@@ -1114,168 +1140,175 @@ function Ct(t) {
|
|
1114
1140
|
target: null,
|
1115
1141
|
isOverTarget: !1,
|
1116
1142
|
pointerType: null
|
1117
|
-
}), { addGlobalListener:
|
1118
|
-
let
|
1119
|
-
if (
|
1120
|
-
let
|
1121
|
-
if (
|
1122
|
-
let
|
1123
|
-
|
1143
|
+
}), { addGlobalListener: _, removeAllGlobalListeners: K } = It(), x = Q((l, h) => {
|
1144
|
+
let C = w.current;
|
1145
|
+
if (s || C.didFirePressStart) return !1;
|
1146
|
+
let p = !0;
|
1147
|
+
if (C.isTriggeringEvent = !0, r) {
|
1148
|
+
let k = new me("pressstart", h, l);
|
1149
|
+
r(k), p = k.shouldStopPropagation;
|
1124
1150
|
}
|
1125
|
-
return
|
1126
|
-
}),
|
1127
|
-
let
|
1128
|
-
if (!
|
1129
|
-
|
1130
|
-
let
|
1151
|
+
return n && n(!0), C.isTriggeringEvent = !1, C.didFirePressStart = !0, L(!0), p;
|
1152
|
+
}), v = Q((l, h, C = !0) => {
|
1153
|
+
let p = w.current;
|
1154
|
+
if (!p.didFirePressStart) return !1;
|
1155
|
+
p.ignoreClickAfterPress = !0, p.didFirePressStart = !1, p.isTriggeringEvent = !0;
|
1156
|
+
let k = !0;
|
1131
1157
|
if (i) {
|
1132
|
-
let
|
1133
|
-
i(
|
1158
|
+
let a = new me("pressend", h, l);
|
1159
|
+
i(a), k = a.shouldStopPropagation;
|
1134
1160
|
}
|
1135
|
-
if (
|
1136
|
-
let
|
1137
|
-
e(
|
1161
|
+
if (n && n(!1), L(!1), e && C && !s) {
|
1162
|
+
let a = new me("press", h, l);
|
1163
|
+
e(a), k && (k = a.shouldStopPropagation);
|
1138
1164
|
}
|
1139
|
-
return
|
1140
|
-
}), D =
|
1141
|
-
let
|
1142
|
-
if (
|
1143
|
-
if (
|
1144
|
-
|
1145
|
-
let
|
1146
|
-
return
|
1165
|
+
return p.isTriggeringEvent = !1, k;
|
1166
|
+
}), D = Q((l, h) => {
|
1167
|
+
let C = w.current;
|
1168
|
+
if (s) return !1;
|
1169
|
+
if (o) {
|
1170
|
+
C.isTriggeringEvent = !0;
|
1171
|
+
let p = new me("pressup", h, l);
|
1172
|
+
return o(p), C.isTriggeringEvent = !1, p.shouldStopPropagation;
|
1147
1173
|
}
|
1148
1174
|
return !0;
|
1149
|
-
}),
|
1150
|
-
let
|
1151
|
-
|
1152
|
-
}),
|
1153
|
-
|
1154
|
-
}),
|
1155
|
-
let l =
|
1156
|
-
onKeyDown(
|
1157
|
-
if (
|
1158
|
-
var
|
1159
|
-
|
1160
|
-
let
|
1161
|
-
if (!l.isPressed && !
|
1162
|
-
l.target =
|
1163
|
-
let
|
1164
|
-
|
1175
|
+
}), P = Q((l) => {
|
1176
|
+
let h = w.current;
|
1177
|
+
h.isPressed && h.target && (h.isOverTarget && h.pointerType != null && v(j(h.target, l), h.pointerType, !1), h.isPressed = !1, h.isOverTarget = !1, h.activePointerId = null, h.pointerType = null, K(), y || ve(h.target));
|
1178
|
+
}), A = Q((l) => {
|
1179
|
+
b && P(l);
|
1180
|
+
}), z = X(() => {
|
1181
|
+
let l = w.current, h = {
|
1182
|
+
onKeyDown(p) {
|
1183
|
+
if (Fe(p.nativeEvent, p.currentTarget) && p.currentTarget.contains(p.target)) {
|
1184
|
+
var k;
|
1185
|
+
ht(p.target, p.key) && p.preventDefault();
|
1186
|
+
let a = !0;
|
1187
|
+
if (!l.isPressed && !p.repeat) {
|
1188
|
+
l.target = p.currentTarget, l.isPressed = !0, a = x(p, "keyboard");
|
1189
|
+
let u = p.currentTarget, $ = (E) => {
|
1190
|
+
Fe(E, u) && !E.repeat && u.contains(E.target) && l.target && D(j(l.target, E), "keyboard");
|
1165
1191
|
};
|
1166
|
-
|
1192
|
+
_(N(p.currentTarget), "keyup", _t($, C), !0);
|
1167
1193
|
}
|
1168
|
-
|
1169
|
-
} else
|
1194
|
+
a && p.stopPropagation(), p.metaKey && le() && ((k = l.metaKeyEvents) === null || k === void 0 || k.set(p.key, p.nativeEvent));
|
1195
|
+
} else p.key === "Meta" && (l.metaKeyEvents = /* @__PURE__ */ new Map());
|
1170
1196
|
},
|
1171
|
-
onClick(
|
1172
|
-
if (!(
|
1173
|
-
let
|
1174
|
-
if (
|
1175
|
-
!
|
1176
|
-
let
|
1177
|
-
|
1197
|
+
onClick(p) {
|
1198
|
+
if (!(p && !p.currentTarget.contains(p.target)) && p && p.button === 0 && !l.isTriggeringEvent && !se.isOpening) {
|
1199
|
+
let k = !0;
|
1200
|
+
if (s && p.preventDefault(), !l.ignoreClickAfterPress && !l.ignoreEmulatedMouseEvents && !l.isPressed && (l.pointerType === "virtual" || Re(p.nativeEvent))) {
|
1201
|
+
!s && !c && G(p.currentTarget);
|
1202
|
+
let a = x(p, "virtual"), u = D(p, "virtual"), $ = v(p, "virtual");
|
1203
|
+
k = a && u && $;
|
1178
1204
|
}
|
1179
|
-
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1,
|
1205
|
+
l.ignoreEmulatedMouseEvents = !1, l.ignoreClickAfterPress = !1, k && p.stopPropagation();
|
1180
1206
|
}
|
1181
1207
|
}
|
1182
|
-
},
|
1183
|
-
var
|
1184
|
-
if (l.isPressed && l.target &&
|
1185
|
-
var
|
1186
|
-
|
1187
|
-
let
|
1188
|
-
|
1189
|
-
} else if (
|
1190
|
-
var
|
1191
|
-
let
|
1208
|
+
}, C = (p) => {
|
1209
|
+
var k;
|
1210
|
+
if (l.isPressed && l.target && Fe(p, l.target)) {
|
1211
|
+
var a;
|
1212
|
+
ht(p.target, p.key) && p.preventDefault();
|
1213
|
+
let $ = p.target;
|
1214
|
+
v(j(l.target, p), "keyboard", l.target.contains($)), K(), p.key !== "Enter" && Je(l.target) && l.target.contains($) && !p[bt] && (p[bt] = !0, se(l.target, p, !1)), l.isPressed = !1, (a = l.metaKeyEvents) === null || a === void 0 || a.delete(p.key);
|
1215
|
+
} else if (p.key === "Meta" && (!((k = l.metaKeyEvents) === null || k === void 0) && k.size)) {
|
1216
|
+
var u;
|
1217
|
+
let $ = l.metaKeyEvents;
|
1192
1218
|
l.metaKeyEvents = void 0;
|
1193
|
-
for (let
|
1219
|
+
for (let E of $.values()) (u = l.target) === null || u === void 0 || u.dispatchEvent(new KeyboardEvent("keyup", E));
|
1194
1220
|
}
|
1195
1221
|
};
|
1196
1222
|
if (typeof PointerEvent < "u") {
|
1197
|
-
|
1223
|
+
h.onPointerDown = (u) => {
|
1198
1224
|
if (u.button !== 0 || !u.currentTarget.contains(u.target)) return;
|
1199
|
-
if (
|
1225
|
+
if (qn(u.nativeEvent)) {
|
1200
1226
|
l.pointerType = "virtual";
|
1201
1227
|
return;
|
1202
1228
|
}
|
1203
|
-
|
1204
|
-
let
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1229
|
+
Oe(u.currentTarget) && u.preventDefault(), l.pointerType = u.pointerType;
|
1230
|
+
let $ = !0;
|
1231
|
+
if (!l.isPressed) {
|
1232
|
+
l.isPressed = !0, l.isOverTarget = !0, l.activePointerId = u.pointerId, l.target = u.currentTarget, !s && !c && G(u.currentTarget), y || ft(l.target), $ = x(u, l.pointerType);
|
1233
|
+
let E = u.target;
|
1234
|
+
"releasePointerCapture" in E && E.releasePointerCapture(u.pointerId), _(N(u.currentTarget), "pointerup", p, !1), _(N(u.currentTarget), "pointercancel", a, !1);
|
1235
|
+
}
|
1236
|
+
$ && u.stopPropagation();
|
1237
|
+
}, h.onMouseDown = (u) => {
|
1238
|
+
u.currentTarget.contains(u.target) && u.button === 0 && (Oe(u.currentTarget) && u.preventDefault(), u.stopPropagation());
|
1239
|
+
}, h.onPointerUp = (u) => {
|
1240
|
+
!u.currentTarget.contains(u.target) || l.pointerType === "virtual" || u.button === 0 && D(u, l.pointerType || u.pointerType);
|
1241
|
+
}, h.onPointerEnter = (u) => {
|
1242
|
+
u.pointerId === l.activePointerId && l.target && !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, x(j(l.target, u), l.pointerType));
|
1243
|
+
}, h.onPointerLeave = (u) => {
|
1244
|
+
u.pointerId === l.activePointerId && l.target && l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, v(j(l.target, u), l.pointerType, !1), A(u));
|
1210
1245
|
};
|
1211
|
-
let
|
1212
|
-
u.pointerId === l.activePointerId &&
|
1213
|
-
}, T = (u) => {
|
1214
|
-
u.pointerId === l.activePointerId && l.isPressed && u.button === 0 && l.target && (ie(u, l.target) && l.pointerType != null ? K(W(l.target, u), l.pointerType) : l.isOverTarget && l.pointerType != null && K(W(l.target, u), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, E(), v || he(l.target), "ontouchend" in l.target && u.pointerType !== "mouse" && P(l.target, "touchend", c, {
|
1246
|
+
let p = (u) => {
|
1247
|
+
u.pointerId === l.activePointerId && l.isPressed && u.button === 0 && l.target && (l.target.contains(u.target) && l.pointerType != null ? v(j(l.target, u), l.pointerType) : l.isOverTarget && l.pointerType != null && v(j(l.target, u), l.pointerType, !1), l.isPressed = !1, l.isOverTarget = !1, l.activePointerId = null, l.pointerType = null, K(), y || ve(l.target), "ontouchend" in l.target && u.pointerType !== "mouse" && _(l.target, "touchend", k, {
|
1215
1248
|
once: !0
|
1216
1249
|
}));
|
1217
|
-
},
|
1218
|
-
|
1219
|
-
},
|
1220
|
-
|
1250
|
+
}, k = (u) => {
|
1251
|
+
Bt(u.currentTarget) && u.preventDefault();
|
1252
|
+
}, a = (u) => {
|
1253
|
+
P(u);
|
1221
1254
|
};
|
1222
|
-
|
1223
|
-
u.currentTarget.contains(u.target) &&
|
1255
|
+
h.onDragStart = (u) => {
|
1256
|
+
u.currentTarget.contains(u.target) && P(u);
|
1224
1257
|
};
|
1225
1258
|
} else {
|
1226
|
-
|
1227
|
-
if (
|
1228
|
-
if (
|
1229
|
-
|
1259
|
+
h.onMouseDown = (a) => {
|
1260
|
+
if (a.button !== 0 || !a.currentTarget.contains(a.target)) return;
|
1261
|
+
if (Oe(a.currentTarget) && a.preventDefault(), l.ignoreEmulatedMouseEvents) {
|
1262
|
+
a.stopPropagation();
|
1230
1263
|
return;
|
1231
1264
|
}
|
1232
|
-
l.isPressed = !0, l.isOverTarget = !0, l.target =
|
1233
|
-
},
|
1234
|
-
if (!
|
1235
|
-
let
|
1236
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0,
|
1237
|
-
},
|
1238
|
-
if (!
|
1239
|
-
let
|
1240
|
-
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1,
|
1241
|
-
},
|
1242
|
-
|
1265
|
+
l.isPressed = !0, l.isOverTarget = !0, l.target = a.currentTarget, l.pointerType = Re(a.nativeEvent) ? "virtual" : "mouse", !s && !c && G(a.currentTarget), x(a, l.pointerType) && a.stopPropagation(), _(N(a.currentTarget), "mouseup", p, !1);
|
1266
|
+
}, h.onMouseEnter = (a) => {
|
1267
|
+
if (!a.currentTarget.contains(a.target)) return;
|
1268
|
+
let u = !0;
|
1269
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !0, u = x(a, l.pointerType)), u && a.stopPropagation();
|
1270
|
+
}, h.onMouseLeave = (a) => {
|
1271
|
+
if (!a.currentTarget.contains(a.target)) return;
|
1272
|
+
let u = !0;
|
1273
|
+
l.isPressed && !l.ignoreEmulatedMouseEvents && l.pointerType != null && (l.isOverTarget = !1, u = v(a, l.pointerType, !1), A(a)), u && a.stopPropagation();
|
1274
|
+
}, h.onMouseUp = (a) => {
|
1275
|
+
a.currentTarget.contains(a.target) && !l.ignoreEmulatedMouseEvents && a.button === 0 && D(a, l.pointerType || "mouse");
|
1243
1276
|
};
|
1244
|
-
let
|
1245
|
-
if (
|
1246
|
-
if (l.isPressed = !1,
|
1277
|
+
let p = (a) => {
|
1278
|
+
if (a.button === 0) {
|
1279
|
+
if (l.isPressed = !1, K(), l.ignoreEmulatedMouseEvents) {
|
1247
1280
|
l.ignoreEmulatedMouseEvents = !1;
|
1248
1281
|
return;
|
1249
1282
|
}
|
1250
|
-
l.target &&
|
1283
|
+
l.target && ze(a, l.target) && l.pointerType != null ? v(j(l.target, a), l.pointerType) : l.target && l.isOverTarget && l.pointerType != null && v(j(l.target, a), l.pointerType, !1), l.isOverTarget = !1;
|
1251
1284
|
}
|
1252
1285
|
};
|
1253
|
-
|
1254
|
-
if (!
|
1255
|
-
let
|
1256
|
-
if (!
|
1257
|
-
l.activePointerId =
|
1258
|
-
},
|
1259
|
-
if (!
|
1286
|
+
h.onTouchStart = (a) => {
|
1287
|
+
if (!a.currentTarget.contains(a.target)) return;
|
1288
|
+
let u = or(a.nativeEvent);
|
1289
|
+
if (!u) return;
|
1290
|
+
l.activePointerId = u.identifier, l.ignoreEmulatedMouseEvents = !0, l.isOverTarget = !0, l.isPressed = !0, l.target = a.currentTarget, l.pointerType = "touch", !s && !c && G(a.currentTarget), y || ft(l.target), x(J(l.target, a), l.pointerType) && a.stopPropagation(), _(ie(a.currentTarget), "scroll", k, !0);
|
1291
|
+
}, h.onTouchMove = (a) => {
|
1292
|
+
if (!a.currentTarget.contains(a.target)) return;
|
1260
1293
|
if (!l.isPressed) {
|
1261
|
-
|
1294
|
+
a.stopPropagation();
|
1262
1295
|
return;
|
1263
1296
|
}
|
1264
|
-
let
|
1265
|
-
|
1266
|
-
},
|
1267
|
-
if (!
|
1297
|
+
let u = yt(a.nativeEvent, l.activePointerId), $ = !0;
|
1298
|
+
u && ze(u, a.currentTarget) ? !l.isOverTarget && l.pointerType != null && (l.isOverTarget = !0, $ = x(J(l.target, a), l.pointerType)) : l.isOverTarget && l.pointerType != null && (l.isOverTarget = !1, $ = v(J(l.target, a), l.pointerType, !1), A(J(l.target, a))), $ && a.stopPropagation();
|
1299
|
+
}, h.onTouchEnd = (a) => {
|
1300
|
+
if (!a.currentTarget.contains(a.target)) return;
|
1268
1301
|
if (!l.isPressed) {
|
1269
|
-
|
1302
|
+
a.stopPropagation();
|
1270
1303
|
return;
|
1271
1304
|
}
|
1272
|
-
let
|
1273
|
-
|
1274
|
-
},
|
1275
|
-
|
1305
|
+
let u = yt(a.nativeEvent, l.activePointerId), $ = !0;
|
1306
|
+
u && ze(u, a.currentTarget) && l.pointerType != null ? (D(J(l.target, a), l.pointerType), $ = v(J(l.target, a), l.pointerType)) : l.isOverTarget && l.pointerType != null && ($ = v(J(l.target, a), l.pointerType, !1)), $ && a.stopPropagation(), l.isPressed = !1, l.activePointerId = null, l.isOverTarget = !1, l.ignoreEmulatedMouseEvents = !0, l.target && !y && ve(l.target), K();
|
1307
|
+
}, h.onTouchCancel = (a) => {
|
1308
|
+
a.currentTarget.contains(a.target) && (a.stopPropagation(), l.isPressed && P(J(l.target, a)));
|
1276
1309
|
};
|
1277
|
-
let
|
1278
|
-
l.isPressed &&
|
1310
|
+
let k = (a) => {
|
1311
|
+
l.isPressed && a.target.contains(l.target) && P({
|
1279
1312
|
currentTarget: l.target,
|
1280
1313
|
shiftKey: !1,
|
1281
1314
|
ctrlKey: !1,
|
@@ -1283,103 +1316,103 @@ function Ct(t) {
|
|
1283
1316
|
altKey: !1
|
1284
1317
|
});
|
1285
1318
|
};
|
1286
|
-
|
1287
|
-
|
1319
|
+
h.onDragStart = (a) => {
|
1320
|
+
a.currentTarget.contains(a.target) && P(a);
|
1288
1321
|
};
|
1289
1322
|
}
|
1290
|
-
return
|
1323
|
+
return h;
|
1291
1324
|
}, [
|
1292
|
-
P,
|
1293
|
-
o,
|
1294
|
-
p,
|
1295
|
-
E,
|
1296
|
-
v,
|
1297
1325
|
_,
|
1298
|
-
|
1326
|
+
s,
|
1327
|
+
c,
|
1299
1328
|
K,
|
1329
|
+
y,
|
1330
|
+
P,
|
1331
|
+
A,
|
1332
|
+
v,
|
1300
1333
|
x,
|
1301
1334
|
D
|
1302
1335
|
]);
|
1303
|
-
return
|
1336
|
+
return R(() => () => {
|
1304
1337
|
var l;
|
1305
|
-
|
1338
|
+
y || ve((l = w.current.target) !== null && l !== void 0 ? l : void 0);
|
1306
1339
|
}, [
|
1307
|
-
|
1340
|
+
y
|
1308
1341
|
]), {
|
1309
|
-
isPressed:
|
1310
|
-
pressProps:
|
1342
|
+
isPressed: d || m,
|
1343
|
+
pressProps: ee(S, z)
|
1311
1344
|
};
|
1312
1345
|
}
|
1313
|
-
function
|
1346
|
+
function Je(t) {
|
1314
1347
|
return t.tagName === "A" && t.hasAttribute("href");
|
1315
1348
|
}
|
1316
|
-
function
|
1317
|
-
const { key:
|
1318
|
-
return (
|
1319
|
-
!((
|
1349
|
+
function Fe(t, e) {
|
1350
|
+
const { key: n, code: r } = t, i = e, o = i.getAttribute("role");
|
1351
|
+
return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof ie(i).HTMLInputElement && !Ut(i, n) || i instanceof ie(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
1352
|
+
!((o === "link" || !o && Je(i)) && n !== "Enter");
|
1320
1353
|
}
|
1321
|
-
function
|
1354
|
+
function or(t) {
|
1322
1355
|
const { targetTouches: e } = t;
|
1323
1356
|
return e.length > 0 ? e[0] : null;
|
1324
1357
|
}
|
1325
|
-
function
|
1326
|
-
const
|
1327
|
-
for (let
|
1328
|
-
const i = r
|
1358
|
+
function yt(t, e) {
|
1359
|
+
const n = t.changedTouches;
|
1360
|
+
for (let r = 0; r < n.length; r++) {
|
1361
|
+
const i = n[r];
|
1329
1362
|
if (i.identifier === e) return i;
|
1330
1363
|
}
|
1331
1364
|
return null;
|
1332
1365
|
}
|
1333
|
-
function
|
1334
|
-
let
|
1335
|
-
return e.targetTouches && e.targetTouches.length === 1 && (
|
1366
|
+
function J(t, e) {
|
1367
|
+
let n = 0, r = 0;
|
1368
|
+
return e.targetTouches && e.targetTouches.length === 1 && (n = e.targetTouches[0].clientX, r = e.targetTouches[0].clientY), {
|
1336
1369
|
currentTarget: t,
|
1337
1370
|
shiftKey: e.shiftKey,
|
1338
1371
|
ctrlKey: e.ctrlKey,
|
1339
1372
|
metaKey: e.metaKey,
|
1340
1373
|
altKey: e.altKey,
|
1341
|
-
clientX:
|
1342
|
-
clientY:
|
1374
|
+
clientX: n,
|
1375
|
+
clientY: r
|
1343
1376
|
};
|
1344
1377
|
}
|
1345
|
-
function
|
1346
|
-
let
|
1378
|
+
function j(t, e) {
|
1379
|
+
let n = e.clientX, r = e.clientY;
|
1347
1380
|
return {
|
1348
1381
|
currentTarget: t,
|
1349
1382
|
shiftKey: e.shiftKey,
|
1350
1383
|
ctrlKey: e.ctrlKey,
|
1351
1384
|
metaKey: e.metaKey,
|
1352
1385
|
altKey: e.altKey,
|
1353
|
-
clientX:
|
1354
|
-
clientY:
|
1386
|
+
clientX: n,
|
1387
|
+
clientY: r
|
1355
1388
|
};
|
1356
1389
|
}
|
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 -
|
1390
|
+
function ur(t) {
|
1391
|
+
let e = 0, n = 0;
|
1392
|
+
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), {
|
1393
|
+
top: t.clientY - n,
|
1361
1394
|
right: t.clientX + e,
|
1362
|
-
bottom: t.clientY +
|
1395
|
+
bottom: t.clientY + n,
|
1363
1396
|
left: t.clientX - e
|
1364
1397
|
};
|
1365
1398
|
}
|
1366
|
-
function
|
1399
|
+
function dr(t, e) {
|
1367
1400
|
return !(t.left > e.right || e.left > t.right || t.top > e.bottom || e.top > t.bottom);
|
1368
1401
|
}
|
1369
|
-
function
|
1370
|
-
let
|
1371
|
-
return
|
1402
|
+
function ze(t, e) {
|
1403
|
+
let n = e.getBoundingClientRect(), r = ur(t);
|
1404
|
+
return dr(n, r);
|
1372
1405
|
}
|
1373
|
-
function
|
1406
|
+
function Oe(t) {
|
1374
1407
|
return !(t instanceof HTMLElement) || !t.hasAttribute("draggable");
|
1375
1408
|
}
|
1376
|
-
function
|
1377
|
-
return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !
|
1409
|
+
function Bt(t) {
|
1410
|
+
return t instanceof HTMLInputElement ? !1 : t instanceof HTMLButtonElement ? t.type !== "submit" && t.type !== "reset" : !Je(t);
|
1378
1411
|
}
|
1379
|
-
function
|
1380
|
-
return t instanceof HTMLInputElement ? !
|
1412
|
+
function ht(t, e) {
|
1413
|
+
return t instanceof HTMLInputElement ? !Ut(t, e) : Bt(t);
|
1381
1414
|
}
|
1382
|
-
const
|
1415
|
+
const cr = /* @__PURE__ */ new Set([
|
1383
1416
|
"checkbox",
|
1384
1417
|
"radio",
|
1385
1418
|
"range",
|
@@ -1390,131 +1423,131 @@ const tn = /* @__PURE__ */ new Set([
|
|
1390
1423
|
"submit",
|
1391
1424
|
"reset"
|
1392
1425
|
]);
|
1393
|
-
function
|
1394
|
-
return t.type === "checkbox" || t.type === "radio" ? e === " " :
|
1426
|
+
function Ut(t, e) {
|
1427
|
+
return t.type === "checkbox" || t.type === "radio" ? e === " " : cr.has(t.type);
|
1395
1428
|
}
|
1396
|
-
let
|
1397
|
-
function
|
1398
|
-
for (let
|
1429
|
+
let ye = null, fr = /* @__PURE__ */ new Set(), pe = /* @__PURE__ */ new Map(), ae = !1, He = !1;
|
1430
|
+
function Ze(t, e) {
|
1431
|
+
for (let n of fr) n(t, e);
|
1399
1432
|
}
|
1400
|
-
function
|
1401
|
-
return !(t.metaKey || !
|
1433
|
+
function pr(t) {
|
1434
|
+
return !(t.metaKey || !le() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
|
1402
1435
|
}
|
1403
|
-
function
|
1404
|
-
|
1436
|
+
function we(t) {
|
1437
|
+
ae = !0, pr(t) && (ye = "keyboard", Ze("keyboard", t));
|
1405
1438
|
}
|
1406
|
-
function
|
1407
|
-
|
1439
|
+
function O(t) {
|
1440
|
+
ye = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (ae = !0, Ze("pointer", t));
|
1408
1441
|
}
|
1409
|
-
function
|
1410
|
-
|
1442
|
+
function Ht(t) {
|
1443
|
+
Re(t) && (ae = !0, ye = "virtual");
|
1411
1444
|
}
|
1412
|
-
function
|
1413
|
-
t.target === window || t.target === document || (!
|
1445
|
+
function Vt(t) {
|
1446
|
+
t.target === window || t.target === document || (!ae && !He && (ye = "virtual", Ze("virtual", t)), ae = !1, He = !1);
|
1414
1447
|
}
|
1415
|
-
function
|
1416
|
-
|
1448
|
+
function Wt() {
|
1449
|
+
ae = !1, He = !0;
|
1417
1450
|
}
|
1418
|
-
function
|
1419
|
-
if (typeof window > "u" ||
|
1420
|
-
const e =
|
1421
|
-
let
|
1451
|
+
function gt(t) {
|
1452
|
+
if (typeof window > "u" || pe.get(ie(t))) return;
|
1453
|
+
const e = ie(t), n = N(t);
|
1454
|
+
let r = e.HTMLElement.prototype.focus;
|
1422
1455
|
e.HTMLElement.prototype.focus = function() {
|
1423
|
-
|
1424
|
-
},
|
1425
|
-
|
1456
|
+
ae = !0, r.apply(this, arguments);
|
1457
|
+
}, n.addEventListener("keydown", we, !0), n.addEventListener("keyup", we, !0), n.addEventListener("click", Ht, !0), e.addEventListener("focus", Vt, !0), e.addEventListener("blur", Wt, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", O, !0), n.addEventListener("pointermove", O, !0), n.addEventListener("pointerup", O, !0)) : (n.addEventListener("mousedown", O, !0), n.addEventListener("mousemove", O, !0), n.addEventListener("mouseup", O, !0)), e.addEventListener("beforeunload", () => {
|
1458
|
+
jt(t);
|
1426
1459
|
}, {
|
1427
1460
|
once: !0
|
1428
|
-
}),
|
1429
|
-
focus:
|
1461
|
+
}), pe.set(e, {
|
1462
|
+
focus: r
|
1430
1463
|
});
|
1431
1464
|
}
|
1432
|
-
const
|
1433
|
-
const
|
1434
|
-
e &&
|
1465
|
+
const jt = (t, e) => {
|
1466
|
+
const n = ie(t), r = N(t);
|
1467
|
+
e && r.removeEventListener("DOMContentLoaded", e), pe.has(n) && (n.HTMLElement.prototype.focus = pe.get(n).focus, r.removeEventListener("keydown", we, !0), r.removeEventListener("keyup", we, !0), r.removeEventListener("click", Ht, !0), n.removeEventListener("focus", Vt, !0), n.removeEventListener("blur", Wt, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", O, !0), r.removeEventListener("pointermove", O, !0), r.removeEventListener("pointerup", O, !0)) : (r.removeEventListener("mousedown", O, !0), r.removeEventListener("mousemove", O, !0), r.removeEventListener("mouseup", O, !0)), pe.delete(n));
|
1435
1468
|
};
|
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
|
-
const
|
1448
|
-
function
|
1449
|
-
let { isDisabled: e, onLongPressStart:
|
1450
|
-
const
|
1451
|
-
let { addGlobalListener:
|
1469
|
+
function br(t) {
|
1470
|
+
const e = N(t);
|
1471
|
+
let n;
|
1472
|
+
return e.readyState !== "loading" ? gt(t) : (n = () => {
|
1473
|
+
gt(t);
|
1474
|
+
}, e.addEventListener("DOMContentLoaded", n)), () => jt(t, n);
|
1475
|
+
}
|
1476
|
+
typeof document < "u" && br();
|
1477
|
+
function Ve() {
|
1478
|
+
return ye;
|
1479
|
+
}
|
1480
|
+
const yr = 500;
|
1481
|
+
function hr(t) {
|
1482
|
+
let { isDisabled: e, onLongPressStart: n, onLongPressEnd: r, onLongPress: i, threshold: o = yr, accessibilityDescription: s } = t;
|
1483
|
+
const d = M(void 0);
|
1484
|
+
let { addGlobalListener: c, removeGlobalListener: b } = It(), { pressProps: y } = Rt({
|
1452
1485
|
isDisabled: e,
|
1453
|
-
onPressStart(
|
1454
|
-
if (
|
1455
|
-
|
1486
|
+
onPressStart(S) {
|
1487
|
+
if (S.continuePropagation(), (S.pointerType === "mouse" || S.pointerType === "touch") && (n && n({
|
1488
|
+
...S,
|
1456
1489
|
type: "longpressstart"
|
1457
|
-
}),
|
1458
|
-
|
1490
|
+
}), d.current = setTimeout(() => {
|
1491
|
+
S.target.dispatchEvent(new PointerEvent("pointercancel", {
|
1459
1492
|
bubbles: !0
|
1460
1493
|
})), i && i({
|
1461
|
-
|
1494
|
+
...S,
|
1462
1495
|
type: "longpress"
|
1463
|
-
}),
|
1464
|
-
},
|
1465
|
-
let m = (
|
1466
|
-
|
1496
|
+
}), d.current = void 0;
|
1497
|
+
}, o), S.pointerType === "touch")) {
|
1498
|
+
let m = (L) => {
|
1499
|
+
L.preventDefault();
|
1467
1500
|
};
|
1468
|
-
|
1501
|
+
c(S.target, "contextmenu", m, {
|
1469
1502
|
once: !0
|
1470
|
-
}),
|
1503
|
+
}), c(window, "pointerup", () => {
|
1471
1504
|
setTimeout(() => {
|
1472
|
-
|
1505
|
+
b(S.target, "contextmenu", m);
|
1473
1506
|
}, 30);
|
1474
1507
|
}, {
|
1475
1508
|
once: !0
|
1476
1509
|
});
|
1477
1510
|
}
|
1478
1511
|
},
|
1479
|
-
onPressEnd(
|
1480
|
-
|
1481
|
-
|
1512
|
+
onPressEnd(S) {
|
1513
|
+
d.current && clearTimeout(d.current), r && (S.pointerType === "mouse" || S.pointerType === "touch") && r({
|
1514
|
+
...S,
|
1482
1515
|
type: "longpressend"
|
1483
1516
|
});
|
1484
1517
|
}
|
1485
|
-
}),
|
1518
|
+
}), T = Yn(i && !e ? s : void 0);
|
1486
1519
|
return {
|
1487
|
-
longPressProps:
|
1520
|
+
longPressProps: ee(y, T)
|
1488
1521
|
};
|
1489
1522
|
}
|
1490
|
-
function
|
1491
|
-
const e =
|
1492
|
-
if (
|
1493
|
-
let
|
1494
|
-
|
1495
|
-
e.activeElement ===
|
1523
|
+
function We(t) {
|
1524
|
+
const e = N(t);
|
1525
|
+
if (Ve() === "virtual") {
|
1526
|
+
let n = e.activeElement;
|
1527
|
+
Ct(() => {
|
1528
|
+
e.activeElement === n && t.isConnected && G(t);
|
1496
1529
|
});
|
1497
|
-
} else
|
1530
|
+
} else G(t);
|
1498
1531
|
}
|
1499
|
-
function
|
1500
|
-
const e =
|
1532
|
+
function gr(t) {
|
1533
|
+
const e = ie(t);
|
1501
1534
|
if (!(t instanceof e.HTMLElement) && !(t instanceof e.SVGElement)) return !1;
|
1502
|
-
let { display:
|
1535
|
+
let { display: n, visibility: r } = t.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
|
1503
1536
|
if (i) {
|
1504
|
-
const { getComputedStyle:
|
1505
|
-
let { display:
|
1506
|
-
i =
|
1537
|
+
const { getComputedStyle: o } = t.ownerDocument.defaultView;
|
1538
|
+
let { display: s, visibility: d } = o(t);
|
1539
|
+
i = s !== "none" && d !== "hidden" && d !== "collapse";
|
1507
1540
|
}
|
1508
1541
|
return i;
|
1509
1542
|
}
|
1510
|
-
function
|
1543
|
+
function vr(t, e) {
|
1511
1544
|
return !t.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
1512
1545
|
!t.hasAttribute("data-react-aria-prevent-focus") && (t.nodeName === "DETAILS" && e && e.nodeName !== "SUMMARY" ? t.hasAttribute("open") : !0);
|
1513
1546
|
}
|
1514
|
-
function
|
1515
|
-
return t.nodeName !== "#comment" &&
|
1547
|
+
function Gt(t, e) {
|
1548
|
+
return t.nodeName !== "#comment" && gr(t) && vr(t, e) && (!t.parentElement || Gt(t.parentElement, t));
|
1516
1549
|
}
|
1517
|
-
const
|
1550
|
+
const Qe = [
|
1518
1551
|
"input:not([disabled]):not([type=hidden])",
|
1519
1552
|
"select:not([disabled])",
|
1520
1553
|
"textarea:not([disabled])",
|
@@ -1527,67 +1560,67 @@ const Ge = [
|
|
1527
1560
|
"embed",
|
1528
1561
|
"audio[controls]",
|
1529
1562
|
"video[controls]",
|
1530
|
-
|
1531
|
-
],
|
1532
|
-
|
1533
|
-
const
|
1534
|
-
function
|
1535
|
-
return !t || !e ? !1 : e.some((
|
1536
|
-
}
|
1537
|
-
function
|
1538
|
-
let
|
1539
|
-
acceptNode(
|
1540
|
-
var
|
1541
|
-
return !(e == null || (
|
1563
|
+
'[contenteditable]:not([contenteditable^="false"])'
|
1564
|
+
], $r = Qe.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
1565
|
+
Qe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
1566
|
+
const mr = Qe.join(':not([hidden]):not([tabindex="-1"]),');
|
1567
|
+
function Xt(t, e) {
|
1568
|
+
return !t || !e ? !1 : e.some((n) => n.contains(t));
|
1569
|
+
}
|
1570
|
+
function Yt(t, e, n) {
|
1571
|
+
let r = e != null && e.tabbable ? mr : $r, i = N(t).createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
1572
|
+
acceptNode(o) {
|
1573
|
+
var s;
|
1574
|
+
return !(e == null || (s = e.from) === null || s === void 0) && s.contains(o) ? NodeFilter.FILTER_REJECT : o.matches(r) && Gt(o) && (!n || Xt(o, n)) && (!(e != null && e.accept) || e.accept(o)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
1542
1575
|
}
|
1543
1576
|
});
|
1544
1577
|
return e != null && e.from && (i.currentNode = e.from), i;
|
1545
1578
|
}
|
1546
|
-
class
|
1579
|
+
class et {
|
1547
1580
|
get size() {
|
1548
1581
|
return this.fastMap.size;
|
1549
1582
|
}
|
1550
1583
|
getTreeNode(e) {
|
1551
1584
|
return this.fastMap.get(e);
|
1552
1585
|
}
|
1553
|
-
addTreeNode(e,
|
1554
|
-
let i = this.fastMap.get(
|
1586
|
+
addTreeNode(e, n, r) {
|
1587
|
+
let i = this.fastMap.get(n ?? null);
|
1555
1588
|
if (!i) return;
|
1556
|
-
let
|
1589
|
+
let o = new vt({
|
1557
1590
|
scopeRef: e
|
1558
1591
|
});
|
1559
|
-
i.addChild(
|
1592
|
+
i.addChild(o), o.parent = i, this.fastMap.set(e, o), r && (o.nodeToRestore = r);
|
1560
1593
|
}
|
1561
1594
|
addNode(e) {
|
1562
1595
|
this.fastMap.set(e.scopeRef, e);
|
1563
1596
|
}
|
1564
1597
|
removeTreeNode(e) {
|
1565
1598
|
if (e === null) return;
|
1566
|
-
let
|
1567
|
-
if (!
|
1568
|
-
let
|
1569
|
-
for (let
|
1570
|
-
let i =
|
1571
|
-
|
1599
|
+
let n = this.fastMap.get(e);
|
1600
|
+
if (!n) return;
|
1601
|
+
let r = n.parent;
|
1602
|
+
for (let o of this.traverse()) o !== n && n.nodeToRestore && o.nodeToRestore && n.scopeRef && n.scopeRef.current && Xt(o.nodeToRestore, n.scopeRef.current) && (o.nodeToRestore = n.nodeToRestore);
|
1603
|
+
let i = n.children;
|
1604
|
+
r && (r.removeChild(n), i.size > 0 && i.forEach((o) => r && r.addChild(o))), this.fastMap.delete(n.scopeRef);
|
1572
1605
|
}
|
1573
1606
|
// Pre Order Depth First
|
1574
1607
|
*traverse(e = this.root) {
|
1575
|
-
if (e.scopeRef != null && (yield e), e.children.size > 0) for (let
|
1608
|
+
if (e.scopeRef != null && (yield e), e.children.size > 0) for (let n of e.children) yield* this.traverse(n);
|
1576
1609
|
}
|
1577
1610
|
clone() {
|
1578
1611
|
var e;
|
1579
|
-
let
|
1580
|
-
var
|
1581
|
-
for (let i of this.traverse())
|
1582
|
-
return
|
1612
|
+
let n = new et();
|
1613
|
+
var r;
|
1614
|
+
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);
|
1615
|
+
return n;
|
1583
1616
|
}
|
1584
1617
|
constructor() {
|
1585
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new
|
1618
|
+
this.fastMap = /* @__PURE__ */ new Map(), this.root = new vt({
|
1586
1619
|
scopeRef: null
|
1587
1620
|
}), this.fastMap.set(null, this.root);
|
1588
1621
|
}
|
1589
1622
|
}
|
1590
|
-
class
|
1623
|
+
class vt {
|
1591
1624
|
addChild(e) {
|
1592
1625
|
this.children.add(e), e.parent = this;
|
1593
1626
|
}
|
@@ -1598,22 +1631,22 @@ class dt {
|
|
1598
1631
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
|
1599
1632
|
}
|
1600
1633
|
}
|
1601
|
-
new
|
1602
|
-
function
|
1603
|
-
let
|
1604
|
-
return
|
1605
|
-
if (t != null && t.current && !
|
1606
|
-
let
|
1634
|
+
new et();
|
1635
|
+
function Kr(t, e) {
|
1636
|
+
let n = e == null ? void 0 : e.isDisabled, [r, i] = H(!1);
|
1637
|
+
return re(() => {
|
1638
|
+
if (t != null && t.current && !n) {
|
1639
|
+
let o = () => {
|
1607
1640
|
if (t.current) {
|
1608
|
-
let
|
1641
|
+
let d = Yt(t.current, {
|
1609
1642
|
tabbable: !0
|
1610
1643
|
});
|
1611
|
-
i(!!
|
1644
|
+
i(!!d.nextNode());
|
1612
1645
|
}
|
1613
1646
|
};
|
1614
|
-
|
1615
|
-
let
|
1616
|
-
return
|
1647
|
+
o();
|
1648
|
+
let s = new MutationObserver(o);
|
1649
|
+
return s.observe(t.current, {
|
1617
1650
|
subtree: !0,
|
1618
1651
|
childList: !0,
|
1619
1652
|
attributes: !0,
|
@@ -1622,12 +1655,12 @@ function fn(t, e) {
|
|
1622
1655
|
"disabled"
|
1623
1656
|
]
|
1624
1657
|
}), () => {
|
1625
|
-
|
1658
|
+
s.disconnect();
|
1626
1659
|
};
|
1627
1660
|
}
|
1628
|
-
}),
|
1661
|
+
}), n ? !1 : r;
|
1629
1662
|
}
|
1630
|
-
const
|
1663
|
+
const Sr = /* @__PURE__ */ new Set([
|
1631
1664
|
"Arab",
|
1632
1665
|
"Syrc",
|
1633
1666
|
"Samr",
|
@@ -1638,7 +1671,7 @@ const pn = /* @__PURE__ */ new Set([
|
|
1638
1671
|
"Adlm",
|
1639
1672
|
"Rohg",
|
1640
1673
|
"Hebr"
|
1641
|
-
]),
|
1674
|
+
]), Tr = /* @__PURE__ */ new Set([
|
1642
1675
|
"ae",
|
1643
1676
|
"ar",
|
1644
1677
|
"arc",
|
@@ -1659,18 +1692,18 @@ const pn = /* @__PURE__ */ new Set([
|
|
1659
1692
|
"ur",
|
1660
1693
|
"yi"
|
1661
1694
|
]);
|
1662
|
-
function
|
1695
|
+
function wr(t) {
|
1663
1696
|
if (Intl.Locale) {
|
1664
|
-
let
|
1665
|
-
if (
|
1666
|
-
if (
|
1697
|
+
let n = new Intl.Locale(t).maximize(), r = typeof n.getTextInfo == "function" ? n.getTextInfo() : n.textInfo;
|
1698
|
+
if (r) return r.direction === "rtl";
|
1699
|
+
if (n.script) return Sr.has(n.script);
|
1667
1700
|
}
|
1668
1701
|
let e = t.split("-")[0];
|
1669
|
-
return
|
1702
|
+
return Tr.has(e);
|
1670
1703
|
}
|
1671
|
-
const
|
1672
|
-
function
|
1673
|
-
let t = typeof window < "u" && window[
|
1704
|
+
const Pr = Symbol.for("react-aria.i18n.locale");
|
1705
|
+
function qt() {
|
1706
|
+
let t = typeof window < "u" && window[Pr] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
|
1674
1707
|
try {
|
1675
1708
|
Intl.DateTimeFormat.supportedLocalesOf([
|
1676
1709
|
t
|
@@ -1680,336 +1713,394 @@ function Ht() {
|
|
1680
1713
|
}
|
1681
1714
|
return {
|
1682
1715
|
locale: t,
|
1683
|
-
direction:
|
1716
|
+
direction: wr(t) ? "rtl" : "ltr"
|
1684
1717
|
};
|
1685
1718
|
}
|
1686
|
-
let
|
1687
|
-
function
|
1688
|
-
|
1689
|
-
for (let t of
|
1719
|
+
let je = qt(), fe = /* @__PURE__ */ new Set();
|
1720
|
+
function $t() {
|
1721
|
+
je = qt();
|
1722
|
+
for (let t of fe) t(je);
|
1690
1723
|
}
|
1691
|
-
function
|
1692
|
-
let t =
|
1693
|
-
return
|
1694
|
-
|
1724
|
+
function Er() {
|
1725
|
+
let t = xt(), [e, n] = H(je);
|
1726
|
+
return R(() => (fe.size === 0 && window.addEventListener("languagechange", $t), fe.add(n), () => {
|
1727
|
+
fe.delete(n), fe.size === 0 && window.removeEventListener("languagechange", $t);
|
1695
1728
|
}), []), t ? {
|
1696
1729
|
locale: "en-US",
|
1697
1730
|
direction: "ltr"
|
1698
1731
|
} : e;
|
1699
1732
|
}
|
1700
|
-
const
|
1701
|
-
function
|
1702
|
-
let t =
|
1703
|
-
return ce(
|
1733
|
+
const kr = /* @__PURE__ */ V.createContext(null);
|
1734
|
+
function Jt() {
|
1735
|
+
let t = Er();
|
1736
|
+
return ce(kr) || t;
|
1704
1737
|
}
|
1705
|
-
function
|
1706
|
-
let { selectionManager: e, keyboardDelegate:
|
1707
|
-
|
1708
|
-
|
1738
|
+
function xr(t) {
|
1739
|
+
let { selectionManager: e, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: o = !1, disallowEmptySelection: s = !1, disallowSelectAll: d = !1, selectOnFocus: c = e.selectionBehavior === "replace", disallowTypeAhead: b = !1, shouldUseVirtualFocus: y, allowsTabNavigation: T = !1, isVirtualized: S, scrollRef: m = r, linkBehavior: L = "action" } = t, { direction: w } = Jt(), _ = qe(), K = (a) => {
|
1740
|
+
var u;
|
1741
|
+
if (a.altKey && a.key === "Tab" && a.preventDefault(), !(!((u = r.current) === null || u === void 0) && u.contains(a.target))) return;
|
1742
|
+
const $ = (g, te) => {
|
1709
1743
|
if (g != null) {
|
1710
|
-
if (e.isLink(g) &&
|
1711
|
-
|
1712
|
-
|
1744
|
+
if (e.isLink(g) && L === "selection" && c && !Be(a)) {
|
1745
|
+
var q;
|
1746
|
+
sn(() => {
|
1747
|
+
e.setFocusedKey(g, te);
|
1713
1748
|
});
|
1714
|
-
let
|
1715
|
-
|
1749
|
+
let nt = (q = m.current) === null || q === void 0 ? void 0 : q.querySelector(`[data-key="${CSS.escape(g.toString())}"]`), rt = e.getItemProps(g);
|
1750
|
+
nt && _.open(nt, a, rt.href, rt.routerOptions);
|
1716
1751
|
return;
|
1717
1752
|
}
|
1718
|
-
if (e.setFocusedKey(g,
|
1719
|
-
|
1753
|
+
if (e.setFocusedKey(g, te), e.isLink(g) && L === "override") return;
|
1754
|
+
a.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : c && !Be(a) && e.replaceSelection(g);
|
1720
1755
|
}
|
1721
1756
|
};
|
1722
|
-
switch (
|
1757
|
+
switch (a.key) {
|
1723
1758
|
case "ArrowDown":
|
1724
|
-
if (
|
1725
|
-
var
|
1726
|
-
let g = e.focusedKey != null ? (
|
1727
|
-
g == null &&
|
1759
|
+
if (n.getKeyBelow) {
|
1760
|
+
var E, F, f;
|
1761
|
+
let g = e.focusedKey != null ? (E = n.getKeyBelow) === null || E === void 0 ? void 0 : E.call(n, e.focusedKey) : (F = n.getFirstKey) === null || F === void 0 ? void 0 : F.call(n);
|
1762
|
+
g == null && o && (g = (f = n.getFirstKey) === null || f === void 0 ? void 0 : f.call(n, e.focusedKey)), g != null && (a.preventDefault(), $(g));
|
1728
1763
|
}
|
1729
1764
|
break;
|
1730
1765
|
case "ArrowUp":
|
1731
|
-
if (
|
1732
|
-
var
|
1733
|
-
let g = e.focusedKey != null ? (
|
1734
|
-
g == null &&
|
1766
|
+
if (n.getKeyAbove) {
|
1767
|
+
var I, W, Ee;
|
1768
|
+
let g = e.focusedKey != null ? (I = n.getKeyAbove) === null || I === void 0 ? void 0 : I.call(n, e.focusedKey) : (W = n.getLastKey) === null || W === void 0 ? void 0 : W.call(n);
|
1769
|
+
g == null && o && (g = (Ee = n.getLastKey) === null || Ee === void 0 ? void 0 : Ee.call(n, e.focusedKey)), g != null && (a.preventDefault(), $(g));
|
1735
1770
|
}
|
1736
1771
|
break;
|
1737
1772
|
case "ArrowLeft":
|
1738
|
-
if (
|
1739
|
-
var
|
1740
|
-
let g = (
|
1741
|
-
g == null &&
|
1773
|
+
if (n.getKeyLeftOf) {
|
1774
|
+
var ke, xe, _e;
|
1775
|
+
let g = e.focusedKey != null ? (ke = n.getKeyLeftOf) === null || ke === void 0 ? void 0 : ke.call(n, e.focusedKey) : null;
|
1776
|
+
g == null && o && (g = w === "rtl" ? (xe = n.getFirstKey) === null || xe === void 0 ? void 0 : xe.call(n, e.focusedKey) : (_e = n.getLastKey) === null || _e === void 0 ? void 0 : _e.call(n, e.focusedKey)), g != null && (a.preventDefault(), $(g, w === "rtl" ? "first" : "last"));
|
1742
1777
|
}
|
1743
1778
|
break;
|
1744
1779
|
case "ArrowRight":
|
1745
|
-
if (
|
1746
|
-
var
|
1747
|
-
let g = (
|
1748
|
-
g == null &&
|
1780
|
+
if (n.getKeyRightOf) {
|
1781
|
+
var Le, Me, De;
|
1782
|
+
let g = e.focusedKey != null ? (Le = n.getKeyRightOf) === null || Le === void 0 ? void 0 : Le.call(n, e.focusedKey) : null;
|
1783
|
+
g == null && o && (g = w === "rtl" ? (Me = n.getLastKey) === null || Me === void 0 ? void 0 : Me.call(n, e.focusedKey) : (De = n.getFirstKey) === null || De === void 0 ? void 0 : De.call(n, e.focusedKey)), g != null && (a.preventDefault(), $(g, w === "rtl" ? "last" : "first"));
|
1749
1784
|
}
|
1750
1785
|
break;
|
1751
1786
|
case "Home":
|
1752
|
-
if (
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1787
|
+
if (n.getFirstKey) {
|
1788
|
+
if (e.focusedKey === null && a.shiftKey) return;
|
1789
|
+
a.preventDefault();
|
1790
|
+
let g = n.getFirstKey(e.focusedKey, ue(a));
|
1791
|
+
e.setFocusedKey(g), g != null && (ue(a) && a.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : c && e.replaceSelection(g));
|
1756
1792
|
}
|
1757
1793
|
break;
|
1758
1794
|
case "End":
|
1759
|
-
if (
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1795
|
+
if (n.getLastKey) {
|
1796
|
+
if (e.focusedKey === null && a.shiftKey) return;
|
1797
|
+
a.preventDefault();
|
1798
|
+
let g = n.getLastKey(e.focusedKey, ue(a));
|
1799
|
+
e.setFocusedKey(g), g != null && (ue(a) && a.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(g) : c && e.replaceSelection(g));
|
1763
1800
|
}
|
1764
1801
|
break;
|
1765
1802
|
case "PageDown":
|
1766
|
-
if (
|
1767
|
-
let g =
|
1768
|
-
g != null && (
|
1803
|
+
if (n.getKeyPageBelow && e.focusedKey != null) {
|
1804
|
+
let g = n.getKeyPageBelow(e.focusedKey);
|
1805
|
+
g != null && (a.preventDefault(), $(g));
|
1769
1806
|
}
|
1770
1807
|
break;
|
1771
1808
|
case "PageUp":
|
1772
|
-
if (
|
1773
|
-
let g =
|
1774
|
-
g != null && (
|
1809
|
+
if (n.getKeyPageAbove && e.focusedKey != null) {
|
1810
|
+
let g = n.getKeyPageAbove(e.focusedKey);
|
1811
|
+
g != null && (a.preventDefault(), $(g));
|
1775
1812
|
}
|
1776
1813
|
break;
|
1777
1814
|
case "a":
|
1778
|
-
|
1815
|
+
ue(a) && e.selectionMode === "multiple" && d !== !0 && (a.preventDefault(), e.selectAll());
|
1779
1816
|
break;
|
1780
1817
|
case "Escape":
|
1781
|
-
!
|
1818
|
+
!s && e.selectedKeys.size !== 0 && (a.stopPropagation(), a.preventDefault(), e.clearSelection());
|
1782
1819
|
break;
|
1783
1820
|
case "Tab":
|
1784
|
-
if (!
|
1785
|
-
if (
|
1821
|
+
if (!T) {
|
1822
|
+
if (a.shiftKey) r.current.focus();
|
1786
1823
|
else {
|
1787
|
-
let g =
|
1824
|
+
let g = Yt(r.current, {
|
1788
1825
|
tabbable: !0
|
1789
|
-
}),
|
1826
|
+
}), te, q;
|
1790
1827
|
do
|
1791
|
-
|
1792
|
-
while (
|
1793
|
-
|
1828
|
+
q = g.lastChild(), q && (te = q);
|
1829
|
+
while (q);
|
1830
|
+
te && !te.contains(document.activeElement) && G(te);
|
1794
1831
|
}
|
1795
1832
|
break;
|
1796
1833
|
}
|
1797
1834
|
}
|
1798
|
-
}, x =
|
1835
|
+
}, x = M({
|
1799
1836
|
top: 0,
|
1800
1837
|
left: 0
|
1801
1838
|
});
|
1802
|
-
|
1839
|
+
ge(m, "scroll", S ? void 0 : () => {
|
1840
|
+
var a, u, $, E;
|
1803
1841
|
x.current = {
|
1804
|
-
top: m.current.scrollTop,
|
1805
|
-
left: m.current.scrollLeft
|
1842
|
+
top: ($ = (a = m.current) === null || a === void 0 ? void 0 : a.scrollTop) !== null && $ !== void 0 ? $ : 0,
|
1843
|
+
left: (E = (u = m.current) === null || u === void 0 ? void 0 : u.scrollLeft) !== null && E !== void 0 ? E : 0
|
1806
1844
|
};
|
1807
1845
|
});
|
1808
|
-
let
|
1846
|
+
let v = (a) => {
|
1809
1847
|
if (e.isFocused) {
|
1810
|
-
|
1848
|
+
a.currentTarget.contains(a.target) || e.setFocused(!1);
|
1811
1849
|
return;
|
1812
1850
|
}
|
1813
|
-
if (
|
1851
|
+
if (a.currentTarget.contains(a.target)) {
|
1814
1852
|
if (e.setFocused(!0), e.focusedKey == null) {
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1853
|
+
var u, $;
|
1854
|
+
let f = (W) => {
|
1855
|
+
W != null && (e.setFocusedKey(W), c && e.replaceSelection(W));
|
1856
|
+
}, I = a.relatedTarget;
|
1857
|
+
var E, F;
|
1858
|
+
I && a.currentTarget.compareDocumentPosition(I) & Node.DOCUMENT_POSITION_FOLLOWING ? f((E = e.lastSelectedKey) !== null && E !== void 0 ? E : (u = n.getLastKey) === null || u === void 0 ? void 0 : u.call(n)) : f((F = e.firstSelectedKey) !== null && F !== void 0 ? F : ($ = n.getFirstKey) === null || $ === void 0 ? void 0 : $.call(n));
|
1859
|
+
} else !S && m.current && (m.current.scrollTop = x.current.top, m.current.scrollLeft = x.current.left);
|
1860
|
+
if (e.focusedKey != null && m.current) {
|
1861
|
+
let f = m.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1862
|
+
f && (f.contains(document.activeElement) || G(f), Ve() === "keyboard" && ct(f, {
|
1863
|
+
containingElement: r.current
|
1825
1864
|
}));
|
1826
1865
|
}
|
1827
1866
|
}
|
1828
|
-
}, D = (
|
1829
|
-
|
1830
|
-
};
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1867
|
+
}, D = (a) => {
|
1868
|
+
a.currentTarget.contains(a.relatedTarget) || e.setFocused(!1);
|
1869
|
+
}, P = M(!1);
|
1870
|
+
ge(r, Zn, y ? (a) => {
|
1871
|
+
let { detail: u } = a;
|
1872
|
+
a.stopPropagation(), e.setFocused(!0), (u == null ? void 0 : u.focusStrategy) === "first" && (P.current = !0);
|
1873
|
+
} : void 0);
|
1874
|
+
let A = Q(() => {
|
1875
|
+
var a, u;
|
1876
|
+
let $ = (u = (a = n.getFirstKey) === null || a === void 0 ? void 0 : a.call(n)) !== null && u !== void 0 ? u : null;
|
1877
|
+
if ($ == null) {
|
1878
|
+
var E;
|
1879
|
+
(E = r.current) === null || E === void 0 || E.dispatchEvent(new CustomEvent(zt, {
|
1880
|
+
cancelable: !0,
|
1881
|
+
bubbles: !0
|
1882
|
+
})), e.collection.size > 0 && (P.current = !1);
|
1883
|
+
} else
|
1884
|
+
e.setFocusedKey($), P.current = !1;
|
1885
|
+
});
|
1886
|
+
ut(() => {
|
1887
|
+
P.current && A();
|
1888
|
+
}, [
|
1889
|
+
e.collection,
|
1890
|
+
A
|
1891
|
+
]);
|
1892
|
+
let z = Q(() => {
|
1893
|
+
e.collection.size > 0 && (P.current = !1);
|
1894
|
+
});
|
1895
|
+
ut(() => {
|
1896
|
+
z();
|
1897
|
+
}, [
|
1898
|
+
e.focusedKey,
|
1899
|
+
z
|
1900
|
+
]), ge(r, Jn, y ? (a) => {
|
1901
|
+
a.stopPropagation(), e.setFocused(!1), e.setFocusedKey(null);
|
1902
|
+
} : void 0);
|
1903
|
+
const l = M(i);
|
1904
|
+
R(() => {
|
1905
|
+
if (l.current) {
|
1906
|
+
var a, u;
|
1907
|
+
let F = null;
|
1908
|
+
var $;
|
1909
|
+
i === "first" && (F = ($ = (a = n.getFirstKey) === null || a === void 0 ? void 0 : a.call(n)) !== null && $ !== void 0 ? $ : null);
|
1910
|
+
var E;
|
1911
|
+
i === "last" && (F = (E = (u = n.getLastKey) === null || u === void 0 ? void 0 : u.call(n)) !== null && E !== void 0 ? E : null);
|
1912
|
+
let f = e.selectedKeys;
|
1913
|
+
if (f.size) {
|
1914
|
+
for (let I of f) if (e.canSelectItem(I)) {
|
1915
|
+
F = I;
|
1840
1916
|
break;
|
1841
1917
|
}
|
1842
1918
|
}
|
1843
|
-
e.setFocused(!0), e.setFocusedKey(
|
1919
|
+
e.setFocused(!0), e.setFocusedKey(F), F == null && !y && r.current && We(r.current);
|
1844
1920
|
}
|
1845
1921
|
}, []);
|
1846
|
-
let
|
1847
|
-
|
1848
|
-
if (e.isFocused && e.focusedKey != null && (e.focusedKey !==
|
1849
|
-
let
|
1850
|
-
if (!
|
1922
|
+
let h = M(e.focusedKey);
|
1923
|
+
R(() => {
|
1924
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== h.current || l.current) && m.current && r.current) {
|
1925
|
+
let a = Ve(), u = r.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);
|
1926
|
+
if (!u)
|
1851
1927
|
return;
|
1852
|
-
(
|
1853
|
-
containingElement:
|
1928
|
+
(a === "keyboard" || l.current) && (Ft(m.current, u), a !== "virtual" && ct(u, {
|
1929
|
+
containingElement: r.current
|
1854
1930
|
}));
|
1855
1931
|
}
|
1856
|
-
!
|
1857
|
-
}),
|
1858
|
-
|
1932
|
+
!y && e.isFocused && e.focusedKey == null && h.current != null && r.current && We(r.current), h.current = e.focusedKey, l.current = !1;
|
1933
|
+
}), ge(r, "react-aria-focus-scope-restore", (a) => {
|
1934
|
+
a.preventDefault(), e.setFocused(!0);
|
1859
1935
|
});
|
1860
|
-
let
|
1861
|
-
onKeyDown:
|
1862
|
-
onFocus:
|
1936
|
+
let C = {
|
1937
|
+
onKeyDown: K,
|
1938
|
+
onFocus: v,
|
1863
1939
|
onBlur: D,
|
1864
|
-
onMouseDown(
|
1865
|
-
m.current ===
|
1940
|
+
onMouseDown(a) {
|
1941
|
+
m.current === a.target && a.preventDefault();
|
1866
1942
|
}
|
1867
|
-
}, { typeSelectProps:
|
1868
|
-
keyboardDelegate:
|
1943
|
+
}, { typeSelectProps: p } = er({
|
1944
|
+
keyboardDelegate: n,
|
1869
1945
|
selectionManager: e
|
1870
1946
|
});
|
1871
|
-
|
1872
|
-
let
|
1873
|
-
return
|
1947
|
+
b || (C = ee(p, C));
|
1948
|
+
let k;
|
1949
|
+
return y ? k = -1 : k = e.focusedKey == null ? 0 : -1, {
|
1874
1950
|
collectionProps: {
|
1875
|
-
...
|
1876
|
-
tabIndex:
|
1951
|
+
...C,
|
1952
|
+
tabIndex: k
|
1877
1953
|
}
|
1878
1954
|
};
|
1879
1955
|
}
|
1880
|
-
function
|
1881
|
-
let {
|
1882
|
-
|
1956
|
+
function _r(t) {
|
1957
|
+
let { id: e, selectionManager: n, key: r, ref: i, shouldSelectOnPressUp: o, shouldUseVirtualFocus: s, focus: d, isDisabled: c, onAction: b, allowsDifferentPressOrigin: y, linkBehavior: T = "action" } = t, S = qe();
|
1958
|
+
e = Ge(e);
|
1959
|
+
let m = (f) => {
|
1960
|
+
if (f.pointerType === "keyboard" && Be(f)) n.toggleSelection(r);
|
1883
1961
|
else {
|
1884
|
-
if (
|
1885
|
-
if (
|
1886
|
-
if (
|
1887
|
-
let
|
1888
|
-
|
1962
|
+
if (n.selectionMode === "none") return;
|
1963
|
+
if (n.isLink(r)) {
|
1964
|
+
if (T === "selection" && i.current) {
|
1965
|
+
let I = n.getItemProps(r);
|
1966
|
+
S.open(i.current, f, I.href, I.routerOptions), n.setSelectedKeys(n.selectedKeys);
|
1889
1967
|
return;
|
1890
|
-
} else if (
|
1968
|
+
} else if (T === "override" || T === "none") return;
|
1891
1969
|
}
|
1892
|
-
|
1970
|
+
n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : f && f.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || f && (ue(f) || f.pointerType === "touch" || f.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
|
1893
1971
|
}
|
1894
1972
|
};
|
1895
|
-
|
1896
|
-
r ===
|
1973
|
+
R(() => {
|
1974
|
+
if (r === n.focusedKey && n.isFocused)
|
1975
|
+
if (!s)
|
1976
|
+
d ? d() : document.activeElement !== i.current && i.current && We(i.current);
|
1977
|
+
else {
|
1978
|
+
var I;
|
1979
|
+
let W = new CustomEvent(zt, {
|
1980
|
+
cancelable: !0,
|
1981
|
+
bubbles: !0
|
1982
|
+
});
|
1983
|
+
(I = i.current) === null || I === void 0 || I.dispatchEvent(W);
|
1984
|
+
}
|
1897
1985
|
}, [
|
1898
|
-
|
1986
|
+
i,
|
1899
1987
|
r,
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1988
|
+
n.focusedKey,
|
1989
|
+
n.childFocusStrategy,
|
1990
|
+
n.isFocused,
|
1903
1991
|
s
|
1904
|
-
]),
|
1905
|
-
let
|
1906
|
-
!s && !
|
1907
|
-
tabIndex: r ===
|
1908
|
-
onFocus(
|
1909
|
-
|
1992
|
+
]), c = c || n.isDisabled(r);
|
1993
|
+
let L = {};
|
1994
|
+
!s && !c ? L = {
|
1995
|
+
tabIndex: r === n.focusedKey ? 0 : -1,
|
1996
|
+
onFocus(f) {
|
1997
|
+
f.target === i.current && n.setFocusedKey(r);
|
1910
1998
|
}
|
1911
|
-
} :
|
1912
|
-
|
1999
|
+
} : c && (L.onMouseDown = (f) => {
|
2000
|
+
f.preventDefault();
|
1913
2001
|
});
|
1914
|
-
let
|
1915
|
-
if (
|
1916
|
-
let
|
1917
|
-
|
2002
|
+
let w = n.isLink(r) && T === "override", _ = n.isLink(r) && T !== "selection" && T !== "none", K = !c && n.canSelectItem(r) && !w, x = (b || _) && !c, v = x && (n.selectionBehavior === "replace" ? !K : !K || n.isEmpty), D = x && K && n.selectionBehavior === "replace", P = v || D, A = M(null), z = P && K, l = M(!1), h = M(!1), C = (f) => {
|
2003
|
+
if (b && b(), _ && i.current) {
|
2004
|
+
let I = n.getItemProps(r);
|
2005
|
+
S.open(i.current, f, I.href, I.routerOptions);
|
1918
2006
|
}
|
1919
|
-
},
|
1920
|
-
|
1921
|
-
|
1922
|
-
},
|
1923
|
-
|
1924
|
-
},
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
}
|
1932
|
-
|
1933
|
-
}
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
2007
|
+
}, p = {};
|
2008
|
+
o ? (p.onPressStart = (f) => {
|
2009
|
+
A.current = f.pointerType, l.current = z, f.pointerType === "keyboard" && (!P || Kt()) && m(f);
|
2010
|
+
}, y ? (p.onPressUp = v ? void 0 : (f) => {
|
2011
|
+
f.pointerType === "mouse" && K && m(f);
|
2012
|
+
}, p.onPress = v ? C : (f) => {
|
2013
|
+
f.pointerType !== "keyboard" && f.pointerType !== "mouse" && K && m(f);
|
2014
|
+
}) : p.onPress = (f) => {
|
2015
|
+
if (v || D && f.pointerType !== "mouse") {
|
2016
|
+
if (f.pointerType === "keyboard" && !mt()) return;
|
2017
|
+
C(f);
|
2018
|
+
} else f.pointerType !== "keyboard" && K && m(f);
|
2019
|
+
}) : (p.onPressStart = (f) => {
|
2020
|
+
A.current = f.pointerType, l.current = z, h.current = v, K && (f.pointerType === "mouse" && !v || f.pointerType === "keyboard" && (!x || Kt())) && m(f);
|
2021
|
+
}, p.onPress = (f) => {
|
2022
|
+
(f.pointerType === "touch" || f.pointerType === "pen" || f.pointerType === "virtual" || f.pointerType === "keyboard" && P && mt() || f.pointerType === "mouse" && h.current) && (P ? C(f) : K && m(f));
|
2023
|
+
}), L["data-key"] = r, p.preventFocusOnPress = s;
|
2024
|
+
let { pressProps: k, isPressed: a } = Rt(p), u = D ? (f) => {
|
2025
|
+
A.current === "mouse" && (f.stopPropagation(), f.preventDefault(), C(f));
|
2026
|
+
} : void 0, { longPressProps: $ } = hr({
|
2027
|
+
isDisabled: !z,
|
2028
|
+
onLongPress(f) {
|
2029
|
+
f.pointerType === "touch" && (m(f), n.setSelectionBehavior("toggle"));
|
1940
2030
|
}
|
1941
|
-
}),
|
1942
|
-
|
1943
|
-
},
|
1944
|
-
|
2031
|
+
}), E = (f) => {
|
2032
|
+
A.current === "touch" && l.current && f.preventDefault();
|
2033
|
+
}, F = n.isLink(r) ? (f) => {
|
2034
|
+
se.isOpening || f.preventDefault();
|
1945
2035
|
} : void 0;
|
1946
2036
|
return {
|
1947
|
-
itemProps:
|
1948
|
-
onDoubleClick:
|
1949
|
-
onDragStartCapture:
|
1950
|
-
onClick:
|
2037
|
+
itemProps: ee(L, K || v ? k : {}, z ? $ : {}, {
|
2038
|
+
onDoubleClick: u,
|
2039
|
+
onDragStartCapture: E,
|
2040
|
+
onClick: F,
|
2041
|
+
id: e
|
1951
2042
|
}),
|
1952
|
-
isPressed:
|
1953
|
-
isSelected:
|
1954
|
-
isFocused:
|
1955
|
-
isDisabled:
|
1956
|
-
allowsSelection:
|
1957
|
-
hasAction:
|
2043
|
+
isPressed: a,
|
2044
|
+
isSelected: n.isSelected(r),
|
2045
|
+
isFocused: n.isFocused && n.focusedKey === r,
|
2046
|
+
isDisabled: c,
|
2047
|
+
allowsSelection: K,
|
2048
|
+
hasAction: P
|
1958
2049
|
};
|
1959
2050
|
}
|
1960
|
-
function
|
2051
|
+
function mt() {
|
1961
2052
|
let t = window.event;
|
1962
2053
|
return (t == null ? void 0 : t.key) === "Enter";
|
1963
2054
|
}
|
1964
|
-
function
|
2055
|
+
function Kt() {
|
1965
2056
|
let t = window.event;
|
1966
2057
|
return (t == null ? void 0 : t.key) === " " || (t == null ? void 0 : t.code) === "Space";
|
1967
2058
|
}
|
1968
|
-
function
|
1969
|
-
let { key:
|
1970
|
-
selectionManager:
|
1971
|
-
key:
|
1972
|
-
ref:
|
1973
|
-
isDisabled:
|
1974
|
-
shouldSelectOnPressUp:
|
2059
|
+
function Lr(t, e, n) {
|
2060
|
+
let { key: r, isDisabled: i, shouldSelectOnPressUp: o } = t, { selectionManager: s, selectedKey: d } = e, c = r === d, b = i || e.isDisabled || e.selectionManager.isDisabled(r), { itemProps: y, isPressed: T } = _r({
|
2061
|
+
selectionManager: s,
|
2062
|
+
key: r,
|
2063
|
+
ref: n,
|
2064
|
+
isDisabled: b,
|
2065
|
+
shouldSelectOnPressUp: o,
|
1975
2066
|
linkBehavior: "selection"
|
1976
|
-
}),
|
2067
|
+
}), S = Se(e, r, "tab"), m = Se(e, r, "tabpanel"), { tabIndex: L } = y, w = e.collection.getItem(r), _ = Dn(w == null ? void 0 : w.props, {
|
1977
2068
|
labelable: !0
|
1978
2069
|
});
|
1979
|
-
delete
|
1980
|
-
let
|
2070
|
+
delete _.id;
|
2071
|
+
let K = Vn(w == null ? void 0 : w.props);
|
1981
2072
|
return {
|
1982
|
-
tabProps:
|
1983
|
-
id:
|
1984
|
-
"aria-selected":
|
1985
|
-
"aria-disabled":
|
1986
|
-
"aria-controls":
|
1987
|
-
tabIndex:
|
2073
|
+
tabProps: ee(_, K, y, {
|
2074
|
+
id: S,
|
2075
|
+
"aria-selected": c,
|
2076
|
+
"aria-disabled": b || void 0,
|
2077
|
+
"aria-controls": c ? m : void 0,
|
2078
|
+
tabIndex: b ? void 0 : L,
|
1988
2079
|
role: "tab"
|
1989
2080
|
}),
|
1990
|
-
isSelected:
|
1991
|
-
isDisabled:
|
1992
|
-
isPressed:
|
2081
|
+
isSelected: c,
|
2082
|
+
isDisabled: b,
|
2083
|
+
isPressed: T
|
1993
2084
|
};
|
1994
2085
|
}
|
1995
|
-
function
|
1996
|
-
let
|
2086
|
+
function Mr(t, e, n) {
|
2087
|
+
let r = Kr(n) ? void 0 : 0;
|
1997
2088
|
var i;
|
1998
|
-
const
|
2089
|
+
const o = Se(e, (i = t.id) !== null && i !== void 0 ? i : e == null ? void 0 : e.selectedKey, "tabpanel"), s = At({
|
1999
2090
|
...t,
|
2000
|
-
id:
|
2001
|
-
"aria-labelledby":
|
2091
|
+
id: o,
|
2092
|
+
"aria-labelledby": Se(e, e == null ? void 0 : e.selectedKey, "tab")
|
2002
2093
|
});
|
2003
2094
|
return {
|
2004
|
-
tabPanelProps:
|
2005
|
-
tabIndex:
|
2095
|
+
tabPanelProps: ee(s, {
|
2096
|
+
tabIndex: r,
|
2006
2097
|
role: "tabpanel",
|
2007
2098
|
"aria-describedby": t["aria-describedby"],
|
2008
2099
|
"aria-details": t["aria-details"]
|
2009
2100
|
})
|
2010
2101
|
};
|
2011
2102
|
}
|
2012
|
-
class
|
2103
|
+
class Dr {
|
2013
2104
|
getKeyLeftOf(e) {
|
2014
2105
|
return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
|
2015
2106
|
}
|
@@ -2017,8 +2108,8 @@ class Tn {
|
|
2017
2108
|
return this.flipDirection ? this.getPreviousKey(e) : this.getNextKey(e);
|
2018
2109
|
}
|
2019
2110
|
isDisabled(e) {
|
2020
|
-
var
|
2021
|
-
return this.disabledKeys.has(e) || !!(!((
|
2111
|
+
var n, r;
|
2112
|
+
return this.disabledKeys.has(e) || !!(!((r = this.collection.getItem(e)) === null || r === void 0 || (n = r.props) === null || n === void 0) && n.isDisabled);
|
2022
2113
|
}
|
2023
2114
|
getFirstKey() {
|
2024
2115
|
let e = this.collection.getFirstKey();
|
@@ -2046,180 +2137,180 @@ class Tn {
|
|
2046
2137
|
while (this.isDisabled(e));
|
2047
2138
|
return e;
|
2048
2139
|
}
|
2049
|
-
constructor(e,
|
2050
|
-
this.collection = e, this.flipDirection =
|
2140
|
+
constructor(e, n, r, i = /* @__PURE__ */ new Set()) {
|
2141
|
+
this.collection = e, this.flipDirection = n === "rtl" && r === "horizontal", this.disabledKeys = i, this.tabDirection = r === "horizontal";
|
2051
2142
|
}
|
2052
2143
|
}
|
2053
|
-
function
|
2054
|
-
let { orientation:
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
]), { collectionProps:
|
2060
|
-
ref:
|
2061
|
-
selectionManager:
|
2062
|
-
keyboardDelegate:
|
2144
|
+
function Cr(t, e, n) {
|
2145
|
+
let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: o, selectionManager: s, disabledKeys: d } = e, { direction: c } = Jt(), b = X(() => new Dr(o, c, r, d), [
|
2146
|
+
o,
|
2147
|
+
d,
|
2148
|
+
r,
|
2149
|
+
c
|
2150
|
+
]), { collectionProps: y } = xr({
|
2151
|
+
ref: n,
|
2152
|
+
selectionManager: s,
|
2153
|
+
keyboardDelegate: b,
|
2063
2154
|
selectOnFocus: i === "automatic",
|
2064
2155
|
disallowEmptySelection: !0,
|
2065
|
-
scrollRef:
|
2156
|
+
scrollRef: n,
|
2066
2157
|
linkBehavior: "selection"
|
2067
|
-
}),
|
2068
|
-
|
2069
|
-
let
|
2158
|
+
}), T = Ge();
|
2159
|
+
Et.set(e, T);
|
2160
|
+
let S = At({
|
2070
2161
|
...t,
|
2071
|
-
id:
|
2162
|
+
id: T
|
2072
2163
|
});
|
2073
2164
|
return {
|
2074
2165
|
tabListProps: {
|
2075
|
-
...
|
2166
|
+
...ee(y, S),
|
2076
2167
|
role: "tablist",
|
2077
|
-
"aria-orientation":
|
2168
|
+
"aria-orientation": r,
|
2078
2169
|
tabIndex: void 0
|
2079
2170
|
}
|
2080
2171
|
};
|
2081
2172
|
}
|
2082
|
-
function
|
2173
|
+
function Ir(t, e, n) {
|
2083
2174
|
return e in t ? Object.defineProperty(t, e, {
|
2084
|
-
value:
|
2175
|
+
value: n,
|
2085
2176
|
enumerable: !0,
|
2086
2177
|
configurable: !0,
|
2087
2178
|
writable: !0
|
2088
|
-
}) : t[e] =
|
2179
|
+
}) : t[e] = n, t;
|
2089
2180
|
}
|
2090
|
-
function
|
2091
|
-
var
|
2181
|
+
function St(t, e) {
|
2182
|
+
var n = Object.keys(t);
|
2092
2183
|
if (Object.getOwnPropertySymbols) {
|
2093
|
-
var
|
2094
|
-
e && (
|
2184
|
+
var r = Object.getOwnPropertySymbols(t);
|
2185
|
+
e && (r = r.filter(function(i) {
|
2095
2186
|
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
2096
|
-
})),
|
2187
|
+
})), n.push.apply(n, r);
|
2097
2188
|
}
|
2098
|
-
return
|
2189
|
+
return n;
|
2099
2190
|
}
|
2100
|
-
function
|
2191
|
+
function Tt(t) {
|
2101
2192
|
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,
|
2193
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
2194
|
+
e % 2 ? St(Object(n), !0).forEach(function(r) {
|
2195
|
+
Ir(t, r, n[r]);
|
2196
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : St(Object(n)).forEach(function(r) {
|
2197
|
+
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
2107
2198
|
});
|
2108
2199
|
}
|
2109
2200
|
return t;
|
2110
2201
|
}
|
2111
|
-
var
|
2112
|
-
for (var
|
2202
|
+
var Ar = (t, e, n) => {
|
2203
|
+
for (var r of Object.keys(t)) {
|
2113
2204
|
var i;
|
2114
|
-
if (t[
|
2205
|
+
if (t[r] !== ((i = e[r]) !== null && i !== void 0 ? i : n[r]))
|
2115
2206
|
return !1;
|
2116
2207
|
}
|
2117
2208
|
return !0;
|
2118
|
-
},
|
2119
|
-
var
|
2120
|
-
for (var i in
|
2121
|
-
var
|
2122
|
-
if (
|
2123
|
-
var
|
2124
|
-
typeof
|
2125
|
-
var
|
2209
|
+
}, tt = (t) => (e) => {
|
2210
|
+
var n = t.defaultClassName, r = Tt(Tt({}, t.defaultVariants), e);
|
2211
|
+
for (var i in r) {
|
2212
|
+
var o, s = (o = r[i]) !== null && o !== void 0 ? o : t.defaultVariants[i];
|
2213
|
+
if (s != null) {
|
2214
|
+
var d = s;
|
2215
|
+
typeof d == "boolean" && (d = d === !0 ? "true" : "false");
|
2216
|
+
var c = (
|
2126
2217
|
// @ts-expect-error
|
2127
|
-
t.variantClassNames[i][
|
2218
|
+
t.variantClassNames[i][d]
|
2128
2219
|
);
|
2129
|
-
|
2220
|
+
c && (n += " " + c);
|
2130
2221
|
}
|
2131
2222
|
}
|
2132
|
-
for (var [
|
2133
|
-
|
2134
|
-
return
|
2135
|
-
},
|
2136
|
-
function
|
2223
|
+
for (var [b, y] of t.compoundVariants)
|
2224
|
+
Ar(b, r, t.defaultVariants) && (n += " " + y);
|
2225
|
+
return n;
|
2226
|
+
}, Fr = tt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz1", navigation: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz2" }, active: { true: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz3", false: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz4" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz5", false: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz7"], [{ context: "container", active: !1 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzz9"], [{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzza"], [{ context: "navigation", active: !1 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzd"]] }), zr = tt({ defaultClassName: "", variantClassNames: { active: { true: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzze", false: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzf" }, disabled: { true: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzg", false: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzh" }, context: { navigation: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzi", container: "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "pkg_sps-woodland_tabs__version_8_24_0__hash_kz6kzzk"]] });
|
2227
|
+
function Zt({
|
2137
2228
|
context: t,
|
2138
2229
|
item: e,
|
2139
|
-
state:
|
2140
|
-
...
|
2230
|
+
state: n,
|
2231
|
+
...r
|
2141
2232
|
}) {
|
2142
|
-
const { key: i } = e,
|
2143
|
-
className:
|
2233
|
+
const { key: i } = e, o = U.useRef(null), { tabProps: s } = Lr({ key: i }, n, o), d = n.selectedKey === i, c = n.disabledKeys.has(i), b = an(e.rendered, (y) => y.type.displayName === "SpsTag" || be.isWoodlandComponent(y.type) && be.get(y.type).name === "Tag" ? [{
|
2234
|
+
className: wt(y.props.className, zr({ active: d, disabled: c, context: t }))
|
2144
2235
|
}] : [{}]);
|
2145
|
-
return /* @__PURE__ */
|
2236
|
+
return /* @__PURE__ */ U.createElement(
|
2146
2237
|
"div",
|
2147
2238
|
{
|
2148
|
-
...
|
2149
|
-
ref:
|
2150
|
-
className:
|
2151
|
-
...
|
2239
|
+
...s,
|
2240
|
+
ref: o,
|
2241
|
+
className: Fr({ active: d, disabled: c, context: t }),
|
2242
|
+
...r
|
2152
2243
|
},
|
2153
|
-
|
2244
|
+
b
|
2154
2245
|
);
|
2155
2246
|
}
|
2156
|
-
|
2157
|
-
function
|
2247
|
+
be.set(Zt, { name: "Tab" });
|
2248
|
+
function Qt({
|
2158
2249
|
context: t,
|
2159
2250
|
"data-testid": e,
|
2160
|
-
state:
|
2161
|
-
...
|
2251
|
+
state: n,
|
2252
|
+
...r
|
2162
2253
|
}) {
|
2163
|
-
const i =
|
2164
|
-
return /* @__PURE__ */
|
2165
|
-
|
2254
|
+
const i = U.useRef(null), { tabPanelProps: o } = Mr(r, n, i), s = t === "container" ? on : "div";
|
2255
|
+
return /* @__PURE__ */ U.createElement(
|
2256
|
+
s,
|
2166
2257
|
{
|
2167
|
-
...
|
2258
|
+
...o,
|
2168
2259
|
ref: i,
|
2169
2260
|
"data-testid": e
|
2170
2261
|
},
|
2171
|
-
|
2262
|
+
n.selectedItem ? n.selectedItem.props.children : null
|
2172
2263
|
);
|
2173
2264
|
}
|
2174
|
-
|
2175
|
-
var
|
2176
|
-
function
|
2265
|
+
be.set(Qt, { name: "TabPanel" });
|
2266
|
+
var Or = tt({ defaultClassName: "pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er0", variantClassNames: { context: { container: "pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er1", navigation: "pkg_sps-woodland_tabs__version_8_24_0__hash_fy26er2" } }, defaultVariants: {}, compoundVariants: [] });
|
2267
|
+
function en({
|
2177
2268
|
className: t,
|
2178
2269
|
context: e = "navigation",
|
2179
|
-
"data-testid":
|
2180
|
-
...
|
2270
|
+
"data-testid": n,
|
2271
|
+
...r
|
2181
2272
|
}) {
|
2182
|
-
const i =
|
2183
|
-
return /* @__PURE__ */
|
2273
|
+
const i = yn(r), o = U.useRef(null), { tabListProps: s } = Cr(r, i, o), d = un({ "data-testid": n });
|
2274
|
+
return /* @__PURE__ */ U.createElement(U.Fragment, null, /* @__PURE__ */ U.createElement(
|
2184
2275
|
"div",
|
2185
2276
|
{
|
2186
|
-
...
|
2187
|
-
ref:
|
2188
|
-
className:
|
2189
|
-
"data-testid":
|
2277
|
+
...s,
|
2278
|
+
ref: o,
|
2279
|
+
className: wt(Or({ context: e }), t),
|
2280
|
+
"data-testid": n
|
2190
2281
|
},
|
2191
|
-
[...i.collection].map((
|
2192
|
-
|
2282
|
+
[...i.collection].map((c) => /* @__PURE__ */ U.createElement(
|
2283
|
+
Zt,
|
2193
2284
|
{
|
2194
|
-
key:
|
2195
|
-
item:
|
2285
|
+
key: c.key,
|
2286
|
+
item: c,
|
2196
2287
|
state: i,
|
2197
2288
|
context: e,
|
2198
|
-
...
|
2289
|
+
...d(`tab-${String(c.key)}`)
|
2199
2290
|
}
|
2200
2291
|
))
|
2201
|
-
), /* @__PURE__ */
|
2202
|
-
|
2292
|
+
), /* @__PURE__ */ U.createElement(
|
2293
|
+
Qt,
|
2203
2294
|
{
|
2204
2295
|
key: i.selectedItem ? i.selectedItem.key : null,
|
2205
2296
|
state: i,
|
2206
2297
|
context: e,
|
2207
|
-
...
|
2298
|
+
...d("tab-panel")
|
2208
2299
|
}
|
2209
2300
|
));
|
2210
2301
|
}
|
2211
|
-
|
2212
|
-
const
|
2213
|
-
components: [
|
2302
|
+
be.set(en, { name: "Tabs" });
|
2303
|
+
const Nr = {
|
2304
|
+
components: [en],
|
2214
2305
|
examples: {
|
2215
2306
|
basic: {
|
2216
2307
|
label: "Basic Navigation Tabs",
|
2217
|
-
description:
|
2308
|
+
description: it`
|
2218
2309
|
<p>Navigation tabs</p>
|
2219
2310
|
`,
|
2220
2311
|
examples: {
|
2221
2312
|
basic: {
|
2222
|
-
react:
|
2313
|
+
react: it`
|
2223
2314
|
import { Item } from "@react-stately/collections";
|
2224
2315
|
import { Box, Icon } from "@sps-woodland/core";
|
2225
2316
|
import { Tabs } from "@sps-woodland/tabs";
|
@@ -2285,10 +2376,10 @@ const Ln = {
|
|
2285
2376
|
}
|
2286
2377
|
}
|
2287
2378
|
}
|
2288
|
-
},
|
2289
|
-
"Tabbed Navigation":
|
2379
|
+
}, Wr = {
|
2380
|
+
"Tabbed Navigation": Nr
|
2290
2381
|
};
|
2291
2382
|
export {
|
2292
|
-
|
2293
|
-
|
2383
|
+
Wr as MANIFEST,
|
2384
|
+
en as Tabs
|
2294
2385
|
};
|