@sps-woodland/tabs 8.24.0 → 8.24.2

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