@tempots/ui 10.7.0 → 10.7.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.
Files changed (3) hide show
  1. package/index.cjs +1 -1
  2. package/index.js +823 -831
  3. package/package.json +4 -4
package/index.js CHANGED
@@ -1,17 +1,14 @@
1
- var De = Object.defineProperty;
2
- var He = (t, e, n) => e in t ? De(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var mt = (t, e, n) => He(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { getWindow as ot, prop as M, makeProviderMark as Mt, computedOf as Nt, Signal as ce, Use as ct, html as Lt, on as le, Value as C, attr as Vt, Empty as Et, OneOfType as ue, WithElement as _, OnDispose as N, Fragment as Y, Portal as fe, renderableOfTNode as $t, When as he, previousSignal as We, effectOf as Fe, WithBrowserCtx as Me, Provide as Ne, OneOfTuple as de, Prop as Ve } from "@tempots/dom";
5
- import { delayed as me, AsyncResult as S, nearEqual as gt, interval as $e } from "@tempots/std";
6
- const ze = (t) => {
1
+ import { getWindow as st, prop as M, makeProviderMark as Ft, computedOf as Mt, Signal as le, Use as ct, html as Et, on as ue, Value as C, attr as Nt, Empty as Pt, OneOfType as fe, WithElement as _, OnDispose as N, Fragment as Y, Portal as he, renderableOfTNode as Vt, When as de, previousSignal as He, effectOf as We, WithBrowserCtx as Fe, Provide as Me, OneOfTuple as me, Prop as Ne } from "@tempots/dom";
2
+ import { delayed as pe, AsyncResult as R, nearEqual as mt, interval as Ve } from "@tempots/std";
3
+ const $e = (t) => {
7
4
  const e = t.split("/").pop();
8
5
  if (e == null || e.startsWith(".")) return;
9
6
  const n = e.split(".") || [];
10
7
  return n.length > 1 ? "." + n.pop() : void 0;
11
- }, Be = (t, e) => {
12
- const n = ze(e);
13
- return n != null && (t.length === 0 || !t.some((s) => n == s));
14
- }, _e = (t, e, n, s) => {
8
+ }, ze = (t, e) => {
9
+ const n = $e(e);
10
+ return n != null && (t.length === 0 || !t.some((o) => n == o));
11
+ }, Be = (t, e, n, o) => {
15
12
  let r = t.target;
16
13
  for (; r != null && !(r instanceof HTMLAnchorElement); )
17
14
  r = r.parentElement;
@@ -20,98 +17,97 @@ const ze = (t) => {
20
17
  const i = r;
21
18
  if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
22
19
  return !0;
23
- const { pathname: o, search: a, hash: c } = i;
24
- if (s) {
25
- const l = o + a + c, u = i.getAttribute("href");
26
- if (!(u != null && u.startsWith("#")) && u !== l)
20
+ const { pathname: s, search: a, hash: c } = i;
21
+ if (o) {
22
+ const l = s + a + c, u = i.getAttribute("href");
23
+ if (!u?.startsWith("#") && u !== l)
27
24
  return !0;
28
25
  }
29
- return e ? !1 : Be(n, o);
30
- }, Ue = (t, e = {
26
+ return e ? !1 : ze(n, s);
27
+ }, _e = (t, e = {
31
28
  ignoreUrlWithExtension: !0,
32
29
  allowedExtensions: [],
33
30
  ignoreExternalUrl: !0
34
31
  }) => {
35
32
  const n = e.ignoreUrlWithExtension === !0 && Array.isArray(e.allowedExtensions) ? e.allowedExtensions.map(
36
- (s) => s.startsWith(".") ? s : "." + s
33
+ (o) => o.startsWith(".") ? o : "." + o
37
34
  ) : [];
38
- return (s) => {
39
- _e(
40
- s,
35
+ return (o) => {
36
+ Be(
37
+ o,
41
38
  e.ignoreUrlWithExtension ?? !0,
42
39
  n,
43
40
  e.ignoreExternalUrl ?? !0
44
- ) || t() && s.preventDefault();
41
+ ) || t() && o.preventDefault();
45
42
  };
46
- }, Ke = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, kt = (t, e) => {
47
- var i, o;
48
- const n = new URL(t, e ?? ((i = ot()) == null ? void 0 : i.location.toString())), s = Object.fromEntries(((o = n.searchParams) == null ? void 0 : o.entries()) ?? []);
43
+ }, Ue = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, Lt = (t, e) => {
44
+ const n = new URL(t, e ?? st()?.location.toString()), o = Object.fromEntries(n.searchParams?.entries() ?? []);
49
45
  let r = n.hash;
50
46
  return r.startsWith("#") && (r = r.substring(1)), {
51
47
  pathname: n.pathname,
52
- search: s,
48
+ search: o,
53
49
  hash: r === "" ? void 0 : r
54
50
  };
55
51
  }, et = (t) => {
56
- const n = new URLSearchParams(t.search).toString(), s = t.hash;
57
- return `${t.pathname}${n ? `?${n}` : ""}${s ? `#${s}` : ""}`;
58
- }, je = (t) => {
52
+ const n = new URLSearchParams(t.search).toString(), o = t.hash;
53
+ return `${t.pathname}${n ? `?${n}` : ""}${o ? `#${o}` : ""}`;
54
+ }, Ke = (t) => {
59
55
  document.startViewTransition ? document.startViewTransition(t) : t();
60
- }, Yt = () => {
61
- const t = ot(), e = (t == null ? void 0 : t.location.hash) ?? "";
56
+ }, It = () => {
57
+ const t = st(), e = t?.location.hash ?? "";
62
58
  return {
63
- pathname: (t == null ? void 0 : t.location.pathname) ?? "",
59
+ pathname: t?.location.pathname ?? "",
64
60
  search: Object.fromEntries(
65
- new URLSearchParams((t == null ? void 0 : t.location.search) ?? "").entries()
61
+ new URLSearchParams(t?.location.search ?? "").entries()
66
62
  ),
67
63
  hash: e.startsWith("#") ? e.substring(1) || void 0 : e === "" ? void 0 : e
68
64
  };
69
- }, qt = (t) => {
70
- if ((t == null ? void 0 : t.scroll) !== "auto")
65
+ }, Yt = (t) => {
66
+ if (t?.scroll !== "auto")
71
67
  return;
72
- const e = ot();
68
+ const e = st();
73
69
  e && e.requestAnimationFrame(
74
70
  () => e.scrollTo({ top: 0, left: 0, behavior: "auto" })
75
71
  );
76
- }, Xt = (t, e) => {
77
- e != null && e.viewTransition ? je(t) : t();
78
- }, Ie = () => {
79
- const t = M(Yt(), Ke), e = ot(), n = () => {
80
- t.set(Yt());
72
+ }, qt = (t, e) => {
73
+ e?.viewTransition ? Ke(t) : t();
74
+ }, je = () => {
75
+ const t = M(It(), Ue), e = st(), n = () => {
76
+ t.set(It());
81
77
  };
82
- e == null || e.addEventListener("popstate", n), e == null || e.addEventListener("hashchange", n);
83
- const s = (c, l, u) => {
84
- Xt(() => {
78
+ e?.addEventListener("popstate", n), e?.addEventListener("hashchange", n);
79
+ const o = (c, l, u) => {
80
+ qt(() => {
85
81
  if (e) {
86
- const h = et(c), p = (l == null ? void 0 : l.state) ?? {};
87
- u === "replaceState" || l != null && l.replace ? e.history.replaceState(p, "", h) : e.history.pushState(p, "", h);
82
+ const h = et(c), g = l?.state ?? {};
83
+ u === "replaceState" || l?.replace ? e.history.replaceState(g, "", h) : e.history.pushState(g, "", h);
88
84
  }
89
85
  t.set(c);
90
- }, l), qt(l);
86
+ }, l), Yt(l);
91
87
  }, r = (c, l) => {
92
- Xt(() => {
93
- e == null || e.history.go(c);
94
- }, l), qt(l);
88
+ qt(() => {
89
+ e?.history.go(c);
90
+ }, l), Yt(l);
95
91
  };
96
92
  return {
97
93
  location: t,
98
- commit: s,
94
+ commit: o,
99
95
  go: r,
100
96
  back: (c) => r(-1, c),
101
97
  forward: (c) => r(1, c),
102
- resolve: (c) => kt(c),
98
+ resolve: (c) => Lt(c),
103
99
  dispose: () => {
104
- e == null || e.removeEventListener("popstate", n), e == null || e.removeEventListener("hashchange", n), t.dispose();
100
+ e?.removeEventListener("popstate", n), e?.removeEventListener("hashchange", n), t.dispose();
105
101
  }
106
102
  };
107
- }, Ye = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), qe = (t) => {
103
+ }, Ie = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Ye = (t) => {
108
104
  const e = t.container.currentURL, n = e.iso(
109
- (o) => kt(o, e.value),
110
- (o) => {
111
- if (Ye(o.pathname))
112
- return et(o);
113
- const a = new URL(o.pathname, e.value), c = a.origin + a.pathname;
114
- return et({ ...o, pathname: c });
105
+ (s) => Lt(s, e.value),
106
+ (s) => {
107
+ if (Ie(s.pathname))
108
+ return et(s);
109
+ const a = new URL(s.pathname, e.value), c = a.origin + a.pathname;
110
+ return et({ ...s, pathname: c });
115
111
  }
116
112
  );
117
113
  return {
@@ -119,55 +115,55 @@ const ze = (t) => {
119
115
  dispose: () => {
120
116
  n.dispose();
121
117
  },
122
- commit: (o, a, c) => {
123
- n.set(o);
118
+ commit: (s, a, c) => {
119
+ n.set(s);
124
120
  },
125
- go: (o, a) => {
121
+ go: (s, a) => {
126
122
  },
127
123
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
128
- back: (o) => {
124
+ back: (s) => {
129
125
  },
130
126
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
131
- forward: (o) => {
127
+ forward: (s) => {
132
128
  },
133
- resolve: (o) => kt(o, e.value)
129
+ resolve: (s) => Lt(s, e.value)
134
130
  };
135
131
  }, it = (t) => ({
136
132
  pathname: t.pathname,
137
133
  search: { ...t.search },
138
134
  hash: t.hash ?? void 0
139
- }), Tt = (t) => {
135
+ }), kt = (t) => {
140
136
  if (t == null) return;
141
137
  const e = `${t}`;
142
138
  return e === "" ? void 0 : e;
143
139
  }, ge = (t, e) => {
144
140
  const n = { ...t };
145
- for (const [s, r] of Object.entries(e))
146
- r == null ? delete n[s] : n[s] = r;
141
+ for (const [o, r] of Object.entries(e))
142
+ r == null ? delete n[o] : n[o] = r;
147
143
  return n;
148
- }, Xe = (t, e) => {
149
- const n = (e == null ? void 0 : e.includeSearch) ?? !0, s = (e == null ? void 0 : e.includeHash) ?? !0, r = (e == null ? void 0 : e.ignoreSearchParams) ?? [];
144
+ }, qe = (t, e) => {
145
+ const n = e?.includeSearch ?? !0, o = e?.includeHash ?? !0, r = e?.ignoreSearchParams ?? [];
150
146
  let i;
151
147
  if (!n)
152
148
  i = {};
153
149
  else if (r.length === 0)
154
150
  i = { ...t.search };
155
151
  else {
156
- const o = new Set(r);
152
+ const s = new Set(r);
157
153
  i = {};
158
154
  for (const [a, c] of Object.entries(t.search))
159
- o.has(a) || (i[a] = c);
155
+ s.has(a) || (i[a] = c);
160
156
  }
161
157
  return {
162
158
  pathname: t.pathname,
163
159
  search: i,
164
- hash: s ? t.hash : void 0
160
+ hash: o ? t.hash : void 0
165
161
  };
166
- }, Qt = (t, e, n) => {
167
- const s = Xe(t, n);
168
- return typeof e == "string" ? et(s) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(s))) : e(s);
162
+ }, Xt = (t, e, n) => {
163
+ const o = qe(t, n);
164
+ return typeof e == "string" ? et(o) === e : e instanceof RegExp ? ((e.global || e.sticky) && (e.lastIndex = 0), e.test(et(o))) : e(o);
169
165
  };
170
- class Qe {
166
+ class Xe {
171
167
  constructor(e) {
172
168
  this.current = e;
173
169
  }
@@ -184,9 +180,9 @@ class Qe {
184
180
  }, this;
185
181
  }
186
182
  setHash(e) {
187
- const n = Tt(e);
183
+ const n = kt(e);
188
184
  if (n == null) {
189
- const { hash: s, ...r } = this.current;
185
+ const { hash: o, ...r } = this.current;
190
186
  this.current = r;
191
187
  } else
192
188
  this.current = {
@@ -215,43 +211,43 @@ class Qe {
215
211
  }, this;
216
212
  }
217
213
  }
218
- const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
219
- const e = t.location, n = e.map(et), s = e.map((g) => g.pathname), r = e.map((g) => ({ ...g.search })), i = e.map((g) => g.hash), o = (g, x) => Qt(t.location.value, g, x), a = (g, x) => Nt(
214
+ const Qe = (t, e) => t?.replace ? "replaceState" : e, Je = (t) => {
215
+ const e = t.location, n = e.map(et), o = e.map((p) => p.pathname), r = e.map((p) => ({ ...p.search })), i = e.map((p) => p.hash), s = (p, x) => Xt(t.location.value, p, x), a = (p, x) => Mt(
220
216
  e,
221
- g
217
+ p
222
218
  )(
223
- (O, L) => Qt(O, L, x)
224
- ), c = (g, x, O) => {
225
- const L = it({
226
- ...g,
227
- hash: Tt(g.hash ?? void 0)
219
+ (S, P) => Xt(S, P, x)
220
+ ), c = (p, x, S) => {
221
+ const P = it({
222
+ ...p,
223
+ hash: kt(p.hash ?? void 0)
228
224
  });
229
- t.commit(L, x, O);
230
- }, l = (g, x) => {
231
- const O = Je(x, "pushState");
232
- c(g, x, O);
233
- }, u = (g, x) => {
234
- const O = g(it(t.location.value));
235
- l(O, x);
236
- }, h = (g, x) => {
237
- const O = t.resolve(g);
238
- l(O, x);
239
- }, p = (g, x) => {
240
- const O = { ...x, replace: !0 };
241
- h(g, O);
242
- }, f = (g, x) => {
243
- t.go(g, x);
244
- }, d = (g) => {
245
- t.back(g);
246
- }, w = (g) => {
247
- t.forward(g);
248
- }, m = (g, x) => u((O) => ({ ...O, pathname: g }), x), v = (g, x) => u((O) => {
249
- const L = { ...O }, K = Tt(g);
250
- return K == null ? delete L.hash : L.hash = K, L;
251
- }, x), b = (g) => v(void 0, g), y = (g, x) => u(
252
- (O) => ({
253
- ...O,
254
- search: ge(O.search, g)
225
+ t.commit(P, x, S);
226
+ }, l = (p, x) => {
227
+ const S = Qe(x, "pushState");
228
+ c(p, x, S);
229
+ }, u = (p, x) => {
230
+ const S = p(it(t.location.value));
231
+ l(S, x);
232
+ }, h = (p, x) => {
233
+ const S = t.resolve(p);
234
+ l(S, x);
235
+ }, g = (p, x) => {
236
+ const S = { ...x, replace: !0 };
237
+ h(p, S);
238
+ }, f = (p, x) => {
239
+ t.go(p, x);
240
+ }, d = (p) => {
241
+ t.back(p);
242
+ }, y = (p) => {
243
+ t.forward(p);
244
+ }, m = (p, x) => u((S) => ({ ...S, pathname: p }), x), v = (p, x) => u((S) => {
245
+ const P = { ...S }, K = kt(p);
246
+ return K == null ? delete P.hash : P.hash = K, P;
247
+ }, x), b = (p) => v(void 0, p), w = (p, x) => u(
248
+ (S) => ({
249
+ ...S,
250
+ search: ge(S.search, p)
255
251
  }),
256
252
  x
257
253
  );
@@ -259,118 +255,118 @@ const Je = (t, e) => t != null && t.replace ? "replaceState" : e, Ge = (t) => {
259
255
  handle: {
260
256
  location: e,
261
257
  url: n,
262
- pathname: s,
258
+ pathname: o,
263
259
  search: r,
264
260
  hash: i,
265
261
  setLocation: l,
266
262
  updateLocation: u,
267
263
  navigate: h,
268
- replace: p,
264
+ replace: g,
269
265
  go: f,
270
266
  back: d,
271
- forward: w,
267
+ forward: y,
272
268
  setPathname: m,
273
269
  setHash: v,
274
270
  clearHash: b,
275
- setSearch: y,
276
- setSearchParam: (g, x, O) => y({ [g]: x }, O),
277
- updateSearch: (g, x) => u(
278
- (O) => ({
279
- ...O,
280
- search: { ...g({ ...O.search }) }
271
+ setSearch: w,
272
+ setSearchParam: (p, x, S) => w({ [p]: x }, S),
273
+ updateSearch: (p, x) => u(
274
+ (S) => ({
275
+ ...S,
276
+ search: { ...p({ ...S.search }) }
281
277
  }),
282
278
  x
283
279
  ),
284
- queryParam: (g) => e.map((x) => x.search[g]),
285
- run: (g, x) => {
286
- const O = new Qe(
280
+ queryParam: (p) => e.map((x) => x.search[p]),
281
+ run: (p, x) => {
282
+ const S = new Xe(
287
283
  it(t.location.value)
288
284
  );
289
- g(O), l(it(O.location), x);
285
+ p(S), l(it(S.location), x);
290
286
  },
291
- match: o,
287
+ match: s,
292
288
  matchSignal: a
293
289
  },
294
290
  dispose: () => {
295
- t.dispose(), n.dispose(), s.dispose(), r.dispose(), i.dispose();
291
+ t.dispose(), n.dispose(), o.dispose(), r.dispose(), i.dispose();
296
292
  }
297
293
  };
298
- }, Ze = (t) => {
294
+ }, Ge = (t) => {
299
295
  if (t.isBrowser())
300
- return Ie();
296
+ return je();
301
297
  if (t.isHeadless())
302
- return qe(t);
298
+ return Ye(t);
303
299
  throw new Error("Unknown context");
304
- }, zt = {
305
- mark: Mt("Location"),
300
+ }, $t = {
301
+ mark: Ft("Location"),
306
302
  create: (t, e) => {
307
- const n = Ze(e), { handle: s, dispose: r } = Ge(n);
303
+ const n = Ge(e), { handle: o, dispose: r } = Je(n);
308
304
  return {
309
- value: s,
305
+ value: o,
310
306
  dispose: r
311
307
  };
312
308
  }
313
- }, tn = (t, ...e) => {
314
- if (typeof t == "string" || ce.is(t))
315
- return tn({ href: t }, ...e);
316
- const { href: n, state: s, scroll: r, viewTransition: i, replace: o, ...a } = t;
317
- return ct(zt, (c) => Lt.a(
318
- le.click(
319
- Ue(() => {
309
+ }, Ze = (t, ...e) => {
310
+ if (typeof t == "string" || le.is(t))
311
+ return Ze({ href: t }, ...e);
312
+ const { href: n, state: o, scroll: r, viewTransition: i, replace: s, ...a } = t;
313
+ return ct($t, (c) => Et.a(
314
+ ue.click(
315
+ _e(() => {
320
316
  let l = !1;
321
317
  const u = {};
322
- return s !== void 0 && (u.state = s, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), o !== void 0 && (u.replace = o, l = !0), c.navigate(
318
+ return o !== void 0 && (u.state = o, l = !0), r !== void 0 && (u.scroll = r, l = !0), i !== void 0 && (u.viewTransition = i, l = !0), s !== void 0 && (u.replace = s, l = !0), c.navigate(
323
319
  C.get(n),
324
320
  l ? u : void 0
325
321
  ), !0;
326
322
  }, a)
327
323
  ),
328
- Vt.href(n),
324
+ Nt.href(n),
329
325
  ...e
330
326
  /* c8 ignore next 2 */
331
327
  ));
332
- }, cs = {
333
- mark: Mt("Appearance"),
328
+ }, vo = {
329
+ mark: Ft("Appearance"),
334
330
  create: () => {
335
- const t = en();
331
+ const t = tn();
336
332
  return {
337
333
  value: t,
338
334
  dispose: t.dispose
339
335
  };
340
336
  }
341
337
  };
342
- function en() {
343
- const t = ot(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = (e == null ? void 0 : e.matches) ?? !1, s = M(n ? "dark" : "light"), r = (i) => s.set(i.matches ? "dark" : "light");
344
- return e == null || e.addEventListener("change", r), s.onDispose(() => e == null ? void 0 : e.removeEventListener("change", r)), s;
338
+ function tn() {
339
+ const t = st(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, n = e?.matches ?? !1, o = M(n ? "dark" : "light"), r = (i) => o.set(i.matches ? "dark" : "light");
340
+ return e?.addEventListener("change", r), o.onDispose(() => e?.removeEventListener("change", r)), o;
345
341
  }
346
- const pe = (t, e) => {
342
+ const we = (t, e) => {
347
343
  if (typeof e == "function")
348
- return pe(t, { success: e });
349
- const n = e.failure ?? ((o) => o.map((a) => `Error: ${a}`)), s = e.success, r = e.loading ?? (() => Et), i = e.notAsked ?? (() => Et);
350
- return ue(C.toSignal(t), {
351
- AsyncSuccess: (o) => s(o.$.value),
352
- AsyncFailure: (o) => n(o.$.error),
353
- Loading: (o) => r(o.map((a) => a.previousValue)),
344
+ return we(t, { success: e });
345
+ const n = e.failure ?? ((s) => s.map((a) => `Error: ${a}`)), o = e.success, r = e.loading ?? (() => Pt), i = e.notAsked ?? (() => Pt);
346
+ return fe(C.toSignal(t), {
347
+ AsyncSuccess: (s) => o(s.$.value),
348
+ AsyncFailure: (s) => n(s.$.error),
349
+ Loading: (s) => r(s.map((a) => a.previousValue)),
354
350
  NotAsked: i
355
351
  });
356
- }, ls = (t = 10) => _((e) => N(me(() => e == null ? void 0 : e.focus(), t))), us = (t = 10) => _((e) => {
357
- const n = me(() => e.select(), t);
352
+ }, yo = (t = 10) => _((e) => N(pe(() => e?.focus(), t))), xo = (t = 10) => _((e) => {
353
+ const n = pe(() => e.select(), t);
358
354
  return N(n);
359
355
  });
360
- function fs(t) {
356
+ function bo(t) {
361
357
  const e = Object.entries(t);
362
358
  return Y(
363
359
  ...e.map(
364
- ([n, s]) => Vt.class(C.map(s, (r) => r ? n : void 0))
360
+ ([n, o]) => Nt.class(C.map(o, (r) => r ? n : void 0))
365
361
  )
366
362
  );
367
363
  }
368
- const hs = _((t) => {
364
+ const So = _((t) => {
369
365
  const e = t.style.getPropertyValue(":empty");
370
366
  return t.style.setProperty(":empty", "display:none"), N((n) => {
371
367
  n && t.style.setProperty(":empty", e);
372
368
  });
373
- }), ds = (t) => fe("head > title", Vt.innerText(t)), nn = {
369
+ }), Oo = (t) => he("head > title", Nt.innerText(t)), en = {
374
370
  partial: {
375
371
  root: null,
376
372
  rootMargin: "0px",
@@ -381,165 +377,163 @@ const hs = _((t) => {
381
377
  rootMargin: "0px",
382
378
  threshold: 1
383
379
  }
384
- }, wt = {
380
+ }, gt = {
385
381
  partial: /* @__PURE__ */ new Map(),
386
382
  full: /* @__PURE__ */ new Map()
387
383
  }, at = {
388
384
  partial: null,
389
385
  full: null
390
386
  };
391
- function sn(t) {
387
+ function nn(t) {
392
388
  return at[t] == null && (at[t] = new IntersectionObserver((e) => {
393
389
  e.forEach((n) => {
394
- const s = wt[t].get(n.target);
395
- s == null || s.set(n.isIntersecting);
390
+ gt[t].get(n.target)?.set(n.isIntersecting);
396
391
  });
397
- }, nn[t])), at[t];
392
+ }, en[t])), at[t];
398
393
  }
399
394
  const on = ({ mode: t = "partial", once: e = !1 }, n) => {
400
- const s = M(!1);
395
+ const o = M(!1);
401
396
  return Y(
402
397
  _((r) => {
403
- const i = typeof IntersectionObserver < "u" ? sn(t) : null;
404
- wt[t].set(r, s), i == null || i.observe(r);
405
- function o() {
406
- var c;
407
- i == null || i.unobserve(r), wt[t].delete(r), wt[t].size === 0 && ((c = at[t]) == null || c.disconnect(), at[t] = null);
398
+ const i = typeof IntersectionObserver < "u" ? nn(t) : null;
399
+ gt[t].set(r, o), i?.observe(r);
400
+ function s() {
401
+ i?.unobserve(r), gt[t].delete(r), gt[t].size === 0 && (at[t]?.disconnect(), at[t] = null);
408
402
  }
409
403
  let a = null;
410
- return e && (a = s.on((c) => {
411
- c && o();
404
+ return e && (a = o.on((c) => {
405
+ c && s();
412
406
  })), N(() => {
413
- s.dispose(), o(), a == null || a();
407
+ o.dispose(), s(), a?.();
414
408
  });
415
409
  }),
416
- $t(n(s))
410
+ Vt(n(o))
417
411
  );
418
- }, ms = (t, e, n) => on(t, (s) => he(s, e, n ?? (() => Et)));
419
- function rn(t) {
412
+ }, Ao = (t, e, n) => on(t, (o) => de(o, e, n ?? (() => Pt)));
413
+ function sn(t) {
420
414
  return _((e) => {
421
- const n = (s) => {
422
- e.contains(s.target) || t(s);
415
+ const n = (o) => {
416
+ e.contains(o.target) || t(o);
423
417
  };
424
418
  return document.addEventListener("click", n), N(() => {
425
419
  document.removeEventListener("click", n);
426
420
  });
427
421
  });
428
422
  }
429
- const Z = (t, e) => t === void 0 || t === e, Jt = (t, e) => t === void 0 || t === e;
430
- function an(t, e) {
431
- return typeof t == "string" ? e.key === t : Jt(t.key, e.key) && Jt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
423
+ const Z = (t, e) => t === void 0 || t === e, Qt = (t, e) => t === void 0 || t === e;
424
+ function rn(t, e) {
425
+ return typeof t == "string" ? e.key === t : Qt(t.key, e.key) && Qt(t.code, e.code) && Z(t.ctrlKey, e.ctrlKey) && Z(t.altKey, e.altKey) && Z(t.shiftKey, e.shiftKey) && Z(t.metaKey, e.metaKey) && Z(t.repeat, e.repeat) && Z(
432
426
  t.commandOrControlKey,
433
427
  e.metaKey || e.ctrlKey
434
428
  );
435
429
  }
436
- function we({
430
+ function ve({
437
431
  allowedKeys: t,
438
432
  handler: e
439
433
  }) {
440
434
  return _((n) => {
441
- const s = (r) => {
435
+ const o = (r) => {
442
436
  if (n.contains(r.target)) {
443
437
  for (const i of t)
444
- if (an(i, r)) {
438
+ if (rn(i, r)) {
445
439
  e(r);
446
440
  break;
447
441
  }
448
442
  }
449
443
  };
450
- return document.addEventListener("keydown", s), N(() => {
451
- document.removeEventListener("keydown", s);
444
+ return document.addEventListener("keydown", o), N(() => {
445
+ document.removeEventListener("keydown", o);
452
446
  });
453
447
  });
454
448
  }
455
- function gs(t) {
456
- return we({ allowedKeys: ["Enter"], handler: t });
449
+ function Ro(t) {
450
+ return ve({ allowedKeys: ["Enter"], handler: t });
457
451
  }
458
- function ps(t) {
459
- return we({ allowedKeys: ["Escape"], handler: t });
452
+ function Eo(t) {
453
+ return ve({ allowedKeys: ["Escape"], handler: t });
460
454
  }
461
- const cn = ({
455
+ const an = ({
462
456
  mutate: t,
463
457
  convertError: e,
464
458
  onSuccess: n,
465
- onError: s,
459
+ onError: o,
466
460
  onSettled: r
467
461
  }) => {
468
462
  let i;
469
- const o = M(S.notAsked), a = o.map(
470
- (d) => S.isSuccess(d) ? d.value : void 0
471
- ), c = o.map(
472
- (d) => S.isFailure(d) ? d.error : void 0
473
- ), l = o.map((d) => S.isLoading(d)), u = () => {
474
- i == null || i.abort(), i = void 0;
463
+ const s = M(R.notAsked), a = s.map(
464
+ (d) => R.isSuccess(d) ? d.value : void 0
465
+ ), c = s.map(
466
+ (d) => R.isFailure(d) ? d.error : void 0
467
+ ), l = s.map((d) => R.isLoading(d)), u = () => {
468
+ i?.abort(), i = void 0;
475
469
  };
476
470
  return {
477
- status: o,
471
+ status: s,
478
472
  value: a,
479
473
  error: c,
480
474
  pending: l,
481
- execute: async (d, w) => {
475
+ execute: async (d, y) => {
482
476
  u(), i = new AbortController();
483
- const m = i.signal, v = o.get(), b = (w == null ? void 0 : w.optimisticValue) ?? ((w == null ? void 0 : w.optimisticFromRequest) != null ? w.optimisticFromRequest(d) : void 0);
484
- b != null ? o.set(S.loading(b)) : o.set(S.loading(S.getOrUndefined(v)));
477
+ const m = i.signal, v = s.get(), b = y?.optimisticValue ?? (y?.optimisticFromRequest != null ? y.optimisticFromRequest(d) : void 0);
478
+ b != null ? s.set(R.loading(b)) : s.set(R.loading(R.getOrUndefined(v)));
485
479
  try {
486
- const y = await t({ request: d, abortSignal: m, previous: v });
487
- i = void 0, o.set(S.success(y)), n == null || n(y, d);
488
- } catch (y) {
489
- i = void 0, o.set(S.failure(e(y))), s == null || s(e(y), d);
480
+ const w = await t({ request: d, abortSignal: m, previous: v });
481
+ i = void 0, s.set(R.success(w)), n?.(w, d);
482
+ } catch (w) {
483
+ i = void 0, s.set(R.failure(e(w))), o?.(e(w), d);
490
484
  }
491
- r == null || r(o.get(), d);
485
+ r?.(s.get(), d);
492
486
  },
493
487
  cancel: (d) => {
494
- u(), o.set(d ?? S.notAsked);
488
+ u(), s.set(d ?? R.notAsked);
495
489
  },
496
490
  dispose: () => {
497
- i == null || i.abort(), i = void 0, o.dispose();
491
+ i?.abort(), i = void 0, s.dispose();
498
492
  }
499
493
  };
500
- }, ln = (t, e) => {
501
- const { status: n, dispose: s, execute: r, cancel: i, pending: o, error: a, value: c } = t, { content: l } = e, u = We(c);
494
+ }, cn = (t, e) => {
495
+ const { status: n, dispose: o, execute: r, cancel: i, pending: s, error: a, value: c } = t, { content: l } = e, u = He(c);
502
496
  return Y(
503
- N(s),
497
+ N(o),
504
498
  l({
505
499
  previous: u,
506
500
  execute: r,
507
501
  cancel: i,
508
- pending: o,
502
+ pending: s,
509
503
  error: a,
510
504
  value: c,
511
505
  status: n
512
506
  })
513
507
  );
514
- }, ws = ({
508
+ }, Po = ({
515
509
  mutate: t,
516
- convertError: e = (o) => o,
510
+ convertError: e = (s) => s,
517
511
  onSuccess: n,
518
- onError: s,
512
+ onError: o,
519
513
  onSettled: r,
520
514
  content: i
521
515
  }) => {
522
- const o = cn({
516
+ const s = an({
523
517
  mutate: t,
524
518
  convertError: e,
525
519
  onSuccess: n,
526
- onError: s,
520
+ onError: o,
527
521
  onSettled: r
528
522
  });
529
- return ln(o, { content: i });
530
- }, nt = Math.min, Q = Math.max, yt = Math.round, pt = Math.floor, V = (t) => ({
523
+ return cn(s, { content: i });
524
+ }, nt = Math.min, Q = Math.max, wt = Math.round, pt = Math.floor, V = (t) => ({
531
525
  x: t,
532
526
  y: t
533
- }), un = {
527
+ }), ln = {
534
528
  left: "right",
535
529
  right: "left",
536
530
  bottom: "top",
537
531
  top: "bottom"
538
- }, fn = {
532
+ }, un = {
539
533
  start: "end",
540
534
  end: "start"
541
535
  };
542
- function Ct(t, e, n) {
536
+ function Tt(t, e, n) {
543
537
  return Q(t, nt(e, n));
544
538
  }
545
539
  function ft(t, e) {
@@ -554,50 +548,51 @@ function ht(t) {
554
548
  function ye(t) {
555
549
  return t === "x" ? "y" : "x";
556
550
  }
557
- function Bt(t) {
551
+ function zt(t) {
558
552
  return t === "y" ? "height" : "width";
559
553
  }
554
+ const fn = /* @__PURE__ */ new Set(["top", "bottom"]);
560
555
  function I(t) {
561
- return ["top", "bottom"].includes(J(t)) ? "y" : "x";
556
+ return fn.has(J(t)) ? "y" : "x";
562
557
  }
563
- function _t(t) {
558
+ function Bt(t) {
564
559
  return ye(I(t));
565
560
  }
566
561
  function hn(t, e, n) {
567
562
  n === void 0 && (n = !1);
568
- const s = ht(t), r = _t(t), i = Bt(r);
569
- let o = r === "x" ? s === (n ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
570
- return e.reference[i] > e.floating[i] && (o = vt(o)), [o, vt(o)];
563
+ const o = ht(t), r = Bt(t), i = zt(r);
564
+ let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
565
+ return e.reference[i] > e.floating[i] && (s = vt(s)), [s, vt(s)];
571
566
  }
572
567
  function dn(t) {
573
568
  const e = vt(t);
574
- return [Dt(t), e, Dt(e)];
569
+ return [Ct(t), e, Ct(e)];
575
570
  }
576
- function Dt(t) {
577
- return t.replace(/start|end/g, (e) => fn[e]);
571
+ function Ct(t) {
572
+ return t.replace(/start|end/g, (e) => un[e]);
578
573
  }
579
- function mn(t, e, n) {
580
- const s = ["left", "right"], r = ["right", "left"], i = ["top", "bottom"], o = ["bottom", "top"];
574
+ const Jt = ["left", "right"], Gt = ["right", "left"], mn = ["top", "bottom"], pn = ["bottom", "top"];
575
+ function gn(t, e, n) {
581
576
  switch (t) {
582
577
  case "top":
583
578
  case "bottom":
584
- return n ? e ? r : s : e ? s : r;
579
+ return n ? e ? Gt : Jt : e ? Jt : Gt;
585
580
  case "left":
586
581
  case "right":
587
- return e ? i : o;
582
+ return e ? mn : pn;
588
583
  default:
589
584
  return [];
590
585
  }
591
586
  }
592
- function gn(t, e, n, s) {
587
+ function wn(t, e, n, o) {
593
588
  const r = ht(t);
594
- let i = mn(J(t), n === "start", s);
595
- return r && (i = i.map((o) => o + "-" + r), e && (i = i.concat(i.map(Dt)))), i;
589
+ let i = gn(J(t), n === "start", o);
590
+ return r && (i = i.map((s) => s + "-" + r), e && (i = i.concat(i.map(Ct)))), i;
596
591
  }
597
592
  function vt(t) {
598
- return t.replace(/left|right|bottom|top/g, (e) => un[e]);
593
+ return t.replace(/left|right|bottom|top/g, (e) => ln[e]);
599
594
  }
600
- function pn(t) {
595
+ function vn(t) {
601
596
  return {
602
597
  top: 0,
603
598
  right: 0,
@@ -606,196 +601,196 @@ function pn(t) {
606
601
  ...t
607
602
  };
608
603
  }
609
- function ve(t) {
610
- return typeof t != "number" ? pn(t) : {
604
+ function xe(t) {
605
+ return typeof t != "number" ? vn(t) : {
611
606
  top: t,
612
607
  right: t,
613
608
  bottom: t,
614
609
  left: t
615
610
  };
616
611
  }
617
- function xt(t) {
612
+ function yt(t) {
618
613
  const {
619
614
  x: e,
620
615
  y: n,
621
- width: s,
616
+ width: o,
622
617
  height: r
623
618
  } = t;
624
619
  return {
625
- width: s,
620
+ width: o,
626
621
  height: r,
627
622
  top: n,
628
623
  left: e,
629
- right: e + s,
624
+ right: e + o,
630
625
  bottom: n + r,
631
626
  x: e,
632
627
  y: n
633
628
  };
634
629
  }
635
- function Gt(t, e, n) {
630
+ function Zt(t, e, n) {
636
631
  let {
637
- reference: s,
632
+ reference: o,
638
633
  floating: r
639
634
  } = t;
640
- const i = I(e), o = _t(e), a = Bt(o), c = J(e), l = i === "y", u = s.x + s.width / 2 - r.width / 2, h = s.y + s.height / 2 - r.height / 2, p = s[a] / 2 - r[a] / 2;
635
+ const i = I(e), s = Bt(e), a = zt(s), c = J(e), l = i === "y", u = o.x + o.width / 2 - r.width / 2, h = o.y + o.height / 2 - r.height / 2, g = o[a] / 2 - r[a] / 2;
641
636
  let f;
642
637
  switch (c) {
643
638
  case "top":
644
639
  f = {
645
640
  x: u,
646
- y: s.y - r.height
641
+ y: o.y - r.height
647
642
  };
648
643
  break;
649
644
  case "bottom":
650
645
  f = {
651
646
  x: u,
652
- y: s.y + s.height
647
+ y: o.y + o.height
653
648
  };
654
649
  break;
655
650
  case "right":
656
651
  f = {
657
- x: s.x + s.width,
652
+ x: o.x + o.width,
658
653
  y: h
659
654
  };
660
655
  break;
661
656
  case "left":
662
657
  f = {
663
- x: s.x - r.width,
658
+ x: o.x - r.width,
664
659
  y: h
665
660
  };
666
661
  break;
667
662
  default:
668
663
  f = {
669
- x: s.x,
670
- y: s.y
664
+ x: o.x,
665
+ y: o.y
671
666
  };
672
667
  }
673
668
  switch (ht(e)) {
674
669
  case "start":
675
- f[o] -= p * (n && l ? -1 : 1);
670
+ f[s] -= g * (n && l ? -1 : 1);
676
671
  break;
677
672
  case "end":
678
- f[o] += p * (n && l ? -1 : 1);
673
+ f[s] += g * (n && l ? -1 : 1);
679
674
  break;
680
675
  }
681
676
  return f;
682
677
  }
683
- const wn = async (t, e, n) => {
678
+ const yn = async (t, e, n) => {
684
679
  const {
685
- placement: s = "bottom",
680
+ placement: o = "bottom",
686
681
  strategy: r = "absolute",
687
682
  middleware: i = [],
688
- platform: o
689
- } = n, a = i.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(e));
690
- let l = await o.getElementRects({
683
+ platform: s
684
+ } = n, a = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(e));
685
+ let l = await s.getElementRects({
691
686
  reference: t,
692
687
  floating: e,
693
688
  strategy: r
694
689
  }), {
695
690
  x: u,
696
691
  y: h
697
- } = Gt(l, s, c), p = s, f = {}, d = 0;
698
- for (let w = 0; w < a.length; w++) {
692
+ } = Zt(l, o, c), g = o, f = {}, d = 0;
693
+ for (let y = 0; y < a.length; y++) {
699
694
  const {
700
695
  name: m,
701
696
  fn: v
702
- } = a[w], {
697
+ } = a[y], {
703
698
  x: b,
704
- y,
705
- data: R,
706
- reset: A
699
+ y: w,
700
+ data: A,
701
+ reset: O
707
702
  } = await v({
708
703
  x: u,
709
704
  y: h,
710
- initialPlacement: s,
711
- placement: p,
705
+ initialPlacement: o,
706
+ placement: g,
712
707
  strategy: r,
713
708
  middlewareData: f,
714
709
  rects: l,
715
- platform: o,
710
+ platform: s,
716
711
  elements: {
717
712
  reference: t,
718
713
  floating: e
719
714
  }
720
715
  });
721
- u = b ?? u, h = y ?? h, f = {
716
+ u = b ?? u, h = w ?? h, f = {
722
717
  ...f,
723
718
  [m]: {
724
719
  ...f[m],
725
- ...R
720
+ ...A
726
721
  }
727
- }, A && d <= 50 && (d++, typeof A == "object" && (A.placement && (p = A.placement), A.rects && (l = A.rects === !0 ? await o.getElementRects({
722
+ }, O && d <= 50 && (d++, typeof O == "object" && (O.placement && (g = O.placement), O.rects && (l = O.rects === !0 ? await s.getElementRects({
728
723
  reference: t,
729
724
  floating: e,
730
725
  strategy: r
731
- }) : A.rects), {
726
+ }) : O.rects), {
732
727
  x: u,
733
728
  y: h
734
- } = Gt(l, p, c)), w = -1);
729
+ } = Zt(l, g, c)), y = -1);
735
730
  }
736
731
  return {
737
732
  x: u,
738
733
  y: h,
739
- placement: p,
734
+ placement: g,
740
735
  strategy: r,
741
736
  middlewareData: f
742
737
  };
743
738
  };
744
- async function xe(t, e) {
739
+ async function be(t, e) {
745
740
  var n;
746
741
  e === void 0 && (e = {});
747
742
  const {
748
- x: s,
743
+ x: o,
749
744
  y: r,
750
745
  platform: i,
751
- rects: o,
746
+ rects: s,
752
747
  elements: a,
753
748
  strategy: c
754
749
  } = t, {
755
750
  boundary: l = "clippingAncestors",
756
751
  rootBoundary: u = "viewport",
757
752
  elementContext: h = "floating",
758
- altBoundary: p = !1,
753
+ altBoundary: g = !1,
759
754
  padding: f = 0
760
- } = ft(e, t), d = ve(f), m = a[p ? h === "floating" ? "reference" : "floating" : h], v = xt(await i.getClippingRect({
755
+ } = ft(e, t), d = xe(f), m = a[g ? h === "floating" ? "reference" : "floating" : h], v = yt(await i.getClippingRect({
761
756
  element: (n = await (i.isElement == null ? void 0 : i.isElement(m))) == null || n ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
762
757
  boundary: l,
763
758
  rootBoundary: u,
764
759
  strategy: c
765
760
  })), b = h === "floating" ? {
766
- x: s,
761
+ x: o,
767
762
  y: r,
768
- width: o.floating.width,
769
- height: o.floating.height
770
- } : o.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), R = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
763
+ width: s.floating.width,
764
+ height: s.floating.height
765
+ } : s.reference, w = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), A = await (i.isElement == null ? void 0 : i.isElement(w)) ? await (i.getScale == null ? void 0 : i.getScale(w)) || {
771
766
  x: 1,
772
767
  y: 1
773
768
  } : {
774
769
  x: 1,
775
770
  y: 1
776
- }, A = xt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
771
+ }, O = yt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
777
772
  elements: a,
778
773
  rect: b,
779
- offsetParent: y,
774
+ offsetParent: w,
780
775
  strategy: c
781
776
  }) : b);
782
777
  return {
783
- top: (v.top - A.top + d.top) / R.y,
784
- bottom: (A.bottom - v.bottom + d.bottom) / R.y,
785
- left: (v.left - A.left + d.left) / R.x,
786
- right: (A.right - v.right + d.right) / R.x
778
+ top: (v.top - O.top + d.top) / A.y,
779
+ bottom: (O.bottom - v.bottom + d.bottom) / A.y,
780
+ left: (v.left - O.left + d.left) / A.x,
781
+ right: (O.right - v.right + d.right) / A.x
787
782
  };
788
783
  }
789
- const yn = (t) => ({
784
+ const xn = (t) => ({
790
785
  name: "arrow",
791
786
  options: t,
792
787
  async fn(e) {
793
788
  const {
794
789
  x: n,
795
- y: s,
790
+ y: o,
796
791
  placement: r,
797
792
  rects: i,
798
- platform: o,
793
+ platform: s,
799
794
  elements: a,
800
795
  middlewareData: c
801
796
  } = e, {
@@ -804,18 +799,18 @@ const yn = (t) => ({
804
799
  } = ft(t, e) || {};
805
800
  if (l == null)
806
801
  return {};
807
- const h = ve(u), p = {
802
+ const h = xe(u), g = {
808
803
  x: n,
809
- y: s
810
- }, f = _t(r), d = Bt(f), w = await o.getDimensions(l), m = f === "y", v = m ? "top" : "left", b = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", R = i.reference[d] + i.reference[f] - p[f] - i.floating[d], A = p[f] - i.reference[f], T = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l));
811
- let P = T ? T[y] : 0;
812
- (!P || !await (o.isElement == null ? void 0 : o.isElement(T))) && (P = a.floating[y] || i.floating[d]);
813
- const U = R / 2 - A / 2, g = P / 2 - w[d] / 2 - 1, x = nt(h[v], g), O = nt(h[b], g), L = x, K = P - w[d] - O, E = P / 2 - w[d] / 2 + U, X = Ct(L, E, K), B = !c.arrow && ht(r) != null && E !== X && i.reference[d] / 2 - (E < L ? x : O) - w[d] / 2 < 0, D = B ? E < L ? E - L : E - K : 0;
804
+ y: o
805
+ }, f = Bt(r), d = zt(f), y = await s.getDimensions(l), m = f === "y", v = m ? "top" : "left", b = m ? "bottom" : "right", w = m ? "clientHeight" : "clientWidth", A = i.reference[d] + i.reference[f] - g[f] - i.floating[d], O = g[f] - i.reference[f], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
806
+ let E = T ? T[w] : 0;
807
+ (!E || !await (s.isElement == null ? void 0 : s.isElement(T))) && (E = a.floating[w] || i.floating[d]);
808
+ const U = A / 2 - O / 2, p = E / 2 - y[d] / 2 - 1, x = nt(h[v], p), S = nt(h[b], p), P = x, K = E - y[d] - S, L = E / 2 - y[d] / 2 + U, X = Tt(P, L, K), B = !c.arrow && ht(r) != null && L !== X && i.reference[d] / 2 - (L < P ? x : S) - y[d] / 2 < 0, D = B ? L < P ? L - P : L - K : 0;
814
809
  return {
815
- [f]: p[f] + D,
810
+ [f]: g[f] + D,
816
811
  data: {
817
812
  [f]: X,
818
- centerOffset: E - X - D,
813
+ centerOffset: L - X - D,
819
814
  ...B && {
820
815
  alignmentOffset: D
821
816
  }
@@ -823,57 +818,57 @@ const yn = (t) => ({
823
818
  reset: B
824
819
  };
825
820
  }
826
- }), vn = function(t) {
821
+ }), bn = function(t) {
827
822
  return t === void 0 && (t = {}), {
828
823
  name: "flip",
829
824
  options: t,
830
825
  async fn(e) {
831
- var n, s;
826
+ var n, o;
832
827
  const {
833
828
  placement: r,
834
829
  middlewareData: i,
835
- rects: o,
830
+ rects: s,
836
831
  initialPlacement: a,
837
832
  platform: c,
838
833
  elements: l
839
834
  } = e, {
840
835
  mainAxis: u = !0,
841
836
  crossAxis: h = !0,
842
- fallbackPlacements: p,
837
+ fallbackPlacements: g,
843
838
  fallbackStrategy: f = "bestFit",
844
839
  fallbackAxisSideDirection: d = "none",
845
- flipAlignment: w = !0,
840
+ flipAlignment: y = !0,
846
841
  ...m
847
842
  } = ft(t, e);
848
843
  if ((n = i.arrow) != null && n.alignmentOffset)
849
844
  return {};
850
- const v = J(r), b = I(a), y = J(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), A = p || (y || !w ? [vt(a)] : dn(a)), T = d !== "none";
851
- !p && T && A.push(...gn(a, w, d, R));
852
- const P = [a, ...A], U = await xe(e, m), g = [];
853
- let x = ((s = i.flip) == null ? void 0 : s.overflows) || [];
854
- if (u && g.push(U[v]), h) {
855
- const E = hn(r, o, R);
856
- g.push(U[E[0]], U[E[1]]);
845
+ const v = J(r), b = I(a), w = J(a) === a, A = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), O = g || (w || !y ? [vt(a)] : dn(a)), T = d !== "none";
846
+ !g && T && O.push(...wn(a, y, d, A));
847
+ const E = [a, ...O], U = await be(e, m), p = [];
848
+ let x = ((o = i.flip) == null ? void 0 : o.overflows) || [];
849
+ if (u && p.push(U[v]), h) {
850
+ const L = hn(r, s, A);
851
+ p.push(U[L[0]], U[L[1]]);
857
852
  }
858
853
  if (x = [...x, {
859
854
  placement: r,
860
- overflows: g
861
- }], !g.every((E) => E <= 0)) {
862
- var O, L;
863
- const E = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, X = P[E];
855
+ overflows: p
856
+ }], !p.every((L) => L <= 0)) {
857
+ var S, P;
858
+ const L = (((S = i.flip) == null ? void 0 : S.index) || 0) + 1, X = E[L];
864
859
  if (X && (!(h === "alignment" ? b !== I(X) : !1) || // We leave the current main axis only if every placement on that axis
865
860
  // overflows the main axis.
866
- x.every((H) => H.overflows[0] > 0 && I(H.placement) === b)))
861
+ x.every((H) => I(H.placement) === b ? H.overflows[0] > 0 : !0)))
867
862
  return {
868
863
  data: {
869
- index: E,
864
+ index: L,
870
865
  overflows: x
871
866
  },
872
867
  reset: {
873
868
  placement: X
874
869
  }
875
870
  };
876
- let B = (L = x.filter((D) => D.overflows[0] <= 0).sort((D, H) => D.overflows[1] - H.overflows[1])[0]) == null ? void 0 : L.placement;
871
+ let B = (P = x.filter((D) => D.overflows[0] <= 0).sort((D, H) => D.overflows[1] - H.overflows[1])[0]) == null ? void 0 : P.placement;
877
872
  if (!B)
878
873
  switch (f) {
879
874
  case "bestFit": {
@@ -886,7 +881,7 @@ const yn = (t) => ({
886
881
  j === "y";
887
882
  }
888
883
  return !0;
889
- }).map((H) => [H.placement, H.overflows.filter((j) => j > 0).reduce((j, Ce) => j + Ce, 0)]).sort((H, j) => H[1] - j[1])[0]) == null ? void 0 : K[0];
884
+ }).map((H) => [H.placement, H.overflows.filter((j) => j > 0).reduce((j, De) => j + De, 0)]).sort((H, j) => H[1] - j[1])[0]) == null ? void 0 : K[0];
890
885
  D && (B = D);
891
886
  break;
892
887
  }
@@ -904,15 +899,15 @@ const yn = (t) => ({
904
899
  return {};
905
900
  }
906
901
  };
907
- };
908
- async function xn(t, e) {
902
+ }, Sn = /* @__PURE__ */ new Set(["left", "top"]);
903
+ async function On(t, e) {
909
904
  const {
910
905
  placement: n,
911
- platform: s,
906
+ platform: o,
912
907
  elements: r
913
- } = t, i = await (s.isRTL == null ? void 0 : s.isRTL(r.floating)), o = J(n), a = ht(n), c = I(n) === "y", l = ["left", "top"].includes(o) ? -1 : 1, u = i && c ? -1 : 1, h = ft(e, t);
908
+ } = t, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), s = J(n), a = ht(n), c = I(n) === "y", l = Sn.has(s) ? -1 : 1, u = i && c ? -1 : 1, h = ft(e, t);
914
909
  let {
915
- mainAxis: p,
910
+ mainAxis: g,
916
911
  crossAxis: f,
917
912
  alignmentAxis: d
918
913
  } = typeof h == "number" ? {
@@ -926,46 +921,46 @@ async function xn(t, e) {
926
921
  };
927
922
  return a && typeof d == "number" && (f = a === "end" ? d * -1 : d), c ? {
928
923
  x: f * u,
929
- y: p * l
924
+ y: g * l
930
925
  } : {
931
- x: p * l,
926
+ x: g * l,
932
927
  y: f * u
933
928
  };
934
929
  }
935
- const bn = function(t) {
930
+ const An = function(t) {
936
931
  return t === void 0 && (t = 0), {
937
932
  name: "offset",
938
933
  options: t,
939
934
  async fn(e) {
940
- var n, s;
935
+ var n, o;
941
936
  const {
942
937
  x: r,
943
938
  y: i,
944
- placement: o,
939
+ placement: s,
945
940
  middlewareData: a
946
- } = e, c = await xn(e, t);
947
- return o === ((n = a.offset) == null ? void 0 : n.placement) && (s = a.arrow) != null && s.alignmentOffset ? {} : {
941
+ } = e, c = await On(e, t);
942
+ return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
948
943
  x: r + c.x,
949
944
  y: i + c.y,
950
945
  data: {
951
946
  ...c,
952
- placement: o
947
+ placement: s
953
948
  }
954
949
  };
955
950
  }
956
951
  };
957
- }, On = function(t) {
952
+ }, Rn = function(t) {
958
953
  return t === void 0 && (t = {}), {
959
954
  name: "shift",
960
955
  options: t,
961
956
  async fn(e) {
962
957
  const {
963
958
  x: n,
964
- y: s,
959
+ y: o,
965
960
  placement: r
966
961
  } = e, {
967
962
  mainAxis: i = !0,
968
- crossAxis: o = !1,
963
+ crossAxis: s = !1,
969
964
  limiter: a = {
970
965
  fn: (m) => {
971
966
  let {
@@ -981,41 +976,41 @@ const bn = function(t) {
981
976
  ...c
982
977
  } = ft(t, e), l = {
983
978
  x: n,
984
- y: s
985
- }, u = await xe(e, c), h = I(J(r)), p = ye(h);
986
- let f = l[p], d = l[h];
979
+ y: o
980
+ }, u = await be(e, c), h = I(J(r)), g = ye(h);
981
+ let f = l[g], d = l[h];
987
982
  if (i) {
988
- const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", b = f + u[m], y = f - u[v];
989
- f = Ct(b, f, y);
983
+ const m = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", b = f + u[m], w = f - u[v];
984
+ f = Tt(b, f, w);
990
985
  }
991
- if (o) {
992
- const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], y = d - u[v];
993
- d = Ct(b, d, y);
986
+ if (s) {
987
+ const m = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", b = d + u[m], w = d - u[v];
988
+ d = Tt(b, d, w);
994
989
  }
995
- const w = a.fn({
990
+ const y = a.fn({
996
991
  ...e,
997
- [p]: f,
992
+ [g]: f,
998
993
  [h]: d
999
994
  });
1000
995
  return {
1001
- ...w,
996
+ ...y,
1002
997
  data: {
1003
- x: w.x - n,
1004
- y: w.y - s,
998
+ x: y.x - n,
999
+ y: y.y - o,
1005
1000
  enabled: {
1006
- [p]: i,
1007
- [h]: o
1001
+ [g]: i,
1002
+ [h]: s
1008
1003
  }
1009
1004
  }
1010
1005
  };
1011
1006
  }
1012
1007
  };
1013
1008
  };
1014
- function Ot() {
1009
+ function bt() {
1015
1010
  return typeof window < "u";
1016
1011
  }
1017
1012
  function rt(t) {
1018
- return be(t) ? (t.nodeName || "").toLowerCase() : "#document";
1013
+ return Se(t) ? (t.nodeName || "").toLowerCase() : "#document";
1019
1014
  }
1020
1015
  function k(t) {
1021
1016
  var e;
@@ -1023,34 +1018,37 @@ function k(t) {
1023
1018
  }
1024
1019
  function z(t) {
1025
1020
  var e;
1026
- return (e = (be(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1021
+ return (e = (Se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1027
1022
  }
1028
- function be(t) {
1029
- return Ot() ? t instanceof Node || t instanceof k(t).Node : !1;
1023
+ function Se(t) {
1024
+ return bt() ? t instanceof Node || t instanceof k(t).Node : !1;
1030
1025
  }
1031
1026
  function W(t) {
1032
- return Ot() ? t instanceof Element || t instanceof k(t).Element : !1;
1027
+ return bt() ? t instanceof Element || t instanceof k(t).Element : !1;
1033
1028
  }
1034
1029
  function $(t) {
1035
- return Ot() ? t instanceof HTMLElement || t instanceof k(t).HTMLElement : !1;
1030
+ return bt() ? t instanceof HTMLElement || t instanceof k(t).HTMLElement : !1;
1036
1031
  }
1037
- function Zt(t) {
1038
- return !Ot() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof k(t).ShadowRoot;
1032
+ function te(t) {
1033
+ return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof k(t).ShadowRoot;
1039
1034
  }
1035
+ const En = /* @__PURE__ */ new Set(["inline", "contents"]);
1040
1036
  function dt(t) {
1041
1037
  const {
1042
1038
  overflow: e,
1043
1039
  overflowX: n,
1044
- overflowY: s,
1040
+ overflowY: o,
1045
1041
  display: r
1046
1042
  } = F(t);
1047
- return /auto|scroll|overlay|hidden|clip/.test(e + s + n) && !["inline", "contents"].includes(r);
1043
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !En.has(r);
1048
1044
  }
1049
- function An(t) {
1050
- return ["table", "td", "th"].includes(rt(t));
1045
+ const Pn = /* @__PURE__ */ new Set(["table", "td", "th"]);
1046
+ function Ln(t) {
1047
+ return Pn.has(rt(t));
1051
1048
  }
1052
- function At(t) {
1053
- return [":popover-open", ":modal"].some((e) => {
1049
+ const kn = [":popover-open", ":modal"];
1050
+ function St(t) {
1051
+ return kn.some((e) => {
1054
1052
  try {
1055
1053
  return t.matches(e);
1056
1054
  } catch {
@@ -1058,31 +1056,33 @@ function At(t) {
1058
1056
  }
1059
1057
  });
1060
1058
  }
1061
- function Ut(t) {
1062
- const e = Kt(), n = W(t) ? F(t) : t;
1063
- return ["transform", "translate", "scale", "rotate", "perspective"].some((s) => n[s] ? n[s] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((s) => (n.willChange || "").includes(s)) || ["paint", "layout", "strict", "content"].some((s) => (n.contain || "").includes(s));
1059
+ const Tn = ["transform", "translate", "scale", "rotate", "perspective"], Cn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Dn = ["paint", "layout", "strict", "content"];
1060
+ function _t(t) {
1061
+ const e = Ut(), n = W(t) ? F(t) : t;
1062
+ return Tn.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Cn.some((o) => (n.willChange || "").includes(o)) || Dn.some((o) => (n.contain || "").includes(o));
1064
1063
  }
1065
- function Rn(t) {
1064
+ function Hn(t) {
1066
1065
  let e = q(t);
1067
- for (; $(e) && !st(e); ) {
1068
- if (Ut(e))
1066
+ for (; $(e) && !ot(e); ) {
1067
+ if (_t(e))
1069
1068
  return e;
1070
- if (At(e))
1069
+ if (St(e))
1071
1070
  return null;
1072
1071
  e = q(e);
1073
1072
  }
1074
1073
  return null;
1075
1074
  }
1076
- function Kt() {
1075
+ function Ut() {
1077
1076
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1078
1077
  }
1079
- function st(t) {
1080
- return ["html", "body", "#document"].includes(rt(t));
1078
+ const Wn = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1079
+ function ot(t) {
1080
+ return Wn.has(rt(t));
1081
1081
  }
1082
1082
  function F(t) {
1083
1083
  return k(t).getComputedStyle(t);
1084
1084
  }
1085
- function Rt(t) {
1085
+ function Ot(t) {
1086
1086
  return W(t) ? {
1087
1087
  scrollLeft: t.scrollLeft,
1088
1088
  scrollTop: t.scrollTop
@@ -1098,216 +1098,216 @@ function q(t) {
1098
1098
  // Step into the shadow DOM of the parent of a slotted node.
1099
1099
  t.assignedSlot || // DOM Element detected.
1100
1100
  t.parentNode || // ShadowRoot detected.
1101
- Zt(t) && t.host || // Fallback.
1101
+ te(t) && t.host || // Fallback.
1102
1102
  z(t)
1103
1103
  );
1104
- return Zt(e) ? e.host : e;
1104
+ return te(e) ? e.host : e;
1105
1105
  }
1106
1106
  function Oe(t) {
1107
1107
  const e = q(t);
1108
- return st(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
1108
+ return ot(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && dt(e) ? e : Oe(e);
1109
1109
  }
1110
1110
  function lt(t, e, n) {
1111
- var s;
1111
+ var o;
1112
1112
  e === void 0 && (e = []), n === void 0 && (n = !0);
1113
- const r = Oe(t), i = r === ((s = t.ownerDocument) == null ? void 0 : s.body), o = k(r);
1113
+ const r = Oe(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = k(r);
1114
1114
  if (i) {
1115
- const a = Ht(o);
1116
- return e.concat(o, o.visualViewport || [], dt(r) ? r : [], a && n ? lt(a) : []);
1115
+ const a = Dt(s);
1116
+ return e.concat(s, s.visualViewport || [], dt(r) ? r : [], a && n ? lt(a) : []);
1117
1117
  }
1118
1118
  return e.concat(r, lt(r, [], n));
1119
1119
  }
1120
- function Ht(t) {
1120
+ function Dt(t) {
1121
1121
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1122
1122
  }
1123
1123
  function Ae(t) {
1124
1124
  const e = F(t);
1125
- let n = parseFloat(e.width) || 0, s = parseFloat(e.height) || 0;
1126
- const r = $(t), i = r ? t.offsetWidth : n, o = r ? t.offsetHeight : s, a = yt(n) !== i || yt(s) !== o;
1127
- return a && (n = i, s = o), {
1125
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
1126
+ const r = $(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, a = wt(n) !== i || wt(o) !== s;
1127
+ return a && (n = i, o = s), {
1128
1128
  width: n,
1129
- height: s,
1129
+ height: o,
1130
1130
  $: a
1131
1131
  };
1132
1132
  }
1133
- function jt(t) {
1133
+ function Kt(t) {
1134
1134
  return W(t) ? t : t.contextElement;
1135
1135
  }
1136
1136
  function tt(t) {
1137
- const e = jt(t);
1137
+ const e = Kt(t);
1138
1138
  if (!$(e))
1139
1139
  return V(1);
1140
1140
  const n = e.getBoundingClientRect(), {
1141
- width: s,
1141
+ width: o,
1142
1142
  height: r,
1143
1143
  $: i
1144
1144
  } = Ae(e);
1145
- let o = (i ? yt(n.width) : n.width) / s, a = (i ? yt(n.height) : n.height) / r;
1146
- return (!o || !Number.isFinite(o)) && (o = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1147
- x: o,
1145
+ let s = (i ? wt(n.width) : n.width) / o, a = (i ? wt(n.height) : n.height) / r;
1146
+ return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1147
+ x: s,
1148
1148
  y: a
1149
1149
  };
1150
1150
  }
1151
- const Sn = /* @__PURE__ */ V(0);
1151
+ const Fn = /* @__PURE__ */ V(0);
1152
1152
  function Re(t) {
1153
1153
  const e = k(t);
1154
- return !Kt() || !e.visualViewport ? Sn : {
1154
+ return !Ut() || !e.visualViewport ? Fn : {
1155
1155
  x: e.visualViewport.offsetLeft,
1156
1156
  y: e.visualViewport.offsetTop
1157
1157
  };
1158
1158
  }
1159
- function Pn(t, e, n) {
1159
+ function Mn(t, e, n) {
1160
1160
  return e === void 0 && (e = !1), !n || e && n !== k(t) ? !1 : e;
1161
1161
  }
1162
- function G(t, e, n, s) {
1162
+ function G(t, e, n, o) {
1163
1163
  e === void 0 && (e = !1), n === void 0 && (n = !1);
1164
- const r = t.getBoundingClientRect(), i = jt(t);
1165
- let o = V(1);
1166
- e && (s ? W(s) && (o = tt(s)) : o = tt(t));
1167
- const a = Pn(i, n, s) ? Re(i) : V(0);
1168
- let c = (r.left + a.x) / o.x, l = (r.top + a.y) / o.y, u = r.width / o.x, h = r.height / o.y;
1164
+ const r = t.getBoundingClientRect(), i = Kt(t);
1165
+ let s = V(1);
1166
+ e && (o ? W(o) && (s = tt(o)) : s = tt(t));
1167
+ const a = Mn(i, n, o) ? Re(i) : V(0);
1168
+ let c = (r.left + a.x) / s.x, l = (r.top + a.y) / s.y, u = r.width / s.x, h = r.height / s.y;
1169
1169
  if (i) {
1170
- const p = k(i), f = s && W(s) ? k(s) : s;
1171
- let d = p, w = Ht(d);
1172
- for (; w && s && f !== d; ) {
1173
- const m = tt(w), v = w.getBoundingClientRect(), b = F(w), y = v.left + (w.clientLeft + parseFloat(b.paddingLeft)) * m.x, R = v.top + (w.clientTop + parseFloat(b.paddingTop)) * m.y;
1174
- c *= m.x, l *= m.y, u *= m.x, h *= m.y, c += y, l += R, d = k(w), w = Ht(d);
1170
+ const g = k(i), f = o && W(o) ? k(o) : o;
1171
+ let d = g, y = Dt(d);
1172
+ for (; y && o && f !== d; ) {
1173
+ const m = tt(y), v = y.getBoundingClientRect(), b = F(y), w = v.left + (y.clientLeft + parseFloat(b.paddingLeft)) * m.x, A = v.top + (y.clientTop + parseFloat(b.paddingTop)) * m.y;
1174
+ c *= m.x, l *= m.y, u *= m.x, h *= m.y, c += w, l += A, d = k(y), y = Dt(d);
1175
1175
  }
1176
1176
  }
1177
- return xt({
1177
+ return yt({
1178
1178
  width: u,
1179
1179
  height: h,
1180
1180
  x: c,
1181
1181
  y: l
1182
1182
  });
1183
1183
  }
1184
- function It(t, e) {
1185
- const n = Rt(t).scrollLeft;
1184
+ function jt(t, e) {
1185
+ const n = Ot(t).scrollLeft;
1186
1186
  return e ? e.left + n : G(z(t)).left + n;
1187
1187
  }
1188
- function Se(t, e, n) {
1188
+ function Ee(t, e, n) {
1189
1189
  n === void 0 && (n = !1);
1190
- const s = t.getBoundingClientRect(), r = s.left + e.scrollLeft - (n ? 0 : (
1190
+ const o = t.getBoundingClientRect(), r = o.left + e.scrollLeft - (n ? 0 : (
1191
1191
  // RTL <body> scrollbar.
1192
- It(t, s)
1193
- )), i = s.top + e.scrollTop;
1192
+ jt(t, o)
1193
+ )), i = o.top + e.scrollTop;
1194
1194
  return {
1195
1195
  x: r,
1196
1196
  y: i
1197
1197
  };
1198
1198
  }
1199
- function Ln(t) {
1199
+ function Nn(t) {
1200
1200
  let {
1201
1201
  elements: e,
1202
1202
  rect: n,
1203
- offsetParent: s,
1203
+ offsetParent: o,
1204
1204
  strategy: r
1205
1205
  } = t;
1206
- const i = r === "fixed", o = z(s), a = e ? At(e.floating) : !1;
1207
- if (s === o || a && i)
1206
+ const i = r === "fixed", s = z(o), a = e ? St(e.floating) : !1;
1207
+ if (o === s || a && i)
1208
1208
  return n;
1209
1209
  let c = {
1210
1210
  scrollLeft: 0,
1211
1211
  scrollTop: 0
1212
1212
  }, l = V(1);
1213
- const u = V(0), h = $(s);
1214
- if ((h || !h && !i) && ((rt(s) !== "body" || dt(o)) && (c = Rt(s)), $(s))) {
1215
- const f = G(s);
1216
- l = tt(s), u.x = f.x + s.clientLeft, u.y = f.y + s.clientTop;
1213
+ const u = V(0), h = $(o);
1214
+ if ((h || !h && !i) && ((rt(o) !== "body" || dt(s)) && (c = Ot(o)), $(o))) {
1215
+ const f = G(o);
1216
+ l = tt(o), u.x = f.x + o.clientLeft, u.y = f.y + o.clientTop;
1217
1217
  }
1218
- const p = o && !h && !i ? Se(o, c, !0) : V(0);
1218
+ const g = s && !h && !i ? Ee(s, c, !0) : V(0);
1219
1219
  return {
1220
1220
  width: n.width * l.x,
1221
1221
  height: n.height * l.y,
1222
- x: n.x * l.x - c.scrollLeft * l.x + u.x + p.x,
1223
- y: n.y * l.y - c.scrollTop * l.y + u.y + p.y
1222
+ x: n.x * l.x - c.scrollLeft * l.x + u.x + g.x,
1223
+ y: n.y * l.y - c.scrollTop * l.y + u.y + g.y
1224
1224
  };
1225
1225
  }
1226
- function En(t) {
1226
+ function Vn(t) {
1227
1227
  return Array.from(t.getClientRects());
1228
1228
  }
1229
- function kn(t) {
1230
- const e = z(t), n = Rt(t), s = t.ownerDocument.body, r = Q(e.scrollWidth, e.clientWidth, s.scrollWidth, s.clientWidth), i = Q(e.scrollHeight, e.clientHeight, s.scrollHeight, s.clientHeight);
1231
- let o = -n.scrollLeft + It(t);
1229
+ function $n(t) {
1230
+ const e = z(t), n = Ot(t), o = t.ownerDocument.body, r = Q(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), i = Q(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
1231
+ let s = -n.scrollLeft + jt(t);
1232
1232
  const a = -n.scrollTop;
1233
- return F(s).direction === "rtl" && (o += Q(e.clientWidth, s.clientWidth) - r), {
1233
+ return F(o).direction === "rtl" && (s += Q(e.clientWidth, o.clientWidth) - r), {
1234
1234
  width: r,
1235
1235
  height: i,
1236
- x: o,
1236
+ x: s,
1237
1237
  y: a
1238
1238
  };
1239
1239
  }
1240
- function Tn(t, e) {
1241
- const n = k(t), s = z(t), r = n.visualViewport;
1242
- let i = s.clientWidth, o = s.clientHeight, a = 0, c = 0;
1240
+ function zn(t, e) {
1241
+ const n = k(t), o = z(t), r = n.visualViewport;
1242
+ let i = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
1243
1243
  if (r) {
1244
- i = r.width, o = r.height;
1245
- const l = Kt();
1244
+ i = r.width, s = r.height;
1245
+ const l = Ut();
1246
1246
  (!l || l && e === "fixed") && (a = r.offsetLeft, c = r.offsetTop);
1247
1247
  }
1248
1248
  return {
1249
1249
  width: i,
1250
- height: o,
1250
+ height: s,
1251
1251
  x: a,
1252
1252
  y: c
1253
1253
  };
1254
1254
  }
1255
- function Cn(t, e) {
1256
- const n = G(t, !0, e === "fixed"), s = n.top + t.clientTop, r = n.left + t.clientLeft, i = $(t) ? tt(t) : V(1), o = t.clientWidth * i.x, a = t.clientHeight * i.y, c = r * i.x, l = s * i.y;
1255
+ function Bn(t, e) {
1256
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, r = n.left + t.clientLeft, i = $(t) ? tt(t) : V(1), s = t.clientWidth * i.x, a = t.clientHeight * i.y, c = r * i.x, l = o * i.y;
1257
1257
  return {
1258
- width: o,
1258
+ width: s,
1259
1259
  height: a,
1260
1260
  x: c,
1261
1261
  y: l
1262
1262
  };
1263
1263
  }
1264
- function te(t, e, n) {
1265
- let s;
1264
+ function ee(t, e, n) {
1265
+ let o;
1266
1266
  if (e === "viewport")
1267
- s = Tn(t, n);
1267
+ o = zn(t, n);
1268
1268
  else if (e === "document")
1269
- s = kn(z(t));
1269
+ o = $n(z(t));
1270
1270
  else if (W(e))
1271
- s = Cn(e, n);
1271
+ o = Bn(e, n);
1272
1272
  else {
1273
1273
  const r = Re(t);
1274
- s = {
1274
+ o = {
1275
1275
  x: e.x - r.x,
1276
1276
  y: e.y - r.y,
1277
1277
  width: e.width,
1278
1278
  height: e.height
1279
1279
  };
1280
1280
  }
1281
- return xt(s);
1281
+ return yt(o);
1282
1282
  }
1283
1283
  function Pe(t, e) {
1284
1284
  const n = q(t);
1285
- return n === e || !W(n) || st(n) ? !1 : F(n).position === "fixed" || Pe(n, e);
1285
+ return n === e || !W(n) || ot(n) ? !1 : F(n).position === "fixed" || Pe(n, e);
1286
1286
  }
1287
- function Dn(t, e) {
1287
+ function _n(t, e) {
1288
1288
  const n = e.get(t);
1289
1289
  if (n)
1290
1290
  return n;
1291
- let s = lt(t, [], !1).filter((a) => W(a) && rt(a) !== "body"), r = null;
1291
+ let o = lt(t, [], !1).filter((a) => W(a) && rt(a) !== "body"), r = null;
1292
1292
  const i = F(t).position === "fixed";
1293
- let o = i ? q(t) : t;
1294
- for (; W(o) && !st(o); ) {
1295
- const a = F(o), c = Ut(o);
1296
- !c && a.position === "fixed" && (r = null), (i ? !c && !r : !c && a.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || dt(o) && !c && Pe(t, o)) ? s = s.filter((u) => u !== o) : r = a, o = q(o);
1293
+ let s = i ? q(t) : t;
1294
+ for (; W(s) && !ot(s); ) {
1295
+ const a = F(s), c = _t(s);
1296
+ !c && a.position === "fixed" && (r = null), (i ? !c && !r : !c && a.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || dt(s) && !c && Pe(t, s)) ? o = o.filter((u) => u !== s) : r = a, s = q(s);
1297
1297
  }
1298
- return e.set(t, s), s;
1298
+ return e.set(t, o), o;
1299
1299
  }
1300
- function Hn(t) {
1300
+ function Un(t) {
1301
1301
  let {
1302
1302
  element: e,
1303
1303
  boundary: n,
1304
- rootBoundary: s,
1304
+ rootBoundary: o,
1305
1305
  strategy: r
1306
1306
  } = t;
1307
- const o = [...n === "clippingAncestors" ? At(e) ? [] : Dn(e, this._c) : [].concat(n), s], a = o[0], c = o.reduce((l, u) => {
1308
- const h = te(e, u, r);
1307
+ const s = [...n === "clippingAncestors" ? St(e) ? [] : _n(e, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
1308
+ const h = ee(e, u, r);
1309
1309
  return l.top = Q(h.top, l.top), l.right = nt(h.right, l.right), l.bottom = nt(h.bottom, l.bottom), l.left = Q(h.left, l.left), l;
1310
- }, te(e, a, r));
1310
+ }, ee(e, a, r));
1311
1311
  return {
1312
1312
  width: c.right - c.left,
1313
1313
  height: c.bottom - c.top,
@@ -1315,7 +1315,7 @@ function Hn(t) {
1315
1315
  y: c.top
1316
1316
  };
1317
1317
  }
1318
- function Wn(t) {
1318
+ function Kn(t) {
1319
1319
  const {
1320
1320
  width: e,
1321
1321
  height: n
@@ -1325,34 +1325,34 @@ function Wn(t) {
1325
1325
  height: n
1326
1326
  };
1327
1327
  }
1328
- function Fn(t, e, n) {
1329
- const s = $(e), r = z(e), i = n === "fixed", o = G(t, !0, i, e);
1328
+ function jn(t, e, n) {
1329
+ const o = $(e), r = z(e), i = n === "fixed", s = G(t, !0, i, e);
1330
1330
  let a = {
1331
1331
  scrollLeft: 0,
1332
1332
  scrollTop: 0
1333
1333
  };
1334
1334
  const c = V(0);
1335
1335
  function l() {
1336
- c.x = It(r);
1336
+ c.x = jt(r);
1337
1337
  }
1338
- if (s || !s && !i)
1339
- if ((rt(e) !== "body" || dt(r)) && (a = Rt(e)), s) {
1338
+ if (o || !o && !i)
1339
+ if ((rt(e) !== "body" || dt(r)) && (a = Ot(e)), o) {
1340
1340
  const f = G(e, !0, i, e);
1341
1341
  c.x = f.x + e.clientLeft, c.y = f.y + e.clientTop;
1342
1342
  } else r && l();
1343
- i && !s && r && l();
1344
- const u = r && !s && !i ? Se(r, a) : V(0), h = o.left + a.scrollLeft - c.x - u.x, p = o.top + a.scrollTop - c.y - u.y;
1343
+ i && !o && r && l();
1344
+ const u = r && !o && !i ? Ee(r, a) : V(0), h = s.left + a.scrollLeft - c.x - u.x, g = s.top + a.scrollTop - c.y - u.y;
1345
1345
  return {
1346
1346
  x: h,
1347
- y: p,
1348
- width: o.width,
1349
- height: o.height
1347
+ y: g,
1348
+ width: s.width,
1349
+ height: s.height
1350
1350
  };
1351
1351
  }
1352
- function Pt(t) {
1352
+ function Rt(t) {
1353
1353
  return F(t).position === "static";
1354
1354
  }
1355
- function ee(t, e) {
1355
+ function ne(t, e) {
1356
1356
  if (!$(t) || F(t).position === "fixed")
1357
1357
  return null;
1358
1358
  if (e)
@@ -1362,147 +1362,147 @@ function ee(t, e) {
1362
1362
  }
1363
1363
  function Le(t, e) {
1364
1364
  const n = k(t);
1365
- if (At(t))
1365
+ if (St(t))
1366
1366
  return n;
1367
1367
  if (!$(t)) {
1368
1368
  let r = q(t);
1369
- for (; r && !st(r); ) {
1370
- if (W(r) && !Pt(r))
1369
+ for (; r && !ot(r); ) {
1370
+ if (W(r) && !Rt(r))
1371
1371
  return r;
1372
1372
  r = q(r);
1373
1373
  }
1374
1374
  return n;
1375
1375
  }
1376
- let s = ee(t, e);
1377
- for (; s && An(s) && Pt(s); )
1378
- s = ee(s, e);
1379
- return s && st(s) && Pt(s) && !Ut(s) ? n : s || Rn(t) || n;
1376
+ let o = ne(t, e);
1377
+ for (; o && Ln(o) && Rt(o); )
1378
+ o = ne(o, e);
1379
+ return o && ot(o) && Rt(o) && !_t(o) ? n : o || Hn(t) || n;
1380
1380
  }
1381
- const Mn = async function(t) {
1382
- const e = this.getOffsetParent || Le, n = this.getDimensions, s = await n(t.floating);
1381
+ const In = async function(t) {
1382
+ const e = this.getOffsetParent || Le, n = this.getDimensions, o = await n(t.floating);
1383
1383
  return {
1384
- reference: Fn(t.reference, await e(t.floating), t.strategy),
1384
+ reference: jn(t.reference, await e(t.floating), t.strategy),
1385
1385
  floating: {
1386
1386
  x: 0,
1387
1387
  y: 0,
1388
- width: s.width,
1389
- height: s.height
1388
+ width: o.width,
1389
+ height: o.height
1390
1390
  }
1391
1391
  };
1392
1392
  };
1393
- function Nn(t) {
1393
+ function Yn(t) {
1394
1394
  return F(t).direction === "rtl";
1395
1395
  }
1396
- const Vn = {
1397
- convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
1396
+ const qn = {
1397
+ convertOffsetParentRelativeRectToViewportRelativeRect: Nn,
1398
1398
  getDocumentElement: z,
1399
- getClippingRect: Hn,
1399
+ getClippingRect: Un,
1400
1400
  getOffsetParent: Le,
1401
- getElementRects: Mn,
1402
- getClientRects: En,
1403
- getDimensions: Wn,
1401
+ getElementRects: In,
1402
+ getClientRects: Vn,
1403
+ getDimensions: Kn,
1404
1404
  getScale: tt,
1405
1405
  isElement: W,
1406
- isRTL: Nn
1406
+ isRTL: Yn
1407
1407
  };
1408
- function Ee(t, e) {
1408
+ function ke(t, e) {
1409
1409
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1410
1410
  }
1411
- function $n(t, e) {
1412
- let n = null, s;
1411
+ function Xn(t, e) {
1412
+ let n = null, o;
1413
1413
  const r = z(t);
1414
1414
  function i() {
1415
1415
  var a;
1416
- clearTimeout(s), (a = n) == null || a.disconnect(), n = null;
1416
+ clearTimeout(o), (a = n) == null || a.disconnect(), n = null;
1417
1417
  }
1418
- function o(a, c) {
1418
+ function s(a, c) {
1419
1419
  a === void 0 && (a = !1), c === void 0 && (c = 1), i();
1420
1420
  const l = t.getBoundingClientRect(), {
1421
1421
  left: u,
1422
1422
  top: h,
1423
- width: p,
1423
+ width: g,
1424
1424
  height: f
1425
1425
  } = l;
1426
- if (a || e(), !p || !f)
1426
+ if (a || e(), !g || !f)
1427
1427
  return;
1428
- const d = pt(h), w = pt(r.clientWidth - (u + p)), m = pt(r.clientHeight - (h + f)), v = pt(u), y = {
1429
- rootMargin: -d + "px " + -w + "px " + -m + "px " + -v + "px",
1428
+ const d = pt(h), y = pt(r.clientWidth - (u + g)), m = pt(r.clientHeight - (h + f)), v = pt(u), w = {
1429
+ rootMargin: -d + "px " + -y + "px " + -m + "px " + -v + "px",
1430
1430
  threshold: Q(0, nt(1, c)) || 1
1431
1431
  };
1432
- let R = !0;
1433
- function A(T) {
1434
- const P = T[0].intersectionRatio;
1435
- if (P !== c) {
1436
- if (!R)
1437
- return o();
1438
- P ? o(!1, P) : s = setTimeout(() => {
1439
- o(!1, 1e-7);
1432
+ let A = !0;
1433
+ function O(T) {
1434
+ const E = T[0].intersectionRatio;
1435
+ if (E !== c) {
1436
+ if (!A)
1437
+ return s();
1438
+ E ? s(!1, E) : o = setTimeout(() => {
1439
+ s(!1, 1e-7);
1440
1440
  }, 1e3);
1441
1441
  }
1442
- P === 1 && !Ee(l, t.getBoundingClientRect()) && o(), R = !1;
1442
+ E === 1 && !ke(l, t.getBoundingClientRect()) && s(), A = !1;
1443
1443
  }
1444
1444
  try {
1445
- n = new IntersectionObserver(A, {
1446
- ...y,
1445
+ n = new IntersectionObserver(O, {
1446
+ ...w,
1447
1447
  // Handle <iframe>s
1448
1448
  root: r.ownerDocument
1449
1449
  });
1450
1450
  } catch {
1451
- n = new IntersectionObserver(A, y);
1451
+ n = new IntersectionObserver(O, w);
1452
1452
  }
1453
1453
  n.observe(t);
1454
1454
  }
1455
- return o(!0), i;
1455
+ return s(!0), i;
1456
1456
  }
1457
- function zn(t, e, n, s) {
1458
- s === void 0 && (s = {});
1457
+ function Qn(t, e, n, o) {
1458
+ o === void 0 && (o = {});
1459
1459
  const {
1460
1460
  ancestorScroll: r = !0,
1461
1461
  ancestorResize: i = !0,
1462
- elementResize: o = typeof ResizeObserver == "function",
1462
+ elementResize: s = typeof ResizeObserver == "function",
1463
1463
  layoutShift: a = typeof IntersectionObserver == "function",
1464
1464
  animationFrame: c = !1
1465
- } = s, l = jt(t), u = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
1465
+ } = o, l = Kt(t), u = r || i ? [...l ? lt(l) : [], ...lt(e)] : [];
1466
1466
  u.forEach((v) => {
1467
1467
  r && v.addEventListener("scroll", n, {
1468
1468
  passive: !0
1469
1469
  }), i && v.addEventListener("resize", n);
1470
1470
  });
1471
- const h = l && a ? $n(l, n) : null;
1472
- let p = -1, f = null;
1473
- o && (f = new ResizeObserver((v) => {
1471
+ const h = l && a ? Xn(l, n) : null;
1472
+ let g = -1, f = null;
1473
+ s && (f = new ResizeObserver((v) => {
1474
1474
  let [b] = v;
1475
- b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1476
- var y;
1477
- (y = f) == null || y.observe(e);
1475
+ b && b.target === l && f && (f.unobserve(e), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1476
+ var w;
1477
+ (w = f) == null || w.observe(e);
1478
1478
  })), n();
1479
1479
  }), l && !c && f.observe(l), f.observe(e));
1480
- let d, w = c ? G(t) : null;
1480
+ let d, y = c ? G(t) : null;
1481
1481
  c && m();
1482
1482
  function m() {
1483
1483
  const v = G(t);
1484
- w && !Ee(w, v) && n(), w = v, d = requestAnimationFrame(m);
1484
+ y && !ke(y, v) && n(), y = v, d = requestAnimationFrame(m);
1485
1485
  }
1486
1486
  return n(), () => {
1487
1487
  var v;
1488
1488
  u.forEach((b) => {
1489
1489
  r && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
1490
- }), h == null || h(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(d);
1490
+ }), h?.(), (v = f) == null || v.disconnect(), f = null, c && cancelAnimationFrame(d);
1491
1491
  };
1492
1492
  }
1493
- const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, n) => {
1494
- const s = /* @__PURE__ */ new Map(), r = {
1495
- platform: Vn,
1493
+ const Jn = An, Gn = Rn, oe = bn, Zn = xn, to = (t, e, n) => {
1494
+ const o = /* @__PURE__ */ new Map(), r = {
1495
+ platform: qn,
1496
1496
  ...n
1497
1497
  }, i = {
1498
1498
  ...r.platform,
1499
- _c: s
1499
+ _c: o
1500
1500
  };
1501
- return wn(t, e, {
1501
+ return yn(t, e, {
1502
1502
  ...r,
1503
1503
  platform: i
1504
1504
  });
1505
- }, ys = [
1505
+ }, Lo = [
1506
1506
  "top",
1507
1507
  "top-start",
1508
1508
  "top-end",
@@ -1515,42 +1515,42 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, n) => {
1515
1515
  "left",
1516
1516
  "left-start",
1517
1517
  "left-end"
1518
- ], vs = (t, e = { isOpen: !1 }) => {
1518
+ ], ko = (t, e = { isOpen: !1 }) => {
1519
1519
  const n = [];
1520
- let s = null;
1520
+ let o = null;
1521
1521
  const r = C.deriveProp(e.isOpen);
1522
1522
  function i(a) {
1523
- s = a, r.set(!0);
1523
+ o = a, r.set(!0);
1524
1524
  }
1525
- function o() {
1525
+ function s() {
1526
1526
  r.set(!1), n.forEach((a) => a()), n.length = 0;
1527
1527
  }
1528
1528
  return Y(
1529
- t(i, o),
1530
- he(
1529
+ t(i, s),
1530
+ de(
1531
1531
  r,
1532
1532
  () => Y(
1533
- (s == null ? void 0 : s.onClickOutside) != null ? rn(s.onClickOutside) : null,
1533
+ o?.onClickOutside != null ? sn(o.onClickOutside) : null,
1534
1534
  _(
1535
- (a) => fe(
1535
+ (a) => he(
1536
1536
  "body",
1537
- Lt.div(
1537
+ Et.div(
1538
1538
  _((c) => {
1539
1539
  c.style.position = "absolute";
1540
- const l = typeof (s == null ? void 0 : s.target) == "string" ? a.querySelector(
1541
- s.target
1542
- ) : (s == null ? void 0 : s.target) ?? a;
1540
+ const l = typeof o?.target == "string" ? a.querySelector(
1541
+ o.target
1542
+ ) : o?.target ?? a;
1543
1543
  if (l == null)
1544
- throw new Error(`Target not found: ${s == null ? void 0 : s.target}`);
1544
+ throw new Error(`Target not found: ${o?.target}`);
1545
1545
  let u = null;
1546
- const h = C.toSignal((s == null ? void 0 : s.mainAxisOffset) ?? 0), p = C.toSignal(
1547
- (s == null ? void 0 : s.crossAxisOffset) ?? 0
1546
+ const h = C.toSignal(o?.mainAxisOffset ?? 0), g = C.toSignal(
1547
+ o?.crossAxisOffset ?? 0
1548
1548
  ), f = C.toSignal(
1549
1549
  /* c8 ignore next 3 */
1550
- (s == null ? void 0 : s.placement) ?? "top"
1550
+ o?.placement ?? "top"
1551
1551
  ), d = C.toSignal(
1552
- (s == null ? void 0 : s.arrowPadding) ?? 0
1553
- ), w = s == null ? void 0 : s.arrow, m = M({
1552
+ o?.arrowPadding ?? 0
1553
+ ), y = o?.arrow, m = M({
1554
1554
  centerOffset: 0,
1555
1555
  alignmentOffset: 0,
1556
1556
  containerWidth: 0,
@@ -1559,67 +1559,67 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, n) => {
1559
1559
  y: void 0
1560
1560
  });
1561
1561
  async function v() {
1562
- const y = [
1563
- ne(),
1564
- Bn({
1562
+ const w = [
1563
+ oe(),
1564
+ Jn({
1565
1565
  mainAxis: h.get(),
1566
- crossAxis: p.get()
1566
+ crossAxis: g.get()
1567
1567
  }),
1568
- _n(),
1569
- ne()
1568
+ Gn(),
1569
+ oe()
1570
1570
  ];
1571
- w != null && u != null && y.push(
1572
- Un({
1571
+ y != null && u != null && w.push(
1572
+ Zn({
1573
1573
  element: u,
1574
1574
  padding: d.get()
1575
1575
  })
1576
1576
  );
1577
- const R = await Kn(l, c, {
1577
+ const A = await to(l, c, {
1578
1578
  placement: f.get(),
1579
1579
  strategy: "absolute",
1580
- middleware: y
1581
- }), { x: A, y: T, middlewareData: P } = R;
1582
- if (c.style.top = `${T}px`, c.style.left = `${A}px`, u != null && P.arrow != null) {
1580
+ middleware: w
1581
+ }), { x: O, y: T, middlewareData: E } = A;
1582
+ if (c.style.top = `${T}px`, c.style.left = `${O}px`, u != null && E.arrow != null) {
1583
1583
  const {
1584
1584
  x: U,
1585
- y: g,
1585
+ y: p,
1586
1586
  centerOffset: x,
1587
- alignmentOffset: O
1588
- } = P.arrow;
1587
+ alignmentOffset: S
1588
+ } = E.arrow;
1589
1589
  m.set({
1590
1590
  x: U,
1591
- y: g,
1591
+ y: p,
1592
1592
  centerOffset: x,
1593
- alignmentOffset: O,
1593
+ alignmentOffset: S,
1594
1594
  containerWidth: c.offsetWidth,
1595
1595
  containerHeight: c.offsetHeight
1596
1596
  });
1597
1597
  }
1598
1598
  }
1599
- const b = Fe(
1599
+ const b = We(
1600
1600
  h,
1601
- p,
1601
+ g,
1602
1602
  f
1603
1603
  )(v);
1604
1604
  return Y(
1605
- s == null ? void 0 : s.content,
1606
- (s == null ? void 0 : s.arrow) != null ? Lt.div(
1607
- s == null ? void 0 : s.arrow(
1608
- Nt(
1605
+ o?.content,
1606
+ o?.arrow != null ? Et.div(
1607
+ o?.arrow(
1608
+ Mt(
1609
1609
  m,
1610
1610
  f
1611
- )((y, R) => ({
1612
- ...y,
1613
- placement: R
1611
+ )((w, A) => ({
1612
+ ...w,
1613
+ placement: A
1614
1614
  }))
1615
1615
  ),
1616
- _((y) => {
1617
- u = y, v();
1616
+ _((w) => {
1617
+ u = w, v();
1618
1618
  })
1619
1619
  ) : null,
1620
1620
  N(
1621
1621
  m.dispose,
1622
- zn(l, c, v),
1622
+ Qn(l, c, v),
1623
1623
  b
1624
1624
  )
1625
1625
  );
@@ -1630,92 +1630,89 @@ const Bn = bn, _n = On, ne = vn, Un = yn, Kn = (t, e, n) => {
1630
1630
  )
1631
1631
  )
1632
1632
  );
1633
- }, jn = ({
1633
+ }, eo = ({
1634
1634
  request: t,
1635
1635
  load: e,
1636
1636
  convertError: n,
1637
- onSuccess: s,
1637
+ onSuccess: o,
1638
1638
  onError: r,
1639
1639
  onSettled: i
1640
1640
  }) => {
1641
- let o;
1642
- const a = M(S.notAsked), c = a.map(
1643
- (m) => S.isSuccess(m) ? m.value : void 0
1641
+ let s;
1642
+ const a = M(R.notAsked), c = a.map(
1643
+ (m) => R.isSuccess(m) ? m.value : void 0
1644
1644
  ), l = a.map(
1645
- (m) => S.isFailure(m) ? m.error : void 0
1646
- ), u = a.map((m) => S.isLoading(m)), h = () => {
1647
- o == null || o.abort(), o = void 0;
1648
- }, p = (m) => {
1649
- h(), a.set(m ?? S.notAsked);
1645
+ (m) => R.isFailure(m) ? m.error : void 0
1646
+ ), u = a.map((m) => R.isLoading(m)), h = () => {
1647
+ s?.abort(), s = void 0;
1648
+ }, g = (m) => {
1649
+ h(), a.set(m ?? R.notAsked);
1650
1650
  }, f = async (m) => {
1651
- h(), o = new AbortController();
1652
- const v = o.signal, b = a.get();
1653
- a.set(S.loading(S.getOrUndefined(b)));
1651
+ h(), s = new AbortController();
1652
+ const v = s.signal, b = a.get();
1653
+ a.set(R.loading(R.getOrUndefined(b)));
1654
1654
  try {
1655
- const y = await e({ request: m, abortSignal: v, previous: b });
1656
- await Promise.resolve(), o = void 0, a.set(S.success(y)), s == null || s(y, m);
1657
- } catch (y) {
1658
- o = void 0, a.set(S.failure(n(y))), r == null || r(n(y), m);
1655
+ const w = await e({ request: m, abortSignal: v, previous: b });
1656
+ await Promise.resolve(), s = void 0, a.set(R.success(w)), o?.(w, m);
1657
+ } catch (w) {
1658
+ s = void 0, a.set(R.failure(n(w))), r?.(n(w), m);
1659
1659
  }
1660
- i == null || i(a.get(), m);
1661
- }, d = () => f(C.get(t)), w = () => {
1662
- o == null || o.abort(), o = void 0, a.dispose();
1660
+ i?.(a.get(), m);
1661
+ }, d = () => f(C.get(t)), y = () => {
1662
+ s?.abort(), s = void 0, a.dispose();
1663
1663
  };
1664
1664
  return a.onDispose(C.on(t, f)), {
1665
1665
  status: a,
1666
1666
  value: c,
1667
1667
  error: l,
1668
1668
  loading: u,
1669
- cancel: p,
1669
+ cancel: g,
1670
1670
  reload: d,
1671
- dispose: w
1671
+ dispose: y
1672
1672
  };
1673
- }, In = (t, e) => {
1674
- const { status: n, dispose: s, reload: r } = t, { pending: i, failure: o, success: a } = e;
1673
+ }, no = (t, e) => {
1674
+ const { status: n, dispose: o, reload: r } = t, { pending: i, failure: s, success: a } = e;
1675
1675
  return Y(
1676
- N(s),
1677
- pe(n, {
1676
+ N(o),
1677
+ we(n, {
1678
1678
  loading: i != null ? (c) => i({ previous: c, reload: r, cancel: t.cancel }) : void 0,
1679
- failure: o != null ? (c) => o({ error: c, reload: r }) : void 0,
1679
+ failure: s != null ? (c) => s({ error: c, reload: r }) : void 0,
1680
1680
  success: (c) => a({ value: c, reload: r })
1681
1681
  })
1682
1682
  );
1683
- }, xs = ({
1683
+ }, To = ({
1684
1684
  request: t,
1685
1685
  load: e,
1686
1686
  convertError: n = (l) => l,
1687
- onSuccess: s,
1687
+ onSuccess: o,
1688
1688
  onError: r,
1689
1689
  onSettled: i,
1690
- success: o,
1690
+ success: s,
1691
1691
  pending: a,
1692
1692
  failure: c
1693
1693
  }) => {
1694
- const l = jn({
1694
+ const l = eo({
1695
1695
  request: t,
1696
1696
  load: e,
1697
1697
  convertError: n,
1698
- onSuccess: s,
1698
+ onSuccess: o,
1699
1699
  onError: r,
1700
1700
  onSettled: i
1701
1701
  });
1702
- return In(l, { success: o, pending: a, failure: c });
1703
- }, Yn = (t, e) => {
1702
+ return no(l, { success: s, pending: a, failure: c });
1703
+ }, oo = (t, e) => {
1704
1704
  if (typeof e == "function")
1705
- return Yn(t, { success: e });
1705
+ return oo(t, { success: e });
1706
1706
  const n = e.failure ?? ((r) => Y(
1707
1707
  N(r.on(console.error)),
1708
1708
  r.map((i) => `Error: ${i}`)
1709
- )), s = e.success;
1710
- return ue(C.toSignal(t), {
1711
- Success: (r) => s(r.$.value),
1709
+ )), o = e.success;
1710
+ return fe(C.toSignal(t), {
1711
+ Success: (r) => o(r.$.value),
1712
1712
  Failure: (r) => n(r.$.error)
1713
1713
  });
1714
- }, bs = () => le.focus((t) => {
1715
- var e;
1716
- return (e = t.target) == null ? void 0 : e.select();
1717
- });
1718
- class St {
1714
+ }, Co = () => ue.focus((t) => t.target?.select());
1715
+ class At {
1719
1716
  /**
1720
1717
  * Creates a new Rect instance.
1721
1718
  *
@@ -1733,29 +1730,8 @@ class St {
1733
1730
  * console.log(rect.height); // 50
1734
1731
  * ```
1735
1732
  */
1736
- constructor(e, n, s, r, i, o) {
1737
- /**
1738
- * Compares this rectangle with another rectangle for equality.
1739
- *
1740
- * Uses near-equality comparison for floating-point precision tolerance.
1741
- * Two rectangles are considered equal if all their corresponding properties
1742
- * (left, top, width, height) are nearly equal within a small tolerance.
1743
- *
1744
- * @param other - The rectangle to compare with
1745
- * @returns True if the rectangles are equal, false otherwise
1746
- *
1747
- * @example
1748
- * ```typescript
1749
- * const rect1 = new Rect(10, 20, 100, 50);
1750
- * const rect2 = new Rect(10, 20, 100, 50);
1751
- * const rect3 = new Rect(10.00000001, 20, 100, 50); // Very close values
1752
- *
1753
- * console.log(rect1.equals(rect2)); // true
1754
- * console.log(rect1.equals(rect3)); // true (within tolerance)
1755
- * ```
1756
- */
1757
- mt(this, "equals", (e) => gt(this.left, e.left) && gt(this.top, e.top) && gt(this.width, e.width) && gt(this.height, e.height));
1758
- this.left = e, this.top = n, this.width = s, this.height = r, this.localLeft = i, this.localTop = o;
1733
+ constructor(e, n, o, r, i, s) {
1734
+ this.left = e, this.top = n, this.width = o, this.height = r, this.localLeft = i, this.localTop = s;
1759
1735
  }
1760
1736
  /**
1761
1737
  * Creates a new Rect instance using an object with optional properties.
@@ -1785,12 +1761,12 @@ class St {
1785
1761
  static of({
1786
1762
  left: e = 0,
1787
1763
  top: n = 0,
1788
- width: s = 0,
1764
+ width: o = 0,
1789
1765
  height: r = 0,
1790
1766
  localLeft: i = 0,
1791
- localTop: o = 0
1767
+ localTop: s = 0
1792
1768
  }) {
1793
- return new St(e, n, s, r, i, o);
1769
+ return new At(e, n, o, r, i, s);
1794
1770
  }
1795
1771
  /**
1796
1772
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1902,10 +1878,31 @@ class St {
1902
1878
  get size() {
1903
1879
  return { width: this.width, height: this.height };
1904
1880
  }
1881
+ /**
1882
+ * Compares this rectangle with another rectangle for equality.
1883
+ *
1884
+ * Uses near-equality comparison for floating-point precision tolerance.
1885
+ * Two rectangles are considered equal if all their corresponding properties
1886
+ * (left, top, width, height) are nearly equal within a small tolerance.
1887
+ *
1888
+ * @param other - The rectangle to compare with
1889
+ * @returns True if the rectangles are equal, false otherwise
1890
+ *
1891
+ * @example
1892
+ * ```typescript
1893
+ * const rect1 = new Rect(10, 20, 100, 50);
1894
+ * const rect2 = new Rect(10, 20, 100, 50);
1895
+ * const rect3 = new Rect(10.00000001, 20, 100, 50); // Very close values
1896
+ *
1897
+ * console.log(rect1.equals(rect2)); // true
1898
+ * console.log(rect1.equals(rect3)); // true (within tolerance)
1899
+ * ```
1900
+ */
1901
+ equals = (e) => mt(this.left, e.left) && mt(this.top, e.top) && mt(this.width, e.width) && mt(this.height, e.height);
1905
1902
  }
1906
1903
  function se(t) {
1907
1904
  const e = t.getBoundingClientRect();
1908
- return St.of({
1905
+ return At.of({
1909
1906
  top: e.top + window.scrollY,
1910
1907
  left: e.left + window.scrollX,
1911
1908
  width: e.width,
@@ -1914,30 +1911,30 @@ function se(t) {
1914
1911
  localTop: t.offsetTop
1915
1912
  });
1916
1913
  }
1917
- const Os = (t) => Me((e) => {
1918
- const { element: n } = e, s = M(se(n), (a, c) => a.equals(c)), r = $t(t(s))(e), i = () => s.set(St.of(se(n)));
1919
- let o = null;
1920
- return typeof ResizeObserver < "u" && (o = new ResizeObserver(i)), o == null || o.observe(n), N((a) => {
1921
- o == null || o.disconnect(), r(a);
1914
+ const Do = (t) => Fe((e) => {
1915
+ const { element: n } = e, o = M(se(n), (a, c) => a.equals(c)), r = Vt(t(o))(e), i = () => o.set(At.of(se(n)));
1916
+ let s = null;
1917
+ return typeof ResizeObserver < "u" && (s = new ResizeObserver(i)), s?.observe(n), N((a) => {
1918
+ s?.disconnect(), r(a);
1922
1919
  });
1923
1920
  });
1924
- function oe(t) {
1921
+ function re(t) {
1925
1922
  return {
1926
1923
  /* c8 ignore next 6 */
1927
- width: (t == null ? void 0 : t.innerWidth) ?? 0,
1928
- height: (t == null ? void 0 : t.innerHeight) ?? 0
1924
+ width: t?.innerWidth ?? 0,
1925
+ height: t?.innerHeight ?? 0
1929
1926
  };
1930
1927
  }
1931
- const As = (t) => (e) => {
1932
- const n = ot(), s = M(
1933
- oe(n),
1934
- (o, a) => o.width === a.width && o.height === a.height
1935
- ), r = $t(t(s))(e), i = () => s.set(oe(n));
1936
- return n == null || n.addEventListener("resize", i), (o) => {
1937
- n == null || n.removeEventListener("resize", i), r(o);
1928
+ const Ho = (t) => (e) => {
1929
+ const n = st(), o = M(
1930
+ re(n),
1931
+ (s, a) => s.width === a.width && s.height === a.height
1932
+ ), r = Vt(t(o))(e), i = () => o.set(re(n));
1933
+ return n?.addEventListener("resize", i), (s) => {
1934
+ n?.removeEventListener("resize", i), r(s);
1938
1935
  };
1939
- }, qn = (t, e) => {
1940
- const n = e.split("/").filter((i) => i !== ""), s = (i) => {
1936
+ }, so = (t, e) => {
1937
+ const n = e.split("/").filter((i) => i !== ""), o = (i) => {
1941
1938
  try {
1942
1939
  return decodeURIComponent(i);
1943
1940
  } catch {
@@ -1945,24 +1942,24 @@ const As = (t) => (e) => {
1945
1942
  }
1946
1943
  }, r = {};
1947
1944
  for (let i = 0; i < t.length; i++) {
1948
- const o = t[i], a = n[i];
1949
- if (!a && o.type !== "catch-all")
1945
+ const s = t[i], a = n[i];
1946
+ if (!a && s.type !== "catch-all")
1950
1947
  return null;
1951
- if (o.type === "literal") {
1952
- if (o.value !== a)
1948
+ if (s.type === "literal") {
1949
+ if (s.value !== a)
1953
1950
  return null;
1954
- } else if (o.type === "param")
1955
- r[o.name] = s(a);
1956
- else if (o.type === "catch-all") {
1957
- if (o.name) {
1951
+ } else if (s.type === "param")
1952
+ r[s.name] = o(a);
1953
+ else if (s.type === "catch-all") {
1954
+ if (s.name) {
1958
1955
  const c = n.slice(i).join("/");
1959
- r[o.name] = s(c);
1956
+ r[s.name] = o(c);
1960
1957
  }
1961
1958
  return { params: r, path: e };
1962
1959
  }
1963
1960
  }
1964
1961
  return n.length !== t.length ? null : { params: r, path: e };
1965
- }, ke = (t) => t.split("/").map((e) => {
1962
+ }, Te = (t) => t.split("/").map((e) => {
1966
1963
  if (e.startsWith(":"))
1967
1964
  return { type: "param", name: e.slice(1) };
1968
1965
  if (e.startsWith("*")) {
@@ -1970,30 +1967,28 @@ const As = (t) => (e) => {
1970
1967
  return n != "" ? { type: "catch-all", name: n } : { type: "catch-all" };
1971
1968
  } else
1972
1969
  return { type: "literal", value: e };
1973
- }).filter((e) => e.type !== "literal" || e.value !== ""), Rs = (t) => {
1970
+ }).filter((e) => e.type !== "literal" || e.value !== ""), Wo = (t) => {
1974
1971
  const e = t.map((n) => {
1975
- const s = ke(n);
1976
- return { route: n, segments: s };
1972
+ const o = Te(n);
1973
+ return { route: n, segments: o };
1977
1974
  });
1978
- return function(s) {
1975
+ return function(o) {
1979
1976
  for (const { segments: r, route: i } of e) {
1980
- const o = qn(r, s);
1981
- if (o)
1982
- return { ...o, route: i };
1977
+ const s = so(r, o);
1978
+ if (s)
1979
+ return { ...s, route: i };
1983
1980
  }
1984
1981
  return null;
1985
1982
  };
1986
- }, Xn = (t) => {
1983
+ }, ro = (t) => {
1987
1984
  if (t == null)
1988
1985
  throw new Error(
1989
1986
  "NavigationService: no Location handle attached. Make sure to attach one before calling navigation helpers."
1990
1987
  );
1991
1988
  return t;
1992
1989
  };
1993
- class Qn {
1994
- constructor() {
1995
- mt(this, "handles", []);
1996
- }
1990
+ class io {
1991
+ handles = [];
1997
1992
  attach(e) {
1998
1993
  const n = this.handles.lastIndexOf(e);
1999
1994
  return n !== -1 && this.handles.splice(n, 1), this.handles.push(e), () => this.detach(e);
@@ -2009,7 +2004,7 @@ class Qn {
2009
2004
  return this.handles[this.handles.length - 1];
2010
2005
  }
2011
2006
  getHandle() {
2012
- return Xn(this.current);
2007
+ return ro(this.current);
2013
2008
  }
2014
2009
  navigate(e, n) {
2015
2010
  this.getHandle().navigate(e, n);
@@ -2032,8 +2027,8 @@ class Qn {
2032
2027
  setSearch(e, n) {
2033
2028
  this.getHandle().setSearch(e, n);
2034
2029
  }
2035
- setSearchParam(e, n, s) {
2036
- this.getHandle().setSearchParam(e, n, s);
2030
+ setSearchParam(e, n, o) {
2031
+ this.getHandle().setSearchParam(e, n, o);
2037
2032
  }
2038
2033
  updateSearch(e, n) {
2039
2034
  this.getHandle().updateSearch(e, n);
@@ -2048,8 +2043,8 @@ class Qn {
2048
2043
  this.getHandle().run(e, n);
2049
2044
  }
2050
2045
  }
2051
- const Ss = new Qn(), Wt = {
2052
- mark: Mt("RouterContext"),
2046
+ const Fo = new io(), Ht = {
2047
+ mark: Ft("RouterContext"),
2053
2048
  create: () => {
2054
2049
  const t = M([]);
2055
2050
  return {
@@ -2057,11 +2052,11 @@ const Ss = new Qn(), Wt = {
2057
2052
  dispose: () => t.dispose()
2058
2053
  };
2059
2054
  }
2060
- }, Jn = (t, e, n) => {
2061
- const s = n.split("/").filter((o) => o !== ""), r = {};
2055
+ }, ao = (t, e, n) => {
2056
+ const o = n.split("/").filter((s) => s !== ""), r = {};
2062
2057
  let i = 0;
2063
- for (let o = 0; o < t.length; o++) {
2064
- const a = t[o], c = s[o];
2058
+ for (let s = 0; s < t.length; s++) {
2059
+ const a = t[s], c = o[s];
2065
2060
  if (!c && a.type !== "catch-all")
2066
2061
  return null;
2067
2062
  if (a.type === "literal") {
@@ -2071,8 +2066,8 @@ const Ss = new Qn(), Wt = {
2071
2066
  } else if (a.type === "param")
2072
2067
  r[a.name] = c, i++;
2073
2068
  else if (a.type === "catch-all") {
2074
- a.name && (r[a.name] = s.slice(i).join("/"));
2075
- const l = "/" + s.slice(0, i).join("/"), u = "/" + s.slice(i).join("/");
2069
+ a.name && (r[a.name] = o.slice(i).join("/"));
2070
+ const l = "/" + o.slice(0, i).join("/"), u = "/" + o.slice(i).join("/");
2076
2071
  return {
2077
2072
  params: r,
2078
2073
  matchedPath: l === "/" ? "" : l,
@@ -2081,68 +2076,68 @@ const Ss = new Qn(), Wt = {
2081
2076
  };
2082
2077
  }
2083
2078
  }
2084
- if (s.length === t.length) {
2085
- const o = "/" + s.join("/");
2079
+ if (o.length === t.length) {
2080
+ const s = "/" + o.join("/");
2086
2081
  return {
2087
2082
  params: r,
2088
- matchedPath: o === "/" ? "" : o,
2083
+ matchedPath: s === "/" ? "" : s,
2089
2084
  remainingPath: "",
2090
2085
  route: e
2091
2086
  };
2092
2087
  }
2093
2088
  return null;
2094
- }, Te = (t) => {
2089
+ }, Ce = (t) => {
2095
2090
  const e = t.map((n) => {
2096
- const s = ke(n);
2097
- return { route: n, segments: s };
2091
+ const o = Te(n);
2092
+ return { route: n, segments: o };
2098
2093
  });
2099
- return function(s) {
2094
+ return function(o) {
2100
2095
  for (const { segments: r, route: i } of e) {
2101
- const o = Jn(r, i, s);
2102
- if (o)
2103
- return o;
2096
+ const s = ao(r, i, o);
2097
+ if (s)
2098
+ return s;
2104
2099
  }
2105
2100
  return null;
2106
2101
  };
2107
- }, Ps = (t) => {
2108
- const e = Te(Object.keys(t));
2109
- return Ne(
2110
- Wt,
2102
+ }, Mo = (t) => {
2103
+ const e = Ce(Object.keys(t));
2104
+ return Me(
2105
+ Ht,
2111
2106
  {},
2112
- () => ct(zt, (n) => ct(Wt, (s) => {
2107
+ () => ct($t, (n) => ct(Ht, (o) => {
2113
2108
  const r = n.location.map((i) => {
2114
- const o = e(i.pathname);
2115
- if (o == null)
2109
+ const s = e(i.pathname);
2110
+ if (s == null)
2116
2111
  throw console.error("No route found for", i), new Error("No route found");
2117
2112
  const a = {
2118
- matchedPath: o.matchedPath,
2119
- remainingPath: o.remainingPath,
2113
+ matchedPath: s.matchedPath,
2114
+ remainingPath: s.remainingPath,
2120
2115
  fullPath: i.pathname,
2121
- params: o.params
2116
+ params: s.params
2122
2117
  };
2123
- return s.value = [...s.value, a], {
2124
- params: o.params,
2125
- route: o.route,
2126
- path: o.matchedPath || i.pathname,
2118
+ return o.value = [...o.value, a], {
2119
+ params: s.params,
2120
+ route: s.route,
2121
+ path: s.matchedPath || i.pathname,
2127
2122
  search: i.search,
2128
2123
  hash: i.hash
2129
2124
  };
2130
2125
  });
2131
- return de(
2126
+ return me(
2132
2127
  r.map((i) => [i.route, i]),
2133
2128
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2134
2129
  t
2135
2130
  );
2136
2131
  }))
2137
2132
  );
2138
- }, Ls = (t) => {
2139
- const e = Te(Object.keys(t));
2140
- return ct(Wt, (n) => ct(zt, (s) => {
2133
+ }, No = (t) => {
2134
+ const e = Ce(Object.keys(t));
2135
+ return ct(Ht, (n) => ct($t, (o) => {
2141
2136
  const r = n.map((i) => {
2142
- const o = i[i.length - 1];
2143
- if (o == null)
2137
+ const s = i[i.length - 1];
2138
+ if (s == null)
2144
2139
  throw console.error("No router context available for ChildRouter", i), new Error("No router context available for ChildRouter");
2145
- const a = o.remainingPath ?? "", c = e(a);
2140
+ const a = s.remainingPath ?? "", c = e(a);
2146
2141
  if (c == null)
2147
2142
  throw console.error("No route found for remaining path", a), new Error("No route found");
2148
2143
  return {
@@ -2150,27 +2145,27 @@ const Ss = new Qn(), Wt = {
2150
2145
  // Only this router's parameters
2151
2146
  route: c.route,
2152
2147
  path: c.matchedPath,
2153
- search: s.location.value.search,
2154
- hash: s.location.value.hash
2148
+ search: o.location.value.search,
2149
+ hash: o.location.value.hash
2155
2150
  };
2156
2151
  });
2157
- return de(
2152
+ return me(
2158
2153
  r.map((i) => [i.route, i]),
2159
2154
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2160
2155
  t
2161
2156
  );
2162
2157
  }));
2163
- }, bt = 60 * 1e3, Ft = 60 * bt, ut = 24 * Ft, re = 7 * ut, ie = 30 * ut, Gn = 365 * ut, Zn = [
2158
+ }, xt = 60 * 1e3, Wt = 60 * xt, ut = 24 * Wt, ie = 7 * ut, ae = 30 * ut, co = 365 * ut, lo = [
2164
2159
  {
2165
- max: bt * 90,
2166
- value: bt,
2160
+ max: xt * 90,
2161
+ value: xt,
2167
2162
  name: "minute",
2168
2163
  past: { singular: "a minute ago", plural: "{} minutes ago" },
2169
2164
  future: { singular: "in a minute", plural: "in {} minutes" }
2170
2165
  },
2171
2166
  {
2172
- max: Ft * 36,
2173
- value: Ft,
2167
+ max: Wt * 36,
2168
+ value: Wt,
2174
2169
  name: "hour",
2175
2170
  past: { singular: "an hour ago", plural: "{} hours ago" },
2176
2171
  future: { singular: "in an hour", plural: "in {} hours" }
@@ -2183,30 +2178,30 @@ const Ss = new Qn(), Wt = {
2183
2178
  future: { singular: "tomorrow", plural: "in {} days" }
2184
2179
  },
2185
2180
  {
2186
- max: re * 6,
2187
- value: re,
2181
+ max: ie * 6,
2182
+ value: ie,
2188
2183
  name: "week",
2189
2184
  past: { singular: "last week", plural: "{} weeks ago" },
2190
2185
  future: { singular: "in a week", plural: "in {} weeks" }
2191
2186
  },
2192
2187
  {
2193
- max: ie * 18,
2194
- value: ie,
2188
+ max: ae * 18,
2189
+ value: ae,
2195
2190
  name: "month",
2196
2191
  past: { singular: "last month", plural: "{} months ago" },
2197
2192
  future: { singular: "in a month", plural: "in {} months" }
2198
2193
  },
2199
2194
  {
2200
2195
  max: 1 / 0,
2201
- value: Gn,
2196
+ value: co,
2202
2197
  name: "year",
2203
2198
  past: { singular: "last year", plural: "{} years ago" },
2204
2199
  future: { singular: "in a year", plural: "in {} years" }
2205
2200
  }
2206
2201
  ];
2207
- function ae(t, e, n, s) {
2202
+ function ce(t, e, n, o) {
2208
2203
  const r = Math.round(t / e);
2209
- return r <= 1 ? n : s.replace(
2204
+ return r <= 1 ? n : o.replace(
2210
2205
  "{}",
2211
2206
  r.toLocaleString(void 0, {
2212
2207
  maximumFractionDigits: 0,
@@ -2214,89 +2209,86 @@ function ae(t, e, n, s) {
2214
2209
  })
2215
2210
  );
2216
2211
  }
2217
- const ts = (t = 1e3) => {
2218
- const e = M(/* @__PURE__ */ new Date()), n = $e(() => e.set(/* @__PURE__ */ new Date()), t);
2212
+ const uo = (t = 1e3) => {
2213
+ const e = M(/* @__PURE__ */ new Date()), n = Ve(() => e.set(/* @__PURE__ */ new Date()), t);
2219
2214
  return e.onDispose(n), e;
2220
- }, es = (t) => {
2215
+ }, fo = (t) => {
2221
2216
  const e = Math.abs(t);
2222
- if (e < bt)
2217
+ if (e < xt)
2223
2218
  return t < 0 ? "just now" : "in a moment";
2224
- for (const n of Zn)
2219
+ for (const n of lo)
2225
2220
  if (e < n.max)
2226
- return t < 0 ? ae(e, n.value, n.past.singular, n.past.plural) : ae(e, n.value, n.future.singular, n.future.plural);
2221
+ return t < 0 ? ce(e, n.value, n.past.singular, n.past.plural) : ce(e, n.value, n.future.singular, n.future.plural);
2227
2222
  throw new Error("unreachable");
2228
- }, ns = (t, { now: e, frequency: n = 1e4 } = {}) => {
2229
- const s = e != null ? ce.is(e) ? e.derive() : M(e) : ts(n), r = Nt(
2223
+ }, ho = (t, { now: e, frequency: n = 1e4 } = {}) => {
2224
+ const o = e != null ? le.is(e) ? e.derive() : M(e) : uo(n), r = Mt(
2230
2225
  t,
2231
- s
2232
- )((i, o) => i.getTime() - o.getTime());
2233
- return r.onDispose(() => C.dispose(s)), r;
2234
- }, ss = (t, e = {}) => {
2235
- const n = ns(t, e), s = n.map(es);
2236
- return s.onDispose(n.dispose), s;
2237
- }, Es = (t, e = {}) => ss(t, e);
2238
- class os extends Ve {
2239
- constructor() {
2240
- super(...arguments);
2241
- /**
2242
- * Triggers an update of the Ticker by incrementing its internal value.
2243
- * @returns void
2244
- */
2245
- mt(this, "tick", () => this.update((n) => n + 1));
2246
- }
2226
+ o
2227
+ )((i, s) => i.getTime() - s.getTime());
2228
+ return r.onDispose(() => C.dispose(o)), r;
2229
+ }, mo = (t, e = {}) => {
2230
+ const n = ho(t, e), o = n.map(fo);
2231
+ return o.onDispose(n.dispose), o;
2232
+ }, Vo = (t, e = {}) => mo(t, e);
2233
+ class po extends Ne {
2234
+ /**
2235
+ * Triggers an update of the Ticker by incrementing its internal value.
2236
+ * @returns void
2237
+ */
2238
+ tick = () => this.update((e) => e + 1);
2247
2239
  }
2248
- const ks = (t = 0) => new os(t, (e, n) => e === n);
2240
+ const $o = (t = 0) => new po(t, (e, n) => e === n);
2249
2241
  export {
2250
- tn as Anchor,
2251
- cs as Appearance,
2252
- pe as AsyncResultView,
2253
- ls as AutoFocus,
2254
- us as AutoSelect,
2255
- Ls as ChildRouter,
2256
- Os as ElementRect,
2257
- ds as HTMLTitle,
2258
- hs as HiddenWhenEmpty,
2242
+ Ze as Anchor,
2243
+ vo as Appearance,
2244
+ we as AsyncResultView,
2245
+ yo as AutoFocus,
2246
+ xo as AutoSelect,
2247
+ No as ChildRouter,
2248
+ Do as ElementRect,
2249
+ Oo as HTMLTitle,
2250
+ So as HiddenWhenEmpty,
2259
2251
  on as InViewport,
2260
- zt as Location,
2261
- ws as Mutation,
2262
- ln as MutationDisplay,
2263
- Ss as NavigationService,
2264
- rn as OnClickOutside,
2265
- gs as OnEnterKey,
2266
- ps as OnEscapeKey,
2267
- we as OnKeyPressed,
2268
- vs as PopOver,
2269
- xs as Query,
2270
- In as QueryDisplay,
2271
- St as Rect,
2272
- Yn as ResultView,
2273
- Ps as RootRouter,
2274
- Wt as RouterContextProvider,
2275
- bs as SelectOnFocus,
2276
- os as Ticker,
2277
- ms as WhenInViewport,
2278
- As as WindowSize,
2279
- Be as _checkExtensionCondition,
2280
- ze as _getExtension,
2281
- Rs as _makeRouteMatcher,
2282
- ke as _parseRouteSegments,
2283
- ys as allPlacements,
2284
- Ke as areLocationsEqual,
2285
- fs as classes,
2286
- Qt as evaluateLocationMatch,
2252
+ $t as Location,
2253
+ Po as Mutation,
2254
+ cn as MutationDisplay,
2255
+ Fo as NavigationService,
2256
+ sn as OnClickOutside,
2257
+ Ro as OnEnterKey,
2258
+ Eo as OnEscapeKey,
2259
+ ve as OnKeyPressed,
2260
+ ko as PopOver,
2261
+ To as Query,
2262
+ no as QueryDisplay,
2263
+ At as Rect,
2264
+ oo as ResultView,
2265
+ Mo as RootRouter,
2266
+ Ht as RouterContextProvider,
2267
+ Co as SelectOnFocus,
2268
+ po as Ticker,
2269
+ Ao as WhenInViewport,
2270
+ Ho as WindowSize,
2271
+ ze as _checkExtensionCondition,
2272
+ $e as _getExtension,
2273
+ Wo as _makeRouteMatcher,
2274
+ Te as _parseRouteSegments,
2275
+ Lo as allPlacements,
2276
+ Ue as areLocationsEqual,
2277
+ bo as classes,
2278
+ Xt as evaluateLocationMatch,
2287
2279
  se as getAbsoluteRect,
2288
- Ue as handleAnchorClick,
2289
- kt as locationFromURL,
2290
- cn as makeMutationResource,
2291
- jn as makeQueryResource,
2292
- an as matchesKeyCombo,
2293
- qn as matchesRoute,
2294
- ts as nowSignal,
2295
- Es as relativeTime,
2296
- ns as relativeTimeMillisSignal,
2297
- ss as relativeTimeSignal,
2298
- ks as ticker,
2299
- es as timeDiffToString,
2280
+ _e as handleAnchorClick,
2281
+ Lt as locationFromURL,
2282
+ an as makeMutationResource,
2283
+ eo as makeQueryResource,
2284
+ rn as matchesKeyCombo,
2285
+ so as matchesRoute,
2286
+ uo as nowSignal,
2287
+ Vo as relativeTime,
2288
+ ho as relativeTimeMillisSignal,
2289
+ mo as relativeTimeSignal,
2290
+ $o as ticker,
2291
+ fo as timeDiffToString,
2300
2292
  et as urlFromLocation,
2301
- en as useAppearance
2293
+ tn as useAppearance
2302
2294
  };