@tempots/ui 8.0.0 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.cjs +1 -1
  2. package/index.d.ts +2 -0
  3. package/index.js +711 -623
  4. package/package.json +2 -2
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
- var Le = Object.defineProperty;
2
- var Pe = (t, e, o) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
1
+ var Ee = Object.defineProperty;
2
+ var Pe = (t, e, o) => e in t ? Ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
3
  var At = (t, e, o) => Pe(t, typeof e != "symbol" ? e + "" : e, o);
4
- import { getWindow as at, prop as F, makeProviderMark as Wt, Signal as ee, Use as rt, html as Et, on as ne, Value as O, attr as Ft, Empty as Lt, OneOfType as oe, WithElement as H, OnDispose as M, Fragment as q, Portal as se, renderableOfTNode as Mt, When as re, effectOf as Te, computedOf as ie, WithBrowserCtx as Se, Provide as ke, OneOfTuple as ce, Prop as Ce } from "@tempots/dom";
5
- import { delayed as ae, AsyncResult as B, nearEqual as ht, interval as De } from "@tempots/std";
4
+ import { getWindow as at, prop as W, makeProviderMark as Wt, Signal as ne, Use as it, html as Lt, on as oe, Value as L, attr as Ft, Empty as Et, OneOfType as se, WithElement as H, OnDispose as F, Fragment as K, Portal as ie, renderableOfTNode as Mt, When as re, effectOf as Te, computedOf as ce, WithBrowserCtx as ke, Provide as Se, OneOfTuple as ae, Prop as Ce } from "@tempots/dom";
5
+ import { delayed as le, AsyncResult as R, nearEqual as ht, interval as De } from "@tempots/std";
6
6
  const We = (t) => {
7
7
  const e = t.split("/").pop();
8
8
  if (e == null || e.startsWith(".")) return;
@@ -17,16 +17,16 @@ const We = (t) => {
17
17
  s = s.parentElement;
18
18
  if (s == null)
19
19
  return !0;
20
- const i = s;
21
- if (t.button !== 0 || t.ctrlKey || t.metaKey || i.target !== "_self" && i.target !== "" || i.getAttribute("download") != null)
20
+ const r = s;
21
+ if (t.button !== 0 || t.ctrlKey || t.metaKey || r.target !== "_self" && r.target !== "" || r.getAttribute("download") != null)
22
22
  return !0;
23
- const { pathname: r, search: c, hash: a } = i;
23
+ const { pathname: i, search: c, hash: a } = r;
24
24
  if (n) {
25
- const l = r + c + a, f = i.getAttribute("href");
25
+ const l = i + c + a, f = r.getAttribute("href");
26
26
  if (!(f != null && f.startsWith("#")) && f !== l)
27
27
  return !0;
28
28
  }
29
- return e ? !1 : Fe(o, r);
29
+ return e ? !1 : Fe(o, i);
30
30
  }, Ne = (t, e = {
31
31
  ignoreUrlWithExtension: !0,
32
32
  allowedExtensions: [],
@@ -43,29 +43,29 @@ const We = (t) => {
43
43
  e.ignoreExternalUrl ?? !0
44
44
  ) || t() && n.preventDefault();
45
45
  };
46
- }, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, le = (t, e) => {
47
- var i, r;
48
- const o = new URL(t, e ?? ((i = at()) == null ? void 0 : i.location.toString())), n = Object.fromEntries(((r = o.searchParams) == null ? void 0 : r.entries()) ?? []);
46
+ }, Ve = (t, e) => t.pathname === e.pathname && JSON.stringify(t.search) === JSON.stringify(e.search) && t.hash === e.hash, ue = (t, e) => {
47
+ var r, i;
48
+ const o = new URL(t, e ?? ((r = at()) == null ? void 0 : r.location.toString())), n = Object.fromEntries(((i = o.searchParams) == null ? void 0 : i.entries()) ?? []);
49
49
  let s = o.hash;
50
50
  return s.startsWith("#") && (s = s.substring(1)), {
51
51
  pathname: o.pathname,
52
52
  search: n,
53
53
  hash: s === "" ? void 0 : s
54
54
  };
55
- }, Kt = (t, e) => {
56
- const o = le(e);
55
+ }, jt = (t, e) => {
56
+ const o = ue(e);
57
57
  return t.set(o), t;
58
58
  }, Pt = (t) => {
59
59
  const o = new URLSearchParams(t.search).toString(), n = t.hash;
60
60
  return `${t.pathname}${o ? `?${o}` : ""}${n ? `#${n}` : ""}`;
61
61
  }, $e = (t) => t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//"), Be = (t) => {
62
62
  const e = t.container.currentURL, o = e.iso(
63
- (n) => le(n),
63
+ (n) => ue(n),
64
64
  (n) => {
65
65
  if ($e(n.pathname))
66
66
  return Pt(n);
67
- const s = new URL(n.pathname, e.value), i = s.origin + s.pathname;
68
- return Pt({ ...n, pathname: i });
67
+ const s = new URL(n.pathname, e.value), r = s.origin + s.pathname;
68
+ return Pt({ ...n, pathname: r });
69
69
  }
70
70
  );
71
71
  return { value: o, dispose: o.dispose };
@@ -79,7 +79,7 @@ const We = (t) => {
79
79
  hash: e
80
80
  };
81
81
  }, Ue = () => {
82
- const t = F(He(), Ve), e = at(), o = () => {
82
+ const t = W(He(), Ve), e = at(), o = () => {
83
83
  let n = (e == null ? void 0 : e.location.hash) ?? "";
84
84
  n.startsWith("#") && (n = n.substring(1));
85
85
  const s = {
@@ -111,24 +111,24 @@ const We = (t) => {
111
111
  }, ze = (t) => {
112
112
  document.startViewTransition ? document.startViewTransition(t) : t();
113
113
  }, Ke = (t, ...e) => {
114
- if (typeof t == "string" || ee.is(t))
114
+ if (typeof t == "string" || ne.is(t))
115
115
  return Ke({ href: t }, ...e);
116
116
  const {
117
117
  href: o,
118
118
  withViewTransition: n,
119
119
  ...s
120
120
  } = t;
121
- return rt(Nt, (i) => Et.a(
122
- ne.click(
121
+ return it(Nt, (r) => Lt.a(
122
+ oe.click(
123
123
  Ne(() => (n === !0 ? ze(() => {
124
- Kt(i, O.get(o));
125
- }) : Kt(i, O.get(o)), !0), s)
124
+ jt(r, L.get(o));
125
+ }) : jt(r, L.get(o)), !0), s)
126
126
  ),
127
127
  Ft.href(o),
128
128
  ...e
129
129
  /* c8 ignore next 2 */
130
130
  ));
131
- }, Yn = {
131
+ }, qn = {
132
132
  mark: Wt("Appearance"),
133
133
  create: () => {
134
134
  const t = je();
@@ -139,37 +139,37 @@ const We = (t) => {
139
139
  }
140
140
  };
141
141
  function je() {
142
- const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = F(o ? "dark" : "light"), s = (i) => n.set(i.matches ? "dark" : "light");
142
+ const t = at(), e = t != null && t.matchMedia != null ? t.matchMedia("(prefers-color-scheme: dark)") : void 0, o = (e == null ? void 0 : e.matches) ?? !1, n = W(o ? "dark" : "light"), s = (r) => n.set(r.matches ? "dark" : "light");
143
143
  return e == null || e.addEventListener("change", s), n.onDispose(() => e == null ? void 0 : e.removeEventListener("change", s)), n;
144
144
  }
145
- const ue = (t, e) => {
145
+ const Vt = (t, e) => {
146
146
  if (typeof e == "function")
147
- return ue(t, { success: e });
148
- const o = e.failure ?? ((r) => r.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Lt), i = e.notAsked ?? (() => Lt);
149
- return oe(O.toSignal(t), {
150
- AsyncSuccess: (r) => n(r.$.value),
151
- AsyncFailure: (r) => o(r.$.error),
152
- Loading: (r) => s(r.map((c) => c.previousValue)),
153
- NotAsked: i
147
+ return Vt(t, { success: e });
148
+ const o = e.failure ?? ((i) => i.map((c) => `Error: ${c}`)), n = e.success, s = e.loading ?? (() => Et), r = e.notAsked ?? (() => Et);
149
+ return se(L.toSignal(t), {
150
+ AsyncSuccess: (i) => n(i.$.value),
151
+ AsyncFailure: (i) => o(i.$.error),
152
+ Loading: (i) => s(i.map((c) => c.previousValue)),
153
+ NotAsked: r
154
154
  });
155
- }, qn = (t = 10) => H((e) => M(ae(() => e == null ? void 0 : e.focus(), t))), Xn = (t = 10) => H((e) => {
156
- const o = ae(() => e.select(), t);
157
- return M(o);
155
+ }, Qn = (t = 10) => H((e) => F(le(() => e == null ? void 0 : e.focus(), t))), Jn = (t = 10) => H((e) => {
156
+ const o = le(() => e.select(), t);
157
+ return F(o);
158
158
  });
159
- function Qn(t) {
159
+ function Gn(t) {
160
160
  const e = Object.entries(t);
161
- return q(
161
+ return K(
162
162
  ...e.map(
163
- ([o, n]) => Ft.class(O.map(n, (s) => s ? o : void 0))
163
+ ([o, n]) => Ft.class(L.map(n, (s) => s ? o : void 0))
164
164
  )
165
165
  );
166
166
  }
167
- const Jn = H((t) => {
167
+ const Zn = H((t) => {
168
168
  const e = t.style.getPropertyValue(":empty");
169
- return t.style.setProperty(":empty", "display:none"), M((o) => {
169
+ return t.style.setProperty(":empty", "display:none"), F((o) => {
170
170
  o && t.style.setProperty(":empty", e);
171
171
  });
172
- }), Gn = (t) => se("head > title", Ft.innerText(t)), _e = {
172
+ }), to = (t) => ie("head > title", Ft.innerText(t)), _e = {
173
173
  partial: {
174
174
  root: null,
175
175
  rootMargin: "0px",
@@ -196,38 +196,38 @@ function Ie(t) {
196
196
  }, _e[t])), st[t];
197
197
  }
198
198
  const Ye = ({ mode: t = "partial", once: e = !1 }, o) => {
199
- const n = F(!1);
200
- return q(
199
+ const n = W(!1);
200
+ return K(
201
201
  H((s) => {
202
- const i = typeof IntersectionObserver < "u" ? Ie(t) : null;
203
- mt[t].set(s, n), i == null || i.observe(s);
204
- function r() {
202
+ const r = typeof IntersectionObserver < "u" ? Ie(t) : null;
203
+ mt[t].set(s, n), r == null || r.observe(s);
204
+ function i() {
205
205
  var a;
206
- i == null || i.unobserve(s), mt[t].delete(s), mt[t].size === 0 && ((a = st[t]) == null || a.disconnect(), st[t] = null);
206
+ r == null || r.unobserve(s), mt[t].delete(s), mt[t].size === 0 && ((a = st[t]) == null || a.disconnect(), st[t] = null);
207
207
  }
208
208
  let c = null;
209
209
  return e && (c = n.on((a) => {
210
- a && r();
211
- })), M(() => {
212
- n.dispose(), r(), c == null || c();
210
+ a && i();
211
+ })), F(() => {
212
+ n.dispose(), i(), c == null || c();
213
213
  });
214
214
  }),
215
215
  Mt(o(n))
216
216
  );
217
- }, Zn = (t, e, o) => Ye(t, (n) => re(n, e, o ?? (() => Lt)));
218
- function qe(t) {
217
+ }, eo = (t, e, o) => Ye(t, (n) => re(n, e, o ?? (() => Et)));
218
+ function Xe(t) {
219
219
  return H((e) => {
220
220
  const o = (n) => {
221
221
  e.contains(n.target) || t(n);
222
222
  };
223
- return document.addEventListener("click", o), M(() => {
223
+ return document.addEventListener("click", o), F(() => {
224
224
  document.removeEventListener("click", o);
225
225
  });
226
226
  });
227
227
  }
228
- const G = (t, e) => t === void 0 || t === e, jt = (t, e) => t === void 0 || t === e;
229
- function Xe(t, e) {
230
- return typeof t == "string" ? e.key === t : jt(t.key, e.key) && jt(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
228
+ const G = (t, e) => t === void 0 || t === e, _t = (t, e) => t === void 0 || t === e;
229
+ function qe(t, e) {
230
+ return typeof t == "string" ? e.key === t : _t(t.key, e.key) && _t(t.code, e.code) && G(t.ctrlKey, e.ctrlKey) && G(t.altKey, e.altKey) && G(t.shiftKey, e.shiftKey) && G(t.metaKey, e.metaKey) && G(t.repeat, e.repeat) && G(
231
231
  t.commandOrControlKey,
232
232
  e.metaKey || e.ctrlKey
233
233
  );
@@ -239,38 +239,123 @@ function fe({
239
239
  return H((o) => {
240
240
  const n = (s) => {
241
241
  if (o.contains(s.target)) {
242
- for (const i of t)
243
- if (Xe(i, s)) {
242
+ for (const r of t)
243
+ if (qe(r, s)) {
244
244
  e(s);
245
245
  break;
246
246
  }
247
247
  }
248
248
  };
249
- return document.addEventListener("keydown", n), M(() => {
249
+ return document.addEventListener("keydown", n), F(() => {
250
250
  document.removeEventListener("keydown", n);
251
251
  });
252
252
  });
253
253
  }
254
- function to(t) {
254
+ function no(t) {
255
255
  return fe({ allowedKeys: ["Enter"], handler: t });
256
256
  }
257
- function eo(t) {
257
+ function oo(t) {
258
258
  return fe({ allowedKeys: ["Escape"], handler: t });
259
259
  }
260
- const tt = Math.min, X = Math.max, gt = Math.round, dt = Math.floor, D = (t) => ({
260
+ const Qe = ({
261
+ mutate: t,
262
+ convertError: e,
263
+ onSuccess: o,
264
+ onError: n,
265
+ onSettled: s
266
+ }) => {
267
+ let r;
268
+ const i = W(R.notAsked), c = i.map(
269
+ (d) => R.isSuccess(d) ? d.value : void 0
270
+ ), a = i.map(
271
+ (d) => R.isFailure(d) ? d.error : void 0
272
+ ), l = i.map((d) => R.isLoading(d)), f = () => {
273
+ r == null || r.abort(), r = void 0;
274
+ };
275
+ return {
276
+ status: i,
277
+ value: c,
278
+ error: a,
279
+ pending: l,
280
+ execute: async (d, p) => {
281
+ f(), r = new AbortController();
282
+ const g = r.signal, y = i.get(), v = (p == null ? void 0 : p.optimisticValue) ?? ((p == null ? void 0 : p.optimisticFromRequest) != null ? p.optimisticFromRequest(d) : void 0);
283
+ v != null ? i.set(R.loading(v)) : i.set(R.loading(R.getOrUndefined(y)));
284
+ try {
285
+ const w = await t({ request: d, abortSignal: g, previous: y });
286
+ r = void 0, i.set(R.success(w)), o == null || o(w, d);
287
+ } catch (w) {
288
+ r = void 0, i.set(R.failure(e(w))), n == null || n(e(w), d);
289
+ }
290
+ s == null || s(i.get(), d);
291
+ },
292
+ cancel: (d) => {
293
+ f(), i.set(d ?? R.notAsked);
294
+ },
295
+ dispose: () => {
296
+ r == null || r.abort(), r = void 0, i.dispose();
297
+ }
298
+ };
299
+ }, Je = (t, e) => {
300
+ const { status: o, dispose: n, execute: s } = t, { pending: r, failure: i, success: c, notAsked: a } = e;
301
+ let l;
302
+ const f = () => {
303
+ l != null && s(l);
304
+ }, h = (m) => {
305
+ l = m, s(m);
306
+ };
307
+ return K(
308
+ F(n),
309
+ Vt(o, {
310
+ loading: r != null ? (m) => r({
311
+ previous: m,
312
+ retry: f,
313
+ execute: h,
314
+ cancel: t.cancel
315
+ }) : void 0,
316
+ failure: i != null ? (m) => i({ error: m, retry: f, execute: h }) : void 0,
317
+ success: (m) => c({ value: m, execute: h }),
318
+ notAsked: () => a({ execute: h })
319
+ })
320
+ );
321
+ }, so = ({
322
+ mutate: t,
323
+ convertError: e = (l) => l,
324
+ onSuccess: o,
325
+ onError: n,
326
+ onSettled: s,
327
+ pending: r,
328
+ failure: i,
329
+ success: c,
330
+ notAsked: a
331
+ }) => {
332
+ const l = Qe({
333
+ mutate: t,
334
+ convertError: e,
335
+ onSuccess: o,
336
+ onError: n,
337
+ onSettled: s
338
+ });
339
+ return Je(l, {
340
+ pending: r,
341
+ failure: i,
342
+ success: c,
343
+ notAsked: a
344
+ });
345
+ }, tt = Math.min, q = Math.max, gt = Math.round, dt = Math.floor, M = (t) => ({
261
346
  x: t,
262
347
  y: t
263
- }), Qe = {
348
+ }), Ge = {
264
349
  left: "right",
265
350
  right: "left",
266
351
  bottom: "top",
267
352
  top: "bottom"
268
- }, Je = {
353
+ }, Ze = {
269
354
  start: "end",
270
355
  end: "start"
271
356
  };
272
357
  function Tt(t, e, o) {
273
- return X(t, tt(e, o));
358
+ return q(t, tt(e, o));
274
359
  }
275
360
  function lt(t, e) {
276
361
  return typeof t == "function" ? t(e) : t;
@@ -284,50 +369,50 @@ function ut(t) {
284
369
  function he(t) {
285
370
  return t === "x" ? "y" : "x";
286
371
  }
287
- function Vt(t) {
372
+ function $t(t) {
288
373
  return t === "y" ? "height" : "width";
289
374
  }
290
375
  function z(t) {
291
376
  return ["top", "bottom"].includes(Q(t)) ? "y" : "x";
292
377
  }
293
- function $t(t) {
378
+ function Bt(t) {
294
379
  return he(z(t));
295
380
  }
296
- function Ge(t, e, o) {
381
+ function tn(t, e, o) {
297
382
  o === void 0 && (o = !1);
298
- const n = ut(t), s = $t(t), i = Vt(s);
299
- let r = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
300
- return e.reference[i] > e.floating[i] && (r = pt(r)), [r, pt(r)];
383
+ const n = ut(t), s = Bt(t), r = $t(s);
384
+ let i = s === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
385
+ return e.reference[r] > e.floating[r] && (i = pt(i)), [i, pt(i)];
301
386
  }
302
- function Ze(t) {
387
+ function en(t) {
303
388
  const e = pt(t);
304
- return [St(t), e, St(e)];
389
+ return [kt(t), e, kt(e)];
305
390
  }
306
- function St(t) {
307
- return t.replace(/start|end/g, (e) => Je[e]);
391
+ function kt(t) {
392
+ return t.replace(/start|end/g, (e) => Ze[e]);
308
393
  }
309
- function tn(t, e, o) {
310
- const n = ["left", "right"], s = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
394
+ function nn(t, e, o) {
395
+ const n = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
311
396
  switch (t) {
312
397
  case "top":
313
398
  case "bottom":
314
399
  return o ? e ? s : n : e ? n : s;
315
400
  case "left":
316
401
  case "right":
317
- return e ? i : r;
402
+ return e ? r : i;
318
403
  default:
319
404
  return [];
320
405
  }
321
406
  }
322
- function en(t, e, o, n) {
407
+ function on(t, e, o, n) {
323
408
  const s = ut(t);
324
- let i = tn(Q(t), o === "start", n);
325
- return s && (i = i.map((r) => r + "-" + s), e && (i = i.concat(i.map(St)))), i;
409
+ let r = nn(Q(t), o === "start", n);
410
+ return s && (r = r.map((i) => i + "-" + s), e && (r = r.concat(r.map(kt)))), r;
326
411
  }
327
412
  function pt(t) {
328
- return t.replace(/left|right|bottom|top/g, (e) => Qe[e]);
413
+ return t.replace(/left|right|bottom|top/g, (e) => Ge[e]);
329
414
  }
330
- function nn(t) {
415
+ function sn(t) {
331
416
  return {
332
417
  top: 0,
333
418
  right: 0,
@@ -337,7 +422,7 @@ function nn(t) {
337
422
  };
338
423
  }
339
424
  function de(t) {
340
- return typeof t != "number" ? nn(t) : {
425
+ return typeof t != "number" ? sn(t) : {
341
426
  top: t,
342
427
  right: t,
343
428
  bottom: t,
@@ -362,12 +447,12 @@ function wt(t) {
362
447
  y: o
363
448
  };
364
449
  }
365
- function _t(t, e, o) {
450
+ function It(t, e, o) {
366
451
  let {
367
452
  reference: n,
368
453
  floating: s
369
454
  } = t;
370
- const i = z(e), r = $t(e), c = Vt(r), a = Q(e), l = i === "y", f = n.x + n.width / 2 - s.width / 2, h = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
455
+ const r = z(e), i = Bt(e), c = $t(i), a = Q(e), l = r === "y", f = n.x + n.width / 2 - s.width / 2, h = n.y + n.height / 2 - s.height / 2, m = n[c] / 2 - s[c] / 2;
371
456
  let u;
372
457
  switch (a) {
373
458
  case "top":
@@ -402,39 +487,39 @@ function _t(t, e, o) {
402
487
  }
403
488
  switch (ut(e)) {
404
489
  case "start":
405
- u[r] -= m * (o && l ? -1 : 1);
490
+ u[i] -= m * (o && l ? -1 : 1);
406
491
  break;
407
492
  case "end":
408
- u[r] += m * (o && l ? -1 : 1);
493
+ u[i] += m * (o && l ? -1 : 1);
409
494
  break;
410
495
  }
411
496
  return u;
412
497
  }
413
- const on = async (t, e, o) => {
498
+ const rn = async (t, e, o) => {
414
499
  const {
415
500
  placement: n = "bottom",
416
501
  strategy: s = "absolute",
417
- middleware: i = [],
418
- platform: r
419
- } = o, c = i.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
420
- let l = await r.getElementRects({
502
+ middleware: r = [],
503
+ platform: i
504
+ } = o, c = r.filter(Boolean), a = await (i.isRTL == null ? void 0 : i.isRTL(e));
505
+ let l = await i.getElementRects({
421
506
  reference: t,
422
507
  floating: e,
423
508
  strategy: s
424
509
  }), {
425
510
  x: f,
426
511
  y: h
427
- } = _t(l, n, a), m = n, u = {}, g = 0;
428
- for (let w = 0; w < c.length; w++) {
512
+ } = It(l, n, a), m = n, u = {}, d = 0;
513
+ for (let p = 0; p < c.length; p++) {
429
514
  const {
430
- name: d,
431
- fn: p
432
- } = c[w], {
433
- x,
434
- y,
515
+ name: g,
516
+ fn: y
517
+ } = c[p], {
518
+ x: v,
519
+ y: w,
435
520
  data: b,
436
- reset: v
437
- } = await p({
521
+ reset: x
522
+ } = await y({
438
523
  x: f,
439
524
  y: h,
440
525
  initialPlacement: n,
@@ -442,26 +527,26 @@ const on = async (t, e, o) => {
442
527
  strategy: s,
443
528
  middlewareData: u,
444
529
  rects: l,
445
- platform: r,
530
+ platform: i,
446
531
  elements: {
447
532
  reference: t,
448
533
  floating: e
449
534
  }
450
535
  });
451
- f = x ?? f, h = y ?? h, u = {
536
+ f = v ?? f, h = w ?? h, u = {
452
537
  ...u,
453
- [d]: {
454
- ...u[d],
538
+ [g]: {
539
+ ...u[g],
455
540
  ...b
456
541
  }
457
- }, v && g <= 50 && (g++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (l = v.rects === !0 ? await r.getElementRects({
542
+ }, x && d <= 50 && (d++, typeof x == "object" && (x.placement && (m = x.placement), x.rects && (l = x.rects === !0 ? await i.getElementRects({
458
543
  reference: t,
459
544
  floating: e,
460
545
  strategy: s
461
- }) : v.rects), {
546
+ }) : x.rects), {
462
547
  x: f,
463
548
  y: h
464
- } = _t(l, m, a)), w = -1);
549
+ } = It(l, m, a)), p = -1);
465
550
  }
466
551
  return {
467
552
  x: f,
@@ -477,8 +562,8 @@ async function me(t, e) {
477
562
  const {
478
563
  x: n,
479
564
  y: s,
480
- platform: i,
481
- rects: r,
565
+ platform: r,
566
+ rects: i,
482
567
  elements: c,
483
568
  strategy: a
484
569
  } = t, {
@@ -487,36 +572,36 @@ async function me(t, e) {
487
572
  elementContext: h = "floating",
488
573
  altBoundary: m = !1,
489
574
  padding: u = 0
490
- } = lt(e, t), g = de(u), d = c[m ? h === "floating" ? "reference" : "floating" : h], p = wt(await i.getClippingRect({
491
- element: (o = await (i.isElement == null ? void 0 : i.isElement(d))) == null || o ? d : d.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
575
+ } = lt(e, t), d = de(u), g = c[m ? h === "floating" ? "reference" : "floating" : h], y = wt(await r.getClippingRect({
576
+ element: (o = await (r.isElement == null ? void 0 : r.isElement(g))) == null || o ? g : g.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
492
577
  boundary: l,
493
578
  rootBoundary: f,
494
579
  strategy: a
495
- })), x = h === "floating" ? {
580
+ })), v = h === "floating" ? {
496
581
  x: n,
497
582
  y: s,
498
- width: r.floating.width,
499
- height: r.floating.height
500
- } : r.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), b = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
583
+ width: i.floating.width,
584
+ height: i.floating.height
585
+ } : i.reference, w = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(w)) ? await (r.getScale == null ? void 0 : r.getScale(w)) || {
501
586
  x: 1,
502
587
  y: 1
503
588
  } : {
504
589
  x: 1,
505
590
  y: 1
506
- }, v = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
591
+ }, x = wt(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
507
592
  elements: c,
508
- rect: x,
509
- offsetParent: y,
593
+ rect: v,
594
+ offsetParent: w,
510
595
  strategy: a
511
- }) : x);
596
+ }) : v);
512
597
  return {
513
- top: (p.top - v.top + g.top) / b.y,
514
- bottom: (v.bottom - p.bottom + g.bottom) / b.y,
515
- left: (p.left - v.left + g.left) / b.x,
516
- right: (v.right - p.right + g.right) / b.x
598
+ top: (y.top - x.top + d.top) / b.y,
599
+ bottom: (x.bottom - y.bottom + d.bottom) / b.y,
600
+ left: (y.left - x.left + d.left) / b.x,
601
+ right: (x.right - y.right + d.right) / b.x
517
602
  };
518
603
  }
519
- const sn = (t) => ({
604
+ const cn = (t) => ({
520
605
  name: "arrow",
521
606
  options: t,
522
607
  async fn(e) {
@@ -524,8 +609,8 @@ const sn = (t) => ({
524
609
  x: o,
525
610
  y: n,
526
611
  placement: s,
527
- rects: i,
528
- platform: r,
612
+ rects: r,
613
+ platform: i,
529
614
  elements: c,
530
615
  middlewareData: a
531
616
  } = e, {
@@ -537,23 +622,23 @@ const sn = (t) => ({
537
622
  const h = de(f), m = {
538
623
  x: o,
539
624
  y: n
540
- }, u = $t(s), g = Vt(u), w = await r.getDimensions(l), d = u === "y", p = d ? "top" : "left", x = d ? "bottom" : "right", y = d ? "clientHeight" : "clientWidth", b = i.reference[g] + i.reference[u] - m[u] - i.floating[g], v = m[u] - i.reference[u], L = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
541
- let R = L ? L[y] : 0;
542
- (!R || !await (r.isElement == null ? void 0 : r.isElement(L))) && (R = c.floating[y] || i.floating[g]);
543
- const j = b / 2 - v / 2, V = R / 2 - w[g] / 2 - 1, P = tt(h[p], V), _ = tt(h[x], V), I = P, ot = R - w[g] - _, A = R / 2 - w[g] / 2 + j, Y = Tt(I, A, ot), $ = !a.arrow && ut(s) != null && A !== Y && i.reference[g] / 2 - (A < I ? P : _) - w[g] / 2 < 0, T = $ ? A < I ? A - I : A - ot : 0;
625
+ }, u = Bt(s), d = $t(u), p = await i.getDimensions(l), g = u === "y", y = g ? "top" : "left", v = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", b = r.reference[d] + r.reference[u] - m[u] - r.floating[d], x = m[u] - r.reference[u], P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
626
+ let A = P ? P[w] : 0;
627
+ (!A || !await (i.isElement == null ? void 0 : i.isElement(P))) && (A = c.floating[w] || r.floating[d]);
628
+ const _ = b / 2 - x / 2, $ = A / 2 - p[d] / 2 - 1, T = tt(h[y], $), I = tt(h[v], $), Y = T, ot = A - p[d] - I, O = A / 2 - p[d] / 2 + _, X = Tt(Y, O, ot), B = !a.arrow && ut(s) != null && O !== X && r.reference[d] / 2 - (O < Y ? T : I) - p[d] / 2 < 0, k = B ? O < Y ? O - Y : O - ot : 0;
544
629
  return {
545
- [u]: m[u] + T,
630
+ [u]: m[u] + k,
546
631
  data: {
547
- [u]: Y,
548
- centerOffset: A - Y - T,
549
- ...$ && {
550
- alignmentOffset: T
632
+ [u]: X,
633
+ centerOffset: O - X - k,
634
+ ...B && {
635
+ alignmentOffset: k
551
636
  }
552
637
  },
553
- reset: $
638
+ reset: B
554
639
  };
555
640
  }
556
- }), rn = function(t) {
641
+ }), an = function(t) {
557
642
  return t === void 0 && (t = {}), {
558
643
  name: "flip",
559
644
  options: t,
@@ -561,8 +646,8 @@ const sn = (t) => ({
561
646
  var o, n;
562
647
  const {
563
648
  placement: s,
564
- middlewareData: i,
565
- rects: r,
649
+ middlewareData: r,
650
+ rects: i,
566
651
  initialPlacement: c,
567
652
  platform: a,
568
653
  elements: l
@@ -571,63 +656,63 @@ const sn = (t) => ({
571
656
  crossAxis: h = !0,
572
657
  fallbackPlacements: m,
573
658
  fallbackStrategy: u = "bestFit",
574
- fallbackAxisSideDirection: g = "none",
575
- flipAlignment: w = !0,
576
- ...d
659
+ fallbackAxisSideDirection: d = "none",
660
+ flipAlignment: p = !0,
661
+ ...g
577
662
  } = lt(t, e);
578
- if ((o = i.arrow) != null && o.alignmentOffset)
663
+ if ((o = r.arrow) != null && o.alignmentOffset)
579
664
  return {};
580
- const p = Q(s), x = z(c), y = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), v = m || (y || !w ? [pt(c)] : Ze(c)), L = g !== "none";
581
- !m && L && v.push(...en(c, w, g, b));
582
- const R = [c, ...v], j = await me(e, d), V = [];
583
- let P = ((n = i.flip) == null ? void 0 : n.overflows) || [];
584
- if (f && V.push(j[p]), h) {
585
- const A = Ge(s, r, b);
586
- V.push(j[A[0]], j[A[1]]);
665
+ const y = Q(s), v = z(c), w = Q(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = m || (w || !p ? [pt(c)] : en(c)), P = d !== "none";
666
+ !m && P && x.push(...on(c, p, d, b));
667
+ const A = [c, ...x], _ = await me(e, g), $ = [];
668
+ let T = ((n = r.flip) == null ? void 0 : n.overflows) || [];
669
+ if (f && $.push(_[y]), h) {
670
+ const O = tn(s, i, b);
671
+ $.push(_[O[0]], _[O[1]]);
587
672
  }
588
- if (P = [...P, {
673
+ if (T = [...T, {
589
674
  placement: s,
590
- overflows: V
591
- }], !V.every((A) => A <= 0)) {
592
- var _, I;
593
- const A = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, Y = R[A];
594
- if (Y && (!(h === "alignment" ? x !== z(Y) : !1) || // We leave the current main axis only if every placement on that axis
675
+ overflows: $
676
+ }], !$.every((O) => O <= 0)) {
677
+ var I, Y;
678
+ const O = (((I = r.flip) == null ? void 0 : I.index) || 0) + 1, X = A[O];
679
+ if (X && (!(h === "alignment" ? v !== z(X) : !1) || // We leave the current main axis only if every placement on that axis
595
680
  // overflows the main axis.
596
- P.every((S) => S.overflows[0] > 0 && z(S.placement) === x)))
681
+ T.every((S) => S.overflows[0] > 0 && z(S.placement) === v)))
597
682
  return {
598
683
  data: {
599
- index: A,
600
- overflows: P
684
+ index: O,
685
+ overflows: T
601
686
  },
602
687
  reset: {
603
- placement: Y
688
+ placement: X
604
689
  }
605
690
  };
606
- let $ = (I = P.filter((T) => T.overflows[0] <= 0).sort((T, S) => T.overflows[1] - S.overflows[1])[0]) == null ? void 0 : I.placement;
607
- if (!$)
691
+ let B = (Y = T.filter((k) => k.overflows[0] <= 0).sort((k, S) => k.overflows[1] - S.overflows[1])[0]) == null ? void 0 : Y.placement;
692
+ if (!B)
608
693
  switch (u) {
609
694
  case "bestFit": {
610
695
  var ot;
611
- const T = (ot = P.filter((S) => {
612
- if (L) {
696
+ const k = (ot = T.filter((S) => {
697
+ if (P) {
613
698
  const U = z(S.placement);
614
- return U === x || // Create a bias to the `y` side axis due to horizontal
699
+ return U === v || // Create a bias to the `y` side axis due to horizontal
615
700
  // reading directions favoring greater width.
616
701
  U === "y";
617
702
  }
618
703
  return !0;
619
- }).map((S) => [S.placement, S.overflows.filter((U) => U > 0).reduce((U, Ee) => U + Ee, 0)]).sort((S, U) => S[1] - U[1])[0]) == null ? void 0 : ot[0];
620
- T && ($ = T);
704
+ }).map((S) => [S.placement, S.overflows.filter((U) => U > 0).reduce((U, Le) => U + Le, 0)]).sort((S, U) => S[1] - U[1])[0]) == null ? void 0 : ot[0];
705
+ k && (B = k);
621
706
  break;
622
707
  }
623
708
  case "initialPlacement":
624
- $ = c;
709
+ B = c;
625
710
  break;
626
711
  }
627
- if (s !== $)
712
+ if (s !== B)
628
713
  return {
629
714
  reset: {
630
- placement: $
715
+ placement: B
631
716
  }
632
717
  };
633
718
  }
@@ -635,16 +720,16 @@ const sn = (t) => ({
635
720
  }
636
721
  };
637
722
  };
638
- async function cn(t, e) {
723
+ async function ln(t, e) {
639
724
  const {
640
725
  placement: o,
641
726
  platform: n,
642
727
  elements: s
643
- } = t, i = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), r = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(r) ? -1 : 1, f = i && a ? -1 : 1, h = lt(e, t);
728
+ } = t, r = await (n.isRTL == null ? void 0 : n.isRTL(s.floating)), i = Q(o), c = ut(o), a = z(o) === "y", l = ["left", "top"].includes(i) ? -1 : 1, f = r && a ? -1 : 1, h = lt(e, t);
644
729
  let {
645
730
  mainAxis: m,
646
731
  crossAxis: u,
647
- alignmentAxis: g
732
+ alignmentAxis: d
648
733
  } = typeof h == "number" ? {
649
734
  mainAxis: h,
650
735
  crossAxis: 0,
@@ -654,7 +739,7 @@ async function cn(t, e) {
654
739
  crossAxis: h.crossAxis || 0,
655
740
  alignmentAxis: h.alignmentAxis
656
741
  };
657
- return c && typeof g == "number" && (u = c === "end" ? g * -1 : g), a ? {
742
+ return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
658
743
  x: u * f,
659
744
  y: m * l
660
745
  } : {
@@ -662,7 +747,7 @@ async function cn(t, e) {
662
747
  y: u * f
663
748
  };
664
749
  }
665
- const an = function(t) {
750
+ const un = function(t) {
666
751
  return t === void 0 && (t = 0), {
667
752
  name: "offset",
668
753
  options: t,
@@ -670,21 +755,21 @@ const an = function(t) {
670
755
  var o, n;
671
756
  const {
672
757
  x: s,
673
- y: i,
674
- placement: r,
758
+ y: r,
759
+ placement: i,
675
760
  middlewareData: c
676
- } = e, a = await cn(e, t);
677
- return r === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
761
+ } = e, a = await ln(e, t);
762
+ return i === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
678
763
  x: s + a.x,
679
- y: i + a.y,
764
+ y: r + a.y,
680
765
  data: {
681
766
  ...a,
682
- placement: r
767
+ placement: i
683
768
  }
684
769
  };
685
770
  }
686
771
  };
687
- }, ln = function(t) {
772
+ }, fn = function(t) {
688
773
  return t === void 0 && (t = {}), {
689
774
  name: "shift",
690
775
  options: t,
@@ -694,17 +779,17 @@ const an = function(t) {
694
779
  y: n,
695
780
  placement: s
696
781
  } = e, {
697
- mainAxis: i = !0,
698
- crossAxis: r = !1,
782
+ mainAxis: r = !0,
783
+ crossAxis: i = !1,
699
784
  limiter: c = {
700
- fn: (d) => {
785
+ fn: (g) => {
701
786
  let {
702
- x: p,
703
- y: x
704
- } = d;
787
+ x: y,
788
+ y: v
789
+ } = g;
705
790
  return {
706
- x: p,
707
- y: x
791
+ x: y,
792
+ y: v
708
793
  };
709
794
  }
710
795
  },
@@ -713,35 +798,35 @@ const an = function(t) {
713
798
  x: o,
714
799
  y: n
715
800
  }, f = await me(e, a), h = z(Q(s)), m = he(h);
716
- let u = l[m], g = l[h];
717
- if (i) {
718
- const d = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", x = u + f[d], y = u - f[p];
719
- u = Tt(x, u, y);
720
- }
801
+ let u = l[m], d = l[h];
721
802
  if (r) {
722
- const d = h === "y" ? "top" : "left", p = h === "y" ? "bottom" : "right", x = g + f[d], y = g - f[p];
723
- g = Tt(x, g, y);
803
+ const g = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", v = u + f[g], w = u - f[y];
804
+ u = Tt(v, u, w);
805
+ }
806
+ if (i) {
807
+ const g = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", v = d + f[g], w = d - f[y];
808
+ d = Tt(v, d, w);
724
809
  }
725
- const w = c.fn({
810
+ const p = c.fn({
726
811
  ...e,
727
812
  [m]: u,
728
- [h]: g
813
+ [h]: d
729
814
  });
730
815
  return {
731
- ...w,
816
+ ...p,
732
817
  data: {
733
- x: w.x - o,
734
- y: w.y - n,
818
+ x: p.x - o,
819
+ y: p.y - n,
735
820
  enabled: {
736
- [m]: i,
737
- [h]: r
821
+ [m]: r,
822
+ [h]: i
738
823
  }
739
824
  }
740
825
  };
741
826
  }
742
827
  };
743
828
  };
744
- function xt() {
829
+ function vt() {
745
830
  return typeof window < "u";
746
831
  }
747
832
  function nt(t) {
@@ -751,21 +836,21 @@ function E(t) {
751
836
  var e;
752
837
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
753
838
  }
754
- function N(t) {
839
+ function V(t) {
755
840
  var e;
756
841
  return (e = (ge(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
757
842
  }
758
843
  function ge(t) {
759
- return xt() ? t instanceof Node || t instanceof E(t).Node : !1;
844
+ return vt() ? t instanceof Node || t instanceof E(t).Node : !1;
760
845
  }
761
- function k(t) {
762
- return xt() ? t instanceof Element || t instanceof E(t).Element : !1;
846
+ function C(t) {
847
+ return vt() ? t instanceof Element || t instanceof E(t).Element : !1;
763
848
  }
764
- function W(t) {
765
- return xt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
849
+ function N(t) {
850
+ return vt() ? t instanceof HTMLElement || t instanceof E(t).HTMLElement : !1;
766
851
  }
767
- function It(t) {
768
- return !xt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
852
+ function Yt(t) {
853
+ return !vt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
769
854
  }
770
855
  function ft(t) {
771
856
  const {
@@ -773,13 +858,13 @@ function ft(t) {
773
858
  overflowX: o,
774
859
  overflowY: n,
775
860
  display: s
776
- } = C(t);
861
+ } = D(t);
777
862
  return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !["inline", "contents"].includes(s);
778
863
  }
779
- function un(t) {
864
+ function hn(t) {
780
865
  return ["table", "td", "th"].includes(nt(t));
781
866
  }
782
- function vt(t) {
867
+ function xt(t) {
783
868
  return [":popover-open", ":modal"].some((e) => {
784
869
  try {
785
870
  return t.matches(e);
@@ -788,32 +873,32 @@ function vt(t) {
788
873
  }
789
874
  });
790
875
  }
791
- function Bt(t) {
792
- const e = Ht(), o = k(t) ? C(t) : t;
876
+ function Ht(t) {
877
+ const e = Ut(), o = C(t) ? D(t) : t;
793
878
  return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
794
879
  }
795
- function fn(t) {
796
- let e = K(t);
797
- for (; W(e) && !et(e); ) {
798
- if (Bt(e))
880
+ function dn(t) {
881
+ let e = j(t);
882
+ for (; N(e) && !et(e); ) {
883
+ if (Ht(e))
799
884
  return e;
800
- if (vt(e))
885
+ if (xt(e))
801
886
  return null;
802
- e = K(e);
887
+ e = j(e);
803
888
  }
804
889
  return null;
805
890
  }
806
- function Ht() {
891
+ function Ut() {
807
892
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
808
893
  }
809
894
  function et(t) {
810
895
  return ["html", "body", "#document"].includes(nt(t));
811
896
  }
812
- function C(t) {
897
+ function D(t) {
813
898
  return E(t).getComputedStyle(t);
814
899
  }
815
900
  function bt(t) {
816
- return k(t) ? {
901
+ return C(t) ? {
817
902
  scrollLeft: t.scrollLeft,
818
903
  scrollTop: t.scrollTop
819
904
  } : {
@@ -821,87 +906,87 @@ function bt(t) {
821
906
  scrollTop: t.scrollY
822
907
  };
823
908
  }
824
- function K(t) {
909
+ function j(t) {
825
910
  if (nt(t) === "html")
826
911
  return t;
827
912
  const e = (
828
913
  // Step into the shadow DOM of the parent of a slotted node.
829
914
  t.assignedSlot || // DOM Element detected.
830
915
  t.parentNode || // ShadowRoot detected.
831
- It(t) && t.host || // Fallback.
832
- N(t)
916
+ Yt(t) && t.host || // Fallback.
917
+ V(t)
833
918
  );
834
- return It(e) ? e.host : e;
919
+ return Yt(e) ? e.host : e;
835
920
  }
836
921
  function pe(t) {
837
- const e = K(t);
838
- return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && ft(e) ? e : pe(e);
922
+ const e = j(t);
923
+ return et(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : N(e) && ft(e) ? e : pe(e);
839
924
  }
840
- function it(t, e, o) {
925
+ function rt(t, e, o) {
841
926
  var n;
842
927
  e === void 0 && (e = []), o === void 0 && (o = !0);
843
- const s = pe(t), i = s === ((n = t.ownerDocument) == null ? void 0 : n.body), r = E(s);
844
- if (i) {
845
- const c = kt(r);
846
- return e.concat(r, r.visualViewport || [], ft(s) ? s : [], c && o ? it(c) : []);
928
+ const s = pe(t), r = s === ((n = t.ownerDocument) == null ? void 0 : n.body), i = E(s);
929
+ if (r) {
930
+ const c = St(i);
931
+ return e.concat(i, i.visualViewport || [], ft(s) ? s : [], c && o ? rt(c) : []);
847
932
  }
848
- return e.concat(s, it(s, [], o));
933
+ return e.concat(s, rt(s, [], o));
849
934
  }
850
- function kt(t) {
935
+ function St(t) {
851
936
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
852
937
  }
853
938
  function we(t) {
854
- const e = C(t);
939
+ const e = D(t);
855
940
  let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
856
- const s = W(t), i = s ? t.offsetWidth : o, r = s ? t.offsetHeight : n, c = gt(o) !== i || gt(n) !== r;
857
- return c && (o = i, n = r), {
941
+ const s = N(t), r = s ? t.offsetWidth : o, i = s ? t.offsetHeight : n, c = gt(o) !== r || gt(n) !== i;
942
+ return c && (o = r, n = i), {
858
943
  width: o,
859
944
  height: n,
860
945
  $: c
861
946
  };
862
947
  }
863
- function Ut(t) {
864
- return k(t) ? t : t.contextElement;
948
+ function zt(t) {
949
+ return C(t) ? t : t.contextElement;
865
950
  }
866
951
  function Z(t) {
867
- const e = Ut(t);
868
- if (!W(e))
869
- return D(1);
952
+ const e = zt(t);
953
+ if (!N(e))
954
+ return M(1);
870
955
  const o = e.getBoundingClientRect(), {
871
956
  width: n,
872
957
  height: s,
873
- $: i
958
+ $: r
874
959
  } = we(e);
875
- let r = (i ? gt(o.width) : o.width) / n, c = (i ? gt(o.height) : o.height) / s;
876
- return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
877
- x: r,
960
+ let i = (r ? gt(o.width) : o.width) / n, c = (r ? gt(o.height) : o.height) / s;
961
+ return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
962
+ x: i,
878
963
  y: c
879
964
  };
880
965
  }
881
- const hn = /* @__PURE__ */ D(0);
966
+ const mn = /* @__PURE__ */ M(0);
882
967
  function ye(t) {
883
968
  const e = E(t);
884
- return !Ht() || !e.visualViewport ? hn : {
969
+ return !Ut() || !e.visualViewport ? mn : {
885
970
  x: e.visualViewport.offsetLeft,
886
971
  y: e.visualViewport.offsetTop
887
972
  };
888
973
  }
889
- function dn(t, e, o) {
974
+ function gn(t, e, o) {
890
975
  return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
891
976
  }
892
977
  function J(t, e, o, n) {
893
978
  e === void 0 && (e = !1), o === void 0 && (o = !1);
894
- const s = t.getBoundingClientRect(), i = Ut(t);
895
- let r = D(1);
896
- e && (n ? k(n) && (r = Z(n)) : r = Z(t));
897
- const c = dn(i, o, n) ? ye(i) : D(0);
898
- let a = (s.left + c.x) / r.x, l = (s.top + c.y) / r.y, f = s.width / r.x, h = s.height / r.y;
899
- if (i) {
900
- const m = E(i), u = n && k(n) ? E(n) : n;
901
- let g = m, w = kt(g);
902
- for (; w && n && u !== g; ) {
903
- const d = Z(w), p = w.getBoundingClientRect(), x = C(w), y = p.left + (w.clientLeft + parseFloat(x.paddingLeft)) * d.x, b = p.top + (w.clientTop + parseFloat(x.paddingTop)) * d.y;
904
- a *= d.x, l *= d.y, f *= d.x, h *= d.y, a += y, l += b, g = E(w), w = kt(g);
979
+ const s = t.getBoundingClientRect(), r = zt(t);
980
+ let i = M(1);
981
+ e && (n ? C(n) && (i = Z(n)) : i = Z(t));
982
+ const c = gn(r, o, n) ? ye(r) : M(0);
983
+ let a = (s.left + c.x) / i.x, l = (s.top + c.y) / i.y, f = s.width / i.x, h = s.height / i.y;
984
+ if (r) {
985
+ const m = E(r), u = n && C(n) ? E(n) : n;
986
+ let d = m, p = St(d);
987
+ for (; p && n && u !== d; ) {
988
+ const g = Z(p), y = p.getBoundingClientRect(), v = D(p), w = y.left + (p.clientLeft + parseFloat(v.paddingLeft)) * g.x, b = y.top + (p.clientTop + parseFloat(v.paddingTop)) * g.y;
989
+ a *= g.x, l *= g.y, f *= g.x, h *= g.y, a += w, l += b, d = E(p), p = St(d);
905
990
  }
906
991
  }
907
992
  return wt({
@@ -911,41 +996,41 @@ function J(t, e, o, n) {
911
996
  y: l
912
997
  });
913
998
  }
914
- function zt(t, e) {
999
+ function Kt(t, e) {
915
1000
  const o = bt(t).scrollLeft;
916
- return e ? e.left + o : J(N(t)).left + o;
1001
+ return e ? e.left + o : J(V(t)).left + o;
917
1002
  }
918
- function xe(t, e, o) {
1003
+ function ve(t, e, o) {
919
1004
  o === void 0 && (o = !1);
920
1005
  const n = t.getBoundingClientRect(), s = n.left + e.scrollLeft - (o ? 0 : (
921
1006
  // RTL <body> scrollbar.
922
- zt(t, n)
923
- )), i = n.top + e.scrollTop;
1007
+ Kt(t, n)
1008
+ )), r = n.top + e.scrollTop;
924
1009
  return {
925
1010
  x: s,
926
- y: i
1011
+ y: r
927
1012
  };
928
1013
  }
929
- function mn(t) {
1014
+ function pn(t) {
930
1015
  let {
931
1016
  elements: e,
932
1017
  rect: o,
933
1018
  offsetParent: n,
934
1019
  strategy: s
935
1020
  } = t;
936
- const i = s === "fixed", r = N(n), c = e ? vt(e.floating) : !1;
937
- if (n === r || c && i)
1021
+ const r = s === "fixed", i = V(n), c = e ? xt(e.floating) : !1;
1022
+ if (n === i || c && r)
938
1023
  return o;
939
1024
  let a = {
940
1025
  scrollLeft: 0,
941
1026
  scrollTop: 0
942
- }, l = D(1);
943
- const f = D(0), h = W(n);
944
- if ((h || !h && !i) && ((nt(n) !== "body" || ft(r)) && (a = bt(n)), W(n))) {
1027
+ }, l = M(1);
1028
+ const f = M(0), h = N(n);
1029
+ if ((h || !h && !r) && ((nt(n) !== "body" || ft(i)) && (a = bt(n)), N(n))) {
945
1030
  const u = J(n);
946
1031
  l = Z(n), f.x = u.x + n.clientLeft, f.y = u.y + n.clientTop;
947
1032
  }
948
- const m = r && !h && !i ? xe(r, a, !0) : D(0);
1033
+ const m = i && !h && !r ? ve(i, a, !0) : M(0);
949
1034
  return {
950
1035
  width: o.width * l.x,
951
1036
  height: o.height * l.y,
@@ -953,52 +1038,52 @@ function mn(t) {
953
1038
  y: o.y * l.y - a.scrollTop * l.y + f.y + m.y
954
1039
  };
955
1040
  }
956
- function gn(t) {
1041
+ function wn(t) {
957
1042
  return Array.from(t.getClientRects());
958
1043
  }
959
- function pn(t) {
960
- const e = N(t), o = bt(t), n = t.ownerDocument.body, s = X(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = X(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
961
- let r = -o.scrollLeft + zt(t);
1044
+ function yn(t) {
1045
+ const e = V(t), o = bt(t), n = t.ownerDocument.body, s = q(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = q(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
1046
+ let i = -o.scrollLeft + Kt(t);
962
1047
  const c = -o.scrollTop;
963
- return C(n).direction === "rtl" && (r += X(e.clientWidth, n.clientWidth) - s), {
1048
+ return D(n).direction === "rtl" && (i += q(e.clientWidth, n.clientWidth) - s), {
964
1049
  width: s,
965
- height: i,
966
- x: r,
1050
+ height: r,
1051
+ x: i,
967
1052
  y: c
968
1053
  };
969
1054
  }
970
- function wn(t, e) {
971
- const o = E(t), n = N(t), s = o.visualViewport;
972
- let i = n.clientWidth, r = n.clientHeight, c = 0, a = 0;
1055
+ function vn(t, e) {
1056
+ const o = E(t), n = V(t), s = o.visualViewport;
1057
+ let r = n.clientWidth, i = n.clientHeight, c = 0, a = 0;
973
1058
  if (s) {
974
- i = s.width, r = s.height;
975
- const l = Ht();
1059
+ r = s.width, i = s.height;
1060
+ const l = Ut();
976
1061
  (!l || l && e === "fixed") && (c = s.offsetLeft, a = s.offsetTop);
977
1062
  }
978
1063
  return {
979
- width: i,
980
- height: r,
1064
+ width: r,
1065
+ height: i,
981
1066
  x: c,
982
1067
  y: a
983
1068
  };
984
1069
  }
985
- function yn(t, e) {
986
- const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, i = W(t) ? Z(t) : D(1), r = t.clientWidth * i.x, c = t.clientHeight * i.y, a = s * i.x, l = n * i.y;
1070
+ function xn(t, e) {
1071
+ const o = J(t, !0, e === "fixed"), n = o.top + t.clientTop, s = o.left + t.clientLeft, r = N(t) ? Z(t) : M(1), i = t.clientWidth * r.x, c = t.clientHeight * r.y, a = s * r.x, l = n * r.y;
987
1072
  return {
988
- width: r,
1073
+ width: i,
989
1074
  height: c,
990
1075
  x: a,
991
1076
  y: l
992
1077
  };
993
1078
  }
994
- function Yt(t, e, o) {
1079
+ function Xt(t, e, o) {
995
1080
  let n;
996
1081
  if (e === "viewport")
997
- n = wn(t, o);
1082
+ n = vn(t, o);
998
1083
  else if (e === "document")
999
- n = pn(N(t));
1000
- else if (k(e))
1001
- n = yn(e, o);
1084
+ n = yn(V(t));
1085
+ else if (C(e))
1086
+ n = xn(e, o);
1002
1087
  else {
1003
1088
  const s = ye(t);
1004
1089
  n = {
@@ -1010,34 +1095,34 @@ function Yt(t, e, o) {
1010
1095
  }
1011
1096
  return wt(n);
1012
1097
  }
1013
- function ve(t, e) {
1014
- const o = K(t);
1015
- return o === e || !k(o) || et(o) ? !1 : C(o).position === "fixed" || ve(o, e);
1098
+ function xe(t, e) {
1099
+ const o = j(t);
1100
+ return o === e || !C(o) || et(o) ? !1 : D(o).position === "fixed" || xe(o, e);
1016
1101
  }
1017
- function xn(t, e) {
1102
+ function bn(t, e) {
1018
1103
  const o = e.get(t);
1019
1104
  if (o)
1020
1105
  return o;
1021
- let n = it(t, [], !1).filter((c) => k(c) && nt(c) !== "body"), s = null;
1022
- const i = C(t).position === "fixed";
1023
- let r = i ? K(t) : t;
1024
- for (; k(r) && !et(r); ) {
1025
- const c = C(r), a = Bt(r);
1026
- !a && c.position === "fixed" && (s = null), (i ? !a && !s : !a && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ft(r) && !a && ve(t, r)) ? n = n.filter((f) => f !== r) : s = c, r = K(r);
1106
+ let n = rt(t, [], !1).filter((c) => C(c) && nt(c) !== "body"), s = null;
1107
+ const r = D(t).position === "fixed";
1108
+ let i = r ? j(t) : t;
1109
+ for (; C(i) && !et(i); ) {
1110
+ const c = D(i), a = Ht(i);
1111
+ !a && c.position === "fixed" && (s = null), (r ? !a && !s : !a && c.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ft(i) && !a && xe(t, i)) ? n = n.filter((f) => f !== i) : s = c, i = j(i);
1027
1112
  }
1028
1113
  return e.set(t, n), n;
1029
1114
  }
1030
- function vn(t) {
1115
+ function Rn(t) {
1031
1116
  let {
1032
1117
  element: e,
1033
1118
  boundary: o,
1034
1119
  rootBoundary: n,
1035
1120
  strategy: s
1036
1121
  } = t;
1037
- const r = [...o === "clippingAncestors" ? vt(e) ? [] : xn(e, this._c) : [].concat(o), n], c = r[0], a = r.reduce((l, f) => {
1038
- const h = Yt(e, f, s);
1039
- return l.top = X(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = X(h.left, l.left), l;
1040
- }, Yt(e, c, s));
1122
+ const i = [...o === "clippingAncestors" ? xt(e) ? [] : bn(e, this._c) : [].concat(o), n], c = i[0], a = i.reduce((l, f) => {
1123
+ const h = Xt(e, f, s);
1124
+ return l.top = q(h.top, l.top), l.right = tt(h.right, l.right), l.bottom = tt(h.bottom, l.bottom), l.left = q(h.left, l.left), l;
1125
+ }, Xt(e, c, s));
1041
1126
  return {
1042
1127
  width: a.right - a.left,
1043
1128
  height: a.bottom - a.top,
@@ -1045,7 +1130,7 @@ function vn(t) {
1045
1130
  y: a.top
1046
1131
  };
1047
1132
  }
1048
- function bn(t) {
1133
+ function An(t) {
1049
1134
  const {
1050
1135
  width: e,
1051
1136
  height: o
@@ -1055,63 +1140,63 @@ function bn(t) {
1055
1140
  height: o
1056
1141
  };
1057
1142
  }
1058
- function Rn(t, e, o) {
1059
- const n = W(e), s = N(e), i = o === "fixed", r = J(t, !0, i, e);
1143
+ function On(t, e, o) {
1144
+ const n = N(e), s = V(e), r = o === "fixed", i = J(t, !0, r, e);
1060
1145
  let c = {
1061
1146
  scrollLeft: 0,
1062
1147
  scrollTop: 0
1063
1148
  };
1064
- const a = D(0);
1149
+ const a = M(0);
1065
1150
  function l() {
1066
- a.x = zt(s);
1151
+ a.x = Kt(s);
1067
1152
  }
1068
- if (n || !n && !i)
1153
+ if (n || !n && !r)
1069
1154
  if ((nt(e) !== "body" || ft(s)) && (c = bt(e)), n) {
1070
- const u = J(e, !0, i, e);
1155
+ const u = J(e, !0, r, e);
1071
1156
  a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
1072
1157
  } else s && l();
1073
- i && !n && s && l();
1074
- const f = s && !n && !i ? xe(s, c) : D(0), h = r.left + c.scrollLeft - a.x - f.x, m = r.top + c.scrollTop - a.y - f.y;
1158
+ r && !n && s && l();
1159
+ const f = s && !n && !r ? ve(s, c) : M(0), h = i.left + c.scrollLeft - a.x - f.x, m = i.top + c.scrollTop - a.y - f.y;
1075
1160
  return {
1076
1161
  x: h,
1077
1162
  y: m,
1078
- width: r.width,
1079
- height: r.height
1163
+ width: i.width,
1164
+ height: i.height
1080
1165
  };
1081
1166
  }
1082
1167
  function Ot(t) {
1083
- return C(t).position === "static";
1168
+ return D(t).position === "static";
1084
1169
  }
1085
1170
  function qt(t, e) {
1086
- if (!W(t) || C(t).position === "fixed")
1171
+ if (!N(t) || D(t).position === "fixed")
1087
1172
  return null;
1088
1173
  if (e)
1089
1174
  return e(t);
1090
1175
  let o = t.offsetParent;
1091
- return N(t) === o && (o = o.ownerDocument.body), o;
1176
+ return V(t) === o && (o = o.ownerDocument.body), o;
1092
1177
  }
1093
1178
  function be(t, e) {
1094
1179
  const o = E(t);
1095
- if (vt(t))
1180
+ if (xt(t))
1096
1181
  return o;
1097
- if (!W(t)) {
1098
- let s = K(t);
1182
+ if (!N(t)) {
1183
+ let s = j(t);
1099
1184
  for (; s && !et(s); ) {
1100
- if (k(s) && !Ot(s))
1185
+ if (C(s) && !Ot(s))
1101
1186
  return s;
1102
- s = K(s);
1187
+ s = j(s);
1103
1188
  }
1104
1189
  return o;
1105
1190
  }
1106
1191
  let n = qt(t, e);
1107
- for (; n && un(n) && Ot(n); )
1192
+ for (; n && hn(n) && Ot(n); )
1108
1193
  n = qt(n, e);
1109
- return n && et(n) && Ot(n) && !Bt(n) ? o : n || fn(t) || o;
1194
+ return n && et(n) && Ot(n) && !Ht(n) ? o : n || dn(t) || o;
1110
1195
  }
1111
- const An = async function(t) {
1196
+ const Ln = async function(t) {
1112
1197
  const e = this.getOffsetParent || be, o = this.getDimensions, n = await o(t.floating);
1113
1198
  return {
1114
- reference: Rn(t.reference, await e(t.floating), t.strategy),
1199
+ reference: On(t.reference, await e(t.floating), t.strategy),
1115
1200
  floating: {
1116
1201
  x: 0,
1117
1202
  y: 0,
@@ -1120,33 +1205,33 @@ const An = async function(t) {
1120
1205
  }
1121
1206
  };
1122
1207
  };
1123
- function On(t) {
1124
- return C(t).direction === "rtl";
1208
+ function En(t) {
1209
+ return D(t).direction === "rtl";
1125
1210
  }
1126
- const En = {
1127
- convertOffsetParentRelativeRectToViewportRelativeRect: mn,
1128
- getDocumentElement: N,
1129
- getClippingRect: vn,
1211
+ const Pn = {
1212
+ convertOffsetParentRelativeRectToViewportRelativeRect: pn,
1213
+ getDocumentElement: V,
1214
+ getClippingRect: Rn,
1130
1215
  getOffsetParent: be,
1131
- getElementRects: An,
1132
- getClientRects: gn,
1133
- getDimensions: bn,
1216
+ getElementRects: Ln,
1217
+ getClientRects: wn,
1218
+ getDimensions: An,
1134
1219
  getScale: Z,
1135
- isElement: k,
1136
- isRTL: On
1220
+ isElement: C,
1221
+ isRTL: En
1137
1222
  };
1138
1223
  function Re(t, e) {
1139
1224
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1140
1225
  }
1141
- function Ln(t, e) {
1226
+ function Tn(t, e) {
1142
1227
  let o = null, n;
1143
- const s = N(t);
1144
- function i() {
1228
+ const s = V(t);
1229
+ function r() {
1145
1230
  var c;
1146
1231
  clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
1147
1232
  }
1148
- function r(c, a) {
1149
- c === void 0 && (c = !1), a === void 0 && (a = 1), i();
1233
+ function i(c, a) {
1234
+ c === void 0 && (c = !1), a === void 0 && (a = 1), r();
1150
1235
  const l = t.getBoundingClientRect(), {
1151
1236
  left: f,
1152
1237
  top: h,
@@ -1155,84 +1240,84 @@ function Ln(t, e) {
1155
1240
  } = l;
1156
1241
  if (c || e(), !m || !u)
1157
1242
  return;
1158
- const g = dt(h), w = dt(s.clientWidth - (f + m)), d = dt(s.clientHeight - (h + u)), p = dt(f), y = {
1159
- rootMargin: -g + "px " + -w + "px " + -d + "px " + -p + "px",
1160
- threshold: X(0, tt(1, a)) || 1
1243
+ const d = dt(h), p = dt(s.clientWidth - (f + m)), g = dt(s.clientHeight - (h + u)), y = dt(f), w = {
1244
+ rootMargin: -d + "px " + -p + "px " + -g + "px " + -y + "px",
1245
+ threshold: q(0, tt(1, a)) || 1
1161
1246
  };
1162
1247
  let b = !0;
1163
- function v(L) {
1164
- const R = L[0].intersectionRatio;
1165
- if (R !== a) {
1248
+ function x(P) {
1249
+ const A = P[0].intersectionRatio;
1250
+ if (A !== a) {
1166
1251
  if (!b)
1167
- return r();
1168
- R ? r(!1, R) : n = setTimeout(() => {
1169
- r(!1, 1e-7);
1252
+ return i();
1253
+ A ? i(!1, A) : n = setTimeout(() => {
1254
+ i(!1, 1e-7);
1170
1255
  }, 1e3);
1171
1256
  }
1172
- R === 1 && !Re(l, t.getBoundingClientRect()) && r(), b = !1;
1257
+ A === 1 && !Re(l, t.getBoundingClientRect()) && i(), b = !1;
1173
1258
  }
1174
1259
  try {
1175
- o = new IntersectionObserver(v, {
1176
- ...y,
1260
+ o = new IntersectionObserver(x, {
1261
+ ...w,
1177
1262
  // Handle <iframe>s
1178
1263
  root: s.ownerDocument
1179
1264
  });
1180
1265
  } catch {
1181
- o = new IntersectionObserver(v, y);
1266
+ o = new IntersectionObserver(x, w);
1182
1267
  }
1183
1268
  o.observe(t);
1184
1269
  }
1185
- return r(!0), i;
1270
+ return i(!0), r;
1186
1271
  }
1187
- function Pn(t, e, o, n) {
1272
+ function kn(t, e, o, n) {
1188
1273
  n === void 0 && (n = {});
1189
1274
  const {
1190
1275
  ancestorScroll: s = !0,
1191
- ancestorResize: i = !0,
1192
- elementResize: r = typeof ResizeObserver == "function",
1276
+ ancestorResize: r = !0,
1277
+ elementResize: i = typeof ResizeObserver == "function",
1193
1278
  layoutShift: c = typeof IntersectionObserver == "function",
1194
1279
  animationFrame: a = !1
1195
- } = n, l = Ut(t), f = s || i ? [...l ? it(l) : [], ...it(e)] : [];
1196
- f.forEach((p) => {
1197
- s && p.addEventListener("scroll", o, {
1280
+ } = n, l = zt(t), f = s || r ? [...l ? rt(l) : [], ...rt(e)] : [];
1281
+ f.forEach((y) => {
1282
+ s && y.addEventListener("scroll", o, {
1198
1283
  passive: !0
1199
- }), i && p.addEventListener("resize", o);
1284
+ }), r && y.addEventListener("resize", o);
1200
1285
  });
1201
- const h = l && c ? Ln(l, o) : null;
1286
+ const h = l && c ? Tn(l, o) : null;
1202
1287
  let m = -1, u = null;
1203
- r && (u = new ResizeObserver((p) => {
1204
- let [x] = p;
1205
- x && x.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1206
- var y;
1207
- (y = u) == null || y.observe(e);
1288
+ i && (u = new ResizeObserver((y) => {
1289
+ let [v] = y;
1290
+ v && v.target === l && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1291
+ var w;
1292
+ (w = u) == null || w.observe(e);
1208
1293
  })), o();
1209
1294
  }), l && !a && u.observe(l), u.observe(e));
1210
- let g, w = a ? J(t) : null;
1211
- a && d();
1212
- function d() {
1213
- const p = J(t);
1214
- w && !Re(w, p) && o(), w = p, g = requestAnimationFrame(d);
1295
+ let d, p = a ? J(t) : null;
1296
+ a && g();
1297
+ function g() {
1298
+ const y = J(t);
1299
+ p && !Re(p, y) && o(), p = y, d = requestAnimationFrame(g);
1215
1300
  }
1216
1301
  return o(), () => {
1217
- var p;
1218
- f.forEach((x) => {
1219
- s && x.removeEventListener("scroll", o), i && x.removeEventListener("resize", o);
1220
- }), h == null || h(), (p = u) == null || p.disconnect(), u = null, a && cancelAnimationFrame(g);
1302
+ var y;
1303
+ f.forEach((v) => {
1304
+ s && v.removeEventListener("scroll", o), r && v.removeEventListener("resize", o);
1305
+ }), h == null || h(), (y = u) == null || y.disconnect(), u = null, a && cancelAnimationFrame(d);
1221
1306
  };
1222
1307
  }
1223
- const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
1308
+ const Sn = un, Cn = fn, Qt = an, Dn = cn, Wn = (t, e, o) => {
1224
1309
  const n = /* @__PURE__ */ new Map(), s = {
1225
- platform: En,
1310
+ platform: Pn,
1226
1311
  ...o
1227
- }, i = {
1312
+ }, r = {
1228
1313
  ...s.platform,
1229
1314
  _c: n
1230
1315
  };
1231
- return on(t, e, {
1316
+ return rn(t, e, {
1232
1317
  ...s,
1233
- platform: i
1318
+ platform: r
1234
1319
  });
1235
- }, no = [
1320
+ }, io = [
1236
1321
  "top",
1237
1322
  "top-start",
1238
1323
  "top-end",
@@ -1245,26 +1330,26 @@ const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
1245
1330
  "left",
1246
1331
  "left-start",
1247
1332
  "left-end"
1248
- ], oo = (t, e = { isOpen: !1 }) => {
1333
+ ], ro = (t, e = { isOpen: !1 }) => {
1249
1334
  const o = [];
1250
1335
  let n = null;
1251
- const s = O.deriveProp(e.isOpen);
1252
- function i(c) {
1336
+ const s = L.deriveProp(e.isOpen);
1337
+ function r(c) {
1253
1338
  n = c, s.set(!0);
1254
1339
  }
1255
- function r() {
1340
+ function i() {
1256
1341
  s.set(!1), o.forEach((c) => c()), o.length = 0;
1257
1342
  }
1258
- return q(
1259
- t(i, r),
1343
+ return K(
1344
+ t(r, i),
1260
1345
  re(
1261
1346
  s,
1262
- () => q(
1263
- (n == null ? void 0 : n.onClickOutside) != null ? qe(n.onClickOutside) : null,
1347
+ () => K(
1348
+ (n == null ? void 0 : n.onClickOutside) != null ? Xe(n.onClickOutside) : null,
1264
1349
  H(
1265
- (c) => se(
1350
+ (c) => ie(
1266
1351
  "body",
1267
- Et.div(
1352
+ Lt.div(
1268
1353
  H((a) => {
1269
1354
  a.style.position = "absolute";
1270
1355
  const l = typeof (n == null ? void 0 : n.target) == "string" ? c.querySelector(
@@ -1273,14 +1358,14 @@ const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
1273
1358
  if (l == null)
1274
1359
  throw new Error(`Target not found: ${n == null ? void 0 : n.target}`);
1275
1360
  let f = null;
1276
- const h = O.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = O.toSignal(
1361
+ const h = L.toSignal((n == null ? void 0 : n.mainAxisOffset) ?? 0), m = L.toSignal(
1277
1362
  (n == null ? void 0 : n.crossAxisOffset) ?? 0
1278
- ), u = O.toSignal(
1363
+ ), u = L.toSignal(
1279
1364
  /* c8 ignore next 3 */
1280
1365
  (n == null ? void 0 : n.placement) ?? "top"
1281
- ), g = O.toSignal(
1366
+ ), d = L.toSignal(
1282
1367
  (n == null ? void 0 : n.arrowPadding) ?? 0
1283
- ), w = n == null ? void 0 : n.arrow, d = F({
1368
+ ), p = n == null ? void 0 : n.arrow, g = W({
1284
1369
  centerOffset: 0,
1285
1370
  alignmentOffset: 0,
1286
1371
  containerWidth: 0,
@@ -1288,69 +1373,69 @@ const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
1288
1373
  x: void 0,
1289
1374
  y: void 0
1290
1375
  });
1291
- async function p() {
1292
- const y = [
1293
- Xt(),
1294
- Tn({
1376
+ async function y() {
1377
+ const w = [
1378
+ Qt(),
1379
+ Sn({
1295
1380
  mainAxis: h.get(),
1296
1381
  crossAxis: m.get()
1297
1382
  }),
1298
- Sn(),
1299
- Xt()
1383
+ Cn(),
1384
+ Qt()
1300
1385
  ];
1301
- w != null && f != null && y.push(
1302
- kn({
1386
+ p != null && f != null && w.push(
1387
+ Dn({
1303
1388
  element: f,
1304
- padding: g.get()
1389
+ padding: d.get()
1305
1390
  })
1306
1391
  );
1307
- const b = await Cn(l, a, {
1392
+ const b = await Wn(l, a, {
1308
1393
  placement: u.get(),
1309
1394
  strategy: "absolute",
1310
- middleware: y
1311
- }), { x: v, y: L, middlewareData: R } = b;
1312
- if (a.style.top = `${L}px`, a.style.left = `${v}px`, f != null && R.arrow != null) {
1395
+ middleware: w
1396
+ }), { x, y: P, middlewareData: A } = b;
1397
+ if (a.style.top = `${P}px`, a.style.left = `${x}px`, f != null && A.arrow != null) {
1313
1398
  const {
1314
- x: j,
1315
- y: V,
1316
- centerOffset: P,
1317
- alignmentOffset: _
1318
- } = R.arrow;
1319
- d.set({
1320
- x: j,
1321
- y: V,
1322
- centerOffset: P,
1323
- alignmentOffset: _,
1399
+ x: _,
1400
+ y: $,
1401
+ centerOffset: T,
1402
+ alignmentOffset: I
1403
+ } = A.arrow;
1404
+ g.set({
1405
+ x: _,
1406
+ y: $,
1407
+ centerOffset: T,
1408
+ alignmentOffset: I,
1324
1409
  containerWidth: a.offsetWidth,
1325
1410
  containerHeight: a.offsetHeight
1326
1411
  });
1327
1412
  }
1328
1413
  }
1329
- const x = Te(
1414
+ const v = Te(
1330
1415
  h,
1331
1416
  m,
1332
1417
  u
1333
- )(p);
1334
- return q(
1418
+ )(y);
1419
+ return K(
1335
1420
  n == null ? void 0 : n.content,
1336
- (n == null ? void 0 : n.arrow) != null ? Et.div(
1421
+ (n == null ? void 0 : n.arrow) != null ? Lt.div(
1337
1422
  n == null ? void 0 : n.arrow(
1338
- ie(
1339
- d,
1423
+ ce(
1424
+ g,
1340
1425
  u
1341
- )((y, b) => ({
1342
- ...y,
1426
+ )((w, b) => ({
1427
+ ...w,
1343
1428
  placement: b
1344
1429
  }))
1345
1430
  ),
1346
- H((y) => {
1347
- f = y, p();
1431
+ H((w) => {
1432
+ f = w, y();
1348
1433
  })
1349
1434
  ) : null,
1350
- M(
1351
- d.dispose,
1352
- Pn(l, a, p),
1353
- x
1435
+ F(
1436
+ g.dispose,
1437
+ kn(l, a, y),
1438
+ v
1354
1439
  )
1355
1440
  );
1356
1441
  })
@@ -1360,88 +1445,88 @@ const Tn = an, Sn = ln, Xt = rn, kn = sn, Cn = (t, e, o) => {
1360
1445
  )
1361
1446
  )
1362
1447
  );
1363
- }, Dn = ({
1448
+ }, Fn = ({
1364
1449
  request: t,
1365
1450
  load: e,
1366
1451
  convertError: o,
1367
1452
  onSuccess: n,
1368
1453
  onError: s,
1369
- onSettled: i
1454
+ onSettled: r
1370
1455
  }) => {
1371
- let r;
1372
- const c = F(B.notAsked), a = c.map(
1373
- (d) => B.isSuccess(d) ? d.value : void 0
1456
+ let i;
1457
+ const c = W(R.notAsked), a = c.map(
1458
+ (g) => R.isSuccess(g) ? g.value : void 0
1374
1459
  ), l = c.map(
1375
- (d) => B.isFailure(d) ? d.error : void 0
1376
- ), f = c.map((d) => B.isLoading(d)), h = () => {
1377
- r == null || r.abort(), r = void 0;
1378
- }, m = (d) => {
1379
- h(), c.set(d ?? B.notAsked);
1380
- }, u = async (d) => {
1381
- h(), r = new AbortController();
1382
- const p = r.signal, x = c.get();
1383
- c.set(B.loading(B.getOrUndefined(x)));
1460
+ (g) => R.isFailure(g) ? g.error : void 0
1461
+ ), f = c.map((g) => R.isLoading(g)), h = () => {
1462
+ i == null || i.abort(), i = void 0;
1463
+ }, m = (g) => {
1464
+ h(), c.set(g ?? R.notAsked);
1465
+ }, u = async (g) => {
1466
+ h(), i = new AbortController();
1467
+ const y = i.signal, v = c.get();
1468
+ c.set(R.loading(R.getOrUndefined(v)));
1384
1469
  try {
1385
- const y = await e({ request: d, abortSignal: p, previous: x });
1386
- await Promise.resolve(), r = void 0, c.set(B.success(y)), n == null || n(y, d);
1387
- } catch (y) {
1388
- r = void 0, c.set(B.failure(o(y))), s == null || s(o(y), d);
1470
+ const w = await e({ request: g, abortSignal: y, previous: v });
1471
+ await Promise.resolve(), i = void 0, c.set(R.success(w)), n == null || n(w, g);
1472
+ } catch (w) {
1473
+ i = void 0, c.set(R.failure(o(w))), s == null || s(o(w), g);
1389
1474
  }
1390
- i == null || i(c.get(), d);
1391
- }, g = () => u(O.get(t)), w = () => {
1392
- r == null || r.abort(), r = void 0, c.dispose();
1475
+ r == null || r(c.get(), g);
1476
+ }, d = () => u(L.get(t)), p = () => {
1477
+ i == null || i.abort(), i = void 0, c.dispose();
1393
1478
  };
1394
- return c.onDispose(O.on(t, u)), {
1479
+ return c.onDispose(L.on(t, u)), {
1395
1480
  status: c,
1396
1481
  value: a,
1397
1482
  error: l,
1398
1483
  loading: f,
1399
1484
  cancel: m,
1400
- reload: g,
1401
- dispose: w
1485
+ reload: d,
1486
+ dispose: p
1402
1487
  };
1403
- }, Wn = (t, e) => {
1404
- const { status: o, dispose: n, reload: s } = t, { pending: i, failure: r, success: c } = e;
1405
- return q(
1406
- M(n),
1407
- ue(o, {
1408
- loading: i != null ? (a) => i({ previous: a, reload: s, cancel: t.cancel }) : void 0,
1409
- failure: r != null ? (a) => r({ error: a, reload: s }) : void 0,
1488
+ }, Mn = (t, e) => {
1489
+ const { status: o, dispose: n, reload: s } = t, { pending: r, failure: i, success: c } = e;
1490
+ return K(
1491
+ F(n),
1492
+ Vt(o, {
1493
+ loading: r != null ? (a) => r({ previous: a, reload: s, cancel: t.cancel }) : void 0,
1494
+ failure: i != null ? (a) => i({ error: a, reload: s }) : void 0,
1410
1495
  success: (a) => c({ value: a, reload: s })
1411
1496
  })
1412
1497
  );
1413
- }, so = ({
1498
+ }, co = ({
1414
1499
  request: t,
1415
1500
  load: e,
1416
1501
  convertError: o = (l) => l,
1417
1502
  onSuccess: n,
1418
1503
  onError: s,
1419
- onSettled: i,
1420
- success: r,
1504
+ onSettled: r,
1505
+ success: i,
1421
1506
  pending: c,
1422
1507
  failure: a
1423
1508
  }) => {
1424
- const l = Dn({
1509
+ const l = Fn({
1425
1510
  request: t,
1426
1511
  load: e,
1427
1512
  convertError: o,
1428
1513
  onSuccess: n,
1429
1514
  onError: s,
1430
- onSettled: i
1515
+ onSettled: r
1431
1516
  });
1432
- return Wn(l, { success: r, pending: c, failure: a });
1433
- }, Fn = (t, e) => {
1517
+ return Mn(l, { success: i, pending: c, failure: a });
1518
+ }, Nn = (t, e) => {
1434
1519
  if (typeof e == "function")
1435
- return Fn(t, { success: e });
1436
- const o = e.failure ?? ((s) => q(
1437
- M(s.on(console.error)),
1438
- s.map((i) => `Error: ${i}`)
1520
+ return Nn(t, { success: e });
1521
+ const o = e.failure ?? ((s) => K(
1522
+ F(s.on(console.error)),
1523
+ s.map((r) => `Error: ${r}`)
1439
1524
  )), n = e.success;
1440
- return oe(O.toSignal(t), {
1525
+ return se(L.toSignal(t), {
1441
1526
  Success: (s) => n(s.$.value),
1442
1527
  Failure: (s) => o(s.$.error)
1443
1528
  });
1444
- }, ro = () => ne.focus((t) => {
1529
+ }, ao = () => oe.focus((t) => {
1445
1530
  var e;
1446
1531
  return (e = t.target) == null ? void 0 : e.select();
1447
1532
  });
@@ -1463,7 +1548,7 @@ class Rt {
1463
1548
  * console.log(rect.height); // 50
1464
1549
  * ```
1465
1550
  */
1466
- constructor(e, o, n, s, i, r) {
1551
+ constructor(e, o, n, s, r, i) {
1467
1552
  /**
1468
1553
  * Compares this rectangle with another rectangle for equality.
1469
1554
  *
@@ -1485,7 +1570,7 @@ class Rt {
1485
1570
  * ```
1486
1571
  */
1487
1572
  At(this, "equals", (e) => ht(this.left, e.left) && ht(this.top, e.top) && ht(this.width, e.width) && ht(this.height, e.height));
1488
- this.left = e, this.top = o, this.width = n, this.height = s, this.localLeft = i, this.localTop = r;
1573
+ this.left = e, this.top = o, this.width = n, this.height = s, this.localLeft = r, this.localTop = i;
1489
1574
  }
1490
1575
  /**
1491
1576
  * Creates a new Rect instance using an object with optional properties.
@@ -1517,10 +1602,10 @@ class Rt {
1517
1602
  top: o = 0,
1518
1603
  width: n = 0,
1519
1604
  height: s = 0,
1520
- localLeft: i = 0,
1521
- localTop: r = 0
1605
+ localLeft: r = 0,
1606
+ localTop: i = 0
1522
1607
  }) {
1523
- return new Rt(e, o, n, s, i, r);
1608
+ return new Rt(e, o, n, s, r, i);
1524
1609
  }
1525
1610
  /**
1526
1611
  * Gets the x-coordinate of the right edge of the rectangle.
@@ -1633,7 +1718,7 @@ class Rt {
1633
1718
  return { width: this.width, height: this.height };
1634
1719
  }
1635
1720
  }
1636
- function Qt(t) {
1721
+ function Jt(t) {
1637
1722
  const e = t.getBoundingClientRect();
1638
1723
  return Rt.of({
1639
1724
  top: e.top + window.scrollY,
@@ -1644,80 +1729,80 @@ function Qt(t) {
1644
1729
  localTop: t.offsetTop
1645
1730
  });
1646
1731
  }
1647
- const io = (t) => Se((e) => {
1648
- const { element: o } = e, n = F(Qt(o), (c, a) => c.equals(a)), s = Mt(t(n))(e), i = () => n.set(Rt.of(Qt(o)));
1649
- let r = null;
1650
- return typeof ResizeObserver < "u" && (r = new ResizeObserver(i)), r == null || r.observe(o), M((c) => {
1651
- r == null || r.disconnect(), s(c);
1732
+ const lo = (t) => ke((e) => {
1733
+ const { element: o } = e, n = W(Jt(o), (c, a) => c.equals(a)), s = Mt(t(n))(e), r = () => n.set(Rt.of(Jt(o)));
1734
+ let i = null;
1735
+ return typeof ResizeObserver < "u" && (i = new ResizeObserver(r)), i == null || i.observe(o), F((c) => {
1736
+ i == null || i.disconnect(), s(c);
1652
1737
  });
1653
1738
  });
1654
- function Jt(t) {
1739
+ function Gt(t) {
1655
1740
  return {
1656
1741
  /* c8 ignore next 6 */
1657
1742
  width: (t == null ? void 0 : t.innerWidth) ?? 0,
1658
1743
  height: (t == null ? void 0 : t.innerHeight) ?? 0
1659
1744
  };
1660
1745
  }
1661
- const co = (t) => (e) => {
1662
- const o = at(), n = F(
1663
- Jt(o),
1664
- (r, c) => r.width === c.width && r.height === c.height
1665
- ), s = Mt(t(n))(e), i = () => n.set(Jt(o));
1666
- return o == null || o.addEventListener("resize", i), (r) => {
1667
- o == null || o.removeEventListener("resize", i), s(r);
1746
+ const uo = (t) => (e) => {
1747
+ const o = at(), n = W(
1748
+ Gt(o),
1749
+ (i, c) => i.width === c.width && i.height === c.height
1750
+ ), s = Mt(t(n))(e), r = () => n.set(Gt(o));
1751
+ return o == null || o.addEventListener("resize", r), (i) => {
1752
+ o == null || o.removeEventListener("resize", r), s(i);
1668
1753
  };
1669
- }, Mn = (t, e) => {
1754
+ }, Vn = (t, e) => {
1670
1755
  const o = e.split("/").filter((s) => s !== ""), n = {};
1671
1756
  for (let s = 0; s < t.length; s++) {
1672
- const i = t[s], r = o[s];
1673
- if (!r && i.type !== "catch-all")
1757
+ const r = t[s], i = o[s];
1758
+ if (!i && r.type !== "catch-all")
1674
1759
  return null;
1675
- if (i.type === "literal") {
1676
- if (i.value !== r)
1760
+ if (r.type === "literal") {
1761
+ if (r.value !== i)
1677
1762
  return null;
1678
- } else if (i.type === "param")
1679
- n[i.name] = r;
1680
- else if (i.type === "catch-all")
1763
+ } else if (r.type === "param")
1764
+ n[r.name] = i;
1765
+ else if (r.type === "catch-all")
1681
1766
  return { params: n, path: e };
1682
1767
  }
1683
1768
  return o.length !== t.length ? null : { params: n, path: e };
1684
- }, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), ao = (t) => {
1769
+ }, Ae = (t) => t.split("/").map((e) => e.startsWith(":") ? { type: "param", name: e.slice(1) } : e === "*" ? { type: "catch-all" } : { type: "literal", value: e }).filter((e) => e.type !== "literal" || e.value !== ""), fo = (t) => {
1685
1770
  const e = t.map((o) => {
1686
1771
  const n = Ae(o);
1687
1772
  return { route: o, segments: n };
1688
1773
  });
1689
1774
  return function(n) {
1690
- for (const { segments: s, route: i } of e) {
1691
- const r = Mn(s, n);
1692
- if (r)
1693
- return { ...r, route: i };
1775
+ for (const { segments: s, route: r } of e) {
1776
+ const i = Vn(s, n);
1777
+ if (i)
1778
+ return { ...i, route: r };
1694
1779
  }
1695
1780
  return null;
1696
1781
  };
1697
1782
  }, Ct = {
1698
1783
  mark: Wt("RouterContext"),
1699
1784
  create: () => {
1700
- const t = F([]);
1785
+ const t = W([]);
1701
1786
  return {
1702
1787
  value: t,
1703
1788
  dispose: () => t.dispose()
1704
1789
  };
1705
1790
  }
1706
- }, Nn = (t, e, o) => {
1707
- const n = o.split("/").filter((r) => r !== ""), s = {};
1708
- let i = 0;
1709
- for (let r = 0; r < t.length; r++) {
1710
- const c = t[r], a = n[r];
1791
+ }, $n = (t, e, o) => {
1792
+ const n = o.split("/").filter((i) => i !== ""), s = {};
1793
+ let r = 0;
1794
+ for (let i = 0; i < t.length; i++) {
1795
+ const c = t[i], a = n[i];
1711
1796
  if (!a && c.type !== "catch-all")
1712
1797
  return null;
1713
1798
  if (c.type === "literal") {
1714
1799
  if (c.value !== a)
1715
1800
  return null;
1716
- i++;
1801
+ r++;
1717
1802
  } else if (c.type === "param")
1718
- s[c.name] = a, i++;
1803
+ s[c.name] = a, r++;
1719
1804
  else if (c.type === "catch-all") {
1720
- const l = "/" + n.slice(0, i).join("/"), f = "/" + n.slice(i).join("/");
1805
+ const l = "/" + n.slice(0, r).join("/"), f = "/" + n.slice(r).join("/");
1721
1806
  return {
1722
1807
  params: s,
1723
1808
  matchedPath: l === "/" ? "" : l,
@@ -1727,10 +1812,10 @@ const co = (t) => (e) => {
1727
1812
  }
1728
1813
  }
1729
1814
  if (n.length === t.length) {
1730
- const r = "/" + n.join("/");
1815
+ const i = "/" + n.join("/");
1731
1816
  return {
1732
1817
  params: s,
1733
- matchedPath: r === "/" ? "" : r,
1818
+ matchedPath: i === "/" ? "" : i,
1734
1819
  remainingPath: "",
1735
1820
  route: e
1736
1821
  };
@@ -1742,51 +1827,51 @@ const co = (t) => (e) => {
1742
1827
  return { route: o, segments: n };
1743
1828
  });
1744
1829
  return function(n) {
1745
- for (const { segments: s, route: i } of e) {
1746
- const r = Nn(s, i, n);
1747
- if (r)
1748
- return r;
1830
+ for (const { segments: s, route: r } of e) {
1831
+ const i = $n(s, r, n);
1832
+ if (i)
1833
+ return i;
1749
1834
  }
1750
1835
  return null;
1751
1836
  };
1752
- }, lo = (t) => {
1837
+ }, ho = (t) => {
1753
1838
  const e = Oe(Object.keys(t));
1754
- return ke(
1839
+ return Se(
1755
1840
  Ct,
1756
1841
  {},
1757
- () => rt(Nt, (o) => rt(Ct, (n) => {
1758
- const s = o.map((i) => {
1759
- const r = e(i.pathname);
1760
- if (r == null)
1761
- throw console.error("No route found for", i), new Error("No route found");
1842
+ () => it(Nt, (o) => it(Ct, (n) => {
1843
+ const s = o.map((r) => {
1844
+ const i = e(r.pathname);
1845
+ if (i == null)
1846
+ throw console.error("No route found for", r), new Error("No route found");
1762
1847
  const c = {
1763
- matchedPath: r.matchedPath,
1764
- remainingPath: r.remainingPath,
1765
- fullPath: i.pathname,
1766
- params: r.params
1848
+ matchedPath: i.matchedPath,
1849
+ remainingPath: i.remainingPath,
1850
+ fullPath: r.pathname,
1851
+ params: i.params
1767
1852
  };
1768
1853
  return n.value = [...n.value, c], {
1769
- params: r.params,
1770
- route: r.route,
1771
- path: r.matchedPath || i.pathname,
1772
- search: i.search,
1773
- hash: i.hash
1854
+ params: i.params,
1855
+ route: i.route,
1856
+ path: i.matchedPath || r.pathname,
1857
+ search: r.search,
1858
+ hash: r.hash
1774
1859
  };
1775
1860
  });
1776
- return ce(
1777
- s.map((i) => [i.route, i]),
1861
+ return ae(
1862
+ s.map((r) => [r.route, r]),
1778
1863
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1779
1864
  t
1780
1865
  );
1781
1866
  }))
1782
1867
  );
1783
- }, uo = (t) => {
1868
+ }, mo = (t) => {
1784
1869
  const e = Oe(Object.keys(t));
1785
- return rt(Ct, (o) => rt(Nt, (n) => {
1786
- const s = o.map((i) => {
1787
- const r = i[i.length - 1], c = (r == null ? void 0 : r.remainingPath) || "";
1870
+ return it(Ct, (o) => it(Nt, (n) => {
1871
+ const s = o.map((r) => {
1872
+ const i = r[r.length - 1], c = (i == null ? void 0 : i.remainingPath) || "";
1788
1873
  if (c === "")
1789
- throw console.error("No remaining path for SubRouter", i), new Error("No remaining path for SubRouter");
1874
+ throw console.error("No remaining path for SubRouter", r), new Error("No remaining path for SubRouter");
1790
1875
  const a = e(c);
1791
1876
  if (a == null)
1792
1877
  throw console.error("No route found for remaining path", c), new Error("No route found");
@@ -1799,13 +1884,13 @@ const co = (t) => (e) => {
1799
1884
  hash: n.value.hash
1800
1885
  };
1801
1886
  });
1802
- return ce(
1803
- s.map((i) => [i.route, i]),
1887
+ return ae(
1888
+ s.map((r) => [r.route, r]),
1804
1889
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1805
1890
  t
1806
1891
  );
1807
1892
  }));
1808
- }, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Gt = 7 * ct, Zt = 30 * ct, Vn = 365 * ct, $n = [
1893
+ }, yt = 60 * 1e3, Dt = 60 * yt, ct = 24 * Dt, Zt = 7 * ct, te = 30 * ct, Bn = 365 * ct, Hn = [
1809
1894
  {
1810
1895
  max: yt * 90,
1811
1896
  value: yt,
@@ -1828,28 +1913,28 @@ const co = (t) => (e) => {
1828
1913
  future: { singular: "tomorrow", plural: "in {} days" }
1829
1914
  },
1830
1915
  {
1831
- max: Gt * 6,
1832
- value: Gt,
1916
+ max: Zt * 6,
1917
+ value: Zt,
1833
1918
  name: "week",
1834
1919
  past: { singular: "last week", plural: "{} weeks ago" },
1835
1920
  future: { singular: "in a week", plural: "in {} weeks" }
1836
1921
  },
1837
1922
  {
1838
- max: Zt * 18,
1839
- value: Zt,
1923
+ max: te * 18,
1924
+ value: te,
1840
1925
  name: "month",
1841
1926
  past: { singular: "last month", plural: "{} months ago" },
1842
1927
  future: { singular: "in a month", plural: "in {} months" }
1843
1928
  },
1844
1929
  {
1845
1930
  max: 1 / 0,
1846
- value: Vn,
1931
+ value: Bn,
1847
1932
  name: "year",
1848
1933
  past: { singular: "last year", plural: "{} years ago" },
1849
1934
  future: { singular: "in a year", plural: "in {} years" }
1850
1935
  }
1851
1936
  ];
1852
- function te(t, e, o, n) {
1937
+ function ee(t, e, o, n) {
1853
1938
  const s = Math.round(t / e);
1854
1939
  return s <= 1 ? o : n.replace(
1855
1940
  "{}",
@@ -1859,28 +1944,28 @@ function te(t, e, o, n) {
1859
1944
  })
1860
1945
  );
1861
1946
  }
1862
- const Bn = (t = 1e3) => {
1863
- const e = F(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
1947
+ const Un = (t = 1e3) => {
1948
+ const e = W(/* @__PURE__ */ new Date()), o = De(() => e.set(/* @__PURE__ */ new Date()), t);
1864
1949
  return e.onDispose(o), e;
1865
- }, Hn = (t) => {
1950
+ }, zn = (t) => {
1866
1951
  const e = Math.abs(t);
1867
1952
  if (e < yt)
1868
1953
  return t < 0 ? "just now" : "in a moment";
1869
- for (const o of $n)
1954
+ for (const o of Hn)
1870
1955
  if (e < o.max)
1871
- return t < 0 ? te(e, o.value, o.past.singular, o.past.plural) : te(e, o.value, o.future.singular, o.future.plural);
1956
+ return t < 0 ? ee(e, o.value, o.past.singular, o.past.plural) : ee(e, o.value, o.future.singular, o.future.plural);
1872
1957
  throw new Error("unreachable");
1873
- }, Un = (t, { now: e, frequency: o = 1e4 } = {}) => {
1874
- const n = e != null ? ee.is(e) ? e.derive() : F(e) : Bn(o), s = ie(
1958
+ }, Kn = (t, { now: e, frequency: o = 1e4 } = {}) => {
1959
+ const n = e != null ? ne.is(e) ? e.derive() : W(e) : Un(o), s = ce(
1875
1960
  t,
1876
1961
  n
1877
- )((i, r) => i.getTime() - r.getTime());
1878
- return s.onDispose(() => O.dispose(n)), s;
1879
- }, zn = (t, e = {}) => {
1880
- const o = Un(t, e), n = o.map(Hn);
1962
+ )((r, i) => r.getTime() - i.getTime());
1963
+ return s.onDispose(() => L.dispose(n)), s;
1964
+ }, jn = (t, e = {}) => {
1965
+ const o = Kn(t, e), n = o.map(zn);
1881
1966
  return n.onDispose(o.dispose), n;
1882
- }, fo = (t, e = {}) => zn(t, e);
1883
- class Kn extends Ce {
1967
+ }, go = (t, e = {}) => jn(t, e);
1968
+ class _n extends Ce {
1884
1969
  constructor() {
1885
1970
  super(...arguments);
1886
1971
  /**
@@ -1890,54 +1975,57 @@ class Kn extends Ce {
1890
1975
  At(this, "tick", () => this.update((o) => o + 1));
1891
1976
  }
1892
1977
  }
1893
- const ho = (t = 0) => new Kn(t, (e, o) => e === o);
1978
+ const po = (t = 0) => new _n(t, (e, o) => e === o);
1894
1979
  export {
1895
1980
  Ke as Anchor,
1896
- Yn as Appearance,
1897
- ue as AsyncResultView,
1898
- qn as AutoFocus,
1899
- Xn as AutoSelect,
1900
- uo as ChildRouter,
1901
- io as ElementRect,
1902
- Gn as HTMLTitle,
1903
- Jn as HiddenWhenEmpty,
1981
+ qn as Appearance,
1982
+ Vt as AsyncResultView,
1983
+ Qn as AutoFocus,
1984
+ Jn as AutoSelect,
1985
+ mo as ChildRouter,
1986
+ lo as ElementRect,
1987
+ to as HTMLTitle,
1988
+ Zn as HiddenWhenEmpty,
1904
1989
  Ye as InViewport,
1905
1990
  Nt as Location,
1906
- qe as OnClickOutside,
1907
- to as OnEnterKey,
1908
- eo as OnEscapeKey,
1991
+ so as Mutation,
1992
+ Je as MutationDisplay,
1993
+ Xe as OnClickOutside,
1994
+ no as OnEnterKey,
1995
+ oo as OnEscapeKey,
1909
1996
  fe as OnKeyPressed,
1910
- oo as PopOver,
1911
- so as Query,
1912
- Wn as QueryDisplay,
1997
+ ro as PopOver,
1998
+ co as Query,
1999
+ Mn as QueryDisplay,
1913
2000
  Rt as Rect,
1914
- Fn as ResultView,
1915
- lo as RootRouter,
2001
+ Nn as ResultView,
2002
+ ho as RootRouter,
1916
2003
  Ct as RouterContextProvider,
1917
- ro as SelectOnFocus,
1918
- Kn as Ticker,
1919
- Zn as WhenInViewport,
1920
- co as WindowSize,
2004
+ ao as SelectOnFocus,
2005
+ _n as Ticker,
2006
+ eo as WhenInViewport,
2007
+ uo as WindowSize,
1921
2008
  Fe as _checkExtensionCondition,
1922
2009
  We as _getExtension,
1923
- ao as _makeRouteMatcher,
2010
+ fo as _makeRouteMatcher,
1924
2011
  Ae as _parseRouteSegments,
1925
- no as allPlacements,
2012
+ io as allPlacements,
1926
2013
  Ve as areLocationsEqual,
1927
- Qn as classes,
1928
- Qt as getAbsoluteRect,
2014
+ Gn as classes,
2015
+ Jt as getAbsoluteRect,
1929
2016
  Ne as handleAnchorClick,
1930
- le as locationFromURL,
1931
- Dn as makeQueryResource,
1932
- Xe as matchesKeyCombo,
1933
- Mn as matchesRoute,
1934
- Bn as nowSignal,
1935
- fo as relativeTime,
1936
- Un as relativeTimeMillisSignal,
1937
- zn as relativeTimeSignal,
1938
- Kt as setLocationFromUrl,
1939
- ho as ticker,
1940
- Hn as timeDiffToString,
2017
+ ue as locationFromURL,
2018
+ Qe as makeMutationResource,
2019
+ Fn as makeQueryResource,
2020
+ qe as matchesKeyCombo,
2021
+ Vn as matchesRoute,
2022
+ Un as nowSignal,
2023
+ go as relativeTime,
2024
+ Kn as relativeTimeMillisSignal,
2025
+ jn as relativeTimeSignal,
2026
+ jt as setLocationFromUrl,
2027
+ po as ticker,
2028
+ zn as timeDiffToString,
1941
2029
  Pt as urlFromLocation,
1942
2030
  je as useAppearance
1943
2031
  };