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