@tempots/ui 5.2.2 → 6.0.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/index.js CHANGED
@@ -1,33 +1,33 @@
1
- var be = Object.defineProperty;
2
- var Ae = (t, e, o) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var At = (t, e, o) => Ae(t, typeof e != "symbol" ? e + "" : e, o);
4
- import { getWindow as ct, prop as H, makeProviderMark as Xt, Signal as Jt, Use as Gt, html as Rt, on as Qt, Value as E, attr as Zt, Empty as Et, OneOfType as te, WithElement as $, OnDispose as F, Portal as ee, Fragment as st, renderableOfTNode as Dt, When as ne, effectOf as Oe, computedOf as oe, WithBrowserCtx as Re, OneOfTuple as Ee, Prop as Le } from "@tempots/dom";
5
- import { delayed as se, AsyncResult as U, nearEqual as ft, interval as Se } from "@tempots/std";
6
- const Te = (t) => {
1
+ var Pe = Object.defineProperty;
2
+ var Le = (t, e, o) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var At = (t, e, o) => Le(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { getWindow as at, prop as F, makeProviderMark as Wt, Signal as te, Use as rt, html as Et, on as ee, Value as E, attr as ne, Empty as Pt, OneOfType as oe, WithElement as H, OnDispose as M, Portal as re, Fragment as st, renderableOfTNode as Ft, When as se, effectOf as Se, computedOf as ie, WithBrowserCtx as Te, Provide as ke, OneOfTuple as ce, Prop as Ce } from "@tempots/dom";
5
+ import { delayed as ae, AsyncResult as U, nearEqual as ht, interval as De } from "@tempots/std";
6
+ const We = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
9
9
  const o = e.split(".") || [];
10
10
  return o.length > 1 ? "." + o.pop() : void 0;
11
- }, Pe = (t, e) => {
12
- const o = Te(e);
11
+ }, Fe = (t, e) => {
12
+ const o = We(e);
13
13
  return o != null && (t.length === 0 || !t.some((n) => o == n));
14
- }, ke = (t, e, o, n) => {
15
- let s = t.target;
16
- for (; s != null && !(s instanceof HTMLAnchorElement); )
17
- s = s.parentElement;
18
- if (s == null)
14
+ }, Me = (t, e, o, n) => {
15
+ let r = t.target;
16
+ for (; r != null && !(r instanceof HTMLAnchorElement); )
17
+ r = r.parentElement;
18
+ if (r == null)
19
19
  return !0;
20
- const r = s;
21
- if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
20
+ const s = r;
21
+ if (t.button !== 0 || t.ctrlKey || t.metaKey || s.target !== "_self" && s.target !== "" || s.getAttribute("download") != null)
22
22
  return !0;
23
- const { pathname: i, search: c, hash: l } = r;
23
+ const { pathname: i, search: c, hash: a } = s;
24
24
  if (n) {
25
- const a = i + c + l, h = r.getAttribute("href");
26
- if (!(h != null && h.startsWith("#")) && h !== a)
25
+ const l = i + c + a, h = s.getAttribute("href");
26
+ if (!(h != null && h.startsWith("#")) && h !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Pe(o, i);
30
- }, De = (t, e = {
29
+ return e ? !1 : Fe(o, i);
30
+ }, Ne = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
33
33
  ignoreExternalUrl: !0
@@ -36,41 +36,41 @@ const Te = (t) => {
36
36
  (n) => n.startsWith(".") ? n : "." + n
37
37
  ) : [];
38
38
  return (n) => {
39
- ke(
39
+ Me(
40
40
  n,
41
41
  e.ignoreUrlWithExtension ?? !0,
42
42
  o,
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && n.preventDefault();
45
45
  };
46
- }, Ce = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, re = (t, e) => {
47
- var r;
48
- const o = new URL(t, e ?? ((r = ct()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(o.searchParams.entries());
49
- let s = o.hash;
50
- return s.startsWith("#") && (s = s.substring(1)), {
46
+ }, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, le = (t, e) => {
47
+ var s;
48
+ const o = new URL(t, e ?? ((s = at()) == null ? void 0 : s.location.toString())), n = Object.fromEntries(o.searchParams.entries());
49
+ let r = o.hash;
50
+ return r.startsWith("#") && (r = r.substring(1)), {
51
51
  pathname: o.pathname,
52
52
  search: n,
53
- hash: s === "" ? void 0 : s
53
+ hash: r === "" ? void 0 : r
54
54
  };
55
- }, $t = (t, e) => {
56
- const o = re(e);
55
+ }, zt = (t, e) => {
56
+ const o = le(e);
57
57
  return t.set(o), t;
58
58
  }, Lt = (t) => {
59
59
  const o = new URLSearchParams(t.search).toString(), n = t.hash;
60
60
  return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
61
- }, We = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Fe = (t) => {
61
+ }, $e = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), He = (t) => {
62
62
  const e = t.container.currentURL, o = e.iso(
63
- (n) => re(n),
63
+ (n) => le(n),
64
64
  (n) => {
65
- if (We(n.pathname))
65
+ if ($e(n.pathname))
66
66
  return Lt(n);
67
- const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
68
- return Lt({ ...n, pathname: r });
67
+ const r = new URL(n.pathname, e.value), s = r.origin + r.pathname;
68
+ return Lt({ ...n, pathname: s });
69
69
  }
70
70
  );
71
71
  return { value: o, dispose: o.dispose };
72
- }, Me = () => {
73
- const t = ct(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
72
+ }, Be = () => {
73
+ const t = at(), e = (t == null ? void 0 : t.location.hash) === "" ? void 0 : (t == null ? void 0 : t.location.hash.substring(1)) ?? void 0;
74
74
  return {
75
75
  pathname: (t == null ? void 0 : t.location.pathname) ?? "",
76
76
  search: Object.fromEntries(
@@ -78,18 +78,18 @@ const Te = (t) => {
78
78
  ),
79
79
  hash: e
80
80
  };
81
- }, Ve = () => {
82
- const t = H(Me(), Ce), e = ct(), o = () => {
81
+ }, Ue = () => {
82
+ const t = F(Be(), Ve), e = at(), o = () => {
83
83
  let n = (e == null ? void 0 : e.location.hash) ?? "";
84
84
  n.startsWith("#") && (n = n.substring(1));
85
- const s = {
85
+ const r = {
86
86
  pathname: (e == null ? void 0 : e.location.pathname) ?? "",
87
87
  search: Object.fromEntries(
88
88
  new URLSearchParams((e == null ? void 0 : e.location.search) ?? "").entries()
89
89
  ),
90
90
  hash: n === "" ? void 0 : n
91
91
  };
92
- t.set(s);
92
+ t.set(r);
93
93
  };
94
94
  return e == null || e.addEventListener("popstate", o), t.onDispose(() => {
95
95
  e == null || e.removeEventListener("popstate", o);
@@ -99,68 +99,68 @@ const Te = (t) => {
99
99
  value: t,
100
100
  dispose: t.dispose
101
101
  };
102
- }, ie = {
103
- mark: Xt("LocationProvider"),
102
+ }, Mt = {
103
+ mark: Wt("LocationProvider"),
104
104
  create: (t, e) => {
105
105
  if (e.isBrowser())
106
- return Ve();
106
+ return Ue();
107
107
  if (e.isHeadless())
108
- return Fe(e);
108
+ return He(e);
109
109
  throw new Error("Unknown context");
110
110
  }
111
- }, Ne = (t) => {
111
+ }, ze = (t) => {
112
112
  document.startViewTransition ? document.startViewTransition(t) : t();
113
- }, $e = (t, ...e) => {
114
- if (typeof t == "string" || Jt.is(t))
115
- return $e({ href: t }, ...e);
113
+ }, Ke = (t, ...e) => {
114
+ if (typeof t == "string" || te.is(t))
115
+ return Ke({ href: t }, ...e);
116
116
  const {
117
117
  href: o,
118
118
  withViewTransition: n,
119
- ...s
119
+ ...r
120
120
  } = t;
121
- return Gt(ie, (r) => Rt.a(
122
- Qt.click(
123
- De(() => (n === !0 ? Ne(() => {
124
- $t(r, E.get(o));
125
- }) : $t(r, E.get(o)), !0), s)
121
+ return rt(Mt, (s) => Et.a(
122
+ ee.click(
123
+ Ne(() => (n === !0 ? ze(() => {
124
+ zt(s, E.get(o));
125
+ }) : zt(s, E.get(o)), !0), r)
126
126
  ),
127
- Zt.href(o),
127
+ ne.href(o),
128
128
  ...e
129
129
  /* c8 ignore next 2 */
130
130
  ));
131
- }, Kn = {
132
- mark: Xt("Appearance"),
131
+ }, In = {
132
+ mark: Wt("Appearance"),
133
133
  create: () => {
134
- const t = He();
134
+ const t = _e();
135
135
  return {
136
136
  value: t,
137
137
  dispose: t.dispose
138
138
  };
139
139
  }
140
140
  };
141
- function He() {
142
- const t = ct(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = H(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
143
- return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
141
+ function _e() {
142
+ const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = F(o ? "dark" : "light"), r = (s) => n.set(s.matches ? "dark" : "light");
143
+ return e == null || e.addEventListener("change", r), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), n;
144
144
  }
145
- const ce = (t, e) => {
145
+ const ue = (t, e) => {
146
146
  if (typeof e == "function")
147
- return ce(t, { success: e });
148
- const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Et), r = e.notAsked ?? (() => Et);
149
- return te(E.toSignal(t), {
147
+ return ue(t, { success: e });
148
+ const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, r = e.loading ?? (() => Pt), s = e.notAsked ?? (() => Pt);
149
+ return oe(E.toSignal(t), {
150
150
  AsyncSuccess: (i) => n(i.$.value),
151
151
  AsyncFailure: (i) => o(i.$.error),
152
- Loading: (i) => s(i.map((c) => c.previousValue)),
153
- NotAsked: r
152
+ Loading: (i) => r(i.map((c) => c.previousValue)),
153
+ NotAsked: s
154
154
  });
155
- }, _n = (t = 10) => $((e) => F(se(() => e == null ? void 0 : e.focus(), t))), In = (t = 10) => $((e) => {
156
- const o = se(() => e.select(), t);
157
- return F(o);
158
- }), jn = $((t) => {
155
+ }, Yn = (t = 10) => H((e) => M(ae(() => e == null ? void 0 : e.focus(), t))), qn = (t = 10) => H((e) => {
156
+ const o = ae(() => e.select(), t);
157
+ return M(o);
158
+ }), Xn = H((t) => {
159
159
  const e = t.style.getPropertyValue(":empty");
160
- return t.style.setProperty(":empty", "display:none"), F((o) => {
160
+ return t.style.setProperty(":empty", "display:none"), M((o) => {
161
161
  o && t.style.setProperty(":empty", e);
162
162
  });
163
- }), Yn = (t) => ee("head > title", Zt.innerText(t)), Be = {
163
+ }), Jn = (t) => re("head > title", ne.innerText(t)), je = {
164
164
  partial: {
165
165
  root: null,
166
166
  rootMargin: "0px",
@@ -171,92 +171,92 @@ const ce = (t, e) => {
171
171
  rootMargin: "0px",
172
172
  threshold: 1
173
173
  }
174
- }, dt = {
174
+ }, mt = {
175
175
  partial: /* @__PURE__ */ new Map(),
176
176
  full: /* @__PURE__ */ new Map()
177
177
  }, ot = {
178
178
  partial: null,
179
179
  full: null
180
180
  };
181
- function Ue(t) {
181
+ function Ie(t) {
182
182
  return ot[t] == null && (ot[t] = new IntersectionObserver((e) => {
183
183
  e.forEach((o) => {
184
- const n = dt[t].get(o.target);
184
+ const n = mt[t].get(o.target);
185
185
  n == null || n.set(o.isIntersecting);
186
186
  });
187
- }, Be[t])), ot[t];
187
+ }, je[t])), ot[t];
188
188
  }
189
- const ze = ({ mode: t = "partial", once: e = !1 }, o) => {
190
- const n = H(!1);
189
+ const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
190
+ const n = F(!1);
191
191
  return st(
192
- $((s) => {
193
- const r = typeof IntersectionObserver < "u" ? Ue(t) : null;
194
- dt[t].set(s, n), r == null || r.observe(s);
192
+ H((r) => {
193
+ const s = typeof IntersectionObserver < "u" ? Ie(t) : null;
194
+ mt[t].set(r, n), s == null || s.observe(r);
195
195
  function i() {
196
- var l;
197
- r == null || r.unobserve(s), dt[t].delete(s), dt[t].size === 0 && ((l = ot[t]) == null || l.disconnect(), ot[t] = null);
196
+ var a;
197
+ s == null || s.unobserve(r), mt[t].delete(r), mt[t].size === 0 && ((a = ot[t]) == null || a.disconnect(), ot[t] = null);
198
198
  }
199
199
  let c = null;
200
- return e && (c = n.on((l) => {
201
- l && i();
202
- })), F(() => {
200
+ return e && (c = n.on((a) => {
201
+ a && i();
202
+ })), M(() => {
203
203
  n.dispose(), i(), c == null || c();
204
204
  });
205
205
  }),
206
- Dt(o(n))
206
+ Ft(o(n))
207
207
  );
208
- }, qn = (t, e, o) => ze(t, (n) => ne(n, e, o ?? (() => Et)));
209
- function Xn(t) {
210
- return $((e) => {
208
+ }, Gn = (t, e, o) => Ye(t, (n) => se(n, e, o ?? (() => Pt)));
209
+ function Qn(t) {
210
+ return H((e) => {
211
211
  const o = (n) => {
212
212
  e.contains(n.target) || t(n);
213
213
  };
214
- return document.addEventListener("click", o), F(() => {
214
+ return document.addEventListener("click", o), M(() => {
215
215
  document.removeEventListener("click", o);
216
216
  });
217
217
  });
218
218
  }
219
- const G = (t, e) => t === void 0 || t === e, Ht = (t, e) => t === void 0 || t === e;
220
- function Ke(t, e) {
221
- return typeof t == "string" ? e.key === t : Ht(t.key, e.key) && Ht(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
219
+ const G = (t, e) => t === void 0 || t === e, Kt = (t, e) => t === void 0 || t === e;
220
+ function qe(t, e) {
221
+ return typeof t == "string" ? e.key === t : Kt(t.key, e.key) && Kt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
222
222
  t.commandOrControlKey,
223
223
  e.metaKey || e.ctrlKey
224
224
  );
225
225
  }
226
- function le({
226
+ function fe({
227
227
  allowedKeys: t,
228
228
  handler: e
229
229
  }) {
230
- return $((o) => {
231
- const n = (s) => {
232
- if (o.contains(s.target)) {
233
- for (const r of t)
234
- if (Ke(r, s)) {
235
- e(s);
230
+ return H((o) => {
231
+ const n = (r) => {
232
+ if (o.contains(r.target)) {
233
+ for (const s of t)
234
+ if (qe(s, r)) {
235
+ e(r);
236
236
  break;
237
237
  }
238
238
  }
239
239
  };
240
- return document.addEventListener("keydown", n), F(() => {
240
+ return document.addEventListener("keydown", n), M(() => {
241
241
  document.removeEventListener("keydown", n);
242
242
  });
243
243
  });
244
244
  }
245
- function Jn(t) {
246
- return le({ allowedKeys: ["Enter"], handler: t });
245
+ function Zn(t) {
246
+ return fe({ allowedKeys: ["Enter"], handler: t });
247
247
  }
248
- function Gn(t) {
249
- return le({ allowedKeys: ["Escape"], handler: t });
248
+ function to(t) {
249
+ return fe({ allowedKeys: ["Escape"], handler: t });
250
250
  }
251
- const Z = Math.min, q = Math.max, mt = Math.round, ht = Math.floor, C = (t) => ({
251
+ const Z = Math.min, q = Math.max, gt = Math.round, dt = Math.floor, D = (t) => ({
252
252
  x: t,
253
253
  y: t
254
- }), _e = {
254
+ }), Xe = {
255
255
  left: "right",
256
256
  right: "left",
257
257
  bottom: "top",
258
258
  top: "bottom"
259
- }, Ie = {
259
+ }, Je = {
260
260
  start: "end",
261
261
  end: "start"
262
262
  };
@@ -269,56 +269,56 @@ function lt(t, e) {
269
269
  function X(t) {
270
270
  return t.split("-")[0];
271
271
  }
272
- function at(t) {
272
+ function ut(t) {
273
273
  return t.split("-")[1];
274
274
  }
275
- function ae(t) {
275
+ function he(t) {
276
276
  return t === "x" ? "y" : "x";
277
277
  }
278
- function Ct(t) {
278
+ function Nt(t) {
279
279
  return t === "y" ? "height" : "width";
280
280
  }
281
281
  function z(t) {
282
282
  return ["top", "bottom"].includes(X(t)) ? "y" : "x";
283
283
  }
284
- function Wt(t) {
285
- return ae(z(t));
284
+ function Vt(t) {
285
+ return he(z(t));
286
286
  }
287
- function je(t, e, o) {
287
+ function Ge(t, e, o) {
288
288
  o === void 0 && (o = !1);
289
- const n = at(t), s = Wt(t), r = Ct(s);
290
- let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
291
- return e.reference[r] > e.floating[r] && (i = gt(i)), [i, gt(i)];
289
+ const n = ut(t), r = Vt(t), s = Nt(r);
290
+ let i = r === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
291
+ return e.reference[s] > e.floating[s] && (i = pt(i)), [i, pt(i)];
292
292
  }
293
- function Ye(t) {
294
- const e = gt(t);
293
+ function Qe(t) {
294
+ const e = pt(t);
295
295
  return [Tt(t), e, Tt(e)];
296
296
  }
297
297
  function Tt(t) {
298
- return t.replace(/start|end/g, (e) => Ie[e]);
298
+ return t.replace(/start|end/g, (e) => Je[e]);
299
299
  }
300
- function qe(t, e, o) {
301
- const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
300
+ function Ze(t, e, o) {
301
+ const n = ["left", "right"], r = ["right", "left"], s = ["top", "bottom"], i = ["bottom", "top"];
302
302
  switch (t) {
303
303
  case "top":
304
304
  case "bottom":
305
- return o ? e ? s : n : e ? n : s;
305
+ return o ? e ? r : n : e ? n : r;
306
306
  case "left":
307
307
  case "right":
308
- return e ? r : i;
308
+ return e ? s : i;
309
309
  default:
310
310
  return [];
311
311
  }
312
312
  }
313
- function Xe(t, e, o, n) {
314
- const s = at(t);
315
- let r = qe(X(t), o === "start", n);
316
- return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(Tt)))), r;
313
+ function tn(t, e, o, n) {
314
+ const r = ut(t);
315
+ let s = Ze(X(t), o === "start", n);
316
+ return r && (s = s.map((i) => i + "-" + r), e && (s = s.concat(s.map(Tt)))), s;
317
317
  }
318
- function gt(t) {
319
- return t.replace(/left|right|bottom|top/g, (e) => _e[e]);
318
+ function pt(t) {
319
+ return t.replace(/left|right|bottom|top/g, (e) => Xe[e]);
320
320
  }
321
- function Je(t) {
321
+ function en(t) {
322
322
  return {
323
323
  top: 0,
324
324
  right: 0,
@@ -327,44 +327,44 @@ function Je(t) {
327
327
  ...t
328
328
  };
329
329
  }
330
- function ue(t) {
331
- return typeof t != "number" ? Je(t) : {
330
+ function de(t) {
331
+ return typeof t != "number" ? en(t) : {
332
332
  top: t,
333
333
  right: t,
334
334
  bottom: t,
335
335
  left: t
336
336
  };
337
337
  }
338
- function pt(t) {
338
+ function wt(t) {
339
339
  const {
340
340
  x: e,
341
341
  y: o,
342
342
  width: n,
343
- height: s
343
+ height: r
344
344
  } = t;
345
345
  return {
346
346
  width: n,
347
- height: s,
347
+ height: r,
348
348
  top: o,
349
349
  left: e,
350
350
  right: e + n,
351
- bottom: o + s,
351
+ bottom: o + r,
352
352
  x: e,
353
353
  y: o
354
354
  };
355
355
  }
356
- function Bt(t, e, o) {
356
+ function _t(t, e, o) {
357
357
  let {
358
358
  reference: n,
359
- floating: s
359
+ floating: r
360
360
  } = t;
361
- const r = z(e), i = Wt(e), c = Ct(i), l = X(e), a = r === "y", h = n.x + n.width / 2 - s.width / 2, f = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
361
+ const s = z(e), i = Vt(e), c = Nt(i), a = X(e), l = s === "y", h = n.x + n.width / 2 - r.width / 2, f = n.y + n.height / 2 - r.height / 2, m = n[c] / 2 - r[c] / 2;
362
362
  let u;
363
- switch (l) {
363
+ switch (a) {
364
364
  case "top":
365
365
  u = {
366
366
  x: h,
367
- y: n.y - s.height
367
+ y: n.y - r.height
368
368
  };
369
369
  break;
370
370
  case "bottom":
@@ -381,7 +381,7 @@ function Bt(t, e, o) {
381
381
  break;
382
382
  case "left":
383
383
  u = {
384
- x: n.x - s.width,
384
+ x: n.x - r.width,
385
385
  y: f
386
386
  };
387
387
  break;
@@ -391,31 +391,31 @@ function Bt(t, e, o) {
391
391
  y: n.y
392
392
  };
393
393
  }
394
- switch (at(e)) {
394
+ switch (ut(e)) {
395
395
  case "start":
396
- u[i] -= m * (o && a ? -1 : 1);
396
+ u[i] -= m * (o && l ? -1 : 1);
397
397
  break;
398
398
  case "end":
399
- u[i] += m * (o && a ? -1 : 1);
399
+ u[i] += m * (o && l ? -1 : 1);
400
400
  break;
401
401
  }
402
402
  return u;
403
403
  }
404
- const Ge = async (t, e, o) => {
404
+ const nn = async (t, e, o) => {
405
405
  const {
406
406
  placement: n = "bottom",
407
- strategy: s = "absolute",
408
- middleware: r = [],
407
+ strategy: r = "absolute",
408
+ middleware: s = [],
409
409
  platform: i
410
- } = o, c = r.filter(Boolean), l = await (i.isRTL == null ? void 0 : i.isRTL(e));
411
- let a = await i.getElementRects({
410
+ } = o, c = s.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(e));
411
+ let l = await i.getElementRects({
412
412
  reference: t,
413
413
  floating: e,
414
- strategy: s
414
+ strategy: r
415
415
  }), {
416
416
  x: h,
417
417
  y: f
418
- } = Bt(a, n, l), m = n, u = {}, d = 0;
418
+ } = _t(l, n, a), m = n, u = {}, d = 0;
419
419
  for (let p = 0; p < c.length; p++) {
420
420
  const {
421
421
  name: w,
@@ -430,9 +430,9 @@ const Ge = async (t, e, o) => {
430
430
  y: f,
431
431
  initialPlacement: n,
432
432
  placement: m,
433
- strategy: s,
433
+ strategy: r,
434
434
  middlewareData: u,
435
- rects: a,
435
+ rects: l,
436
436
  platform: i,
437
437
  elements: {
438
438
  reference: t,
@@ -445,60 +445,60 @@ const Ge = async (t, e, o) => {
445
445
  ...u[w],
446
446
  ...b
447
447
  }
448
- }, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (a = v.rects === !0 ? await i.getElementRects({
448
+ }, v && d <= 50 && (d++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (l = v.rects === !0 ? await i.getElementRects({
449
449
  reference: t,
450
450
  floating: e,
451
- strategy: s
451
+ strategy: r
452
452
  }) : v.rects), {
453
453
  x: h,
454
454
  y: f
455
- } = Bt(a, m, l)), p = -1);
455
+ } = _t(l, m, a)), p = -1);
456
456
  }
457
457
  return {
458
458
  x: h,
459
459
  y: f,
460
460
  placement: m,
461
- strategy: s,
461
+ strategy: r,
462
462
  middlewareData: u
463
463
  };
464
464
  };
465
- async function fe(t, e) {
465
+ async function me(t, e) {
466
466
  var o;
467
467
  e === void 0 && (e = {});
468
468
  const {
469
469
  x: n,
470
- y: s,
471
- platform: r,
470
+ y: r,
471
+ platform: s,
472
472
  rects: i,
473
473
  elements: c,
474
- strategy: l
474
+ strategy: a
475
475
  } = t, {
476
- boundary: a = "clippingAncestors",
476
+ boundary: l = "clippingAncestors",
477
477
  rootBoundary: h = "viewport",
478
478
  elementContext: f = "floating",
479
479
  altBoundary: m = !1,
480
480
  padding: u = 0
481
- } = lt(e, t), d = ue(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = pt(await r.getClippingRect({
482
- element: (o = await (r.isElement == null ? void 0 : r.isElement(w))) == null || o ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
483
- boundary: a,
481
+ } = lt(e, t), d = de(u), w = c[m ? f === "floating" ? "reference" : "floating" : f], g = wt(await s.getClippingRect({
482
+ element: (o = await (s.isElement == null ? void 0 : s.isElement(w))) == null || o ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
483
+ boundary: l,
484
484
  rootBoundary: h,
485
- strategy: l
485
+ strategy: a
486
486
  })), x = f === "floating" ? {
487
487
  x: n,
488
- y: s,
488
+ y: r,
489
489
  width: i.floating.width,
490
490
  height: i.floating.height
491
- } : i.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
491
+ } : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), b = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
492
492
  x: 1,
493
493
  y: 1
494
494
  } : {
495
495
  x: 1,
496
496
  y: 1
497
- }, v = pt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
497
+ }, v = wt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
498
498
  elements: c,
499
499
  rect: x,
500
500
  offsetParent: y,
501
- strategy: l
501
+ strategy: a
502
502
  }) : x);
503
503
  return {
504
504
  top: (g.top - v.top + d.top) / b.y,
@@ -507,56 +507,56 @@ async function fe(t, e) {
507
507
  right: (v.right - g.right + d.right) / b.x
508
508
  };
509
509
  }
510
- const Qe = (t) => ({
510
+ const on = (t) => ({
511
511
  name: "arrow",
512
512
  options: t,
513
513
  async fn(e) {
514
514
  const {
515
515
  x: o,
516
516
  y: n,
517
- placement: s,
518
- rects: r,
517
+ placement: r,
518
+ rects: s,
519
519
  platform: i,
520
520
  elements: c,
521
- middlewareData: l
521
+ middlewareData: a
522
522
  } = e, {
523
- element: a,
523
+ element: l,
524
524
  padding: h = 0
525
525
  } = lt(t, e) || {};
526
- if (a == null)
526
+ if (l == null)
527
527
  return {};
528
- const f = ue(h), m = {
528
+ const f = de(h), m = {
529
529
  x: o,
530
530
  y: n
531
- }, u = Wt(s), d = Ct(u), p = await i.getDimensions(a), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[d] + r.reference[u] - m[u] - r.floating[d], v = m[u] - r.reference[u], L = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a));
532
- let A = L ? L[y] : 0;
533
- (!A || !await (i.isElement == null ? void 0 : i.isElement(L))) && (A = c.floating[y] || r.floating[d]);
534
- const _ = b / 2 - v / 2, V = A / 2 - p[d] / 2 - 1, S = Z(f[g], V), I = Z(f[x], V), j = S, nt = A - p[d] - I, O = A / 2 - p[d] / 2 + _, Y = St(j, O, nt), N = !l.arrow && at(s) != null && O !== Y && r.reference[d] / 2 - (O < j ? S : I) - p[d] / 2 < 0, T = N ? O < j ? O - j : O - nt : 0;
531
+ }, u = Vt(r), d = Nt(u), p = await i.getDimensions(l), w = u === "y", g = w ? "top" : "left", x = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = s.reference[d] + s.reference[u] - m[u] - s.floating[d], v = m[u] - s.reference[u], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
532
+ let R = P ? P[y] : 0;
533
+ (!R || !await (i.isElement == null ? void 0 : i.isElement(P))) && (R = c.floating[y] || s.floating[d]);
534
+ const _ = b / 2 - v / 2, V = R / 2 - p[d] / 2 - 1, L = Z(f[g], V), j = Z(f[x], V), I = L, nt = R - p[d] - j, A = R / 2 - p[d] / 2 + _, Y = St(I, A, nt), $ = !a.arrow && ut(r) != null && A !== Y && s.reference[d] / 2 - (A < I ? L : j) - p[d] / 2 < 0, S = $ ? A < I ? A - I : A - nt : 0;
535
535
  return {
536
- [u]: m[u] + T,
536
+ [u]: m[u] + S,
537
537
  data: {
538
538
  [u]: Y,
539
- centerOffset: O - Y - T,
540
- ...N && {
541
- alignmentOffset: T
539
+ centerOffset: A - Y - S,
540
+ ...$ && {
541
+ alignmentOffset: S
542
542
  }
543
543
  },
544
- reset: N
544
+ reset: $
545
545
  };
546
546
  }
547
- }), Ze = function(t) {
547
+ }), rn = function(t) {
548
548
  return t === void 0 && (t = {}), {
549
549
  name: "flip",
550
550
  options: t,
551
551
  async fn(e) {
552
552
  var o, n;
553
553
  const {
554
- placement: s,
555
- middlewareData: r,
554
+ placement: r,
555
+ middlewareData: s,
556
556
  rects: i,
557
557
  initialPlacement: c,
558
- platform: l,
559
- elements: a
558
+ platform: a,
559
+ elements: l
560
560
  } = e, {
561
561
  mainAxis: h = !0,
562
562
  crossAxis: f = !0,
@@ -566,59 +566,59 @@ const Qe = (t) => ({
566
566
  flipAlignment: p = !0,
567
567
  ...w
568
568
  } = lt(t, e);
569
- if ((o = r.arrow) != null && o.alignmentOffset)
569
+ if ((o = s.arrow) != null && o.alignmentOffset)
570
570
  return {};
571
- const g = X(s), x = z(c), y = X(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), v = m || (y || !p ? [gt(c)] : Ye(c)), L = d !== "none";
572
- !m && L && v.push(...Xe(c, p, d, b));
573
- const A = [c, ...v], _ = await fe(e, w), V = [];
574
- let S = ((n = r.flip) == null ? void 0 : n.overflows) || [];
571
+ const g = X(r), x = z(c), y = X(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (y || !p ? [pt(c)] : Qe(c)), P = d !== "none";
572
+ !m && P && v.push(...tn(c, p, d, b));
573
+ const R = [c, ...v], _ = await me(e, w), V = [];
574
+ let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
575
575
  if (h && V.push(_[g]), f) {
576
- const O = je(s, i, b);
577
- V.push(_[O[0]], _[O[1]]);
576
+ const A = Ge(r, i, b);
577
+ V.push(_[A[0]], _[A[1]]);
578
578
  }
579
- if (S = [...S, {
580
- placement: s,
579
+ if (L = [...L, {
580
+ placement: r,
581
581
  overflows: V
582
- }], !V.every((O) => O <= 0)) {
583
- var I, j;
584
- const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, Y = A[O];
582
+ }], !V.every((A) => A <= 0)) {
583
+ var j, I;
584
+ const A = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, Y = R[A];
585
585
  if (Y && (!(f === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
586
586
  // overflows the main axis.
587
- S.every((P) => P.overflows[0] > 0 && z(P.placement) === x)))
587
+ L.every((T) => T.overflows[0] > 0 && z(T.placement) === x)))
588
588
  return {
589
589
  data: {
590
- index: O,
591
- overflows: S
590
+ index: A,
591
+ overflows: L
592
592
  },
593
593
  reset: {
594
594
  placement: Y
595
595
  }
596
596
  };
597
- let N = (j = S.filter((T) => T.overflows[0] <= 0).sort((T, P) => T.overflows[1] - P.overflows[1])[0]) == null ? void 0 : j.placement;
598
- if (!N)
597
+ let $ = (I = L.filter((S) => S.overflows[0] <= 0).sort((S, T) => S.overflows[1] - T.overflows[1])[0]) == null ? void 0 : I.placement;
598
+ if (!$)
599
599
  switch (u) {
600
600
  case "bestFit": {
601
601
  var nt;
602
- const T = (nt = S.filter((P) => {
603
- if (L) {
604
- const B = z(P.placement);
602
+ const S = (nt = L.filter((T) => {
603
+ if (P) {
604
+ const B = z(T.placement);
605
605
  return B === x || // Create a bias to the `y` side axis due to horizontal
606
606
  // reading directions favoring greater width.
607
607
  B === "y";
608
608
  }
609
609
  return !0;
610
- }).map((P) => [P.placement, P.overflows.filter((B) => B > 0).reduce((B, ve) => B + ve, 0)]).sort((P, B) => P[1] - B[1])[0]) == null ? void 0 : nt[0];
611
- T && (N = T);
610
+ }).map((T) => [T.placement, T.overflows.filter((B) => B > 0).reduce((B, Ee) => B + Ee, 0)]).sort((T, B) => T[1] - B[1])[0]) == null ? void 0 : nt[0];
611
+ S && ($ = S);
612
612
  break;
613
613
  }
614
614
  case "initialPlacement":
615
- N = c;
615
+ $ = c;
616
616
  break;
617
617
  }
618
- if (s !== N)
618
+ if (r !== $)
619
619
  return {
620
620
  reset: {
621
- placement: N
621
+ placement: $
622
622
  }
623
623
  };
624
624
  }
@@ -626,12 +626,12 @@ const Qe = (t) => ({
626
626
  }
627
627
  };
628
628
  };
629
- async function tn(t, e) {
629
+ async function sn(t, e) {
630
630
  const {
631
631
  placement: o,
632
632
  platform: n,
633
- elements: s
634
- } = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = X(o), c = at(o), l = z(o) === "y", a = ["left", "top"].includes(i) ? -1 : 1, h = r && l ? -1 : 1, f = lt(e, t);
633
+ elements: r
634
+ } = t, s = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), i = X(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, h = s && a ? -1 : 1, f = lt(e, t);
635
635
  let {
636
636
  mainAxis: m,
637
637
  crossAxis: u,
@@ -645,37 +645,37 @@ async function tn(t, e) {
645
645
  crossAxis: f.crossAxis || 0,
646
646
  alignmentAxis: f.alignmentAxis
647
647
  };
648
- return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), l ? {
648
+ return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
649
649
  x: u * h,
650
- y: m * a
650
+ y: m * l
651
651
  } : {
652
- x: m * a,
652
+ x: m * l,
653
653
  y: u * h
654
654
  };
655
655
  }
656
- const en = function(t) {
656
+ const cn = function(t) {
657
657
  return t === void 0 && (t = 0), {
658
658
  name: "offset",
659
659
  options: t,
660
660
  async fn(e) {
661
661
  var o, n;
662
662
  const {
663
- x: s,
664
- y: r,
663
+ x: r,
664
+ y: s,
665
665
  placement: i,
666
666
  middlewareData: c
667
- } = e, l = await tn(e, t);
667
+ } = e, a = await sn(e, t);
668
668
  return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
669
- x: s + l.x,
670
- y: r + l.y,
669
+ x: r + a.x,
670
+ y: s + a.y,
671
671
  data: {
672
- ...l,
672
+ ...a,
673
673
  placement: i
674
674
  }
675
675
  };
676
676
  }
677
677
  };
678
- }, nn = function(t) {
678
+ }, an = function(t) {
679
679
  return t === void 0 && (t = {}), {
680
680
  name: "shift",
681
681
  options: t,
@@ -683,9 +683,9 @@ const en = function(t) {
683
683
  const {
684
684
  x: o,
685
685
  y: n,
686
- placement: s
686
+ placement: r
687
687
  } = e, {
688
- mainAxis: r = !0,
688
+ mainAxis: s = !0,
689
689
  crossAxis: i = !1,
690
690
  limiter: c = {
691
691
  fn: (w) => {
@@ -699,13 +699,13 @@ const en = function(t) {
699
699
  };
700
700
  }
701
701
  },
702
- ...l
703
- } = lt(t, e), a = {
702
+ ...a
703
+ } = lt(t, e), l = {
704
704
  x: o,
705
705
  y: n
706
- }, h = await fe(e, l), f = z(X(s)), m = ae(f);
707
- let u = a[m], d = a[f];
708
- if (r) {
706
+ }, h = await me(e, a), f = z(X(r)), m = he(f);
707
+ let u = l[m], d = l[f];
708
+ if (s) {
709
709
  const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + h[w], y = u - h[g];
710
710
  u = St(x, u, y);
711
711
  }
@@ -724,7 +724,7 @@ const en = function(t) {
724
724
  x: p.x - o,
725
725
  y: p.y - n,
726
726
  enabled: {
727
- [m]: r,
727
+ [m]: s,
728
728
  [f]: i
729
729
  }
730
730
  }
@@ -732,45 +732,45 @@ const en = function(t) {
732
732
  }
733
733
  };
734
734
  };
735
- function yt() {
735
+ function xt() {
736
736
  return typeof window < "u";
737
737
  }
738
738
  function et(t) {
739
- return he(t) ? (t.nodeName || "").toLowerCase() : "#document";
739
+ return ge(t) ? (t.nodeName || "").toLowerCase() : "#document";
740
740
  }
741
- function R(t) {
741
+ function O(t) {
742
742
  var e;
743
743
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
744
744
  }
745
- function M(t) {
745
+ function N(t) {
746
746
  var e;
747
- return (e = (he(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
747
+ return (e = (ge(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
748
748
  }
749
- function he(t) {
750
- return yt() ? t instanceof Node || t instanceof R(t).Node : !1;
749
+ function ge(t) {
750
+ return xt() ? t instanceof Node || t instanceof O(t).Node : !1;
751
751
  }
752
752
  function k(t) {
753
- return yt() ? t instanceof Element || t instanceof R(t).Element : !1;
753
+ return xt() ? t instanceof Element || t instanceof O(t).Element : !1;
754
754
  }
755
755
  function W(t) {
756
- return yt() ? t instanceof HTMLElement || t instanceof R(t).HTMLElement : !1;
756
+ return xt() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
757
757
  }
758
- function Ut(t) {
759
- return !yt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof R(t).ShadowRoot;
758
+ function jt(t) {
759
+ return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
760
760
  }
761
- function ut(t) {
761
+ function ft(t) {
762
762
  const {
763
763
  overflow: e,
764
764
  overflowX: o,
765
765
  overflowY: n,
766
- display: s
767
- } = D(t);
768
- return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
766
+ display: r
767
+ } = C(t);
768
+ return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(r);
769
769
  }
770
- function on(t) {
770
+ function ln(t) {
771
771
  return ["table", "td", "th"].includes(et(t));
772
772
  }
773
- function xt(t) {
773
+ function vt(t) {
774
774
  return [":popover-open", ":modal"].some((e) => {
775
775
  try {
776
776
  return t.matches(e);
@@ -779,31 +779,31 @@ function xt(t) {
779
779
  }
780
780
  });
781
781
  }
782
- function Ft(t) {
783
- const e = Mt(), o = k(t) ? D(t) : t;
782
+ function $t(t) {
783
+ const e = Ht(), o = k(t) ? C(t) : t;
784
784
  return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
785
785
  }
786
- function sn(t) {
786
+ function un(t) {
787
787
  let e = K(t);
788
788
  for (; W(e) && !tt(e); ) {
789
- if (Ft(e))
789
+ if ($t(e))
790
790
  return e;
791
- if (xt(e))
791
+ if (vt(e))
792
792
  return null;
793
793
  e = K(e);
794
794
  }
795
795
  return null;
796
796
  }
797
- function Mt() {
797
+ function Ht() {
798
798
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
799
799
  }
800
800
  function tt(t) {
801
801
  return ["html", "body", "#document"].includes(et(t));
802
802
  }
803
- function D(t) {
804
- return R(t).getComputedStyle(t);
803
+ function C(t) {
804
+ return O(t).getComputedStyle(t);
805
805
  }
806
- function vt(t) {
806
+ function bt(t) {
807
807
  return k(t) ? {
808
808
  scrollLeft: t.scrollLeft,
809
809
  scrollTop: t.scrollTop
@@ -819,250 +819,250 @@ function K(t) {
819
819
  // Step into the shadow DOM of the parent of a slotted node.
820
820
  t.assignedSlot || // DOM Element detected.
821
821
  t.parentNode || // ShadowRoot detected.
822
- Ut(t) && t.host || // Fallback.
823
- M(t)
822
+ jt(t) && t.host || // Fallback.
823
+ N(t)
824
824
  );
825
- return Ut(e) ? e.host : e;
825
+ return jt(e) ? e.host : e;
826
826
  }
827
- function de(t) {
827
+ function pe(t) {
828
828
  const e = K(t);
829
- return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ut(e) ? e : de(e);
829
+ return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ft(e) ? e : pe(e);
830
830
  }
831
- function rt(t, e, o) {
831
+ function it(t, e, o) {
832
832
  var n;
833
833
  e === void 0 && (e = []), o === void 0 && (o = !0);
834
- const s = de(t), r = s === ((n = t.ownerDocument) == null ? void 0 : n.body), i = R(s);
835
- if (r) {
836
- const c = Pt(i);
837
- return e.concat(i, i.visualViewport || [], ut(s) ? s : [], c && o ? rt(c) : []);
834
+ const r = pe(t), s = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = O(r);
835
+ if (s) {
836
+ const c = kt(i);
837
+ return e.concat(i, i.visualViewport || [], ft(r) ? r : [], c && o ? it(c) : []);
838
838
  }
839
- return e.concat(s, rt(s, [], o));
839
+ return e.concat(r, it(r, [], o));
840
840
  }
841
- function Pt(t) {
841
+ function kt(t) {
842
842
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
843
843
  }
844
- function me(t) {
845
- const e = D(t);
844
+ function we(t) {
845
+ const e = C(t);
846
846
  let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
847
- const s = W(t), r = s ? t.offsetWidth : o, i = s ? t.offsetHeight : n, c = mt(o) !== r || mt(n) !== i;
848
- return c && (o = r, n = i), {
847
+ const r = W(t), s = r ? t.offsetWidth : o, i = r ? t.offsetHeight : n, c = gt(o) !== s || gt(n) !== i;
848
+ return c && (o = s, n = i), {
849
849
  width: o,
850
850
  height: n,
851
851
  $: c
852
852
  };
853
853
  }
854
- function Vt(t) {
854
+ function Bt(t) {
855
855
  return k(t) ? t : t.contextElement;
856
856
  }
857
857
  function Q(t) {
858
- const e = Vt(t);
858
+ const e = Bt(t);
859
859
  if (!W(e))
860
- return C(1);
860
+ return D(1);
861
861
  const o = e.getBoundingClientRect(), {
862
862
  width: n,
863
- height: s,
864
- $: r
865
- } = me(e);
866
- let i = (r ? mt(o.width) : o.width) / n, c = (r ? mt(o.height) : o.height) / s;
863
+ height: r,
864
+ $: s
865
+ } = we(e);
866
+ let i = (s ? gt(o.width) : o.width) / n, c = (s ? gt(o.height) : o.height) / r;
867
867
  return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
868
868
  x: i,
869
869
  y: c
870
870
  };
871
871
  }
872
- const rn = /* @__PURE__ */ C(0);
873
- function ge(t) {
874
- const e = R(t);
875
- return !Mt() || !e.visualViewport ? rn : {
872
+ const fn = /* @__PURE__ */ D(0);
873
+ function ye(t) {
874
+ const e = O(t);
875
+ return !Ht() || !e.visualViewport ? fn : {
876
876
  x: e.visualViewport.offsetLeft,
877
877
  y: e.visualViewport.offsetTop
878
878
  };
879
879
  }
880
- function cn(t, e, o) {
881
- return e === void 0 && (e = !1), !o || e && o !== R(t) ? !1 : e;
880
+ function hn(t, e, o) {
881
+ return e === void 0 && (e = !1), !o || e && o !== O(t) ? !1 : e;
882
882
  }
883
883
  function J(t, e, o, n) {
884
884
  e === void 0 && (e = !1), o === void 0 && (o = !1);
885
- const s = t.getBoundingClientRect(), r = Vt(t);
886
- let i = C(1);
885
+ const r = t.getBoundingClientRect(), s = Bt(t);
886
+ let i = D(1);
887
887
  e && (n ? k(n) && (i = Q(n)) : i = Q(t));
888
- const c = cn(r, o, n) ? ge(r) : C(0);
889
- let l = (s.left + c.x) / i.x, a = (s.top + c.y) / i.y, h = s.width / i.x, f = s.height / i.y;
890
- if (r) {
891
- const m = R(r), u = n && k(n) ? R(n) : n;
892
- let d = m, p = Pt(d);
888
+ const c = hn(s, o, n) ? ye(s) : D(0);
889
+ let a = (r.left + c.x) / i.x, l = (r.top + c.y) / i.y, h = r.width / i.x, f = r.height / i.y;
890
+ if (s) {
891
+ const m = O(s), u = n && k(n) ? O(n) : n;
892
+ let d = m, p = kt(d);
893
893
  for (; p && n && u !== d; ) {
894
- const w = Q(p), g = p.getBoundingClientRect(), x = D(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
895
- l *= w.x, a *= w.y, h *= w.x, f *= w.y, l += y, a += b, d = R(p), p = Pt(d);
894
+ const w = Q(p), g = p.getBoundingClientRect(), x = C(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
895
+ a *= w.x, l *= w.y, h *= w.x, f *= w.y, a += y, l += b, d = O(p), p = kt(d);
896
896
  }
897
897
  }
898
- return pt({
898
+ return wt({
899
899
  width: h,
900
900
  height: f,
901
- x: l,
902
- y: a
901
+ x: a,
902
+ y: l
903
903
  });
904
904
  }
905
- function Nt(t, e) {
906
- const o = vt(t).scrollLeft;
907
- return e ? e.left + o : J(M(t)).left + o;
905
+ function Ut(t, e) {
906
+ const o = bt(t).scrollLeft;
907
+ return e ? e.left + o : J(N(t)).left + o;
908
908
  }
909
- function pe(t, e, o) {
909
+ function xe(t, e, o) {
910
910
  o === void 0 && (o = !1);
911
- const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
911
+ const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - (o ? 0 : (
912
912
  // RTL <body> scrollbar.
913
- Nt(t, n)
914
- )), r = n.top + e.scrollTop;
913
+ Ut(t, n)
914
+ )), s = n.top + e.scrollTop;
915
915
  return {
916
- x: s,
917
- y: r
916
+ x: r,
917
+ y: s
918
918
  };
919
919
  }
920
- function ln(t) {
920
+ function dn(t) {
921
921
  let {
922
922
  elements: e,
923
923
  rect: o,
924
924
  offsetParent: n,
925
- strategy: s
925
+ strategy: r
926
926
  } = t;
927
- const r = s === "fixed", i = M(n), c = e ? xt(e.floating) : !1;
928
- if (n === i || c && r)
927
+ const s = r === "fixed", i = N(n), c = e ? vt(e.floating) : !1;
928
+ if (n === i || c && s)
929
929
  return o;
930
- let l = {
930
+ let a = {
931
931
  scrollLeft: 0,
932
932
  scrollTop: 0
933
- }, a = C(1);
934
- const h = C(0), f = W(n);
935
- if ((f || !f && !r) && ((et(n) !== "body" || ut(i)) && (l = vt(n)), W(n))) {
933
+ }, l = D(1);
934
+ const h = D(0), f = W(n);
935
+ if ((f || !f && !s) && ((et(n) !== "body" || ft(i)) && (a = bt(n)), W(n))) {
936
936
  const u = J(n);
937
- a = Q(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
937
+ l = Q(n), h.x = u.x + n.clientLeft, h.y = u.y + n.clientTop;
938
938
  }
939
- const m = i && !f && !r ? pe(i, l, !0) : C(0);
939
+ const m = i && !f && !s ? xe(i, a, !0) : D(0);
940
940
  return {
941
- width: o.width * a.x,
942
- height: o.height * a.y,
943
- x: o.x * a.x - l.scrollLeft * a.x + h.x + m.x,
944
- y: o.y * a.y - l.scrollTop * a.y + h.y + m.y
941
+ width: o.width * l.x,
942
+ height: o.height * l.y,
943
+ x: o.x * l.x - a.scrollLeft * l.x + h.x + m.x,
944
+ y: o.y * l.y - a.scrollTop * l.y + h.y + m.y
945
945
  };
946
946
  }
947
- function an(t) {
947
+ function mn(t) {
948
948
  return Array.from(t.getClientRects());
949
949
  }
950
- function un(t) {
951
- const e = M(t), o = vt(t), n = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
952
- let i = -o.scrollLeft + Nt(t);
950
+ function gn(t) {
951
+ const e = N(t), o = bt(t), n = t.ownerDocument.body, r = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
952
+ let i = -o.scrollLeft + Ut(t);
953
953
  const c = -o.scrollTop;
954
- return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
955
- width: s,
956
- height: r,
954
+ return C(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - r), {
955
+ width: r,
956
+ height: s,
957
957
  x: i,
958
958
  y: c
959
959
  };
960
960
  }
961
- function fn(t, e) {
962
- const o = R(t), n = M(t), s = o.visualViewport;
963
- let r = n.clientWidth, i = n.clientHeight, c = 0, l = 0;
964
- if (s) {
965
- r = s.width, i = s.height;
966
- const a = Mt();
967
- (!a || a && e === "fixed") && (c = s.offsetLeft, l = s.offsetTop);
961
+ function pn(t, e) {
962
+ const o = O(t), n = N(t), r = o.visualViewport;
963
+ let s = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
964
+ if (r) {
965
+ s = r.width, i = r.height;
966
+ const l = Ht();
967
+ (!l || l && e === "fixed") && (c = r.offsetLeft, a = r.offsetTop);
968
968
  }
969
969
  return {
970
- width: r,
970
+ width: s,
971
971
  height: i,
972
972
  x: c,
973
- y: l
973
+ y: a
974
974
  };
975
975
  }
976
- function hn(t, e) {
977
- const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = W(t) ? Q(t) : C(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, l = s * r.x, a = n * r.y;
976
+ function wn(t, e) {
977
+ const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, r = o.left + t.clientLeft, s = W(t) ? Q(t) : D(1), i = t.clientWidth * s.x, c = t.clientHeight * s.y, a = r * s.x, l = n * s.y;
978
978
  return {
979
979
  width: i,
980
980
  height: c,
981
- x: l,
982
- y: a
981
+ x: a,
982
+ y: l
983
983
  };
984
984
  }
985
- function zt(t, e, o) {
985
+ function It(t, e, o) {
986
986
  let n;
987
987
  if (e === "viewport")
988
- n = fn(t, o);
988
+ n = pn(t, o);
989
989
  else if (e === "document")
990
- n = un(M(t));
990
+ n = gn(N(t));
991
991
  else if (k(e))
992
- n = hn(e, o);
992
+ n = wn(e, o);
993
993
  else {
994
- const s = ge(t);
994
+ const r = ye(t);
995
995
  n = {
996
- x: e.x - s.x,
997
- y: e.y - s.y,
996
+ x: e.x - r.x,
997
+ y: e.y - r.y,
998
998
  width: e.width,
999
999
  height: e.height
1000
1000
  };
1001
1001
  }
1002
- return pt(n);
1002
+ return wt(n);
1003
1003
  }
1004
- function we(t, e) {
1004
+ function ve(t, e) {
1005
1005
  const o = K(t);
1006
- return o === e || !k(o) || tt(o) ? !1 : D(o).position === "fixed" || we(o, e);
1006
+ return o === e || !k(o) || tt(o) ? !1 : C(o).position === "fixed" || ve(o, e);
1007
1007
  }
1008
- function dn(t, e) {
1008
+ function yn(t, e) {
1009
1009
  const o = e.get(t);
1010
1010
  if (o)
1011
1011
  return o;
1012
- let n = rt(t, [], !1).filter((c) => k(c) && et(c) !== "body"), s = null;
1013
- const r = D(t).position === "fixed";
1014
- let i = r ? K(t) : t;
1012
+ let n = it(t, [], !1).filter((c) => k(c) && et(c) !== "body"), r = null;
1013
+ const s = C(t).position === "fixed";
1014
+ let i = s ? K(t) : t;
1015
1015
  for (; k(i) && !tt(i); ) {
1016
- const c = D(i), l = Ft(i);
1017
- !l && c.position === "fixed" && (s = null), (r ? !l && !s : !l && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ut(i) && !l && we(t, i)) ? n = n.filter((h) => h !== i) : s = c, i = K(i);
1016
+ const c = C(i), a = $t(i);
1017
+ !a && c.position === "fixed" && (r = null), (s ? !a && !r : !a && c.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || ft(i) && !a && ve(t, i)) ? n = n.filter((h) => h !== i) : r = c, i = K(i);
1018
1018
  }
1019
1019
  return e.set(t, n), n;
1020
1020
  }
1021
- function mn(t) {
1021
+ function xn(t) {
1022
1022
  let {
1023
1023
  element: e,
1024
1024
  boundary: o,
1025
1025
  rootBoundary: n,
1026
- strategy: s
1026
+ strategy: r
1027
1027
  } = t;
1028
- const i = [...o === "clippingAncestors" ? xt(e) ? [] : dn(e, this._c) : [].concat(o), n], c = i[0], l = i.reduce((a, h) => {
1029
- const f = zt(e, h, s);
1030
- return a.top = q(f.top, a.top), a.right = Z(f.right, a.right), a.bottom = Z(f.bottom, a.bottom), a.left = q(f.left, a.left), a;
1031
- }, zt(e, c, s));
1028
+ const i = [...o === "clippingAncestors" ? vt(e) ? [] : yn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, h) => {
1029
+ const f = It(e, h, r);
1030
+ return l.top = q(f.top, l.top), l.right = Z(f.right, l.right), l.bottom = Z(f.bottom, l.bottom), l.left = q(f.left, l.left), l;
1031
+ }, It(e, c, r));
1032
1032
  return {
1033
- width: l.right - l.left,
1034
- height: l.bottom - l.top,
1035
- x: l.left,
1036
- y: l.top
1033
+ width: a.right - a.left,
1034
+ height: a.bottom - a.top,
1035
+ x: a.left,
1036
+ y: a.top
1037
1037
  };
1038
1038
  }
1039
- function gn(t) {
1039
+ function vn(t) {
1040
1040
  const {
1041
1041
  width: e,
1042
1042
  height: o
1043
- } = me(t);
1043
+ } = we(t);
1044
1044
  return {
1045
1045
  width: e,
1046
1046
  height: o
1047
1047
  };
1048
1048
  }
1049
- function pn(t, e, o) {
1050
- const n = W(e), s = M(e), r = o === "fixed", i = J(t, !0, r, e);
1049
+ function bn(t, e, o) {
1050
+ const n = W(e), r = N(e), s = o === "fixed", i = J(t, !0, s, e);
1051
1051
  let c = {
1052
1052
  scrollLeft: 0,
1053
1053
  scrollTop: 0
1054
1054
  };
1055
- const l = C(0);
1056
- function a() {
1057
- l.x = Nt(s);
1055
+ const a = D(0);
1056
+ function l() {
1057
+ a.x = Ut(r);
1058
1058
  }
1059
- if (n || !n && !r)
1060
- if ((et(e) !== "body" || ut(s)) && (c = vt(e)), n) {
1061
- const u = J(e, !0, r, e);
1062
- l.x = u.x + e.clientLeft, l.y = u.y + e.clientTop;
1063
- } else s && a();
1064
- r && !n && s && a();
1065
- const h = s && !n && !r ? pe(s, c) : C(0), f = i.left + c.scrollLeft - l.x - h.x, m = i.top + c.scrollTop - l.y - h.y;
1059
+ if (n || !n && !s)
1060
+ if ((et(e) !== "body" || ft(r)) && (c = bt(e)), n) {
1061
+ const u = J(e, !0, s, e);
1062
+ a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
1063
+ } else r && l();
1064
+ s && !n && r && l();
1065
+ const h = r && !n && !s ? xe(r, c) : D(0), f = i.left + c.scrollLeft - a.x - h.x, m = i.top + c.scrollTop - a.y - h.y;
1066
1066
  return {
1067
1067
  x: f,
1068
1068
  y: m,
@@ -1071,38 +1071,38 @@ function pn(t, e, o) {
1071
1071
  };
1072
1072
  }
1073
1073
  function Ot(t) {
1074
- return D(t).position === "static";
1074
+ return C(t).position === "static";
1075
1075
  }
1076
- function Kt(t, e) {
1077
- if (!W(t) || D(t).position === "fixed")
1076
+ function Yt(t, e) {
1077
+ if (!W(t) || C(t).position === "fixed")
1078
1078
  return null;
1079
1079
  if (e)
1080
1080
  return e(t);
1081
1081
  let o = t.offsetParent;
1082
- return M(t) === o && (o = o.ownerDocument.body), o;
1082
+ return N(t) === o && (o = o.ownerDocument.body), o;
1083
1083
  }
1084
- function ye(t, e) {
1085
- const o = R(t);
1086
- if (xt(t))
1084
+ function be(t, e) {
1085
+ const o = O(t);
1086
+ if (vt(t))
1087
1087
  return o;
1088
1088
  if (!W(t)) {
1089
- let s = K(t);
1090
- for (; s && !tt(s); ) {
1091
- if (k(s) && !Ot(s))
1092
- return s;
1093
- s = K(s);
1089
+ let r = K(t);
1090
+ for (; r && !tt(r); ) {
1091
+ if (k(r) && !Ot(r))
1092
+ return r;
1093
+ r = K(r);
1094
1094
  }
1095
1095
  return o;
1096
1096
  }
1097
- let n = Kt(t, e);
1098
- for (; n && on(n) && Ot(n); )
1099
- n = Kt(n, e);
1100
- return n && tt(n) && Ot(n) && !Ft(n) ? o : n || sn(t) || o;
1097
+ let n = Yt(t, e);
1098
+ for (; n && ln(n) && Ot(n); )
1099
+ n = Yt(n, e);
1100
+ return n && tt(n) && Ot(n) && !$t(n) ? o : n || un(t) || o;
1101
1101
  }
1102
- const wn = async function(t) {
1103
- const e = this.getOffsetParent || ye, o = this.getDimensions, n = await o(t.floating);
1102
+ const Rn = async function(t) {
1103
+ const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
1104
1104
  return {
1105
- reference: pn(t.reference, await e(t.floating), t.strategy),
1105
+ reference: bn(t.reference, await e(t.floating), t.strategy),
1106
1106
  floating: {
1107
1107
  x: 0,
1108
1108
  y: 0,
@@ -1111,119 +1111,119 @@ const wn = async function(t) {
1111
1111
  }
1112
1112
  };
1113
1113
  };
1114
- function yn(t) {
1115
- return D(t).direction === "rtl";
1116
- }
1117
- const xn = {
1118
- convertOffsetParentRelativeRectToViewportRelativeRect: ln,
1119
- getDocumentElement: M,
1120
- getClippingRect: mn,
1121
- getOffsetParent: ye,
1122
- getElementRects: wn,
1123
- getClientRects: an,
1124
- getDimensions: gn,
1114
+ function An(t) {
1115
+ return C(t).direction === "rtl";
1116
+ }
1117
+ const On = {
1118
+ convertOffsetParentRelativeRectToViewportRelativeRect: dn,
1119
+ getDocumentElement: N,
1120
+ getClippingRect: xn,
1121
+ getOffsetParent: be,
1122
+ getElementRects: Rn,
1123
+ getClientRects: mn,
1124
+ getDimensions: vn,
1125
1125
  getScale: Q,
1126
1126
  isElement: k,
1127
- isRTL: yn
1127
+ isRTL: An
1128
1128
  };
1129
- function xe(t, e) {
1129
+ function Re(t, e) {
1130
1130
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1131
1131
  }
1132
- function vn(t, e) {
1132
+ function En(t, e) {
1133
1133
  let o = null, n;
1134
- const s = M(t);
1135
- function r() {
1134
+ const r = N(t);
1135
+ function s() {
1136
1136
  var c;
1137
1137
  clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
1138
1138
  }
1139
- function i(c, l) {
1140
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
1141
- const a = t.getBoundingClientRect(), {
1139
+ function i(c, a) {
1140
+ c === void 0 && (c = !1), a === void 0 && (a = 1), s();
1141
+ const l = t.getBoundingClientRect(), {
1142
1142
  left: h,
1143
1143
  top: f,
1144
1144
  width: m,
1145
1145
  height: u
1146
- } = a;
1146
+ } = l;
1147
1147
  if (c || e(), !m || !u)
1148
1148
  return;
1149
- const d = ht(f), p = ht(s.clientWidth - (h + m)), w = ht(s.clientHeight - (f + u)), g = ht(h), y = {
1149
+ const d = dt(f), p = dt(r.clientWidth - (h + m)), w = dt(r.clientHeight - (f + u)), g = dt(h), y = {
1150
1150
  rootMargin: -d + "px " + -p + "px " + -w + "px " + -g + "px",
1151
- threshold: q(0, Z(1, l)) || 1
1151
+ threshold: q(0, Z(1, a)) || 1
1152
1152
  };
1153
1153
  let b = !0;
1154
- function v(L) {
1155
- const A = L[0].intersectionRatio;
1156
- if (A !== l) {
1154
+ function v(P) {
1155
+ const R = P[0].intersectionRatio;
1156
+ if (R !== a) {
1157
1157
  if (!b)
1158
1158
  return i();
1159
- A ? i(!1, A) : n = setTimeout(() => {
1159
+ R ? i(!1, R) : n = setTimeout(() => {
1160
1160
  i(!1, 1e-7);
1161
1161
  }, 1e3);
1162
1162
  }
1163
- A === 1 && !xe(a, t.getBoundingClientRect()) && i(), b = !1;
1163
+ R === 1 && !Re(l, t.getBoundingClientRect()) && i(), b = !1;
1164
1164
  }
1165
1165
  try {
1166
1166
  o = new IntersectionObserver(v, {
1167
1167
  ...y,
1168
1168
  // Handle <iframe>s
1169
- root: s.ownerDocument
1169
+ root: r.ownerDocument
1170
1170
  });
1171
1171
  } catch {
1172
1172
  o = new IntersectionObserver(v, y);
1173
1173
  }
1174
1174
  o.observe(t);
1175
1175
  }
1176
- return i(!0), r;
1176
+ return i(!0), s;
1177
1177
  }
1178
- function bn(t, e, o, n) {
1178
+ function Pn(t, e, o, n) {
1179
1179
  n === void 0 && (n = {});
1180
1180
  const {
1181
- ancestorScroll: s = !0,
1182
- ancestorResize: r = !0,
1181
+ ancestorScroll: r = !0,
1182
+ ancestorResize: s = !0,
1183
1183
  elementResize: i = typeof ResizeObserver == "function",
1184
1184
  layoutShift: c = typeof IntersectionObserver == "function",
1185
- animationFrame: l = !1
1186
- } = n, a = Vt(t), h = s || r ? [...a ? rt(a) : [], ...rt(e)] : [];
1185
+ animationFrame: a = !1
1186
+ } = n, l = Bt(t), h = r || s ? [...l ? it(l) : [], ...it(e)] : [];
1187
1187
  h.forEach((g) => {
1188
- s && g.addEventListener("scroll", o, {
1188
+ r && g.addEventListener("scroll", o, {
1189
1189
  passive: !0
1190
- }), r && g.addEventListener("resize", o);
1190
+ }), s && g.addEventListener("resize", o);
1191
1191
  });
1192
- const f = a && c ? vn(a, o) : null;
1192
+ const f = l && c ? En(l, o) : null;
1193
1193
  let m = -1, u = null;
1194
1194
  i && (u = new ResizeObserver((g) => {
1195
1195
  let [x] = g;
1196
- x && x.target === a && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1196
+ x && x.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1197
1197
  var y;
1198
1198
  (y = u) == null || y.observe(e);
1199
1199
  })), o();
1200
- }), a && !l && u.observe(a), u.observe(e));
1201
- let d, p = l ? J(t) : null;
1202
- l && w();
1200
+ }), l && !a && u.observe(l), u.observe(e));
1201
+ let d, p = a ? J(t) : null;
1202
+ a && w();
1203
1203
  function w() {
1204
1204
  const g = J(t);
1205
- p && !xe(p, g) && o(), p = g, d = requestAnimationFrame(w);
1205
+ p && !Re(p, g) && o(), p = g, d = requestAnimationFrame(w);
1206
1206
  }
1207
1207
  return o(), () => {
1208
1208
  var g;
1209
1209
  h.forEach((x) => {
1210
- s && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
1211
- }), f == null || f(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(d);
1210
+ r && x.removeEventListener("scroll", o), s && x.removeEventListener("resize", o);
1211
+ }), f == null || f(), (g = u) == null || g.disconnect(), u = null, a && cancelAnimationFrame(d);
1212
1212
  };
1213
1213
  }
1214
- const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1215
- const n = /* @__PURE__ */ new Map(), s = {
1216
- platform: xn,
1214
+ const Ln = cn, Sn = an, qt = rn, Tn = on, kn = (t, e, o) => {
1215
+ const n = /* @__PURE__ */ new Map(), r = {
1216
+ platform: On,
1217
1217
  ...o
1218
- }, r = {
1219
- ...s.platform,
1218
+ }, s = {
1219
+ ...r.platform,
1220
1220
  _c: n
1221
1221
  };
1222
- return Ge(t, e, {
1223
- ...s,
1224
- platform: r
1222
+ return nn(t, e, {
1223
+ ...r,
1224
+ platform: s
1225
1225
  });
1226
- }, Qn = [
1226
+ }, eo = [
1227
1227
  "top",
1228
1228
  "top-start",
1229
1229
  "top-end",
@@ -1236,36 +1236,36 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1236
1236
  "left",
1237
1237
  "left-start",
1238
1238
  "left-end"
1239
- ], Zn = (t, e = { isOpen: !1 }) => {
1239
+ ], no = (t, e = { isOpen: !1 }) => {
1240
1240
  const o = [];
1241
1241
  let n = null;
1242
- const s = E.deriveProp(e.isOpen);
1243
- function r(c) {
1244
- n = c, s.set(!0);
1242
+ const r = E.deriveProp(e.isOpen);
1243
+ function s(c) {
1244
+ n = c, r.set(!0);
1245
1245
  }
1246
1246
  function i() {
1247
- s.set(!1), o.forEach((c) => c()), o.length = 0;
1247
+ r.set(!1), o.forEach((c) => c()), o.length = 0;
1248
1248
  }
1249
1249
  return st(
1250
- t(r, i),
1251
- ne(
1252
- s,
1253
- () => $(
1254
- (c) => ee(
1250
+ t(s, i),
1251
+ se(
1252
+ r,
1253
+ () => H(
1254
+ (c) => re(
1255
1255
  "body",
1256
- Rt.div(
1257
- $((l) => {
1258
- l.style.position = "absolute";
1259
- const a = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
1256
+ Et.div(
1257
+ H((a) => {
1258
+ a.style.position = "absolute";
1259
+ const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
1260
1260
  n.target
1261
1261
  ) : (n == null ? void 0 : n.target) ?? c;
1262
- if (a == null)
1262
+ if (l == null)
1263
1263
  throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
1264
1264
  let h = null;
1265
1265
  const f = E.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = E.toSignal((n == null ? void 0 : n.crossAxisOffset) ?? 0), u = E.toSignal(
1266
1266
  /* c8 ignore next 3 */
1267
1267
  (n == null ? void 0 : n.placement) ?? "top"
1268
- ), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = H({
1268
+ ), d = E.toSignal((n == null ? void 0 : n.arrowPadding) ?? 0), p = n == null ? void 0 : n.arrow, w = F({
1269
1269
  centerOffset: 0,
1270
1270
  alignmentOffset: 0,
1271
1271
  containerWidth: 0,
@@ -1275,52 +1275,52 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1275
1275
  });
1276
1276
  async function g() {
1277
1277
  const y = [
1278
- _t(),
1279
- An({
1278
+ qt(),
1279
+ Ln({
1280
1280
  mainAxis: f.get(),
1281
1281
  crossAxis: m.get()
1282
1282
  }),
1283
- On(),
1284
- _t()
1283
+ Sn(),
1284
+ qt()
1285
1285
  ];
1286
1286
  p != null && h != null && y.push(
1287
- Rn({
1287
+ Tn({
1288
1288
  element: h,
1289
1289
  padding: d.get()
1290
1290
  })
1291
1291
  );
1292
- const b = await En(a, l, {
1292
+ const b = await kn(l, a, {
1293
1293
  placement: u.get(),
1294
1294
  strategy: "absolute",
1295
1295
  middleware: y
1296
- }), { x: v, y: L, middlewareData: A } = b;
1297
- if (l.style.top = `${L}px`, l.style.left = `${v}px`, h != null && A.arrow != null) {
1296
+ }), { x: v, y: P, middlewareData: R } = b;
1297
+ if (a.style.top = `${P}px`, a.style.left = `${v}px`, h != null && R.arrow != null) {
1298
1298
  const {
1299
1299
  x: _,
1300
1300
  y: V,
1301
- centerOffset: S,
1302
- alignmentOffset: I
1303
- } = A.arrow;
1301
+ centerOffset: L,
1302
+ alignmentOffset: j
1303
+ } = R.arrow;
1304
1304
  w.set({
1305
1305
  x: _,
1306
1306
  y: V,
1307
- centerOffset: S,
1308
- alignmentOffset: I,
1309
- containerWidth: l.offsetWidth,
1310
- containerHeight: l.offsetHeight
1307
+ centerOffset: L,
1308
+ alignmentOffset: j,
1309
+ containerWidth: a.offsetWidth,
1310
+ containerHeight: a.offsetHeight
1311
1311
  });
1312
1312
  }
1313
1313
  }
1314
- const x = Oe(
1314
+ const x = Se(
1315
1315
  f,
1316
1316
  m,
1317
1317
  u
1318
1318
  )(g);
1319
1319
  return st(
1320
1320
  n == null ? void 0 : n.content,
1321
- (n == null ? void 0 : n.arrow) != null ? Rt.div(
1321
+ (n == null ? void 0 : n.arrow) != null ? Et.div(
1322
1322
  n == null ? void 0 : n.arrow(
1323
- oe(
1323
+ ie(
1324
1324
  w,
1325
1325
  u
1326
1326
  )((y, b) => ({
@@ -1328,13 +1328,13 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1328
1328
  placement: b
1329
1329
  }))
1330
1330
  ),
1331
- $((y) => {
1331
+ H((y) => {
1332
1332
  h = y, g();
1333
1333
  })
1334
1334
  ) : null,
1335
- F(
1335
+ M(
1336
1336
  w.dispose,
1337
- bn(a, l, g),
1337
+ Pn(l, a, g),
1338
1338
  x
1339
1339
  )
1340
1340
  );
@@ -1344,14 +1344,14 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1344
1344
  )
1345
1345
  )
1346
1346
  );
1347
- }, Ln = (t, e, o) => {
1348
- const n = H(U.notAsked), s = n.map(
1347
+ }, Cn = (t, e, o) => {
1348
+ const n = F(U.notAsked), r = n.map(
1349
1349
  (f) => U.isSuccess(f) ? f.value : void 0
1350
- ), r = n.map(
1350
+ ), s = n.map(
1351
1351
  (f) => U.isFailure(f) ? f.error : void 0
1352
1352
  ), i = n.map((f) => U.isLoading(f));
1353
1353
  let c;
1354
- const l = async (f) => {
1354
+ const a = async (f) => {
1355
1355
  c == null || c.abort(), c = new AbortController();
1356
1356
  const m = c.signal, u = n.get();
1357
1357
  n.set(U.loading(U.getOrUndefined(u)));
@@ -1361,50 +1361,50 @@ const An = en, On = nn, _t = Ze, Rn = Qe, En = (t, e, o) => {
1361
1361
  } catch (d) {
1362
1362
  c = void 0, n.set(U.failure(o(d)));
1363
1363
  }
1364
- }, a = () => l(E.get(t)), h = () => {
1364
+ }, l = () => a(E.get(t)), h = () => {
1365
1365
  c == null || c.abort(), c = void 0, n.dispose();
1366
1366
  };
1367
- return n.onDispose(E.on(t, l)), {
1367
+ return n.onDispose(E.on(t, a)), {
1368
1368
  status: n,
1369
- value: s,
1370
- error: r,
1369
+ value: r,
1370
+ error: s,
1371
1371
  loading: i,
1372
- reload: a,
1372
+ reload: l,
1373
1373
  dispose: h
1374
1374
  };
1375
- }, Sn = (t, e) => {
1376
- const { status: o, dispose: n, reload: s } = t, { loading: r, failure: i, success: c } = e;
1375
+ }, Dn = (t, e) => {
1376
+ const { status: o, dispose: n, reload: r } = t, { loading: s, failure: i, success: c } = e;
1377
1377
  return st(
1378
- F(n),
1379
- ce(o, {
1380
- loading: r != null ? (l) => r(l, s) : void 0,
1381
- failure: i != null ? (l) => i(l, s) : void 0,
1382
- success: (l) => c(l, s)
1378
+ M(n),
1379
+ ue(o, {
1380
+ loading: s != null ? (a) => s(a, r) : void 0,
1381
+ failure: i != null ? (a) => i(a, r) : void 0,
1382
+ success: (a) => c(a, r)
1383
1383
  })
1384
1384
  );
1385
- }, to = ({
1385
+ }, oo = ({
1386
1386
  request: t,
1387
1387
  load: e,
1388
1388
  mapError: o = (n) => n
1389
1389
  }) => {
1390
- const n = Ln(t, e, o);
1391
- return (s) => Sn(n, s);
1392
- }, Tn = (t, e) => {
1390
+ const n = Cn(t, e, o);
1391
+ return (r) => Dn(n, r);
1392
+ }, Wn = (t, e) => {
1393
1393
  if (typeof e == "function")
1394
- return Tn(t, { success: e });
1395
- const o = e.failure ?? ((s) => st(
1396
- F(s.on(console.error)),
1397
- s.map((r) => `Error: ${r}`)
1394
+ return Wn(t, { success: e });
1395
+ const o = e.failure ?? ((r) => st(
1396
+ M(r.on(console.error)),
1397
+ r.map((s) => `Error: ${s}`)
1398
1398
  )), n = e.success;
1399
- return te(E.toSignal(t), {
1400
- Success: (s) => n(s.$.value),
1401
- Failure: (s) => o(s.$.error)
1399
+ return oe(E.toSignal(t), {
1400
+ Success: (r) => n(r.$.value),
1401
+ Failure: (r) => o(r.$.error)
1402
1402
  });
1403
- }, eo = () => Qt.focus((t) => {
1403
+ }, ro = () => ee.focus((t) => {
1404
1404
  var e;
1405
1405
  return (e = t.target) == null ? void 0 : e.select();
1406
1406
  });
1407
- class bt {
1407
+ class Rt {
1408
1408
  /**
1409
1409
  * Creates a new Rect instance.
1410
1410
  *
@@ -1422,7 +1422,7 @@ class bt {
1422
1422
  * console.log(rect.height); // 50
1423
1423
  * ```
1424
1424
  */
1425
- constructor(e, o, n, s) {
1425
+ constructor(e, o, n, r) {
1426
1426
  /**
1427
1427
  * Compares this rectangle with another rectangle for equality.
1428
1428
  *
@@ -1443,8 +1443,8 @@ class bt {
1443
1443
  * console.log(rect1.equals(rect3)); // true (within tolerance)
1444
1444
  * ```
1445
1445
  */
1446
- At(this, "equals", (e) => ft(this.left, e.left) && ft(this.top, e.top) && ft(this.width, e.width) && ft(this.height, e.height));
1447
- this.left = e, this.top = o, this.width = n, this.height = s;
1446
+ At(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
1447
+ this.left = e, this.top = o, this.width = n, this.height = r;
1448
1448
  }
1449
1449
  /**
1450
1450
  * Creates a new Rect instance using an object with optional properties.
@@ -1475,9 +1475,9 @@ class bt {
1475
1475
  left: e = 0,
1476
1476
  top: o = 0,
1477
1477
  width: n = 0,
1478
- height: s = 0
1478
+ height: r = 0
1479
1479
  }) {
1480
- return new bt(e, o, n, s);
1480
+ return new Rt(e, o, n, r);
1481
1481
  }
1482
1482
  /**
1483
1483
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1543,163 +1543,252 @@ class bt {
1543
1543
  return { width: this.width, height: this.height };
1544
1544
  }
1545
1545
  }
1546
- function It(t) {
1546
+ function Xt(t) {
1547
1547
  const e = t.getBoundingClientRect();
1548
- return bt.of({
1548
+ return Rt.of({
1549
1549
  top: e.top + window.scrollY,
1550
1550
  left: e.left + window.scrollX,
1551
1551
  width: e.width,
1552
1552
  height: e.height
1553
1553
  });
1554
1554
  }
1555
- const Pn = (t) => Re((e) => {
1556
- const { element: o } = e, n = H(It(o)), s = Dt(t(n))(e), r = () => {
1557
- n.set(bt.of(It(o)));
1558
- };
1559
- let i;
1560
- return typeof ResizeObserver == "function" && (i = new ResizeObserver(r), i.observe(o)), F((c) => {
1561
- i == null || i.disconnect(), s(c);
1555
+ const so = (t) => Te((e) => {
1556
+ const { element: o } = e, n = F(Xt(o), (c, a) => c.equals(a)), r = Ft(t(n))(e), s = () => n.set(Rt.of(Xt(o)));
1557
+ let i = null;
1558
+ return typeof ResizeObserver < "u" && (i = new ResizeObserver(s)), i == null || i.observe(o), M((c) => {
1559
+ i == null || i.disconnect(), r(c);
1562
1560
  });
1563
- }), no = (t) => Pn(t), oo = (t) => (e) => {
1564
- const o = ct(), n = H({
1565
- width: (o == null ? void 0 : o.innerWidth) ?? 0,
1566
- height: (o == null ? void 0 : o.innerHeight) ?? 0
1567
- }), s = Dt(t(n))(e), r = () => {
1568
- n.set({
1569
- /* c8 ignore next 6 */
1570
- width: (o == null ? void 0 : o.innerWidth) ?? 0,
1571
- height: (o == null ? void 0 : o.innerHeight) ?? 0
1572
- });
1561
+ });
1562
+ function Jt(t) {
1563
+ return {
1564
+ /* c8 ignore next 6 */
1565
+ width: (t == null ? void 0 : t.innerWidth) ?? 0,
1566
+ height: (t == null ? void 0 : t.innerHeight) ?? 0
1573
1567
  };
1574
- return o == null || o.addEventListener("resize", r), (i) => {
1575
- o == null || o.removeEventListener("resize", r), s(i);
1568
+ }
1569
+ const io = (t) => (e) => {
1570
+ const o = at(), n = F(
1571
+ Jt(o),
1572
+ (i, c) => i.width === c.width && i.height === c.height
1573
+ ), r = Ft(t(n))(e), s = () => n.set(Jt(o));
1574
+ return o == null || o.addEventListener("resize", s), (i) => {
1575
+ o == null || o.removeEventListener("resize", s), r(i);
1576
1576
  };
1577
- }, kn = (t, e) => {
1578
- const o = e.split("/").filter((s) => s !== ""), n = {};
1579
- for (let s = 0; s < t.length; s++) {
1580
- const r = t[s], i = o[s];
1581
- if (!i && r.type !== "catch-all")
1577
+ }, Fn = (t, e) => {
1578
+ const o = e.split("/").filter((r) => r !== ""), n = {};
1579
+ for (let r = 0; r < t.length; r++) {
1580
+ const s = t[r], i = o[r];
1581
+ if (!i && s.type !== "catch-all")
1582
1582
  return null;
1583
- if (r.type === "literal") {
1584
- if (r.value !== i)
1583
+ if (s.type === "literal") {
1584
+ if (s.value !== i)
1585
1585
  return null;
1586
- } else if (r.type === "param")
1587
- n[r.name] = i;
1588
- else if (r.type === "catch-all")
1586
+ } else if (s.type === "param")
1587
+ n[s.name] = i;
1588
+ else if (s.type === "catch-all")
1589
1589
  return { params: n, path: e };
1590
1590
  }
1591
1591
  return o.length !== t.length ? null : { params: n, path: e };
1592
- }, Dn = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), Cn = (t) => {
1592
+ }, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), co = (t) => {
1593
1593
  const e = t.map((o) => {
1594
- const n = Dn(o);
1594
+ const n = Ae(o);
1595
1595
  return { route: o, segments: n };
1596
1596
  });
1597
1597
  return function(n) {
1598
- for (const { segments: s, route: r } of e) {
1599
- const i = kn(s, n);
1598
+ for (const { segments: r, route: s } of e) {
1599
+ const i = Fn(r, n);
1600
1600
  if (i)
1601
- return { ...i, route: r };
1601
+ return { ...i, route: s };
1602
1602
  }
1603
1603
  return null;
1604
1604
  };
1605
- }, so = (t) => {
1606
- const e = Cn(Object.keys(t));
1607
- return Gt(ie, (o) => {
1608
- const n = o.map((s) => {
1609
- const r = e(s.pathname);
1610
- if (r == null)
1611
- throw console.error("No route found for", s), new Error("No route found");
1605
+ }, Ct = {
1606
+ mark: Wt("RouterContext"),
1607
+ create: () => {
1608
+ const t = F([]);
1609
+ return {
1610
+ value: t,
1611
+ dispose: () => t.dispose()
1612
+ };
1613
+ }
1614
+ }, Mn = (t, e, o) => {
1615
+ const n = o.split("/").filter((i) => i !== ""), r = {};
1616
+ let s = 0;
1617
+ for (let i = 0; i < t.length; i++) {
1618
+ const c = t[i], a = n[i];
1619
+ if (!a && c.type !== "catch-all")
1620
+ return null;
1621
+ if (c.type === "literal") {
1622
+ if (c.value !== a)
1623
+ return null;
1624
+ s++;
1625
+ } else if (c.type === "param")
1626
+ r[c.name] = a, s++;
1627
+ else if (c.type === "catch-all") {
1628
+ const l = "/" + n.slice(0, s).join("/"), h = "/" + n.slice(s).join("/");
1612
1629
  return {
1613
- params: r.params,
1614
- route: r.route,
1615
- path: r.path,
1616
- search: s.search,
1617
- hash: s.hash
1630
+ params: r,
1631
+ matchedPath: l === "/" ? "" : l,
1632
+ remainingPath: h === "/" ? "" : h,
1633
+ route: e
1634
+ };
1635
+ }
1636
+ }
1637
+ if (n.length === t.length) {
1638
+ const i = "/" + n.join("/");
1639
+ return {
1640
+ params: r,
1641
+ matchedPath: i === "/" ? "" : i,
1642
+ remainingPath: "",
1643
+ route: e
1644
+ };
1645
+ }
1646
+ return null;
1647
+ }, Oe = (t) => {
1648
+ const e = t.map((o) => {
1649
+ const n = Ae(o);
1650
+ return { route: o, segments: n };
1651
+ });
1652
+ return function(n) {
1653
+ for (const { segments: r, route: s } of e) {
1654
+ const i = Mn(r, s, n);
1655
+ if (i)
1656
+ return i;
1657
+ }
1658
+ return null;
1659
+ };
1660
+ }, ao = (t) => {
1661
+ const e = Oe(Object.keys(t));
1662
+ return ke(
1663
+ Ct,
1664
+ {},
1665
+ () => rt(Mt, (o) => rt(Ct, (n) => {
1666
+ const r = o.map((s) => {
1667
+ const i = e(s.pathname);
1668
+ if (i == null)
1669
+ throw console.error("No route found for", s), new Error("No route found");
1670
+ const c = {
1671
+ matchedPath: i.matchedPath,
1672
+ remainingPath: i.remainingPath,
1673
+ fullPath: s.pathname,
1674
+ params: i.params
1675
+ };
1676
+ return n.value = [...n.value, c], {
1677
+ params: i.params,
1678
+ route: i.route,
1679
+ path: i.matchedPath || s.pathname,
1680
+ search: s.search,
1681
+ hash: s.hash
1682
+ };
1683
+ });
1684
+ return ce(
1685
+ r.map((s) => [s.route, s]),
1686
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1687
+ t
1688
+ );
1689
+ }))
1690
+ );
1691
+ }, lo = (t) => {
1692
+ const e = Oe(Object.keys(t));
1693
+ return rt(Ct, (o) => rt(Mt, (n) => {
1694
+ const r = o.map((s) => {
1695
+ const i = s[s.length - 1], c = (i == null ? void 0 : i.remainingPath) || "";
1696
+ if (c === "")
1697
+ throw console.error("No remaining path for SubRouter", s), new Error("No remaining path for SubRouter");
1698
+ const a = e(c);
1699
+ if (a == null)
1700
+ throw console.error("No route found for remaining path", c), new Error("No route found");
1701
+ return {
1702
+ params: a.params,
1703
+ // Only this router's parameters
1704
+ route: a.route,
1705
+ path: a.matchedPath,
1706
+ search: n.value.search,
1707
+ hash: n.value.hash
1618
1708
  };
1619
1709
  });
1620
- return Ee(
1621
- n.map((s) => [s.route, s]),
1710
+ return ce(
1711
+ r.map((s) => [s.route, s]),
1622
1712
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1623
1713
  t
1624
- /* c8 ignore next 2 */
1625
1714
  );
1626
- });
1627
- }, wt = 60 * 1e3, kt = 60 * wt, it = 24 * kt, jt = 7 * it, Yt = 30 * it, Wn = 365 * it, Fn = [
1715
+ }));
1716
+ }, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Gt = 7 * ct, Qt = 30 * ct, Nn = 365 * ct, Vn = [
1628
1717
  {
1629
- max: wt * 90,
1630
- value: wt,
1718
+ max: yt * 90,
1719
+ value: yt,
1631
1720
  name: "minute",
1632
1721
  past: { singular: "a minute ago", plural: "{} minutes ago" },
1633
1722
  future: { singular: "in a minute", plural: "in {} minutes" }
1634
1723
  },
1635
1724
  {
1636
- max: kt * 36,
1637
- value: kt,
1725
+ max: Dt * 36,
1726
+ value: Dt,
1638
1727
  name: "hour",
1639
1728
  past: { singular: "an hour ago", plural: "{} hours ago" },
1640
1729
  future: { singular: "in an hour", plural: "in {} hours" }
1641
1730
  },
1642
1731
  {
1643
- max: it * 10,
1644
- value: it,
1732
+ max: ct * 10,
1733
+ value: ct,
1645
1734
  name: "day",
1646
1735
  past: { singular: "yesterday", plural: "{} days ago" },
1647
1736
  future: { singular: "tomorrow", plural: "in {} days" }
1648
1737
  },
1649
1738
  {
1650
- max: jt * 6,
1651
- value: jt,
1739
+ max: Gt * 6,
1740
+ value: Gt,
1652
1741
  name: "week",
1653
1742
  past: { singular: "last week", plural: "{} weeks ago" },
1654
1743
  future: { singular: "in a week", plural: "in {} weeks" }
1655
1744
  },
1656
1745
  {
1657
- max: Yt * 18,
1658
- value: Yt,
1746
+ max: Qt * 18,
1747
+ value: Qt,
1659
1748
  name: "month",
1660
1749
  past: { singular: "last month", plural: "{} months ago" },
1661
1750
  future: { singular: "in a month", plural: "in {} months" }
1662
1751
  },
1663
1752
  {
1664
1753
  max: 1 / 0,
1665
- value: Wn,
1754
+ value: Nn,
1666
1755
  name: "year",
1667
1756
  past: { singular: "last year", plural: "{} years ago" },
1668
1757
  future: { singular: "in a year", plural: "in {} years" }
1669
1758
  }
1670
1759
  ];
1671
- function qt(t, e, o, n) {
1672
- const s = Math.round(t / e);
1673
- return s <= 1 ? o : n.replace(
1760
+ function Zt(t, e, o, n) {
1761
+ const r = Math.round(t / e);
1762
+ return r <= 1 ? o : n.replace(
1674
1763
  "{}",
1675
- s.toLocaleString(void 0, {
1764
+ r.toLocaleString(void 0, {
1676
1765
  maximumFractionDigits: 0,
1677
1766
  minimumFractionDigits: 0
1678
1767
  })
1679
1768
  );
1680
1769
  }
1681
- const Mn = (t = 1e3) => {
1682
- const e = H(/* @__PURE__ */ new Date()), o = Se(() => e.set(/* @__PURE__ */ new Date()), t);
1770
+ const $n = (t = 1e3) => {
1771
+ const e = F(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
1683
1772
  return e.onDispose(o), e;
1684
- }, Vn = (t) => {
1773
+ }, Hn = (t) => {
1685
1774
  const e = Math.abs(t);
1686
- if (e < wt)
1775
+ if (e < yt)
1687
1776
  return t < 0 ? "just now" : "in a moment";
1688
- for (const o of Fn)
1777
+ for (const o of Vn)
1689
1778
  if (e < o.max)
1690
- return t < 0 ? qt(e, o.value, o.past.singular, o.past.plural) : qt(e, o.value, o.future.singular, o.future.plural);
1779
+ return t < 0 ? Zt(e, o.value, o.past.singular, o.past.plural) : Zt(e, o.value, o.future.singular, o.future.plural);
1691
1780
  throw new Error("unreachable");
1692
- }, Nn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1693
- const n = e != null ? Jt.is(e) ? e.derive() : H(e) : Mn(o), s = oe(
1781
+ }, Bn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1782
+ const n = e != null ? te.is(e) ? e.derive() : F(e) : $n(o), r = ie(
1694
1783
  t,
1695
1784
  n
1696
- )((r, i) => r.getTime() - i.getTime());
1697
- return s.onDispose(() => E.dispose(n)), s;
1698
- }, $n = (t, e = {}) => {
1699
- const o = Nn(t, e), n = o.map(Vn);
1785
+ )((s, i) => s.getTime() - i.getTime());
1786
+ return r.onDispose(() => E.dispose(n)), r;
1787
+ }, Un = (t, e = {}) => {
1788
+ const o = Bn(t, e), n = o.map(Hn);
1700
1789
  return n.onDispose(o.dispose), n;
1701
- }, ro = (t, e = {}) => $n(t, e);
1702
- class Hn extends Le {
1790
+ }, uo = (t, e = {}) => Un(t, e);
1791
+ class zn extends Ce {
1703
1792
  constructor() {
1704
1793
  super(...arguments);
1705
1794
  /**
@@ -1709,52 +1798,53 @@ class Hn extends Le {
1709
1798
  At(this, "tick", () => this.update((o) => o + 1));
1710
1799
  }
1711
1800
  }
1712
- const io = (t = 0) => new Hn(t, (e, o) => e === o);
1801
+ const fo = (t = 0) => new zn(t, (e, o) => e === o);
1713
1802
  export {
1714
- $e as Anchor,
1715
- Kn as Appearance,
1716
- ce as AsyncResultView,
1717
- _n as AutoFocus,
1718
- In as AutoSelect,
1719
- Pn as ElementRect,
1720
- no as ElementSize,
1721
- Yn as HTMLTitle,
1722
- jn as HiddenWhenEmpty,
1723
- ze as InViewport,
1724
- ie as Location,
1725
- Xn as OnClickOutside,
1726
- Jn as OnEnterKey,
1727
- Gn as OnEscapeKey,
1728
- le as OnKeyPressed,
1729
- Zn as PopOver,
1730
- bt as Rect,
1731
- to as Resource,
1732
- Sn as ResourceDisplay,
1733
- Tn as ResultView,
1734
- so as Router,
1735
- eo as SelectOnFocus,
1736
- Hn as Ticker,
1737
- qn as WhenInViewport,
1738
- oo as WindowSize,
1739
- Pe as _checkExtensionCondition,
1740
- Te as _getExtension,
1741
- Cn as _makeRouteMatcher,
1742
- Dn as _parseRouteSegments,
1743
- Qn as allPlacements,
1744
- Ce as areLocationsEqual,
1745
- It as getAbsoluteRect,
1746
- De as handleAnchorClick,
1747
- re as locationFromURL,
1748
- Ln as makeResource,
1749
- Ke as matchesKeyCombo,
1750
- kn as matchesRoute,
1751
- Mn as nowSignal,
1752
- ro as relativeTime,
1753
- Nn as relativeTimeMillisSignal,
1754
- $n as relativeTimeSignal,
1755
- $t as setLocationFromUrl,
1756
- io as ticker,
1757
- Vn as timeDiffToString,
1803
+ Ke as Anchor,
1804
+ In as Appearance,
1805
+ ue as AsyncResultView,
1806
+ Yn as AutoFocus,
1807
+ qn as AutoSelect,
1808
+ lo as ChildRouter,
1809
+ so as ElementRect,
1810
+ Jn as HTMLTitle,
1811
+ Xn as HiddenWhenEmpty,
1812
+ Ye as InViewport,
1813
+ Mt as Location,
1814
+ Qn as OnClickOutside,
1815
+ Zn as OnEnterKey,
1816
+ to as OnEscapeKey,
1817
+ fe as OnKeyPressed,
1818
+ no as PopOver,
1819
+ Rt as Rect,
1820
+ oo as Resource,
1821
+ Dn as ResourceDisplay,
1822
+ Wn as ResultView,
1823
+ ao as RootRouter,
1824
+ Ct as RouterContextProvider,
1825
+ ro as SelectOnFocus,
1826
+ zn as Ticker,
1827
+ Gn as WhenInViewport,
1828
+ io as WindowSize,
1829
+ Fe as _checkExtensionCondition,
1830
+ We as _getExtension,
1831
+ co as _makeRouteMatcher,
1832
+ Ae as _parseRouteSegments,
1833
+ eo as allPlacements,
1834
+ Ve as areLocationsEqual,
1835
+ Xt as getAbsoluteRect,
1836
+ Ne as handleAnchorClick,
1837
+ le as locationFromURL,
1838
+ Cn as makeResource,
1839
+ qe as matchesKeyCombo,
1840
+ Fn as matchesRoute,
1841
+ $n as nowSignal,
1842
+ uo as relativeTime,
1843
+ Bn as relativeTimeMillisSignal,
1844
+ Un as relativeTimeSignal,
1845
+ zt as setLocationFromUrl,
1846
+ fo as ticker,
1847
+ Hn as timeDiffToString,
1758
1848
  Lt as urlFromLocation,
1759
- He as useAppearance
1849
+ _e as useAppearance
1760
1850
  };