@sps-woodland/tabs 8.20.8 → 8.20.9

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