@serendie/ui 2.0.0-dev.202507240128 → 2.0.0-dev.202507240155

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.
@@ -1,28 +1,28 @@
1
- function ee(t) {
1
+ function ne(t) {
2
2
  if (!t) return;
3
3
  const e = t.selectionStart ?? 0, n = t.selectionEnd ?? 0;
4
4
  Math.abs(n - e) === 0 && e === 0 && t.setSelectionRange(t.value.length, t.value.length);
5
5
  }
6
- var tt = (t, e) => t.map((n, r) => t[(Math.max(e, 0) + r) % t.length]), C = (...t) => (e) => t.reduce((n, r) => r(n), e), h = () => {
7
- }, T = (t) => typeof t == "object" && t !== null, ne = 2147483647, re = (t) => t ? "" : void 0, oe = (t) => t ? "true" : void 0, et = 1, nt = 9, rt = 11, u = (t) => T(t) && t.nodeType === et && typeof t.nodeName == "string", _ = (t) => T(t) && t.nodeType === nt, ot = (t) => T(t) && t === t.window, W = (t) => u(t) ? t.localName || "" : "#document";
8
- function it(t) {
9
- return ["html", "body", "#document"].includes(W(t));
6
+ var et = (t, e) => t.map((n, r) => t[(Math.max(e, 0) + r) % t.length]), C = (...t) => (e) => t.reduce((n, r) => r(n), e), h = () => {
7
+ }, A = (t) => typeof t == "object" && t !== null, re = 2147483647, oe = (t) => t ? "" : void 0, ie = (t) => t ? "true" : void 0, nt = 1, rt = 9, ot = 11, u = (t) => A(t) && t.nodeType === nt && typeof t.nodeName == "string", W = (t) => A(t) && t.nodeType === rt, it = (t) => A(t) && t === t.window, H = (t) => u(t) ? t.localName || "" : "#document";
8
+ function st(t) {
9
+ return ["html", "body", "#document"].includes(H(t));
10
10
  }
11
- var st = (t) => T(t) && t.nodeType !== void 0, w = (t) => st(t) && t.nodeType === rt && "host" in t, at = (t) => u(t) && t.localName === "input", ie = (t) => !!(t != null && t.matches("a[href]")), ct = (t) => u(t) ? t.offsetWidth > 0 || t.offsetHeight > 0 || t.getClientRects().length > 0 : !1, ut = /(textarea|select)/;
12
- function ft(t) {
11
+ var at = (t) => A(t) && t.nodeType !== void 0, E = (t) => at(t) && t.nodeType === ot && "host" in t, ct = (t) => u(t) && t.localName === "input", se = (t) => !!(t != null && t.matches("a[href]")), ut = (t) => u(t) ? t.offsetWidth > 0 || t.offsetHeight > 0 || t.getClientRects().length > 0 : !1, ft = /(textarea|select)/;
12
+ function lt(t) {
13
13
  if (t == null || !u(t)) return !1;
14
14
  try {
15
- return at(t) && t.selectionStart != null || ut.test(t.localName) || t.isContentEditable || t.getAttribute("contenteditable") === "true" || t.getAttribute("contenteditable") === "";
15
+ return ct(t) && t.selectionStart != null || ft.test(t.localName) || t.isContentEditable || t.getAttribute("contenteditable") === "true" || t.getAttribute("contenteditable") === "";
16
16
  } catch {
17
17
  return !1;
18
18
  }
19
19
  }
20
- function H(t, e) {
20
+ function q(t, e) {
21
21
  var r;
22
22
  if (!t || !e || !u(t) || !u(e)) return !1;
23
23
  const n = (r = e.getRootNode) == null ? void 0 : r.call(e);
24
24
  if (t === e || t.contains(e)) return !0;
25
- if (n && w(n)) {
25
+ if (n && E(n)) {
26
26
  let o = e;
27
27
  for (; o; ) {
28
28
  if (t === o) return !0;
@@ -32,16 +32,16 @@ function H(t, e) {
32
32
  return !1;
33
33
  }
34
34
  function S(t) {
35
- return _(t) ? t : ot(t) ? t.document : (t == null ? void 0 : t.ownerDocument) ?? document;
35
+ return W(t) ? t : it(t) ? t.document : (t == null ? void 0 : t.ownerDocument) ?? document;
36
36
  }
37
- function lt(t) {
37
+ function dt(t) {
38
38
  return S(t).documentElement;
39
39
  }
40
- function l(t) {
40
+ function f(t) {
41
41
  var e;
42
- return w(t) ? l(t.host) : _(t) ? t.defaultView ?? window : u(t) ? ((e = t.ownerDocument) == null ? void 0 : e.defaultView) ?? window : window;
42
+ return E(t) ? f(t.host) : W(t) ? t.defaultView ?? window : u(t) ? ((e = t.ownerDocument) == null ? void 0 : e.defaultView) ?? window : window;
43
43
  }
44
- function se(t) {
44
+ function ae(t) {
45
45
  let e = t.activeElement;
46
46
  for (; e != null && e.shadowRoot; ) {
47
47
  const n = e.shadowRoot.activeElement;
@@ -50,59 +50,59 @@ function se(t) {
50
50
  }
51
51
  return e;
52
52
  }
53
- function dt(t) {
54
- if (W(t) === "html") return t;
55
- const e = t.assignedSlot || t.parentNode || w(t) && t.host || lt(t);
56
- return w(e) ? e.host : e;
53
+ function mt(t) {
54
+ if (H(t) === "html") return t;
55
+ const e = t.assignedSlot || t.parentNode || E(t) && t.host || dt(t);
56
+ return E(e) ? e.host : e;
57
57
  }
58
58
  var D = /* @__PURE__ */ new WeakMap();
59
- function ae(t) {
60
- return D.has(t) || D.set(t, l(t).getComputedStyle(t)), D.get(t);
59
+ function ce(t) {
60
+ return D.has(t) || D.set(t, f(t).getComputedStyle(t)), D.get(t);
61
61
  }
62
- var A = () => typeof document < "u";
63
- function mt() {
62
+ var T = () => typeof document < "u";
63
+ function bt() {
64
64
  const t = navigator.userAgentData;
65
65
  return (t == null ? void 0 : t.platform) ?? navigator.platform;
66
66
  }
67
- function bt() {
67
+ function pt() {
68
68
  const t = navigator.userAgentData;
69
69
  return t && Array.isArray(t.brands) ? t.brands.map(({ brand: e, version: n }) => `${e}/${n}`).join(" ") : navigator.userAgent;
70
70
  }
71
- var M = (t) => A() && t.test(mt()), q = (t) => A() && t.test(bt()), pt = (t) => A() && t.test(navigator.vendor), ce = () => A() && !!navigator.maxTouchPoints, vt = () => M(/^iPhone/i), yt = () => M(/^iPad/i) || k() && navigator.maxTouchPoints > 1, ht = () => vt() || yt(), gt = () => k() || ht(), k = () => M(/^Mac/i), ue = () => gt() && pt(/apple/i), Et = () => q(/Firefox/i), wt = () => q(/Android/i);
71
+ var M = (t) => T() && t.test(bt()), U = (t) => T() && t.test(pt()), vt = (t) => T() && t.test(navigator.vendor), ue = () => T() && !!navigator.maxTouchPoints, yt = () => M(/^iPhone/i), ht = () => M(/^iPad/i) || k() && navigator.maxTouchPoints > 1, gt = () => yt() || ht(), wt = () => k() || gt(), k = () => M(/^Mac/i), fe = () => wt() && vt(/apple/i), Et = () => U(/Firefox/i), At = () => U(/Android/i);
72
72
  function Tt(t) {
73
73
  var e, n, r;
74
74
  return ((e = t.composedPath) == null ? void 0 : e.call(t)) ?? ((r = (n = t.nativeEvent) == null ? void 0 : n.composedPath) == null ? void 0 : r.call(n));
75
75
  }
76
- function U(t) {
76
+ function X(t) {
77
77
  const e = Tt(t);
78
78
  return (e == null ? void 0 : e[0]) ?? t.target;
79
79
  }
80
- var fe = (t) => H(t.currentTarget, U(t));
81
- function le(t) {
80
+ var le = (t) => q(t.currentTarget, X(t));
81
+ function de(t) {
82
82
  const e = t.currentTarget;
83
83
  if (!e || !e.matches("a[href], button[type='submit'], input[type='submit']")) return !1;
84
- const r = t.button === 1, o = At(t);
84
+ const r = t.button === 1, o = kt(t);
85
85
  return r || o;
86
86
  }
87
- function de(t) {
87
+ function me(t) {
88
88
  const e = t.currentTarget;
89
89
  if (!e) return !1;
90
90
  const n = e.localName;
91
91
  return t.altKey ? n === "a" || n === "button" && e.type === "submit" || n === "input" && e.type === "submit" : !1;
92
92
  }
93
- function me(t) {
94
- return It(t).isComposing || t.keyCode === 229;
93
+ function be(t) {
94
+ return Nt(t).isComposing || t.keyCode === 229;
95
95
  }
96
- function At(t) {
96
+ function kt(t) {
97
97
  return k() ? t.metaKey : t.ctrlKey;
98
98
  }
99
- function be(t) {
99
+ function pe(t) {
100
100
  return t.key.length === 1 && !t.ctrlKey && !t.metaKey;
101
101
  }
102
- function pe(t) {
103
- return t.mozInputSource === 0 && t.isTrusted ? !0 : wt() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
102
+ function ve(t) {
103
+ return t.mozInputSource === 0 && t.isTrusted ? !0 : At() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
104
104
  }
105
- var ve = (t) => t.button === 0, ye = (t) => t.button === 2 || k() && t.ctrlKey && t.button === 0, he = (t) => t.ctrlKey || t.altKey || t.metaKey, kt = (t) => "touches" in t && t.touches.length > 0, xt = {
105
+ var ye = (t) => t.button === 0, he = (t) => t.button === 2 || k() && t.ctrlKey && t.button === 0, ge = (t) => t.ctrlKey || t.altKey || t.metaKey, xt = (t) => "touches" in t && t.touches.length > 0, It = {
106
106
  Up: "ArrowUp",
107
107
  Down: "ArrowDown",
108
108
  Esc: "Escape",
@@ -110,20 +110,20 @@ var ve = (t) => t.button === 0, ye = (t) => t.button === 2 || k() && t.ctrlKey &
110
110
  ",": "Comma",
111
111
  Left: "ArrowLeft",
112
112
  Right: "ArrowRight"
113
- }, j = {
113
+ }, _ = {
114
114
  ArrowLeft: "ArrowRight",
115
115
  ArrowRight: "ArrowLeft"
116
116
  };
117
- function ge(t, e = {}) {
117
+ function we(t, e = {}) {
118
118
  const { dir: n = "ltr", orientation: r = "horizontal" } = e;
119
119
  let o = t.key;
120
- return o = xt[o] ?? o, n === "rtl" && r === "horizontal" && o in j && (o = j[o]), o;
120
+ return o = It[o] ?? o, n === "rtl" && r === "horizontal" && o in _ && (o = _[o]), o;
121
121
  }
122
- function It(t) {
122
+ function Nt(t) {
123
123
  return t.nativeEvent ?? t;
124
124
  }
125
- function Nt(t, e = "client") {
126
- const n = kt(t) ? t.touches[0] || t.changedTouches[0] : t;
125
+ function Ct(t, e = "client") {
126
+ const n = xt(t) ? t.touches[0] || t.changedTouches[0] : t;
127
127
  return { x: n[`${e}X`], y: n[`${e}Y`] };
128
128
  }
129
129
  var v = (t, e, n, r) => {
@@ -132,85 +132,85 @@ var v = (t, e, n, r) => {
132
132
  o == null || o.removeEventListener(e, n, r);
133
133
  };
134
134
  };
135
- function Ct(t, e) {
136
- const { type: n = "HTMLInputElement", property: r = "value" } = e, o = l(t)[n].prototype;
135
+ function Dt(t, e) {
136
+ const { type: n = "HTMLInputElement", property: r = "value" } = e, o = f(t)[n].prototype;
137
137
  return Object.getOwnPropertyDescriptor(o, r) ?? {};
138
138
  }
139
- function Dt(t, e) {
139
+ function Lt(t, e) {
140
140
  var r;
141
141
  if (!t) return;
142
- (r = Ct(t, { type: "HTMLInputElement", property: "checked" }).set) == null || r.call(t, e), e ? t.setAttribute("checked", "") : t.removeAttribute("checked");
142
+ (r = Dt(t, { type: "HTMLInputElement", property: "checked" }).set) == null || r.call(t, e), e ? t.setAttribute("checked", "") : t.removeAttribute("checked");
143
143
  }
144
144
  function Ee(t, e) {
145
145
  const { checked: n, bubbles: r = !0 } = e;
146
146
  if (!t) return;
147
- const o = l(t);
148
- t instanceof o.HTMLInputElement && (Dt(t, n), t.dispatchEvent(new o.Event("click", { bubbles: r })));
149
- }
150
- function Lt(t) {
151
- return St(t) ? t.form : t.closest("form");
147
+ const o = f(t);
148
+ t instanceof o.HTMLInputElement && (Lt(t, n), t.dispatchEvent(new o.Event("click", { bubbles: r })));
152
149
  }
153
150
  function St(t) {
151
+ return Mt(t) ? t.form : t.closest("form");
152
+ }
153
+ function Mt(t) {
154
154
  return t.matches("textarea, input, select, button");
155
155
  }
156
- function Mt(t, e) {
156
+ function Pt(t, e) {
157
157
  if (!t) return;
158
- const n = Lt(t), r = (o) => {
158
+ const n = St(t), r = (o) => {
159
159
  o.defaultPrevented || e();
160
160
  };
161
161
  return n == null || n.addEventListener("reset", r, { passive: !0 }), () => n == null ? void 0 : n.removeEventListener("reset", r);
162
162
  }
163
- function Pt(t, e) {
163
+ function Rt(t, e) {
164
164
  const n = t == null ? void 0 : t.closest("fieldset");
165
165
  if (!n) return;
166
166
  e(n.disabled);
167
- const r = l(n), o = new r.MutationObserver(() => e(n.disabled));
167
+ const r = f(n), o = new r.MutationObserver(() => e(n.disabled));
168
168
  return o.observe(n, {
169
169
  attributes: !0,
170
170
  attributeFilter: ["disabled"]
171
171
  }), () => o.disconnect();
172
172
  }
173
- function we(t, e) {
173
+ function Ae(t, e) {
174
174
  if (!t) return;
175
- const { onFieldsetDisabledChange: n, onFormReset: r } = e, o = [Mt(t, r), Pt(t, n)];
175
+ const { onFieldsetDisabledChange: n, onFormReset: r } = e, o = [Pt(t, r), Rt(t, n)];
176
176
  return () => o.forEach((i) => i == null ? void 0 : i());
177
177
  }
178
- var X = (t) => u(t) && t.tagName === "IFRAME", Rt = (t) => !Number.isNaN(parseInt(t.getAttribute("tabindex") || "0", 10)), Ft = (t) => parseInt(t.getAttribute("tabindex") || "0", 10) < 0, P = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type", Kt = (t, e = !1) => {
178
+ var $ = (t) => u(t) && t.tagName === "IFRAME", Ft = (t) => !Number.isNaN(parseInt(t.getAttribute("tabindex") || "0", 10)), Kt = (t) => parseInt(t.getAttribute("tabindex") || "0", 10) < 0, P = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type", Ot = (t, e = !1) => {
179
179
  if (!t) return [];
180
180
  const n = Array.from(t.querySelectorAll(P));
181
181
  (e == !0 || e == "if-empty" && n.length === 0) && u(t) && L(t) && n.unshift(t);
182
182
  const o = n.filter(L);
183
183
  return o.forEach((i, a) => {
184
- if (X(i) && i.contentDocument) {
184
+ if ($(i) && i.contentDocument) {
185
185
  const s = i.contentDocument.body;
186
- o.splice(a, 1, ...Kt(s));
186
+ o.splice(a, 1, ...Ot(s));
187
187
  }
188
188
  }), o;
189
189
  };
190
190
  function L(t) {
191
- return !t || t.closest("[inert]") ? !1 : t.matches(P) && ct(t);
191
+ return !t || t.closest("[inert]") ? !1 : t.matches(P) && ut(t);
192
192
  }
193
193
  function R(t, e) {
194
194
  if (!t) return [];
195
- const r = Array.from(t.querySelectorAll(P)).filter(Ot);
195
+ const r = Array.from(t.querySelectorAll(P)).filter(Vt);
196
196
  return r.forEach((o, i) => {
197
- if (X(o) && o.contentDocument) {
197
+ if ($(o) && o.contentDocument) {
198
198
  const a = o.contentDocument.body, s = R(a);
199
199
  r.splice(i, 1, ...s);
200
200
  }
201
201
  }), r.length, r;
202
202
  }
203
- function Ot(t) {
204
- return t != null && t.tabIndex > 0 ? !0 : L(t) && !Ft(t);
203
+ function Vt(t) {
204
+ return t != null && t.tabIndex > 0 ? !0 : L(t) && !Kt(t);
205
205
  }
206
- function Vt(t, e) {
206
+ function Bt(t, e) {
207
207
  const n = R(t, e), r = n[0] || null, o = n[n.length - 1] || null;
208
208
  return [r, o];
209
209
  }
210
210
  function Te(t) {
211
- return t.tabIndex < 0 && (/^(audio|video|details)$/.test(t.localName) || ft(t)) && !Rt(t) ? 0 : t.tabIndex;
211
+ return t.tabIndex < 0 && (/^(audio|video|details)$/.test(t.localName) || lt(t)) && !Ft(t) ? 0 : t.tabIndex;
212
212
  }
213
- function Ae(t) {
213
+ function ke(t) {
214
214
  const { root: e, getInitialEl: n, filter: r, enabled: o = !0 } = t;
215
215
  if (!o) return;
216
216
  let i = null;
@@ -220,13 +220,13 @@ function Ae(t) {
220
220
  }
221
221
  return i || e || void 0;
222
222
  }
223
- function ke(t) {
223
+ function xe(t) {
224
224
  const e = t.currentTarget;
225
225
  if (!e) return !1;
226
- const [n, r] = Vt(e), o = e.ownerDocument || document;
226
+ const [n, r] = Bt(e), o = e.ownerDocument || document;
227
227
  return !(o.activeElement === n && t.shiftKey || o.activeElement === r && !t.shiftKey || !n && !r);
228
228
  }
229
- function xe(t) {
229
+ function Ie(t) {
230
230
  const e = /* @__PURE__ */ new Set();
231
231
  function n(r) {
232
232
  const o = globalThis.requestAnimationFrame(r);
@@ -245,7 +245,7 @@ function F(t) {
245
245
  globalThis.cancelAnimationFrame(n), e == null || e();
246
246
  };
247
247
  }
248
- function Bt(t, e, n) {
248
+ function jt(t, e, n) {
249
249
  const r = F(() => {
250
250
  t.removeEventListener(e, o, !0), n();
251
251
  }), o = () => {
@@ -253,7 +253,7 @@ function Bt(t, e, n) {
253
253
  };
254
254
  return t.addEventListener(e, o, { once: !0, capture: !0 }), r;
255
255
  }
256
- function jt(t, e) {
256
+ function _t(t, e) {
257
257
  if (!t) return;
258
258
  const { attributes: n, callback: r } = e, o = t.ownerDocument.defaultView || window, i = new o.MutationObserver((a) => {
259
259
  for (const s of a)
@@ -261,58 +261,62 @@ function jt(t, e) {
261
261
  });
262
262
  return i.observe(t, { attributes: !0, attributeFilter: n }), () => i.disconnect();
263
263
  }
264
- function Ie(t, e) {
264
+ function Ne(t, e) {
265
265
  const { defer: n } = e, r = n ? F : (i) => i(), o = [];
266
266
  return o.push(
267
267
  r(() => {
268
268
  const i = typeof t == "function" ? t() : t;
269
- o.push(jt(i, e));
269
+ o.push(_t(i, e));
270
270
  })
271
271
  ), () => {
272
272
  o.forEach((i) => i == null ? void 0 : i());
273
273
  };
274
274
  }
275
- function _t(t, e) {
275
+ function Wt(t, e) {
276
276
  const { callback: n } = e;
277
277
  if (!t) return;
278
278
  const r = t.ownerDocument.defaultView || window, o = new r.MutationObserver(n);
279
279
  return o.observe(t, { childList: !0, subtree: !0 }), () => o.disconnect();
280
280
  }
281
- function Ne(t, e) {
281
+ function Ce(t, e) {
282
282
  const { defer: n } = e, r = n ? F : (i) => i(), o = [];
283
283
  return o.push(
284
284
  r(() => {
285
285
  const i = typeof t == "function" ? t() : t;
286
- o.push(_t(i, e));
286
+ o.push(Wt(i, e));
287
287
  })
288
288
  ), () => {
289
289
  o.forEach((i) => i == null ? void 0 : i());
290
290
  };
291
291
  }
292
- function Ce(t) {
292
+ function De(t) {
293
293
  const e = () => {
294
- const n = l(t);
294
+ const n = f(t);
295
295
  t.dispatchEvent(new n.MouseEvent("click"));
296
296
  };
297
- Et() ? Bt(t, "keyup", e) : queueMicrotask(e);
297
+ Et() ? jt(t, "keyup", e) : queueMicrotask(e);
298
+ }
299
+ function z(t) {
300
+ const e = mt(t);
301
+ return st(e) ? S(e).body : u(e) && K(e) ? e : z(e);
298
302
  }
299
- function Wt(t) {
300
- const e = dt(t);
301
- return it(e) ? S(e).body : u(e) && $(e) ? e : Wt(e);
303
+ function Ht(t, e = []) {
304
+ const n = z(t), r = n === t.ownerDocument.body, o = f(n);
305
+ return r ? e.concat(o, o.visualViewport || [], K(n) ? n : []) : e.concat(n, Ht(n, []));
302
306
  }
303
- var Ht = /auto|scroll|overlay|hidden|clip/;
304
- function $(t) {
305
- const e = l(t), { overflow: n, overflowX: r, overflowY: o, display: i } = e.getComputedStyle(t);
306
- return Ht.test(n + o + r) && !["inline", "contents"].includes(i);
307
+ var qt = /auto|scroll|overlay|hidden|clip/;
308
+ function K(t) {
309
+ const e = f(t), { overflow: n, overflowX: r, overflowY: o, display: i } = e.getComputedStyle(t);
310
+ return qt.test(n + o + r) && !["inline", "contents"].includes(i);
307
311
  }
308
- function qt(t) {
312
+ function Ut(t) {
309
313
  return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth;
310
314
  }
311
- function De(t, e) {
315
+ function Le(t, e) {
312
316
  const { rootEl: n, ...r } = e || {};
313
- !t || !n || !$(n) || !qt(n) || t.scrollIntoView(r);
317
+ !t || !n || !K(n) || !Ut(n) || t.scrollIntoView(r);
314
318
  }
315
- function Le(t) {
319
+ function Se(t) {
316
320
  const {
317
321
  pointerNode: e,
318
322
  keyboardNode: n = e,
@@ -322,130 +326,130 @@ function Le(t) {
322
326
  isValidKey: a = (c) => c.key === "Enter"
323
327
  } = t;
324
328
  if (!e) return h;
325
- const s = l(e), g = S(e);
326
- let d = h, f = h, y = h;
329
+ const s = f(e), g = S(e);
330
+ let d = h, l = h, y = h;
327
331
  const m = (c) => ({
328
- point: Nt(c),
332
+ point: Ct(c),
329
333
  event: c
330
334
  });
331
- function E(c) {
335
+ function w(c) {
332
336
  o == null || o(m(c));
333
337
  }
334
338
  function b(c) {
335
339
  i == null || i(m(c));
336
340
  }
337
- const z = v(e, "pointerdown", (c) => {
338
- f();
341
+ const G = v(e, "pointerdown", (c) => {
342
+ l();
339
343
  const x = v(s, "pointerup", (p) => {
340
- const N = U(p);
341
- H(e, N) ? r == null || r(m(p)) : i == null || i(m(p));
344
+ const N = X(p);
345
+ q(e, N) ? r == null || r(m(p)) : i == null || i(m(p));
342
346
  }, { passive: !r, once: !0 }), I = v(s, "pointercancel", b, {
343
347
  passive: !i,
344
348
  once: !0
345
349
  });
346
- f = C(x, I), g.activeElement === n && c.pointerType === "mouse" && c.preventDefault(), E(c);
347
- }, { passive: !o }), G = v(n, "focus", Y);
348
- d = C(z, G);
349
- function Y() {
350
+ l = C(x, I), g.activeElement === n && c.pointerType === "mouse" && c.preventDefault(), w(c);
351
+ }, { passive: !o }), Y = v(n, "focus", Z);
352
+ d = C(G, Y);
353
+ function Z() {
350
354
  const c = (p) => {
351
355
  if (!a(p)) return;
352
- const N = (J) => {
353
- if (!a(J)) return;
354
- const Q = new s.PointerEvent("pointerup"), B = m(Q);
355
- r == null || r(B), i == null || i(B);
356
+ const N = (Q) => {
357
+ if (!a(Q)) return;
358
+ const tt = new s.PointerEvent("pointerup"), j = m(tt);
359
+ r == null || r(j), i == null || i(j);
356
360
  };
357
- f(), f = v(n, "keyup", N);
358
- const Z = new s.PointerEvent("pointerdown");
359
- E(Z);
360
- }, V = () => {
361
+ l(), l = v(n, "keyup", N);
362
+ const J = new s.PointerEvent("pointerdown");
363
+ w(J);
364
+ }, B = () => {
361
365
  const p = new s.PointerEvent("pointercancel");
362
366
  b(p);
363
- }, x = v(n, "keydown", c), I = v(n, "blur", V);
367
+ }, x = v(n, "keydown", c), I = v(n, "blur", B);
364
368
  y = C(x, I);
365
369
  }
366
370
  return () => {
367
- d(), f(), y();
371
+ d(), l(), y();
368
372
  };
369
373
  }
370
- function Se(t, e) {
374
+ function Me(t, e) {
371
375
  return Array.from((t == null ? void 0 : t.querySelectorAll(e)) ?? []);
372
376
  }
373
- function Me(t, e) {
377
+ function Pe(t, e) {
374
378
  return (t == null ? void 0 : t.querySelector(e)) ?? null;
375
379
  }
376
- var K = (t) => t.id;
377
- function Ut(t, e, n = K) {
380
+ var O = (t) => t.id;
381
+ function Xt(t, e, n = O) {
378
382
  return t.find((r) => n(r) === e);
379
383
  }
380
- function O(t, e, n = K) {
381
- const r = Ut(t, e, n);
384
+ function V(t, e, n = O) {
385
+ const r = Xt(t, e, n);
382
386
  return r ? t.indexOf(r) : -1;
383
387
  }
384
- function Pe(t, e, n = !0) {
385
- let r = O(t, e);
388
+ function Re(t, e, n = !0) {
389
+ let r = V(t, e);
386
390
  return r = n ? (r + 1) % t.length : Math.min(r + 1, t.length - 1), t[r];
387
391
  }
388
- function Re(t, e, n = !0) {
389
- let r = O(t, e);
392
+ function Fe(t, e, n = !0) {
393
+ let r = V(t, e);
390
394
  return r === -1 ? n ? t[t.length - 1] : null : (r = n ? (r - 1 + t.length) % t.length : Math.max(0, r - 1), t[r]);
391
395
  }
392
- function Fe(t, e) {
393
- const { onEntry: n, measure: r, box: o = "border-box" } = e, i = (Array.isArray(t) ? t : [t]).filter(u), a = l(i[0]), s = (d) => {
394
- const f = i.map((y) => r(y));
395
- n({ rects: f, entries: d });
396
+ function Ke(t, e) {
397
+ const { onEntry: n, measure: r, box: o = "border-box" } = e, i = (Array.isArray(t) ? t : [t]).filter(u), a = f(i[0]), s = (d) => {
398
+ const l = i.map((y) => r(y));
399
+ n({ rects: l, entries: d });
396
400
  };
397
401
  s([]);
398
402
  const g = new a.ResizeObserver(s);
399
403
  return i.forEach((d) => g.observe(d, { box: o })), () => g.disconnect();
400
404
  }
401
- var Xt = (t) => t.split("").map((e) => {
405
+ var $t = (t) => t.split("").map((e) => {
402
406
  const n = e.charCodeAt(0);
403
407
  return n > 0 && n < 128 ? e : n >= 128 && n <= 255 ? `/x${n.toString(16)}`.replace("/", "\\") : "";
404
- }).join("").trim(), $t = (t) => {
408
+ }).join("").trim(), zt = (t) => {
405
409
  var e;
406
- return Xt(((e = t.dataset) == null ? void 0 : e.valuetext) ?? t.textContent ?? "");
407
- }, zt = (t, e) => t.trim().toLowerCase().startsWith(e.toLowerCase());
408
- function Gt(t, e, n, r = K) {
409
- const o = n ? O(t, n, r) : -1;
410
- let i = n ? tt(t, o) : t;
411
- return e.length === 1 && (i = i.filter((s) => r(s) !== n)), i.find((s) => zt($t(s), e));
412
- }
413
- function Ke(t, e) {
410
+ return $t(((e = t.dataset) == null ? void 0 : e.valuetext) ?? t.textContent ?? "");
411
+ }, Gt = (t, e) => t.trim().toLowerCase().startsWith(e.toLowerCase());
412
+ function Yt(t, e, n, r = O) {
413
+ const o = n ? V(t, n, r) : -1;
414
+ let i = n ? et(t, o) : t;
415
+ return e.length === 1 && (i = i.filter((s) => r(s) !== n)), i.find((s) => Gt(zt(s), e));
416
+ }
417
+ function Oe(t, e) {
414
418
  if (!t) return h;
415
419
  const n = Object.keys(e).reduce((r, o) => (r[o] = t.style.getPropertyValue(o), r), {});
416
420
  return Object.assign(t.style, e), () => {
417
421
  Object.assign(t.style, n), t.style.length === 0 && t.removeAttribute("style");
418
422
  };
419
423
  }
420
- function Oe(t, e, n) {
424
+ function Ve(t, e, n) {
421
425
  if (!t) return h;
422
426
  const r = t.style.getPropertyValue(e);
423
427
  return t.style.setProperty(e, n), () => {
424
428
  t.style.setProperty(e, r), t.style.length === 0 && t.removeAttribute("style");
425
429
  };
426
430
  }
427
- function Yt(t, e) {
431
+ function Zt(t, e) {
428
432
  const { state: n, activeId: r, key: o, timeout: i = 350, itemToId: a } = e, s = n.keysSoFar + o, d = s.length > 1 && Array.from(s).every((b) => b === s[0]) ? s[0] : s;
429
- let f = t.slice();
430
- const y = Gt(f, d, r, a);
433
+ let l = t.slice();
434
+ const y = Yt(l, d, r, a);
431
435
  function m() {
432
436
  clearTimeout(n.timer), n.timer = -1;
433
437
  }
434
- function E(b) {
438
+ function w(b) {
435
439
  n.keysSoFar = b, m(), b !== "" && (n.timer = +setTimeout(() => {
436
- E(""), m();
440
+ w(""), m();
437
441
  }, i));
438
442
  }
439
- return E(s), y;
443
+ return w(s), y;
440
444
  }
441
- var Ve = /* @__PURE__ */ Object.assign(Yt, {
445
+ var Be = /* @__PURE__ */ Object.assign(Zt, {
442
446
  defaultOptions: { keysSoFar: "", timer: -1 },
443
- isValidEvent: Zt
447
+ isValidEvent: Jt
444
448
  });
445
- function Zt(t) {
449
+ function Jt(t) {
446
450
  return t.key.length === 1 && !t.ctrlKey && !t.metaKey;
447
451
  }
448
- var Be = {
452
+ var je = {
449
453
  border: "0",
450
454
  clip: "rect(0 0 0 0)",
451
455
  height: "1px",
@@ -456,8 +460,8 @@ var Be = {
456
460
  width: "1px",
457
461
  whiteSpace: "nowrap",
458
462
  wordWrap: "normal"
459
- }, Jt = 1e3 / 60;
460
- function Qt(t, e) {
463
+ }, Qt = 1e3 / 60;
464
+ function te(t, e) {
461
465
  const n = t();
462
466
  if (u(n) && n.isConnected)
463
467
  return e(n), () => {
@@ -466,104 +470,105 @@ function Qt(t, e) {
466
470
  const r = setInterval(() => {
467
471
  const o = t();
468
472
  u(o) && o.isConnected && (e(o), clearInterval(r));
469
- }, Jt);
473
+ }, Qt);
470
474
  return () => clearInterval(r);
471
475
  }
472
476
  }
473
- function je(t, e) {
477
+ function _e(t, e) {
474
478
  const n = [];
475
479
  return t == null || t.forEach((r) => {
476
- const o = Qt(r, e);
480
+ const o = te(r, e);
477
481
  n.push(o);
478
482
  }), () => {
479
483
  n.forEach((r) => r());
480
484
  };
481
485
  }
482
486
  export {
483
- ne as MAX_Z_INDEX,
487
+ re as MAX_Z_INDEX,
484
488
  v as addDomEvent,
485
- oe as ariaAttr,
486
- Ce as clickIfLink,
487
- H as contains,
488
- re as dataAttr,
489
- K as defaultItemToId,
489
+ ie as ariaAttr,
490
+ De as clickIfLink,
491
+ q as contains,
492
+ oe as dataAttr,
493
+ O as defaultItemToId,
490
494
  Ee as dispatchInputCheckedEvent,
491
- se as getActiveElement,
492
- Gt as getByText,
493
- Ve as getByTypeahead,
494
- ae as getComputedStyle,
495
+ ae as getActiveElement,
496
+ Yt as getByText,
497
+ Be as getByTypeahead,
498
+ ce as getComputedStyle,
495
499
  S as getDocument,
496
- lt as getDocumentElement,
497
- ge as getEventKey,
498
- Nt as getEventPoint,
499
- U as getEventTarget,
500
- Kt as getFocusables,
501
- Ae as getInitialFocus,
502
- It as getNativeEvent,
503
- Wt as getNearestOverflowAncestor,
504
- W as getNodeName,
505
- dt as getParentNode,
506
- mt as getPlatform,
500
+ dt as getDocumentElement,
501
+ we as getEventKey,
502
+ Ct as getEventPoint,
503
+ X as getEventTarget,
504
+ Ot as getFocusables,
505
+ ke as getInitialFocus,
506
+ Nt as getNativeEvent,
507
+ z as getNearestOverflowAncestor,
508
+ H as getNodeName,
509
+ Ht as getOverflowAncestors,
510
+ mt as getParentNode,
511
+ bt as getPlatform,
507
512
  Te as getTabIndex,
508
- Vt as getTabbableEdges,
513
+ Bt as getTabbableEdges,
509
514
  R as getTabbables,
510
- bt as getUserAgent,
511
- l as getWindow,
512
- O as indexOfId,
513
- ie as isAnchorElement,
514
- wt as isAndroid,
515
- gt as isApple,
516
- me as isComposingEvent,
517
- ye as isContextMenuEvent,
518
- At as isCtrlOrMetaKey,
519
- _ as isDocument,
520
- A as isDom,
521
- de as isDownloadingEvent,
522
- ft as isEditableElement,
523
- ct as isElementVisible,
515
+ pt as getUserAgent,
516
+ f as getWindow,
517
+ V as indexOfId,
518
+ se as isAnchorElement,
519
+ At as isAndroid,
520
+ wt as isApple,
521
+ be as isComposingEvent,
522
+ he as isContextMenuEvent,
523
+ kt as isCtrlOrMetaKey,
524
+ W as isDocument,
525
+ T as isDom,
526
+ me as isDownloadingEvent,
527
+ lt as isEditableElement,
528
+ ut as isElementVisible,
524
529
  Et as isFirefox,
525
530
  L as isFocusable,
526
531
  u as isHTMLElement,
527
- yt as isIPad,
528
- vt as isIPhone,
529
- at as isInputElement,
530
- ht as isIos,
531
- ve as isLeftClick,
532
+ ht as isIPad,
533
+ yt as isIPhone,
534
+ ct as isInputElement,
535
+ gt as isIos,
536
+ ye as isLeftClick,
532
537
  k as isMac,
533
- he as isModifierKey,
534
- st as isNode,
535
- le as isOpeningInNewTab,
536
- $ as isOverflowElement,
537
- be as isPrintableKey,
538
- it as isRootElement,
539
- ue as isSafari,
540
- fe as isSelfTarget,
541
- w as isShadowRoot,
542
- Ot as isTabbable,
543
- ce as isTouchDevice,
544
- kt as isTouchEvent,
545
- ke as isValidTabEvent,
546
- pe as isVirtualClick,
547
- ot as isWindow,
548
- Ut as itemById,
549
- Pe as nextById,
550
- xe as nextTick,
551
- Ie as observeAttributes,
552
- Ne as observeChildren,
553
- Re as prevById,
554
- Me as query,
555
- Se as queryAll,
556
- Bt as queueBeforeEvent,
538
+ ge as isModifierKey,
539
+ at as isNode,
540
+ de as isOpeningInNewTab,
541
+ K as isOverflowElement,
542
+ pe as isPrintableKey,
543
+ st as isRootElement,
544
+ fe as isSafari,
545
+ le as isSelfTarget,
546
+ E as isShadowRoot,
547
+ Vt as isTabbable,
548
+ ue as isTouchDevice,
549
+ xt as isTouchEvent,
550
+ xe as isValidTabEvent,
551
+ ve as isVirtualClick,
552
+ it as isWindow,
553
+ Xt as itemById,
554
+ Re as nextById,
555
+ Ie as nextTick,
556
+ Ne as observeAttributes,
557
+ Ce as observeChildren,
558
+ Fe as prevById,
559
+ Pe as query,
560
+ Me as queryAll,
561
+ jt as queueBeforeEvent,
557
562
  F as raf,
558
- De as scrollIntoView,
559
- ee as setCaretToEnd,
560
- Dt as setElementChecked,
561
- Ke as setStyle,
562
- Oe as setStyleProperty,
563
- Fe as trackElementRect,
564
- we as trackFormControl,
565
- Le as trackPress,
566
- Be as visuallyHiddenStyle,
567
- Qt as waitForElement,
568
- je as waitForElements
563
+ Le as scrollIntoView,
564
+ ne as setCaretToEnd,
565
+ Lt as setElementChecked,
566
+ Oe as setStyle,
567
+ Ve as setStyleProperty,
568
+ Ke as trackElementRect,
569
+ Ae as trackFormControl,
570
+ Se as trackPress,
571
+ je as visuallyHiddenStyle,
572
+ te as waitForElement,
573
+ _e as waitForElements
569
574
  };