@sps-woodland/focused-task 8.42.1 → 8.42.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,120 +1,115 @@
1
- import { Metadata as Le, cl as X, combineEventHandlers as $e, useChildTestIdAttrBuilder as Ze, selectChildren as et, contentOf as he } from "@sps-woodland/core";
2
- import { Button as tt } from "@sps-woodland/buttons";
3
- import * as f from "react";
4
- import h, { useRef as y, useCallback as S, useState as j, useContext as A, useEffect as P, useMemo as H, createContext as nt } from "react";
5
- import rt from "react-dom";
6
- import { code as Ee } from "@spscommerce/utils";
7
- const E = typeof document < "u" ? h.useLayoutEffect : () => {
1
+ import { Metadata as Ge, cl as ie, combineEventHandlers as Ce, useChildTestIdAttrBuilder as ht, selectChildren as Et, contentOf as Fe } from "@sps-woodland/core";
2
+ import { Button as wt } from "@sps-woodland/buttons";
3
+ import * as v from "react";
4
+ import m, { useState as Z, useRef as h, useCallback as N, useContext as H, useEffect as _, useReducer as gt, useMemo as U, createContext as yt } from "react";
5
+ import Tt from "react-dom";
6
+ import { code as Pe } from "@spscommerce/utils";
7
+ const g = typeof document < "u" ? m.useLayoutEffect : () => {
8
8
  };
9
- function K(e) {
10
- const t = y(null);
11
- return E(() => {
12
- t.current = e;
13
- }, [
14
- e
15
- ]), S((...n) => {
16
- const r = t.current;
17
- return r?.(...n);
18
- }, []);
19
- }
20
- function ot(e) {
21
- let [t, n] = j(e), r = y(null), o = K(() => {
22
- if (!r.current) return;
23
- let a = r.current.next();
24
- if (a.done) {
25
- r.current = null;
9
+ function Nt(e) {
10
+ let [t, n] = Z(e), r = h(t), o = h(null), i = h(() => {
11
+ if (!o.current) return;
12
+ let l = o.current.next();
13
+ if (l.done) {
14
+ o.current = null;
26
15
  return;
27
16
  }
28
- t === a.value ? o() : n(a.value);
17
+ r.current === l.value ? i.current() : n(l.value);
29
18
  });
30
- E(() => {
31
- r.current && o();
32
- });
33
- let i = K((a) => {
34
- r.current = a(t), o();
19
+ g(() => {
20
+ r.current = t, o.current && i.current();
35
21
  });
22
+ let a = N((l) => {
23
+ o.current = l(r.current), i.current();
24
+ }, [
25
+ i
26
+ ]);
36
27
  return [
37
28
  t,
38
- i
29
+ a
39
30
  ];
40
31
  }
41
- const Y = {
32
+ const ae = {
42
33
  prefix: String(Math.round(Math.random() * 1e10)),
43
34
  current: 0
44
- }, Ce = /* @__PURE__ */ h.createContext(Y), at = /* @__PURE__ */ h.createContext(!1);
45
- let it = !!(typeof window < "u" && window.document && window.document.createElement), oe = /* @__PURE__ */ new WeakMap();
46
- function lt(e = !1) {
47
- let t = A(Ce), n = y(null);
35
+ }, ze = /* @__PURE__ */ m.createContext(ae), kt = /* @__PURE__ */ m.createContext(!1);
36
+ let St = !!(typeof window < "u" && window.document && window.document.createElement), pe = /* @__PURE__ */ new WeakMap();
37
+ function xt(e = !1) {
38
+ let t = H(ze), n = h(null);
48
39
  if (n.current === null && !e) {
49
40
  var r, o;
50
- let i = (o = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
41
+ let i = (o = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || o === void 0 || (r = o.ReactCurrentOwner) === null || r === void 0 ? void 0 : r.current;
51
42
  if (i) {
52
- let a = oe.get(i);
53
- a == null ? oe.set(i, {
43
+ let a = pe.get(i);
44
+ a == null ? pe.set(i, {
54
45
  id: t.current,
55
46
  state: i.memoizedState
56
- }) : i.memoizedState !== a.state && (t.current = a.id, oe.delete(i));
47
+ }) : i.memoizedState !== a.state && (t.current = a.id, pe.delete(i));
57
48
  }
58
49
  n.current = ++t.current;
59
50
  }
60
51
  return n.current;
61
52
  }
62
- function st(e) {
63
- let t = A(Ce);
64
- t === Y && !it && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
65
- let n = lt(!!e), r = t === Y && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
53
+ function Lt(e) {
54
+ let t = H(ze);
55
+ t === ae && !St && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
56
+ let n = xt(!!e), r = t === ae && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${t.prefix}`;
66
57
  return e || `${r}-${n}`;
67
58
  }
68
- function ct(e) {
69
- let t = h.useId(), [n] = j(_e()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Y.prefix}`;
59
+ function _t(e) {
60
+ let t = m.useId(), [n] = Z(Ue()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ae.prefix}`;
70
61
  return e || `${r}-${t}`;
71
62
  }
72
- const ut = typeof h.useId == "function" ? ct : st;
73
- function dt() {
63
+ const Ct = typeof m.useId == "function" ? _t : Lt;
64
+ function Ft() {
74
65
  return !1;
75
66
  }
76
- function ft() {
67
+ function Pt() {
77
68
  return !0;
78
69
  }
79
- function pt(e) {
70
+ function Ot(e) {
80
71
  return () => {
81
72
  };
82
73
  }
83
- function _e() {
84
- return typeof h.useSyncExternalStore == "function" ? h.useSyncExternalStore(pt, dt, ft) : A(at);
85
- }
86
- let vt = !!(typeof window < "u" && window.document && window.document.createElement), L = /* @__PURE__ */ new Map();
87
- function Oe(e) {
88
- let [t, n] = j(e), r = y(null), o = ut(t), i = S((a) => {
89
- r.current = a;
90
- }, []);
91
- return vt && (L.has(o) && !L.get(o).includes(i) ? L.set(o, [
92
- ...L.get(o),
93
- i
94
- ]) : L.set(o, [
95
- i
96
- ])), E(() => {
74
+ function Ue() {
75
+ return typeof m.useSyncExternalStore == "function" ? m.useSyncExternalStore(Ot, Ft, Pt) : H(kt);
76
+ }
77
+ let Mt = !!(typeof window < "u" && window.document && window.document.createElement), B = /* @__PURE__ */ new Map(), G;
78
+ typeof FinalizationRegistry < "u" && (G = new FinalizationRegistry((e) => {
79
+ B.delete(e);
80
+ }));
81
+ function Je(e) {
82
+ let [t, n] = Z(e), r = h(null), o = Ct(t), i = h(null);
83
+ if (G && G.register(i, o), Mt) {
84
+ const a = B.get(o);
85
+ a && !a.includes(r) ? a.push(r) : B.set(o, [
86
+ r
87
+ ]);
88
+ }
89
+ return g(() => {
97
90
  let a = o;
98
91
  return () => {
99
- L.delete(a);
92
+ G && G.unregister(i), B.delete(a);
100
93
  };
101
94
  }, [
102
95
  o
103
- ]), P(() => {
96
+ ]), _(() => {
104
97
  let a = r.current;
105
- a && (r.current = null, n(a));
98
+ return a && n(a), () => {
99
+ a && (r.current = null);
100
+ };
106
101
  }), o;
107
102
  }
108
- function bt(e, t) {
103
+ function Rt(e, t) {
109
104
  if (e === t) return e;
110
- let n = L.get(e);
105
+ let n = B.get(e);
111
106
  if (n)
112
- return n.forEach((o) => o(t)), t;
113
- let r = L.get(t);
114
- return r ? (r.forEach((o) => o(e)), e) : t;
107
+ return n.forEach((o) => o.current = t), t;
108
+ let r = B.get(t);
109
+ return r ? (r.forEach((o) => o.current = e), e) : t;
115
110
  }
116
- function mt(e = []) {
117
- let t = Oe(), [n, r] = ot(t), o = S(() => {
111
+ function Dt(e = []) {
112
+ let t = Je(), [n, r] = Nt(t), o = N(() => {
118
113
  r(function* () {
119
114
  yield t, yield document.getElementById(t) ? t : void 0;
120
115
  });
@@ -122,35 +117,212 @@ function mt(e = []) {
122
117
  t,
123
118
  r
124
119
  ]);
125
- return E(o, [
120
+ return g(o, [
126
121
  t,
127
122
  o,
128
123
  ...e
129
124
  ]), n;
130
125
  }
131
- function Q(...e) {
126
+ function le(...e) {
132
127
  return (...t) => {
133
128
  for (let n of e) typeof n == "function" && n(...t);
134
129
  };
135
130
  }
136
- const g = (e) => {
131
+ const w = (e) => {
137
132
  var t;
138
133
  return (t = e?.ownerDocument) !== null && t !== void 0 ? t : document;
139
- }, Z = (e) => e && "window" in e && e.window === e ? e : g(e).defaultView || window;
140
- function Me(e) {
134
+ }, X = (e) => e && "window" in e && e.window === e ? e : w(e).defaultView || window;
135
+ function At(e) {
136
+ return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
137
+ }
138
+ function It(e) {
139
+ return At(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
140
+ }
141
+ let Wt = !1;
142
+ function ue() {
143
+ return Wt;
144
+ }
145
+ function F(e, t) {
146
+ if (!ue()) return t && e ? e.contains(t) : !1;
147
+ if (!e || !t) return !1;
148
+ let n = t;
149
+ for (; n !== null; ) {
150
+ if (n === e) return !0;
151
+ n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : It(n) ? n = n.host : n = n.parentNode;
152
+ }
153
+ return !1;
154
+ }
155
+ const T = (e = document) => {
156
+ var t;
157
+ if (!ue()) return e.activeElement;
158
+ let n = e.activeElement;
159
+ for (; n && "shadowRoot" in n && (!((t = n.shadowRoot) === null || t === void 0) && t.activeElement); ) n = n.shadowRoot.activeElement;
160
+ return n;
161
+ };
162
+ function y(e) {
163
+ if (ue() && e.target instanceof Element && e.target.shadowRoot) {
164
+ var t, n;
165
+ if ("composedPath" in e) return (t = e.composedPath()[0]) !== null && t !== void 0 ? t : null;
166
+ if ("composedPath" in e.nativeEvent) return (n = e.nativeEvent.composedPath()[0]) !== null && n !== void 0 ? n : null;
167
+ }
168
+ return e.target;
169
+ }
170
+ class Kt {
171
+ get currentNode() {
172
+ return this._currentNode;
173
+ }
174
+ set currentNode(t) {
175
+ if (!F(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
176
+ const n = [];
177
+ let r = t, o = t;
178
+ for (this._currentNode = t; r && r !== this.root; ) if (r.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
179
+ const a = r, l = this._doc.createTreeWalker(a, this.whatToShow, {
180
+ acceptNode: this._acceptNode
181
+ });
182
+ n.push(l), l.currentNode = o, this._currentSetFor.add(l), r = o = a.host;
183
+ } else r = r.parentNode;
184
+ const i = this._doc.createTreeWalker(this.root, this.whatToShow, {
185
+ acceptNode: this._acceptNode
186
+ });
187
+ n.push(i), i.currentNode = o, this._currentSetFor.add(i), this._walkerStack = n;
188
+ }
189
+ get doc() {
190
+ return this._doc;
191
+ }
192
+ firstChild() {
193
+ let t = this.currentNode, n = this.nextNode();
194
+ return F(t, n) ? (n && (this.currentNode = n), n) : (this.currentNode = t, null);
195
+ }
196
+ lastChild() {
197
+ let n = this._walkerStack[0].lastChild();
198
+ return n && (this.currentNode = n), n;
199
+ }
200
+ nextNode() {
201
+ const t = this._walkerStack[0].nextNode();
202
+ if (t) {
203
+ if (t.shadowRoot) {
204
+ var n;
205
+ let o;
206
+ if (typeof this.filter == "function" ? o = this.filter(t) : !((n = this.filter) === null || n === void 0) && n.acceptNode && (o = this.filter.acceptNode(t)), o === NodeFilter.FILTER_ACCEPT)
207
+ return this.currentNode = t, t;
208
+ let i = this.nextNode();
209
+ return i && (this.currentNode = i), i;
210
+ }
211
+ return t && (this.currentNode = t), t;
212
+ } else if (this._walkerStack.length > 1) {
213
+ this._walkerStack.shift();
214
+ let r = this.nextNode();
215
+ return r && (this.currentNode = r), r;
216
+ } else return null;
217
+ }
218
+ previousNode() {
219
+ const t = this._walkerStack[0];
220
+ if (t.currentNode === t.root) {
221
+ if (this._currentSetFor.has(t))
222
+ if (this._currentSetFor.delete(t), this._walkerStack.length > 1) {
223
+ this._walkerStack.shift();
224
+ let o = this.previousNode();
225
+ return o && (this.currentNode = o), o;
226
+ } else return null;
227
+ return null;
228
+ }
229
+ const n = t.previousNode();
230
+ if (n) {
231
+ if (n.shadowRoot) {
232
+ var r;
233
+ let i;
234
+ if (typeof this.filter == "function" ? i = this.filter(n) : !((r = this.filter) === null || r === void 0) && r.acceptNode && (i = this.filter.acceptNode(n)), i === NodeFilter.FILTER_ACCEPT)
235
+ return n && (this.currentNode = n), n;
236
+ let a = this.lastChild();
237
+ return a && (this.currentNode = a), a;
238
+ }
239
+ return n && (this.currentNode = n), n;
240
+ } else if (this._walkerStack.length > 1) {
241
+ this._walkerStack.shift();
242
+ let o = this.previousNode();
243
+ return o && (this.currentNode = o), o;
244
+ } else return null;
245
+ }
246
+ /**
247
+ * @deprecated
248
+ */
249
+ nextSibling() {
250
+ return null;
251
+ }
252
+ /**
253
+ * @deprecated
254
+ */
255
+ previousSibling() {
256
+ return null;
257
+ }
258
+ /**
259
+ * @deprecated
260
+ */
261
+ parentNode() {
262
+ return null;
263
+ }
264
+ constructor(t, n, r, o) {
265
+ this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (a) => {
266
+ if (a.nodeType === Node.ELEMENT_NODE) {
267
+ const s = a.shadowRoot;
268
+ if (s) {
269
+ const c = this._doc.createTreeWalker(s, this.whatToShow, {
270
+ acceptNode: this._acceptNode
271
+ });
272
+ return this._walkerStack.unshift(c), NodeFilter.FILTER_ACCEPT;
273
+ } else {
274
+ var l;
275
+ if (typeof this.filter == "function") return this.filter(a);
276
+ if (!((l = this.filter) === null || l === void 0) && l.acceptNode) return this.filter.acceptNode(a);
277
+ if (this.filter === null) return NodeFilter.FILTER_ACCEPT;
278
+ }
279
+ }
280
+ return NodeFilter.FILTER_SKIP;
281
+ }, this._doc = t, this.root = n, this.filter = o ?? null, this.whatToShow = r ?? NodeFilter.SHOW_ALL, this._currentNode = n, this._walkerStack.unshift(t.createTreeWalker(n, r, this._acceptNode));
282
+ const i = n.shadowRoot;
283
+ if (i) {
284
+ const a = this._doc.createTreeWalker(i, this.whatToShow, {
285
+ acceptNode: this._acceptNode
286
+ });
287
+ this._walkerStack.unshift(a);
288
+ }
289
+ }
290
+ }
291
+ function Vt(e, t, n, r) {
292
+ return ue() ? new Kt(e, t, n, r) : e.createTreeWalker(t, n, r);
293
+ }
294
+ function Bt(...e) {
295
+ return e.length === 1 && e[0] ? e[0] : (t) => {
296
+ let n = !1;
297
+ const r = e.map((o) => {
298
+ const i = Oe(o, t);
299
+ return n || (n = typeof i == "function"), i;
300
+ });
301
+ if (n) return () => {
302
+ r.forEach((o, i) => {
303
+ typeof o == "function" ? o() : Oe(e[i], null);
304
+ });
305
+ };
306
+ };
307
+ }
308
+ function Oe(e, t) {
309
+ if (typeof e == "function") return e(t);
310
+ e != null && (e.current = t);
311
+ }
312
+ function Xe(e) {
141
313
  var t, n, r = "";
142
314
  if (typeof e == "string" || typeof e == "number") r += e;
143
315
  else if (typeof e == "object") if (Array.isArray(e)) {
144
316
  var o = e.length;
145
- for (t = 0; t < o; t++) e[t] && (n = Me(e[t])) && (r && (r += " "), r += n);
317
+ for (t = 0; t < o; t++) e[t] && (n = Xe(e[t])) && (r && (r += " "), r += n);
146
318
  } else for (n in e) e[n] && (r && (r += " "), r += n);
147
319
  return r;
148
320
  }
149
- function $t() {
150
- for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Me(e)) && (r && (r += " "), r += t);
321
+ function Ht() {
322
+ for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Xe(e)) && (r && (r += " "), r += t);
151
323
  return r;
152
324
  }
153
- function ht(...e) {
325
+ function jt(...e) {
154
326
  let t = {
155
327
  ...e[0]
156
328
  };
@@ -161,19 +333,19 @@ function ht(...e) {
161
333
  typeof i == "function" && typeof a == "function" && // This is a lot faster than a regex.
162
334
  o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
163
335
  65 && o.charCodeAt(2) <= /* 'Z' */
164
- 90 ? t[o] = Q(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = $t(i, a) : o === "id" && i && a ? t.id = bt(i, a) : t[o] = a !== void 0 ? a : i;
336
+ 90 ? t[o] = le(i, a) : (o === "className" || o === "UNSAFE_className") && typeof i == "string" && typeof a == "string" ? t[o] = Ht(i, a) : o === "id" && i && a ? t.id = Rt(i, a) : o === "ref" && i && a ? t.ref = Bt(i, a) : t[o] = a !== void 0 ? a : i;
165
337
  }
166
338
  }
167
339
  return t;
168
340
  }
169
- const Et = /* @__PURE__ */ new Set([
341
+ const qt = /* @__PURE__ */ new Set([
170
342
  "id"
171
- ]), gt = /* @__PURE__ */ new Set([
343
+ ]), Gt = /* @__PURE__ */ new Set([
172
344
  "aria-label",
173
345
  "aria-labelledby",
174
346
  "aria-describedby",
175
347
  "aria-details"
176
- ]), wt = /* @__PURE__ */ new Set([
348
+ ]), zt = /* @__PURE__ */ new Set([
177
349
  "href",
178
350
  "hrefLang",
179
351
  "target",
@@ -181,37 +353,78 @@ const Et = /* @__PURE__ */ new Set([
181
353
  "download",
182
354
  "ping",
183
355
  "referrerPolicy"
184
- ]), yt = /^(data-.*)$/;
185
- function Tt(e, t = {}) {
186
- let { labelable: n, isLink: r, propNames: o } = t, i = {};
187
- for (const a in e) Object.prototype.hasOwnProperty.call(e, a) && (Et.has(a) || n && gt.has(a) || r && wt.has(a) || o?.has(a) || yt.test(a)) && (i[a] = e[a]);
188
- return i;
189
- }
190
- function ge(e) {
191
- if (xt()) e.focus({
356
+ ]), Ut = /* @__PURE__ */ new Set([
357
+ "dir",
358
+ "lang",
359
+ "hidden",
360
+ "inert",
361
+ "translate"
362
+ ]), Me = /* @__PURE__ */ new Set([
363
+ "onClick",
364
+ "onAuxClick",
365
+ "onContextMenu",
366
+ "onDoubleClick",
367
+ "onMouseDown",
368
+ "onMouseEnter",
369
+ "onMouseLeave",
370
+ "onMouseMove",
371
+ "onMouseOut",
372
+ "onMouseOver",
373
+ "onMouseUp",
374
+ "onTouchCancel",
375
+ "onTouchEnd",
376
+ "onTouchMove",
377
+ "onTouchStart",
378
+ "onPointerDown",
379
+ "onPointerMove",
380
+ "onPointerUp",
381
+ "onPointerCancel",
382
+ "onPointerEnter",
383
+ "onPointerLeave",
384
+ "onPointerOver",
385
+ "onPointerOut",
386
+ "onGotPointerCapture",
387
+ "onLostPointerCapture",
388
+ "onScroll",
389
+ "onWheel",
390
+ "onAnimationStart",
391
+ "onAnimationEnd",
392
+ "onAnimationIteration",
393
+ "onTransitionCancel",
394
+ "onTransitionEnd",
395
+ "onTransitionRun",
396
+ "onTransitionStart"
397
+ ]), Jt = /^(data-.*)$/;
398
+ function Xt(e, t = {}) {
399
+ let { labelable: n, isLink: r, global: o, events: i = o, propNames: a } = t, l = {};
400
+ for (const s in e) Object.prototype.hasOwnProperty.call(e, s) && (qt.has(s) || n && Gt.has(s) || r && zt.has(s) || o && Ut.has(s) || i && (Me.has(s) || s.endsWith("Capture") && Me.has(s.slice(0, -7))) || a?.has(s) || Jt.test(s)) && (l[s] = e[s]);
401
+ return l;
402
+ }
403
+ function he(e) {
404
+ if (Yt()) e.focus({
192
405
  preventScroll: !0
193
406
  });
194
407
  else {
195
- let t = kt(e);
196
- e.focus(), St(t);
408
+ let t = Qt(e);
409
+ e.focus(), Zt(t);
197
410
  }
198
411
  }
199
- let U = null;
200
- function xt() {
201
- if (U == null) {
202
- U = !1;
412
+ let ne = null;
413
+ function Yt() {
414
+ if (ne == null) {
415
+ ne = !1;
203
416
  try {
204
417
  document.createElement("div").focus({
205
418
  get preventScroll() {
206
- return U = !0, !0;
419
+ return ne = !0, !0;
207
420
  }
208
421
  });
209
422
  } catch {
210
423
  }
211
424
  }
212
- return U;
425
+ return ne;
213
426
  }
214
- function kt(e) {
427
+ function Qt(e) {
215
428
  let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
216
429
  for (; t instanceof HTMLElement && t !== r; )
217
430
  (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
@@ -225,152 +438,270 @@ function kt(e) {
225
438
  scrollLeft: r.scrollLeft
226
439
  }), n;
227
440
  }
228
- function St(e) {
441
+ function Zt(e) {
229
442
  for (let { element: t, scrollTop: n, scrollLeft: r } of e)
230
443
  t.scrollTop = n, t.scrollLeft = r;
231
444
  }
232
- function Nt(e) {
445
+ function de(e) {
233
446
  var t;
234
- return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((n) => e.test(n.brand))) || e.test(window.navigator.userAgent);
447
+ if (typeof window > "u" || window.navigator == null) return !1;
448
+ let n = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
449
+ return Array.isArray(n) && n.some((r) => e.test(r.brand)) || e.test(window.navigator.userAgent);
235
450
  }
236
- function pe(e) {
451
+ function ke(e) {
237
452
  var t;
238
453
  return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
239
454
  }
240
- function q(e) {
455
+ function O(e) {
456
+ if (process.env.NODE_ENV === "test") return e;
241
457
  let t = null;
242
458
  return () => (t == null && (t = e()), t);
243
459
  }
244
- const De = q(function() {
245
- return pe(/^Mac/i);
246
- }), Ft = q(function() {
247
- return pe(/^iPhone/i);
248
- }), Pt = q(function() {
249
- return pe(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
250
- De() && navigator.maxTouchPoints > 1;
251
- }), Lt = q(function() {
252
- return Ft() || Pt();
253
- }), Ct = q(function() {
254
- return Nt(/Android/i);
460
+ const Y = O(function() {
461
+ return ke(/^Mac/i);
462
+ }), en = O(function() {
463
+ return ke(/^iPhone/i);
464
+ }), Ye = O(function() {
465
+ return ke(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
466
+ Y() && navigator.maxTouchPoints > 1;
467
+ }), Qe = O(function() {
468
+ return en() || Ye();
469
+ });
470
+ O(function() {
471
+ return Y() || Qe();
472
+ });
473
+ const tn = O(function() {
474
+ return de(/AppleWebKit/i) && !Ze();
475
+ }), Ze = O(function() {
476
+ return de(/Chrome/i);
477
+ }), et = O(function() {
478
+ return de(/Android/i);
479
+ }), nn = O(function() {
480
+ return de(/Firefox/i);
255
481
  });
256
- let M = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set();
257
- function we() {
482
+ function Q(e, t, n = !0) {
483
+ var r, o;
484
+ let { metaKey: i, ctrlKey: a, altKey: l, shiftKey: s } = t;
485
+ nn() && (!((o = window.event) === null || o === void 0 || (r = o.type) === null || r === void 0) && r.startsWith("key")) && e.target === "_blank" && (Y() ? i = !0 : a = !0);
486
+ let c = tn() && Y() && !Ye() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
487
+ keyIdentifier: "Enter",
488
+ metaKey: i,
489
+ ctrlKey: a,
490
+ altKey: l,
491
+ shiftKey: s
492
+ }) : new MouseEvent("click", {
493
+ metaKey: i,
494
+ ctrlKey: a,
495
+ altKey: l,
496
+ shiftKey: s,
497
+ detail: 1,
498
+ bubbles: !0,
499
+ cancelable: !0
500
+ });
501
+ Q.isOpening = n, he(e), e.dispatchEvent(c), Q.isOpening = !1;
502
+ }
503
+ Q.isOpening = !1;
504
+ let M = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Set();
505
+ function Re() {
258
506
  if (typeof window > "u") return;
259
507
  function e(r) {
260
508
  return "propertyName" in r;
261
509
  }
262
510
  let t = (r) => {
263
- if (!e(r) || !r.target) return;
264
- let o = M.get(r.target);
265
- o || (o = /* @__PURE__ */ new Set(), M.set(r.target, o), r.target.addEventListener("transitioncancel", n, {
511
+ let o = y(r);
512
+ if (!e(r) || !o) return;
513
+ let i = M.get(o);
514
+ i || (i = /* @__PURE__ */ new Set(), M.set(o, i), o.addEventListener("transitioncancel", n, {
266
515
  once: !0
267
- })), o.add(r.propertyName);
516
+ })), i.add(r.propertyName);
268
517
  }, n = (r) => {
269
- if (!e(r) || !r.target) return;
270
- let o = M.get(r.target);
271
- if (o && (o.delete(r.propertyName), o.size === 0 && (r.target.removeEventListener("transitioncancel", n), M.delete(r.target)), M.size === 0)) {
272
- for (let i of le) i();
273
- le.clear();
518
+ let o = y(r);
519
+ if (!e(r) || !o) return;
520
+ let i = M.get(o);
521
+ if (i && (i.delete(r.propertyName), i.size === 0 && (o.removeEventListener("transitioncancel", n), M.delete(o)), M.size === 0)) {
522
+ for (let a of Ee) a();
523
+ Ee.clear();
274
524
  }
275
525
  };
276
526
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
277
527
  }
278
- typeof document < "u" && (document.readyState !== "loading" ? we() : document.addEventListener("DOMContentLoaded", we));
279
- function _t(e) {
528
+ typeof document < "u" && (document.readyState !== "loading" ? Re() : document.addEventListener("DOMContentLoaded", Re));
529
+ function rn() {
530
+ for (const [e] of M)
531
+ "isConnected" in e && !e.isConnected && M.delete(e);
532
+ }
533
+ function on(e) {
280
534
  requestAnimationFrame(() => {
281
- M.size === 0 ? e() : le.add(e);
535
+ rn(), M.size === 0 ? e() : Ee.add(e);
282
536
  });
283
537
  }
284
- function ye(e, t) {
285
- let n = window.getComputedStyle(e), r = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
286
- return r && t && (r = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), r;
538
+ function an() {
539
+ let e = h(/* @__PURE__ */ new Map()), t = N((o, i, a, l) => {
540
+ let s = l?.once ? (...c) => {
541
+ e.current.delete(a), a(...c);
542
+ } : a;
543
+ e.current.set(a, {
544
+ type: i,
545
+ eventTarget: o,
546
+ fn: s,
547
+ options: l
548
+ }), o.addEventListener(i, s, l);
549
+ }, []), n = N((o, i, a, l) => {
550
+ var s;
551
+ let c = ((s = e.current.get(a)) === null || s === void 0 ? void 0 : s.fn) || a;
552
+ o.removeEventListener(i, c, l), e.current.delete(a);
553
+ }, []), r = N(() => {
554
+ e.current.forEach((o, i) => {
555
+ n(o.eventTarget, o.type, i, o.options);
556
+ });
557
+ }, [
558
+ n
559
+ ]);
560
+ return _(() => r, [
561
+ r
562
+ ]), {
563
+ addGlobalListener: t,
564
+ removeGlobalListener: n,
565
+ removeAllGlobalListeners: r
566
+ };
567
+ }
568
+ var ve;
569
+ const ln = (ve = m.useInsertionEffect) !== null && ve !== void 0 ? ve : g;
570
+ function De(e) {
571
+ const t = h(null);
572
+ return ln(() => {
573
+ t.current = e;
574
+ }, [
575
+ e
576
+ ]), N((...n) => {
577
+ const r = t.current;
578
+ return r?.(...n);
579
+ }, []);
287
580
  }
288
581
  function Ae(e, t) {
582
+ if (!e) return !1;
583
+ let n = window.getComputedStyle(e), r = document.scrollingElement || document.documentElement, o = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
584
+ return e === r && n.overflow !== "hidden" && (o = !0), o && t && (o = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), o;
585
+ }
586
+ function tt(e, t) {
289
587
  let n = e;
290
- for (ye(n, t) && (n = n.parentElement); n && !ye(n, t); ) n = n.parentElement;
588
+ for (Ae(n, t) && (n = n.parentElement); n && !Ae(n, t); ) n = n.parentElement;
291
589
  return n || document.scrollingElement || document.documentElement;
292
590
  }
293
- function Ot(e) {
294
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Ct() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
591
+ function sn(e) {
592
+ return e.pointerType === "" && e.isTrusted ? !0 : et() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
593
+ }
594
+ const cn = typeof Element < "u" && "checkVisibility" in Element.prototype;
595
+ function un(e) {
596
+ const t = X(e);
597
+ if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
598
+ let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
599
+ if (o) {
600
+ const { getComputedStyle: i } = e.ownerDocument.defaultView;
601
+ let { display: a, visibility: l } = i(e);
602
+ o = a !== "none" && l !== "hidden" && l !== "collapse";
603
+ }
604
+ return o;
605
+ }
606
+ function dn(e, t) {
607
+ return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
608
+ !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
609
+ }
610
+ function Se(e, t) {
611
+ return cn ? e.checkVisibility({
612
+ visibilityProperty: !0
613
+ }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && un(e) && dn(e, t) && (!e.parentElement || Se(e.parentElement, e));
614
+ }
615
+ const xe = [
616
+ "input:not([disabled]):not([type=hidden])",
617
+ "select:not([disabled])",
618
+ "textarea:not([disabled])",
619
+ "button:not([disabled])",
620
+ "a[href]",
621
+ "area[href]",
622
+ "summary",
623
+ "iframe",
624
+ "object",
625
+ "embed",
626
+ "audio[controls]",
627
+ "video[controls]",
628
+ '[contenteditable]:not([contenteditable^="false"])',
629
+ "permission"
630
+ ], fn = xe.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
631
+ xe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
632
+ const pn = xe.join(':not([hidden]):not([tabindex="-1"]),');
633
+ function vn(e) {
634
+ return e.matches(fn) && Se(e) && !nt(e);
635
+ }
636
+ function bn(e) {
637
+ return e.matches(pn) && Se(e) && !nt(e);
638
+ }
639
+ function nt(e) {
640
+ let t = e;
641
+ for (; t != null; ) {
642
+ if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
643
+ t = t.parentElement;
644
+ }
645
+ return !1;
295
646
  }
296
- function Mt(e, t, n) {
297
- let [r, o] = j(e || t), i = y(e !== void 0), a = e !== void 0;
298
- P(() => {
299
- let l = i.current;
300
- l !== a && console.warn(`WARN: A component changed from ${l ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}.`), i.current = a;
647
+ var be;
648
+ const $n = typeof document < "u" ? (be = m.useInsertionEffect) !== null && be !== void 0 ? be : m.useLayoutEffect : () => {
649
+ };
650
+ function mn(e, t, n) {
651
+ let [r, o] = Z(e || t), i = h(r), a = h(e !== void 0), l = e !== void 0;
652
+ _(() => {
653
+ let d = a.current;
654
+ d !== l && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${d ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), a.current = l;
301
655
  }, [
302
- a
656
+ l
303
657
  ]);
304
- let c = a ? e : r, u = S((l, ...s) => {
305
- let d = (p, ...b) => {
306
- n && (Object.is(c, p) || n(p, ...b)), a || (c = p);
307
- };
308
- typeof l == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), o((b, ...v) => {
309
- let k = l(a ? c : b, ...v);
310
- return d(k, ...s), a ? b : k;
311
- })) : (a || o(l), d(l, ...s));
658
+ let s = l ? e : r;
659
+ $n(() => {
660
+ i.current = s;
661
+ });
662
+ let [, c] = gt(() => ({}), {}), u = N((d, ...f) => {
663
+ let p = typeof d == "function" ? d(i.current) : d;
664
+ Object.is(i.current, p) || (i.current = p, o(p), c(), n?.(p, ...f));
312
665
  }, [
313
- a,
314
- c,
315
666
  n
316
667
  ]);
317
668
  return [
318
- c,
669
+ s,
319
670
  u
320
671
  ];
321
672
  }
322
- const We = h.createContext({
323
- register: () => {
324
- }
325
- });
326
- We.displayName = "PressResponderContext";
327
- function Dt({ children: e }) {
328
- let t = H(() => ({
329
- register: () => {
330
- }
331
- }), []);
332
- return /* @__PURE__ */ h.createElement(We.Provider, {
333
- value: t
334
- }, e);
673
+ function rt(e) {
674
+ let t = e;
675
+ return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
676
+ }, t;
335
677
  }
336
- class At {
337
- isDefaultPrevented() {
338
- return this.nativeEvent.defaultPrevented;
339
- }
340
- preventDefault() {
341
- this.defaultPrevented = !0, this.nativeEvent.preventDefault();
342
- }
343
- stopPropagation() {
344
- this.nativeEvent.stopPropagation(), this.isPropagationStopped = () => !0;
345
- }
346
- isPropagationStopped() {
347
- return !1;
348
- }
349
- persist() {
350
- }
351
- constructor(t, n) {
352
- this.nativeEvent = n, this.target = n.target, this.currentTarget = n.currentTarget, this.relatedTarget = n.relatedTarget, this.bubbles = n.bubbles, this.cancelable = n.cancelable, this.defaultPrevented = n.defaultPrevented, this.eventPhase = n.eventPhase, this.isTrusted = n.isTrusted, this.timeStamp = n.timeStamp, this.type = t;
353
- }
678
+ function hn(e, t) {
679
+ Object.defineProperty(e, "target", {
680
+ value: t
681
+ }), Object.defineProperty(e, "currentTarget", {
682
+ value: t
683
+ });
354
684
  }
355
- function Wt(e) {
356
- let t = y({
685
+ function En(e) {
686
+ let t = h({
357
687
  isFocused: !1,
358
688
  observer: null
359
689
  });
360
- E(() => {
361
- const r = t.current;
690
+ return g(() => {
691
+ const n = t.current;
362
692
  return () => {
363
- r.observer && (r.observer.disconnect(), r.observer = null);
693
+ n.observer && (n.observer.disconnect(), n.observer = null);
364
694
  };
365
- }, []);
366
- let n = K((r) => {
367
- e?.(r);
368
- });
369
- return S((r) => {
370
- if (r.target instanceof HTMLButtonElement || r.target instanceof HTMLInputElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement) {
695
+ }, []), N((n) => {
696
+ let r = y(n);
697
+ if (r instanceof HTMLButtonElement || r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) {
371
698
  t.current.isFocused = !0;
372
- let o = r.target, i = (a) => {
373
- t.current.isFocused = !1, o.disabled && n(new At("blur", a)), t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
699
+ let o = r, i = (a) => {
700
+ if (t.current.isFocused = !1, o.disabled) {
701
+ let l = rt(a);
702
+ e?.(l);
703
+ }
704
+ t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
374
705
  };
375
706
  o.addEventListener("focusout", i, {
376
707
  once: !0
@@ -378,12 +709,12 @@ function Wt(e) {
378
709
  if (t.current.isFocused && o.disabled) {
379
710
  var a;
380
711
  (a = t.current.observer) === null || a === void 0 || a.disconnect();
381
- let c = o === document.activeElement ? null : document.activeElement;
712
+ let l = o === T() ? null : T();
382
713
  o.dispatchEvent(new FocusEvent("blur", {
383
- relatedTarget: c
714
+ relatedTarget: l
384
715
  })), o.dispatchEvent(new FocusEvent("focusout", {
385
716
  bubbles: !0,
386
- relatedTarget: c
717
+ relatedTarget: l
387
718
  }));
388
719
  }
389
720
  }), t.current.observer.observe(o, {
@@ -394,367 +725,394 @@ function Wt(e) {
394
725
  });
395
726
  }
396
727
  }, [
397
- n
728
+ e
398
729
  ]);
399
730
  }
400
- let z = null, It = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Map(), O = !1, se = !1;
401
- function ve(e, t) {
402
- for (let n of It) n(e, t);
731
+ let wn = !1;
732
+ const ot = m.createContext({
733
+ register: () => {
734
+ }
735
+ });
736
+ ot.displayName = "PressResponderContext";
737
+ let ee = null;
738
+ const gn = /* @__PURE__ */ new Set();
739
+ let J = /* @__PURE__ */ new Map(), W = !1, we = !1;
740
+ function Le(e, t) {
741
+ for (let n of gn) n(e, t);
403
742
  }
404
- function Bt(e) {
405
- return !(e.metaKey || !De() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
743
+ function yn(e) {
744
+ return !(e.metaKey || !Y() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
406
745
  }
407
- function ee(e) {
408
- O = !0, Bt(e) && (z = "keyboard", ve("keyboard", e));
746
+ function se(e) {
747
+ W = !0, !Q.isOpening && yn(e) && (ee = "keyboard", Le("keyboard", e));
409
748
  }
410
- function x(e) {
411
- z = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (O = !0, ve("pointer", e));
749
+ function S(e) {
750
+ ee = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (W = !0, Le("pointer", e));
412
751
  }
413
- function Ie(e) {
414
- Ot(e) && (O = !0, z = "virtual");
752
+ function it(e) {
753
+ !Q.isOpening && sn(e) && (W = !0, ee = "virtual");
415
754
  }
416
- function Be(e) {
417
- e.target === window || e.target === document || (!O && !se && (z = "virtual", ve("virtual", e)), O = !1, se = !1);
755
+ function at(e) {
756
+ y(e) === window || y(e) === document || wn || !e.isTrusted || (!W && !we && (ee = "virtual", Le("virtual", e)), W = !1, we = !1);
418
757
  }
419
- function Re() {
420
- O = !1, se = !0;
758
+ function lt() {
759
+ W = !1, we = !0;
421
760
  }
422
- function Te(e) {
423
- if (typeof window > "u" || V.get(Z(e))) return;
424
- const t = Z(e), n = g(e);
761
+ function Ie(e) {
762
+ if (typeof window > "u" || typeof document > "u" || J.get(X(e))) return;
763
+ const t = X(e), n = w(e);
425
764
  let r = t.HTMLElement.prototype.focus;
426
765
  t.HTMLElement.prototype.focus = function() {
427
- O = !0, r.apply(this, arguments);
428
- }, n.addEventListener("keydown", ee, !0), n.addEventListener("keyup", ee, !0), n.addEventListener("click", Ie, !0), t.addEventListener("focus", Be, !0), t.addEventListener("blur", Re, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", x, !0), n.addEventListener("pointermove", x, !0), n.addEventListener("pointerup", x, !0)) : (n.addEventListener("mousedown", x, !0), n.addEventListener("mousemove", x, !0), n.addEventListener("mouseup", x, !0)), t.addEventListener("beforeunload", () => {
429
- He(e);
766
+ W = !0, r.apply(this, arguments);
767
+ }, n.addEventListener("keydown", se, !0), n.addEventListener("keyup", se, !0), n.addEventListener("click", it, !0), t.addEventListener("focus", at, !0), t.addEventListener("blur", lt, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", S, !0), n.addEventListener("pointermove", S, !0), n.addEventListener("pointerup", S, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", S, !0), n.addEventListener("mousemove", S, !0), n.addEventListener("mouseup", S, !0)), t.addEventListener("beforeunload", () => {
768
+ st(e);
430
769
  }, {
431
770
  once: !0
432
- }), V.set(t, {
771
+ }), J.set(t, {
433
772
  focus: r
434
773
  });
435
774
  }
436
- const He = (e, t) => {
437
- const n = Z(e), r = g(e);
438
- t && r.removeEventListener("DOMContentLoaded", t), V.has(n) && (n.HTMLElement.prototype.focus = V.get(n).focus, r.removeEventListener("keydown", ee, !0), r.removeEventListener("keyup", ee, !0), r.removeEventListener("click", Ie, !0), n.removeEventListener("focus", Be, !0), n.removeEventListener("blur", Re, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", x, !0), r.removeEventListener("pointermove", x, !0), r.removeEventListener("pointerup", x, !0)) : (r.removeEventListener("mousedown", x, !0), r.removeEventListener("mousemove", x, !0), r.removeEventListener("mouseup", x, !0)), V.delete(n));
775
+ const st = (e, t) => {
776
+ const n = X(e), r = w(e);
777
+ t && r.removeEventListener("DOMContentLoaded", t), J.has(n) && (n.HTMLElement.prototype.focus = J.get(n).focus, r.removeEventListener("keydown", se, !0), r.removeEventListener("keyup", se, !0), r.removeEventListener("click", it, !0), n.removeEventListener("focus", at, !0), n.removeEventListener("blur", lt, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", S, !0), r.removeEventListener("pointermove", S, !0), r.removeEventListener("pointerup", S, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", S, !0), r.removeEventListener("mousemove", S, !0), r.removeEventListener("mouseup", S, !0)), J.delete(n));
439
778
  };
440
- function Rt(e) {
441
- const t = g(e);
779
+ function Tn(e) {
780
+ const t = w(e);
442
781
  let n;
443
- return t.readyState !== "loading" ? Te(e) : (n = () => {
444
- Te(e);
445
- }, t.addEventListener("DOMContentLoaded", n)), () => He(e, n);
782
+ return t.readyState !== "loading" ? Ie(e) : (n = () => {
783
+ Ie(e);
784
+ }, t.addEventListener("DOMContentLoaded", n)), () => st(e, n);
446
785
  }
447
- typeof document < "u" && Rt();
448
- function Ht() {
449
- return z;
786
+ typeof document < "u" && Tn();
787
+ function ct() {
788
+ return ee;
450
789
  }
451
- function Vt(e) {
452
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = y({
790
+ function ge(e) {
791
+ if (!e.isConnected) return;
792
+ const t = w(e);
793
+ if (ct() === "virtual") {
794
+ let n = T(t);
795
+ on(() => {
796
+ const r = T(t);
797
+ (r === n || r === t.body) && e.isConnected && he(e);
798
+ });
799
+ } else he(e);
800
+ }
801
+ function Nn({ children: e }) {
802
+ let t = U(() => ({
803
+ register: () => {
804
+ }
805
+ }), []);
806
+ return /* @__PURE__ */ m.createElement(ot.Provider, {
807
+ value: t
808
+ }, e);
809
+ }
810
+ function kn(e) {
811
+ let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: o } = e, i = h({
453
812
  isFocusWithin: !1
454
- }), a = S((l) => {
455
- i.current.isFocusWithin && !l.currentTarget.contains(l.relatedTarget) && (i.current.isFocusWithin = !1, n && n(l), o && o(!1));
813
+ }), { addGlobalListener: a, removeAllGlobalListeners: l } = an(), s = N((d) => {
814
+ F(d.currentTarget, y(d)) && i.current.isFocusWithin && !F(d.currentTarget, d.relatedTarget) && (i.current.isFocusWithin = !1, l(), n && n(d), o && o(!1));
456
815
  }, [
457
816
  n,
458
817
  o,
459
- i
460
- ]), c = Wt(a), u = S((l) => {
461
- !i.current.isFocusWithin && document.activeElement === l.target && (r && r(l), o && o(!0), i.current.isFocusWithin = !0, c(l));
818
+ i,
819
+ l
820
+ ]), c = En(s), u = N((d) => {
821
+ if (!F(d.currentTarget, y(d))) return;
822
+ let f = y(d);
823
+ const p = w(f), b = T(p);
824
+ if (!i.current.isFocusWithin && b === f) {
825
+ r && r(d), o && o(!0), i.current.isFocusWithin = !0, c(d);
826
+ let L = d.currentTarget;
827
+ a(p, "focus", (A) => {
828
+ let te = y(A);
829
+ if (i.current.isFocusWithin && !F(L, te)) {
830
+ let K = new p.defaultView.FocusEvent("blur", {
831
+ relatedTarget: te
832
+ });
833
+ hn(K, L);
834
+ let fe = rt(K);
835
+ s(fe);
836
+ }
837
+ }, {
838
+ capture: !0
839
+ });
840
+ }
462
841
  }, [
463
842
  r,
464
843
  o,
465
- c
844
+ c,
845
+ a,
846
+ s
466
847
  ]);
467
848
  return t ? {
468
849
  focusWithinProps: {
469
- // These should not have been null, that would conflict in mergeProps
850
+ // These cannot be null, that would conflict in mergeProps
470
851
  onFocus: void 0,
471
852
  onBlur: void 0
472
853
  }
473
854
  } : {
474
855
  focusWithinProps: {
475
856
  onFocus: u,
476
- onBlur: a
857
+ onBlur: s
477
858
  }
478
859
  };
479
860
  }
480
- function Kt(e) {
481
- let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = y({
861
+ function Sn(e) {
862
+ let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: o } = e, i = h({
482
863
  isPointerDown: !1,
483
864
  ignoreEmulatedMouseEvents: !1
484
- }), a = K((u) => {
485
- n && G(u, t) && (o && o(u), i.current.isPointerDown = !0);
486
- }), c = K((u) => {
487
- n && n(u);
865
+ }), a = De((s) => {
866
+ n && re(s, t) && (o && o(s), i.current.isPointerDown = !0);
867
+ }), l = De((s) => {
868
+ n && n(s);
488
869
  });
489
- P(() => {
490
- let u = i.current;
870
+ _(() => {
871
+ let s = i.current;
491
872
  if (r) return;
492
- const l = t.current, s = g(l);
873
+ const c = t.current, u = w(c);
493
874
  if (typeof PointerEvent < "u") {
494
- let d = (p) => {
495
- u.isPointerDown && G(p, t) && c(p), u.isPointerDown = !1;
875
+ let d = (f) => {
876
+ s.isPointerDown && re(f, t) && l(f), s.isPointerDown = !1;
496
877
  };
497
- return s.addEventListener("pointerdown", a, !0), s.addEventListener("pointerup", d, !0), () => {
498
- s.removeEventListener("pointerdown", a, !0), s.removeEventListener("pointerup", d, !0);
878
+ return u.addEventListener("pointerdown", a, !0), u.addEventListener("click", d, !0), () => {
879
+ u.removeEventListener("pointerdown", a, !0), u.removeEventListener("click", d, !0);
499
880
  };
500
- } else {
501
- let d = (b) => {
502
- u.ignoreEmulatedMouseEvents ? u.ignoreEmulatedMouseEvents = !1 : u.isPointerDown && G(b, t) && c(b), u.isPointerDown = !1;
503
- }, p = (b) => {
504
- u.ignoreEmulatedMouseEvents = !0, u.isPointerDown && G(b, t) && c(b), u.isPointerDown = !1;
881
+ } else if (process.env.NODE_ENV === "test") {
882
+ let d = (p) => {
883
+ s.ignoreEmulatedMouseEvents ? s.ignoreEmulatedMouseEvents = !1 : s.isPointerDown && re(p, t) && l(p), s.isPointerDown = !1;
884
+ }, f = (p) => {
885
+ s.ignoreEmulatedMouseEvents = !0, s.isPointerDown && re(p, t) && l(p), s.isPointerDown = !1;
505
886
  };
506
- return s.addEventListener("mousedown", a, !0), s.addEventListener("mouseup", d, !0), s.addEventListener("touchstart", a, !0), s.addEventListener("touchend", p, !0), () => {
507
- s.removeEventListener("mousedown", a, !0), s.removeEventListener("mouseup", d, !0), s.removeEventListener("touchstart", a, !0), s.removeEventListener("touchend", p, !0);
887
+ return u.addEventListener("mousedown", a, !0), u.addEventListener("mouseup", d, !0), u.addEventListener("touchstart", a, !0), u.addEventListener("touchend", f, !0), () => {
888
+ u.removeEventListener("mousedown", a, !0), u.removeEventListener("mouseup", d, !0), u.removeEventListener("touchstart", a, !0), u.removeEventListener("touchend", f, !0);
508
889
  };
509
890
  }
510
891
  }, [
511
892
  t,
512
- r,
513
- a,
514
- c
893
+ r
515
894
  ]);
516
895
  }
517
- function G(e, t) {
896
+ function re(e, t) {
518
897
  if (e.button > 0) return !1;
519
- if (e.target) {
520
- const n = e.target.ownerDocument;
521
- if (!n || !n.documentElement.contains(e.target) || e.target.closest("[data-react-aria-top-layer]")) return !1;
522
- }
523
- return t.current && !t.current.contains(e.target);
524
- }
525
- function ce(e) {
526
- const t = g(e);
527
- if (Ht() === "virtual") {
528
- let n = t.activeElement;
529
- _t(() => {
530
- t.activeElement === n && e.isConnected && ge(e);
531
- });
532
- } else ge(e);
533
- }
534
- function jt(e) {
535
- const t = Z(e);
536
- if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
537
- let { display: n, visibility: r } = e.style, o = n !== "none" && r !== "hidden" && r !== "collapse";
538
- if (o) {
539
- const { getComputedStyle: i } = e.ownerDocument.defaultView;
540
- let { display: a, visibility: c } = i(e);
541
- o = a !== "none" && c !== "hidden" && c !== "collapse";
898
+ let n = y(e);
899
+ if (n) {
900
+ const r = n.ownerDocument;
901
+ if (!r || !F(r.documentElement, n) || n.closest("[data-react-aria-top-layer]")) return !1;
542
902
  }
543
- return o;
903
+ return t.current ? !e.composedPath().includes(t.current) : !1;
544
904
  }
545
- function qt(e, t) {
546
- return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
547
- !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
548
- }
549
- function Ve(e, t) {
550
- return e.nodeName !== "#comment" && jt(e) && qt(e, t) && (!e.parentElement || Ve(e.parentElement, e));
551
- }
552
- const xe = /* @__PURE__ */ h.createContext(null), ue = "react-aria-focus-scope-restore";
553
- let m = null;
554
- function zt(e) {
555
- let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = y(null), a = y(null), c = y([]), { parentNode: u } = A(xe) || {}, l = H(() => new fe({
556
- scopeRef: c
905
+ const We = /* @__PURE__ */ m.createContext(null), ye = "react-aria-focus-scope-restore";
906
+ let $ = null;
907
+ function xn(e) {
908
+ let { children: t, contain: n, restoreFocus: r, autoFocus: o } = e, i = h(null), a = h(null), l = h([]), { parentNode: s } = H(We) || {}, c = U(() => new Ne({
909
+ scopeRef: l
557
910
  }), [
558
- c
911
+ l
559
912
  ]);
560
- E(() => {
561
- let p = u || $.root;
562
- if ($.getTreeNode(p.scopeRef) && m && !ne(m, p.scopeRef)) {
563
- let b = $.getTreeNode(m);
564
- b && (p = b);
913
+ g(() => {
914
+ let f = s || E.root;
915
+ if (E.getTreeNode(f.scopeRef) && $ && !ce($, f.scopeRef)) {
916
+ let p = E.getTreeNode($);
917
+ p && (f = p);
565
918
  }
566
- p.addChild(l), $.addNode(l);
919
+ f.addChild(c), E.addNode(c);
567
920
  }, [
568
- l,
569
- u
570
- ]), E(() => {
571
- let p = $.getTreeNode(c);
572
- p && (p.contain = !!n);
921
+ c,
922
+ s
923
+ ]), g(() => {
924
+ let f = E.getTreeNode(l);
925
+ f && (f.contain = !!n);
573
926
  }, [
574
927
  n
575
- ]), E(() => {
576
- var p;
577
- let b = (p = i.current) === null || p === void 0 ? void 0 : p.nextSibling, v = [], k = (W) => W.stopPropagation();
578
- for (; b && b !== a.current; )
579
- v.push(b), b.addEventListener(ue, k), b = b.nextSibling;
580
- return c.current = v, () => {
581
- for (let W of v) W.removeEventListener(ue, k);
928
+ ]), g(() => {
929
+ var f;
930
+ let p = (f = i.current) === null || f === void 0 ? void 0 : f.nextSibling, b = [], L = (A) => A.stopPropagation();
931
+ for (; p && p !== a.current; )
932
+ b.push(p), p.addEventListener(ye, L), p = p.nextSibling;
933
+ return l.current = b, () => {
934
+ for (let A of b) A.removeEventListener(ye, L);
582
935
  };
583
936
  }, [
584
937
  t
585
- ]), Zt(c, r, n), Xt(c, n), tn(c, r, n), Qt(c, o), P(() => {
586
- const p = g(c.current ? c.current[0] : void 0).activeElement;
587
- let b = null;
588
- if (w(p, c.current)) {
589
- for (let v of $.traverse()) v.scopeRef && w(p, v.scopeRef.current) && (b = v);
590
- b === $.getTreeNode(c) && (m = b.scopeRef);
938
+ ]), Mn(l, r, n), Fn(l, n), Rn(l, r, n), On(l, o), _(() => {
939
+ const f = T(w(l.current ? l.current[0] : void 0));
940
+ let p = null;
941
+ if (x(f, l.current)) {
942
+ for (let b of E.traverse()) b.scopeRef && x(f, b.scopeRef.current) && (p = b);
943
+ p === E.getTreeNode(l) && ($ = p.scopeRef);
591
944
  }
592
945
  }, [
593
- c
594
- ]), E(() => () => {
595
- var p, b, v;
596
- let k = (v = (b = $.getTreeNode(c)) === null || b === void 0 || (p = b.parent) === null || p === void 0 ? void 0 : p.scopeRef) !== null && v !== void 0 ? v : null;
597
- (c === m || ne(c, m)) && (!k || $.getTreeNode(k)) && (m = k), $.removeTreeNode(c);
946
+ l
947
+ ]), g(() => () => {
948
+ var f, p, b;
949
+ let L = (b = (p = E.getTreeNode(l)) === null || p === void 0 || (f = p.parent) === null || f === void 0 ? void 0 : f.scopeRef) !== null && b !== void 0 ? b : null;
950
+ (l === $ || ce(l, $)) && (!L || E.getTreeNode(L)) && ($ = L), E.removeTreeNode(l);
598
951
  }, [
599
- c
952
+ l
600
953
  ]);
601
- let s = H(() => Ut(c), []), d = H(() => ({
602
- focusManager: s,
603
- parentNode: l
954
+ let u = U(() => Ln(l), []), d = U(() => ({
955
+ focusManager: u,
956
+ parentNode: c
604
957
  }), [
605
- l,
606
- s
958
+ c,
959
+ u
607
960
  ]);
608
- return /* @__PURE__ */ h.createElement(xe.Provider, {
961
+ return /* @__PURE__ */ m.createElement(We.Provider, {
609
962
  value: d
610
- }, /* @__PURE__ */ h.createElement("span", {
963
+ }, /* @__PURE__ */ m.createElement("span", {
611
964
  "data-focus-scope-start": !0,
612
965
  hidden: !0,
613
966
  ref: i
614
- }), t, /* @__PURE__ */ h.createElement("span", {
967
+ }), t, /* @__PURE__ */ m.createElement("span", {
615
968
  "data-focus-scope-end": !0,
616
969
  hidden: !0,
617
970
  ref: a
618
971
  }));
619
972
  }
620
- function Ut(e) {
973
+ function Ln(e) {
621
974
  return {
622
975
  focusNext(t = {}) {
623
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[0].previousElementSibling, l = _(n), s = C(l, {
976
+ let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t;
977
+ var l;
978
+ let s = r || T(w((l = n[0]) !== null && l !== void 0 ? l : void 0)), c = n[0].previousElementSibling, u = I(n), d = D(u, {
624
979
  tabbable: o,
625
980
  accept: a
626
981
  }, n);
627
- s.currentNode = w(c, n) ? c : u;
628
- let d = s.nextNode();
629
- return !d && i && (s.currentNode = u, d = s.nextNode()), d && F(d, !0), d;
982
+ d.currentNode = x(s, n) ? s : c;
983
+ let f = d.nextNode();
984
+ return !f && i && (d.currentNode = c, f = d.nextNode()), f && P(f, !0), f;
630
985
  },
631
986
  focusPrevious(t = {}) {
632
- let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t, c = r || g(n[0]).activeElement, u = n[n.length - 1].nextElementSibling, l = _(n), s = C(l, {
987
+ let n = e.current, { from: r, tabbable: o, wrap: i, accept: a } = t;
988
+ var l;
989
+ let s = r || T(w((l = n[0]) !== null && l !== void 0 ? l : void 0)), c = n[n.length - 1].nextElementSibling, u = I(n), d = D(u, {
633
990
  tabbable: o,
634
991
  accept: a
635
992
  }, n);
636
- s.currentNode = w(c, n) ? c : u;
637
- let d = s.previousNode();
638
- return !d && i && (s.currentNode = u, d = s.previousNode()), d && F(d, !0), d;
993
+ d.currentNode = x(s, n) ? s : c;
994
+ let f = d.previousNode();
995
+ return !f && i && (d.currentNode = c, f = d.previousNode()), f && P(f, !0), f;
639
996
  },
640
997
  focusFirst(t = {}) {
641
- let n = e.current, { tabbable: r, accept: o } = t, i = _(n), a = C(i, {
998
+ let n = e.current, { tabbable: r, accept: o } = t, i = I(n), a = D(i, {
642
999
  tabbable: r,
643
1000
  accept: o
644
1001
  }, n);
645
1002
  a.currentNode = n[0].previousElementSibling;
646
- let c = a.nextNode();
647
- return c && F(c, !0), c;
1003
+ let l = a.nextNode();
1004
+ return l && P(l, !0), l;
648
1005
  },
649
1006
  focusLast(t = {}) {
650
- let n = e.current, { tabbable: r, accept: o } = t, i = _(n), a = C(i, {
1007
+ let n = e.current, { tabbable: r, accept: o } = t, i = I(n), a = D(i, {
651
1008
  tabbable: r,
652
1009
  accept: o
653
1010
  }, n);
654
1011
  a.currentNode = n[n.length - 1].nextElementSibling;
655
- let c = a.previousNode();
656
- return c && F(c, !0), c;
1012
+ let l = a.previousNode();
1013
+ return l && P(l, !0), l;
657
1014
  }
658
1015
  };
659
1016
  }
660
- const be = [
661
- "input:not([disabled]):not([type=hidden])",
662
- "select:not([disabled])",
663
- "textarea:not([disabled])",
664
- "button:not([disabled])",
665
- "a[href]",
666
- "area[href]",
667
- "summary",
668
- "iframe",
669
- "object",
670
- "embed",
671
- "audio[controls]",
672
- "video[controls]",
673
- "[contenteditable]"
674
- ], Gt = be.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
675
- be.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
676
- const Jt = be.join(':not([hidden]):not([tabindex="-1"]),');
677
- function _(e) {
1017
+ function I(e) {
678
1018
  return e[0].parentElement;
679
1019
  }
680
- function R(e) {
681
- let t = $.getTreeNode(m);
1020
+ function z(e) {
1021
+ let t = E.getTreeNode($);
682
1022
  for (; t && t.scopeRef !== e; ) {
683
1023
  if (t.contain) return !1;
684
1024
  t = t.parent;
685
1025
  }
686
1026
  return !0;
687
1027
  }
688
- function Xt(e, t) {
689
- let n = y(void 0), r = y(void 0);
690
- E(() => {
1028
+ function _n(e) {
1029
+ if (!e.form)
1030
+ return Array.from(w(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((r) => !r.form);
1031
+ const t = e.form.elements.namedItem(e.name);
1032
+ let n = X(e);
1033
+ return t instanceof n.RadioNodeList ? Array.from(t).filter((r) => r instanceof n.HTMLInputElement) : t instanceof n.HTMLInputElement ? [
1034
+ t
1035
+ ] : [];
1036
+ }
1037
+ function Cn(e) {
1038
+ if (e.checked) return !0;
1039
+ const t = _n(e);
1040
+ return t.length > 0 && !t.some((n) => n.checked);
1041
+ }
1042
+ function Fn(e, t) {
1043
+ let n = h(void 0), r = h(void 0);
1044
+ g(() => {
691
1045
  let o = e.current;
692
1046
  if (!t) {
693
1047
  r.current && (cancelAnimationFrame(r.current), r.current = void 0);
694
1048
  return;
695
1049
  }
696
- const i = g(o ? o[0] : void 0);
697
- let a = (l) => {
698
- if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !R(e) || l.isComposing) return;
699
- let s = i.activeElement, d = e.current;
700
- if (!d || !w(s, d)) return;
701
- let p = _(d), b = C(p, {
1050
+ const i = w(o ? o[0] : void 0);
1051
+ let a = (c) => {
1052
+ if (c.key !== "Tab" || c.altKey || c.ctrlKey || c.metaKey || !z(e) || c.isComposing) return;
1053
+ let u = T(i), d = e.current;
1054
+ if (!d || !x(u, d)) return;
1055
+ let f = I(d), p = D(f, {
702
1056
  tabbable: !0
703
1057
  }, d);
704
- if (!s) return;
705
- b.currentNode = s;
706
- let v = l.shiftKey ? b.previousNode() : b.nextNode();
707
- v || (b.currentNode = l.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, v = l.shiftKey ? b.previousNode() : b.nextNode()), l.preventDefault(), v && F(v, !0);
708
- }, c = (l) => {
709
- (!m || ne(m, e)) && w(l.target, e.current) ? (m = e, n.current = l.target) : R(e) && !te(l.target, e) ? n.current ? n.current.focus() : m && m.current && de(m.current) : R(e) && (n.current = l.target);
710
- }, u = (l) => {
1058
+ if (!u) return;
1059
+ p.currentNode = u;
1060
+ let b = c.shiftKey ? p.previousNode() : p.nextNode();
1061
+ b || (p.currentNode = c.shiftKey ? d[d.length - 1].nextElementSibling : d[0].previousElementSibling, b = c.shiftKey ? p.previousNode() : p.nextNode()), c.preventDefault(), b && P(b, !0);
1062
+ }, l = (c) => {
1063
+ (!$ || ce($, e)) && x(y(c), e.current) ? ($ = e, n.current = y(c)) : z(e) && !R(y(c), e) ? n.current ? n.current.focus() : $ && $.current && Te($.current) : z(e) && (n.current = y(c));
1064
+ }, s = (c) => {
711
1065
  r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
712
- if (i.activeElement && R(e) && !te(i.activeElement, e))
713
- if (m = e, i.body.contains(l.target)) {
714
- var s;
715
- n.current = l.target, (s = n.current) === null || s === void 0 || s.focus();
716
- } else m.current && de(m.current);
1066
+ let u = ct(), d = (u === "virtual" || u === null) && et() && Ze(), f = T(i);
1067
+ if (!d && f && z(e) && !R(f, e)) {
1068
+ $ = e;
1069
+ let b = y(c);
1070
+ if (b && b.isConnected) {
1071
+ var p;
1072
+ n.current = b, (p = n.current) === null || p === void 0 || p.focus();
1073
+ } else $.current && Te($.current);
1074
+ }
717
1075
  });
718
1076
  };
719
- return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", c, !1), o?.forEach((l) => l.addEventListener("focusin", c, !1)), o?.forEach((l) => l.addEventListener("focusout", u, !1)), () => {
720
- i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", c, !1), o?.forEach((l) => l.removeEventListener("focusin", c, !1)), o?.forEach((l) => l.removeEventListener("focusout", u, !1));
1077
+ return i.addEventListener("keydown", a, !1), i.addEventListener("focusin", l, !1), o?.forEach((c) => c.addEventListener("focusin", l, !1)), o?.forEach((c) => c.addEventListener("focusout", s, !1)), () => {
1078
+ i.removeEventListener("keydown", a, !1), i.removeEventListener("focusin", l, !1), o?.forEach((c) => c.removeEventListener("focusin", l, !1)), o?.forEach((c) => c.removeEventListener("focusout", s, !1));
721
1079
  };
722
1080
  }, [
723
1081
  e,
724
1082
  t
725
- ]), E(() => () => {
1083
+ ]), g(() => () => {
726
1084
  r.current && cancelAnimationFrame(r.current);
727
1085
  }, [
728
1086
  r
729
1087
  ]);
730
1088
  }
731
- function Ke(e) {
732
- return te(e);
1089
+ function ut(e) {
1090
+ return R(e);
733
1091
  }
734
- function w(e, t) {
735
- return !e || !t ? !1 : t.some((n) => n.contains(e));
1092
+ function x(e, t) {
1093
+ return !e || !t ? !1 : t.some((n) => F(n, e));
736
1094
  }
737
- function te(e, t = null) {
1095
+ function R(e, t = null) {
738
1096
  if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
739
- for (let { scopeRef: n } of $.traverse($.getTreeNode(t)))
740
- if (n && w(e, n.current)) return !0;
1097
+ for (let { scopeRef: n } of E.traverse(E.getTreeNode(t)))
1098
+ if (n && x(e, n.current)) return !0;
741
1099
  return !1;
742
1100
  }
743
- function Yt(e) {
744
- return te(e, m);
1101
+ function Pn(e) {
1102
+ return R(e, $);
745
1103
  }
746
- function ne(e, t) {
1104
+ function ce(e, t) {
747
1105
  var n;
748
- let r = (n = $.getTreeNode(t)) === null || n === void 0 ? void 0 : n.parent;
1106
+ let r = (n = E.getTreeNode(t)) === null || n === void 0 ? void 0 : n.parent;
749
1107
  for (; r; ) {
750
1108
  if (r.scopeRef === e) return !0;
751
1109
  r = r.parent;
752
1110
  }
753
1111
  return !1;
754
1112
  }
755
- function F(e, t = !1) {
1113
+ function P(e, t = !1) {
756
1114
  if (e != null && !t) try {
757
- ce(e);
1115
+ ge(e);
758
1116
  } catch {
759
1117
  }
760
1118
  else if (e != null) try {
@@ -762,40 +1120,40 @@ function F(e, t = !1) {
762
1120
  } catch {
763
1121
  }
764
1122
  }
765
- function je(e, t = !0) {
766
- let n = e[0].previousElementSibling, r = _(e), o = C(r, {
1123
+ function dt(e, t = !0) {
1124
+ let n = e[0].previousElementSibling, r = I(e), o = D(r, {
767
1125
  tabbable: t
768
1126
  }, e);
769
1127
  o.currentNode = n;
770
1128
  let i = o.nextNode();
771
- return t && !i && (r = _(e), o = C(r, {
1129
+ return t && !i && (r = I(e), o = D(r, {
772
1130
  tabbable: !1
773
1131
  }, e), o.currentNode = n, i = o.nextNode()), i;
774
1132
  }
775
- function de(e, t = !0) {
776
- F(je(e, t));
1133
+ function Te(e, t = !0) {
1134
+ P(dt(e, t));
777
1135
  }
778
- function Qt(e, t) {
779
- const n = h.useRef(t);
780
- P(() => {
1136
+ function On(e, t) {
1137
+ const n = m.useRef(t);
1138
+ _(() => {
781
1139
  if (n.current) {
782
- m = e;
783
- const r = g(e.current ? e.current[0] : void 0);
784
- !w(r.activeElement, m.current) && e.current && de(e.current);
1140
+ $ = e;
1141
+ const r = w(e.current ? e.current[0] : void 0);
1142
+ !x(T(r), $.current) && e.current && Te(e.current);
785
1143
  }
786
1144
  n.current = !1;
787
1145
  }, [
788
1146
  e
789
1147
  ]);
790
1148
  }
791
- function Zt(e, t, n) {
792
- E(() => {
1149
+ function Mn(e, t, n) {
1150
+ g(() => {
793
1151
  if (t || n) return;
794
1152
  let r = e.current;
795
- const o = g(r ? r[0] : void 0);
1153
+ const o = w(r ? r[0] : void 0);
796
1154
  let i = (a) => {
797
- let c = a.target;
798
- w(c, e.current) ? m = e : Ke(c) || (m = null);
1155
+ let l = y(a);
1156
+ x(l, e.current) ? $ = e : ut(l) || ($ = null);
799
1157
  };
800
1158
  return o.addEventListener("focusin", i, !1), r?.forEach((a) => a.addEventListener("focusin", i, !1)), () => {
801
1159
  o.removeEventListener("focusin", i, !1), r?.forEach((a) => a.removeEventListener("focusin", i, !1));
@@ -806,49 +1164,49 @@ function Zt(e, t, n) {
806
1164
  n
807
1165
  ]);
808
1166
  }
809
- function en(e) {
810
- let t = $.getTreeNode(m);
1167
+ function Ke(e) {
1168
+ let t = E.getTreeNode($);
811
1169
  for (; t && t.scopeRef !== e; ) {
812
1170
  if (t.nodeToRestore) return !1;
813
1171
  t = t.parent;
814
1172
  }
815
1173
  return t?.scopeRef === e;
816
1174
  }
817
- function tn(e, t, n) {
818
- const r = y(typeof document < "u" ? g(e.current ? e.current[0] : void 0).activeElement : null);
819
- E(() => {
1175
+ function Rn(e, t, n) {
1176
+ const r = h(typeof document < "u" ? T(w(e.current ? e.current[0] : void 0)) : null);
1177
+ g(() => {
820
1178
  let o = e.current;
821
- const i = g(o ? o[0] : void 0);
1179
+ const i = w(o ? o[0] : void 0);
822
1180
  if (!t || n) return;
823
1181
  let a = () => {
824
- (!m || ne(m, e)) && w(i.activeElement, e.current) && (m = e);
1182
+ (!$ || ce($, e)) && x(T(i), e.current) && ($ = e);
825
1183
  };
826
- return i.addEventListener("focusin", a, !1), o?.forEach((c) => c.addEventListener("focusin", a, !1)), () => {
827
- i.removeEventListener("focusin", a, !1), o?.forEach((c) => c.removeEventListener("focusin", a, !1));
1184
+ return i.addEventListener("focusin", a, !1), o?.forEach((l) => l.addEventListener("focusin", a, !1)), () => {
1185
+ i.removeEventListener("focusin", a, !1), o?.forEach((l) => l.removeEventListener("focusin", a, !1));
828
1186
  };
829
1187
  }, [
830
1188
  e,
831
1189
  n
832
- ]), E(() => {
833
- const o = g(e.current ? e.current[0] : void 0);
1190
+ ]), g(() => {
1191
+ const o = w(e.current ? e.current[0] : void 0);
834
1192
  if (!t) return;
835
1193
  let i = (a) => {
836
- if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !R(e) || a.isComposing) return;
837
- let c = o.activeElement;
838
- if (!w(c, e.current)) return;
839
- let u = $.getTreeNode(e);
840
- if (!u) return;
841
- let l = u.nodeToRestore, s = C(o.body, {
1194
+ if (a.key !== "Tab" || a.altKey || a.ctrlKey || a.metaKey || !z(e) || a.isComposing) return;
1195
+ let l = o.activeElement;
1196
+ if (!R(l, e) || !Ke(e)) return;
1197
+ let s = E.getTreeNode(e);
1198
+ if (!s) return;
1199
+ let c = s.nodeToRestore, u = D(o.body, {
842
1200
  tabbable: !0
843
1201
  });
844
- s.currentNode = c;
845
- let d = a.shiftKey ? s.previousNode() : s.nextNode();
846
- if ((!l || !o.body.contains(l) || l === o.body) && (l = void 0, u.nodeToRestore = void 0), (!d || !w(d, e.current)) && l) {
847
- s.currentNode = l;
1202
+ u.currentNode = l;
1203
+ let d = a.shiftKey ? u.previousNode() : u.nextNode();
1204
+ if ((!c || !c.isConnected || c === o.body) && (c = void 0, s.nodeToRestore = void 0), (!d || !R(d, e)) && c) {
1205
+ u.currentNode = c;
848
1206
  do
849
- d = a.shiftKey ? s.previousNode() : s.nextNode();
850
- while (w(d, e.current));
851
- a.preventDefault(), a.stopPropagation(), d ? F(d, !0) : Ke(l) ? F(l, !0) : c.blur();
1207
+ d = a.shiftKey ? u.previousNode() : u.nextNode();
1208
+ while (R(d, e));
1209
+ a.preventDefault(), a.stopPropagation(), d ? P(d, !0) : ut(c) ? P(c, !0) : l.blur();
852
1210
  }
853
1211
  };
854
1212
  return n || o.addEventListener("keydown", i, !0), () => {
@@ -858,36 +1216,35 @@ function tn(e, t, n) {
858
1216
  e,
859
1217
  t,
860
1218
  n
861
- ]), E(() => {
862
- const o = g(e.current ? e.current[0] : void 0);
1219
+ ]), g(() => {
1220
+ const o = w(e.current ? e.current[0] : void 0);
863
1221
  if (!t) return;
864
- let i = $.getTreeNode(e);
1222
+ let i = E.getTreeNode(e);
865
1223
  if (i) {
866
1224
  var a;
867
1225
  return i.nodeToRestore = (a = r.current) !== null && a !== void 0 ? a : void 0, () => {
868
- let c = $.getTreeNode(e);
869
- if (!c) return;
870
- let u = c.nodeToRestore;
871
- if (t && u && // eslint-disable-next-line react-hooks/exhaustive-deps
872
- (w(o.activeElement, e.current) || o.activeElement === o.body && en(e))) {
873
- let l = $.clone();
1226
+ let l = E.getTreeNode(e);
1227
+ if (!l) return;
1228
+ let s = l.nodeToRestore, c = T(o);
1229
+ if (t && s && (c && R(c, e) || c === o.body && Ke(e))) {
1230
+ let u = E.clone();
874
1231
  requestAnimationFrame(() => {
875
1232
  if (o.activeElement === o.body) {
876
- let s = l.getTreeNode(e);
877
- for (; s; ) {
878
- if (s.nodeToRestore && s.nodeToRestore.isConnected) {
879
- ke(s.nodeToRestore);
1233
+ let d = u.getTreeNode(e);
1234
+ for (; d; ) {
1235
+ if (d.nodeToRestore && d.nodeToRestore.isConnected) {
1236
+ Ve(d.nodeToRestore);
880
1237
  return;
881
1238
  }
882
- s = s.parent;
1239
+ d = d.parent;
883
1240
  }
884
- for (s = l.getTreeNode(e); s; ) {
885
- if (s.scopeRef && s.scopeRef.current && $.getTreeNode(s.scopeRef)) {
886
- let d = je(s.scopeRef.current, !0);
887
- ke(d);
1241
+ for (d = u.getTreeNode(e); d; ) {
1242
+ if (d.scopeRef && d.scopeRef.current && E.getTreeNode(d.scopeRef)) {
1243
+ let f = dt(d.scopeRef.current, !0);
1244
+ Ve(f);
888
1245
  return;
889
1246
  }
890
- s = s.parent;
1247
+ d = d.parent;
891
1248
  }
892
1249
  }
893
1250
  });
@@ -899,22 +1256,21 @@ function tn(e, t, n) {
899
1256
  t
900
1257
  ]);
901
1258
  }
902
- function ke(e) {
903
- e.dispatchEvent(new CustomEvent(ue, {
1259
+ function Ve(e) {
1260
+ e.dispatchEvent(new CustomEvent(ye, {
904
1261
  bubbles: !0,
905
1262
  cancelable: !0
906
- })) && F(e);
1263
+ })) && P(e);
907
1264
  }
908
- function C(e, t, n) {
909
- let r = t?.tabbable ? Jt : Gt, o = g(e).createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
910
- acceptNode(i) {
911
- var a;
912
- return !(t == null || (a = t.from) === null || a === void 0) && a.contains(i) ? NodeFilter.FILTER_REJECT : i.matches(r) && Ve(i) && (!n || w(i, n)) && (!t?.accept || t.accept(i)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1265
+ function D(e, t, n) {
1266
+ let r = t?.tabbable ? bn : vn, o = e?.nodeType === Node.ELEMENT_NODE ? e : null, i = w(o), a = Vt(i, e || i, NodeFilter.SHOW_ELEMENT, {
1267
+ acceptNode(l) {
1268
+ return F(t?.from, l) || t?.tabbable && l.tagName === "INPUT" && l.getAttribute("type") === "radio" && (!Cn(l) || a.currentNode.tagName === "INPUT" && a.currentNode.type === "radio" && a.currentNode.name === l.name) ? NodeFilter.FILTER_REJECT : r(l) && (!n || x(l, n)) && (!t?.accept || t.accept(l)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
913
1269
  }
914
1270
  });
915
- return t?.from && (o.currentNode = t.from), o;
1271
+ return t?.from && (a.currentNode = t.from), a;
916
1272
  }
917
- class me {
1273
+ class _e {
918
1274
  get size() {
919
1275
  return this.fastMap.size;
920
1276
  }
@@ -924,7 +1280,7 @@ class me {
924
1280
  addTreeNode(t, n, r) {
925
1281
  let o = this.fastMap.get(n ?? null);
926
1282
  if (!o) return;
927
- let i = new fe({
1283
+ let i = new Ne({
928
1284
  scopeRef: t
929
1285
  });
930
1286
  o.addChild(i), i.parent = o, this.fastMap.set(t, i), r && (i.nodeToRestore = r);
@@ -937,7 +1293,7 @@ class me {
937
1293
  let n = this.fastMap.get(t);
938
1294
  if (!n) return;
939
1295
  let r = n.parent;
940
- for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && w(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
1296
+ for (let i of this.traverse()) i !== n && n.nodeToRestore && i.nodeToRestore && n.scopeRef && n.scopeRef.current && x(i.nodeToRestore, n.scopeRef.current) && (i.nodeToRestore = n.nodeToRestore);
941
1297
  let o = n.children;
942
1298
  r && (r.removeChild(n), o.size > 0 && o.forEach((i) => r && r.addChild(i))), this.fastMap.delete(n.scopeRef);
943
1299
  }
@@ -947,18 +1303,18 @@ class me {
947
1303
  }
948
1304
  clone() {
949
1305
  var t;
950
- let n = new me();
1306
+ let n = new _e();
951
1307
  var r;
952
1308
  for (let o of this.traverse()) n.addTreeNode(o.scopeRef, (r = (t = o.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && r !== void 0 ? r : null, o.nodeToRestore);
953
1309
  return n;
954
1310
  }
955
1311
  constructor() {
956
- this.fastMap = /* @__PURE__ */ new Map(), this.root = new fe({
1312
+ this.fastMap = /* @__PURE__ */ new Map(), this.root = new Ne({
957
1313
  scopeRef: null
958
1314
  }), this.fastMap.set(null, this.root);
959
1315
  }
960
1316
  }
961
- class fe {
1317
+ class Ne {
962
1318
  addChild(t) {
963
1319
  this.children.add(t), t.parent = this;
964
1320
  }
@@ -969,55 +1325,55 @@ class fe {
969
1325
  this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
970
1326
  }
971
1327
  }
972
- let $ = new me();
973
- const nn = /* @__PURE__ */ new WeakMap(), N = [];
974
- function rn(e, t) {
975
- let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: c } = e;
976
- P(() => (o && N.push(t), () => {
977
- let v = N.indexOf(t);
978
- v >= 0 && N.splice(v, 1);
1328
+ let E = new _e();
1329
+ const Dn = /* @__PURE__ */ new WeakMap(), C = [];
1330
+ function An(e, t) {
1331
+ let { onClose: n, shouldCloseOnBlur: r, isOpen: o, isDismissable: i = !1, isKeyboardDismissDisabled: a = !1, shouldCloseOnInteractOutside: l } = e;
1332
+ _(() => (o && C.push(t), () => {
1333
+ let b = C.indexOf(t);
1334
+ b >= 0 && C.splice(b, 1);
979
1335
  }), [
980
1336
  o,
981
1337
  t
982
1338
  ]);
983
- let u = () => {
984
- N[N.length - 1] === t && n && n();
985
- }, l = (v) => {
986
- (!c || c(v.target)) && N[N.length - 1] === t && (v.stopPropagation(), v.preventDefault());
987
- }, s = (v) => {
988
- (!c || c(v.target)) && (N[N.length - 1] === t && (v.stopPropagation(), v.preventDefault()), u());
989
- }, d = (v) => {
990
- v.key === "Escape" && !a && !v.nativeEvent.isComposing && (v.stopPropagation(), v.preventDefault(), u());
1339
+ let s = () => {
1340
+ C[C.length - 1] === t && n && n();
1341
+ }, c = (b) => {
1342
+ (!l || l(b.target)) && C[C.length - 1] === t && (b.stopPropagation(), b.preventDefault());
1343
+ }, u = (b) => {
1344
+ (!l || l(b.target)) && (C[C.length - 1] === t && (b.stopPropagation(), b.preventDefault()), s());
1345
+ }, d = (b) => {
1346
+ b.key === "Escape" && !a && !b.nativeEvent.isComposing && (b.stopPropagation(), b.preventDefault(), s());
991
1347
  };
992
- Kt({
1348
+ Sn({
993
1349
  ref: t,
994
- onInteractOutside: i && o ? s : null,
995
- onInteractOutsideStart: l
1350
+ onInteractOutside: i && o ? u : null,
1351
+ onInteractOutsideStart: c
996
1352
  });
997
- let { focusWithinProps: p } = Vt({
1353
+ let { focusWithinProps: f } = kn({
998
1354
  isDisabled: !r,
999
- onBlurWithin: (v) => {
1000
- !v.relatedTarget || Yt(v.relatedTarget) || (!c || c(v.relatedTarget)) && n();
1355
+ onBlurWithin: (b) => {
1356
+ !b.relatedTarget || Pn(b.relatedTarget) || (!l || l(b.relatedTarget)) && n();
1001
1357
  }
1002
- }), b = (v) => {
1003
- v.target === v.currentTarget && v.preventDefault();
1358
+ }), p = (b) => {
1359
+ b.target === b.currentTarget && b.preventDefault();
1004
1360
  };
1005
1361
  return {
1006
1362
  overlayProps: {
1007
1363
  onKeyDown: d,
1008
- ...p
1364
+ ...f
1009
1365
  },
1010
1366
  underlayProps: {
1011
- onPointerDown: b
1367
+ onPointerDown: p
1012
1368
  }
1013
1369
  };
1014
1370
  }
1015
- function on(e, t, n) {
1371
+ function In(e, t, n) {
1016
1372
  let { isOpen: r } = t;
1017
- P(() => {
1018
- n && n.current && nn.set(n.current, t.close);
1373
+ _(() => {
1374
+ n && n.current && Dn.set(n.current, t.close);
1019
1375
  });
1020
- let o, i = Oe();
1376
+ let o, i = Je();
1021
1377
  return {
1022
1378
  triggerProps: {
1023
1379
  "aria-haspopup": o,
@@ -1030,7 +1386,7 @@ function on(e, t, n) {
1030
1386
  }
1031
1387
  };
1032
1388
  }
1033
- const ae = typeof document < "u" && window.visualViewport, an = /* @__PURE__ */ new Set([
1389
+ const $e = typeof document < "u" && window.visualViewport, Wn = /* @__PURE__ */ new Set([
1034
1390
  "checkbox",
1035
1391
  "radio",
1036
1392
  "range",
@@ -1041,81 +1397,81 @@ const ae = typeof document < "u" && window.visualViewport, an = /* @__PURE__ */
1041
1397
  "submit",
1042
1398
  "reset"
1043
1399
  ]);
1044
- let J = 0, ie;
1045
- function ln(e = {}) {
1400
+ let oe = 0, me;
1401
+ function Kn(e = {}) {
1046
1402
  let { isDisabled: t } = e;
1047
- E(() => {
1403
+ g(() => {
1048
1404
  if (!t)
1049
- return J++, J === 1 && (Lt() ? ie = cn() : ie = sn()), () => {
1050
- J--, J === 0 && ie();
1405
+ return oe++, oe === 1 && (Qe() ? me = Bn() : me = Vn()), () => {
1406
+ oe--, oe === 0 && me();
1051
1407
  };
1052
1408
  }, [
1053
1409
  t
1054
1410
  ]);
1055
1411
  }
1056
- function sn() {
1057
- return Q(D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"));
1412
+ function Vn() {
1413
+ return le(V(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), V(document.documentElement, "overflow", "hidden"));
1058
1414
  }
1059
- function cn() {
1060
- let e, t, n = (l) => {
1061
- e = Ae(l.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = D(e, "overscrollBehavior", "contain"));
1062
- }, r = (l) => {
1415
+ function Bn() {
1416
+ let e, t, n = (c) => {
1417
+ e = tt(c.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = V(e, "overscrollBehavior", "contain"));
1418
+ }, r = (c) => {
1063
1419
  if (!e || e === document.documentElement || e === document.body) {
1064
- l.preventDefault();
1420
+ c.preventDefault();
1065
1421
  return;
1066
1422
  }
1067
- e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && l.preventDefault();
1068
- }, o = (l) => {
1069
- let s = l.target;
1070
- Ne(s) && s !== document.activeElement && (l.preventDefault(), c(), s.style.transform = "translateY(-2000px)", s.focus(), requestAnimationFrame(() => {
1071
- s.style.transform = "";
1423
+ e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && c.preventDefault();
1424
+ }, o = (c) => {
1425
+ let u = c.target;
1426
+ He(u) && u !== document.activeElement && (c.preventDefault(), l(), u.style.transform = "translateY(-2000px)", u.focus(), requestAnimationFrame(() => {
1427
+ u.style.transform = "";
1072
1428
  })), t && t();
1073
- }, i = (l) => {
1074
- let s = l.target;
1075
- Ne(s) && (c(), s.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1076
- s.style.transform = "", ae && (ae.height < window.innerHeight ? requestAnimationFrame(() => {
1077
- Se(s);
1078
- }) : ae.addEventListener("resize", () => Se(s), {
1429
+ }, i = (c) => {
1430
+ let u = c.target;
1431
+ He(u) && (l(), u.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1432
+ u.style.transform = "", $e && ($e.height < window.innerHeight ? requestAnimationFrame(() => {
1433
+ Be(u);
1434
+ }) : $e.addEventListener("resize", () => Be(u), {
1079
1435
  once: !0
1080
1436
  }));
1081
1437
  }));
1082
- }, a = null, c = () => {
1438
+ }, a = null, l = () => {
1083
1439
  if (a) return;
1084
- let l = () => {
1440
+ let c = () => {
1085
1441
  window.scrollTo(0, 0);
1086
- }, s = window.pageXOffset, d = window.pageYOffset;
1087
- a = Q(I(window, "scroll", l), D(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), D(document.documentElement, "overflow", "hidden"), D(document.body, "marginTop", `-${d}px`), () => {
1088
- window.scrollTo(s, d);
1442
+ }, u = window.pageXOffset, d = window.pageYOffset;
1443
+ a = le(j(window, "scroll", c), V(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), V(document.documentElement, "overflow", "hidden"), V(document.body, "marginTop", `-${d}px`), () => {
1444
+ window.scrollTo(u, d);
1089
1445
  }), window.scrollTo(0, 0);
1090
- }, u = Q(I(document, "touchstart", n, {
1446
+ }, s = le(j(document, "touchstart", n, {
1091
1447
  passive: !1,
1092
1448
  capture: !0
1093
- }), I(document, "touchmove", r, {
1449
+ }), j(document, "touchmove", r, {
1094
1450
  passive: !1,
1095
1451
  capture: !0
1096
- }), I(document, "touchend", o, {
1452
+ }), j(document, "touchend", o, {
1097
1453
  passive: !1,
1098
1454
  capture: !0
1099
- }), I(document, "focus", i, !0));
1455
+ }), j(document, "focus", i, !0));
1100
1456
  return () => {
1101
- t?.(), a?.(), u();
1457
+ t?.(), a?.(), s();
1102
1458
  };
1103
1459
  }
1104
- function D(e, t, n) {
1460
+ function V(e, t, n) {
1105
1461
  let r = e.style[t];
1106
1462
  return e.style[t] = n, () => {
1107
1463
  e.style[t] = r;
1108
1464
  };
1109
1465
  }
1110
- function I(e, t, n, r) {
1466
+ function j(e, t, n, r) {
1111
1467
  return e.addEventListener(t, n, r), () => {
1112
1468
  e.removeEventListener(t, n, r);
1113
1469
  };
1114
1470
  }
1115
- function Se(e) {
1471
+ function Be(e) {
1116
1472
  let t = document.scrollingElement || document.documentElement;
1117
1473
  for (; e && e !== t; ) {
1118
- let n = Ae(e);
1474
+ let n = tt(e);
1119
1475
  if (n !== document.documentElement && n !== document.body && n !== e) {
1120
1476
  let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top;
1121
1477
  o > r + e.clientHeight && (n.scrollTop += o - r);
@@ -1123,48 +1479,48 @@ function Se(e) {
1123
1479
  e = n.parentElement;
1124
1480
  }
1125
1481
  }
1126
- function Ne(e) {
1127
- return e instanceof HTMLInputElement && !an.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1128
- }
1129
- let B = /* @__PURE__ */ new WeakMap(), T = [];
1130
- function un(e, t = document.body) {
1131
- let n = new Set(e), r = /* @__PURE__ */ new Set(), o = (u) => {
1132
- for (let p of u.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) n.add(p);
1133
- let l = (p) => {
1134
- if (n.has(p) || r.has(p.parentElement) && p.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1135
- for (let b of n)
1136
- if (p.contains(b)) return NodeFilter.FILTER_SKIP;
1482
+ function He(e) {
1483
+ return e instanceof HTMLInputElement && !Wn.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1484
+ }
1485
+ let q = /* @__PURE__ */ new WeakMap(), k = [];
1486
+ function Hn(e, t = document.body) {
1487
+ let n = new Set(e), r = /* @__PURE__ */ new Set(), o = (s) => {
1488
+ for (let f of s.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) n.add(f);
1489
+ let c = (f) => {
1490
+ if (n.has(f) || r.has(f.parentElement) && f.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1491
+ for (let p of n)
1492
+ if (f.contains(p)) return NodeFilter.FILTER_SKIP;
1137
1493
  return NodeFilter.FILTER_ACCEPT;
1138
- }, s = document.createTreeWalker(u, NodeFilter.SHOW_ELEMENT, {
1139
- acceptNode: l
1140
- }), d = l(u);
1141
- if (d === NodeFilter.FILTER_ACCEPT && i(u), d !== NodeFilter.FILTER_REJECT) {
1142
- let p = s.nextNode();
1143
- for (; p != null; )
1144
- i(p), p = s.nextNode();
1494
+ }, u = document.createTreeWalker(s, NodeFilter.SHOW_ELEMENT, {
1495
+ acceptNode: c
1496
+ }), d = c(s);
1497
+ if (d === NodeFilter.FILTER_ACCEPT && i(s), d !== NodeFilter.FILTER_REJECT) {
1498
+ let f = u.nextNode();
1499
+ for (; f != null; )
1500
+ i(f), f = u.nextNode();
1145
1501
  }
1146
- }, i = (u) => {
1147
- var l;
1148
- let s = (l = B.get(u)) !== null && l !== void 0 ? l : 0;
1149
- u.getAttribute("aria-hidden") === "true" && s === 0 || (s === 0 && u.setAttribute("aria-hidden", "true"), r.add(u), B.set(u, s + 1));
1502
+ }, i = (s) => {
1503
+ var c;
1504
+ let u = (c = q.get(s)) !== null && c !== void 0 ? c : 0;
1505
+ s.getAttribute("aria-hidden") === "true" && u === 0 || (u === 0 && s.setAttribute("aria-hidden", "true"), r.add(s), q.set(s, u + 1));
1150
1506
  };
1151
- T.length && T[T.length - 1].disconnect(), o(t);
1152
- let a = new MutationObserver((u) => {
1153
- for (let l of u)
1154
- if (!(l.type !== "childList" || l.addedNodes.length === 0) && ![
1507
+ k.length && k[k.length - 1].disconnect(), o(t);
1508
+ let a = new MutationObserver((s) => {
1509
+ for (let c of s)
1510
+ if (!(c.type !== "childList" || c.addedNodes.length === 0) && ![
1155
1511
  ...n,
1156
1512
  ...r
1157
- ].some((s) => s.contains(l.target))) {
1158
- for (let s of l.removedNodes) s instanceof Element && (n.delete(s), r.delete(s));
1159
- for (let s of l.addedNodes)
1160
- (s instanceof HTMLElement || s instanceof SVGElement) && (s.dataset.liveAnnouncer === "true" || s.dataset.reactAriaTopLayer === "true") ? n.add(s) : s instanceof Element && o(s);
1513
+ ].some((u) => u.contains(c.target))) {
1514
+ for (let u of c.removedNodes) u instanceof Element && (n.delete(u), r.delete(u));
1515
+ for (let u of c.addedNodes)
1516
+ (u instanceof HTMLElement || u instanceof SVGElement) && (u.dataset.liveAnnouncer === "true" || u.dataset.reactAriaTopLayer === "true") ? n.add(u) : u instanceof Element && o(u);
1161
1517
  }
1162
1518
  });
1163
1519
  a.observe(t, {
1164
1520
  childList: !0,
1165
1521
  subtree: !0
1166
1522
  });
1167
- let c = {
1523
+ let l = {
1168
1524
  observe() {
1169
1525
  a.observe(t, {
1170
1526
  childList: !0,
@@ -1175,75 +1531,75 @@ function un(e, t = document.body) {
1175
1531
  a.disconnect();
1176
1532
  }
1177
1533
  };
1178
- return T.push(c), () => {
1534
+ return k.push(l), () => {
1179
1535
  a.disconnect();
1180
- for (let u of r) {
1181
- let l = B.get(u);
1182
- l === 1 ? (u.removeAttribute("aria-hidden"), B.delete(u)) : B.set(u, l - 1);
1536
+ for (let s of r) {
1537
+ let c = q.get(s);
1538
+ c === 1 ? (s.removeAttribute("aria-hidden"), q.delete(s)) : q.set(s, c - 1);
1183
1539
  }
1184
- c === T[T.length - 1] ? (T.pop(), T.length && T[T.length - 1].observe()) : T.splice(T.indexOf(c), 1);
1540
+ l === k[k.length - 1] ? (k.pop(), k.length && k[k.length - 1].observe()) : k.splice(k.indexOf(l), 1);
1185
1541
  };
1186
1542
  }
1187
- const dn = /* @__PURE__ */ nt({});
1188
- function fn() {
1543
+ const jn = /* @__PURE__ */ yt({});
1544
+ function qn() {
1189
1545
  var e;
1190
- return (e = A(dn)) !== null && e !== void 0 ? e : {};
1546
+ return (e = H(jn)) !== null && e !== void 0 ? e : {};
1191
1547
  }
1192
- const qe = /* @__PURE__ */ h.createContext(null);
1193
- function pn(e) {
1194
- let t = _e(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = j(!1), a = H(() => ({
1548
+ const ft = /* @__PURE__ */ m.createContext(null);
1549
+ function Gn(e) {
1550
+ let t = Ue(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [o, i] = Z(!1), a = U(() => ({
1195
1551
  contain: o,
1196
1552
  setContain: i
1197
1553
  }), [
1198
1554
  o,
1199
1555
  i
1200
- ]), { getContainer: c } = fn();
1201
- if (!e.portalContainer && c && (n = c()), !n) return null;
1202
- let u = e.children;
1203
- return e.disableFocusManagement || (u = /* @__PURE__ */ h.createElement(zt, {
1556
+ ]), { getContainer: l } = qn();
1557
+ if (!e.portalContainer && l && (n = l()), !n) return null;
1558
+ let s = e.children;
1559
+ return e.disableFocusManagement || (s = /* @__PURE__ */ m.createElement(xn, {
1204
1560
  restoreFocus: !0,
1205
1561
  contain: o && !r
1206
- }, u)), u = /* @__PURE__ */ h.createElement(qe.Provider, {
1562
+ }, s)), s = /* @__PURE__ */ m.createElement(ft.Provider, {
1207
1563
  value: a
1208
- }, /* @__PURE__ */ h.createElement(Dt, null, u)), /* @__PURE__ */ rt.createPortal(u, n);
1564
+ }, /* @__PURE__ */ m.createElement(Nn, null, s)), /* @__PURE__ */ Tt.createPortal(s, n);
1209
1565
  }
1210
- function ze() {
1211
- let e = A(qe), t = e?.setContain;
1212
- E(() => {
1566
+ function pt() {
1567
+ let e = H(ft), t = e?.setContain;
1568
+ g(() => {
1213
1569
  t?.(!0);
1214
1570
  }, [
1215
1571
  t
1216
1572
  ]);
1217
1573
  }
1218
- function vn(e, t, n) {
1219
- let { overlayProps: r, underlayProps: o } = rn({
1574
+ function zn(e, t, n) {
1575
+ let { overlayProps: r, underlayProps: o } = An({
1220
1576
  ...e,
1221
1577
  isOpen: t.isOpen,
1222
1578
  onClose: t.close
1223
1579
  }, n);
1224
- return ln({
1580
+ return Kn({
1225
1581
  isDisabled: !t.isOpen
1226
- }), ze(), P(() => {
1227
- if (t.isOpen) return un([
1582
+ }), pt(), _(() => {
1583
+ if (t.isOpen) return Hn([
1228
1584
  n.current
1229
1585
  ]);
1230
1586
  }, [
1231
1587
  t.isOpen,
1232
1588
  n
1233
1589
  ]), {
1234
- modalProps: ht(r),
1590
+ modalProps: jt(r),
1235
1591
  underlayProps: o
1236
1592
  };
1237
1593
  }
1238
- function bn(e, t) {
1239
- let { role: n = "dialog" } = e, r = mt();
1594
+ function Un(e, t) {
1595
+ let { role: n = "dialog" } = e, r = Dt();
1240
1596
  r = e["aria-label"] ? void 0 : r;
1241
- let o = y(!1);
1242
- return P(() => {
1597
+ let o = h(!1);
1598
+ return _(() => {
1243
1599
  if (t.current && !t.current.contains(document.activeElement)) {
1244
- ce(t.current);
1600
+ ge(t.current);
1245
1601
  let i = setTimeout(() => {
1246
- document.activeElement === t.current && (o.current = !0, t.current && (t.current.blur(), ce(t.current)), o.current = !1);
1602
+ document.activeElement === t.current && (o.current = !0, t.current && (t.current.blur(), ge(t.current)), o.current = !1);
1247
1603
  }, 500);
1248
1604
  return () => {
1249
1605
  clearTimeout(i);
@@ -1251,9 +1607,9 @@ function bn(e, t) {
1251
1607
  }
1252
1608
  }, [
1253
1609
  t
1254
- ]), ze(), {
1610
+ ]), pt(), {
1255
1611
  dialogProps: {
1256
- ...Tt(e, {
1612
+ ...Xt(e, {
1257
1613
  labelable: !0
1258
1614
  }),
1259
1615
  role: n,
@@ -1271,7 +1627,7 @@ function bn(e, t) {
1271
1627
  }
1272
1628
  };
1273
1629
  }
1274
- function mn(e, t, n) {
1630
+ function Jn(e, t, n) {
1275
1631
  return t in e ? Object.defineProperty(e, t, {
1276
1632
  value: n,
1277
1633
  enumerable: !0,
@@ -1279,7 +1635,7 @@ function mn(e, t, n) {
1279
1635
  writable: !0
1280
1636
  }) : e[t] = n, e;
1281
1637
  }
1282
- function Fe(e, t) {
1638
+ function je(e, t) {
1283
1639
  var n = Object.keys(e);
1284
1640
  if (Object.getOwnPropertySymbols) {
1285
1641
  var r = Object.getOwnPropertySymbols(e);
@@ -1289,51 +1645,51 @@ function Fe(e, t) {
1289
1645
  }
1290
1646
  return n;
1291
1647
  }
1292
- function Pe(e) {
1648
+ function qe(e) {
1293
1649
  for (var t = 1; t < arguments.length; t++) {
1294
1650
  var n = arguments[t] != null ? arguments[t] : {};
1295
- t % 2 ? Fe(Object(n), !0).forEach(function(r) {
1296
- mn(e, r, n[r]);
1297
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fe(Object(n)).forEach(function(r) {
1651
+ t % 2 ? je(Object(n), !0).forEach(function(r) {
1652
+ Jn(e, r, n[r]);
1653
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : je(Object(n)).forEach(function(r) {
1298
1654
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
1299
1655
  });
1300
1656
  }
1301
1657
  return e;
1302
1658
  }
1303
- var $n = (e, t, n) => {
1659
+ var Xn = (e, t, n) => {
1304
1660
  for (var r of Object.keys(e)) {
1305
1661
  var o;
1306
1662
  if (e[r] !== ((o = t[r]) !== null && o !== void 0 ? o : n[r]))
1307
1663
  return !1;
1308
1664
  }
1309
1665
  return !0;
1310
- }, hn = (e) => (t) => {
1311
- var n = e.defaultClassName, r = Pe(Pe({}, e.defaultVariants), t);
1666
+ }, Yn = (e) => (t) => {
1667
+ var n = e.defaultClassName, r = qe(qe({}, e.defaultVariants), t);
1312
1668
  for (var o in r) {
1313
1669
  var i, a = (i = r[o]) !== null && i !== void 0 ? i : e.defaultVariants[o];
1314
1670
  if (a != null) {
1315
- var c = a;
1316
- typeof c == "boolean" && (c = c === !0 ? "true" : "false");
1317
- var u = (
1671
+ var l = a;
1672
+ typeof l == "boolean" && (l = l === !0 ? "true" : "false");
1673
+ var s = (
1318
1674
  // @ts-expect-error
1319
- e.variantClassNames[o][c]
1675
+ e.variantClassNames[o][l]
1320
1676
  );
1321
- u && (n += " " + u);
1677
+ s && (n += " " + s);
1322
1678
  }
1323
1679
  }
1324
- for (var [l, s] of e.compoundVariants)
1325
- $n(l, r, e.defaultVariants) && (n += " " + s);
1680
+ for (var [c, u] of e.compoundVariants)
1681
+ Xn(c, r, e.defaultVariants) && (n += " " + u);
1326
1682
  return n;
1327
- }, En = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq0", gn = hn({ defaultClassName: "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq2", false: "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq3" } }, defaultVariants: {}, compoundVariants: [] }), wn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq4", yn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq5", Tn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq7", xn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq8", kn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psq9", Sn = "pkg_sps-woodland_focused-task__version_8_42_1__hash_1io4psqa";
1328
- function Ue({
1683
+ }, Qn = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq0", Zn = Yn({ defaultClassName: "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq1", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq2", false: "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq3" } }, defaultVariants: {}, compoundVariants: [] }), er = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq4", tr = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq5", nr = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq7", rr = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq8", or = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psq9", ir = "pkg_sps-woodland_focused-task__version_8_42_2__hash_1io4psqa";
1684
+ function vt({
1329
1685
  children: e,
1330
1686
  className: t = "",
1331
1687
  ...n
1332
1688
  }) {
1333
- return /* @__PURE__ */ f.createElement("div", { className: X(xn, t), ...n }, /* @__PURE__ */ f.createElement("div", { className: X(kn) }, /* @__PURE__ */ f.createElement("div", { className: X(Sn) }, e)));
1689
+ return /* @__PURE__ */ v.createElement("div", { className: ie(rr, t), ...n }, /* @__PURE__ */ v.createElement("div", { className: ie(or) }, /* @__PURE__ */ v.createElement("div", { className: ie(ir) }, e)));
1334
1690
  }
1335
- Le.set(Ue, { name: "FocusedTaskActions" });
1336
- function Nn({
1691
+ Ge.set(vt, { name: "FocusedTaskActions" });
1692
+ function ar({
1337
1693
  children: e,
1338
1694
  className: t,
1339
1695
  "data-testid": n,
@@ -1341,49 +1697,49 @@ function Nn({
1341
1697
  onFocus: o,
1342
1698
  overlayProps: i,
1343
1699
  state: a,
1344
- onClose: c,
1345
- fullWidth: u = !1,
1346
- ...l
1700
+ onClose: l,
1701
+ fullWidth: s = !1,
1702
+ ...c
1347
1703
  }) {
1348
- const s = f.useRef(null), { modalProps: d, underlayProps: p } = vn(
1349
- { ...l },
1704
+ const u = v.useRef(null), { modalProps: d, underlayProps: f } = zn(
1705
+ { ...c },
1350
1706
  a,
1351
- s
1352
- ), { dialogProps: b, titleProps: v } = bn(l, s), k = $e(d.onFocus, b.onFocus, o), W = $e(d.onBlur, b.onBlur, r), Je = Ze({ "data-testid": n }), [re, Xe] = et(e, [{ type: Ue }]);
1353
- function Ye() {
1354
- c && typeof c == "function" && c(), a.close();
1707
+ u
1708
+ ), { dialogProps: p, titleProps: b } = Un(c, u), L = Ce(d.onFocus, p.onFocus, o), A = Ce(d.onBlur, p.onBlur, r), te = ht({ "data-testid": n }), [K, fe] = Et(e, [{ type: vt }]);
1709
+ function $t() {
1710
+ l && typeof l == "function" && l(), a.close();
1355
1711
  }
1356
- const Qe = /* @__PURE__ */ f.createElement(
1357
- tt,
1712
+ const mt = /* @__PURE__ */ v.createElement(
1713
+ wt,
1358
1714
  {
1359
1715
  "aria-label": "Close",
1360
- onClick: Ye,
1716
+ onClick: $t,
1361
1717
  kind: "icon",
1362
1718
  icon: "x",
1363
- className: yn
1719
+ className: tr
1364
1720
  }
1365
1721
  );
1366
- return /* @__PURE__ */ f.createElement(pn, null, /* @__PURE__ */ f.createElement("div", { className: Tn, ...p, ...l }, /* @__PURE__ */ f.createElement(
1722
+ return /* @__PURE__ */ v.createElement(Gn, null, /* @__PURE__ */ v.createElement("div", { className: nr, ...f, ...c }, /* @__PURE__ */ v.createElement(
1367
1723
  "div",
1368
1724
  {
1369
1725
  ...d,
1370
- ...b,
1726
+ ...p,
1371
1727
  ...i,
1372
- onFocus: k,
1373
- onBlur: W,
1374
- ...Je("dialog"),
1375
- ref: s,
1376
- className: X(En, t)
1728
+ onFocus: L,
1729
+ onBlur: A,
1730
+ ...te("dialog"),
1731
+ ref: u,
1732
+ className: ie(Qn, t)
1377
1733
  },
1378
- /* @__PURE__ */ f.createElement("div", { ...v, className: wn }, Qe),
1379
- /* @__PURE__ */ f.createElement("div", { className: gn({ fullWidth: u }) }, he(Xe, a.close)),
1380
- re && re.length > 0 && /* @__PURE__ */ f.createElement(f.Fragment, null, he(re, a.close))
1734
+ /* @__PURE__ */ v.createElement("div", { ...b, className: er }, mt),
1735
+ /* @__PURE__ */ v.createElement("div", { className: Zn({ fullWidth: s }) }, Fe(fe, a.close)),
1736
+ K && K.length > 0 && /* @__PURE__ */ v.createElement(v.Fragment, null, Fe(K, a.close))
1381
1737
  )));
1382
1738
  }
1383
- function Ge(e) {
1384
- return e.state.isOpen ? /* @__PURE__ */ f.createElement(Nn, { ...e }, e.children) : /* @__PURE__ */ f.createElement(f.Fragment, null);
1739
+ function bt(e) {
1740
+ return e.state.isOpen ? /* @__PURE__ */ v.createElement(ar, { ...e }, e.children) : /* @__PURE__ */ v.createElement(v.Fragment, null);
1385
1741
  }
1386
- Le.set(Ge, {
1742
+ Ge.set(bt, {
1387
1743
  name: "FocusedTask",
1388
1744
  props: {
1389
1745
  fullWidth: { type: "boolean", default: "false" },
@@ -1392,17 +1748,17 @@ Le.set(Ge, {
1392
1748
  onFocus: { type: "() => void" }
1393
1749
  }
1394
1750
  });
1395
- function Fn(e) {
1396
- let [t, n] = Mt(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
1397
- const r = S(() => {
1751
+ function lr(e) {
1752
+ let [t, n] = mn(e.isOpen, e.defaultOpen || !1, e.onOpenChange);
1753
+ const r = N(() => {
1398
1754
  n(!0);
1399
1755
  }, [
1400
1756
  n
1401
- ]), o = S(() => {
1757
+ ]), o = N(() => {
1402
1758
  n(!1);
1403
1759
  }, [
1404
1760
  n
1405
- ]), i = S(() => {
1761
+ ]), i = N(() => {
1406
1762
  n(!t);
1407
1763
  }, [
1408
1764
  n,
@@ -1416,30 +1772,31 @@ function Fn(e) {
1416
1772
  toggle: i
1417
1773
  };
1418
1774
  }
1419
- function Dn(e = {}) {
1420
- const t = Fn(e), n = y(null), { triggerProps: r, overlayProps: o } = on({}, t, n), { onPress: i, ...a } = r;
1775
+ function vr(e = {}) {
1776
+ const t = lr(e), n = h(null), { triggerProps: r, overlayProps: o } = In({}, t, n), { onPress: i, ...a } = r;
1421
1777
  return {
1422
1778
  triggerProps: {
1423
1779
  ...a,
1424
- onClick: i,
1780
+ // Forward event to onPress (types differ but handler doesn't inspect event)
1781
+ onClick: i ? (l) => i(l) : void 0,
1425
1782
  ref: n
1426
1783
  },
1427
1784
  focusedTaskState: t,
1428
1785
  focusedTaskProps: { overlayProps: o, state: t }
1429
1786
  };
1430
1787
  }
1431
- const Pn = {
1432
- components: [Ge],
1788
+ const sr = {
1789
+ components: [bt],
1433
1790
  examples: {
1434
1791
  hooks: {
1435
1792
  label: "Using the Hook",
1436
- description: () => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "To use the focused task component, you must call the ", /* @__PURE__ */ f.createElement("code", null, "useFocusedTask"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ f.createElement("dl", null, /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ f.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ f.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ f.createElement("dt", null, /* @__PURE__ */ f.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ f.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ f.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ f.createElement("h5", null, "Focused Task Props, Focused Task State, and Trigger Props"), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "useFocusedTask"), " returns an object with ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), ",", " ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskState"), " and ", /* @__PURE__ */ f.createElement("code", null, "triggerProps")), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the focused task."), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskState"), " object (which is also included in ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), ") allows programmatic access to the state of the focused task. This includes a read only", " ", /* @__PURE__ */ f.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ f.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ f.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ f.createElement("code", null, "close()"), " method which closes the overlay and a", " ", /* @__PURE__ */ f.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ f.createElement("p", null, "The ", /* @__PURE__ */ f.createElement("code", null, "focusedTaskProps"), " should be spread on the actual ", /* @__PURE__ */ f.createElement("code", null, "FocusedTask"), " component."), /* @__PURE__ */ f.createElement("p", null, "Please refer to the examples to see its implementation"))
1793
+ description: () => /* @__PURE__ */ v.createElement(v.Fragment, null, /* @__PURE__ */ v.createElement("p", null, "To use the focused task component, you must call the ", /* @__PURE__ */ v.createElement("code", null, "useFocusedTask"), " hook. Optional arguments for this hook include:"), /* @__PURE__ */ v.createElement("dl", null, /* @__PURE__ */ v.createElement("dt", null, /* @__PURE__ */ v.createElement("code", null, "isOpen"), ": boolean"), /* @__PURE__ */ v.createElement("dd", null, "Whether the overlay is open by default (controlled)"), /* @__PURE__ */ v.createElement("dt", null, /* @__PURE__ */ v.createElement("code", null, "defaultOpen"), ": boolean"), /* @__PURE__ */ v.createElement("dd", null, "Whether the overlay is open by default (uncontrolled)."), /* @__PURE__ */ v.createElement("dt", null, /* @__PURE__ */ v.createElement("code", null, "onOpenChange"), ": function"), /* @__PURE__ */ v.createElement("dd", null, "Handler that is called when the overlay's open state changes.", /* @__PURE__ */ v.createElement("code", null, "(isOpen: boolean) => void"))), /* @__PURE__ */ v.createElement("h5", null, "Focused Task Props, Focused Task State, and Trigger Props"), /* @__PURE__ */ v.createElement("p", null, "The ", /* @__PURE__ */ v.createElement("code", null, "useFocusedTask"), " returns an object with ", /* @__PURE__ */ v.createElement("code", null, "focusedTaskProps"), ",", " ", /* @__PURE__ */ v.createElement("code", null, "focusedTaskState"), " and ", /* @__PURE__ */ v.createElement("code", null, "triggerProps")), /* @__PURE__ */ v.createElement("p", null, "The ", /* @__PURE__ */ v.createElement("code", null, "triggerProps"), " need to be spread on the element that triggers the focused task."), /* @__PURE__ */ v.createElement("p", null, "The ", /* @__PURE__ */ v.createElement("code", null, "focusedTaskState"), " object (which is also included in ", /* @__PURE__ */ v.createElement("code", null, "focusedTaskProps"), ") allows programmatic access to the state of the focused task. This includes a read only", " ", /* @__PURE__ */ v.createElement("code", null, "isOpen"), " property, a ", /* @__PURE__ */ v.createElement("code", null, "setOpen(isOpen: boolean)"), " method which can be use to set whether the overlay is open, an ", /* @__PURE__ */ v.createElement("code", null, "open()"), " method which opens the overlay, a ", /* @__PURE__ */ v.createElement("code", null, "close()"), " method which closes the overlay and a", " ", /* @__PURE__ */ v.createElement("code", null, "toggle()"), " method that toggles the overlay's visiblity."), /* @__PURE__ */ v.createElement("p", null, "The ", /* @__PURE__ */ v.createElement("code", null, "focusedTaskProps"), " should be spread on the actual ", /* @__PURE__ */ v.createElement("code", null, "FocusedTask"), " component."), /* @__PURE__ */ v.createElement("p", null, "Please refer to the examples to see its implementation"))
1437
1794
  },
1438
1795
  standard: {
1439
1796
  label: "Standard",
1440
1797
  examples: {
1441
1798
  basic: {
1442
- react: Ee`
1799
+ react: Pe`
1443
1800
  import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
1444
1801
  import { Button } from "@sps-woodland/buttons";
1445
1802
  import { Card } from "@sps-woodland/cards";
@@ -1485,7 +1842,7 @@ const Pn = {
1485
1842
  label: "Fill Width",
1486
1843
  examples: {
1487
1844
  basic: {
1488
- react: Ee`
1845
+ react: Pe`
1489
1846
  import { FocusedTask, FocusedTaskActions, useFocusedTask } from "@sps-woodland/focused-task";
1490
1847
  import { Button } from "@sps-woodland/buttons";
1491
1848
  import { Card } from "@sps-woodland/cards";
@@ -1529,12 +1886,12 @@ const Pn = {
1529
1886
  }
1530
1887
  }
1531
1888
  }
1532
- }, An = {
1533
- "Focused Task": Pn
1889
+ }, br = {
1890
+ "Focused Task": sr
1534
1891
  };
1535
1892
  export {
1536
- Ge as FocusedTask,
1537
- Ue as FocusedTaskActions,
1538
- An as MANIFEST,
1539
- Dn as useFocusedTask
1893
+ bt as FocusedTask,
1894
+ vt as FocusedTaskActions,
1895
+ br as MANIFEST,
1896
+ vr as useFocusedTask
1540
1897
  };