@sps-woodland/focused-task 8.2.2 → 8.3.1

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