@sps-woodland/tabs 8.23.17 → 8.24.0

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