@sps-woodland/tabs 7.2.9 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import * as C from "react";
2
- import ne, { useState as F, useRef as P, useCallback as Y, useMemo as R, useEffect as z, useContext as ie, useLayoutEffect as ft } from "react";
2
+ import ne, { useState as F, useRef as E, useCallback as Y, useMemo as z, useEffect as A, useContext as ie, useLayoutEffect as ft } from "react";
3
3
  import { useCollection as dt } from "@react-stately/collections";
4
4
  import { Metadata as q, modChildren as pt, cl as Ve, Content as yt, useChildTestIdAttrBuilder as bt } from "@sps-woodland/core";
5
5
  import { code as Pe } from "@spscommerce/utils";
6
6
  function He(t, e, r) {
7
- let [n, i] = F(t || e), l = P(t !== void 0), a = l.current, u = t !== void 0, f = P(n);
8
- a !== u && console.warn(`WARN: A component changed from ${a ? "controlled" : "uncontrolled"} to ${u ? "controlled" : "uncontrolled"}.`), l.current = u;
9
- let g = Y((h, ...T) => {
10
- let v = (b, ...E) => {
11
- r && (Object.is(f.current, b) || r(b, ...E)), u || (f.current = b);
7
+ let [n, i] = F(t || e), a = E(t !== void 0), l = a.current, f = t !== void 0, u = E(n);
8
+ l !== f && console.warn(`WARN: A component changed from ${l ? "controlled" : "uncontrolled"} to ${f ? "controlled" : "uncontrolled"}.`), a.current = f;
9
+ let g = Y((h, ...m) => {
10
+ let v = (b, ...w) => {
11
+ r && (Object.is(u.current, b) || r(b, ...w)), f || (u.current = b);
12
12
  };
13
- 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((E, ...M) => {
14
- let x = h(u ? f.current : E, ...M);
15
- return v(x, ...T), u ? E : x;
16
- })) : (u || i(h), v(h, ...T));
13
+ 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((w, ...S) => {
14
+ let P = h(f ? u.current : w, ...S);
15
+ return v(P, ...m), f ? w : P;
16
+ })) : (f || i(h), v(h, ...m));
17
17
  }, [
18
- u,
18
+ f,
19
19
  r
20
20
  ]);
21
- return u ? f.current = t : t = n, [
21
+ return f ? u.current = t : t = n, [
22
22
  t,
23
23
  g
24
24
  ];
25
25
  }
26
- class I extends Set {
26
+ class D extends Set {
27
27
  constructor(e, r, n) {
28
- super(e), e instanceof I ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
28
+ super(e), e instanceof D ? (this.anchorKey = r || e.anchorKey, this.currentKey = n || e.currentKey) : (this.anchorKey = r, this.currentKey = n);
29
29
  }
30
30
  }
31
31
  function gt(t, e) {
@@ -37,49 +37,49 @@ function gt(t, e) {
37
37
  return !0;
38
38
  }
39
39
  function ht(t) {
40
- let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: l = "all" } = t, a = P(!1), [, u] = F(!1), f = P(null), g = P(null), [, h] = F(null), T = R(() => we(t.selectedKeys), [
40
+ let { selectionMode: e = "none", disallowEmptySelection: r, allowDuplicateSelectionEvents: n, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = t, l = E(!1), [, f] = F(!1), u = E(null), g = E(null), [, h] = F(null), m = z(() => we(t.selectedKeys), [
41
41
  t.selectedKeys
42
- ]), v = R(() => we(t.defaultSelectedKeys, new I()), [
42
+ ]), v = z(() => we(t.defaultSelectedKeys, new D()), [
43
43
  t.defaultSelectedKeys
44
- ]), [b, E] = He(T, v, t.onSelectionChange), M = R(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
44
+ ]), [b, w] = He(m, v, t.onSelectionChange), S = z(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
45
45
  t.disabledKeys
46
- ]), [x, S] = F(i);
47
- i === "replace" && x === "toggle" && typeof b == "object" && b.size === 0 && S("replace");
48
- let L = P(i);
49
- return z(() => {
50
- i !== L.current && (S(i), L.current = i);
46
+ ]), [P, x] = F(i);
47
+ i === "replace" && P === "toggle" && typeof b == "object" && b.size === 0 && x("replace");
48
+ let L = E(i);
49
+ return A(() => {
50
+ i !== L.current && (x(i), L.current = i);
51
51
  }, [
52
52
  i
53
53
  ]), {
54
54
  selectionMode: e,
55
55
  disallowEmptySelection: r,
56
- selectionBehavior: x,
57
- setSelectionBehavior: S,
56
+ selectionBehavior: P,
57
+ setSelectionBehavior: x,
58
58
  get isFocused() {
59
- return a.current;
59
+ return l.current;
60
60
  },
61
- setFocused(w) {
62
- a.current = w, u(w);
61
+ setFocused(M) {
62
+ l.current = M, f(M);
63
63
  },
64
64
  get focusedKey() {
65
- return f.current;
65
+ return u.current;
66
66
  },
67
67
  get childFocusStrategy() {
68
68
  return g.current;
69
69
  },
70
- setFocusedKey(w, s = "first") {
71
- f.current = w, g.current = s, h(w);
70
+ setFocusedKey(M, s = "first") {
71
+ u.current = M, g.current = s, h(M);
72
72
  },
73
73
  selectedKeys: b,
74
- setSelectedKeys(w) {
75
- (n || !gt(w, b)) && E(w);
74
+ setSelectedKeys(M) {
75
+ (n || !gt(M, b)) && w(M);
76
76
  },
77
- disabledKeys: M,
78
- disabledBehavior: l
77
+ disabledKeys: S,
78
+ disabledBehavior: a
79
79
  };
80
80
  }
81
81
  function we(t, e) {
82
- return t ? t === "all" ? "all" : new I(t) : e;
82
+ return t ? t === "all" ? "all" : new D(t) : e;
83
83
  }
84
84
  class vt {
85
85
  get selectionMode() {
@@ -163,16 +163,16 @@ class vt {
163
163
  e = this.getKey(e);
164
164
  let r;
165
165
  if (this.state.selectedKeys === "all")
166
- r = new I([
166
+ r = new D([
167
167
  e
168
168
  ], e, e);
169
169
  else {
170
170
  let n = this.state.selectedKeys, i = n.anchorKey || e;
171
- r = new I(n, i, e);
172
- for (let l of this.getKeyRange(i, n.currentKey || e))
173
- r.delete(l);
174
- for (let l of this.getKeyRange(e, i))
175
- this.canSelectItem(l) && r.add(l);
171
+ r = new D(n, i, e);
172
+ for (let a of this.getKeyRange(i, n.currentKey || e))
173
+ r.delete(a);
174
+ for (let a of this.getKeyRange(e, i))
175
+ this.canSelectItem(a) && r.add(a);
176
176
  }
177
177
  this.state.setSelectedKeys(r);
178
178
  }
@@ -183,8 +183,8 @@ class vt {
183
183
  getKeyRangeInternal(e, r) {
184
184
  let n = [], i = e;
185
185
  for (; i; ) {
186
- let l = this.collection.getItem(i);
187
- if ((l && l.type === "item" || l.type === "cell" && this.allowsCellSelection) && n.push(i), i === r)
186
+ let a = this.collection.getItem(i);
187
+ if ((a && a.type === "item" || a.type === "cell" && this.allowsCellSelection) && n.push(i), i === r)
188
188
  return n;
189
189
  i = this.collection.getKeyAfter(i);
190
190
  }
@@ -207,21 +207,21 @@ class vt {
207
207
  }
208
208
  if (e = this.getKey(e), e == null)
209
209
  return;
210
- let r = new I(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
210
+ let r = new D(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
211
211
  r.has(e) ? r.delete(e) : this.canSelectItem(e) && (r.add(e), r.anchorKey = e, r.currentKey = e), !(this.disallowEmptySelection && r.size === 0) && this.state.setSelectedKeys(r);
212
212
  }
213
213
  replaceSelection(e) {
214
214
  if (this.selectionMode === "none" || (e = this.getKey(e), e == null))
215
215
  return;
216
- let r = this.canSelectItem(e) ? new I([
216
+ let r = this.canSelectItem(e) ? new D([
217
217
  e
218
- ], e, e) : new I();
218
+ ], e, e) : new D();
219
219
  this.state.setSelectedKeys(r);
220
220
  }
221
221
  setSelectedKeys(e) {
222
222
  if (this.selectionMode === "none")
223
223
  return;
224
- let r = new I();
224
+ let r = new D();
225
225
  for (let n of e)
226
226
  if (n = this.getKey(n), n != null && (r.add(n), this.selectionMode === "single"))
227
227
  break;
@@ -245,7 +245,7 @@ class vt {
245
245
  this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
246
246
  }
247
247
  clearSelection() {
248
- !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new I());
248
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new D());
249
249
  }
250
250
  toggleSelectAll() {
251
251
  this.isSelectAll ? this.clearSelection() : this.selectAll();
@@ -290,9 +290,9 @@ function ee(t, e, r) {
290
290
  writable: !0
291
291
  }) : t[e] = r, t;
292
292
  }
293
- let $t = Symbol.iterator;
293
+ let mt = Symbol.iterator;
294
294
  class Ee {
295
- *[$t]() {
295
+ *[mt]() {
296
296
  yield* this.iterable;
297
297
  }
298
298
  get size() {
@@ -326,47 +326,75 @@ class Ee {
326
326
  }
327
327
  constructor(e) {
328
328
  ee(this, "keyMap", /* @__PURE__ */ new Map()), this.iterable = e;
329
- let r = (l) => {
330
- if (this.keyMap.set(l.key, l), l.childNodes && l.type === "section")
331
- for (let a of l.childNodes)
332
- r(a);
329
+ let r = (a) => {
330
+ if (this.keyMap.set(a.key, a), a.childNodes && a.type === "section")
331
+ for (let l of a.childNodes)
332
+ r(l);
333
333
  };
334
- for (let l of e)
335
- r(l);
334
+ for (let a of e)
335
+ r(a);
336
336
  let n, i = 0;
337
- for (let [l, a] of this.keyMap)
338
- n ? (n.nextKey = l, a.prevKey = n.key) : (this.firstKey = l, a.prevKey = void 0), a.type === "item" && (a.index = i++), n = a, n.nextKey = void 0;
337
+ for (let [a, l] of this.keyMap)
338
+ n ? (n.nextKey = a, l.prevKey = n.key) : (this.firstKey = a, l.prevKey = void 0), l.type === "item" && (l.index = i++), n = l, n.nextKey = void 0;
339
339
  this.lastKey = n == null ? void 0 : n.key;
340
340
  }
341
341
  }
342
- function mt(t) {
343
- let { filter: e } = t, r = ht(t), n = R(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
342
+ function $t(t) {
343
+ let { filter: e } = t, r = ht(t), n = z(() => t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set(), [
344
344
  t.disabledKeys
345
- ]), i = (u) => e ? new Ee(e(u)) : new Ee(u), l = R(() => ({
345
+ ]), i = (g) => e ? new Ee(e(g)) : new Ee(g), a = z(() => ({
346
346
  suppressTextValueWarning: t.suppressTextValueWarning
347
347
  }), [
348
348
  t.suppressTextValueWarning
349
- ]), a = dt(t, i, l, [
349
+ ]), l = dt(t, i, a, [
350
350
  e
351
+ ]), f = z(() => new vt(l, r), [
352
+ l,
353
+ r
351
354
  ]);
352
- return z(() => {
353
- r.focusedKey != null && !a.getItem(r.focusedKey) && r.setFocusedKey(null);
355
+ const u = E(null);
356
+ return A(() => {
357
+ if (r.focusedKey != null && !l.getItem(r.focusedKey)) {
358
+ const g = u.current.getItem(r.focusedKey), h = [
359
+ ...u.current.getKeys()
360
+ ].map((S) => {
361
+ const P = u.current.getItem(S);
362
+ return P.type === "item" ? P : null;
363
+ }).filter((S) => S !== null), m = [
364
+ ...l.getKeys()
365
+ ].map((S) => {
366
+ const P = l.getItem(S);
367
+ return P.type === "item" ? P : null;
368
+ }).filter((S) => S !== null), v = h.length - m.length;
369
+ let b = Math.min(v > 1 ? Math.max(g.index - v + 1, 0) : g.index, m.length - 1), w;
370
+ for (; b >= 0; ) {
371
+ if (!f.isDisabled(m[b].key)) {
372
+ w = m[b];
373
+ break;
374
+ }
375
+ b < m.length - 1 ? b++ : (b > g.index && (b = g.index), b--);
376
+ }
377
+ r.setFocusedKey(w ? w.key : null);
378
+ }
379
+ u.current = l;
354
380
  }, [
355
- a,
381
+ l,
382
+ f,
383
+ r,
356
384
  r.focusedKey
357
385
  ]), {
358
- collection: a,
386
+ collection: l,
359
387
  disabledKeys: n,
360
- selectionManager: new vt(a, r)
388
+ selectionManager: f
361
389
  };
362
390
  }
363
391
  function Kt(t) {
364
392
  var e;
365
- let [r, n] = He(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = R(() => r != null ? [
393
+ let [r, n] = He(t.selectedKey, (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : null, t.onSelectionChange), i = z(() => r != null ? [
366
394
  r
367
395
  ] : [], [
368
396
  r
369
- ]), { collection: l, disabledKeys: a, selectionManager: u } = mt({
397
+ ]), { collection: a, disabledKeys: l, selectionManager: f } = $t({
370
398
  ...t,
371
399
  selectionMode: "single",
372
400
  disallowEmptySelection: !0,
@@ -376,29 +404,29 @@ function Kt(t) {
376
404
  let h = g.values().next().value;
377
405
  h === r && t.onSelectionChange && t.onSelectionChange(h), n(h);
378
406
  }
379
- }), f = r != null ? l.getItem(r) : null;
407
+ }), u = r != null ? a.getItem(r) : null;
380
408
  return {
381
- collection: l,
382
- disabledKeys: a,
383
- selectionManager: u,
409
+ collection: a,
410
+ disabledKeys: l,
411
+ selectionManager: f,
384
412
  selectedKey: r,
385
413
  setSelectedKey: n,
386
- selectedItem: f
414
+ selectedItem: u
387
415
  };
388
416
  }
389
417
  function Tt(t) {
390
418
  let e = Kt({
391
419
  ...t,
392
420
  suppressTextValueWarning: !0
393
- }), { selectionManager: r, collection: n, selectedKey: i } = e, l = P(i), a = i;
394
- if (r.isEmpty || !n.getItem(a)) {
395
- for (a = n.getFirstKey(); e.disabledKeys.has(a) && a !== n.getLastKey(); )
396
- a = n.getKeyAfter(a);
397
- e.disabledKeys.has(a) && a === n.getLastKey() && (a = n.getFirstKey()), r.setSelectedKeys([
398
- a
421
+ }), { selectionManager: r, collection: n, selectedKey: i } = e, a = E(i), l = i;
422
+ if (r.isEmpty || !n.getItem(l)) {
423
+ for (l = n.getFirstKey(); e.disabledKeys.has(l) && l !== n.getLastKey(); )
424
+ l = n.getKeyAfter(l);
425
+ e.disabledKeys.has(l) && l === n.getLastKey() && (l = n.getFirstKey()), r.setSelectedKeys([
426
+ l
399
427
  ]);
400
428
  }
401
- return (r.focusedKey == null || !r.isFocused && a !== l.current) && r.setFocusedKey(a), l.current = a, {
429
+ return (r.focusedKey == null || !r.isFocused && l !== a.current) && r.setFocusedKey(l), a.current = l, {
402
430
  ...e,
403
431
  isDisabled: t.isDisabled || !1
404
432
  };
@@ -410,7 +438,7 @@ const ge = {
410
438
  let St = Boolean(typeof window < "u" && window.document && window.document.createElement);
411
439
  function Pt(t) {
412
440
  let e = ie(Ge);
413
- return e === ge && !St && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."), R(() => t || `react-aria${e.prefix}-${++e.current}`, [
441
+ return e === ge && !St && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."), z(() => t || `react-aria${e.prefix}-${++e.current}`, [
414
442
  t
415
443
  ]);
416
444
  }
@@ -442,19 +470,19 @@ const se = typeof window < "u" ? ne.useLayoutEffect : () => {
442
470
  };
443
471
  let te = /* @__PURE__ */ new Map();
444
472
  function _e(t) {
445
- let [e, r] = F(t), n = P(null), i = Pt(e), l = Y((a) => {
446
- n.current = a;
473
+ let [e, r] = F(t), n = E(null), i = Pt(e), a = Y((l) => {
474
+ n.current = l;
447
475
  }, []);
448
- return te.set(i, l), se(() => {
449
- let a = i;
476
+ return te.set(i, a), se(() => {
477
+ let l = i;
450
478
  return () => {
451
- te.delete(a);
479
+ te.delete(l);
452
480
  };
453
481
  }, [
454
482
  i
455
- ]), z(() => {
456
- let a = n.current;
457
- a && (n.current = null, r(a));
483
+ ]), A(() => {
484
+ let l = n.current;
485
+ l && (n.current = null, r(l));
458
486
  }), i;
459
487
  }
460
488
  function xt(t, e) {
@@ -466,7 +494,7 @@ function xt(t, e) {
466
494
  let n = te.get(e);
467
495
  return n ? (n(t), t) : e;
468
496
  }
469
- function Lt(...t) {
497
+ function Mt(...t) {
470
498
  return (...e) => {
471
499
  for (let r of t)
472
500
  typeof r == "function" && r(...e);
@@ -479,24 +507,24 @@ function U(...t) {
479
507
  for (let r = 1; r < t.length; r++) {
480
508
  let n = t[r];
481
509
  for (let i in n) {
482
- let l = e[i], a = n[i];
483
- typeof l == "function" && typeof a == "function" && i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= 65 && i.charCodeAt(2) <= 90 ? e[i] = Lt(l, a) : (i === "className" || i === "UNSAFE_className") && typeof l == "string" && typeof a == "string" ? e[i] = Et(l, a) : i === "id" && l && a ? e.id = xt(l, a) : e[i] = a !== void 0 ? a : l;
510
+ let a = e[i], l = n[i];
511
+ typeof a == "function" && typeof l == "function" && i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= 65 && i.charCodeAt(2) <= 90 ? e[i] = Mt(a, l) : (i === "className" || i === "UNSAFE_className") && typeof a == "string" && typeof l == "string" ? e[i] = Et(a, l) : i === "id" && a && l ? e.id = xt(a, l) : e[i] = l !== void 0 ? l : a;
484
512
  }
485
513
  }
486
514
  return e;
487
515
  }
488
516
  function N(t) {
489
- if (Mt())
517
+ if (Lt())
490
518
  t.focus({
491
519
  preventScroll: !0
492
520
  });
493
521
  else {
494
522
  let e = kt(t);
495
- t.focus(), Dt(e);
523
+ t.focus(), It(e);
496
524
  }
497
525
  }
498
526
  let J = null;
499
- function Mt() {
527
+ function Lt() {
500
528
  if (J == null) {
501
529
  J = !1;
502
530
  try {
@@ -524,7 +552,7 @@ function kt(t) {
524
552
  scrollLeft: n.scrollLeft
525
553
  }), r;
526
554
  }
527
- function Dt(t) {
555
+ function It(t) {
528
556
  for (let { element: e, scrollTop: r, scrollLeft: n } of t)
529
557
  e.scrollTop = r, e.scrollLeft = n;
530
558
  }
@@ -552,28 +580,28 @@ function je(t) {
552
580
  });
553
581
  }
554
582
  function Ye() {
555
- let t = P(/* @__PURE__ */ new Map()), e = Y((i, l, a, u) => {
556
- let f = u != null && u.once ? (...g) => {
557
- t.current.delete(a), a(...g);
558
- } : a;
559
- t.current.set(a, {
560
- type: l,
583
+ let t = E(/* @__PURE__ */ new Map()), e = Y((i, a, l, f) => {
584
+ let u = f != null && f.once ? (...g) => {
585
+ t.current.delete(l), l(...g);
586
+ } : l;
587
+ t.current.set(l, {
588
+ type: a,
561
589
  eventTarget: i,
562
- fn: f,
563
- options: u
564
- }), i.addEventListener(l, a, u);
565
- }, []), r = Y((i, l, a, u) => {
566
- var f;
567
- let g = ((f = t.current.get(a)) === null || f === void 0 ? void 0 : f.fn) || a;
568
- i.removeEventListener(l, g, u), t.current.delete(a);
590
+ fn: u,
591
+ options: f
592
+ }), i.addEventListener(a, l, f);
593
+ }, []), r = Y((i, a, l, f) => {
594
+ var u;
595
+ let g = ((u = t.current.get(l)) === null || u === void 0 ? void 0 : u.fn) || l;
596
+ i.removeEventListener(a, g, f), t.current.delete(l);
569
597
  }, []), n = Y(() => {
570
- t.current.forEach((i, l) => {
571
- r(i.eventTarget, i.type, l, i.options);
598
+ t.current.forEach((i, a) => {
599
+ r(i.eventTarget, i.type, a, i.options);
572
600
  });
573
601
  }, [
574
602
  r
575
603
  ]);
576
- return z(() => n, [
604
+ return A(() => n, [
577
605
  n
578
606
  ]), {
579
607
  addGlobalListener: e,
@@ -594,7 +622,7 @@ function qe(t, e) {
594
622
  "aria-labelledby": i
595
623
  };
596
624
  }
597
- function It(t, e) {
625
+ function Dt(t, e) {
598
626
  se(() => {
599
627
  if (t && t.ref && e)
600
628
  return t.ref.current = e.current, () => {
@@ -618,10 +646,10 @@ function Ft(t) {
618
646
  else {
619
647
  let i = `react-aria-description-${Ct++}`;
620
648
  r(i);
621
- let l = document.createElement("div");
622
- l.id = i, l.style.display = "none", l.textContent = t, document.body.appendChild(l), n = {
649
+ let a = document.createElement("div");
650
+ a.id = i, a.style.display = "none", a.textContent = t, document.body.appendChild(a), n = {
623
651
  refCount: 0,
624
- element: l
652
+ element: a
625
653
  }, ae.set(t, n);
626
654
  }
627
655
  return n.refCount++, () => {
@@ -660,28 +688,28 @@ function Nt() {
660
688
  return zt(/Android/i);
661
689
  }
662
690
  function Bt(t, e, r, n) {
663
- let i = P(r);
691
+ let i = E(r);
664
692
  i.current = r;
665
- let l = r == null;
666
- z(() => {
667
- if (l)
693
+ let a = r == null;
694
+ A(() => {
695
+ if (a)
668
696
  return;
669
- let a = t.current, u = (f) => i.current.call(this, f);
670
- return a.addEventListener(e, u, n), () => {
671
- a.removeEventListener(e, u, n);
697
+ let l = t.current, f = (u) => i.current.call(this, u);
698
+ return l.addEventListener(e, f, n), () => {
699
+ l.removeEventListener(e, f, n);
672
700
  };
673
701
  }, [
674
702
  t,
675
703
  e,
676
704
  n,
677
- l
705
+ a
678
706
  ]);
679
707
  }
680
- function Le(t, e) {
681
- let r = Me(t, e, "left"), n = Me(t, e, "top"), i = e.offsetWidth, l = e.offsetHeight, a = t.scrollLeft, u = t.scrollTop, f = a + t.offsetWidth, g = u + t.offsetHeight;
682
- r <= a ? a = r : r + i > f && (a += r + i - f), n <= u ? u = n : n + l > g && (u += n + l - g), t.scrollLeft = a, t.scrollTop = u;
708
+ function Me(t, e) {
709
+ let r = Le(t, e, "left"), n = Le(t, e, "top"), i = e.offsetWidth, a = e.offsetHeight, l = t.scrollLeft, f = t.scrollTop, u = l + t.offsetWidth, g = f + t.offsetHeight;
710
+ r <= l ? l = r : r + i > u && (l += r + i - u), n <= f ? f = n : n + a > g && (f += n + a - g), t.scrollLeft = l, t.scrollTop = f;
683
711
  }
684
- function Me(t, e, r) {
712
+ function Le(t, e, r) {
685
713
  const n = r === "left" ? "offsetLeft" : "offsetTop";
686
714
  let i = 0;
687
715
  for (; e.offsetParent && (i += e[n], e.offsetParent !== t); ) {
@@ -725,7 +753,7 @@ function Vt(t) {
725
753
  let { register: r, ...n } = e;
726
754
  t = U(n, t), r();
727
755
  }
728
- return It(e, t.ref), t;
756
+ return Dt(e, t.ref), t;
729
757
  }
730
758
  function Je(t) {
731
759
  let {
@@ -733,25 +761,25 @@ function Je(t) {
733
761
  onPressChange: r,
734
762
  onPressStart: n,
735
763
  onPressEnd: i,
736
- onPressUp: l,
737
- isDisabled: a,
738
- isPressed: u,
739
- preventFocusOnPress: f,
764
+ onPressUp: a,
765
+ isDisabled: l,
766
+ isPressed: f,
767
+ preventFocusOnPress: u,
740
768
  shouldCancelOnPointerExit: g,
741
769
  allowTextSelectionOnPress: h,
742
- ref: T,
770
+ ref: m,
743
771
  ...v
744
- } = Vt(t), b = P(null);
772
+ } = Vt(t), b = E(null);
745
773
  b.current = {
746
774
  onPress: e,
747
775
  onPressChange: r,
748
776
  onPressStart: n,
749
777
  onPressEnd: i,
750
- onPressUp: l,
751
- isDisabled: a,
778
+ onPressUp: a,
779
+ isDisabled: l,
752
780
  shouldCancelOnPointerExit: g
753
781
  };
754
- let [E, M] = F(!1), x = P({
782
+ let [w, S] = F(!1), P = E({
755
783
  isPressed: !1,
756
784
  ignoreEmulatedMouseEvents: !1,
757
785
  ignoreClickAfterPress: !1,
@@ -760,10 +788,10 @@ function Je(t) {
760
788
  target: null,
761
789
  isOverTarget: !1,
762
790
  pointerType: null
763
- }), { addGlobalListener: S, removeAllGlobalListeners: L } = Ye(), w = R(() => {
764
- let s = x.current, D = (c, p) => {
765
- let { onPressStart: o, onPressChange: d, isDisabled: A } = b.current;
766
- A || s.didFirePressStart || (o && o({
791
+ }), { addGlobalListener: x, removeAllGlobalListeners: L } = Ye(), M = z(() => {
792
+ let s = P.current, I = (c, p) => {
793
+ let { onPressStart: o, onPressChange: d, isDisabled: O } = b.current;
794
+ O || s.didFirePressStart || (o && o({
767
795
  type: "pressstart",
768
796
  pointerType: p,
769
797
  target: c.currentTarget,
@@ -771,9 +799,9 @@ function Je(t) {
771
799
  metaKey: c.metaKey,
772
800
  ctrlKey: c.ctrlKey,
773
801
  altKey: c.altKey
774
- }), d && d(!0), s.didFirePressStart = !0, M(!0));
802
+ }), d && d(!0), s.didFirePressStart = !0, S(!0));
775
803
  }, $ = (c, p, o = !0) => {
776
- let { onPressEnd: d, onPressChange: A, onPress: Se, isDisabled: ut } = b.current;
804
+ let { onPressEnd: d, onPressChange: O, onPress: Se, isDisabled: ut } = b.current;
777
805
  !s.didFirePressStart || (s.ignoreClickAfterPress = !0, s.didFirePressStart = !1, d && d({
778
806
  type: "pressend",
779
807
  pointerType: p,
@@ -782,7 +810,7 @@ function Je(t) {
782
810
  metaKey: c.metaKey,
783
811
  ctrlKey: c.ctrlKey,
784
812
  altKey: c.altKey
785
- }), A && A(!1), M(!1), Se && o && !ut && Se({
813
+ }), O && O(!1), S(!1), Se && o && !ut && Se({
786
814
  type: "press",
787
815
  pointerType: p,
788
816
  target: c.currentTarget,
@@ -802,57 +830,57 @@ function Je(t) {
802
830
  ctrlKey: c.ctrlKey,
803
831
  altKey: c.altKey
804
832
  });
805
- }, m = (c) => {
806
- s.isPressed && (s.isOverTarget && $(O(s.target, c), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
807
- }, K = {
833
+ }, K = (c) => {
834
+ s.isPressed && (s.isOverTarget && $(R(s.target, c), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
835
+ }, T = {
808
836
  onKeyDown(c) {
809
- oe(c.nativeEvent, c.currentTarget) && c.currentTarget.contains(c.target) ? (Ie(c.target, c.key) && c.preventDefault(), c.stopPropagation(), !s.isPressed && !c.repeat && (s.target = c.currentTarget, s.isPressed = !0, D(c, "keyboard"), S(document, "keyup", k, !1))) : c.key === "Enter" && pe(c.currentTarget) && c.stopPropagation();
837
+ oe(c.nativeEvent, c.currentTarget) && c.currentTarget.contains(c.target) ? (De(c.target, c.key) && c.preventDefault(), c.stopPropagation(), !s.isPressed && !c.repeat && (s.target = c.currentTarget, s.isPressed = !0, I(c, "keyboard"), x(document, "keyup", k, !1))) : c.key === "Enter" && pe(c.currentTarget) && c.stopPropagation();
810
838
  },
811
839
  onKeyUp(c) {
812
- oe(c.nativeEvent, c.currentTarget) && !c.repeat && c.currentTarget.contains(c.target) && y(O(s.target, c), "keyboard");
840
+ oe(c.nativeEvent, c.currentTarget) && !c.repeat && c.currentTarget.contains(c.target) && y(R(s.target, c), "keyboard");
813
841
  },
814
842
  onClick(c) {
815
- c && !c.currentTarget.contains(c.target) || c && c.button === 0 && (c.stopPropagation(), a && c.preventDefault(), !s.ignoreClickAfterPress && !s.ignoreEmulatedMouseEvents && (s.pointerType === "virtual" || fe(c.nativeEvent)) && (!a && !f && N(c.currentTarget), D(c, "virtual"), y(c, "virtual"), $(c, "virtual")), s.ignoreEmulatedMouseEvents = !1, s.ignoreClickAfterPress = !1);
843
+ c && !c.currentTarget.contains(c.target) || c && c.button === 0 && (c.stopPropagation(), l && c.preventDefault(), !s.ignoreClickAfterPress && !s.ignoreEmulatedMouseEvents && (s.pointerType === "virtual" || fe(c.nativeEvent)) && (!l && !u && N(c.currentTarget), I(c, "virtual"), y(c, "virtual"), $(c, "virtual")), s.ignoreEmulatedMouseEvents = !1, s.ignoreClickAfterPress = !1);
816
844
  }
817
845
  }, k = (c) => {
818
846
  if (s.isPressed && oe(c, s.target)) {
819
- Ie(c.target, c.key) && c.preventDefault(), c.stopPropagation(), s.isPressed = !1;
847
+ De(c.target, c.key) && c.preventDefault(), c.stopPropagation(), s.isPressed = !1;
820
848
  let p = c.target;
821
- $(O(s.target, c), "keyboard", s.target.contains(p)), L(), s.target instanceof HTMLElement && s.target.contains(p) && (pe(s.target) || s.target.getAttribute("role") === "link") && s.target.click();
849
+ $(R(s.target, c), "keyboard", s.target.contains(p)), L(), s.target instanceof HTMLElement && s.target.contains(p) && (pe(s.target) || s.target.getAttribute("role") === "link") && s.target.click();
822
850
  }
823
851
  };
824
852
  if (typeof PointerEvent < "u") {
825
- K.onPointerDown = (d) => {
853
+ T.onPointerDown = (d) => {
826
854
  if (!(d.button !== 0 || !d.currentTarget.contains(d.target))) {
827
855
  if (Ut(d.nativeEvent)) {
828
856
  s.pointerType = "virtual";
829
857
  return;
830
858
  }
831
- ce(d.currentTarget) && d.preventDefault(), s.pointerType = d.pointerType, d.stopPropagation(), s.isPressed || (s.isPressed = !0, s.isOverTarget = !0, s.activePointerId = d.pointerId, s.target = d.currentTarget, !a && !f && N(d.currentTarget), h || ke(s.target), D(d, s.pointerType), S(document, "pointermove", c, !1), S(document, "pointerup", p, !1), S(document, "pointercancel", o, !1));
859
+ ce(d.currentTarget) && d.preventDefault(), s.pointerType = d.pointerType, d.stopPropagation(), s.isPressed || (s.isPressed = !0, s.isOverTarget = !0, s.activePointerId = d.pointerId, s.target = d.currentTarget, !l && !u && N(d.currentTarget), h || ke(s.target), I(d, s.pointerType), x(document, "pointermove", c, !1), x(document, "pointerup", p, !1), x(document, "pointercancel", o, !1));
832
860
  }
833
- }, K.onMouseDown = (d) => {
861
+ }, T.onMouseDown = (d) => {
834
862
  !d.currentTarget.contains(d.target) || d.button === 0 && (ce(d.currentTarget) && d.preventDefault(), d.stopPropagation());
835
- }, K.onPointerUp = (d) => {
863
+ }, T.onPointerUp = (d) => {
836
864
  !d.currentTarget.contains(d.target) || s.pointerType === "virtual" || d.button === 0 && V(d, d.currentTarget) && y(d, s.pointerType || d.pointerType);
837
865
  };
838
866
  let c = (d) => {
839
- d.pointerId === s.activePointerId && (V(d, s.target) ? s.isOverTarget || (s.isOverTarget = !0, D(O(s.target, d), s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(O(s.target, d), s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(d)));
867
+ d.pointerId === s.activePointerId && (V(d, s.target) ? s.isOverTarget || (s.isOverTarget = !0, I(R(s.target, d), s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(R(s.target, d), s.pointerType, !1), b.current.shouldCancelOnPointerExit && K(d)));
840
868
  }, p = (d) => {
841
- d.pointerId === s.activePointerId && s.isPressed && d.button === 0 && (V(d, s.target) ? $(O(s.target, d), s.pointerType) : s.isOverTarget && $(O(s.target, d), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
869
+ d.pointerId === s.activePointerId && s.isPressed && d.button === 0 && (V(d, s.target) ? $(R(s.target, d), s.pointerType) : s.isOverTarget && $(R(s.target, d), s.pointerType, !1), s.isPressed = !1, s.isOverTarget = !1, s.activePointerId = null, s.pointerType = null, L(), h || Z(s.target));
842
870
  }, o = (d) => {
843
- m(d);
871
+ K(d);
844
872
  };
845
- K.onDragStart = (d) => {
846
- !d.currentTarget.contains(d.target) || m(d);
873
+ T.onDragStart = (d) => {
874
+ !d.currentTarget.contains(d.target) || K(d);
847
875
  };
848
876
  } else {
849
- K.onMouseDown = (o) => {
850
- o.button !== 0 || !o.currentTarget.contains(o.target) || (ce(o.currentTarget) && o.preventDefault(), o.stopPropagation(), !s.ignoreEmulatedMouseEvents && (s.isPressed = !0, s.isOverTarget = !0, s.target = o.currentTarget, s.pointerType = fe(o.nativeEvent) ? "virtual" : "mouse", !a && !f && N(o.currentTarget), D(o, s.pointerType), S(document, "mouseup", c, !1)));
851
- }, K.onMouseEnter = (o) => {
852
- !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !0, D(o, s.pointerType)));
853
- }, K.onMouseLeave = (o) => {
854
- !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(o)));
855
- }, K.onMouseUp = (o) => {
877
+ T.onMouseDown = (o) => {
878
+ o.button !== 0 || !o.currentTarget.contains(o.target) || (ce(o.currentTarget) && o.preventDefault(), o.stopPropagation(), !s.ignoreEmulatedMouseEvents && (s.isPressed = !0, s.isOverTarget = !0, s.target = o.currentTarget, s.pointerType = fe(o.nativeEvent) ? "virtual" : "mouse", !l && !u && N(o.currentTarget), I(o, s.pointerType), x(document, "mouseup", c, !1)));
879
+ }, T.onMouseEnter = (o) => {
880
+ !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !0, I(o, s.pointerType)));
881
+ }, T.onMouseLeave = (o) => {
882
+ !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && !s.ignoreEmulatedMouseEvents && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && K(o)));
883
+ }, T.onMouseUp = (o) => {
856
884
  !o.currentTarget.contains(o.target) || !s.ignoreEmulatedMouseEvents && o.button === 0 && y(o, s.pointerType);
857
885
  };
858
886
  let c = (o) => {
@@ -861,30 +889,30 @@ function Je(t) {
861
889
  s.ignoreEmulatedMouseEvents = !1;
862
890
  return;
863
891
  }
864
- V(o, s.target) ? $(O(s.target, o), s.pointerType) : s.isOverTarget && $(O(s.target, o), s.pointerType, !1), s.isOverTarget = !1;
892
+ V(o, s.target) ? $(R(s.target, o), s.pointerType) : s.isOverTarget && $(R(s.target, o), s.pointerType, !1), s.isOverTarget = !1;
865
893
  }
866
894
  };
867
- K.onTouchStart = (o) => {
895
+ T.onTouchStart = (o) => {
868
896
  if (!o.currentTarget.contains(o.target))
869
897
  return;
870
898
  o.stopPropagation();
871
899
  let d = Ht(o.nativeEvent);
872
- !d || (s.activePointerId = d.identifier, s.ignoreEmulatedMouseEvents = !0, s.isOverTarget = !0, s.isPressed = !0, s.target = o.currentTarget, s.pointerType = "touch", !a && !f && N(o.currentTarget), h || ke(s.target), D(o, s.pointerType), S(window, "scroll", p, !0));
873
- }, K.onTouchMove = (o) => {
900
+ !d || (s.activePointerId = d.identifier, s.ignoreEmulatedMouseEvents = !0, s.isOverTarget = !0, s.isPressed = !0, s.target = o.currentTarget, s.pointerType = "touch", !l && !u && N(o.currentTarget), h || ke(s.target), I(o, s.pointerType), x(window, "scroll", p, !0));
901
+ }, T.onTouchMove = (o) => {
874
902
  if (!o.currentTarget.contains(o.target) || (o.stopPropagation(), !s.isPressed))
875
903
  return;
876
- let d = De(o.nativeEvent, s.activePointerId);
877
- d && V(d, o.currentTarget) ? s.isOverTarget || (s.isOverTarget = !0, D(o, s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && m(o));
878
- }, K.onTouchEnd = (o) => {
904
+ let d = Ie(o.nativeEvent, s.activePointerId);
905
+ d && V(d, o.currentTarget) ? s.isOverTarget || (s.isOverTarget = !0, I(o, s.pointerType)) : s.isOverTarget && (s.isOverTarget = !1, $(o, s.pointerType, !1), b.current.shouldCancelOnPointerExit && K(o));
906
+ }, T.onTouchEnd = (o) => {
879
907
  if (!o.currentTarget.contains(o.target) || (o.stopPropagation(), !s.isPressed))
880
908
  return;
881
- let d = De(o.nativeEvent, s.activePointerId);
909
+ let d = Ie(o.nativeEvent, s.activePointerId);
882
910
  d && V(d, o.currentTarget) ? (y(o, s.pointerType), $(o, s.pointerType)) : s.isOverTarget && $(o, s.pointerType, !1), s.isPressed = !1, s.activePointerId = null, s.isOverTarget = !1, s.ignoreEmulatedMouseEvents = !0, h || Z(s.target), L();
883
- }, K.onTouchCancel = (o) => {
884
- !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && m(o));
911
+ }, T.onTouchCancel = (o) => {
912
+ !o.currentTarget.contains(o.target) || (o.stopPropagation(), s.isPressed && K(o));
885
913
  };
886
914
  let p = (o) => {
887
- s.isPressed && o.target.contains(s.target) && m({
915
+ s.isPressed && o.target.contains(s.target) && K({
888
916
  currentTarget: s.target,
889
917
  shiftKey: !1,
890
918
  ctrlKey: !1,
@@ -892,39 +920,39 @@ function Je(t) {
892
920
  altKey: !1
893
921
  });
894
922
  };
895
- K.onDragStart = (o) => {
896
- !o.currentTarget.contains(o.target) || m(o);
923
+ T.onDragStart = (o) => {
924
+ !o.currentTarget.contains(o.target) || K(o);
897
925
  };
898
926
  }
899
- return K;
927
+ return T;
900
928
  }, [
901
- S,
902
- a,
903
- f,
929
+ x,
930
+ l,
931
+ u,
904
932
  L,
905
933
  h
906
934
  ]);
907
- return z(() => () => {
908
- h || Z(x.current.target);
935
+ return A(() => () => {
936
+ h || Z(P.current.target);
909
937
  }, [
910
938
  h
911
939
  ]), {
912
- isPressed: u || E,
913
- pressProps: U(v, w)
940
+ isPressed: f || w,
941
+ pressProps: U(v, M)
914
942
  };
915
943
  }
916
944
  function pe(t) {
917
945
  return t.tagName === "A" && t.hasAttribute("href");
918
946
  }
919
947
  function oe(t, e) {
920
- const { key: r, code: n } = t, i = e, l = i.getAttribute("role");
921
- return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof HTMLInputElement && !Ze(i, r) || i instanceof HTMLTextAreaElement || i.isContentEditable) && (!pe(i) || l === "button" && r !== "Enter") && !(l === "link" && r !== "Enter");
948
+ const { key: r, code: n } = t, i = e, a = i.getAttribute("role");
949
+ return (r === "Enter" || r === " " || r === "Spacebar" || n === "Space") && !(i instanceof HTMLInputElement && !Ze(i, r) || i instanceof HTMLTextAreaElement || i.isContentEditable) && (!pe(i) || a === "button" && r !== "Enter") && !(a === "link" && r !== "Enter");
922
950
  }
923
951
  function Ht(t) {
924
952
  const { targetTouches: e } = t;
925
953
  return e.length > 0 ? e[0] : null;
926
954
  }
927
- function De(t, e) {
955
+ function Ie(t, e) {
928
956
  const r = t.changedTouches;
929
957
  for (let n = 0; n < r.length; n++) {
930
958
  const i = r[n];
@@ -933,7 +961,7 @@ function De(t, e) {
933
961
  }
934
962
  return null;
935
963
  }
936
- function O(t, e) {
964
+ function R(t, e) {
937
965
  return {
938
966
  currentTarget: t,
939
967
  shiftKey: e.shiftKey,
@@ -961,7 +989,7 @@ function V(t, e) {
961
989
  function ce(t) {
962
990
  return !(t instanceof HTMLElement) || !t.draggable;
963
991
  }
964
- function Ie(t, e) {
992
+ function De(t, e) {
965
993
  return t instanceof HTMLInputElement ? !Ze(t, e) : t instanceof HTMLButtonElement ? t.type !== "submit" : !0;
966
994
  }
967
995
  const _t = /* @__PURE__ */ new Set([
@@ -979,7 +1007,7 @@ function Ze(t, e) {
979
1007
  return t.type === "checkbox" || t.type === "radio" ? e === " " : _t.has(t.type);
980
1008
  }
981
1009
  let X = null, jt = /* @__PURE__ */ new Set(), Ce = !1, B = !1, ye = !1;
982
- function $e(t, e) {
1010
+ function me(t, e) {
983
1011
  for (let r of jt)
984
1012
  r(t, e);
985
1013
  }
@@ -987,16 +1015,16 @@ function Yt(t) {
987
1015
  return !(t.metaKey || !le() && t.altKey || t.ctrlKey || t.key === "Control" || t.key === "Shift" || t.key === "Meta");
988
1016
  }
989
1017
  function Fe(t) {
990
- B = !0, Yt(t) && (X = "keyboard", $e("keyboard", t));
1018
+ B = !0, Yt(t) && (X = "keyboard", me("keyboard", t));
991
1019
  }
992
1020
  function H(t) {
993
- X = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (B = !0, $e("pointer", t));
1021
+ X = "pointer", (t.type === "mousedown" || t.type === "pointerdown") && (B = !0, me("pointer", t));
994
1022
  }
995
1023
  function qt(t) {
996
1024
  fe(t) && (B = !0, X = "virtual");
997
1025
  }
998
1026
  function Xt(t) {
999
- t.target === window || t.target === document || (!B && !ye && (X = "virtual", $e("virtual", t)), B = !1, ye = !1);
1027
+ t.target === window || t.target === document || (!B && !ye && (X = "virtual", me("virtual", t)), B = !1, ye = !1);
1000
1028
  }
1001
1029
  function Jt() {
1002
1030
  B = !1, ye = !0;
@@ -1015,28 +1043,28 @@ function Zt() {
1015
1043
  }
1016
1044
  const Qt = 500;
1017
1045
  function er(t) {
1018
- let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: l = Qt, accessibilityDescription: a } = t;
1019
- const u = P(null);
1020
- let { addGlobalListener: f, removeGlobalListener: g } = Ye(), { pressProps: h } = Je({
1046
+ let { isDisabled: e, onLongPressStart: r, onLongPressEnd: n, onLongPress: i, threshold: a = Qt, accessibilityDescription: l } = t;
1047
+ const f = E(null);
1048
+ let { addGlobalListener: u, removeGlobalListener: g } = Ye(), { pressProps: h } = Je({
1021
1049
  isDisabled: e,
1022
1050
  onPressStart(v) {
1023
1051
  if ((v.pointerType === "mouse" || v.pointerType === "touch") && (r && r({
1024
1052
  ...v,
1025
1053
  type: "longpressstart"
1026
- }), u.current = setTimeout(() => {
1054
+ }), f.current = setTimeout(() => {
1027
1055
  v.target.dispatchEvent(new PointerEvent("pointercancel", {
1028
1056
  bubbles: !0
1029
1057
  })), i && i({
1030
1058
  ...v,
1031
1059
  type: "longpress"
1032
- }), u.current = null;
1033
- }, l), v.pointerType === "touch")) {
1034
- let b = (E) => {
1035
- E.preventDefault();
1060
+ }), f.current = null;
1061
+ }, a), v.pointerType === "touch")) {
1062
+ let b = (w) => {
1063
+ w.preventDefault();
1036
1064
  };
1037
- f(v.target, "contextmenu", b, {
1065
+ u(v.target, "contextmenu", b, {
1038
1066
  once: !0
1039
- }), f(window, "pointerup", () => {
1067
+ }), u(window, "pointerup", () => {
1040
1068
  setTimeout(() => {
1041
1069
  g(v.target, "contextmenu", b);
1042
1070
  }, 30);
@@ -1046,14 +1074,14 @@ function er(t) {
1046
1074
  }
1047
1075
  },
1048
1076
  onPressEnd(v) {
1049
- u.current && clearTimeout(u.current), n && (v.pointerType === "mouse" || v.pointerType === "touch") && n({
1077
+ f.current && clearTimeout(f.current), n && (v.pointerType === "mouse" || v.pointerType === "touch") && n({
1050
1078
  ...v,
1051
1079
  type: "longpressend"
1052
1080
  });
1053
1081
  }
1054
- }), T = Ft(i && !e ? a : null);
1082
+ }), m = Ft(i && !e ? l : null);
1055
1083
  return {
1056
- longPressProps: U(h, T)
1084
+ longPressProps: U(h, m)
1057
1085
  };
1058
1086
  }
1059
1087
  function Qe(t) {
@@ -1071,8 +1099,8 @@ function tr(t) {
1071
1099
  let { display: e, visibility: r } = t.style, n = e !== "none" && r !== "hidden" && r !== "collapse";
1072
1100
  if (n) {
1073
1101
  const { getComputedStyle: i } = t.ownerDocument.defaultView;
1074
- let { display: l, visibility: a } = i(t);
1075
- n = l !== "none" && a !== "hidden" && a !== "collapse";
1102
+ let { display: a, visibility: l } = i(t);
1103
+ n = a !== "none" && l !== "hidden" && l !== "collapse";
1076
1104
  }
1077
1105
  return n;
1078
1106
  }
@@ -1082,7 +1110,7 @@ function rr(t, e) {
1082
1110
  function et(t, e) {
1083
1111
  return t.nodeName !== "#comment" && tr(t) && rr(t, e) && (!t.parentElement || et(t.parentElement, t));
1084
1112
  }
1085
- const me = [
1113
+ const $e = [
1086
1114
  "input:not([disabled]):not([type=hidden])",
1087
1115
  "select:not([disabled])",
1088
1116
  "textarea:not([disabled])",
@@ -1096,17 +1124,17 @@ const me = [
1096
1124
  "audio[controls]",
1097
1125
  "video[controls]",
1098
1126
  "[contenteditable]"
1099
- ], nr = me.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
1100
- me.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
1101
- const ir = me.join(':not([hidden]):not([tabindex="-1"]),');
1127
+ ], nr = $e.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
1128
+ $e.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
1129
+ const ir = $e.join(':not([hidden]):not([tabindex="-1"]),');
1102
1130
  function tt(t, e) {
1103
1131
  return e.some((r) => r.contains(t));
1104
1132
  }
1105
1133
  function rt(t, e, r) {
1106
1134
  let n = e != null && e.tabbable ? ir : nr, i = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
1107
- acceptNode(l) {
1108
- var a;
1109
- return !(e == null || (a = e.from) === null || a === void 0) && a.contains(l) ? NodeFilter.FILTER_REJECT : l.matches(n) && et(l) && (!r || tt(l, r)) && (!(e != null && e.accept) || e.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1135
+ acceptNode(a) {
1136
+ var l;
1137
+ return !(e == null || (l = e.from) === null || l === void 0) && l.contains(a) ? NodeFilter.FILTER_REJECT : a.matches(n) && et(a) && (!r || tt(a, r)) && (!(e != null && e.accept) || e.accept(a)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1110
1138
  }
1111
1139
  });
1112
1140
  return e != null && e.from && (i.currentNode = e.from), i;
@@ -1119,19 +1147,19 @@ class Ke {
1119
1147
  return this.fastMap.get(e);
1120
1148
  }
1121
1149
  addTreeNode(e, r, n) {
1122
- let i = this.fastMap.get(r != null ? r : null), l = new Ae({
1150
+ let i = this.fastMap.get(r != null ? r : null), a = new Ae({
1123
1151
  scopeRef: e
1124
1152
  });
1125
- i.addChild(l), l.parent = i, this.fastMap.set(e, l), n && (l.nodeToRestore = n);
1153
+ i.addChild(a), a.parent = i, this.fastMap.set(e, a), n && (a.nodeToRestore = n);
1126
1154
  }
1127
1155
  removeTreeNode(e) {
1128
1156
  if (e === null)
1129
1157
  return;
1130
1158
  let r = this.fastMap.get(e), n = r.parent;
1131
- for (let l of this.traverse())
1132
- l !== r && r.nodeToRestore && l.nodeToRestore && r.scopeRef.current && tt(l.nodeToRestore, r.scopeRef.current) && (l.nodeToRestore = r.nodeToRestore);
1159
+ for (let a of this.traverse())
1160
+ a !== r && r.nodeToRestore && a.nodeToRestore && r.scopeRef.current && tt(a.nodeToRestore, r.scopeRef.current) && (a.nodeToRestore = r.nodeToRestore);
1133
1161
  let i = r.children;
1134
- n.removeChild(r), i.length > 0 && i.forEach((l) => n.addChild(l)), this.fastMap.delete(r.scopeRef);
1162
+ n.removeChild(r), i.length > 0 && i.forEach((a) => n.addChild(a)), this.fastMap.delete(r.scopeRef);
1135
1163
  }
1136
1164
  *traverse(e = this.root) {
1137
1165
  if (e.scopeRef != null && (yield e), e.children.length > 0)
@@ -1224,7 +1252,7 @@ function Oe() {
1224
1252
  }
1225
1253
  function or() {
1226
1254
  let t = wt(), [e, r] = F(be);
1227
- return z(() => (j.size === 0 && window.addEventListener("languagechange", Oe), j.add(r), () => {
1255
+ return A(() => (j.size === 0 && window.addEventListener("languagechange", Oe), j.add(r), () => {
1228
1256
  j.delete(r), j.size === 0 && window.removeEventListener("languagechange", Oe);
1229
1257
  }), []), t ? {
1230
1258
  locale: "en-US",
@@ -1244,22 +1272,22 @@ function W(t) {
1244
1272
  }
1245
1273
  const ur = 1e3;
1246
1274
  function fr(t) {
1247
- let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = P({
1275
+ let { keyboardDelegate: e, selectionManager: r, onTypeSelect: n } = t, i = E({
1248
1276
  search: "",
1249
1277
  timeout: null
1250
- }).current, l = (a) => {
1251
- let u = dr(a.key);
1252
- if (!u || a.ctrlKey || a.metaKey)
1278
+ }).current, a = (l) => {
1279
+ let f = dr(l.key);
1280
+ if (!f || l.ctrlKey || l.metaKey)
1253
1281
  return;
1254
- u === " " && i.search.trim().length > 0 && (a.preventDefault(), "continuePropagation" in a || a.stopPropagation()), i.search += u;
1255
- let f = e.getKeyForSearch(i.search, r.focusedKey);
1256
- f == null && (f = e.getKeyForSearch(i.search)), f != null && (r.setFocusedKey(f), n && n(f)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
1282
+ f === " " && i.search.trim().length > 0 && (l.preventDefault(), "continuePropagation" in l || l.stopPropagation()), i.search += f;
1283
+ let u = e.getKeyForSearch(i.search, r.focusedKey);
1284
+ u == null && (u = e.getKeyForSearch(i.search)), u != null && (r.setFocusedKey(u), n && n(u)), clearTimeout(i.timeout), i.timeout = setTimeout(() => {
1257
1285
  i.search = "";
1258
1286
  }, ur);
1259
1287
  };
1260
1288
  return {
1261
1289
  typeSelectProps: {
1262
- onKeyDownCapture: e.getKeyForSearch ? l : null
1290
+ onKeyDownCapture: e.getKeyForSearch ? a : null
1263
1291
  }
1264
1292
  };
1265
1293
  }
@@ -1267,19 +1295,19 @@ function dr(t) {
1267
1295
  return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
1268
1296
  }
1269
1297
  function pr(t) {
1270
- let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: l = !1, disallowEmptySelection: a = !1, disallowSelectAll: u = !1, selectOnFocus: f = e.selectionBehavior === "replace", disallowTypeAhead: g = !1, shouldUseVirtualFocus: h, allowsTabNavigation: T = !1, isVirtualized: v, scrollRef: b = n } = t, { direction: E } = it(), M = (y) => {
1298
+ let { selectionManager: e, keyboardDelegate: r, ref: n, autoFocus: i = !1, shouldFocusWrap: a = !1, disallowEmptySelection: l = !1, disallowSelectAll: f = !1, selectOnFocus: u = e.selectionBehavior === "replace", disallowTypeAhead: g = !1, shouldUseVirtualFocus: h, allowsTabNavigation: m = !1, isVirtualized: v, scrollRef: b = n } = t, { direction: w } = it(), S = (y) => {
1271
1299
  if (y.altKey && y.key === "Tab" && y.preventDefault(), !n.current.contains(y.target))
1272
1300
  return;
1273
- const m = (o, d) => {
1274
- o != null && (e.setFocusedKey(o, d), y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && !st(y) && e.replaceSelection(o));
1301
+ const K = (o, d) => {
1302
+ o != null && (e.setFocusedKey(o, d), y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : u && !st(y) && e.replaceSelection(o));
1275
1303
  };
1276
1304
  switch (y.key) {
1277
1305
  case "ArrowDown":
1278
1306
  if (r.getKeyBelow) {
1279
- var K, k;
1307
+ var T, k;
1280
1308
  y.preventDefault();
1281
- let o = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (K = r.getFirstKey) === null || K === void 0 ? void 0 : K.call(r);
1282
- o == null && l && (o = (k = r.getFirstKey) === null || k === void 0 ? void 0 : k.call(r, e.focusedKey)), m(o);
1309
+ let o = e.focusedKey != null ? r.getKeyBelow(e.focusedKey) : (T = r.getFirstKey) === null || T === void 0 ? void 0 : T.call(r);
1310
+ o == null && a && (o = (k = r.getFirstKey) === null || k === void 0 ? void 0 : k.call(r, e.focusedKey)), K(o);
1283
1311
  }
1284
1312
  break;
1285
1313
  case "ArrowUp":
@@ -1287,84 +1315,84 @@ function pr(t) {
1287
1315
  var c, p;
1288
1316
  y.preventDefault();
1289
1317
  let o = e.focusedKey != null ? r.getKeyAbove(e.focusedKey) : (c = r.getLastKey) === null || c === void 0 ? void 0 : c.call(r);
1290
- o == null && l && (o = (p = r.getLastKey) === null || p === void 0 ? void 0 : p.call(r, e.focusedKey)), m(o);
1318
+ o == null && a && (o = (p = r.getLastKey) === null || p === void 0 ? void 0 : p.call(r, e.focusedKey)), K(o);
1291
1319
  }
1292
1320
  break;
1293
1321
  case "ArrowLeft":
1294
1322
  if (r.getKeyLeftOf) {
1295
1323
  y.preventDefault();
1296
1324
  let o = r.getKeyLeftOf(e.focusedKey);
1297
- m(o, E === "rtl" ? "first" : "last");
1325
+ K(o, w === "rtl" ? "first" : "last");
1298
1326
  }
1299
1327
  break;
1300
1328
  case "ArrowRight":
1301
1329
  if (r.getKeyRightOf) {
1302
1330
  y.preventDefault();
1303
1331
  let o = r.getKeyRightOf(e.focusedKey);
1304
- m(o, E === "rtl" ? "last" : "first");
1332
+ K(o, w === "rtl" ? "last" : "first");
1305
1333
  }
1306
1334
  break;
1307
1335
  case "Home":
1308
1336
  if (r.getFirstKey) {
1309
1337
  y.preventDefault();
1310
1338
  let o = r.getFirstKey(e.focusedKey, W(y));
1311
- e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && e.replaceSelection(o);
1339
+ e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : u && e.replaceSelection(o);
1312
1340
  }
1313
1341
  break;
1314
1342
  case "End":
1315
1343
  if (r.getLastKey) {
1316
1344
  y.preventDefault();
1317
1345
  let o = r.getLastKey(e.focusedKey, W(y));
1318
- e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : f && e.replaceSelection(o);
1346
+ e.setFocusedKey(o), W(y) && y.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(o) : u && e.replaceSelection(o);
1319
1347
  }
1320
1348
  break;
1321
1349
  case "PageDown":
1322
1350
  if (r.getKeyPageBelow) {
1323
1351
  y.preventDefault();
1324
1352
  let o = r.getKeyPageBelow(e.focusedKey);
1325
- m(o);
1353
+ K(o);
1326
1354
  }
1327
1355
  break;
1328
1356
  case "PageUp":
1329
1357
  if (r.getKeyPageAbove) {
1330
1358
  y.preventDefault();
1331
1359
  let o = r.getKeyPageAbove(e.focusedKey);
1332
- m(o);
1360
+ K(o);
1333
1361
  }
1334
1362
  break;
1335
1363
  case "a":
1336
- W(y) && e.selectionMode === "multiple" && u !== !0 && (y.preventDefault(), e.selectAll());
1364
+ W(y) && e.selectionMode === "multiple" && f !== !0 && (y.preventDefault(), e.selectAll());
1337
1365
  break;
1338
1366
  case "Escape":
1339
- y.preventDefault(), a || e.clearSelection();
1367
+ y.preventDefault(), l || e.clearSelection();
1340
1368
  break;
1341
1369
  case "Tab":
1342
- if (!T) {
1370
+ if (!m) {
1343
1371
  if (y.shiftKey)
1344
1372
  n.current.focus();
1345
1373
  else {
1346
1374
  let o = rt(n.current, {
1347
1375
  tabbable: !0
1348
- }), d, A;
1376
+ }), d, O;
1349
1377
  do
1350
- A = o.lastChild(), A && (d = A);
1351
- while (A);
1378
+ O = o.lastChild(), O && (d = O);
1379
+ while (O);
1352
1380
  d && !d.contains(document.activeElement) && N(d);
1353
1381
  }
1354
1382
  break;
1355
1383
  }
1356
1384
  }
1357
- }, x = P({
1385
+ }, P = E({
1358
1386
  top: 0,
1359
1387
  left: 0
1360
1388
  });
1361
1389
  Bt(b, "scroll", v ? null : () => {
1362
- x.current = {
1390
+ P.current = {
1363
1391
  top: b.current.scrollTop,
1364
1392
  left: b.current.scrollLeft
1365
1393
  };
1366
1394
  });
1367
- let S = (y) => {
1395
+ let x = (y) => {
1368
1396
  if (e.isFocused) {
1369
1397
  y.currentTarget.contains(y.target) || e.setFocused(!1);
1370
1398
  return;
@@ -1372,32 +1400,32 @@ function pr(t) {
1372
1400
  if (!!y.currentTarget.contains(y.target)) {
1373
1401
  if (e.setFocused(!0), e.focusedKey == null) {
1374
1402
  let k = (p) => {
1375
- p != null && (e.setFocusedKey(p), f && e.replaceSelection(p));
1403
+ p != null && (e.setFocusedKey(p), u && e.replaceSelection(p));
1376
1404
  }, c = y.relatedTarget;
1377
- var m, K;
1378
- c && y.currentTarget.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? k((m = e.lastSelectedKey) !== null && m !== void 0 ? m : r.getLastKey()) : k((K = e.firstSelectedKey) !== null && K !== void 0 ? K : r.getFirstKey());
1405
+ var K, T;
1406
+ c && y.currentTarget.compareDocumentPosition(c) & Node.DOCUMENT_POSITION_FOLLOWING ? k((K = e.lastSelectedKey) !== null && K !== void 0 ? K : r.getLastKey()) : k((T = e.firstSelectedKey) !== null && T !== void 0 ? T : r.getFirstKey());
1379
1407
  } else if (!v) {
1380
- b.current.scrollTop = x.current.top, b.current.scrollLeft = x.current.left;
1408
+ b.current.scrollTop = P.current.top, b.current.scrollLeft = P.current.left;
1381
1409
  let k = b.current.querySelector(`[data-key="${e.focusedKey}"]`);
1382
- k && (N(k), Le(b.current, k));
1410
+ k && (N(k), Me(b.current, k));
1383
1411
  }
1384
1412
  }
1385
1413
  }, L = (y) => {
1386
1414
  y.currentTarget.contains(y.relatedTarget) || e.setFocused(!1);
1387
1415
  };
1388
- const w = P(i);
1389
- z(() => {
1390
- if (w.current) {
1416
+ const M = E(i);
1417
+ A(() => {
1418
+ if (M.current) {
1391
1419
  let y = null;
1392
1420
  i === "first" && (y = r.getFirstKey()), i === "last" && (y = r.getLastKey());
1393
- let m = e.selectedKeys;
1394
- m.size && (y = m.values().next().value), e.setFocused(!0), e.setFocusedKey(y), y == null && !h && Qe(n.current);
1421
+ let K = e.selectedKeys;
1422
+ K.size && (y = K.values().next().value), e.setFocused(!0), e.setFocusedKey(y), y == null && !h && Qe(n.current);
1395
1423
  }
1396
- w.current = !1;
1397
- }, []), z(() => {
1424
+ M.current = !1;
1425
+ }, []), A(() => {
1398
1426
  if (!v && e.focusedKey && (b == null ? void 0 : b.current)) {
1399
1427
  let y = b.current.querySelector(`[data-key="${e.focusedKey}"]`);
1400
- y && Le(b.current, y);
1428
+ y && Me(b.current, y);
1401
1429
  }
1402
1430
  }, [
1403
1431
  v,
@@ -1405,17 +1433,17 @@ function pr(t) {
1405
1433
  e.focusedKey
1406
1434
  ]);
1407
1435
  let s = {
1408
- onKeyDown: M,
1409
- onFocus: S,
1436
+ onKeyDown: S,
1437
+ onFocus: x,
1410
1438
  onBlur: L,
1411
1439
  onMouseDown(y) {
1412
1440
  b.current === y.target && y.preventDefault();
1413
1441
  }
1414
- }, { typeSelectProps: D } = fr({
1442
+ }, { typeSelectProps: I } = fr({
1415
1443
  keyboardDelegate: r,
1416
1444
  selectionManager: e
1417
1445
  });
1418
- g || (s = U(D, s));
1446
+ g || (s = U(I, s));
1419
1447
  let $;
1420
1448
  return h || ($ = e.focusedKey == null ? 0 : -1), {
1421
1449
  collectionProps: {
@@ -1425,7 +1453,7 @@ function pr(t) {
1425
1453
  };
1426
1454
  }
1427
1455
  function yr(t) {
1428
- let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, isVirtualized: l, shouldUseVirtualFocus: a, focus: u, isDisabled: f, onAction: g, allowsDifferentPressOrigin: h } = t, T = (p) => {
1456
+ let { selectionManager: e, key: r, ref: n, shouldSelectOnPressUp: i, isVirtualized: a, shouldUseVirtualFocus: l, focus: f, isDisabled: u, onAction: g, allowsDifferentPressOrigin: h } = t, m = (p) => {
1429
1457
  if (p.pointerType === "keyboard" && st(p))
1430
1458
  e.toggleSelection(r);
1431
1459
  else {
@@ -1434,62 +1462,62 @@ function yr(t) {
1434
1462
  e.selectionMode === "single" ? e.isSelected(r) && !e.disallowEmptySelection ? e.toggleSelection(r) : e.replaceSelection(r) : p && p.shiftKey ? e.extendSelection(r) : e.selectionBehavior === "toggle" || p && (W(p) || p.pointerType === "touch" || p.pointerType === "virtual") ? e.toggleSelection(r) : e.replaceSelection(r);
1435
1463
  }
1436
1464
  };
1437
- z(() => {
1438
- r === e.focusedKey && e.isFocused && !a && document.activeElement !== n.current && (u ? u() : Qe(n.current));
1465
+ A(() => {
1466
+ r === e.focusedKey && e.isFocused && !l && document.activeElement !== n.current && (f ? f() : Qe(n.current));
1439
1467
  }, [
1440
1468
  n,
1441
1469
  r,
1442
1470
  e.focusedKey,
1443
1471
  e.childFocusStrategy,
1444
1472
  e.isFocused,
1445
- a
1446
- ]), f = f || e.isDisabled(r);
1473
+ l
1474
+ ]), u = u || e.isDisabled(r);
1447
1475
  let v = {};
1448
- !a && !f ? v = {
1476
+ !l && !u ? v = {
1449
1477
  tabIndex: r === e.focusedKey ? 0 : -1,
1450
1478
  onFocus(p) {
1451
1479
  p.target === n.current && e.setFocusedKey(r);
1452
1480
  }
1453
- } : f && (v.onMouseDown = (p) => {
1481
+ } : u && (v.onMouseDown = (p) => {
1454
1482
  p.preventDefault();
1455
1483
  });
1456
- let b = !f && e.canSelectItem(r), E = g && !f, M = E && (e.selectionBehavior === "replace" ? !b : e.isEmpty), x = E && b && e.selectionBehavior === "replace", S = M || x, L = P(null), w = S && b, s = P(!1), D = P(!1), $ = {};
1484
+ let b = !u && e.canSelectItem(r), w = g && !u, S = w && (e.selectionBehavior === "replace" ? !b : e.isEmpty), P = w && b && e.selectionBehavior === "replace", x = S || P, L = E(null), M = x && b, s = E(!1), I = E(!1), $ = {};
1457
1485
  i ? ($.onPressStart = (p) => {
1458
- L.current = p.pointerType, s.current = w, p.pointerType === "keyboard" && (!S || Ne()) && T(p);
1486
+ L.current = p.pointerType, s.current = M, p.pointerType === "keyboard" && (!x || Ne()) && m(p);
1459
1487
  }, h ? ($.onPressUp = (p) => {
1460
- p.pointerType !== "keyboard" && T(p);
1461
- }, $.onPress = M ? () => g() : null) : $.onPress = (p) => {
1462
- if (M || x && p.pointerType !== "mouse") {
1488
+ p.pointerType !== "keyboard" && m(p);
1489
+ }, $.onPress = S ? () => g() : null) : $.onPress = (p) => {
1490
+ if (S || P && p.pointerType !== "mouse") {
1463
1491
  if (p.pointerType === "keyboard" && !Re())
1464
1492
  return;
1465
1493
  g();
1466
1494
  } else
1467
- p.pointerType !== "keyboard" && T(p);
1495
+ p.pointerType !== "keyboard" && m(p);
1468
1496
  }) : ($.onPressStart = (p) => {
1469
- L.current = p.pointerType, s.current = w, D.current = M, (p.pointerType === "mouse" && !M || p.pointerType === "keyboard" && (!g || Ne())) && T(p);
1497
+ L.current = p.pointerType, s.current = M, I.current = S, (p.pointerType === "mouse" && !S || p.pointerType === "keyboard" && (!g || Ne())) && m(p);
1470
1498
  }, $.onPress = (p) => {
1471
- (p.pointerType === "touch" || p.pointerType === "pen" || p.pointerType === "virtual" || p.pointerType === "keyboard" && S && Re() || p.pointerType === "mouse" && D.current) && (S ? g() : T(p));
1472
- }), l || (v["data-key"] = r), $.preventFocusOnPress = a;
1473
- let { pressProps: y, isPressed: m } = Je($), K = x ? (p) => {
1499
+ (p.pointerType === "touch" || p.pointerType === "pen" || p.pointerType === "virtual" || p.pointerType === "keyboard" && x && Re() || p.pointerType === "mouse" && I.current) && (x ? g() : m(p));
1500
+ }), a || (v["data-key"] = r), $.preventFocusOnPress = l;
1501
+ let { pressProps: y, isPressed: K } = Je($), T = P ? (p) => {
1474
1502
  L.current === "mouse" && (p.stopPropagation(), p.preventDefault(), g());
1475
1503
  } : void 0, { longPressProps: k } = er({
1476
- isDisabled: !w,
1504
+ isDisabled: !M,
1477
1505
  onLongPress(p) {
1478
- p.pointerType === "touch" && (T(p), e.setSelectionBehavior("toggle"));
1506
+ p.pointerType === "touch" && (m(p), e.setSelectionBehavior("toggle"));
1479
1507
  }
1480
1508
  });
1481
1509
  return {
1482
- itemProps: U(v, b || M ? y : {}, w ? k : {}, {
1483
- onDoubleClick: K,
1510
+ itemProps: U(v, b || S ? y : {}, M ? k : {}, {
1511
+ onDoubleClick: T,
1484
1512
  onDragStartCapture: (p) => {
1485
1513
  L.current === "touch" && s.current && p.preventDefault();
1486
1514
  }
1487
1515
  }),
1488
- isPressed: m,
1516
+ isPressed: K,
1489
1517
  isSelected: e.isSelected(r),
1490
- isDisabled: f,
1518
+ isDisabled: u,
1491
1519
  allowsSelection: b,
1492
- hasAction: S
1520
+ hasAction: x
1493
1521
  };
1494
1522
  }
1495
1523
  function Re() {
@@ -1505,39 +1533,39 @@ function re(t, e, r) {
1505
1533
  return typeof e == "string" && (e = e.replace(/\s+/g, "")), `${lt.get(t)}-${r}-${e}`;
1506
1534
  }
1507
1535
  function br(t, e, r) {
1508
- let { key: n, isDisabled: i } = t, { selectionManager: l, selectedKey: a } = e, u = n === a, f = i || e.isDisabled || e.disabledKeys.has(n), { itemProps: g } = yr({
1509
- selectionManager: l,
1536
+ let { key: n, isDisabled: i } = t, { selectionManager: a, selectedKey: l } = e, f = n === l, u = i || e.isDisabled || e.disabledKeys.has(n), { itemProps: g } = yr({
1537
+ selectionManager: a,
1510
1538
  key: n,
1511
1539
  ref: r,
1512
- isDisabled: f
1513
- }), h = re(e, n, "tab"), T = re(e, n, "tabpanel"), { tabIndex: v } = g;
1540
+ isDisabled: u
1541
+ }), h = re(e, n, "tab"), m = re(e, n, "tabpanel"), { tabIndex: v } = g;
1514
1542
  return {
1515
1543
  tabProps: {
1516
1544
  ...g,
1517
1545
  id: h,
1518
- "aria-selected": u,
1519
- "aria-disabled": f || void 0,
1520
- "aria-controls": u ? T : void 0,
1521
- tabIndex: f ? void 0 : v,
1546
+ "aria-selected": f,
1547
+ "aria-disabled": u || void 0,
1548
+ "aria-controls": f ? m : void 0,
1549
+ tabIndex: u ? void 0 : v,
1522
1550
  role: "tab"
1523
1551
  },
1524
- isSelected: u,
1525
- isDisabled: f
1552
+ isSelected: f,
1553
+ isDisabled: u
1526
1554
  };
1527
1555
  }
1528
1556
  function gr(t, e, r) {
1529
1557
  let [n, i] = F(0);
1530
1558
  se(() => {
1531
1559
  if (r != null && r.current) {
1532
- let u = () => {
1560
+ let f = () => {
1533
1561
  let g = rt(r.current, {
1534
1562
  tabbable: !0
1535
1563
  });
1536
1564
  i(g.nextNode() ? void 0 : 0);
1537
1565
  };
1538
- u();
1539
- let f = new MutationObserver(u);
1540
- return f.observe(r.current, {
1566
+ f();
1567
+ let u = new MutationObserver(f);
1568
+ return u.observe(r.current, {
1541
1569
  subtree: !0,
1542
1570
  childList: !0,
1543
1571
  attributes: !0,
@@ -1546,19 +1574,19 @@ function gr(t, e, r) {
1546
1574
  "disabled"
1547
1575
  ]
1548
1576
  }), () => {
1549
- f.disconnect();
1577
+ u.disconnect();
1550
1578
  };
1551
1579
  }
1552
1580
  }, [
1553
1581
  r
1554
1582
  ]);
1555
- const l = re(e, e == null ? void 0 : e.selectedKey, "tabpanel"), a = qe({
1583
+ const a = re(e, e == null ? void 0 : e.selectedKey, "tabpanel"), l = qe({
1556
1584
  ...t,
1557
- id: l,
1585
+ id: a,
1558
1586
  "aria-labelledby": re(e, e == null ? void 0 : e.selectedKey, "tab")
1559
1587
  });
1560
1588
  return {
1561
- tabPanelProps: U(a, {
1589
+ tabPanelProps: U(l, {
1562
1590
  tabIndex: n,
1563
1591
  role: "tabpanel",
1564
1592
  "aria-describedby": t["aria-describedby"],
@@ -1604,23 +1632,23 @@ class hr {
1604
1632
  }
1605
1633
  }
1606
1634
  function vr(t, e, r) {
1607
- let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: l, selectionManager: a, disabledKeys: u } = e, { direction: f } = it(), g = R(() => new hr(l, f, n, u), [
1608
- l,
1609
- u,
1635
+ let { orientation: n = "horizontal", keyboardActivation: i = "automatic" } = t, { collection: a, selectionManager: l, disabledKeys: f } = e, { direction: u } = it(), g = z(() => new hr(a, u, n, f), [
1636
+ a,
1637
+ f,
1610
1638
  n,
1611
- f
1639
+ u
1612
1640
  ]), { collectionProps: h } = pr({
1613
1641
  ref: r,
1614
- selectionManager: a,
1642
+ selectionManager: l,
1615
1643
  keyboardDelegate: g,
1616
1644
  selectOnFocus: i === "automatic",
1617
1645
  disallowEmptySelection: !0,
1618
1646
  scrollRef: r
1619
- }), T = _e();
1620
- lt.set(e, T);
1647
+ }), m = _e();
1648
+ lt.set(e, m);
1621
1649
  let v = qe({
1622
1650
  ...t,
1623
- id: T
1651
+ id: m
1624
1652
  });
1625
1653
  return {
1626
1654
  tabListProps: {
@@ -1631,7 +1659,7 @@ function vr(t, e, r) {
1631
1659
  }
1632
1660
  };
1633
1661
  }
1634
- function $r(t, e, r) {
1662
+ function mr(t, e, r) {
1635
1663
  return e in t ? Object.defineProperty(t, e, {
1636
1664
  value: r,
1637
1665
  enumerable: !0,
@@ -1653,14 +1681,14 @@ function Ue(t) {
1653
1681
  for (var e = 1; e < arguments.length; e++) {
1654
1682
  var r = arguments[e] != null ? arguments[e] : {};
1655
1683
  e % 2 ? Be(Object(r), !0).forEach(function(n) {
1656
- $r(t, n, r[n]);
1684
+ mr(t, n, r[n]);
1657
1685
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Be(Object(r)).forEach(function(n) {
1658
1686
  Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
1659
1687
  });
1660
1688
  }
1661
1689
  return t;
1662
1690
  }
1663
- var mr = (t, e, r) => {
1691
+ var $r = (t, e, r) => {
1664
1692
  for (var n of Object.keys(t)) {
1665
1693
  var i;
1666
1694
  if (t[n] !== ((i = e[n]) !== null && i !== void 0 ? i : r[n]))
@@ -1670,16 +1698,16 @@ var mr = (t, e, r) => {
1670
1698
  }, Te = (t) => (e) => {
1671
1699
  var r = t.defaultClassName, n = Ue(Ue({}, t.defaultVariants), e);
1672
1700
  for (var i in n) {
1673
- var l, a = (l = n[i]) !== null && l !== void 0 ? l : t.defaultVariants[i];
1674
- if (a != null) {
1675
- var u = a;
1676
- typeof u == "boolean" && (u = u === !0 ? "true" : "false");
1677
- var f = t.variantClassNames[i][u];
1678
- f && (r += " " + f);
1701
+ var a, l = (a = n[i]) !== null && a !== void 0 ? a : t.defaultVariants[i];
1702
+ if (l != null) {
1703
+ var f = l;
1704
+ typeof f == "boolean" && (f = f === !0 ? "true" : "false");
1705
+ var u = t.variantClassNames[i][f];
1706
+ u && (r += " " + u);
1679
1707
  }
1680
1708
  }
1681
1709
  for (var [g, h] of t.compoundVariants)
1682
- mr(g, n, t.defaultVariants) && (r += " " + h);
1710
+ $r(g, n, t.defaultVariants) && (r += " " + h);
1683
1711
  return r;
1684
1712
  }, Kr = Te({ defaultClassName: "kz6kzz0", variantClassNames: { context: { container: "kz6kzz1", navigation: "kz6kzz2" }, active: { true: "kz6kzz3", false: "kz6kzz4" }, disabled: { true: "kz6kzz5", false: "kz6kzz6" } }, defaultVariants: {}, compoundVariants: [[{ context: "container", active: !0 }, "kz6kzz7"], [{ context: "container", active: !1 }, "kz6kzz8"], [{ context: "container", active: !1, disabled: !1 }, "kz6kzz9"], [{ context: "navigation", active: !0 }, "kz6kzza"], [{ context: "navigation", active: !1 }, "kz6kzzb"], [{ context: "navigation", active: !1, disabled: !1 }, "kz6kzzc"], [{ context: "navigation", active: !1, disabled: !0 }, "kz6kzzd"]] }), Tr = Te({ defaultClassName: "", variantClassNames: { active: { true: "kz6kzze", false: "kz6kzzf" }, disabled: { true: "kz6kzzg", false: "kz6kzzh" }, context: { navigation: "kz6kzzi", container: "kz6kzzj" } }, defaultVariants: {}, compoundVariants: [[{ context: "navigation", active: !0 }, "kz6kzzk"]] });
1685
1713
  function at({
@@ -1688,15 +1716,15 @@ function at({
1688
1716
  state: r,
1689
1717
  ...n
1690
1718
  }) {
1691
- const { key: i } = e, l = C.useRef(null), { tabProps: a } = br({ key: i }, r, l), u = r.selectedKey === i, f = r.disabledKeys.has(i), g = pt(e.rendered, (h) => h.type.displayName === "SpsTag" || q.isWoodlandComponent(h.type) && q.get(h.type).name === "Tag" ? [{
1692
- className: Ve(h.props.className, Tr({ active: u, disabled: f, context: t }))
1719
+ const { key: i } = e, a = C.useRef(null), { tabProps: l } = br({ key: i }, r, a), f = r.selectedKey === i, u = r.disabledKeys.has(i), g = pt(e.rendered, (h) => h.type.displayName === "SpsTag" || q.isWoodlandComponent(h.type) && q.get(h.type).name === "Tag" ? [{
1720
+ className: Ve(h.props.className, Tr({ active: f, disabled: u, context: t }))
1693
1721
  }] : [{}]);
1694
1722
  return /* @__PURE__ */ C.createElement(
1695
1723
  "div",
1696
1724
  {
1697
- ...a,
1698
- ref: l,
1699
- className: Kr({ active: u, disabled: f, context: t }),
1725
+ ...l,
1726
+ ref: a,
1727
+ className: Kr({ active: f, disabled: u, context: t }),
1700
1728
  ...n
1701
1729
  },
1702
1730
  g
@@ -1709,11 +1737,11 @@ function ot({
1709
1737
  state: r,
1710
1738
  ...n
1711
1739
  }) {
1712
- const i = C.useRef(null), { tabPanelProps: l } = gr(n, r, i), a = t === "container" ? yt : "div";
1740
+ const i = C.useRef(null), { tabPanelProps: a } = gr(n, r, i), l = t === "container" ? yt : "div";
1713
1741
  return /* @__PURE__ */ C.createElement(
1714
- a,
1742
+ l,
1715
1743
  {
1716
- ...l,
1744
+ ...a,
1717
1745
  ref: i,
1718
1746
  "data-testid": e
1719
1747
  },
@@ -1728,23 +1756,23 @@ function ct({
1728
1756
  "data-testid": r,
1729
1757
  ...n
1730
1758
  }) {
1731
- const i = Tt(n), l = C.useRef(null), { tabListProps: a } = vr(n, i, l), u = bt({ "data-testid": r });
1759
+ const i = Tt(n), a = C.useRef(null), { tabListProps: l } = vr(n, i, a), f = bt({ "data-testid": r });
1732
1760
  return /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(
1733
1761
  "div",
1734
1762
  {
1735
- ...a,
1736
- ref: l,
1763
+ ...l,
1764
+ ref: a,
1737
1765
  className: Ve(Sr({ context: e }), t),
1738
1766
  "data-testid": r
1739
1767
  },
1740
- [...i.collection].map((f) => /* @__PURE__ */ C.createElement(
1768
+ [...i.collection].map((u) => /* @__PURE__ */ C.createElement(
1741
1769
  at,
1742
1770
  {
1743
- key: f.key,
1744
- item: f,
1771
+ key: u.key,
1772
+ item: u,
1745
1773
  state: i,
1746
1774
  context: e,
1747
- ...u(`tab-${String(f.key)}`)
1775
+ ...f(`tab-${String(u.key)}`)
1748
1776
  }
1749
1777
  ))
1750
1778
  ), /* @__PURE__ */ C.createElement(
@@ -1753,7 +1781,7 @@ function ct({
1753
1781
  key: i.selectedItem ? i.selectedItem.key : null,
1754
1782
  state: i,
1755
1783
  context: e,
1756
- ...u("tab-panel")
1784
+ ...f("tab-panel")
1757
1785
  }
1758
1786
  ));
1759
1787
  }
@@ -1834,10 +1862,10 @@ const Pr = {
1834
1862
  }
1835
1863
  }
1836
1864
  }
1837
- }, Mr = {
1865
+ }, Lr = {
1838
1866
  "Tabbed Navigation": Pr
1839
1867
  };
1840
1868
  export {
1841
- Mr as MANIFEST,
1869
+ Lr as MANIFEST,
1842
1870
  ct as Tabs
1843
1871
  };